this repo has no description
at master 1901 lines 52 kB view raw
1 2(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); 3var app = (function () { 4 'use strict'; 5 6 function noop() { } 7 function add_location(element, file, line, column, char) { 8 element.__svelte_meta = { 9 loc: { file, line, column, char } 10 }; 11 } 12 function run(fn) { 13 return fn(); 14 } 15 function blank_object() { 16 return Object.create(null); 17 } 18 function run_all(fns) { 19 fns.forEach(run); 20 } 21 function is_function(thing) { 22 return typeof thing === 'function'; 23 } 24 function safe_not_equal(a, b) { 25 return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); 26 } 27 function is_empty(obj) { 28 return Object.keys(obj).length === 0; 29 } 30 function append(target, node) { 31 target.appendChild(node); 32 } 33 function insert(target, node, anchor) { 34 target.insertBefore(node, anchor || null); 35 } 36 function detach(node) { 37 node.parentNode.removeChild(node); 38 } 39 function destroy_each(iterations, detaching) { 40 for (let i = 0; i < iterations.length; i += 1) { 41 if (iterations[i]) 42 iterations[i].d(detaching); 43 } 44 } 45 function element(name) { 46 return document.createElement(name); 47 } 48 function text(data) { 49 return document.createTextNode(data); 50 } 51 function space() { 52 return text(' '); 53 } 54 function empty() { 55 return text(''); 56 } 57 function attr(node, attribute, value) { 58 if (value == null) 59 node.removeAttribute(attribute); 60 else if (node.getAttribute(attribute) !== value) 61 node.setAttribute(attribute, value); 62 } 63 function children(element) { 64 return Array.from(element.childNodes); 65 } 66 function custom_event(type, detail, bubbles = false) { 67 const e = document.createEvent('CustomEvent'); 68 e.initCustomEvent(type, bubbles, false, detail); 69 return e; 70 } 71 72 let current_component; 73 function set_current_component(component) { 74 current_component = component; 75 } 76 77 const dirty_components = []; 78 const binding_callbacks = []; 79 const render_callbacks = []; 80 const flush_callbacks = []; 81 const resolved_promise = Promise.resolve(); 82 let update_scheduled = false; 83 function schedule_update() { 84 if (!update_scheduled) { 85 update_scheduled = true; 86 resolved_promise.then(flush); 87 } 88 } 89 function add_render_callback(fn) { 90 render_callbacks.push(fn); 91 } 92 // flush() calls callbacks in this order: 93 // 1. All beforeUpdate callbacks, in order: parents before children 94 // 2. All bind:this callbacks, in reverse order: children before parents. 95 // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT 96 // for afterUpdates called during the initial onMount, which are called in 97 // reverse order: children before parents. 98 // Since callbacks might update component values, which could trigger another 99 // call to flush(), the following steps guard against this: 100 // 1. During beforeUpdate, any updated components will be added to the 101 // dirty_components array and will cause a reentrant call to flush(). Because 102 // the flush index is kept outside the function, the reentrant call will pick 103 // up where the earlier call left off and go through all dirty components. The 104 // current_component value is saved and restored so that the reentrant call will 105 // not interfere with the "parent" flush() call. 106 // 2. bind:this callbacks cannot trigger new flush() calls. 107 // 3. During afterUpdate, any updated components will NOT have their afterUpdate 108 // callback called a second time; the seen_callbacks set, outside the flush() 109 // function, guarantees this behavior. 110 const seen_callbacks = new Set(); 111 let flushidx = 0; // Do *not* move this inside the flush() function 112 function flush() { 113 const saved_component = current_component; 114 do { 115 // first, call beforeUpdate functions 116 // and update components 117 while (flushidx < dirty_components.length) { 118 const component = dirty_components[flushidx]; 119 flushidx++; 120 set_current_component(component); 121 update(component.$$); 122 } 123 set_current_component(null); 124 dirty_components.length = 0; 125 flushidx = 0; 126 while (binding_callbacks.length) 127 binding_callbacks.pop()(); 128 // then, once components are updated, call 129 // afterUpdate functions. This may cause 130 // subsequent updates... 131 for (let i = 0; i < render_callbacks.length; i += 1) { 132 const callback = render_callbacks[i]; 133 if (!seen_callbacks.has(callback)) { 134 // ...so guard against infinite loops 135 seen_callbacks.add(callback); 136 callback(); 137 } 138 } 139 render_callbacks.length = 0; 140 } while (dirty_components.length); 141 while (flush_callbacks.length) { 142 flush_callbacks.pop()(); 143 } 144 update_scheduled = false; 145 seen_callbacks.clear(); 146 set_current_component(saved_component); 147 } 148 function update($$) { 149 if ($$.fragment !== null) { 150 $$.update(); 151 run_all($$.before_update); 152 const dirty = $$.dirty; 153 $$.dirty = [-1]; 154 $$.fragment && $$.fragment.p($$.ctx, dirty); 155 $$.after_update.forEach(add_render_callback); 156 } 157 } 158 const outroing = new Set(); 159 function transition_in(block, local) { 160 if (block && block.i) { 161 outroing.delete(block); 162 block.i(local); 163 } 164 } 165 166 const globals = (typeof window !== 'undefined' 167 ? window 168 : typeof globalThis !== 'undefined' 169 ? globalThis 170 : global); 171 function mount_component(component, target, anchor, customElement) { 172 const { fragment, on_mount, on_destroy, after_update } = component.$$; 173 fragment && fragment.m(target, anchor); 174 if (!customElement) { 175 // onMount happens before the initial afterUpdate 176 add_render_callback(() => { 177 const new_on_destroy = on_mount.map(run).filter(is_function); 178 if (on_destroy) { 179 on_destroy.push(...new_on_destroy); 180 } 181 else { 182 // Edge case - component was destroyed immediately, 183 // most likely as a result of a binding initialising 184 run_all(new_on_destroy); 185 } 186 component.$$.on_mount = []; 187 }); 188 } 189 after_update.forEach(add_render_callback); 190 } 191 function destroy_component(component, detaching) { 192 const $$ = component.$$; 193 if ($$.fragment !== null) { 194 run_all($$.on_destroy); 195 $$.fragment && $$.fragment.d(detaching); 196 // TODO null out other refs, including component.$$ (but need to 197 // preserve final state?) 198 $$.on_destroy = $$.fragment = null; 199 $$.ctx = []; 200 } 201 } 202 function make_dirty(component, i) { 203 if (component.$$.dirty[0] === -1) { 204 dirty_components.push(component); 205 schedule_update(); 206 component.$$.dirty.fill(0); 207 } 208 component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31)); 209 } 210 function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) { 211 const parent_component = current_component; 212 set_current_component(component); 213 const $$ = component.$$ = { 214 fragment: null, 215 ctx: null, 216 // state 217 props, 218 update: noop, 219 not_equal, 220 bound: blank_object(), 221 // lifecycle 222 on_mount: [], 223 on_destroy: [], 224 on_disconnect: [], 225 before_update: [], 226 after_update: [], 227 context: new Map(options.context || (parent_component ? parent_component.$$.context : [])), 228 // everything else 229 callbacks: blank_object(), 230 dirty, 231 skip_bound: false, 232 root: options.target || parent_component.$$.root 233 }; 234 append_styles && append_styles($$.root); 235 let ready = false; 236 $$.ctx = instance 237 ? instance(component, options.props || {}, (i, ret, ...rest) => { 238 const value = rest.length ? rest[0] : ret; 239 if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { 240 if (!$$.skip_bound && $$.bound[i]) 241 $$.bound[i](value); 242 if (ready) 243 make_dirty(component, i); 244 } 245 return ret; 246 }) 247 : []; 248 $$.update(); 249 ready = true; 250 run_all($$.before_update); 251 // `false` as a special case of no DOM component 252 $$.fragment = create_fragment ? create_fragment($$.ctx) : false; 253 if (options.target) { 254 if (options.hydrate) { 255 const nodes = children(options.target); 256 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion 257 $$.fragment && $$.fragment.l(nodes); 258 nodes.forEach(detach); 259 } 260 else { 261 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion 262 $$.fragment && $$.fragment.c(); 263 } 264 if (options.intro) 265 transition_in(component.$$.fragment); 266 mount_component(component, options.target, options.anchor, options.customElement); 267 flush(); 268 } 269 set_current_component(parent_component); 270 } 271 /** 272 * Base class for Svelte components. Used when dev=false. 273 */ 274 class SvelteComponent { 275 $destroy() { 276 destroy_component(this, 1); 277 this.$destroy = noop; 278 } 279 $on(type, callback) { 280 const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = [])); 281 callbacks.push(callback); 282 return () => { 283 const index = callbacks.indexOf(callback); 284 if (index !== -1) 285 callbacks.splice(index, 1); 286 }; 287 } 288 $set($$props) { 289 if (this.$$set && !is_empty($$props)) { 290 this.$$.skip_bound = true; 291 this.$$set($$props); 292 this.$$.skip_bound = false; 293 } 294 } 295 } 296 297 function dispatch_dev(type, detail) { 298 document.dispatchEvent(custom_event(type, Object.assign({ version: '3.46.4' }, detail), true)); 299 } 300 function append_dev(target, node) { 301 dispatch_dev('SvelteDOMInsert', { target, node }); 302 append(target, node); 303 } 304 function insert_dev(target, node, anchor) { 305 dispatch_dev('SvelteDOMInsert', { target, node, anchor }); 306 insert(target, node, anchor); 307 } 308 function detach_dev(node) { 309 dispatch_dev('SvelteDOMRemove', { node }); 310 detach(node); 311 } 312 function attr_dev(node, attribute, value) { 313 attr(node, attribute, value); 314 if (value == null) 315 dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute }); 316 else 317 dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value }); 318 } 319 function validate_each_argument(arg) { 320 if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) { 321 let msg = '{#each} only iterates over array-like objects.'; 322 if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) { 323 msg += ' You can use a spread to convert this iterable into an array.'; 324 } 325 throw new Error(msg); 326 } 327 } 328 function validate_slots(name, slot, keys) { 329 for (const slot_key of Object.keys(slot)) { 330 if (!~keys.indexOf(slot_key)) { 331 console.warn(`<${name}> received an unexpected slot "${slot_key}".`); 332 } 333 } 334 } 335 /** 336 * Base class for Svelte components with some minor dev-enhancements. Used when dev=true. 337 */ 338 class SvelteComponentDev extends SvelteComponent { 339 constructor(options) { 340 if (!options || (!options.target && !options.$$inline)) { 341 throw new Error("'target' is a required option"); 342 } 343 super(); 344 } 345 $destroy() { 346 super.$destroy(); 347 this.$destroy = () => { 348 console.warn('Component was already destroyed'); // eslint-disable-line no-console 349 }; 350 } 351 $capture_state() { } 352 $inject_state() { } 353 } 354 355 /* src\App.svelte generated by Svelte v3.46.4 */ 356 357 const { console: console_1 } = globals; 358 const file = "src\\App.svelte"; 359 360 function get_each_context(ctx, list, i) { 361 const child_ctx = ctx.slice(); 362 child_ctx[5] = list[i]; 363 return child_ctx; 364 } 365 366 function get_each_context_1(ctx, list, i) { 367 const child_ctx = ctx.slice(); 368 child_ctx[5] = list[i]; 369 return child_ctx; 370 } 371 372 function get_each_context_2(ctx, list, i) { 373 const child_ctx = ctx.slice(); 374 child_ctx[10] = list[i]; 375 child_ctx[12] = i; 376 return child_ctx; 377 } 378 379 function get_each_context_3(ctx, list, i) { 380 const child_ctx = ctx.slice(); 381 child_ctx[13] = list[i]; 382 child_ctx[15] = i; 383 return child_ctx; 384 } 385 386 function get_each_context_4(ctx, list, i) { 387 const child_ctx = ctx.slice(); 388 child_ctx[10] = list[i]; 389 child_ctx[12] = i; 390 return child_ctx; 391 } 392 393 function get_each_context_5(ctx, list, i) { 394 const child_ctx = ctx.slice(); 395 child_ctx[12] = list[i]; 396 return child_ctx; 397 } 398 399 // (124:4) {:else} 400 function create_else_block_7(ctx) { 401 let div; 402 let t_value = /*month*/ ctx[13] + ""; 403 let t; 404 405 const block = { 406 c: function create() { 407 div = element("div"); 408 t = text(t_value); 409 add_location(div, file, 124, 5, 2338); 410 }, 411 m: function mount(target, anchor) { 412 insert_dev(target, div, anchor); 413 append_dev(div, t); 414 }, 415 p: noop, 416 d: function destroy(detaching) { 417 if (detaching) detach_dev(div); 418 } 419 }; 420 421 dispatch_dev("SvelteRegisterBlock", { 422 block, 423 id: create_else_block_7.name, 424 type: "else", 425 source: "(124:4) {:else}", 426 ctx 427 }); 428 429 return block; 430 } 431 432 // (118:4) {#if month_i == get_month()} 433 function create_if_block_10(ctx) { 434 let div1; 435 let div0; 436 let t_value = /*month*/ ctx[13] + ""; 437 let t; 438 439 const block = { 440 c: function create() { 441 div1 = element("div"); 442 div0 = element("div"); 443 t = text(t_value); 444 attr_dev(div0, "class", "selected monthtag svelte-yh5og3"); 445 add_location(div0, file, 119, 6, 2249); 446 add_location(div1, file, 118, 5, 2237); 447 }, 448 m: function mount(target, anchor) { 449 insert_dev(target, div1, anchor); 450 append_dev(div1, div0); 451 append_dev(div0, t); 452 }, 453 p: noop, 454 d: function destroy(detaching) { 455 if (detaching) detach_dev(div1); 456 } 457 }; 458 459 dispatch_dev("SvelteRegisterBlock", { 460 block, 461 id: create_if_block_10.name, 462 type: "if", 463 source: "(118:4) {#if month_i == get_month()}", 464 ctx 465 }); 466 467 return block; 468 } 469 470 // (130:5) {#each get_time(month_i) as i} 471 function create_each_block_5(ctx) { 472 let div; 473 474 const block = { 475 c: function create() { 476 div = element("div"); 477 attr_dev(div, "class", "day svelte-yh5og3"); 478 add_location(div, file, 130, 6, 2447); 479 }, 480 m: function mount(target, anchor) { 481 insert_dev(target, div, anchor); 482 }, 483 d: function destroy(detaching) { 484 if (detaching) detach_dev(div); 485 } 486 }; 487 488 dispatch_dev("SvelteRegisterBlock", { 489 block, 490 id: create_each_block_5.name, 491 type: "each", 492 source: "(130:5) {#each get_time(month_i) as i}", 493 ctx 494 }); 495 496 return block; 497 } 498 499 // (151:7) {:else} 500 function create_else_block_6(ctx) { 501 let div; 502 let t0_value = /*i*/ ctx[12] + 1 + ""; 503 let t0; 504 let t1; 505 506 const block = { 507 c: function create() { 508 div = element("div"); 509 t0 = text(t0_value); 510 t1 = space(); 511 attr_dev(div, "class", "day weekend svelte-yh5og3"); 512 add_location(div, file, 151, 8, 3027); 513 }, 514 m: function mount(target, anchor) { 515 insert_dev(target, div, anchor); 516 append_dev(div, t0); 517 append_dev(div, t1); 518 }, 519 p: noop, 520 d: function destroy(detaching) { 521 if (detaching) detach_dev(div); 522 } 523 }; 524 525 dispatch_dev("SvelteRegisterBlock", { 526 block, 527 id: create_else_block_6.name, 528 type: "else", 529 source: "(151:7) {:else}", 530 ctx 531 }); 532 533 return block; 534 } 535 536 // (147:7) {#if i == get_day() - 1 && month_i == get_month()} 537 function create_if_block_9(ctx) { 538 let div; 539 let t0_value = /*i*/ ctx[12] + 1 + ""; 540 let t0; 541 let t1; 542 543 const block = { 544 c: function create() { 545 div = element("div"); 546 t0 = text(t0_value); 547 t1 = space(); 548 attr_dev(div, "class", "day selected weekend svelte-yh5og3"); 549 add_location(div, file, 147, 8, 2937); 550 }, 551 m: function mount(target, anchor) { 552 insert_dev(target, div, anchor); 553 append_dev(div, t0); 554 append_dev(div, t1); 555 }, 556 p: noop, 557 d: function destroy(detaching) { 558 if (detaching) detach_dev(div); 559 } 560 }; 561 562 dispatch_dev("SvelteRegisterBlock", { 563 block, 564 id: create_if_block_9.name, 565 type: "if", 566 source: "(147:7) {#if i == get_day() - 1 && month_i == get_month()}", 567 ctx 568 }); 569 570 return block; 571 } 572 573 // (136:6) {#if get_week_day_long(get_year(), month_i, i) != 5 && get_week_day_long(get_year(), month_i, i) != 6} 574 function create_if_block_7(ctx) { 575 let if_block_anchor; 576 577 function select_block_type_2(ctx, dirty) { 578 if (/*i*/ ctx[12] == get_day() - 1 && /*month_i*/ ctx[15] == get_month()) return create_if_block_8; 579 return create_else_block_5; 580 } 581 582 let current_block_type = select_block_type_2(ctx); 583 let if_block = current_block_type(ctx); 584 585 const block = { 586 c: function create() { 587 if_block.c(); 588 if_block_anchor = empty(); 589 }, 590 m: function mount(target, anchor) { 591 if_block.m(target, anchor); 592 insert_dev(target, if_block_anchor, anchor); 593 }, 594 p: noop, 595 d: function destroy(detaching) { 596 if_block.d(detaching); 597 if (detaching) detach_dev(if_block_anchor); 598 } 599 }; 600 601 dispatch_dev("SvelteRegisterBlock", { 602 block, 603 id: create_if_block_7.name, 604 type: "if", 605 source: "(136:6) {#if get_week_day_long(get_year(), month_i, i) != 5 && get_week_day_long(get_year(), month_i, i) != 6}", 606 ctx 607 }); 608 609 return block; 610 } 611 612 // (141:7) {:else} 613 function create_else_block_5(ctx) { 614 let div; 615 let t0_value = /*i*/ ctx[12] + 1 + ""; 616 let t0; 617 let t1; 618 619 const block = { 620 c: function create() { 621 div = element("div"); 622 t0 = text(t0_value); 623 t1 = space(); 624 attr_dev(div, "class", "day svelte-yh5og3"); 625 add_location(div, file, 141, 8, 2794); 626 }, 627 m: function mount(target, anchor) { 628 insert_dev(target, div, anchor); 629 append_dev(div, t0); 630 append_dev(div, t1); 631 }, 632 d: function destroy(detaching) { 633 if (detaching) detach_dev(div); 634 } 635 }; 636 637 dispatch_dev("SvelteRegisterBlock", { 638 block, 639 id: create_else_block_5.name, 640 type: "else", 641 source: "(141:7) {:else}", 642 ctx 643 }); 644 645 return block; 646 } 647 648 // (137:7) {#if i == get_day() - 1 && month_i == get_month()} 649 function create_if_block_8(ctx) { 650 let div; 651 let t0_value = /*i*/ ctx[12] + 1 + ""; 652 let t0; 653 let t1; 654 655 const block = { 656 c: function create() { 657 div = element("div"); 658 t0 = text(t0_value); 659 t1 = space(); 660 attr_dev(div, "class", "day selected svelte-yh5og3"); 661 add_location(div, file, 137, 8, 2712); 662 }, 663 m: function mount(target, anchor) { 664 insert_dev(target, div, anchor); 665 append_dev(div, t0); 666 append_dev(div, t1); 667 }, 668 d: function destroy(detaching) { 669 if (detaching) detach_dev(div); 670 } 671 }; 672 673 dispatch_dev("SvelteRegisterBlock", { 674 block, 675 id: create_if_block_8.name, 676 type: "if", 677 source: "(137:7) {#if i == get_day() - 1 && month_i == get_month()}", 678 ctx 679 }); 680 681 return block; 682 } 683 684 // (135:5) {#each lengths[month] as day, i} 685 function create_each_block_4(ctx) { 686 let if_block_anchor; 687 688 function select_block_type_1(ctx, dirty) { 689 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; 690 if (/*i*/ ctx[12] == get_day() - 1 && /*month_i*/ ctx[15] == get_month()) return create_if_block_9; 691 return create_else_block_6; 692 } 693 694 let current_block_type = select_block_type_1(ctx); 695 let if_block = current_block_type(ctx); 696 697 const block = { 698 c: function create() { 699 if_block.c(); 700 if_block_anchor = empty(); 701 }, 702 m: function mount(target, anchor) { 703 if_block.m(target, anchor); 704 insert_dev(target, if_block_anchor, anchor); 705 }, 706 p: function update(ctx, dirty) { 707 if_block.p(ctx, dirty); 708 }, 709 d: function destroy(detaching) { 710 if_block.d(detaching); 711 if (detaching) detach_dev(if_block_anchor); 712 } 713 }; 714 715 dispatch_dev("SvelteRegisterBlock", { 716 block, 717 id: create_each_block_4.name, 718 type: "each", 719 source: "(135:5) {#each lengths[month] as day, i}", 720 ctx 721 }); 722 723 return block; 724 } 725 726 // (116:2) {#each months as month, month_i} 727 function create_each_block_3(ctx) { 728 let div; 729 let t0; 730 let span; 731 let t1; 732 let t2; 733 734 function select_block_type(ctx, dirty) { 735 if (/*month_i*/ ctx[15] == get_month()) return create_if_block_10; 736 return create_else_block_7; 737 } 738 739 let current_block_type = select_block_type(ctx); 740 let if_block = current_block_type(ctx); 741 let each_value_5 = get_time(/*month_i*/ ctx[15]); 742 validate_each_argument(each_value_5); 743 let each_blocks_1 = []; 744 745 for (let i = 0; i < each_value_5.length; i += 1) { 746 each_blocks_1[i] = create_each_block_5(get_each_context_5(ctx, each_value_5, i)); 747 } 748 749 let each_value_4 = /*lengths*/ ctx[0][/*month*/ ctx[13]]; 750 validate_each_argument(each_value_4); 751 let each_blocks = []; 752 753 for (let i = 0; i < each_value_4.length; i += 1) { 754 each_blocks[i] = create_each_block_4(get_each_context_4(ctx, each_value_4, i)); 755 } 756 757 const block = { 758 c: function create() { 759 div = element("div"); 760 if_block.c(); 761 t0 = space(); 762 span = element("span"); 763 764 for (let i = 0; i < each_blocks_1.length; i += 1) { 765 each_blocks_1[i].c(); 766 } 767 768 t1 = space(); 769 770 for (let i = 0; i < each_blocks.length; i += 1) { 771 each_blocks[i].c(); 772 } 773 774 t2 = space(); 775 attr_dev(span, "class", "days svelte-yh5og3"); 776 add_location(span, file, 128, 4, 2384); 777 add_location(div, file, 116, 3, 2193); 778 }, 779 m: function mount(target, anchor) { 780 insert_dev(target, div, anchor); 781 if_block.m(div, null); 782 append_dev(div, t0); 783 append_dev(div, span); 784 785 for (let i = 0; i < each_blocks_1.length; i += 1) { 786 each_blocks_1[i].m(span, null); 787 } 788 789 append_dev(span, t1); 790 791 for (let i = 0; i < each_blocks.length; i += 1) { 792 each_blocks[i].m(span, null); 793 } 794 795 append_dev(div, t2); 796 }, 797 p: function update(ctx, dirty) { 798 if_block.p(ctx, dirty); 799 800 if (dirty & /*get_day, get_month, get_week_day_long, get_year, lengths*/ 1) { 801 each_value_4 = /*lengths*/ ctx[0][/*month*/ ctx[13]]; 802 validate_each_argument(each_value_4); 803 let i; 804 805 for (i = 0; i < each_value_4.length; i += 1) { 806 const child_ctx = get_each_context_4(ctx, each_value_4, i); 807 808 if (each_blocks[i]) { 809 each_blocks[i].p(child_ctx, dirty); 810 } else { 811 each_blocks[i] = create_each_block_4(child_ctx); 812 each_blocks[i].c(); 813 each_blocks[i].m(span, null); 814 } 815 } 816 817 for (; i < each_blocks.length; i += 1) { 818 each_blocks[i].d(1); 819 } 820 821 each_blocks.length = each_value_4.length; 822 } 823 }, 824 d: function destroy(detaching) { 825 if (detaching) detach_dev(div); 826 if_block.d(); 827 destroy_each(each_blocks_1, detaching); 828 destroy_each(each_blocks, detaching); 829 } 830 }; 831 832 dispatch_dev("SvelteRegisterBlock", { 833 block, 834 id: create_each_block_3.name, 835 type: "each", 836 source: "(116:2) {#each months as month, month_i}", 837 ctx 838 }); 839 840 return block; 841 } 842 843 // (188:3) {:else} 844 function create_else_block_4(ctx) { 845 let div; 846 let t0_value = /*day*/ ctx[10] + ""; 847 let t0; 848 let t1; 849 850 const block = { 851 c: function create() { 852 div = element("div"); 853 t0 = text(t0_value); 854 t1 = space(); 855 add_location(div, file, 188, 4, 3643); 856 }, 857 m: function mount(target, anchor) { 858 insert_dev(target, div, anchor); 859 append_dev(div, t0); 860 append_dev(div, t1); 861 }, 862 p: noop, 863 d: function destroy(detaching) { 864 if (detaching) detach_dev(div); 865 } 866 }; 867 868 dispatch_dev("SvelteRegisterBlock", { 869 block, 870 id: create_else_block_4.name, 871 type: "else", 872 source: "(188:3) {:else}", 873 ctx 874 }); 875 876 return block; 877 } 878 879 // (184:3) {#if i - 1 == get_day()} 880 function create_if_block_6(ctx) { 881 let div; 882 let t0_value = /*day*/ ctx[10] + ""; 883 let t0; 884 let t1; 885 886 const block = { 887 c: function create() { 888 div = element("div"); 889 t0 = text(t0_value); 890 t1 = space(); 891 attr_dev(div, "class", "selected svelte-yh5og3"); 892 add_location(div, file, 184, 4, 3583); 893 }, 894 m: function mount(target, anchor) { 895 insert_dev(target, div, anchor); 896 append_dev(div, t0); 897 append_dev(div, t1); 898 }, 899 p: noop, 900 d: function destroy(detaching) { 901 if (detaching) detach_dev(div); 902 } 903 }; 904 905 dispatch_dev("SvelteRegisterBlock", { 906 block, 907 id: create_if_block_6.name, 908 type: "if", 909 source: "(184:3) {#if i - 1 == get_day()}", 910 ctx 911 }); 912 913 return block; 914 } 915 916 // (183:2) {#each get_weekdays() as day, i} 917 function create_each_block_2(ctx) { 918 let if_block_anchor; 919 920 function select_block_type_3(ctx, dirty) { 921 if (/*i*/ ctx[12] - 1 == get_day()) return create_if_block_6; 922 return create_else_block_4; 923 } 924 925 let current_block_type = select_block_type_3(ctx); 926 let if_block = current_block_type(ctx); 927 928 const block = { 929 c: function create() { 930 if_block.c(); 931 if_block_anchor = empty(); 932 }, 933 m: function mount(target, anchor) { 934 if_block.m(target, anchor); 935 insert_dev(target, if_block_anchor, anchor); 936 }, 937 p: function update(ctx, dirty) { 938 if_block.p(ctx, dirty); 939 }, 940 d: function destroy(detaching) { 941 if_block.d(detaching); 942 if (detaching) detach_dev(if_block_anchor); 943 } 944 }; 945 946 dispatch_dev("SvelteRegisterBlock", { 947 block, 948 id: create_each_block_2.name, 949 type: "each", 950 source: "(183:2) {#each get_weekdays() as day, i}", 951 ctx 952 }); 953 954 return block; 955 } 956 957 // (222:5) {:else} 958 function create_else_block_3(ctx) { 959 let div; 960 let t0_value = "0" + /*hour*/ ctx[5].toString() + ""; 961 let t0; 962 let t1; 963 964 const block = { 965 c: function create() { 966 div = element("div"); 967 t0 = text(t0_value); 968 t1 = space(); 969 attr_dev(div, "class", "hs selected svelte-yh5og3"); 970 add_location(div, file, 222, 6, 4165); 971 }, 972 m: function mount(target, anchor) { 973 insert_dev(target, div, anchor); 974 append_dev(div, t0); 975 append_dev(div, t1); 976 }, 977 p: noop, 978 d: function destroy(detaching) { 979 if (detaching) detach_dev(div); 980 } 981 }; 982 983 dispatch_dev("SvelteRegisterBlock", { 984 block, 985 id: create_else_block_3.name, 986 type: "else", 987 source: "(222:5) {:else}", 988 ctx 989 }); 990 991 return block; 992 } 993 994 // (218:5) {#if get_hour() != hour} 995 function create_if_block_5(ctx) { 996 let div; 997 let t0_value = "0" + /*hour*/ ctx[5].toString() + ""; 998 let t0; 999 let t1; 1000 1001 const block = { 1002 c: function create() { 1003 div = element("div"); 1004 t0 = text(t0_value); 1005 t1 = space(); 1006 attr_dev(div, "class", "hs svelte-yh5og3"); 1007 add_location(div, file, 218, 6, 4085); 1008 }, 1009 m: function mount(target, anchor) { 1010 insert_dev(target, div, anchor); 1011 append_dev(div, t0); 1012 append_dev(div, t1); 1013 }, 1014 p: noop, 1015 d: function destroy(detaching) { 1016 if (detaching) detach_dev(div); 1017 } 1018 }; 1019 1020 dispatch_dev("SvelteRegisterBlock", { 1021 block, 1022 id: create_if_block_5.name, 1023 type: "if", 1024 source: "(218:5) {#if get_hour() != hour}", 1025 ctx 1026 }); 1027 1028 return block; 1029 } 1030 1031 // (207:4) {#if hour.toString().length == 2} 1032 function create_if_block_3(ctx) { 1033 let if_block_anchor; 1034 1035 function select_block_type_5(ctx, dirty) { 1036 if (get_hour() != /*hour*/ ctx[5]) return create_if_block_4; 1037 return create_else_block_2; 1038 } 1039 1040 let current_block_type = select_block_type_5(ctx); 1041 let if_block = current_block_type(ctx); 1042 1043 const block = { 1044 c: function create() { 1045 if_block.c(); 1046 if_block_anchor = empty(); 1047 }, 1048 m: function mount(target, anchor) { 1049 if_block.m(target, anchor); 1050 insert_dev(target, if_block_anchor, anchor); 1051 }, 1052 p: function update(ctx, dirty) { 1053 if_block.p(ctx, dirty); 1054 }, 1055 d: function destroy(detaching) { 1056 if_block.d(detaching); 1057 if (detaching) detach_dev(if_block_anchor); 1058 } 1059 }; 1060 1061 dispatch_dev("SvelteRegisterBlock", { 1062 block, 1063 id: create_if_block_3.name, 1064 type: "if", 1065 source: "(207:4) {#if hour.toString().length == 2}", 1066 ctx 1067 }); 1068 1069 return block; 1070 } 1071 1072 // (212:5) {:else} 1073 function create_else_block_2(ctx) { 1074 let div; 1075 let t0_value = /*hour*/ ctx[5] + ""; 1076 let t0; 1077 let t1; 1078 1079 const block = { 1080 c: function create() { 1081 div = element("div"); 1082 t0 = text(t0_value); 1083 t1 = space(); 1084 attr_dev(div, "class", "hs selected svelte-yh5og3"); 1085 add_location(div, file, 212, 6, 3973); 1086 }, 1087 m: function mount(target, anchor) { 1088 insert_dev(target, div, anchor); 1089 append_dev(div, t0); 1090 append_dev(div, t1); 1091 }, 1092 p: noop, 1093 d: function destroy(detaching) { 1094 if (detaching) detach_dev(div); 1095 } 1096 }; 1097 1098 dispatch_dev("SvelteRegisterBlock", { 1099 block, 1100 id: create_else_block_2.name, 1101 type: "else", 1102 source: "(212:5) {:else}", 1103 ctx 1104 }); 1105 1106 return block; 1107 } 1108 1109 // (208:5) {#if get_hour() != hour} 1110 function create_if_block_4(ctx) { 1111 let div; 1112 let t0_value = /*hour*/ ctx[5] + ""; 1113 let t0; 1114 let t1; 1115 1116 const block = { 1117 c: function create() { 1118 div = element("div"); 1119 t0 = text(t0_value); 1120 t1 = space(); 1121 attr_dev(div, "class", "hs svelte-yh5og3"); 1122 add_location(div, file, 208, 6, 3910); 1123 }, 1124 m: function mount(target, anchor) { 1125 insert_dev(target, div, anchor); 1126 append_dev(div, t0); 1127 append_dev(div, t1); 1128 }, 1129 p: noop, 1130 d: function destroy(detaching) { 1131 if (detaching) detach_dev(div); 1132 } 1133 }; 1134 1135 dispatch_dev("SvelteRegisterBlock", { 1136 block, 1137 id: create_if_block_4.name, 1138 type: "if", 1139 source: "(208:5) {#if get_hour() != hour}", 1140 ctx 1141 }); 1142 1143 return block; 1144 } 1145 1146 // (206:3) {#each get_hours() as hour} 1147 function create_each_block_1(ctx) { 1148 let if_block_anchor; 1149 1150 function select_block_type_4(ctx, dirty) { 1151 if (/*hour*/ ctx[5].toString().length == 2) return create_if_block_3; 1152 if (get_hour() != /*hour*/ ctx[5]) return create_if_block_5; 1153 return create_else_block_3; 1154 } 1155 1156 let current_block_type = select_block_type_4(ctx); 1157 let if_block = current_block_type(ctx); 1158 1159 const block = { 1160 c: function create() { 1161 if_block.c(); 1162 if_block_anchor = empty(); 1163 }, 1164 m: function mount(target, anchor) { 1165 if_block.m(target, anchor); 1166 insert_dev(target, if_block_anchor, anchor); 1167 }, 1168 p: function update(ctx, dirty) { 1169 if_block.p(ctx, dirty); 1170 }, 1171 d: function destroy(detaching) { 1172 if_block.d(detaching); 1173 if (detaching) detach_dev(if_block_anchor); 1174 } 1175 }; 1176 1177 dispatch_dev("SvelteRegisterBlock", { 1178 block, 1179 id: create_each_block_1.name, 1180 type: "each", 1181 source: "(206:3) {#each get_hours() as hour}", 1182 ctx 1183 }); 1184 1185 return block; 1186 } 1187 1188 // (247:4) {:else} 1189 function create_else_block_1(ctx) { 1190 let div; 1191 let t0_value = "0" + /*hour*/ ctx[5].toString() + ""; 1192 let t0; 1193 let t1; 1194 1195 const block = { 1196 c: function create() { 1197 div = element("div"); 1198 t0 = text(t0_value); 1199 t1 = space(); 1200 attr_dev(div, "class", "hs selected svelte-yh5og3"); 1201 add_location(div, file, 247, 5, 4646); 1202 }, 1203 m: function mount(target, anchor) { 1204 insert_dev(target, div, anchor); 1205 append_dev(div, t0); 1206 append_dev(div, t1); 1207 }, 1208 p: noop, 1209 d: function destroy(detaching) { 1210 if (detaching) detach_dev(div); 1211 } 1212 }; 1213 1214 dispatch_dev("SvelteRegisterBlock", { 1215 block, 1216 id: create_else_block_1.name, 1217 type: "else", 1218 source: "(247:4) {:else}", 1219 ctx 1220 }); 1221 1222 return block; 1223 } 1224 1225 // (243:4) {#if get_minute() != hour} 1226 function create_if_block_2(ctx) { 1227 let div; 1228 let t0_value = "0" + /*hour*/ ctx[5].toString() + ""; 1229 let t0; 1230 let t1; 1231 1232 const block = { 1233 c: function create() { 1234 div = element("div"); 1235 t0 = text(t0_value); 1236 t1 = space(); 1237 attr_dev(div, "class", "hs svelte-yh5og3"); 1238 add_location(div, file, 243, 5, 4570); 1239 }, 1240 m: function mount(target, anchor) { 1241 insert_dev(target, div, anchor); 1242 append_dev(div, t0); 1243 append_dev(div, t1); 1244 }, 1245 p: noop, 1246 d: function destroy(detaching) { 1247 if (detaching) detach_dev(div); 1248 } 1249 }; 1250 1251 dispatch_dev("SvelteRegisterBlock", { 1252 block, 1253 id: create_if_block_2.name, 1254 type: "if", 1255 source: "(243:4) {#if get_minute() != hour}", 1256 ctx 1257 }); 1258 1259 return block; 1260 } 1261 1262 // (232:3) {#if hour.toString().length == 2} 1263 function create_if_block(ctx) { 1264 let if_block_anchor; 1265 1266 function select_block_type_7(ctx, dirty) { 1267 if (get_minute() != /*hour*/ ctx[5]) return create_if_block_1; 1268 return create_else_block; 1269 } 1270 1271 let current_block_type = select_block_type_7(ctx); 1272 let if_block = current_block_type(ctx); 1273 1274 const block = { 1275 c: function create() { 1276 if_block.c(); 1277 if_block_anchor = empty(); 1278 }, 1279 m: function mount(target, anchor) { 1280 if_block.m(target, anchor); 1281 insert_dev(target, if_block_anchor, anchor); 1282 }, 1283 p: function update(ctx, dirty) { 1284 if_block.p(ctx, dirty); 1285 }, 1286 d: function destroy(detaching) { 1287 if_block.d(detaching); 1288 if (detaching) detach_dev(if_block_anchor); 1289 } 1290 }; 1291 1292 dispatch_dev("SvelteRegisterBlock", { 1293 block, 1294 id: create_if_block.name, 1295 type: "if", 1296 source: "(232:3) {#if hour.toString().length == 2}", 1297 ctx 1298 }); 1299 1300 return block; 1301 } 1302 1303 // (237:4) {:else} 1304 function create_else_block(ctx) { 1305 let div; 1306 let t0_value = /*hour*/ ctx[5] + ""; 1307 let t0; 1308 let t1; 1309 1310 const block = { 1311 c: function create() { 1312 div = element("div"); 1313 t0 = text(t0_value); 1314 t1 = space(); 1315 attr_dev(div, "class", "hs selected svelte-yh5og3"); 1316 add_location(div, file, 237, 5, 4462); 1317 }, 1318 m: function mount(target, anchor) { 1319 insert_dev(target, div, anchor); 1320 append_dev(div, t0); 1321 append_dev(div, t1); 1322 }, 1323 p: noop, 1324 d: function destroy(detaching) { 1325 if (detaching) detach_dev(div); 1326 } 1327 }; 1328 1329 dispatch_dev("SvelteRegisterBlock", { 1330 block, 1331 id: create_else_block.name, 1332 type: "else", 1333 source: "(237:4) {:else}", 1334 ctx 1335 }); 1336 1337 return block; 1338 } 1339 1340 // (233:4) {#if get_minute() != hour} 1341 function create_if_block_1(ctx) { 1342 let div; 1343 let t0_value = /*hour*/ ctx[5] + ""; 1344 let t0; 1345 let t1; 1346 1347 const block = { 1348 c: function create() { 1349 div = element("div"); 1350 t0 = text(t0_value); 1351 t1 = space(); 1352 attr_dev(div, "class", "hs svelte-yh5og3"); 1353 add_location(div, file, 233, 5, 4403); 1354 }, 1355 m: function mount(target, anchor) { 1356 insert_dev(target, div, anchor); 1357 append_dev(div, t0); 1358 append_dev(div, t1); 1359 }, 1360 p: noop, 1361 d: function destroy(detaching) { 1362 if (detaching) detach_dev(div); 1363 } 1364 }; 1365 1366 dispatch_dev("SvelteRegisterBlock", { 1367 block, 1368 id: create_if_block_1.name, 1369 type: "if", 1370 source: "(233:4) {#if get_minute() != hour}", 1371 ctx 1372 }); 1373 1374 return block; 1375 } 1376 1377 // (231:3) {#each get_minutes() as hour} 1378 function create_each_block(ctx) { 1379 let if_block_anchor; 1380 1381 function select_block_type_6(ctx, dirty) { 1382 if (/*hour*/ ctx[5].toString().length == 2) return create_if_block; 1383 if (get_minute() != /*hour*/ ctx[5]) return create_if_block_2; 1384 return create_else_block_1; 1385 } 1386 1387 let current_block_type = select_block_type_6(ctx); 1388 let if_block = current_block_type(ctx); 1389 1390 const block = { 1391 c: function create() { 1392 if_block.c(); 1393 if_block_anchor = empty(); 1394 }, 1395 m: function mount(target, anchor) { 1396 if_block.m(target, anchor); 1397 insert_dev(target, if_block_anchor, anchor); 1398 }, 1399 p: function update(ctx, dirty) { 1400 if_block.p(ctx, dirty); 1401 }, 1402 d: function destroy(detaching) { 1403 if_block.d(detaching); 1404 if (detaching) detach_dev(if_block_anchor); 1405 } 1406 }; 1407 1408 dispatch_dev("SvelteRegisterBlock", { 1409 block, 1410 id: create_each_block.name, 1411 type: "each", 1412 source: "(231:3) {#each get_minutes() as hour}", 1413 ctx 1414 }); 1415 1416 return block; 1417 } 1418 1419 function create_fragment(ctx) { 1420 let main; 1421 let t0; 1422 let div0; 1423 let t1; 1424 let div1; 1425 let t2; 1426 let time; 1427 let div6; 1428 let div2; 1429 let t4; 1430 let div3; 1431 let t6; 1432 let div4; 1433 let t7; 1434 let div5; 1435 let each_value_3 = /*months*/ ctx[1]; 1436 validate_each_argument(each_value_3); 1437 let each_blocks_3 = []; 1438 1439 for (let i = 0; i < each_value_3.length; i += 1) { 1440 each_blocks_3[i] = create_each_block_3(get_each_context_3(ctx, each_value_3, i)); 1441 } 1442 1443 let each_value_2 = get_weekdays(); 1444 validate_each_argument(each_value_2); 1445 let each_blocks_2 = []; 1446 1447 for (let i = 0; i < each_value_2.length; i += 1) { 1448 each_blocks_2[i] = create_each_block_2(get_each_context_2(ctx, each_value_2, i)); 1449 } 1450 1451 let each_value_1 = get_hours(); 1452 validate_each_argument(each_value_1); 1453 let each_blocks_1 = []; 1454 1455 for (let i = 0; i < each_value_1.length; i += 1) { 1456 each_blocks_1[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i)); 1457 } 1458 1459 let each_value = get_minutes(); 1460 validate_each_argument(each_value); 1461 let each_blocks = []; 1462 1463 for (let i = 0; i < each_value.length; i += 1) { 1464 each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); 1465 } 1466 1467 const block = { 1468 c: function create() { 1469 main = element("main"); 1470 t0 = text("2022\n\t"); 1471 div0 = element("div"); 1472 1473 for (let i = 0; i < each_blocks_3.length; i += 1) { 1474 each_blocks_3[i].c(); 1475 } 1476 1477 t1 = space(); 1478 div1 = element("div"); 1479 1480 for (let i = 0; i < each_blocks_2.length; i += 1) { 1481 each_blocks_2[i].c(); 1482 } 1483 1484 t2 = space(); 1485 time = element("time"); 1486 div6 = element("div"); 1487 div2 = element("div"); 1488 div2.textContent = "Hrs"; 1489 t4 = space(); 1490 div3 = element("div"); 1491 div3.textContent = "Min"; 1492 t6 = space(); 1493 div4 = element("div"); 1494 1495 for (let i = 0; i < each_blocks_1.length; i += 1) { 1496 each_blocks_1[i].c(); 1497 } 1498 1499 t7 = space(); 1500 div5 = element("div"); 1501 1502 for (let i = 0; i < each_blocks.length; i += 1) { 1503 each_blocks[i].c(); 1504 } 1505 1506 attr_dev(div0, "class", "months svelte-yh5og3"); 1507 add_location(div0, file, 114, 1, 2134); 1508 attr_dev(div1, "class", "weeks svelte-yh5og3"); 1509 add_location(div1, file, 161, 1, 3164); 1510 attr_dev(main, "class", "svelte-yh5og3"); 1511 add_location(main, file, 112, 0, 2120); 1512 add_location(div2, file, 198, 2, 3736); 1513 add_location(div3, file, 201, 2, 3761); 1514 attr_dev(div4, "class", "hss svelte-yh5og3"); 1515 add_location(div4, file, 204, 2, 3786); 1516 attr_dev(div5, "class", "mss svelte-yh5og3"); 1517 add_location(div5, file, 229, 2, 4278); 1518 attr_dev(div6, "class", "time svelte-yh5og3"); 1519 add_location(div6, file, 197, 1, 3715); 1520 attr_dev(time, "class", "svelte-yh5og3"); 1521 add_location(time, file, 196, 0, 3707); 1522 }, 1523 l: function claim(nodes) { 1524 throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); 1525 }, 1526 m: function mount(target, anchor) { 1527 insert_dev(target, main, anchor); 1528 append_dev(main, t0); 1529 append_dev(main, div0); 1530 1531 for (let i = 0; i < each_blocks_3.length; i += 1) { 1532 each_blocks_3[i].m(div0, null); 1533 } 1534 1535 append_dev(main, t1); 1536 append_dev(main, div1); 1537 1538 for (let i = 0; i < each_blocks_2.length; i += 1) { 1539 each_blocks_2[i].m(div1, null); 1540 } 1541 1542 insert_dev(target, t2, anchor); 1543 insert_dev(target, time, anchor); 1544 append_dev(time, div6); 1545 append_dev(div6, div2); 1546 append_dev(div6, t4); 1547 append_dev(div6, div3); 1548 append_dev(div6, t6); 1549 append_dev(div6, div4); 1550 1551 for (let i = 0; i < each_blocks_1.length; i += 1) { 1552 each_blocks_1[i].m(div4, null); 1553 } 1554 1555 append_dev(div6, t7); 1556 append_dev(div6, div5); 1557 1558 for (let i = 0; i < each_blocks.length; i += 1) { 1559 each_blocks[i].m(div5, null); 1560 } 1561 }, 1562 p: function update(ctx, [dirty]) { 1563 if (dirty & /*lengths, months, get_day, get_month, get_week_day_long, get_year, get_time*/ 3) { 1564 each_value_3 = /*months*/ ctx[1]; 1565 validate_each_argument(each_value_3); 1566 let i; 1567 1568 for (i = 0; i < each_value_3.length; i += 1) { 1569 const child_ctx = get_each_context_3(ctx, each_value_3, i); 1570 1571 if (each_blocks_3[i]) { 1572 each_blocks_3[i].p(child_ctx, dirty); 1573 } else { 1574 each_blocks_3[i] = create_each_block_3(child_ctx); 1575 each_blocks_3[i].c(); 1576 each_blocks_3[i].m(div0, null); 1577 } 1578 } 1579 1580 for (; i < each_blocks_3.length; i += 1) { 1581 each_blocks_3[i].d(1); 1582 } 1583 1584 each_blocks_3.length = each_value_3.length; 1585 } 1586 1587 if (dirty & /*get_weekdays, get_day*/ 0) { 1588 each_value_2 = get_weekdays(); 1589 validate_each_argument(each_value_2); 1590 let i; 1591 1592 for (i = 0; i < each_value_2.length; i += 1) { 1593 const child_ctx = get_each_context_2(ctx, each_value_2, i); 1594 1595 if (each_blocks_2[i]) { 1596 each_blocks_2[i].p(child_ctx, dirty); 1597 } else { 1598 each_blocks_2[i] = create_each_block_2(child_ctx); 1599 each_blocks_2[i].c(); 1600 each_blocks_2[i].m(div1, null); 1601 } 1602 } 1603 1604 for (; i < each_blocks_2.length; i += 1) { 1605 each_blocks_2[i].d(1); 1606 } 1607 1608 each_blocks_2.length = each_value_2.length; 1609 } 1610 1611 if (dirty & /*get_hours, get_hour*/ 0) { 1612 each_value_1 = get_hours(); 1613 validate_each_argument(each_value_1); 1614 let i; 1615 1616 for (i = 0; i < each_value_1.length; i += 1) { 1617 const child_ctx = get_each_context_1(ctx, each_value_1, i); 1618 1619 if (each_blocks_1[i]) { 1620 each_blocks_1[i].p(child_ctx, dirty); 1621 } else { 1622 each_blocks_1[i] = create_each_block_1(child_ctx); 1623 each_blocks_1[i].c(); 1624 each_blocks_1[i].m(div4, null); 1625 } 1626 } 1627 1628 for (; i < each_blocks_1.length; i += 1) { 1629 each_blocks_1[i].d(1); 1630 } 1631 1632 each_blocks_1.length = each_value_1.length; 1633 } 1634 1635 if (dirty & /*get_minutes, get_minute*/ 0) { 1636 each_value = get_minutes(); 1637 validate_each_argument(each_value); 1638 let i; 1639 1640 for (i = 0; i < each_value.length; i += 1) { 1641 const child_ctx = get_each_context(ctx, each_value, i); 1642 1643 if (each_blocks[i]) { 1644 each_blocks[i].p(child_ctx, dirty); 1645 } else { 1646 each_blocks[i] = create_each_block(child_ctx); 1647 each_blocks[i].c(); 1648 each_blocks[i].m(div5, null); 1649 } 1650 } 1651 1652 for (; i < each_blocks.length; i += 1) { 1653 each_blocks[i].d(1); 1654 } 1655 1656 each_blocks.length = each_value.length; 1657 } 1658 }, 1659 i: noop, 1660 o: noop, 1661 d: function destroy(detaching) { 1662 if (detaching) detach_dev(main); 1663 destroy_each(each_blocks_3, detaching); 1664 destroy_each(each_blocks_2, detaching); 1665 if (detaching) detach_dev(t2); 1666 if (detaching) detach_dev(time); 1667 destroy_each(each_blocks_1, detaching); 1668 destroy_each(each_blocks, detaching); 1669 } 1670 }; 1671 1672 dispatch_dev("SvelteRegisterBlock", { 1673 block, 1674 id: create_fragment.name, 1675 type: "component", 1676 source: "", 1677 ctx 1678 }); 1679 1680 return block; 1681 } 1682 1683 function get_time(index) { 1684 var date = new Date(); 1685 let time = new Date(date.getFullYear(), index, 1).getDay(); 1686 time -= 1; 1687 1688 if (time == -1) { 1689 time = 6; 1690 } 1691 1692 let array = []; 1693 1694 for (var i = 0; i < time; i++) { 1695 array.push(i); 1696 } 1697 1698 return array; 1699 } 1700 1701 function get_day() { 1702 var date = new Date(); 1703 1704 // console.log(date.getDate()); 1705 return date.getDate(); 1706 } // return 25; 1707 1708 function get_month() { 1709 var date = new Date(); 1710 1711 // console.log(date.getDate()); 1712 return date.getMonth(); 1713 } 1714 1715 function get_year() { 1716 var date = new Date(); 1717 console.log(date.getDate()); 1718 return date.getFullYear(); 1719 } 1720 1721 function get_week_day() { 1722 var date = new Date(); 1723 1724 // console.log(date.getDate()); 1725 return date.getDay(); 1726 } 1727 1728 function get_week_day_long(year, month, day) { 1729 var date = new Date(year, month, day); 1730 1731 // console.log(date.getDate()); 1732 return date.getDay(); 1733 } 1734 1735 function get_weekdays() { 1736 var list = []; 1737 var day = 0; 1738 1739 for (var i = 0; i < 37; i++) { 1740 day += 1; 1741 1742 if (day == 8) { 1743 day = 1; 1744 } 1745 1746 switch (day) { 1747 case 1: 1748 list.push("M"); 1749 break; 1750 case 2: 1751 list.push("T"); 1752 break; 1753 case 3: 1754 list.push("O"); 1755 break; 1756 case 4: 1757 list.push("T"); 1758 break; 1759 case 5: 1760 list.push("F"); 1761 break; 1762 case 6: 1763 list.push("L"); 1764 break; 1765 case 7: 1766 list.push("S"); 1767 break; 1768 } 1769 } 1770 1771 return list; 1772 } 1773 1774 function get_hours() { 1775 let arr = []; 1776 1777 for (var i = 0; i < 24; i++) { 1778 arr.push(i); 1779 } 1780 1781 return arr; 1782 } 1783 1784 function get_hour() { 1785 let date = new Date(); 1786 return date.getHours(); 1787 } 1788 1789 function get_minutes() { 1790 let arr = []; 1791 1792 for (var i = 0; i < 60; i++) { 1793 arr.push(i); 1794 } 1795 1796 return arr; 1797 } 1798 1799 function get_minute() { 1800 let date = new Date(); 1801 return date.getMinutes(); 1802 } 1803 1804 function instance($$self, $$props, $$invalidate) { 1805 let { $$slots: slots = {}, $$scope } = $$props; 1806 validate_slots('App', slots, []); 1807 1808 let months = [ 1809 "Jan", 1810 "Feb", 1811 "Mar", 1812 "Apr", 1813 "Maj", 1814 "Jun", 1815 "Jul", 1816 "Aug", 1817 "Sep", 1818 "Okt", 1819 "Nov", 1820 "Dec" 1821 ]; 1822 1823 let months_length = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; 1824 let weeks = ["M", "T", "O", "T", "F", "L", "S"]; 1825 let lengths = {}; 1826 init(); 1827 1828 function init() { 1829 for (var i = 0; i < months.length; i++) { 1830 $$invalidate(0, lengths[months[i]] = [], lengths); 1831 1832 for (var j = 0; j < months_length[i]; j++) { 1833 lengths[months[i]].push(0); 1834 } 1835 } 1836 } 1837 1838 const writable_props = []; 1839 1840 Object.keys($$props).forEach(key => { 1841 if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1.warn(`<App> was created with unknown prop '${key}'`); 1842 }); 1843 1844 $$self.$capture_state = () => ({ 1845 months, 1846 months_length, 1847 weeks, 1848 lengths, 1849 init, 1850 get_time, 1851 get_day, 1852 get_month, 1853 get_year, 1854 get_week_day, 1855 get_week_day_long, 1856 get_weekdays, 1857 get_hours, 1858 get_hour, 1859 get_minutes, 1860 get_minute 1861 }); 1862 1863 $$self.$inject_state = $$props => { 1864 if ('months' in $$props) $$invalidate(1, months = $$props.months); 1865 if ('months_length' in $$props) months_length = $$props.months_length; 1866 if ('weeks' in $$props) weeks = $$props.weeks; 1867 if ('lengths' in $$props) $$invalidate(0, lengths = $$props.lengths); 1868 }; 1869 1870 if ($$props && "$$inject" in $$props) { 1871 $$self.$inject_state($$props.$$inject); 1872 } 1873 1874 return [lengths, months]; 1875 } 1876 1877 class App extends SvelteComponentDev { 1878 constructor(options) { 1879 super(options); 1880 init(this, options, instance, create_fragment, safe_not_equal, {}); 1881 1882 dispatch_dev("SvelteRegisterComponent", { 1883 component: this, 1884 tagName: "App", 1885 options, 1886 id: create_fragment.name 1887 }); 1888 } 1889 } 1890 1891 const app = new App({ 1892 target: document.body, 1893 props: { 1894 1895 } 1896 }); 1897 1898 return app; 1899 1900})(); 1901//# sourceMappingURL=bundle.js.map