1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, '__esModule', { value: true });
|
4 |
|
5 | function noop() { }
|
6 | const identity = x => x;
|
7 | function assign(tar, src) {
|
8 |
|
9 | for (const k in src)
|
10 | tar[k] = src[k];
|
11 | return tar;
|
12 | }
|
13 | function is_promise(value) {
|
14 | return value && typeof value === 'object' && typeof value.then === 'function';
|
15 | }
|
16 | function add_location(element, file, line, column, char) {
|
17 | element.__svelte_meta = {
|
18 | loc: { file, line, column, char }
|
19 | };
|
20 | }
|
21 | function run(fn) {
|
22 | return fn();
|
23 | }
|
24 | function blank_object() {
|
25 | return Object.create(null);
|
26 | }
|
27 | function run_all(fns) {
|
28 | fns.forEach(run);
|
29 | }
|
30 | function is_function(thing) {
|
31 | return typeof thing === 'function';
|
32 | }
|
33 | function safe_not_equal(a, b) {
|
34 | return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
|
35 | }
|
36 | function not_equal(a, b) {
|
37 | return a != a ? b == b : a !== b;
|
38 | }
|
39 | function is_empty(obj) {
|
40 | return Object.keys(obj).length === 0;
|
41 | }
|
42 | function validate_store(store, name) {
|
43 | if (store != null && typeof store.subscribe !== 'function') {
|
44 | throw new Error(`'${name}' is not a store with a 'subscribe' method`);
|
45 | }
|
46 | }
|
47 | function subscribe(store, ...callbacks) {
|
48 | if (store == null) {
|
49 | return noop;
|
50 | }
|
51 | const unsub = store.subscribe(...callbacks);
|
52 | return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
|
53 | }
|
54 | function get_store_value(store) {
|
55 | let value;
|
56 | subscribe(store, _ => value = _)();
|
57 | return value;
|
58 | }
|
59 | function component_subscribe(component, store, callback) {
|
60 | component.$$.on_destroy.push(subscribe(store, callback));
|
61 | }
|
62 | function create_slot(definition, ctx, $$scope, fn) {
|
63 | if (definition) {
|
64 | const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);
|
65 | return definition[0](slot_ctx);
|
66 | }
|
67 | }
|
68 | function get_slot_context(definition, ctx, $$scope, fn) {
|
69 | return definition[1] && fn
|
70 | ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))
|
71 | : $$scope.ctx;
|
72 | }
|
73 | function get_slot_changes(definition, $$scope, dirty, fn) {
|
74 | if (definition[2] && fn) {
|
75 | const lets = definition[2](fn(dirty));
|
76 | if ($$scope.dirty === undefined) {
|
77 | return lets;
|
78 | }
|
79 | if (typeof lets === 'object') {
|
80 | const merged = [];
|
81 | const len = Math.max($$scope.dirty.length, lets.length);
|
82 | for (let i = 0; i < len; i += 1) {
|
83 | merged[i] = $$scope.dirty[i] | lets[i];
|
84 | }
|
85 | return merged;
|
86 | }
|
87 | return $$scope.dirty | lets;
|
88 | }
|
89 | return $$scope.dirty;
|
90 | }
|
91 | function update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {
|
92 | const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);
|
93 | if (slot_changes) {
|
94 | const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);
|
95 | slot.p(slot_context, slot_changes);
|
96 | }
|
97 | }
|
98 | function exclude_internal_props(props) {
|
99 | const result = {};
|
100 | for (const k in props)
|
101 | if (k[0] !== '$')
|
102 | result[k] = props[k];
|
103 | return result;
|
104 | }
|
105 | function compute_rest_props(props, keys) {
|
106 | const rest = {};
|
107 | keys = new Set(keys);
|
108 | for (const k in props)
|
109 | if (!keys.has(k) && k[0] !== '$')
|
110 | rest[k] = props[k];
|
111 | return rest;
|
112 | }
|
113 | function compute_slots(slots) {
|
114 | const result = {};
|
115 | for (const key in slots) {
|
116 | result[key] = true;
|
117 | }
|
118 | return result;
|
119 | }
|
120 | function once(fn) {
|
121 | let ran = false;
|
122 | return function (...args) {
|
123 | if (ran)
|
124 | return;
|
125 | ran = true;
|
126 | fn.call(this, ...args);
|
127 | };
|
128 | }
|
129 | function null_to_empty(value) {
|
130 | return value == null ? '' : value;
|
131 | }
|
132 | function set_store_value(store, ret, value = ret) {
|
133 | store.set(value);
|
134 | return ret;
|
135 | }
|
136 | const has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
|
137 | function action_destroyer(action_result) {
|
138 | return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;
|
139 | }
|
140 |
|
141 | const is_client = typeof window !== 'undefined';
|
142 | exports.now = is_client
|
143 | ? () => window.performance.now()
|
144 | : () => Date.now();
|
145 | exports.raf = is_client ? cb => requestAnimationFrame(cb) : noop;
|
146 |
|
147 | function set_now(fn) {
|
148 | exports.now = fn;
|
149 | }
|
150 | function set_raf(fn) {
|
151 | exports.raf = fn;
|
152 | }
|
153 |
|
154 | const tasks = new Set();
|
155 | function run_tasks(now) {
|
156 | tasks.forEach(task => {
|
157 | if (!task.c(now)) {
|
158 | tasks.delete(task);
|
159 | task.f();
|
160 | }
|
161 | });
|
162 | if (tasks.size !== 0)
|
163 | exports.raf(run_tasks);
|
164 | }
|
165 |
|
166 |
|
167 |
|
168 | function clear_loops() {
|
169 | tasks.clear();
|
170 | }
|
171 |
|
172 |
|
173 |
|
174 |
|
175 | function loop(callback) {
|
176 | let task;
|
177 | if (tasks.size === 0)
|
178 | exports.raf(run_tasks);
|
179 | return {
|
180 | promise: new Promise(fulfill => {
|
181 | tasks.add(task = { c: callback, f: fulfill });
|
182 | }),
|
183 | abort() {
|
184 | tasks.delete(task);
|
185 | }
|
186 | };
|
187 | }
|
188 |
|
189 | function append(target, node) {
|
190 | target.appendChild(node);
|
191 | }
|
192 | function insert(target, node, anchor) {
|
193 | target.insertBefore(node, anchor || null);
|
194 | }
|
195 | function detach(node) {
|
196 | node.parentNode.removeChild(node);
|
197 | }
|
198 | function destroy_each(iterations, detaching) {
|
199 | for (let i = 0; i < iterations.length; i += 1) {
|
200 | if (iterations[i])
|
201 | iterations[i].d(detaching);
|
202 | }
|
203 | }
|
204 | function element(name) {
|
205 | return document.createElement(name);
|
206 | }
|
207 | function element_is(name, is) {
|
208 | return document.createElement(name, { is });
|
209 | }
|
210 | function object_without_properties(obj, exclude) {
|
211 | const target = {};
|
212 | for (const k in obj) {
|
213 | if (has_prop(obj, k)
|
214 |
|
215 | && exclude.indexOf(k) === -1) {
|
216 |
|
217 | target[k] = obj[k];
|
218 | }
|
219 | }
|
220 | return target;
|
221 | }
|
222 | function svg_element(name) {
|
223 | return document.createElementNS('http://www.w3.org/2000/svg', name);
|
224 | }
|
225 | function text(data) {
|
226 | return document.createTextNode(data);
|
227 | }
|
228 | function space() {
|
229 | return text(' ');
|
230 | }
|
231 | function empty() {
|
232 | return text('');
|
233 | }
|
234 | function listen(node, event, handler, options) {
|
235 | node.addEventListener(event, handler, options);
|
236 | return () => node.removeEventListener(event, handler, options);
|
237 | }
|
238 | function prevent_default(fn) {
|
239 | return function (event) {
|
240 | event.preventDefault();
|
241 |
|
242 | return fn.call(this, event);
|
243 | };
|
244 | }
|
245 | function stop_propagation(fn) {
|
246 | return function (event) {
|
247 | event.stopPropagation();
|
248 |
|
249 | return fn.call(this, event);
|
250 | };
|
251 | }
|
252 | function self(fn) {
|
253 | return function (event) {
|
254 |
|
255 | if (event.target === this)
|
256 | fn.call(this, event);
|
257 | };
|
258 | }
|
259 | function attr(node, attribute, value) {
|
260 | if (value == null)
|
261 | node.removeAttribute(attribute);
|
262 | else if (node.getAttribute(attribute) !== value)
|
263 | node.setAttribute(attribute, value);
|
264 | }
|
265 | function set_attributes(node, attributes) {
|
266 |
|
267 | const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);
|
268 | for (const key in attributes) {
|
269 | if (attributes[key] == null) {
|
270 | node.removeAttribute(key);
|
271 | }
|
272 | else if (key === 'style') {
|
273 | node.style.cssText = attributes[key];
|
274 | }
|
275 | else if (key === '__value') {
|
276 | node.value = node[key] = attributes[key];
|
277 | }
|
278 | else if (descriptors[key] && descriptors[key].set) {
|
279 | node[key] = attributes[key];
|
280 | }
|
281 | else {
|
282 | attr(node, key, attributes[key]);
|
283 | }
|
284 | }
|
285 | }
|
286 | function set_svg_attributes(node, attributes) {
|
287 | for (const key in attributes) {
|
288 | attr(node, key, attributes[key]);
|
289 | }
|
290 | }
|
291 | function set_custom_element_data(node, prop, value) {
|
292 | if (prop in node) {
|
293 | node[prop] = value;
|
294 | }
|
295 | else {
|
296 | attr(node, prop, value);
|
297 | }
|
298 | }
|
299 | function xlink_attr(node, attribute, value) {
|
300 | node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);
|
301 | }
|
302 | function get_binding_group_value(group, __value, checked) {
|
303 | const value = new Set();
|
304 | for (let i = 0; i < group.length; i += 1) {
|
305 | if (group[i].checked)
|
306 | value.add(group[i].__value);
|
307 | }
|
308 | if (!checked) {
|
309 | value.delete(__value);
|
310 | }
|
311 | return Array.from(value);
|
312 | }
|
313 | function to_number(value) {
|
314 | return value === '' ? null : +value;
|
315 | }
|
316 | function time_ranges_to_array(ranges) {
|
317 | const array = [];
|
318 | for (let i = 0; i < ranges.length; i += 1) {
|
319 | array.push({ start: ranges.start(i), end: ranges.end(i) });
|
320 | }
|
321 | return array;
|
322 | }
|
323 | function children(element) {
|
324 | return Array.from(element.childNodes);
|
325 | }
|
326 | function claim_element(nodes, name, attributes, svg) {
|
327 | for (let i = 0; i < nodes.length; i += 1) {
|
328 | const node = nodes[i];
|
329 | if (node.nodeName === name) {
|
330 | let j = 0;
|
331 | const remove = [];
|
332 | while (j < node.attributes.length) {
|
333 | const attribute = node.attributes[j++];
|
334 | if (!attributes[attribute.name]) {
|
335 | remove.push(attribute.name);
|
336 | }
|
337 | }
|
338 | for (let k = 0; k < remove.length; k++) {
|
339 | node.removeAttribute(remove[k]);
|
340 | }
|
341 | return nodes.splice(i, 1)[0];
|
342 | }
|
343 | }
|
344 | return svg ? svg_element(name) : element(name);
|
345 | }
|
346 | function claim_text(nodes, data) {
|
347 | for (let i = 0; i < nodes.length; i += 1) {
|
348 | const node = nodes[i];
|
349 | if (node.nodeType === 3) {
|
350 | node.data = '' + data;
|
351 | return nodes.splice(i, 1)[0];
|
352 | }
|
353 | }
|
354 | return text(data);
|
355 | }
|
356 | function claim_space(nodes) {
|
357 | return claim_text(nodes, ' ');
|
358 | }
|
359 | function set_data(text, data) {
|
360 | data = '' + data;
|
361 | if (text.wholeText !== data)
|
362 | text.data = data;
|
363 | }
|
364 | function set_input_value(input, value) {
|
365 | input.value = value == null ? '' : value;
|
366 | }
|
367 | function set_input_type(input, type) {
|
368 | try {
|
369 | input.type = type;
|
370 | }
|
371 | catch (e) {
|
372 |
|
373 | }
|
374 | }
|
375 | function set_style(node, key, value, important) {
|
376 | node.style.setProperty(key, value, important ? 'important' : '');
|
377 | }
|
378 | function select_option(select, value) {
|
379 | for (let i = 0; i < select.options.length; i += 1) {
|
380 | const option = select.options[i];
|
381 | if (option.__value === value) {
|
382 | option.selected = true;
|
383 | return;
|
384 | }
|
385 | }
|
386 | }
|
387 | function select_options(select, value) {
|
388 | for (let i = 0; i < select.options.length; i += 1) {
|
389 | const option = select.options[i];
|
390 | option.selected = ~value.indexOf(option.__value);
|
391 | }
|
392 | }
|
393 | function select_value(select) {
|
394 | const selected_option = select.querySelector(':checked') || select.options[0];
|
395 | return selected_option && selected_option.__value;
|
396 | }
|
397 | function select_multiple_value(select) {
|
398 | return [].map.call(select.querySelectorAll(':checked'), option => option.__value);
|
399 | }
|
400 |
|
401 |
|
402 | let crossorigin;
|
403 | function is_crossorigin() {
|
404 | if (crossorigin === undefined) {
|
405 | crossorigin = false;
|
406 | try {
|
407 | if (typeof window !== 'undefined' && window.parent) {
|
408 | void window.parent.document;
|
409 | }
|
410 | }
|
411 | catch (error) {
|
412 | crossorigin = true;
|
413 | }
|
414 | }
|
415 | return crossorigin;
|
416 | }
|
417 | function add_resize_listener(node, fn) {
|
418 | const computed_style = getComputedStyle(node);
|
419 | const z_index = (parseInt(computed_style.zIndex) || 0) - 1;
|
420 | if (computed_style.position === 'static') {
|
421 | node.style.position = 'relative';
|
422 | }
|
423 | const iframe = element('iframe');
|
424 | iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +
|
425 | `overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: ${z_index};`);
|
426 | iframe.setAttribute('aria-hidden', 'true');
|
427 | iframe.tabIndex = -1;
|
428 | const crossorigin = is_crossorigin();
|
429 | let unsubscribe;
|
430 | if (crossorigin) {
|
431 | iframe.src = "data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>";
|
432 | unsubscribe = listen(window, 'message', (event) => {
|
433 | if (event.source === iframe.contentWindow)
|
434 | fn();
|
435 | });
|
436 | }
|
437 | else {
|
438 | iframe.src = 'about:blank';
|
439 | iframe.onload = () => {
|
440 | unsubscribe = listen(iframe.contentWindow, 'resize', fn);
|
441 | };
|
442 | }
|
443 | append(node, iframe);
|
444 | return () => {
|
445 | if (crossorigin) {
|
446 | unsubscribe();
|
447 | }
|
448 | else if (unsubscribe && iframe.contentWindow) {
|
449 | unsubscribe();
|
450 | }
|
451 | detach(iframe);
|
452 | };
|
453 | }
|
454 | function toggle_class(element, name, toggle) {
|
455 | element.classList[toggle ? 'add' : 'remove'](name);
|
456 | }
|
457 | function custom_event(type, detail) {
|
458 | const e = document.createEvent('CustomEvent');
|
459 | e.initCustomEvent(type, false, false, detail);
|
460 | return e;
|
461 | }
|
462 | function query_selector_all(selector, parent = document.body) {
|
463 | return Array.from(parent.querySelectorAll(selector));
|
464 | }
|
465 | class HtmlTag {
|
466 | constructor(anchor = null) {
|
467 | this.a = anchor;
|
468 | this.e = this.n = null;
|
469 | }
|
470 | m(html, target, anchor = null) {
|
471 | if (!this.e) {
|
472 | this.e = element(target.nodeName);
|
473 | this.t = target;
|
474 | this.h(html);
|
475 | }
|
476 | this.i(anchor);
|
477 | }
|
478 | h(html) {
|
479 | this.e.innerHTML = html;
|
480 | this.n = Array.from(this.e.childNodes);
|
481 | }
|
482 | i(anchor) {
|
483 | for (let i = 0; i < this.n.length; i += 1) {
|
484 | insert(this.t, this.n[i], anchor);
|
485 | }
|
486 | }
|
487 | p(html) {
|
488 | this.d();
|
489 | this.h(html);
|
490 | this.i(this.a);
|
491 | }
|
492 | d() {
|
493 | this.n.forEach(detach);
|
494 | }
|
495 | }
|
496 | function attribute_to_object(attributes) {
|
497 | const result = {};
|
498 | for (const attribute of attributes) {
|
499 | result[attribute.name] = attribute.value;
|
500 | }
|
501 | return result;
|
502 | }
|
503 | function get_custom_elements_slots(element) {
|
504 | const result = {};
|
505 | element.childNodes.forEach((node) => {
|
506 | result[node.slot || 'default'] = true;
|
507 | });
|
508 | return result;
|
509 | }
|
510 |
|
511 | const active_docs = new Set();
|
512 | let active = 0;
|
513 |
|
514 | function hash(str) {
|
515 | let hash = 5381;
|
516 | let i = str.length;
|
517 | while (i--)
|
518 | hash = ((hash << 5) - hash) ^ str.charCodeAt(i);
|
519 | return hash >>> 0;
|
520 | }
|
521 | function create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {
|
522 | const step = 16.666 / duration;
|
523 | let keyframes = '{\n';
|
524 | for (let p = 0; p <= 1; p += step) {
|
525 | const t = a + (b - a) * ease(p);
|
526 | keyframes += p * 100 + `%{${fn(t, 1 - t)}}\n`;
|
527 | }
|
528 | const rule = keyframes + `100% {${fn(b, 1 - b)}}\n}`;
|
529 | const name = `__svelte_${hash(rule)}_${uid}`;
|
530 | const doc = node.ownerDocument;
|
531 | active_docs.add(doc);
|
532 | const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);
|
533 | const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});
|
534 | if (!current_rules[name]) {
|
535 | current_rules[name] = true;
|
536 | stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);
|
537 | }
|
538 | const animation = node.style.animation || '';
|
539 | node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;
|
540 | active += 1;
|
541 | return name;
|
542 | }
|
543 | function delete_rule(node, name) {
|
544 | const previous = (node.style.animation || '').split(', ');
|
545 | const next = previous.filter(name
|
546 | ? anim => anim.indexOf(name) < 0
|
547 | : anim => anim.indexOf('__svelte') === -1
|
548 | );
|
549 | const deleted = previous.length - next.length;
|
550 | if (deleted) {
|
551 | node.style.animation = next.join(', ');
|
552 | active -= deleted;
|
553 | if (!active)
|
554 | clear_rules();
|
555 | }
|
556 | }
|
557 | function clear_rules() {
|
558 | exports.raf(() => {
|
559 | if (active)
|
560 | return;
|
561 | active_docs.forEach(doc => {
|
562 | const stylesheet = doc.__svelte_stylesheet;
|
563 | let i = stylesheet.cssRules.length;
|
564 | while (i--)
|
565 | stylesheet.deleteRule(i);
|
566 | doc.__svelte_rules = {};
|
567 | });
|
568 | active_docs.clear();
|
569 | });
|
570 | }
|
571 |
|
572 | function create_animation(node, from, fn, params) {
|
573 | if (!from)
|
574 | return noop;
|
575 | const to = node.getBoundingClientRect();
|
576 | if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)
|
577 | return noop;
|
578 | const { delay = 0, duration = 300, easing = identity,
|
579 |
|
580 | start: start_time = exports.now() + delay,
|
581 |
|
582 | end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);
|
583 | let running = true;
|
584 | let started = false;
|
585 | let name;
|
586 | function start() {
|
587 | if (css) {
|
588 | name = create_rule(node, 0, 1, duration, delay, easing, css);
|
589 | }
|
590 | if (!delay) {
|
591 | started = true;
|
592 | }
|
593 | }
|
594 | function stop() {
|
595 | if (css)
|
596 | delete_rule(node, name);
|
597 | running = false;
|
598 | }
|
599 | loop(now => {
|
600 | if (!started && now >= start_time) {
|
601 | started = true;
|
602 | }
|
603 | if (started && now >= end) {
|
604 | tick(1, 0);
|
605 | stop();
|
606 | }
|
607 | if (!running) {
|
608 | return false;
|
609 | }
|
610 | if (started) {
|
611 | const p = now - start_time;
|
612 | const t = 0 + 1 * easing(p / duration);
|
613 | tick(t, 1 - t);
|
614 | }
|
615 | return true;
|
616 | });
|
617 | start();
|
618 | tick(0, 1);
|
619 | return stop;
|
620 | }
|
621 | function fix_position(node) {
|
622 | const style = getComputedStyle(node);
|
623 | if (style.position !== 'absolute' && style.position !== 'fixed') {
|
624 | const { width, height } = style;
|
625 | const a = node.getBoundingClientRect();
|
626 | node.style.position = 'absolute';
|
627 | node.style.width = width;
|
628 | node.style.height = height;
|
629 | add_transform(node, a);
|
630 | }
|
631 | }
|
632 | function add_transform(node, a) {
|
633 | const b = node.getBoundingClientRect();
|
634 | if (a.left !== b.left || a.top !== b.top) {
|
635 | const style = getComputedStyle(node);
|
636 | const transform = style.transform === 'none' ? '' : style.transform;
|
637 | node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;
|
638 | }
|
639 | }
|
640 |
|
641 | function set_current_component(component) {
|
642 | exports.current_component = component;
|
643 | }
|
644 | function get_current_component() {
|
645 | if (!exports.current_component)
|
646 | throw new Error('Function called outside component initialization');
|
647 | return exports.current_component;
|
648 | }
|
649 | function beforeUpdate(fn) {
|
650 | get_current_component().$$.before_update.push(fn);
|
651 | }
|
652 | function onMount(fn) {
|
653 | get_current_component().$$.on_mount.push(fn);
|
654 | }
|
655 | function afterUpdate(fn) {
|
656 | get_current_component().$$.after_update.push(fn);
|
657 | }
|
658 | function onDestroy(fn) {
|
659 | get_current_component().$$.on_destroy.push(fn);
|
660 | }
|
661 | function createEventDispatcher() {
|
662 | const component = get_current_component();
|
663 | return (type, detail) => {
|
664 | const callbacks = component.$$.callbacks[type];
|
665 | if (callbacks) {
|
666 |
|
667 |
|
668 | const event = custom_event(type, detail);
|
669 | callbacks.slice().forEach(fn => {
|
670 | fn.call(component, event);
|
671 | });
|
672 | }
|
673 | };
|
674 | }
|
675 | function setContext(key, context) {
|
676 | get_current_component().$$.context.set(key, context);
|
677 | }
|
678 | function getContext(key) {
|
679 | return get_current_component().$$.context.get(key);
|
680 | }
|
681 |
|
682 |
|
683 |
|
684 | function bubble(component, event) {
|
685 | const callbacks = component.$$.callbacks[event.type];
|
686 | if (callbacks) {
|
687 | callbacks.slice().forEach(fn => fn(event));
|
688 | }
|
689 | }
|
690 |
|
691 | const dirty_components = [];
|
692 | const intros = { enabled: false };
|
693 | const binding_callbacks = [];
|
694 | const render_callbacks = [];
|
695 | const flush_callbacks = [];
|
696 | const resolved_promise = Promise.resolve();
|
697 | let update_scheduled = false;
|
698 | function schedule_update() {
|
699 | if (!update_scheduled) {
|
700 | update_scheduled = true;
|
701 | resolved_promise.then(flush);
|
702 | }
|
703 | }
|
704 | function tick() {
|
705 | schedule_update();
|
706 | return resolved_promise;
|
707 | }
|
708 | function add_render_callback(fn) {
|
709 | render_callbacks.push(fn);
|
710 | }
|
711 | function add_flush_callback(fn) {
|
712 | flush_callbacks.push(fn);
|
713 | }
|
714 | let flushing = false;
|
715 | const seen_callbacks = new Set();
|
716 | function flush() {
|
717 | if (flushing)
|
718 | return;
|
719 | flushing = true;
|
720 | do {
|
721 |
|
722 |
|
723 | for (let i = 0; i < dirty_components.length; i += 1) {
|
724 | const component = dirty_components[i];
|
725 | set_current_component(component);
|
726 | update(component.$$);
|
727 | }
|
728 | set_current_component(null);
|
729 | dirty_components.length = 0;
|
730 | while (binding_callbacks.length)
|
731 | binding_callbacks.pop()();
|
732 |
|
733 |
|
734 |
|
735 | for (let i = 0; i < render_callbacks.length; i += 1) {
|
736 | const callback = render_callbacks[i];
|
737 | if (!seen_callbacks.has(callback)) {
|
738 |
|
739 | seen_callbacks.add(callback);
|
740 | callback();
|
741 | }
|
742 | }
|
743 | render_callbacks.length = 0;
|
744 | } while (dirty_components.length);
|
745 | while (flush_callbacks.length) {
|
746 | flush_callbacks.pop()();
|
747 | }
|
748 | update_scheduled = false;
|
749 | flushing = false;
|
750 | seen_callbacks.clear();
|
751 | }
|
752 | function update($$) {
|
753 | if ($$.fragment !== null) {
|
754 | $$.update();
|
755 | run_all($$.before_update);
|
756 | const dirty = $$.dirty;
|
757 | $$.dirty = [-1];
|
758 | $$.fragment && $$.fragment.p($$.ctx, dirty);
|
759 | $$.after_update.forEach(add_render_callback);
|
760 | }
|
761 | }
|
762 |
|
763 | let promise;
|
764 | function wait() {
|
765 | if (!promise) {
|
766 | promise = Promise.resolve();
|
767 | promise.then(() => {
|
768 | promise = null;
|
769 | });
|
770 | }
|
771 | return promise;
|
772 | }
|
773 | function dispatch(node, direction, kind) {
|
774 | node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));
|
775 | }
|
776 | const outroing = new Set();
|
777 | let outros;
|
778 | function group_outros() {
|
779 | outros = {
|
780 | r: 0,
|
781 | c: [],
|
782 | p: outros
|
783 | };
|
784 | }
|
785 | function check_outros() {
|
786 | if (!outros.r) {
|
787 | run_all(outros.c);
|
788 | }
|
789 | outros = outros.p;
|
790 | }
|
791 | function transition_in(block, local) {
|
792 | if (block && block.i) {
|
793 | outroing.delete(block);
|
794 | block.i(local);
|
795 | }
|
796 | }
|
797 | function transition_out(block, local, detach, callback) {
|
798 | if (block && block.o) {
|
799 | if (outroing.has(block))
|
800 | return;
|
801 | outroing.add(block);
|
802 | outros.c.push(() => {
|
803 | outroing.delete(block);
|
804 | if (callback) {
|
805 | if (detach)
|
806 | block.d(1);
|
807 | callback();
|
808 | }
|
809 | });
|
810 | block.o(local);
|
811 | }
|
812 | }
|
813 | const null_transition = { duration: 0 };
|
814 | function create_in_transition(node, fn, params) {
|
815 | let config = fn(node, params);
|
816 | let running = false;
|
817 | let animation_name;
|
818 | let task;
|
819 | let uid = 0;
|
820 | function cleanup() {
|
821 | if (animation_name)
|
822 | delete_rule(node, animation_name);
|
823 | }
|
824 | function go() {
|
825 | const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;
|
826 | if (css)
|
827 | animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);
|
828 | tick(0, 1);
|
829 | const start_time = exports.now() + delay;
|
830 | const end_time = start_time + duration;
|
831 | if (task)
|
832 | task.abort();
|
833 | running = true;
|
834 | add_render_callback(() => dispatch(node, true, 'start'));
|
835 | task = loop(now => {
|
836 | if (running) {
|
837 | if (now >= end_time) {
|
838 | tick(1, 0);
|
839 | dispatch(node, true, 'end');
|
840 | cleanup();
|
841 | return running = false;
|
842 | }
|
843 | if (now >= start_time) {
|
844 | const t = easing((now - start_time) / duration);
|
845 | tick(t, 1 - t);
|
846 | }
|
847 | }
|
848 | return running;
|
849 | });
|
850 | }
|
851 | let started = false;
|
852 | return {
|
853 | start() {
|
854 | if (started)
|
855 | return;
|
856 | delete_rule(node);
|
857 | if (is_function(config)) {
|
858 | config = config();
|
859 | wait().then(go);
|
860 | }
|
861 | else {
|
862 | go();
|
863 | }
|
864 | },
|
865 | invalidate() {
|
866 | started = false;
|
867 | },
|
868 | end() {
|
869 | if (running) {
|
870 | cleanup();
|
871 | running = false;
|
872 | }
|
873 | }
|
874 | };
|
875 | }
|
876 | function create_out_transition(node, fn, params) {
|
877 | let config = fn(node, params);
|
878 | let running = true;
|
879 | let animation_name;
|
880 | const group = outros;
|
881 | group.r += 1;
|
882 | function go() {
|
883 | const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;
|
884 | if (css)
|
885 | animation_name = create_rule(node, 1, 0, duration, delay, easing, css);
|
886 | const start_time = exports.now() + delay;
|
887 | const end_time = start_time + duration;
|
888 | add_render_callback(() => dispatch(node, false, 'start'));
|
889 | loop(now => {
|
890 | if (running) {
|
891 | if (now >= end_time) {
|
892 | tick(0, 1);
|
893 | dispatch(node, false, 'end');
|
894 | if (!--group.r) {
|
895 |
|
896 |
|
897 | run_all(group.c);
|
898 | }
|
899 | return false;
|
900 | }
|
901 | if (now >= start_time) {
|
902 | const t = easing((now - start_time) / duration);
|
903 | tick(1 - t, t);
|
904 | }
|
905 | }
|
906 | return running;
|
907 | });
|
908 | }
|
909 | if (is_function(config)) {
|
910 | wait().then(() => {
|
911 |
|
912 | config = config();
|
913 | go();
|
914 | });
|
915 | }
|
916 | else {
|
917 | go();
|
918 | }
|
919 | return {
|
920 | end(reset) {
|
921 | if (reset && config.tick) {
|
922 | config.tick(1, 0);
|
923 | }
|
924 | if (running) {
|
925 | if (animation_name)
|
926 | delete_rule(node, animation_name);
|
927 | running = false;
|
928 | }
|
929 | }
|
930 | };
|
931 | }
|
932 | function create_bidirectional_transition(node, fn, params, intro) {
|
933 | let config = fn(node, params);
|
934 | let t = intro ? 0 : 1;
|
935 | let running_program = null;
|
936 | let pending_program = null;
|
937 | let animation_name = null;
|
938 | function clear_animation() {
|
939 | if (animation_name)
|
940 | delete_rule(node, animation_name);
|
941 | }
|
942 | function init(program, duration) {
|
943 | const d = program.b - t;
|
944 | duration *= Math.abs(d);
|
945 | return {
|
946 | a: t,
|
947 | b: program.b,
|
948 | d,
|
949 | duration,
|
950 | start: program.start,
|
951 | end: program.start + duration,
|
952 | group: program.group
|
953 | };
|
954 | }
|
955 | function go(b) {
|
956 | const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;
|
957 | const program = {
|
958 | start: exports.now() + delay,
|
959 | b
|
960 | };
|
961 | if (!b) {
|
962 |
|
963 | program.group = outros;
|
964 | outros.r += 1;
|
965 | }
|
966 | if (running_program || pending_program) {
|
967 | pending_program = program;
|
968 | }
|
969 | else {
|
970 |
|
971 |
|
972 | if (css) {
|
973 | clear_animation();
|
974 | animation_name = create_rule(node, t, b, duration, delay, easing, css);
|
975 | }
|
976 | if (b)
|
977 | tick(0, 1);
|
978 | running_program = init(program, duration);
|
979 | add_render_callback(() => dispatch(node, b, 'start'));
|
980 | loop(now => {
|
981 | if (pending_program && now > pending_program.start) {
|
982 | running_program = init(pending_program, duration);
|
983 | pending_program = null;
|
984 | dispatch(node, running_program.b, 'start');
|
985 | if (css) {
|
986 | clear_animation();
|
987 | animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);
|
988 | }
|
989 | }
|
990 | if (running_program) {
|
991 | if (now >= running_program.end) {
|
992 | tick(t = running_program.b, 1 - t);
|
993 | dispatch(node, running_program.b, 'end');
|
994 | if (!pending_program) {
|
995 |
|
996 | if (running_program.b) {
|
997 |
|
998 | clear_animation();
|
999 | }
|
1000 | else {
|
1001 |
|
1002 | if (!--running_program.group.r)
|
1003 | run_all(running_program.group.c);
|
1004 | }
|
1005 | }
|
1006 | running_program = null;
|
1007 | }
|
1008 | else if (now >= running_program.start) {
|
1009 | const p = now - running_program.start;
|
1010 | t = running_program.a + running_program.d * easing(p / running_program.duration);
|
1011 | tick(t, 1 - t);
|
1012 | }
|
1013 | }
|
1014 | return !!(running_program || pending_program);
|
1015 | });
|
1016 | }
|
1017 | }
|
1018 | return {
|
1019 | run(b) {
|
1020 | if (is_function(config)) {
|
1021 | wait().then(() => {
|
1022 |
|
1023 | config = config();
|
1024 | go(b);
|
1025 | });
|
1026 | }
|
1027 | else {
|
1028 | go(b);
|
1029 | }
|
1030 | },
|
1031 | end() {
|
1032 | clear_animation();
|
1033 | running_program = pending_program = null;
|
1034 | }
|
1035 | };
|
1036 | }
|
1037 |
|
1038 | function handle_promise(promise, info) {
|
1039 | const token = info.token = {};
|
1040 | function update(type, index, key, value) {
|
1041 | if (info.token !== token)
|
1042 | return;
|
1043 | info.resolved = value;
|
1044 | let child_ctx = info.ctx;
|
1045 | if (key !== undefined) {
|
1046 | child_ctx = child_ctx.slice();
|
1047 | child_ctx[key] = value;
|
1048 | }
|
1049 | const block = type && (info.current = type)(child_ctx);
|
1050 | let needs_flush = false;
|
1051 | if (info.block) {
|
1052 | if (info.blocks) {
|
1053 | info.blocks.forEach((block, i) => {
|
1054 | if (i !== index && block) {
|
1055 | group_outros();
|
1056 | transition_out(block, 1, 1, () => {
|
1057 | info.blocks[i] = null;
|
1058 | });
|
1059 | check_outros();
|
1060 | }
|
1061 | });
|
1062 | }
|
1063 | else {
|
1064 | info.block.d(1);
|
1065 | }
|
1066 | block.c();
|
1067 | transition_in(block, 1);
|
1068 | block.m(info.mount(), info.anchor);
|
1069 | needs_flush = true;
|
1070 | }
|
1071 | info.block = block;
|
1072 | if (info.blocks)
|
1073 | info.blocks[index] = block;
|
1074 | if (needs_flush) {
|
1075 | flush();
|
1076 | }
|
1077 | }
|
1078 | if (is_promise(promise)) {
|
1079 | const current_component = get_current_component();
|
1080 | promise.then(value => {
|
1081 | set_current_component(current_component);
|
1082 | update(info.then, 1, info.value, value);
|
1083 | set_current_component(null);
|
1084 | }, error => {
|
1085 | set_current_component(current_component);
|
1086 | update(info.catch, 2, info.error, error);
|
1087 | set_current_component(null);
|
1088 | if (!info.hasCatch) {
|
1089 | throw error;
|
1090 | }
|
1091 | });
|
1092 |
|
1093 | if (info.current !== info.pending) {
|
1094 | update(info.pending, 0);
|
1095 | return true;
|
1096 | }
|
1097 | }
|
1098 | else {
|
1099 | if (info.current !== info.then) {
|
1100 | update(info.then, 1, info.value, promise);
|
1101 | return true;
|
1102 | }
|
1103 | info.resolved = promise;
|
1104 | }
|
1105 | }
|
1106 |
|
1107 | const globals = (typeof window !== 'undefined'
|
1108 | ? window
|
1109 | : typeof globalThis !== 'undefined'
|
1110 | ? globalThis
|
1111 | : global);
|
1112 |
|
1113 | function destroy_block(block, lookup) {
|
1114 | block.d(1);
|
1115 | lookup.delete(block.key);
|
1116 | }
|
1117 | function outro_and_destroy_block(block, lookup) {
|
1118 | transition_out(block, 1, 1, () => {
|
1119 | lookup.delete(block.key);
|
1120 | });
|
1121 | }
|
1122 | function fix_and_destroy_block(block, lookup) {
|
1123 | block.f();
|
1124 | destroy_block(block, lookup);
|
1125 | }
|
1126 | function fix_and_outro_and_destroy_block(block, lookup) {
|
1127 | block.f();
|
1128 | outro_and_destroy_block(block, lookup);
|
1129 | }
|
1130 | function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {
|
1131 | let o = old_blocks.length;
|
1132 | let n = list.length;
|
1133 | let i = o;
|
1134 | const old_indexes = {};
|
1135 | while (i--)
|
1136 | old_indexes[old_blocks[i].key] = i;
|
1137 | const new_blocks = [];
|
1138 | const new_lookup = new Map();
|
1139 | const deltas = new Map();
|
1140 | i = n;
|
1141 | while (i--) {
|
1142 | const child_ctx = get_context(ctx, list, i);
|
1143 | const key = get_key(child_ctx);
|
1144 | let block = lookup.get(key);
|
1145 | if (!block) {
|
1146 | block = create_each_block(key, child_ctx);
|
1147 | block.c();
|
1148 | }
|
1149 | else if (dynamic) {
|
1150 | block.p(child_ctx, dirty);
|
1151 | }
|
1152 | new_lookup.set(key, new_blocks[i] = block);
|
1153 | if (key in old_indexes)
|
1154 | deltas.set(key, Math.abs(i - old_indexes[key]));
|
1155 | }
|
1156 | const will_move = new Set();
|
1157 | const did_move = new Set();
|
1158 | function insert(block) {
|
1159 | transition_in(block, 1);
|
1160 | block.m(node, next);
|
1161 | lookup.set(block.key, block);
|
1162 | next = block.first;
|
1163 | n--;
|
1164 | }
|
1165 | while (o && n) {
|
1166 | const new_block = new_blocks[n - 1];
|
1167 | const old_block = old_blocks[o - 1];
|
1168 | const new_key = new_block.key;
|
1169 | const old_key = old_block.key;
|
1170 | if (new_block === old_block) {
|
1171 |
|
1172 | next = new_block.first;
|
1173 | o--;
|
1174 | n--;
|
1175 | }
|
1176 | else if (!new_lookup.has(old_key)) {
|
1177 |
|
1178 | destroy(old_block, lookup);
|
1179 | o--;
|
1180 | }
|
1181 | else if (!lookup.has(new_key) || will_move.has(new_key)) {
|
1182 | insert(new_block);
|
1183 | }
|
1184 | else if (did_move.has(old_key)) {
|
1185 | o--;
|
1186 | }
|
1187 | else if (deltas.get(new_key) > deltas.get(old_key)) {
|
1188 | did_move.add(new_key);
|
1189 | insert(new_block);
|
1190 | }
|
1191 | else {
|
1192 | will_move.add(old_key);
|
1193 | o--;
|
1194 | }
|
1195 | }
|
1196 | while (o--) {
|
1197 | const old_block = old_blocks[o];
|
1198 | if (!new_lookup.has(old_block.key))
|
1199 | destroy(old_block, lookup);
|
1200 | }
|
1201 | while (n)
|
1202 | insert(new_blocks[n - 1]);
|
1203 | return new_blocks;
|
1204 | }
|
1205 | function validate_each_keys(ctx, list, get_context, get_key) {
|
1206 | const keys = new Set();
|
1207 | for (let i = 0; i < list.length; i++) {
|
1208 | const key = get_key(get_context(ctx, list, i));
|
1209 | if (keys.has(key)) {
|
1210 | throw new Error('Cannot have duplicate keys in a keyed each');
|
1211 | }
|
1212 | keys.add(key);
|
1213 | }
|
1214 | }
|
1215 |
|
1216 | function get_spread_update(levels, updates) {
|
1217 | const update = {};
|
1218 | const to_null_out = {};
|
1219 | const accounted_for = { $$scope: 1 };
|
1220 | let i = levels.length;
|
1221 | while (i--) {
|
1222 | const o = levels[i];
|
1223 | const n = updates[i];
|
1224 | if (n) {
|
1225 | for (const key in o) {
|
1226 | if (!(key in n))
|
1227 | to_null_out[key] = 1;
|
1228 | }
|
1229 | for (const key in n) {
|
1230 | if (!accounted_for[key]) {
|
1231 | update[key] = n[key];
|
1232 | accounted_for[key] = 1;
|
1233 | }
|
1234 | }
|
1235 | levels[i] = n;
|
1236 | }
|
1237 | else {
|
1238 | for (const key in o) {
|
1239 | accounted_for[key] = 1;
|
1240 | }
|
1241 | }
|
1242 | }
|
1243 | for (const key in to_null_out) {
|
1244 | if (!(key in update))
|
1245 | update[key] = undefined;
|
1246 | }
|
1247 | return update;
|
1248 | }
|
1249 | function get_spread_object(spread_props) {
|
1250 | return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};
|
1251 | }
|
1252 |
|
1253 |
|
1254 | const boolean_attributes = new Set([
|
1255 | 'allowfullscreen',
|
1256 | 'allowpaymentrequest',
|
1257 | 'async',
|
1258 | 'autofocus',
|
1259 | 'autoplay',
|
1260 | 'checked',
|
1261 | 'controls',
|
1262 | 'default',
|
1263 | 'defer',
|
1264 | 'disabled',
|
1265 | 'formnovalidate',
|
1266 | 'hidden',
|
1267 | 'ismap',
|
1268 | 'loop',
|
1269 | 'multiple',
|
1270 | 'muted',
|
1271 | 'nomodule',
|
1272 | 'novalidate',
|
1273 | 'open',
|
1274 | 'playsinline',
|
1275 | 'readonly',
|
1276 | 'required',
|
1277 | 'reversed',
|
1278 | 'selected'
|
1279 | ]);
|
1280 |
|
1281 | const invalid_attribute_name_character = /[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u;
|
1282 |
|
1283 |
|
1284 | function spread(args, classes_to_add) {
|
1285 | const attributes = Object.assign({}, ...args);
|
1286 | if (classes_to_add) {
|
1287 | if (attributes.class == null) {
|
1288 | attributes.class = classes_to_add;
|
1289 | }
|
1290 | else {
|
1291 | attributes.class += ' ' + classes_to_add;
|
1292 | }
|
1293 | }
|
1294 | let str = '';
|
1295 | Object.keys(attributes).forEach(name => {
|
1296 | if (invalid_attribute_name_character.test(name))
|
1297 | return;
|
1298 | const value = attributes[name];
|
1299 | if (value === true)
|
1300 | str += ' ' + name;
|
1301 | else if (boolean_attributes.has(name.toLowerCase())) {
|
1302 | if (value)
|
1303 | str += ' ' + name;
|
1304 | }
|
1305 | else if (value != null) {
|
1306 | str += ` ${name}="${String(value).replace(/"/g, '"').replace(/'/g, ''')}"`;
|
1307 | }
|
1308 | });
|
1309 | return str;
|
1310 | }
|
1311 | const escaped = {
|
1312 | '"': '"',
|
1313 | "'": ''',
|
1314 | '&': '&',
|
1315 | '<': '<',
|
1316 | '>': '>'
|
1317 | };
|
1318 | function escape(html) {
|
1319 | return String(html).replace(/["'&<>]/g, match => escaped[match]);
|
1320 | }
|
1321 | function each(items, fn) {
|
1322 | let str = '';
|
1323 | for (let i = 0; i < items.length; i += 1) {
|
1324 | str += fn(items[i], i);
|
1325 | }
|
1326 | return str;
|
1327 | }
|
1328 | const missing_component = {
|
1329 | $$render: () => ''
|
1330 | };
|
1331 | function validate_component(component, name) {
|
1332 | if (!component || !component.$$render) {
|
1333 | if (name === 'svelte:component')
|
1334 | name += ' this={...}';
|
1335 | throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);
|
1336 | }
|
1337 | return component;
|
1338 | }
|
1339 | function debug(file, line, column, values) {
|
1340 | console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`);
|
1341 | console.log(values);
|
1342 | return '';
|
1343 | }
|
1344 | let on_destroy;
|
1345 | function create_ssr_component(fn) {
|
1346 | function $$render(result, props, bindings, slots) {
|
1347 | const parent_component = exports.current_component;
|
1348 | const $$ = {
|
1349 | on_destroy,
|
1350 | context: new Map(parent_component ? parent_component.$$.context : []),
|
1351 |
|
1352 | on_mount: [],
|
1353 | before_update: [],
|
1354 | after_update: [],
|
1355 | callbacks: blank_object()
|
1356 | };
|
1357 | set_current_component({ $$ });
|
1358 | const html = fn(result, props, bindings, slots);
|
1359 | set_current_component(parent_component);
|
1360 | return html;
|
1361 | }
|
1362 | return {
|
1363 | render: (props = {}, options = {}) => {
|
1364 | on_destroy = [];
|
1365 | const result = { title: '', head: '', css: new Set() };
|
1366 | const html = $$render(result, props, {}, options);
|
1367 | run_all(on_destroy);
|
1368 | return {
|
1369 | html,
|
1370 | css: {
|
1371 | code: Array.from(result.css).map(css => css.code).join('\n'),
|
1372 | map: null
|
1373 | },
|
1374 | head: result.title + result.head
|
1375 | };
|
1376 | },
|
1377 | $$render
|
1378 | };
|
1379 | }
|
1380 | function add_attribute(name, value, boolean) {
|
1381 | if (value == null || (boolean && !value))
|
1382 | return '';
|
1383 | return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `"${value}"`}`}`;
|
1384 | }
|
1385 | function add_classes(classes) {
|
1386 | return classes ? ` class="${classes}"` : '';
|
1387 | }
|
1388 |
|
1389 | function bind(component, name, callback) {
|
1390 | const index = component.$$.props[name];
|
1391 | if (index !== undefined) {
|
1392 | component.$$.bound[index] = callback;
|
1393 | callback(component.$$.ctx[index]);
|
1394 | }
|
1395 | }
|
1396 | function create_component(block) {
|
1397 | block && block.c();
|
1398 | }
|
1399 | function claim_component(block, parent_nodes) {
|
1400 | block && block.l(parent_nodes);
|
1401 | }
|
1402 | function mount_component(component, target, anchor) {
|
1403 | const { fragment, on_mount, on_destroy, after_update } = component.$$;
|
1404 | fragment && fragment.m(target, anchor);
|
1405 |
|
1406 | add_render_callback(() => {
|
1407 | const new_on_destroy = on_mount.map(run).filter(is_function);
|
1408 | if (on_destroy) {
|
1409 | on_destroy.push(...new_on_destroy);
|
1410 | }
|
1411 | else {
|
1412 |
|
1413 |
|
1414 | run_all(new_on_destroy);
|
1415 | }
|
1416 | component.$$.on_mount = [];
|
1417 | });
|
1418 | after_update.forEach(add_render_callback);
|
1419 | }
|
1420 | function destroy_component(component, detaching) {
|
1421 | const $$ = component.$$;
|
1422 | if ($$.fragment !== null) {
|
1423 | run_all($$.on_destroy);
|
1424 | $$.fragment && $$.fragment.d(detaching);
|
1425 |
|
1426 |
|
1427 | $$.on_destroy = $$.fragment = null;
|
1428 | $$.ctx = [];
|
1429 | }
|
1430 | }
|
1431 | function make_dirty(component, i) {
|
1432 | if (component.$$.dirty[0] === -1) {
|
1433 | dirty_components.push(component);
|
1434 | schedule_update();
|
1435 | component.$$.dirty.fill(0);
|
1436 | }
|
1437 | component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
|
1438 | }
|
1439 | function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {
|
1440 | const parent_component = exports.current_component;
|
1441 | set_current_component(component);
|
1442 | const prop_values = options.props || {};
|
1443 | const $$ = component.$$ = {
|
1444 | fragment: null,
|
1445 | ctx: null,
|
1446 |
|
1447 | props,
|
1448 | update: noop,
|
1449 | not_equal,
|
1450 | bound: blank_object(),
|
1451 |
|
1452 | on_mount: [],
|
1453 | on_destroy: [],
|
1454 | before_update: [],
|
1455 | after_update: [],
|
1456 | context: new Map(parent_component ? parent_component.$$.context : []),
|
1457 |
|
1458 | callbacks: blank_object(),
|
1459 | dirty,
|
1460 | skip_bound: false
|
1461 | };
|
1462 | let ready = false;
|
1463 | $$.ctx = instance
|
1464 | ? instance(component, prop_values, (i, ret, ...rest) => {
|
1465 | const value = rest.length ? rest[0] : ret;
|
1466 | if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
|
1467 | if (!$$.skip_bound && $$.bound[i])
|
1468 | $$.bound[i](value);
|
1469 | if (ready)
|
1470 | make_dirty(component, i);
|
1471 | }
|
1472 | return ret;
|
1473 | })
|
1474 | : [];
|
1475 | $$.update();
|
1476 | ready = true;
|
1477 | run_all($$.before_update);
|
1478 |
|
1479 | $$.fragment = create_fragment ? create_fragment($$.ctx) : false;
|
1480 | if (options.target) {
|
1481 | if (options.hydrate) {
|
1482 | const nodes = children(options.target);
|
1483 |
|
1484 | $$.fragment && $$.fragment.l(nodes);
|
1485 | nodes.forEach(detach);
|
1486 | }
|
1487 | else {
|
1488 |
|
1489 | $$.fragment && $$.fragment.c();
|
1490 | }
|
1491 | if (options.intro)
|
1492 | transition_in(component.$$.fragment);
|
1493 | mount_component(component, options.target, options.anchor);
|
1494 | flush();
|
1495 | }
|
1496 | set_current_component(parent_component);
|
1497 | }
|
1498 | if (typeof HTMLElement === 'function') {
|
1499 | exports.SvelteElement = class extends HTMLElement {
|
1500 | constructor() {
|
1501 | super();
|
1502 | this.attachShadow({ mode: 'open' });
|
1503 | }
|
1504 | connectedCallback() {
|
1505 |
|
1506 | for (const key in this.$$.slotted) {
|
1507 |
|
1508 | this.appendChild(this.$$.slotted[key]);
|
1509 | }
|
1510 | }
|
1511 | attributeChangedCallback(attr, _oldValue, newValue) {
|
1512 | this[attr] = newValue;
|
1513 | }
|
1514 | $destroy() {
|
1515 | destroy_component(this, 1);
|
1516 | this.$destroy = noop;
|
1517 | }
|
1518 | $on(type, callback) {
|
1519 |
|
1520 | const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
|
1521 | callbacks.push(callback);
|
1522 | return () => {
|
1523 | const index = callbacks.indexOf(callback);
|
1524 | if (index !== -1)
|
1525 | callbacks.splice(index, 1);
|
1526 | };
|
1527 | }
|
1528 | $set($$props) {
|
1529 | if (this.$$set && !is_empty($$props)) {
|
1530 | this.$$.skip_bound = true;
|
1531 | this.$$set($$props);
|
1532 | this.$$.skip_bound = false;
|
1533 | }
|
1534 | }
|
1535 | };
|
1536 | }
|
1537 | class SvelteComponent {
|
1538 | $destroy() {
|
1539 | destroy_component(this, 1);
|
1540 | this.$destroy = noop;
|
1541 | }
|
1542 | $on(type, callback) {
|
1543 | const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
|
1544 | callbacks.push(callback);
|
1545 | return () => {
|
1546 | const index = callbacks.indexOf(callback);
|
1547 | if (index !== -1)
|
1548 | callbacks.splice(index, 1);
|
1549 | };
|
1550 | }
|
1551 | $set($$props) {
|
1552 | if (this.$$set && !is_empty($$props)) {
|
1553 | this.$$.skip_bound = true;
|
1554 | this.$$set($$props);
|
1555 | this.$$.skip_bound = false;
|
1556 | }
|
1557 | }
|
1558 | }
|
1559 |
|
1560 | function dispatch_dev(type, detail) {
|
1561 | document.dispatchEvent(custom_event(type, Object.assign({ version: '3.29.5' }, detail)));
|
1562 | }
|
1563 | function append_dev(target, node) {
|
1564 | dispatch_dev('SvelteDOMInsert', { target, node });
|
1565 | append(target, node);
|
1566 | }
|
1567 | function insert_dev(target, node, anchor) {
|
1568 | dispatch_dev('SvelteDOMInsert', { target, node, anchor });
|
1569 | insert(target, node, anchor);
|
1570 | }
|
1571 | function detach_dev(node) {
|
1572 | dispatch_dev('SvelteDOMRemove', { node });
|
1573 | detach(node);
|
1574 | }
|
1575 | function detach_between_dev(before, after) {
|
1576 | while (before.nextSibling && before.nextSibling !== after) {
|
1577 | detach_dev(before.nextSibling);
|
1578 | }
|
1579 | }
|
1580 | function detach_before_dev(after) {
|
1581 | while (after.previousSibling) {
|
1582 | detach_dev(after.previousSibling);
|
1583 | }
|
1584 | }
|
1585 | function detach_after_dev(before) {
|
1586 | while (before.nextSibling) {
|
1587 | detach_dev(before.nextSibling);
|
1588 | }
|
1589 | }
|
1590 | function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {
|
1591 | const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];
|
1592 | if (has_prevent_default)
|
1593 | modifiers.push('preventDefault');
|
1594 | if (has_stop_propagation)
|
1595 | modifiers.push('stopPropagation');
|
1596 | dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });
|
1597 | const dispose = listen(node, event, handler, options);
|
1598 | return () => {
|
1599 | dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });
|
1600 | dispose();
|
1601 | };
|
1602 | }
|
1603 | function attr_dev(node, attribute, value) {
|
1604 | attr(node, attribute, value);
|
1605 | if (value == null)
|
1606 | dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });
|
1607 | else
|
1608 | dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });
|
1609 | }
|
1610 | function prop_dev(node, property, value) {
|
1611 | node[property] = value;
|
1612 | dispatch_dev('SvelteDOMSetProperty', { node, property, value });
|
1613 | }
|
1614 | function dataset_dev(node, property, value) {
|
1615 | node.dataset[property] = value;
|
1616 | dispatch_dev('SvelteDOMSetDataset', { node, property, value });
|
1617 | }
|
1618 | function set_data_dev(text, data) {
|
1619 | data = '' + data;
|
1620 | if (text.wholeText === data)
|
1621 | return;
|
1622 | dispatch_dev('SvelteDOMSetData', { node: text, data });
|
1623 | text.data = data;
|
1624 | }
|
1625 | function validate_each_argument(arg) {
|
1626 | if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {
|
1627 | let msg = '{#each} only iterates over array-like objects.';
|
1628 | if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {
|
1629 | msg += ' You can use a spread to convert this iterable into an array.';
|
1630 | }
|
1631 | throw new Error(msg);
|
1632 | }
|
1633 | }
|
1634 | function validate_slots(name, slot, keys) {
|
1635 | for (const slot_key of Object.keys(slot)) {
|
1636 | if (!~keys.indexOf(slot_key)) {
|
1637 | console.warn(`<${name}> received an unexpected slot "${slot_key}".`);
|
1638 | }
|
1639 | }
|
1640 | }
|
1641 | class SvelteComponentDev extends SvelteComponent {
|
1642 | constructor(options) {
|
1643 | if (!options || (!options.target && !options.$$inline)) {
|
1644 | throw new Error("'target' is a required option");
|
1645 | }
|
1646 | super();
|
1647 | }
|
1648 | $destroy() {
|
1649 | super.$destroy();
|
1650 | this.$destroy = () => {
|
1651 | console.warn('Component was already destroyed');
|
1652 | };
|
1653 | }
|
1654 | $capture_state() { }
|
1655 | $inject_state() { }
|
1656 | }
|
1657 | function loop_guard(timeout) {
|
1658 | const start = Date.now();
|
1659 | return () => {
|
1660 | if (Date.now() - start > timeout) {
|
1661 | throw new Error('Infinite loop detected');
|
1662 | }
|
1663 | };
|
1664 | }
|
1665 |
|
1666 | exports.HtmlTag = HtmlTag;
|
1667 | exports.SvelteComponent = SvelteComponent;
|
1668 | exports.SvelteComponentDev = SvelteComponentDev;
|
1669 | exports.action_destroyer = action_destroyer;
|
1670 | exports.add_attribute = add_attribute;
|
1671 | exports.add_classes = add_classes;
|
1672 | exports.add_flush_callback = add_flush_callback;
|
1673 | exports.add_location = add_location;
|
1674 | exports.add_render_callback = add_render_callback;
|
1675 | exports.add_resize_listener = add_resize_listener;
|
1676 | exports.add_transform = add_transform;
|
1677 | exports.afterUpdate = afterUpdate;
|
1678 | exports.append = append;
|
1679 | exports.append_dev = append_dev;
|
1680 | exports.assign = assign;
|
1681 | exports.attr = attr;
|
1682 | exports.attr_dev = attr_dev;
|
1683 | exports.attribute_to_object = attribute_to_object;
|
1684 | exports.beforeUpdate = beforeUpdate;
|
1685 | exports.bind = bind;
|
1686 | exports.binding_callbacks = binding_callbacks;
|
1687 | exports.blank_object = blank_object;
|
1688 | exports.bubble = bubble;
|
1689 | exports.check_outros = check_outros;
|
1690 | exports.children = children;
|
1691 | exports.claim_component = claim_component;
|
1692 | exports.claim_element = claim_element;
|
1693 | exports.claim_space = claim_space;
|
1694 | exports.claim_text = claim_text;
|
1695 | exports.clear_loops = clear_loops;
|
1696 | exports.component_subscribe = component_subscribe;
|
1697 | exports.compute_rest_props = compute_rest_props;
|
1698 | exports.compute_slots = compute_slots;
|
1699 | exports.createEventDispatcher = createEventDispatcher;
|
1700 | exports.create_animation = create_animation;
|
1701 | exports.create_bidirectional_transition = create_bidirectional_transition;
|
1702 | exports.create_component = create_component;
|
1703 | exports.create_in_transition = create_in_transition;
|
1704 | exports.create_out_transition = create_out_transition;
|
1705 | exports.create_slot = create_slot;
|
1706 | exports.create_ssr_component = create_ssr_component;
|
1707 | exports.custom_event = custom_event;
|
1708 | exports.dataset_dev = dataset_dev;
|
1709 | exports.debug = debug;
|
1710 | exports.destroy_block = destroy_block;
|
1711 | exports.destroy_component = destroy_component;
|
1712 | exports.destroy_each = destroy_each;
|
1713 | exports.detach = detach;
|
1714 | exports.detach_after_dev = detach_after_dev;
|
1715 | exports.detach_before_dev = detach_before_dev;
|
1716 | exports.detach_between_dev = detach_between_dev;
|
1717 | exports.detach_dev = detach_dev;
|
1718 | exports.dirty_components = dirty_components;
|
1719 | exports.dispatch_dev = dispatch_dev;
|
1720 | exports.each = each;
|
1721 | exports.element = element;
|
1722 | exports.element_is = element_is;
|
1723 | exports.empty = empty;
|
1724 | exports.escape = escape;
|
1725 | exports.escaped = escaped;
|
1726 | exports.exclude_internal_props = exclude_internal_props;
|
1727 | exports.fix_and_destroy_block = fix_and_destroy_block;
|
1728 | exports.fix_and_outro_and_destroy_block = fix_and_outro_and_destroy_block;
|
1729 | exports.fix_position = fix_position;
|
1730 | exports.flush = flush;
|
1731 | exports.getContext = getContext;
|
1732 | exports.get_binding_group_value = get_binding_group_value;
|
1733 | exports.get_current_component = get_current_component;
|
1734 | exports.get_custom_elements_slots = get_custom_elements_slots;
|
1735 | exports.get_slot_changes = get_slot_changes;
|
1736 | exports.get_slot_context = get_slot_context;
|
1737 | exports.get_spread_object = get_spread_object;
|
1738 | exports.get_spread_update = get_spread_update;
|
1739 | exports.get_store_value = get_store_value;
|
1740 | exports.globals = globals;
|
1741 | exports.group_outros = group_outros;
|
1742 | exports.handle_promise = handle_promise;
|
1743 | exports.has_prop = has_prop;
|
1744 | exports.identity = identity;
|
1745 | exports.init = init;
|
1746 | exports.insert = insert;
|
1747 | exports.insert_dev = insert_dev;
|
1748 | exports.intros = intros;
|
1749 | exports.invalid_attribute_name_character = invalid_attribute_name_character;
|
1750 | exports.is_client = is_client;
|
1751 | exports.is_crossorigin = is_crossorigin;
|
1752 | exports.is_empty = is_empty;
|
1753 | exports.is_function = is_function;
|
1754 | exports.is_promise = is_promise;
|
1755 | exports.listen = listen;
|
1756 | exports.listen_dev = listen_dev;
|
1757 | exports.loop = loop;
|
1758 | exports.loop_guard = loop_guard;
|
1759 | exports.missing_component = missing_component;
|
1760 | exports.mount_component = mount_component;
|
1761 | exports.noop = noop;
|
1762 | exports.not_equal = not_equal;
|
1763 | exports.null_to_empty = null_to_empty;
|
1764 | exports.object_without_properties = object_without_properties;
|
1765 | exports.onDestroy = onDestroy;
|
1766 | exports.onMount = onMount;
|
1767 | exports.once = once;
|
1768 | exports.outro_and_destroy_block = outro_and_destroy_block;
|
1769 | exports.prevent_default = prevent_default;
|
1770 | exports.prop_dev = prop_dev;
|
1771 | exports.query_selector_all = query_selector_all;
|
1772 | exports.run = run;
|
1773 | exports.run_all = run_all;
|
1774 | exports.safe_not_equal = safe_not_equal;
|
1775 | exports.schedule_update = schedule_update;
|
1776 | exports.select_multiple_value = select_multiple_value;
|
1777 | exports.select_option = select_option;
|
1778 | exports.select_options = select_options;
|
1779 | exports.select_value = select_value;
|
1780 | exports.self = self;
|
1781 | exports.setContext = setContext;
|
1782 | exports.set_attributes = set_attributes;
|
1783 | exports.set_current_component = set_current_component;
|
1784 | exports.set_custom_element_data = set_custom_element_data;
|
1785 | exports.set_data = set_data;
|
1786 | exports.set_data_dev = set_data_dev;
|
1787 | exports.set_input_type = set_input_type;
|
1788 | exports.set_input_value = set_input_value;
|
1789 | exports.set_now = set_now;
|
1790 | exports.set_raf = set_raf;
|
1791 | exports.set_store_value = set_store_value;
|
1792 | exports.set_style = set_style;
|
1793 | exports.set_svg_attributes = set_svg_attributes;
|
1794 | exports.space = space;
|
1795 | exports.spread = spread;
|
1796 | exports.stop_propagation = stop_propagation;
|
1797 | exports.subscribe = subscribe;
|
1798 | exports.svg_element = svg_element;
|
1799 | exports.text = text;
|
1800 | exports.tick = tick;
|
1801 | exports.time_ranges_to_array = time_ranges_to_array;
|
1802 | exports.to_number = to_number;
|
1803 | exports.toggle_class = toggle_class;
|
1804 | exports.transition_in = transition_in;
|
1805 | exports.transition_out = transition_out;
|
1806 | exports.update_keyed_each = update_keyed_each;
|
1807 | exports.update_slot = update_slot;
|
1808 | exports.validate_component = validate_component;
|
1809 | exports.validate_each_argument = validate_each_argument;
|
1810 | exports.validate_each_keys = validate_each_keys;
|
1811 | exports.validate_slots = validate_slots;
|
1812 | exports.validate_store = validate_store;
|
1813 | exports.xlink_attr = xlink_attr;
|