(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document); var app = (function () { 'use strict'; function noop() { } function add_location(element, file, line, column, char) { element.__svelte_meta = { loc: { file, line, column, char } }; } function run(fn) { return fn(); } function blank_object() { return Object.create(null); } function run_all(fns) { fns.forEach(run); } function is_function(thing) { return typeof thing === 'function'; } function safe_not_equal(a, b) { return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); } function is_empty(obj) { return Object.keys(obj).length === 0; } function append(target, node) { target.appendChild(node); } function insert(target, node, anchor) { target.insertBefore(node, anchor || null); } function detach(node) { node.parentNode.removeChild(node); } function destroy_each(iterations, detaching) { for (let i = 0; i < iterations.length; i += 1) { if (iterations[i]) iterations[i].d(detaching); } } function element(name) { return document.createElement(name); } function text(data) { return document.createTextNode(data); } function space() { return text(' '); } function empty() { return text(''); } function attr(node, attribute, value) { if (value == null) node.removeAttribute(attribute); else if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value); } function children(element) { return Array.from(element.childNodes); } function custom_event(type, detail, bubbles = false) { const e = document.createEvent('CustomEvent'); e.initCustomEvent(type, bubbles, false, detail); return e; } let current_component; function set_current_component(component) { current_component = component; } const dirty_components = []; const binding_callbacks = []; const render_callbacks = []; const flush_callbacks = []; const resolved_promise = Promise.resolve(); let update_scheduled = false; function schedule_update() { if (!update_scheduled) { update_scheduled = true; resolved_promise.then(flush); } } function add_render_callback(fn) { render_callbacks.push(fn); } // flush() calls callbacks in this order: // 1. All beforeUpdate callbacks, in order: parents before children // 2. All bind:this callbacks, in reverse order: children before parents. // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT // for afterUpdates called during the initial onMount, which are called in // reverse order: children before parents. // Since callbacks might update component values, which could trigger another // call to flush(), the following steps guard against this: // 1. During beforeUpdate, any updated components will be added to the // dirty_components array and will cause a reentrant call to flush(). Because // the flush index is kept outside the function, the reentrant call will pick // up where the earlier call left off and go through all dirty components. The // current_component value is saved and restored so that the reentrant call will // not interfere with the "parent" flush() call. // 2. bind:this callbacks cannot trigger new flush() calls. // 3. During afterUpdate, any updated components will NOT have their afterUpdate // callback called a second time; the seen_callbacks set, outside the flush() // function, guarantees this behavior. const seen_callbacks = new Set(); let flushidx = 0; // Do *not* move this inside the flush() function function flush() { const saved_component = current_component; do { // first, call beforeUpdate functions // and update components while (flushidx < dirty_components.length) { const component = dirty_components[flushidx]; flushidx++; set_current_component(component); update(component.$$); } set_current_component(null); dirty_components.length = 0; flushidx = 0; while (binding_callbacks.length) binding_callbacks.pop()(); // then, once components are updated, call // afterUpdate functions. This may cause // subsequent updates... for (let i = 0; i < render_callbacks.length; i += 1) { const callback = render_callbacks[i]; if (!seen_callbacks.has(callback)) { // ...so guard against infinite loops seen_callbacks.add(callback); callback(); } } render_callbacks.length = 0; } while (dirty_components.length); while (flush_callbacks.length) { flush_callbacks.pop()(); } update_scheduled = false; seen_callbacks.clear(); set_current_component(saved_component); } function update($$) { if ($$.fragment !== null) { $$.update(); run_all($$.before_update); const dirty = $$.dirty; $$.dirty = [-1]; $$.fragment && $$.fragment.p($$.ctx, dirty); $$.after_update.forEach(add_render_callback); } } const outroing = new Set(); function transition_in(block, local) { if (block && block.i) { outroing.delete(block); block.i(local); } } const globals = (typeof window !== 'undefined' ? window : typeof globalThis !== 'undefined' ? globalThis : global); function mount_component(component, target, anchor, customElement) { const { fragment, on_mount, on_destroy, after_update } = component.$$; fragment && fragment.m(target, anchor); if (!customElement) { // onMount happens before the initial afterUpdate add_render_callback(() => { const new_on_destroy = on_mount.map(run).filter(is_function); if (on_destroy) { on_destroy.push(...new_on_destroy); } else { // Edge case - component was destroyed immediately, // most likely as a result of a binding initialising run_all(new_on_destroy); } component.$$.on_mount = []; }); } after_update.forEach(add_render_callback); } function destroy_component(component, detaching) { const $$ = component.$$; if ($$.fragment !== null) { run_all($$.on_destroy); $$.fragment && $$.fragment.d(detaching); // TODO null out other refs, including component.$$ (but need to // preserve final state?) $$.on_destroy = $$.fragment = null; $$.ctx = []; } } function make_dirty(component, i) { if (component.$$.dirty[0] === -1) { dirty_components.push(component); schedule_update(); component.$$.dirty.fill(0); } component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31)); } function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) { const parent_component = current_component; set_current_component(component); const $$ = component.$$ = { fragment: null, ctx: null, // state props, update: noop, not_equal, bound: blank_object(), // lifecycle on_mount: [], on_destroy: [], on_disconnect: [], before_update: [], after_update: [], context: new Map(options.context || (parent_component ? parent_component.$$.context : [])), // everything else callbacks: blank_object(), dirty, skip_bound: false, root: options.target || parent_component.$$.root }; append_styles && append_styles($$.root); let ready = false; $$.ctx = instance ? instance(component, options.props || {}, (i, ret, ...rest) => { const value = rest.length ? rest[0] : ret; if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); if (ready) make_dirty(component, i); } return ret; }) : []; $$.update(); ready = true; run_all($$.before_update); // `false` as a special case of no DOM component $$.fragment = create_fragment ? create_fragment($$.ctx) : false; if (options.target) { if (options.hydrate) { const nodes = children(options.target); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion $$.fragment && $$.fragment.l(nodes); nodes.forEach(detach); } else { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion $$.fragment && $$.fragment.c(); } if (options.intro) transition_in(component.$$.fragment); mount_component(component, options.target, options.anchor, options.customElement); flush(); } set_current_component(parent_component); } /** * Base class for Svelte components. Used when dev=false. */ class SvelteComponent { $destroy() { destroy_component(this, 1); this.$destroy = noop; } $on(type, callback) { const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = [])); callbacks.push(callback); return () => { const index = callbacks.indexOf(callback); if (index !== -1) callbacks.splice(index, 1); }; } $set($$props) { if (this.$$set && !is_empty($$props)) { this.$$.skip_bound = true; this.$$set($$props); this.$$.skip_bound = false; } } } function dispatch_dev(type, detail) { document.dispatchEvent(custom_event(type, Object.assign({ version: '3.46.4' }, detail), true)); } function append_dev(target, node) { dispatch_dev('SvelteDOMInsert', { target, node }); append(target, node); } function insert_dev(target, node, anchor) { dispatch_dev('SvelteDOMInsert', { target, node, anchor }); insert(target, node, anchor); } function detach_dev(node) { dispatch_dev('SvelteDOMRemove', { node }); detach(node); } function attr_dev(node, attribute, value) { attr(node, attribute, value); if (value == null) dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute }); else dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value }); } function validate_each_argument(arg) { if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) { let msg = '{#each} only iterates over array-like objects.'; if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) { msg += ' You can use a spread to convert this iterable into an array.'; } throw new Error(msg); } } function validate_slots(name, slot, keys) { for (const slot_key of Object.keys(slot)) { if (!~keys.indexOf(slot_key)) { console.warn(`<${name}> received an unexpected slot "${slot_key}".`); } } } /** * Base class for Svelte components with some minor dev-enhancements. Used when dev=true. */ class SvelteComponentDev extends SvelteComponent { constructor(options) { if (!options || (!options.target && !options.$$inline)) { throw new Error("'target' is a required option"); } super(); } $destroy() { super.$destroy(); this.$destroy = () => { console.warn('Component was already destroyed'); // eslint-disable-line no-console }; } $capture_state() { } $inject_state() { } } /* src\App.svelte generated by Svelte v3.46.4 */ const { console: console_1 } = globals; const file = "src\\App.svelte"; function get_each_context(ctx, list, i) { const child_ctx = ctx.slice(); child_ctx[5] = list[i]; return child_ctx; } function get_each_context_1(ctx, list, i) { const child_ctx = ctx.slice(); child_ctx[5] = list[i]; return child_ctx; } function get_each_context_2(ctx, list, i) { const child_ctx = ctx.slice(); child_ctx[10] = list[i]; child_ctx[12] = i; return child_ctx; } function get_each_context_3(ctx, list, i) { const child_ctx = ctx.slice(); child_ctx[13] = list[i]; child_ctx[15] = i; return child_ctx; } function get_each_context_4(ctx, list, i) { const child_ctx = ctx.slice(); child_ctx[10] = list[i]; child_ctx[12] = i; return child_ctx; } function get_each_context_5(ctx, list, i) { const child_ctx = ctx.slice(); child_ctx[12] = list[i]; return child_ctx; } // (124:4) {:else} function create_else_block_7(ctx) { let div; let t_value = /*month*/ ctx[13] + ""; let t; const block = { c: function create() { div = element("div"); t = text(t_value); add_location(div, file, 124, 5, 2338); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); append_dev(div, t); }, p: noop, d: function destroy(detaching) { if (detaching) detach_dev(div); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_else_block_7.name, type: "else", source: "(124:4) {:else}", ctx }); return block; } // (118:4) {#if month_i == get_month()} function create_if_block_10(ctx) { let div1; let div0; let t_value = /*month*/ ctx[13] + ""; let t; const block = { c: function create() { div1 = element("div"); div0 = element("div"); t = text(t_value); attr_dev(div0, "class", "selected monthtag svelte-yh5og3"); add_location(div0, file, 119, 6, 2249); add_location(div1, file, 118, 5, 2237); }, m: function mount(target, anchor) { insert_dev(target, div1, anchor); append_dev(div1, div0); append_dev(div0, t); }, p: noop, d: function destroy(detaching) { if (detaching) detach_dev(div1); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_10.name, type: "if", source: "(118:4) {#if month_i == get_month()}", ctx }); return block; } // (130:5) {#each get_time(month_i) as i} function create_each_block_5(ctx) { let div; const block = { c: function create() { div = element("div"); attr_dev(div, "class", "day svelte-yh5og3"); add_location(div, file, 130, 6, 2447); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); }, d: function destroy(detaching) { if (detaching) detach_dev(div); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_each_block_5.name, type: "each", source: "(130:5) {#each get_time(month_i) as i}", ctx }); return block; } // (151:7) {:else} function create_else_block_6(ctx) { let div; let t0_value = /*i*/ ctx[12] + 1 + ""; let t0; let t1; const block = { c: function create() { div = element("div"); t0 = text(t0_value); t1 = space(); attr_dev(div, "class", "day weekend svelte-yh5og3"); add_location(div, file, 151, 8, 3027); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); append_dev(div, t0); append_dev(div, t1); }, p: noop, d: function destroy(detaching) { if (detaching) detach_dev(div); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_else_block_6.name, type: "else", source: "(151:7) {:else}", ctx }); return block; } // (147:7) {#if i == get_day() - 1 && month_i == get_month()} function create_if_block_9(ctx) { let div; let t0_value = /*i*/ ctx[12] + 1 + ""; let t0; let t1; const block = { c: function create() { div = element("div"); t0 = text(t0_value); t1 = space(); attr_dev(div, "class", "day selected weekend svelte-yh5og3"); add_location(div, file, 147, 8, 2937); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); append_dev(div, t0); append_dev(div, t1); }, p: noop, d: function destroy(detaching) { if (detaching) detach_dev(div); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_9.name, type: "if", source: "(147:7) {#if i == get_day() - 1 && month_i == get_month()}", ctx }); return block; } // (136:6) {#if get_week_day_long(get_year(), month_i, i) != 5 && get_week_day_long(get_year(), month_i, i) != 6} function create_if_block_7(ctx) { let if_block_anchor; function select_block_type_2(ctx, dirty) { if (/*i*/ ctx[12] == get_day() - 1 && /*month_i*/ ctx[15] == get_month()) return create_if_block_8; return create_else_block_5; } let current_block_type = select_block_type_2(ctx); let if_block = current_block_type(ctx); const block = { c: function create() { if_block.c(); if_block_anchor = empty(); }, m: function mount(target, anchor) { if_block.m(target, anchor); insert_dev(target, if_block_anchor, anchor); }, p: noop, d: function destroy(detaching) { if_block.d(detaching); if (detaching) detach_dev(if_block_anchor); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_7.name, type: "if", source: "(136:6) {#if get_week_day_long(get_year(), month_i, i) != 5 && get_week_day_long(get_year(), month_i, i) != 6}", ctx }); return block; } // (141:7) {:else} function create_else_block_5(ctx) { let div; let t0_value = /*i*/ ctx[12] + 1 + ""; let t0; let t1; const block = { c: function create() { div = element("div"); t0 = text(t0_value); t1 = space(); attr_dev(div, "class", "day svelte-yh5og3"); add_location(div, file, 141, 8, 2794); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); append_dev(div, t0); append_dev(div, t1); }, d: function destroy(detaching) { if (detaching) detach_dev(div); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_else_block_5.name, type: "else", source: "(141:7) {:else}", ctx }); return block; } // (137:7) {#if i == get_day() - 1 && month_i == get_month()} function create_if_block_8(ctx) { let div; let t0_value = /*i*/ ctx[12] + 1 + ""; let t0; let t1; const block = { c: function create() { div = element("div"); t0 = text(t0_value); t1 = space(); attr_dev(div, "class", "day selected svelte-yh5og3"); add_location(div, file, 137, 8, 2712); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); append_dev(div, t0); append_dev(div, t1); }, d: function destroy(detaching) { if (detaching) detach_dev(div); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_8.name, type: "if", source: "(137:7) {#if i == get_day() - 1 && month_i == get_month()}", ctx }); return block; } // (135:5) {#each lengths[month] as day, i} function create_each_block_4(ctx) { let if_block_anchor; function select_block_type_1(ctx, dirty) { if (get_week_day_long(get_year(), /*month_i*/ ctx[15], /*i*/ ctx[12]) != 5 && get_week_day_long(get_year(), /*month_i*/ ctx[15], /*i*/ ctx[12]) != 6) return create_if_block_7; if (/*i*/ ctx[12] == get_day() - 1 && /*month_i*/ ctx[15] == get_month()) return create_if_block_9; return create_else_block_6; } let current_block_type = select_block_type_1(ctx); let if_block = current_block_type(ctx); const block = { c: function create() { if_block.c(); if_block_anchor = empty(); }, m: function mount(target, anchor) { if_block.m(target, anchor); insert_dev(target, if_block_anchor, anchor); }, p: function update(ctx, dirty) { if_block.p(ctx, dirty); }, d: function destroy(detaching) { if_block.d(detaching); if (detaching) detach_dev(if_block_anchor); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_each_block_4.name, type: "each", source: "(135:5) {#each lengths[month] as day, i}", ctx }); return block; } // (116:2) {#each months as month, month_i} function create_each_block_3(ctx) { let div; let t0; let span; let t1; let t2; function select_block_type(ctx, dirty) { if (/*month_i*/ ctx[15] == get_month()) return create_if_block_10; return create_else_block_7; } let current_block_type = select_block_type(ctx); let if_block = current_block_type(ctx); let each_value_5 = get_time(/*month_i*/ ctx[15]); validate_each_argument(each_value_5); let each_blocks_1 = []; for (let i = 0; i < each_value_5.length; i += 1) { each_blocks_1[i] = create_each_block_5(get_each_context_5(ctx, each_value_5, i)); } let each_value_4 = /*lengths*/ ctx[0][/*month*/ ctx[13]]; validate_each_argument(each_value_4); let each_blocks = []; for (let i = 0; i < each_value_4.length; i += 1) { each_blocks[i] = create_each_block_4(get_each_context_4(ctx, each_value_4, i)); } const block = { c: function create() { div = element("div"); if_block.c(); t0 = space(); span = element("span"); for (let i = 0; i < each_blocks_1.length; i += 1) { each_blocks_1[i].c(); } t1 = space(); for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].c(); } t2 = space(); attr_dev(span, "class", "days svelte-yh5og3"); add_location(span, file, 128, 4, 2384); add_location(div, file, 116, 3, 2193); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); if_block.m(div, null); append_dev(div, t0); append_dev(div, span); for (let i = 0; i < each_blocks_1.length; i += 1) { each_blocks_1[i].m(span, null); } append_dev(span, t1); for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].m(span, null); } append_dev(div, t2); }, p: function update(ctx, dirty) { if_block.p(ctx, dirty); if (dirty & /*get_day, get_month, get_week_day_long, get_year, lengths*/ 1) { each_value_4 = /*lengths*/ ctx[0][/*month*/ ctx[13]]; validate_each_argument(each_value_4); let i; for (i = 0; i < each_value_4.length; i += 1) { const child_ctx = get_each_context_4(ctx, each_value_4, i); if (each_blocks[i]) { each_blocks[i].p(child_ctx, dirty); } else { each_blocks[i] = create_each_block_4(child_ctx); each_blocks[i].c(); each_blocks[i].m(span, null); } } for (; i < each_blocks.length; i += 1) { each_blocks[i].d(1); } each_blocks.length = each_value_4.length; } }, d: function destroy(detaching) { if (detaching) detach_dev(div); if_block.d(); destroy_each(each_blocks_1, detaching); destroy_each(each_blocks, detaching); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_each_block_3.name, type: "each", source: "(116:2) {#each months as month, month_i}", ctx }); return block; } // (188:3) {:else} function create_else_block_4(ctx) { let div; let t0_value = /*day*/ ctx[10] + ""; let t0; let t1; const block = { c: function create() { div = element("div"); t0 = text(t0_value); t1 = space(); add_location(div, file, 188, 4, 3643); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); append_dev(div, t0); append_dev(div, t1); }, p: noop, d: function destroy(detaching) { if (detaching) detach_dev(div); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_else_block_4.name, type: "else", source: "(188:3) {:else}", ctx }); return block; } // (184:3) {#if i - 1 == get_day()} function create_if_block_6(ctx) { let div; let t0_value = /*day*/ ctx[10] + ""; let t0; let t1; const block = { c: function create() { div = element("div"); t0 = text(t0_value); t1 = space(); attr_dev(div, "class", "selected svelte-yh5og3"); add_location(div, file, 184, 4, 3583); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); append_dev(div, t0); append_dev(div, t1); }, p: noop, d: function destroy(detaching) { if (detaching) detach_dev(div); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_6.name, type: "if", source: "(184:3) {#if i - 1 == get_day()}", ctx }); return block; } // (183:2) {#each get_weekdays() as day, i} function create_each_block_2(ctx) { let if_block_anchor; function select_block_type_3(ctx, dirty) { if (/*i*/ ctx[12] - 1 == get_day()) return create_if_block_6; return create_else_block_4; } let current_block_type = select_block_type_3(ctx); let if_block = current_block_type(ctx); const block = { c: function create() { if_block.c(); if_block_anchor = empty(); }, m: function mount(target, anchor) { if_block.m(target, anchor); insert_dev(target, if_block_anchor, anchor); }, p: function update(ctx, dirty) { if_block.p(ctx, dirty); }, d: function destroy(detaching) { if_block.d(detaching); if (detaching) detach_dev(if_block_anchor); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_each_block_2.name, type: "each", source: "(183:2) {#each get_weekdays() as day, i}", ctx }); return block; } // (222:5) {:else} function create_else_block_3(ctx) { let div; let t0_value = "0" + /*hour*/ ctx[5].toString() + ""; let t0; let t1; const block = { c: function create() { div = element("div"); t0 = text(t0_value); t1 = space(); attr_dev(div, "class", "hs selected svelte-yh5og3"); add_location(div, file, 222, 6, 4165); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); append_dev(div, t0); append_dev(div, t1); }, p: noop, d: function destroy(detaching) { if (detaching) detach_dev(div); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_else_block_3.name, type: "else", source: "(222:5) {:else}", ctx }); return block; } // (218:5) {#if get_hour() != hour} function create_if_block_5(ctx) { let div; let t0_value = "0" + /*hour*/ ctx[5].toString() + ""; let t0; let t1; const block = { c: function create() { div = element("div"); t0 = text(t0_value); t1 = space(); attr_dev(div, "class", "hs svelte-yh5og3"); add_location(div, file, 218, 6, 4085); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); append_dev(div, t0); append_dev(div, t1); }, p: noop, d: function destroy(detaching) { if (detaching) detach_dev(div); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_5.name, type: "if", source: "(218:5) {#if get_hour() != hour}", ctx }); return block; } // (207:4) {#if hour.toString().length == 2} function create_if_block_3(ctx) { let if_block_anchor; function select_block_type_5(ctx, dirty) { if (get_hour() != /*hour*/ ctx[5]) return create_if_block_4; return create_else_block_2; } let current_block_type = select_block_type_5(ctx); let if_block = current_block_type(ctx); const block = { c: function create() { if_block.c(); if_block_anchor = empty(); }, m: function mount(target, anchor) { if_block.m(target, anchor); insert_dev(target, if_block_anchor, anchor); }, p: function update(ctx, dirty) { if_block.p(ctx, dirty); }, d: function destroy(detaching) { if_block.d(detaching); if (detaching) detach_dev(if_block_anchor); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_3.name, type: "if", source: "(207:4) {#if hour.toString().length == 2}", ctx }); return block; } // (212:5) {:else} function create_else_block_2(ctx) { let div; let t0_value = /*hour*/ ctx[5] + ""; let t0; let t1; const block = { c: function create() { div = element("div"); t0 = text(t0_value); t1 = space(); attr_dev(div, "class", "hs selected svelte-yh5og3"); add_location(div, file, 212, 6, 3973); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); append_dev(div, t0); append_dev(div, t1); }, p: noop, d: function destroy(detaching) { if (detaching) detach_dev(div); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_else_block_2.name, type: "else", source: "(212:5) {:else}", ctx }); return block; } // (208:5) {#if get_hour() != hour} function create_if_block_4(ctx) { let div; let t0_value = /*hour*/ ctx[5] + ""; let t0; let t1; const block = { c: function create() { div = element("div"); t0 = text(t0_value); t1 = space(); attr_dev(div, "class", "hs svelte-yh5og3"); add_location(div, file, 208, 6, 3910); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); append_dev(div, t0); append_dev(div, t1); }, p: noop, d: function destroy(detaching) { if (detaching) detach_dev(div); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_4.name, type: "if", source: "(208:5) {#if get_hour() != hour}", ctx }); return block; } // (206:3) {#each get_hours() as hour} function create_each_block_1(ctx) { let if_block_anchor; function select_block_type_4(ctx, dirty) { if (/*hour*/ ctx[5].toString().length == 2) return create_if_block_3; if (get_hour() != /*hour*/ ctx[5]) return create_if_block_5; return create_else_block_3; } let current_block_type = select_block_type_4(ctx); let if_block = current_block_type(ctx); const block = { c: function create() { if_block.c(); if_block_anchor = empty(); }, m: function mount(target, anchor) { if_block.m(target, anchor); insert_dev(target, if_block_anchor, anchor); }, p: function update(ctx, dirty) { if_block.p(ctx, dirty); }, d: function destroy(detaching) { if_block.d(detaching); if (detaching) detach_dev(if_block_anchor); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_each_block_1.name, type: "each", source: "(206:3) {#each get_hours() as hour}", ctx }); return block; } // (247:4) {:else} function create_else_block_1(ctx) { let div; let t0_value = "0" + /*hour*/ ctx[5].toString() + ""; let t0; let t1; const block = { c: function create() { div = element("div"); t0 = text(t0_value); t1 = space(); attr_dev(div, "class", "hs selected svelte-yh5og3"); add_location(div, file, 247, 5, 4646); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); append_dev(div, t0); append_dev(div, t1); }, p: noop, d: function destroy(detaching) { if (detaching) detach_dev(div); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_else_block_1.name, type: "else", source: "(247:4) {:else}", ctx }); return block; } // (243:4) {#if get_minute() != hour} function create_if_block_2(ctx) { let div; let t0_value = "0" + /*hour*/ ctx[5].toString() + ""; let t0; let t1; const block = { c: function create() { div = element("div"); t0 = text(t0_value); t1 = space(); attr_dev(div, "class", "hs svelte-yh5og3"); add_location(div, file, 243, 5, 4570); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); append_dev(div, t0); append_dev(div, t1); }, p: noop, d: function destroy(detaching) { if (detaching) detach_dev(div); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_2.name, type: "if", source: "(243:4) {#if get_minute() != hour}", ctx }); return block; } // (232:3) {#if hour.toString().length == 2} function create_if_block(ctx) { let if_block_anchor; function select_block_type_7(ctx, dirty) { if (get_minute() != /*hour*/ ctx[5]) return create_if_block_1; return create_else_block; } let current_block_type = select_block_type_7(ctx); let if_block = current_block_type(ctx); const block = { c: function create() { if_block.c(); if_block_anchor = empty(); }, m: function mount(target, anchor) { if_block.m(target, anchor); insert_dev(target, if_block_anchor, anchor); }, p: function update(ctx, dirty) { if_block.p(ctx, dirty); }, d: function destroy(detaching) { if_block.d(detaching); if (detaching) detach_dev(if_block_anchor); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block.name, type: "if", source: "(232:3) {#if hour.toString().length == 2}", ctx }); return block; } // (237:4) {:else} function create_else_block(ctx) { let div; let t0_value = /*hour*/ ctx[5] + ""; let t0; let t1; const block = { c: function create() { div = element("div"); t0 = text(t0_value); t1 = space(); attr_dev(div, "class", "hs selected svelte-yh5og3"); add_location(div, file, 237, 5, 4462); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); append_dev(div, t0); append_dev(div, t1); }, p: noop, d: function destroy(detaching) { if (detaching) detach_dev(div); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_else_block.name, type: "else", source: "(237:4) {:else}", ctx }); return block; } // (233:4) {#if get_minute() != hour} function create_if_block_1(ctx) { let div; let t0_value = /*hour*/ ctx[5] + ""; let t0; let t1; const block = { c: function create() { div = element("div"); t0 = text(t0_value); t1 = space(); attr_dev(div, "class", "hs svelte-yh5og3"); add_location(div, file, 233, 5, 4403); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); append_dev(div, t0); append_dev(div, t1); }, p: noop, d: function destroy(detaching) { if (detaching) detach_dev(div); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_1.name, type: "if", source: "(233:4) {#if get_minute() != hour}", ctx }); return block; } // (231:3) {#each get_minutes() as hour} function create_each_block(ctx) { let if_block_anchor; function select_block_type_6(ctx, dirty) { if (/*hour*/ ctx[5].toString().length == 2) return create_if_block; if (get_minute() != /*hour*/ ctx[5]) return create_if_block_2; return create_else_block_1; } let current_block_type = select_block_type_6(ctx); let if_block = current_block_type(ctx); const block = { c: function create() { if_block.c(); if_block_anchor = empty(); }, m: function mount(target, anchor) { if_block.m(target, anchor); insert_dev(target, if_block_anchor, anchor); }, p: function update(ctx, dirty) { if_block.p(ctx, dirty); }, d: function destroy(detaching) { if_block.d(detaching); if (detaching) detach_dev(if_block_anchor); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_each_block.name, type: "each", source: "(231:3) {#each get_minutes() as hour}", ctx }); return block; } function create_fragment(ctx) { let main; let t0; let div0; let t1; let div1; let t2; let time; let div6; let div2; let t4; let div3; let t6; let div4; let t7; let div5; let each_value_3 = /*months*/ ctx[1]; validate_each_argument(each_value_3); let each_blocks_3 = []; for (let i = 0; i < each_value_3.length; i += 1) { each_blocks_3[i] = create_each_block_3(get_each_context_3(ctx, each_value_3, i)); } let each_value_2 = get_weekdays(); validate_each_argument(each_value_2); let each_blocks_2 = []; for (let i = 0; i < each_value_2.length; i += 1) { each_blocks_2[i] = create_each_block_2(get_each_context_2(ctx, each_value_2, i)); } let each_value_1 = get_hours(); validate_each_argument(each_value_1); let each_blocks_1 = []; for (let i = 0; i < each_value_1.length; i += 1) { each_blocks_1[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i)); } let each_value = get_minutes(); validate_each_argument(each_value); let each_blocks = []; for (let i = 0; i < each_value.length; i += 1) { each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); } const block = { c: function create() { main = element("main"); t0 = text("2022\n\t"); div0 = element("div"); for (let i = 0; i < each_blocks_3.length; i += 1) { each_blocks_3[i].c(); } t1 = space(); div1 = element("div"); for (let i = 0; i < each_blocks_2.length; i += 1) { each_blocks_2[i].c(); } t2 = space(); time = element("time"); div6 = element("div"); div2 = element("div"); div2.textContent = "Hrs"; t4 = space(); div3 = element("div"); div3.textContent = "Min"; t6 = space(); div4 = element("div"); for (let i = 0; i < each_blocks_1.length; i += 1) { each_blocks_1[i].c(); } t7 = space(); div5 = element("div"); for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].c(); } attr_dev(div0, "class", "months svelte-yh5og3"); add_location(div0, file, 114, 1, 2134); attr_dev(div1, "class", "weeks svelte-yh5og3"); add_location(div1, file, 161, 1, 3164); attr_dev(main, "class", "svelte-yh5og3"); add_location(main, file, 112, 0, 2120); add_location(div2, file, 198, 2, 3736); add_location(div3, file, 201, 2, 3761); attr_dev(div4, "class", "hss svelte-yh5og3"); add_location(div4, file, 204, 2, 3786); attr_dev(div5, "class", "mss svelte-yh5og3"); add_location(div5, file, 229, 2, 4278); attr_dev(div6, "class", "time svelte-yh5og3"); add_location(div6, file, 197, 1, 3715); attr_dev(time, "class", "svelte-yh5og3"); add_location(time, file, 196, 0, 3707); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); }, m: function mount(target, anchor) { insert_dev(target, main, anchor); append_dev(main, t0); append_dev(main, div0); for (let i = 0; i < each_blocks_3.length; i += 1) { each_blocks_3[i].m(div0, null); } append_dev(main, t1); append_dev(main, div1); for (let i = 0; i < each_blocks_2.length; i += 1) { each_blocks_2[i].m(div1, null); } insert_dev(target, t2, anchor); insert_dev(target, time, anchor); append_dev(time, div6); append_dev(div6, div2); append_dev(div6, t4); append_dev(div6, div3); append_dev(div6, t6); append_dev(div6, div4); for (let i = 0; i < each_blocks_1.length; i += 1) { each_blocks_1[i].m(div4, null); } append_dev(div6, t7); append_dev(div6, div5); for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].m(div5, null); } }, p: function update(ctx, [dirty]) { if (dirty & /*lengths, months, get_day, get_month, get_week_day_long, get_year, get_time*/ 3) { each_value_3 = /*months*/ ctx[1]; validate_each_argument(each_value_3); let i; for (i = 0; i < each_value_3.length; i += 1) { const child_ctx = get_each_context_3(ctx, each_value_3, i); if (each_blocks_3[i]) { each_blocks_3[i].p(child_ctx, dirty); } else { each_blocks_3[i] = create_each_block_3(child_ctx); each_blocks_3[i].c(); each_blocks_3[i].m(div0, null); } } for (; i < each_blocks_3.length; i += 1) { each_blocks_3[i].d(1); } each_blocks_3.length = each_value_3.length; } if (dirty & /*get_weekdays, get_day*/ 0) { each_value_2 = get_weekdays(); validate_each_argument(each_value_2); let i; for (i = 0; i < each_value_2.length; i += 1) { const child_ctx = get_each_context_2(ctx, each_value_2, i); if (each_blocks_2[i]) { each_blocks_2[i].p(child_ctx, dirty); } else { each_blocks_2[i] = create_each_block_2(child_ctx); each_blocks_2[i].c(); each_blocks_2[i].m(div1, null); } } for (; i < each_blocks_2.length; i += 1) { each_blocks_2[i].d(1); } each_blocks_2.length = each_value_2.length; } if (dirty & /*get_hours, get_hour*/ 0) { each_value_1 = get_hours(); validate_each_argument(each_value_1); let i; for (i = 0; i < each_value_1.length; i += 1) { const child_ctx = get_each_context_1(ctx, each_value_1, i); if (each_blocks_1[i]) { each_blocks_1[i].p(child_ctx, dirty); } else { each_blocks_1[i] = create_each_block_1(child_ctx); each_blocks_1[i].c(); each_blocks_1[i].m(div4, null); } } for (; i < each_blocks_1.length; i += 1) { each_blocks_1[i].d(1); } each_blocks_1.length = each_value_1.length; } if (dirty & /*get_minutes, get_minute*/ 0) { each_value = get_minutes(); validate_each_argument(each_value); let i; for (i = 0; i < each_value.length; i += 1) { const child_ctx = get_each_context(ctx, each_value, i); if (each_blocks[i]) { each_blocks[i].p(child_ctx, dirty); } else { each_blocks[i] = create_each_block(child_ctx); each_blocks[i].c(); each_blocks[i].m(div5, null); } } for (; i < each_blocks.length; i += 1) { each_blocks[i].d(1); } each_blocks.length = each_value.length; } }, i: noop, o: noop, d: function destroy(detaching) { if (detaching) detach_dev(main); destroy_each(each_blocks_3, detaching); destroy_each(each_blocks_2, detaching); if (detaching) detach_dev(t2); if (detaching) detach_dev(time); destroy_each(each_blocks_1, detaching); destroy_each(each_blocks, detaching); } }; dispatch_dev("SvelteRegisterBlock", { block, id: create_fragment.name, type: "component", source: "", ctx }); return block; } function get_time(index) { var date = new Date(); let time = new Date(date.getFullYear(), index, 1).getDay(); time -= 1; if (time == -1) { time = 6; } let array = []; for (var i = 0; i < time; i++) { array.push(i); } return array; } function get_day() { var date = new Date(); // console.log(date.getDate()); return date.getDate(); } // return 25; function get_month() { var date = new Date(); // console.log(date.getDate()); return date.getMonth(); } function get_year() { var date = new Date(); console.log(date.getDate()); return date.getFullYear(); } function get_week_day() { var date = new Date(); // console.log(date.getDate()); return date.getDay(); } function get_week_day_long(year, month, day) { var date = new Date(year, month, day); // console.log(date.getDate()); return date.getDay(); } function get_weekdays() { var list = []; var day = 0; for (var i = 0; i < 37; i++) { day += 1; if (day == 8) { day = 1; } switch (day) { case 1: list.push("M"); break; case 2: list.push("T"); break; case 3: list.push("O"); break; case 4: list.push("T"); break; case 5: list.push("F"); break; case 6: list.push("L"); break; case 7: list.push("S"); break; } } return list; } function get_hours() { let arr = []; for (var i = 0; i < 24; i++) { arr.push(i); } return arr; } function get_hour() { let date = new Date(); return date.getHours(); } function get_minutes() { let arr = []; for (var i = 0; i < 60; i++) { arr.push(i); } return arr; } function get_minute() { let date = new Date(); return date.getMinutes(); } function instance($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; validate_slots('App', slots, []); let months = [ "Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec" ]; let months_length = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; let weeks = ["M", "T", "O", "T", "F", "L", "S"]; let lengths = {}; init(); function init() { for (var i = 0; i < months.length; i++) { $$invalidate(0, lengths[months[i]] = [], lengths); for (var j = 0; j < months_length[i]; j++) { lengths[months[i]].push(0); } } } const writable_props = []; Object.keys($$props).forEach(key => { if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1.warn(` was created with unknown prop '${key}'`); }); $$self.$capture_state = () => ({ months, months_length, weeks, lengths, init, get_time, get_day, get_month, get_year, get_week_day, get_week_day_long, get_weekdays, get_hours, get_hour, get_minutes, get_minute }); $$self.$inject_state = $$props => { if ('months' in $$props) $$invalidate(1, months = $$props.months); if ('months_length' in $$props) months_length = $$props.months_length; if ('weeks' in $$props) weeks = $$props.weeks; if ('lengths' in $$props) $$invalidate(0, lengths = $$props.lengths); }; if ($$props && "$$inject" in $$props) { $$self.$inject_state($$props.$$inject); } return [lengths, months]; } class App extends SvelteComponentDev { constructor(options) { super(options); init(this, options, instance, create_fragment, safe_not_equal, {}); dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "App", options, id: create_fragment.name }); } } const app = new App({ target: document.body, props: { } }); return app; })(); //# sourceMappingURL=bundle.js.map