import { c as NAMESPACE_SVG, i as HYDRATION_ERROR, l as UNINITIALIZED, n as FILENAME, o as NAMESPACE_HTML, r as HMR, s as NAMESPACE_MATHML, t as ATTACHMENT_KEY } from "./constants-Dd0-6Ncu.js"; import { $ as should_defer_append, $n as get_descriptors, A as resume_effect, An as EFFECT_OFFSCREEN, B as clear_text_content, Cn as set_hydrate_node, D as pause_effect, Dn as CLASS_CACHE, E as move_effect, En as ATTRIBUTES_CACHE, F as validate_effect, Fn as HMR_ANCHOR, Ft as listen_to_event_and_reset_event, Gn as get_error, Gt as dev_stack, H as create_element, Hn as STATE_SYMBOL, It as without_reactive_context, K as get_first_child, Kt as is_runes, Ln as IS_XHTML, Lt as add_form_reset_listener, M as template_effect, Mn as EFFECT_TRANSPARENT, Mt as unset_context, N as user_effect, Nn as FORM_RESET_HANDLER, O as remove_effect_dom, Ot as run_after_blockers, P as user_pre_effect, Pn as HEAD_EFFECT, Pt as listen, Qn as get_descriptor, Qt as tag, Rn as LEGACY_PROPS, Rt as autofocus, Sn as reset, St as derived_safe_equal, T as managed, Tn as skip_nodes, Tt as flatten, Un as STYLE_CACHE, Ut as component_context, V as create_comment, Vt as queue_micro_task, W as create_text, Wt as dev_current_component_function, Yn as define_property, Zt as set_dev_current_component_function, _n as hydrate_node, _t as flushSync, a as get, an as component_api_invalid_new, ar as noop, b as effect, c as set_active_effect, cr as run_all, d as untrack, dn as props_invalid_value, er as get_prototype_of, fn as props_rest_readonly, fr as invalid_snippet_arguments, ft as update, gn as hydrate_next, h as branch, hn as safe_not_equal, ht as current_batch, i as deep_read_state, in as component_api_changed, ir as is_promise, it as proxy, j as teardown, k as render_effect, l as set_active_reaction, lt as set, m as block, mt as Batch, n as active_reaction, nr as is_array, o as is_destroying_effect, on as each_key_duplicate, or as object_keys, ot as internal_set, pn as rune_outside_svelte, q as get_next_sibling, qn as array_from, qt as mark_as_component, rn as bind_invalid_checkbox_value, rr as is_function, rt as is, sn as each_key_volatile, sr as run, st as mutable_source, t as active_effect, tn as snapshot, u as tick, un as invalid_snippet, ut as source, v as destroy_effect, vt as is_flushing_sync, wn as set_hydrating, wt as capture, x as effect_root, xn as read_hydration_instruction, xt as derived, y as eager_effect, yn as hydrating, yt as previous_batch, zn as LOADING_ATTR_SYMBOL } from "./runtime-DInTlc-h.js"; import { f as is_raw_text_element, i as hash, n as can_delegate_event, o as is_capture_event, v as normalize_attribute, y as sanitize_location } from "./utils-BWzPBw9Y.js"; import { a as console_log_state, c as hydration_attribute_changed, f as ownership_invalid_binding, i as binding_property_non_reactive, l as hydration_html_changed, m as select_multiple_invalid_value, p as ownership_invalid_mutation, t as assignment_value_stale, u as hydration_mismatch } from "./warnings-CI-8FXsK.js"; import { T as create_trusted_html, d as should_intro, g as assign_nodes, h as append, l as set_should_intro, n as createClassComponent } from "./legacy-client-DTuKEjQw.js"; import { c as to_style, o as clsx, s as to_class, t as prevent_snippet_stringification } from "./validate-EWwS2w2A.js"; import { a as delegated, i as delegate, r as create_event } from "./events-ChFSpzmg.js"; import { a as legacy_mode_flag, t as async_mode_flag } from "./flags-qfBdqUK7.js"; import { t as subscribe_to_store } from "./utils-B9o6NEeQ.js"; import { n as get$1 } from "./shared-Clug2-tp.js"; // node_modules/svelte/src/internal/client/dev/assign.js /** * * @param {any} a * @param {any} b * @param {string} property * @param {string} location */ function compare(a, b, property, location) { if (a !== b && typeof b === "object" && STATE_SYMBOL in b) assignment_value_stale(property, sanitize_location(location)); return a; } /** * @param {any} object * @param {string} property * @param {string} operator * @param {any} rhs * @param {string} location */ function assign(object, property, operator, rhs, location) { return compare(operator === "=" ? object[property] = rhs : operator === "&&=" ? object[property] &&= rhs() : operator === "||=" ? object[property] ||= rhs() : operator === "??=" ? object[property] ??= rhs() : null, untrack(() => object[property]), property, location); } /** * @param {any} object * @param {string} property * @param {string} operator * @param {any} rhs * @param {string} location */ async function assign_async(object, property, operator, rhs, location) { return compare(operator === "=" ? object[property] = await rhs : operator === "&&=" ? object[property] &&= await rhs() : operator === "||=" ? object[property] ||= await rhs() : operator === "??=" ? object[property] ??= await rhs() : null, untrack(() => object[property]), property, location); } // node_modules/svelte/src/internal/client/dev/css.js /** @type {Map>} */ var all_styles = /* @__PURE__ */ new Map(); /** * @param {String} hash * @param {HTMLStyleElement} style */ function register_style(hash, style) { var styles = all_styles.get(hash); if (!styles) { styles = /* @__PURE__ */ new Set(); all_styles.set(hash, styles); } styles.add(style); } /** * @param {String} hash */ function cleanup_styles(hash) { var styles = all_styles.get(hash); if (!styles) return; for (const style of styles) style.remove(); all_styles.delete(hash); } // node_modules/svelte/src/internal/client/dev/elements.js /** @import { SourceLocation } from '#client' */ /** * @param {any} fn * @param {string} filename * @param {SourceLocation[]} locations * @returns {any} */ function add_locations(fn, filename, locations) { return (...args) => { const dom = fn(...args); assign_locations(hydrating ? dom : dom.nodeType === 11 ? dom.firstChild : dom, filename, locations); return dom; }; } /** * @param {Element} element * @param {string} filename * @param {SourceLocation} location */ function assign_location(element, filename, location) { element.__svelte_meta = { parent: dev_stack, loc: { file: filename, line: location[0], column: location[1] } }; if (location[2]) assign_locations(element.firstChild, filename, location[2]); } /** * @param {Node | null} node * @param {string} filename * @param {SourceLocation[]} locations */ function assign_locations(node, filename, locations) { var i = 0; var depth = 0; while (node && i < locations.length) { if (hydrating && node.nodeType === 8) { var comment = node; if (comment.data[0] === "[") depth += 1; else if (comment.data[0] === "]") depth -= 1; } if (depth === 0 && node.nodeType === 1) assign_location(node, filename, locations[i++]); node = node.nextSibling; } } // node_modules/svelte/src/internal/client/dev/hmr.js /** @import { Effect, TemplateNode } from '#client' */ /** * @template {(anchor: Comment, props: any) => any} Component * @param {Component} fn */ function hmr(fn) { const current = source(fn); /** * @param {TemplateNode} initial_anchor * @param {any} props */ function wrapper(initial_anchor, props) { let component = {}; let instance = {}; /** @type {Effect} */ let effect; let ran = false; let anchor = initial_anchor; block(() => { if (component === (component = get(current))) return; if (effect) { for (var k in instance) delete instance[k]; destroy_effect(effect); } effect = branch(() => { anchor = anchor[HMR_ANCHOR] ?? anchor; if (ran) set_should_intro(false); var result = new.target ? new component(anchor, props) : component(anchor, props); if (result) Object.defineProperties(instance, Object.getOwnPropertyDescriptors(result)); if (ran) set_should_intro(true); }); var inner_nodes = effect.nodes; if (inner_nodes) { var ae = active_effect; if (ae.nodes) { ae.nodes.start = inner_nodes.start; ae.nodes.end = inner_nodes.end; } else ae.nodes = { start: inner_nodes.start, end: inner_nodes.end, a: null, t: null }; } }, EFFECT_TRANSPARENT); ran = true; if (hydrating) anchor = hydrate_node; return instance; } wrapper[FILENAME] = fn[FILENAME]; wrapper[HMR] = { fn, current, update: (incoming) => { set(wrapper[HMR].current, incoming[HMR].fn); incoming[HMR].current = wrapper[HMR].current; } }; return wrapper; } // node_modules/svelte/src/internal/client/dev/ownership.js /** @typedef {{ file: string, line: number, column: number }} Location */ /** * Sets up a validator that * - traverses the path of a prop to find out if it is allowed to be mutated * - checks that the binding chain is not interrupted * @param {Record} props */ function create_ownership_validator(props) { const component = component_context?.function; const parent = component_context?.p?.function; return { /** * @param {string} prop * @param {any[]} path * @param {any} result * @param {number} line * @param {number} column */ mutation: (prop, path, result, line, column) => { const name = path[0]; if (is_bound_or_unset(props, name) || !parent) return result; /** @type {any} */ let value = props; for (let i = 0; i < path.length - 1; i++) { value = value[path[i]]; if (!value?.[STATE_SYMBOL]) return result; } const location = sanitize_location(`${component[FILENAME]}:${line}:${column}`); ownership_invalid_mutation(name, location, prop, parent[FILENAME]); return result; }, /** * @param {any} key * @param {any} child_component * @param {() => any} value */ binding: (key, child_component, value) => { if (!is_bound_or_unset(props, key) && parent && value()?.[STATE_SYMBOL]) ownership_invalid_binding(component[FILENAME], key, child_component[FILENAME], parent[FILENAME]); } }; } /** * @param {Record} props * @param {string} prop_name */ function is_bound_or_unset(props, prop_name) { const is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props; return !!get_descriptor(props, prop_name)?.set || is_entry_props && prop_name in props || !(prop_name in props); } // node_modules/svelte/src/internal/client/dev/legacy.js /** @param {Function & { [FILENAME]: string }} target */ function check_target(target) { if (target) component_api_invalid_new(target[FILENAME] ?? "a component", target.name); } function legacy_api() { const component = component_context?.function; /** @param {string} method */ function error(method) { component_api_changed(method, component[FILENAME]); } return { $destroy: () => error("$destroy()"), $on: () => error("$on(...)"), $set: () => error("$set(...)") }; } // node_modules/svelte/src/internal/client/dev/inspect.js /** * @param {() => any[]} get_value * @param {Function} inspector * @param {boolean} show_stack */ function inspect(get_value, inspector, show_stack = false) { validate_effect("$inspect"); let initial = true; let error = UNINITIALIZED; eager_effect(() => { error = UNINITIALIZED; try { var value = get_value(); } catch (e) { error = e; return; } var snap = snapshot(value, true, true); untrack(() => { if (show_stack) { inspector(...snap); if (!initial) { const stack = get_error("$inspect(...)"); if (stack) { console.groupCollapsed("stack trace"); console.log(stack); console.groupEnd(); } } } else inspector(initial ? "init" : "update", ...snap); }); initial = false; }); render_effect(() => { try { get_value(); } catch {} if (error !== UNINITIALIZED) { console.error(error); error = UNINITIALIZED; } }); } // node_modules/svelte/src/internal/client/dom/blocks/async.js /** @import { Blocker, TemplateNode, Value } from '#client' */ /** * @param {TemplateNode} node * @param {Blocker[]} blockers * @param {Array<() => Promise>} expressions * @param {(anchor: TemplateNode, ...deriveds: Value[]) => void} fn */ function async(node, blockers = [], expressions = [], fn) { var was_hydrating = hydrating; var end = null; if (was_hydrating) { hydrate_next(); end = skip_nodes(false); assign_nodes(node, end); } if (expressions.length === 0 && blockers.every((b) => b.settled)) { fn(node); if (was_hydrating) set_hydrate_node(end); return; } if (was_hydrating) { var previous_hydrate_node = hydrate_node; set_hydrate_node(end); } flatten(blockers, [], expressions, (values) => { if (was_hydrating) { set_hydrating(true); set_hydrate_node(previous_hydrate_node); } try { for (const d of values) get(d); fn(node, ...values); } finally { if (was_hydrating) set_hydrating(false); } }); } // node_modules/svelte/src/internal/client/dev/validation.js /** * @param {Node} anchor * @param {...(()=>any)[]} args */ function validate_snippet_args(anchor, ...args) { if (typeof anchor !== "object" || !(anchor instanceof Node)) invalid_snippet_arguments(); for (let arg of args) if (typeof arg !== "function") invalid_snippet_arguments(); } // node_modules/svelte/src/internal/client/dom/blocks/branches.js /** @import { Effect, TemplateNode } from '#client' */ /** * @typedef {{ effect: Effect, fragment: DocumentFragment }} Branch */ /** * @template Key */ var BranchManager = class { /** @type {TemplateNode} */ anchor; /** @type {Map} */ #batches = /* @__PURE__ */ new Map(); /** * Map of keys to effects that are currently rendered in the DOM. * These effects are visible and actively part of the document tree. * Example: * ``` * {#if condition} * foo * {:else} * bar * {/if} * ``` * Can result in the entries `true->Effect` and `false->Effect` * @type {Map} */ #onscreen = /* @__PURE__ */ new Map(); /** * Similar to #onscreen with respect to the keys, but contains branches that are not yet * in the DOM, because their insertion is deferred. * @type {Map} */ #offscreen = /* @__PURE__ */ new Map(); /** * Keys of effects that are currently outroing * @type {Set} */ #outroing = /* @__PURE__ */ new Set(); /** * Whether to pause (i.e. outro) on change, or destroy immediately. * This is necessary for `` */ #transition = true; /** * @param {TemplateNode} anchor * @param {boolean} transition */ constructor(anchor, transition = true) { this.anchor = anchor; this.#transition = transition; } /** * @param {Batch} batch */ #commit = (batch) => { if (!this.#batches.has(batch)) return; var key = this.#batches.get(batch); var onscreen = this.#onscreen.get(key); if (onscreen) { resume_effect(onscreen); this.#outroing.delete(key); } else { var offscreen = this.#offscreen.get(key); if (offscreen) { resume_effect(offscreen.effect); this.#onscreen.set(key, offscreen.effect); this.#offscreen.delete(key); /** @type {any} */ offscreen.fragment.lastChild[HMR_ANCHOR] = this.anchor; /** @type {TemplateNode} */ offscreen.fragment.lastChild.remove(); this.anchor.before(offscreen.fragment); onscreen = offscreen.effect; } } for (const [b, k] of this.#batches) { this.#batches.delete(b); if (b === batch) break; const offscreen = this.#offscreen.get(k); if (offscreen) { destroy_effect(offscreen.effect); this.#offscreen.delete(k); } } for (const [k, effect] of this.#onscreen) { if (k === key || this.#outroing.has(k)) continue; const on_destroy = () => { if (Array.from(this.#batches.values()).includes(k)) { var fragment = document.createDocumentFragment(); move_effect(effect, fragment); fragment.append(create_text()); this.#offscreen.set(k, { effect, fragment }); } else destroy_effect(effect); this.#outroing.delete(k); this.#onscreen.delete(k); }; if (this.#transition || !onscreen) { this.#outroing.add(k); pause_effect(effect, on_destroy, false); } else on_destroy(); } }; /** * @param {Batch} batch */ #discard = (batch) => { this.#batches.delete(batch); const keys = Array.from(this.#batches.values()); for (const [k, branch] of this.#offscreen) if (!keys.includes(k)) { destroy_effect(branch.effect); this.#offscreen.delete(k); } }; /** * * @param {any} key * @param {null | ((target: TemplateNode) => void)} fn */ ensure(key, fn) { var batch = current_batch; var defer = should_defer_append(); if (fn && !this.#onscreen.has(key) && !this.#offscreen.has(key)) { if (defer) { var fragment = document.createDocumentFragment(); var target = create_text(); fragment.append(target); this.#offscreen.set(key, { effect: branch(() => fn(target)), fragment }); } else this.#onscreen.set(key, branch(() => fn(this.anchor))); } this.#batches.set(batch, key); if (defer) { for (const [k, effect] of this.#onscreen) if (k === key) batch.unskip_effect(effect); else batch.skip_effect(effect); for (const [k, branch] of this.#offscreen) if (k === key) batch.unskip_effect(branch.effect); else batch.skip_effect(branch.effect); batch.oncommit(this.#commit); batch.ondiscard(this.#discard); } else { if (hydrating) this.anchor = hydrate_node; this.#commit(batch); } } }; // node_modules/svelte/src/internal/client/dom/blocks/await.js /** @import { Source, TemplateNode } from '#client' */ var PENDING = 0; var THEN = 1; var CATCH = 2; /** @typedef {typeof PENDING | typeof THEN | typeof CATCH} AwaitState */ /** * @template V * @param {TemplateNode} node * @param {(() => any)} get_input * @param {null | ((anchor: Node) => void)} pending_fn * @param {null | ((anchor: Node, value: Source) => void)} then_fn * @param {null | ((anchor: Node, error: unknown) => void)} catch_fn * @returns {void} */ function await_block(node, get_input, pending_fn, then_fn, catch_fn) { if (hydrating) hydrate_next(); var runes = is_runes(); var v = UNINITIALIZED; var value = runes ? source(v) : /* @__PURE__ */ mutable_source(v, false, false); var error = runes ? source(v) : /* @__PURE__ */ mutable_source(v, false, false); value.label = "{#await ...} value"; error.label = "{#await ...} error"; var branches = new BranchManager(node); block(() => { var batch = current_batch; var input = get_input(); var destroyed = false; /** Whether or not there was a hydration mismatch. Needs to be a `let` or else it isn't treeshaken out */ let mismatch = hydrating && is_promise(input) === (node.data === "[!"); if (mismatch) { set_hydrate_node(skip_nodes()); set_hydrating(false); } if (is_promise(input)) { var restore = capture(); var resolved = false; /** * @param {() => void} fn */ const resolve = (fn) => { if (destroyed) return; resolved = true; restore(false); if (current_batch === batch) batch.deactivate(); Batch.ensure(); try { fn(); } finally { unset_context(false); if (!is_flushing_sync) flushSync(); } }; input.then((v) => { resolve(() => { internal_set(value, v); branches.ensure(THEN, then_fn && ((target) => then_fn(target, value))); }); }, (e) => { resolve(() => { internal_set(error, e); branches.ensure(CATCH, catch_fn && ((target) => catch_fn(target, error))); if (!catch_fn) throw error.v; }); }); if (hydrating) branches.ensure(PENDING, pending_fn); else queue_micro_task(() => { if (!resolved) resolve(() => { branches.ensure(PENDING, pending_fn); }); }); } else { internal_set(value, input); branches.ensure(THEN, then_fn && ((target) => then_fn(target, value))); } if (mismatch) set_hydrating(true); return () => { destroyed = true; }; }); } // node_modules/svelte/src/internal/client/dom/blocks/if.js /** @import { TemplateNode } from '#client' */ /** * @param {TemplateNode} node * @param {(branch: (fn: (anchor: Node) => void, key?: number | false) => void) => void} fn * @param {boolean} [elseif] True if this is an `{:else if ...}` block rather than an `{#if ...}`, as that affects which transitions are considered 'local' * @returns {void} */ function if_block(node, fn, elseif = false) { /** @type {TemplateNode | undefined} */ var marker; if (hydrating) { marker = hydrate_node; hydrate_next(); } var branches = new BranchManager(node); var flags = elseif ? EFFECT_TRANSPARENT : 0; /** * @param {number | false} key * @param {null | ((anchor: Node) => void)} fn */ function update_branch(key, fn) { if (hydrating) { var data = read_hydration_instruction(marker); if (key !== parseInt(data.substring(1))) { var anchor = skip_nodes(); set_hydrate_node(anchor); branches.anchor = anchor; set_hydrating(false); branches.ensure(key, fn); set_hydrating(true); return; } } branches.ensure(key, fn); } block(() => { var has_branch = false; fn((fn, key = 0) => { has_branch = true; update_branch(key, fn); }); if (!has_branch) update_branch(-1, null); }, flags); } // node_modules/svelte/src/internal/client/dom/blocks/key.js /** @import { TemplateNode } from '#client' */ var NAN = Symbol("NaN"); /** * @template V * @param {TemplateNode} node * @param {() => V} get_key * @param {(anchor: Node) => TemplateNode | void} render_fn * @returns {void} */ function key(node, get_key, render_fn) { if (hydrating) hydrate_next(); var branches = new BranchManager(node); var legacy = !is_runes(); block(() => { var key = get_key(); if (key !== key) key = NAN; if (legacy && key !== null && typeof key === "object") key = {}; branches.ensure(key, render_fn); }); } // node_modules/svelte/src/internal/client/dom/blocks/css-props.js /** * @param {HTMLDivElement | SVGGElement} element * @param {() => Record} get_styles * @returns {void} */ function css_props(element, get_styles) { if (hydrating) set_hydrate_node(/* @__PURE__ */ get_first_child(element)); render_effect(() => { var styles = get_styles(); for (var key in styles) { var value = styles[key]; if (value == null || value === "") element.style.removeProperty(key); else element.style.setProperty(key, value); } }); } // node_modules/svelte/src/internal/client/dom/blocks/each.js /** @import { EachItem, EachOutroGroup, EachState, Effect, EffectNodes, MaybeSource, TemplateNode, TransitionManager } from '#client' */ /** @import { Batch } from '../../reactivity/batch.js'; */ /** * @param {any} _ * @param {number} i */ function index(_, i) { return i; } /** * Pause multiple effects simultaneously, and coordinate their * subsequent destruction. Used in each blocks * @param {EachState} state * @param {Effect[]} to_destroy * @param {null | Node} controlled_anchor */ function pause_effects(state, to_destroy, controlled_anchor) { /** @type {TransitionManager[]} */ var transitions = []; var length = to_destroy.length; /** @type {EachOutroGroup} */ var group; var remaining = to_destroy.length; for (var i = 0; i < length; i++) { let effect = to_destroy[i]; pause_effect(effect, () => { if (group) { group.pending.delete(effect); group.done.add(effect); if (group.pending.size === 0) { var groups = state.outrogroups; destroy_effects(state, array_from(group.done)); groups.delete(group); if (groups.size === 0) state.outrogroups = null; } } else remaining -= 1; }, false); } if (remaining === 0) { var fast_path = transitions.length === 0 && controlled_anchor !== null && state.pending.size === 0; if (fast_path) { var anchor = controlled_anchor; var parent_node = anchor.parentNode; clear_text_content(parent_node); parent_node.append(anchor); state.items.clear(); } destroy_effects(state, to_destroy, !fast_path); } else { group = { pending: new Set(to_destroy), done: /* @__PURE__ */ new Set() }; (state.outrogroups ??= /* @__PURE__ */ new Set()).add(group); } } /** * @param {EachState} state * @param {Effect[]} to_destroy * @param {boolean} remove_dom */ function destroy_effects(state, to_destroy, remove_dom = true) { /** @type {Set | undefined} */ var preserved_effects; if (state.pending.size > 0) { preserved_effects = /* @__PURE__ */ new Set(); for (const keys of state.pending.values()) for (const key of keys) preserved_effects.add( /** @type {EachItem} */ state.items.get(key).e ); } for (var i = 0; i < to_destroy.length; i++) { var e = to_destroy[i]; if (preserved_effects?.has(e)) { e.f |= EFFECT_OFFSCREEN; const fragment = document.createDocumentFragment(); move_effect(e, fragment); } else destroy_effect(to_destroy[i], remove_dom); } } /** @type {TemplateNode} */ var offscreen_anchor; /** * @template V * @param {Element | Comment} node The next sibling node, or the parent node if this is a 'controlled' block * @param {number} flags * @param {() => V[]} get_collection * @param {(value: V, index: number) => any} get_key * @param {(anchor: Node, item: MaybeSource, index: MaybeSource) => void} render_fn * @param {null | ((anchor: Node) => void)} fallback_fn * @returns {void} */ function each(node, flags, get_collection, get_key, render_fn, fallback_fn = null) { var anchor = node; /** @type {Map} */ var items = /* @__PURE__ */ new Map(); if ((flags & 4) !== 0) { var parent_node = node; anchor = hydrating ? set_hydrate_node(/* @__PURE__ */ get_first_child(parent_node)) : parent_node.appendChild(create_text()); } if (hydrating) hydrate_next(); /** @type {Effect | null} */ var fallback = null; var each_array = /* @__PURE__ */ derived_safe_equal(() => { var collection = get_collection(); return is_array(collection) ? collection : collection == null ? [] : array_from(collection); }); tag(each_array, "{#each ...}"); /** @type {Map>} */ var pending = /* @__PURE__ */ new Map(); var first_run = true; /** * @param {Batch} batch */ function commit(batch) { if ((state.effect.f & 16384) !== 0) return; state.pending.delete(batch); var array = get(each_array); state.fallback = fallback; reconcile(state, array, anchor, flags, get_key); if (fallback !== null) { if (array.length === 0) { if ((fallback.f & 33554432) === 0) resume_effect(fallback); else { fallback.f ^= EFFECT_OFFSCREEN; move(fallback, null, anchor); } } else pause_effect(fallback, () => { fallback = null; }); } } /** * @param {Batch} batch */ function discard(batch) { state.pending.delete(batch); } /** @type {EachState} */ var state = { effect: block(() => { var array = get(each_array); var length = array.length; /** `true` if there was a hydration mismatch. Needs to be a `let` or else it isn't treeshaken out */ let mismatch = false; if (hydrating) { if (read_hydration_instruction(anchor) === "[!" !== (length === 0)) { anchor = skip_nodes(); set_hydrate_node(anchor); set_hydrating(false); mismatch = true; } } var keys = /* @__PURE__ */ new Set(); var batch = current_batch; var defer = should_defer_append(); for (var index = 0; index < length; index += 1) { if (hydrating && hydrate_node.nodeType === 8 && hydrate_node.data === "]") { anchor = hydrate_node; mismatch = true; set_hydrating(false); } var value = array[index]; var key = get_key(value, index); var key_again = get_key(value, index); if (key !== key_again) each_key_volatile(String(index), String(key), String(key_again)); var item = first_run ? null : items.get(key); if (item) { if (item.v) internal_set(item.v, value); if (item.i) internal_set(item.i, index); if (defer) batch.unskip_effect(item.e); } else { item = create_item(items, first_run ? anchor : offscreen_anchor ??= create_text(), value, key, index, render_fn, flags, get_collection); if (!first_run) item.e.f |= EFFECT_OFFSCREEN; items.set(key, item); } keys.add(key); } if (length === 0 && fallback_fn && !fallback) { if (first_run) fallback = branch(() => fallback_fn(anchor)); else { fallback = branch(() => fallback_fn(offscreen_anchor ??= create_text())); fallback.f |= EFFECT_OFFSCREEN; } } if (length > keys.size) validate_each_keys(array, get_key); if (hydrating && length > 0) set_hydrate_node(skip_nodes()); if (!first_run) { pending.set(batch, keys); if (defer) { for (const [key, item] of items) if (!keys.has(key)) batch.skip_effect(item.e); batch.oncommit(commit); batch.ondiscard(discard); } else commit(batch); } if (mismatch) set_hydrating(true); get(each_array); }), flags, items, pending, outrogroups: null, fallback }; first_run = false; if (hydrating) anchor = hydrate_node; } /** * Skip past any non-branch effects (which could be created with `createSubscriber`, for example) to find the next branch effect * @param {Effect | null} effect * @returns {Effect | null} */ function skip_to_branch(effect) { while (effect !== null && (effect.f & 32) === 0) effect = effect.next; return effect; } /** * Add, remove, or reorder items output by an each block as its input changes * @template V * @param {EachState} state * @param {Array} array * @param {Element | Comment | Text} anchor * @param {number} flags * @param {(value: V, index: number) => any} get_key * @returns {void} */ function reconcile(state, array, anchor, flags, get_key) { var is_animated = (flags & 8) !== 0; var length = array.length; var items = state.items; var current = skip_to_branch(state.effect.first); /** @type {undefined | Set} */ var seen; /** @type {Effect | null} */ var prev = null; /** @type {undefined | Set} */ var to_animate; /** @type {Effect[]} */ var matched = []; /** @type {Effect[]} */ var stashed = []; /** @type {V} */ var value; /** @type {any} */ var key; /** @type {Effect | undefined} */ var effect; /** @type {number} */ var i; if (is_animated) for (i = 0; i < length; i += 1) { value = array[i]; key = get_key(value, i); effect = items.get(key).e; if ((effect.f & 33554432) === 0) { effect.nodes?.a?.measure(); (to_animate ??= /* @__PURE__ */ new Set()).add(effect); } } for (i = 0; i < length; i += 1) { value = array[i]; key = get_key(value, i); effect = items.get(key).e; if (state.outrogroups !== null) for (const group of state.outrogroups) { group.pending.delete(effect); group.done.delete(effect); } if ((effect.f & 8192) !== 0) { resume_effect(effect); if (is_animated) { effect.nodes?.a?.unfix(); (to_animate ??= /* @__PURE__ */ new Set()).delete(effect); } } if ((effect.f & 33554432) !== 0) { effect.f ^= EFFECT_OFFSCREEN; if (effect === current) move(effect, null, anchor); else { var next = prev ? prev.next : current; if (effect === state.effect.last) state.effect.last = effect.prev; if (effect.prev) effect.prev.next = effect.next; if (effect.next) effect.next.prev = effect.prev; link(state, prev, effect); link(state, effect, next); move(effect, next, anchor); prev = effect; matched = []; stashed = []; current = skip_to_branch(prev.next); continue; } } if (effect !== current) { if (seen !== void 0 && seen.has(effect)) { if (matched.length < stashed.length) { var start = stashed[0]; var j; prev = start.prev; var a = matched[0]; var b = matched[matched.length - 1]; for (j = 0; j < matched.length; j += 1) move(matched[j], start, anchor); for (j = 0; j < stashed.length; j += 1) seen.delete(stashed[j]); link(state, a.prev, b.next); link(state, prev, a); link(state, b, start); current = start; prev = b; i -= 1; matched = []; stashed = []; } else { seen.delete(effect); move(effect, current, anchor); link(state, effect.prev, effect.next); link(state, effect, prev === null ? state.effect.first : prev.next); link(state, prev, effect); prev = effect; } continue; } matched = []; stashed = []; while (current !== null && current !== effect) { (seen ??= /* @__PURE__ */ new Set()).add(current); stashed.push(current); current = skip_to_branch(current.next); } if (current === null) continue; } if ((effect.f & 33554432) === 0) matched.push(effect); prev = effect; current = skip_to_branch(effect.next); } if (state.outrogroups !== null) { for (const group of state.outrogroups) if (group.pending.size === 0) { destroy_effects(state, array_from(group.done)); state.outrogroups?.delete(group); } if (state.outrogroups.size === 0) state.outrogroups = null; } if (current !== null || seen !== void 0) { /** @type {Effect[]} */ var to_destroy = []; if (seen !== void 0) { for (effect of seen) if ((effect.f & 8192) === 0) to_destroy.push(effect); } while (current !== null) { if ((current.f & 8192) === 0 && current !== state.fallback) to_destroy.push(current); current = skip_to_branch(current.next); } var destroy_length = to_destroy.length; if (destroy_length > 0) { var controlled_anchor = (flags & 4) !== 0 && length === 0 ? anchor : null; if (is_animated) { for (i = 0; i < destroy_length; i += 1) to_destroy[i].nodes?.a?.measure(); for (i = 0; i < destroy_length; i += 1) to_destroy[i].nodes?.a?.fix(); } pause_effects(state, to_destroy, controlled_anchor); } } if (is_animated) queue_micro_task(() => { if (to_animate === void 0) return; for (effect of to_animate) effect.nodes?.a?.apply(); }); } /** * @template V * @param {Map} items * @param {Node} anchor * @param {V} value * @param {unknown} key * @param {number} index * @param {(anchor: Node, item: MaybeSource, index: MaybeSource, collection: () => V[]) => void} render_fn * @param {number} flags * @param {() => V[]} get_collection * @returns {EachItem} */ function create_item(items, anchor, value, key, index, render_fn, flags, get_collection) { var v = (flags & 1) !== 0 ? (flags & 16) === 0 ? /* @__PURE__ */ mutable_source(value, false, false) : source(value) : null; var i = (flags & 2) !== 0 ? source(index) : null; if (v) v.trace = () => { get_collection()[i?.v ?? index]; }; return { v, i, e: branch(() => { render_fn(anchor, v ?? value, i ?? index, get_collection); return () => { items.delete(key); }; }) }; } /** * @param {Effect} effect * @param {Effect | null} next * @param {Text | Element | Comment} anchor */ function move(effect, next, anchor) { if (!effect.nodes) return; var node = effect.nodes.start; var end = effect.nodes.end; var dest = next && (next.f & 33554432) === 0 ? next.nodes.start : anchor; while (node !== null) { var next_node = /* @__PURE__ */ get_next_sibling(node); dest.before(node); if (node === end) return; node = next_node; } } /** * @param {EachState} state * @param {Effect | null} prev * @param {Effect | null} next */ function link(state, prev, next) { if (prev === null) state.effect.first = next; else prev.next = next; if (next === null) state.effect.last = prev; else next.prev = prev; } /** * @param {Array} array * @param {(item: any, index: number) => string} key_fn * @returns {void} */ function validate_each_keys(array, key_fn) { const keys = /* @__PURE__ */ new Map(); const length = array.length; for (let i = 0; i < length; i++) { const key = key_fn(array[i], i); if (keys.has(key)) { const a = String(keys.get(key)); const b = String(i); /** @type {string | null} */ let k = String(key); if (k.startsWith("[object ")) k = null; each_key_duplicate(a, b, k); } keys.set(key, i); } } // node_modules/svelte/src/internal/client/dom/blocks/html.js /** @import { Effect, TemplateNode } from '#client' */ /** @import {} from 'trusted-types' */ /** * @param {Element} element * @param {string | null} server_hash * @param {string | TrustedHTML} value */ function check_hash(element, server_hash, value) { if (!server_hash || server_hash === hash(String(value ?? ""))) return; let location; const loc = element.__svelte_meta?.loc; if (loc) location = `near ${loc.file}:${loc.line}:${loc.column}`; else if (dev_current_component_function?.[FILENAME]) location = `in ${dev_current_component_function[FILENAME]}`; hydration_html_changed(sanitize_location(location)); } /** * @param {Element | Text | Comment} node * @param {() => string | TrustedHTML} get_value * @param {boolean} [is_controlled] * @param {boolean} [svg] * @param {boolean} [mathml] * @param {boolean} [skip_warning] * @returns {void} */ function html(node, get_value, is_controlled = false, svg = false, mathml = false, skip_warning = false) { var anchor = node; /** @type {string | TrustedHTML} */ var value = ""; if (is_controlled) { var parent_node = node; if (hydrating) anchor = set_hydrate_node(/* @__PURE__ */ get_first_child(parent_node)); } template_effect(() => { var effect = active_effect; if (value === (value = get_value() ?? "")) { if (hydrating) hydrate_next(); return; } if (is_controlled && !hydrating) { effect.nodes = null; parent_node.innerHTML = value; if (value !== "") assign_nodes(/* @__PURE__ */ get_first_child(parent_node), parent_node.lastChild); return; } if (effect.nodes !== null) { remove_effect_dom(effect.nodes.start, effect.nodes.end); effect.nodes = null; } if (value === "") return; if (hydrating) { var hash = hydrate_node.data; /** @type {TemplateNode | null} */ var next = hydrate_next(); var last = next; while (next !== null && (next.nodeType !== 8 || next.data !== "")) { last = next; next = /* @__PURE__ */ get_next_sibling(next); } if (next === null) { hydration_mismatch(); throw HYDRATION_ERROR; } if (!skip_warning) check_hash(next.parentNode, hash, value); assign_nodes(hydrate_node, last); anchor = set_hydrate_node(next); return; } var wrapper = create_element(svg ? "svg" : mathml ? "math" : "template", svg ? NAMESPACE_SVG : mathml ? NAMESPACE_MATHML : void 0); wrapper.innerHTML = value; /** @type {DocumentFragment | Element} */ var node = svg || mathml ? wrapper : /** @type {HTMLTemplateElement} */ wrapper.content; assign_nodes(/* @__PURE__ */ get_first_child(node), node.lastChild); if (svg || mathml) while (/* @__PURE__ */ get_first_child(node)) anchor.before(/* @__PURE__ */ get_first_child(node)); else anchor.before(node); }); } // node_modules/svelte/src/internal/client/dom/blocks/slot.js /** * @param {Comment} anchor * @param {Record} $$props * @param {string} name * @param {Record} slot_props * @param {null | ((anchor: Comment) => void)} fallback_fn */ function slot(anchor, $$props, name, slot_props, fallback_fn) { if (hydrating) hydrate_next(); if ($$props.$$host?.$$shadowRoot) { const element = create_element("slot"); if (name !== "default") element.name = name; append(anchor, element); if (fallback_fn !== null) { const fallback_anchor = create_text(); element.append(fallback_anchor); fallback_fn(fallback_anchor); } return; } var slot_fn = $$props.$$slots?.[name]; var is_interop = false; if (slot_fn === true) { slot_fn = $$props[name === "default" ? "children" : name]; is_interop = true; } if (slot_fn === void 0) { if (fallback_fn !== null) fallback_fn(anchor); } else slot_fn(anchor, is_interop ? () => slot_props : slot_props); } /** * @param {Record} props * @returns {Record} */ function sanitize_slots(props) { /** @type {Record} */ const sanitized = {}; if (props.children) sanitized.default = true; for (const key in props.$$slots) sanitized[key] = true; return sanitized; } // node_modules/svelte/src/internal/client/dom/blocks/snippet.js /** @import { Snippet } from 'svelte' */ /** @import { TemplateNode } from '#client' */ /** @import { Getters } from '#shared' */ /** * @template {(node: TemplateNode, ...args: any[]) => void} SnippetFn * @param {TemplateNode} node * @param {() => SnippetFn | null | undefined} get_snippet * @param {(() => any)[]} args * @returns {void} */ function snippet(node, get_snippet, ...args) { var branches = new BranchManager(node); block(() => { const snippet = get_snippet() ?? null; if (snippet == null) invalid_snippet(); branches.ensure(snippet, snippet && ((anchor) => snippet(anchor, ...args))); }, EFFECT_TRANSPARENT); } /** * In development, wrap the snippet function so that it passes validation, and so that the * correct component context is set for ownership checks * @param {any} component * @param {(node: TemplateNode, ...args: any[]) => void} fn */ function wrap_snippet(component, fn) { const snippet = (node, ...args) => { var previous_component_function = dev_current_component_function; set_dev_current_component_function(component); try { return fn(node, ...args); } finally { set_dev_current_component_function(previous_component_function); } }; prevent_snippet_stringification(snippet); return snippet; } // node_modules/svelte/src/internal/client/dom/blocks/svelte-component.js /** @import { TemplateNode, Dom } from '#client' */ /** * @template P * @template {(props: P) => void} C * @param {TemplateNode} node * @param {() => C} get_component * @param {(anchor: TemplateNode, component: C) => Dom | void} render_fn * @returns {void} */ function component(node, get_component, render_fn) { /** @type {TemplateNode | undefined} */ var hydration_start_node; if (hydrating) { hydration_start_node = hydrate_node; hydrate_next(); } var branches = new BranchManager(node); block(() => { var component = get_component() ?? null; if (hydrating) { if (read_hydration_instruction(hydration_start_node) === "[" !== (component !== null)) { var anchor = skip_nodes(); set_hydrate_node(anchor); branches.anchor = anchor; set_hydrating(false); branches.ensure(component, component && ((target) => render_fn(target, component))); set_hydrating(true); return; } } branches.ensure(component, component && ((target) => render_fn(target, component))); }, EFFECT_TRANSPARENT); } // node_modules/svelte/src/internal/client/timing.js /** @import { Raf } from '#client' */ var now = () => Date.now(); /** @type {Raf} */ var raf = { tick: /** @param {any} _ */ (_) => noop(_), now: () => now(), tasks: /* @__PURE__ */ new Set() }; // node_modules/svelte/src/internal/client/loop.js /** @import { TaskCallback, Task, TaskEntry } from '#client' */ /** * @returns {void} */ function run_tasks() { const now = raf.now(); raf.tasks.forEach((task) => { if (!task.c(now)) { raf.tasks.delete(task); task.f(); } }); if (raf.tasks.size !== 0) raf.tick(run_tasks); } /** * Creates a new task that runs on each raf frame * until it returns a falsy value or is aborted * @param {TaskCallback} callback * @returns {Task} */ function loop(callback) { /** @type {TaskEntry} */ let task; if (raf.tasks.size === 0) raf.tick(run_tasks); return { promise: new Promise((fulfill) => { raf.tasks.add(task = { c: callback, f: fulfill }); }), abort() { raf.tasks.delete(task); } }; } // node_modules/svelte/src/internal/client/dom/elements/transitions.js /** @import { AnimateFn, Animation, AnimationConfig, EachItem, Effect, EffectNodes, TransitionFn, TransitionManager } from '#client' */ /** * @param {Element} element * @param {'introstart' | 'introend' | 'outrostart' | 'outroend'} type * @returns {void} */ function dispatch_event(element, type) { without_reactive_context(() => { element.dispatchEvent(new CustomEvent(type)); }); } /** * Converts a property to the camel-case format expected by Element.animate(), KeyframeEffect(), and KeyframeEffect.setKeyframes(). * @param {string} style * @returns {string} */ function css_property_to_camelcase(style) { if (style === "float") return "cssFloat"; if (style === "offset") return "cssOffset"; if (style.startsWith("--")) return style; const parts = style.split("-"); if (parts.length === 1) return parts[0]; return parts[0] + parts.slice(1).map( /** @param {any} word */ (word) => word[0].toUpperCase() + word.slice(1) ).join(""); } /** * @param {string} css * @returns {Keyframe} */ function css_to_keyframe(css) { /** @type {Keyframe} */ const keyframe = {}; const parts = css.split(";"); for (const part of parts) { const [property, value] = part.split(":"); if (!property || value === void 0) break; const formatted_property = css_property_to_camelcase(property.trim()); keyframe[formatted_property] = value.trim(); } return keyframe; } /** @param {number} t */ var linear = (t) => t; /** @type {Effect | null} */ var animation_effect_override = null; /** @param {Effect | null} v */ function set_animation_effect_override(v) { animation_effect_override = v; } /** * Called inside keyed `{#each ...}` blocks (as `$.animation(...)`). This creates an animation manager * and attaches it to the block, so that moves can be animated following reconciliation. * @template P * @param {Element} element * @param {() => AnimateFn

} get_fn * @param {(() => P) | null} get_params */ function animation(element, get_fn, get_params) { var nodes = (animation_effect_override ?? active_effect).nodes; /** @type {DOMRect} */ var from; /** @type {DOMRect} */ var to; /** @type {Animation | undefined} */ var animation; /** @type {null | { position: string, width: string, height: string, transform: string }} */ var original_styles = null; nodes.a ??= { element, measure() { from = this.element.getBoundingClientRect(); }, apply() { animation?.abort(); to = this.element.getBoundingClientRect(); if (from.left !== to.left || from.right !== to.right || from.top !== to.top || from.bottom !== to.bottom) { const options = get_fn()(this.element, { from, to }, get_params?.()); animation = animate(this.element, options, void 0, 1, () => {}, () => { animation?.abort(); animation = void 0; }); } }, fix() { if (element.getAnimations().length) return; var { position, width, height } = getComputedStyle(element); if (position !== "absolute" && position !== "fixed") { var style = element.style; original_styles = { position: style.position, width: style.width, height: style.height, transform: style.transform }; style.position = "absolute"; style.width = width; style.height = height; var to = element.getBoundingClientRect(); if (from.left !== to.left || from.top !== to.top) { var transform = `translate(${from.left - to.left}px, ${from.top - to.top}px)`; style.transform = style.transform ? `${style.transform} ${transform}` : transform; } } }, unfix() { if (original_styles) { var style = element.style; style.position = original_styles.position; style.width = original_styles.width; style.height = original_styles.height; style.transform = original_styles.transform; } } }; nodes.a.element = element; } /** * Called inside block effects as `$.transition(...)`. This creates a transition manager and * attaches it to the current effect — later, inside `pause_effect` and `resume_effect`, we * use this to create `intro` and `outro` transitions. * @template P * @param {number} flags * @param {HTMLElement} element * @param {() => TransitionFn

} get_fn * @param {(() => P) | null} get_params * @returns {void} */ function transition(flags, element, get_fn, get_params) { var is_intro = (flags & 1) !== 0; var is_outro = (flags & 2) !== 0; var is_both = is_intro && is_outro; var is_global = (flags & 4) !== 0; /** @type {'in' | 'out' | 'both'} */ var direction = is_both ? "both" : is_intro ? "in" : "out"; /** @type {AnimationConfig | ((opts: { direction: 'in' | 'out' }) => AnimationConfig) | undefined} */ var current_options; var inert = element.inert; /** * The default overflow style, stashed so we can revert changes during the transition * that are necessary to work around a Safari <18 bug * TODO 6.0 remove this, if older versions of Safari have died out enough */ var overflow = element.style.overflow; /** @type {Animation | undefined} */ var intro; /** @type {Animation | undefined} */ var outro; function get_options() { return without_reactive_context(() => { return current_options ??= get_fn()(element, get_params?.() ?? {}, { direction }); }); } /** @type {TransitionManager} */ var transition = { is_global, in() { element.inert = inert; if (!is_intro) { outro?.abort(); outro?.reset?.(); return; } if (!is_outro) intro?.abort(); intro = animate(element, get_options(), outro, 1, () => { dispatch_event(element, "introstart"); }, () => { dispatch_event(element, "introend"); intro?.abort(); intro = current_options = void 0; element.style.overflow = overflow; }); }, out(fn) { if (!is_outro) { fn?.(); current_options = void 0; return; } element.inert = true; outro = animate(element, get_options(), intro, 0, () => { dispatch_event(element, "outrostart"); }, () => { dispatch_event(element, "outroend"); fn?.(); }); }, stop: () => { intro?.abort(); outro?.abort(); } }; var e = active_effect; (e.nodes.t ??= []).push(transition); if (is_intro && should_intro) { var run = is_global; if (!run) { var block = e.parent; while (block && (block.f & 65536) !== 0) while (block = block.parent) if ((block.f & 16) !== 0) break; run = !block || (block.f & 32768) !== 0; } if (run) effect(() => { untrack(() => transition.in()); }); } } /** * Animates an element, according to the provided configuration * @param {Element} element * @param {AnimationConfig | ((opts: { direction: 'in' | 'out' }) => AnimationConfig)} options * @param {Animation | undefined} counterpart The corresponding intro/outro to this outro/intro * @param {number} t2 The target `t` value — `1` for intro, `0` for outro * @param {(() => void)} on_begin Called just before beginning the animation * @param {(() => void)} on_finish Called after successfully completing the animation * @returns {Animation} */ function animate(element, options, counterpart, t2, on_begin, on_finish) { var is_intro = t2 === 1; var aborted = false; if (is_function(options)) { /** @type {Animation} */ var a; queue_micro_task(() => { if (aborted) return; a = animate(element, options({ direction: is_intro ? "in" : "out" }), counterpart, t2, on_begin, on_finish); }); return { abort: () => { aborted = true; a?.abort(); }, deactivate: () => a?.deactivate(), reset: () => a?.reset(), t: () => a?.t() ?? 1 - t2 }; } counterpart?.deactivate(); if (!options?.duration && !options?.delay) { on_begin(); on_finish(); return { abort: noop, deactivate: noop, reset: noop, t: () => t2 }; } const { delay = 0, css, tick, easing = linear } = options; /** @type {globalThis.Animation} */ var animation; var get_t = () => 1 - t2; queue_micro_task(() => { if (aborted) return; var keyframes = []; if (is_intro && counterpart === void 0) { if (tick) tick(0, 1); if (css) { var styles = css_to_keyframe(css(0, 1)); keyframes.push(styles, styles); } } animation = element.animate(keyframes, { duration: delay, fill: "forwards" }); animation.onfinish = () => { animation.cancel(); on_begin(); var t1 = counterpart?.t() ?? 1 - t2; counterpart?.abort(); var delta = t2 - t1; var duration = options.duration * Math.abs(delta); var keyframes = []; if (duration > 0) { /** * Whether or not the CSS includes `overflow: hidden`, in which case we need to * add it as an inline style to work around a Safari <18 bug * TODO 6.0 remove this, if possible */ var needs_overflow_hidden = false; if (css) { var n = Math.ceil(duration / (1e3 / 60)); for (var i = 0; i <= n; i += 1) { var t = t1 + delta * easing(i / n); var styles = css_to_keyframe(css(t, 1 - t)); keyframes.push(styles); needs_overflow_hidden ||= styles.overflow === "hidden"; } } if (needs_overflow_hidden) /** @type {HTMLElement} */ element.style.overflow = "hidden"; get_t = () => { var time = animation.currentTime; return t1 + delta * easing(time / duration); }; if (tick) loop(() => { if (animation.playState !== "running") return false; var t = get_t(); tick(t, 1 - t); return true; }); } animation = element.animate(keyframes, { duration, fill: "forwards" }); animation.onfinish = () => { get_t = () => t2; tick?.(t2, 1 - t2); on_finish(); }; }; }); return { abort: () => { aborted = true; if (animation) { animation.cancel(); animation.effect = null; animation.onfinish = noop; } }, deactivate: () => { on_finish = noop; }, reset: () => { if (t2 === 0) tick?.(1, 0); }, t: () => get_t() }; } // node_modules/svelte/src/internal/client/dom/blocks/svelte-element.js /** @import { Effect, EffectNodes, TemplateNode } from '#client' */ /** * @param {Comment | Element} node * @param {() => string} get_tag * @param {boolean} is_svg * @param {undefined | ((element: Element, anchor: Node | null) => void)} render_fn, * @param {undefined | (() => string)} get_namespace * @param {undefined | [number, number]} location * @returns {void} */ function element(node, get_tag, is_svg, render_fn, get_namespace, location) { let was_hydrating = hydrating; if (hydrating) hydrate_next(); var filename = location && component_context?.function[FILENAME]; /** @type {null | Element} */ var element = null; if (hydrating && hydrate_node.nodeType === 1) { element = hydrate_node; hydrate_next(); } var anchor = hydrating ? hydrate_node : node; /** * We track this so we can set it when changing the element, allowing any * `animate:` directive to bind itself to the correct block */ var parent_effect = active_effect; var branches = new BranchManager(anchor, false); block(() => { const next_tag = get_tag() || null; var ns = get_namespace ? get_namespace() : is_svg || next_tag === "svg" ? NAMESPACE_SVG : void 0; if (next_tag === null) { branches.ensure(null, null); set_should_intro(true); return; } branches.ensure(next_tag, (anchor) => { if (next_tag) { var is_hydrating = hydrating; element = hydrating ? element : create_element(next_tag, ns); if (location) element.__svelte_meta = { parent: dev_stack, loc: { file: filename, line: location[0], column: location[1] } }; assign_nodes(element, element); if (render_fn) { var tmp_comment = null; if (hydrating && is_raw_text_element(next_tag)) element.append(tmp_comment = document.createComment("")); var child_anchor = hydrating ? /* @__PURE__ */ get_first_child(element) : element.appendChild(create_text()); if (hydrating) { if (child_anchor === null) set_hydrating(false); else set_hydrate_node(child_anchor); } set_animation_effect_override(parent_effect); render_fn(element, child_anchor); tmp_comment?.remove(); set_animation_effect_override(null); } /** @type {Effect & { nodes: EffectNodes }} */ active_effect.nodes.end = element; if (!is_hydrating) anchor.before(element); } if (hydrating) set_hydrate_node(anchor); }); set_should_intro(true); return () => { if (next_tag) set_should_intro(false); }; }, EFFECT_TRANSPARENT); teardown(() => { set_should_intro(true); }); if (was_hydrating) { set_hydrating(true); set_hydrate_node(anchor); } } // node_modules/svelte/src/internal/client/dom/blocks/svelte-head.js /** @import { TemplateNode } from '#client' */ /** * @param {string} hash * @param {(anchor: Node) => void} render_fn * @returns {void} */ function head(hash, render_fn) { let previous_hydrate_node = null; let was_hydrating = hydrating; /** @type {Comment | Text} */ var anchor; if (hydrating) { previous_hydrate_node = hydrate_node; var head_anchor = /* @__PURE__ */ get_first_child(document.head); while (head_anchor !== null && (head_anchor.nodeType !== 8 || head_anchor.data !== hash)) head_anchor = /* @__PURE__ */ get_next_sibling(head_anchor); if (head_anchor === null) set_hydrating(false); else { var start = /* @__PURE__ */ get_next_sibling(head_anchor); head_anchor.remove(); set_hydrate_node(start); } } if (!hydrating) anchor = document.head.appendChild(create_text()); try { block(() => { var e = branch(() => render_fn(anchor)); e.f |= HEAD_EFFECT; if (!hydrating) { if (e.nodes === null) e.nodes = { start: anchor, end: anchor, a: null, t: null }; else e.nodes.end = anchor; } }); } finally { if (was_hydrating) { set_hydrating(true); set_hydrate_node(previous_hydrate_node); } } } // node_modules/svelte/src/internal/client/dom/css.js /** * @param {Node} anchor * @param {{ hash: string, code: string }} css */ function append_styles(anchor, css) { effect(() => { anchor = active_effect?.parent?.nodes?.start ?? anchor; var root = anchor.getRootNode(); var target = root.host ? root : /** @type {Document} */ root.head ?? root.ownerDocument.head; if (!target.querySelector("#" + css.hash)) { const style = create_element("style"); style.id = css.hash; style.textContent = css.code; target.appendChild(style); register_style(css.hash, style); } }); } // node_modules/svelte/src/internal/client/dom/elements/actions.js /** @import { ActionPayload } from '#client' */ /** * @template P * @param {Element} dom * @param {(dom: Element, value?: P) => ActionPayload

} action * @param {() => P} [get_value] * @returns {void} */ function action(dom, action, get_value) { effect(() => { var payload = untrack(() => action(dom, get_value?.()) || {}); if (get_value && payload?.update) { var inited = false; /** @type {P} */ var prev = {}; render_effect(() => { var value = get_value(); deep_read_state(value); if (inited && safe_not_equal(prev, value)) { prev = value; /** @type {Function} */ payload.update(value); } }); inited = true; } if (payload?.destroy) return () => payload.destroy(); }); } // node_modules/svelte/src/internal/client/dom/elements/attachments.js /** @import { Effect } from '#client' */ /** * @param {Element} node * @param {() => (node: Element) => void} get_fn */ function attach(node, get_fn) { /** @type {false | undefined | ((node: Element) => void)} */ var fn = void 0; /** @type {Effect | null} */ var e; managed(() => { if (fn !== (fn = get_fn())) { if (e) { destroy_effect(e); e = null; } if (fn) e = branch(() => { effect(() => fn(node)); }); } }); } // node_modules/svelte/src/internal/client/dom/elements/class.js /** * @param {Element} dom * @param {boolean | number} is_html * @param {string | null} value * @param {string} [hash] * @param {Record} [prev_classes] * @param {Record} [next_classes] * @returns {Record | undefined} */ function set_class(dom, is_html, value, hash, prev_classes, next_classes) { var prev = dom[CLASS_CACHE]; if (hydrating || prev !== value || prev === void 0) { var next_class_name = to_class(value, hash, next_classes); if (!hydrating || next_class_name !== dom.getAttribute("class")) { if (next_class_name == null) dom.removeAttribute("class"); else if (is_html) dom.className = next_class_name; else dom.setAttribute("class", next_class_name); } /** @type {any} */ dom[CLASS_CACHE] = value; } else if (next_classes && prev_classes !== next_classes) for (var key in next_classes) { var is_present = !!next_classes[key]; if (prev_classes == null || is_present !== !!prev_classes[key]) dom.classList.toggle(key, is_present); } return next_classes; } // node_modules/svelte/src/internal/client/dom/elements/style.js /** * @param {Element & ElementCSSInlineStyle} dom * @param {Record} prev * @param {Record} next * @param {string} [priority] */ function update_styles(dom, prev = {}, next, priority) { for (var key in next) { var value = next[key]; if (prev[key] !== value) { if (next[key] == null) dom.style.removeProperty(key); else dom.style.setProperty(key, value, priority); } } } /** * @param {Element & ElementCSSInlineStyle} dom * @param {string | null} value * @param {Record | [Record, Record]} [prev_styles] * @param {Record | [Record, Record]} [next_styles] */ function set_style(dom, value, prev_styles, next_styles) { var prev = dom[STYLE_CACHE]; if (hydrating || prev !== value) { var next_style_attr = to_style(value, next_styles); if (!hydrating || next_style_attr !== dom.getAttribute("style")) { if (next_style_attr == null) dom.removeAttribute("style"); else dom.style.cssText = next_style_attr; } /** @type {any} */ dom[STYLE_CACHE] = value; } else if (next_styles) { if (Array.isArray(next_styles)) { update_styles(dom, prev_styles?.[0], next_styles[0]); update_styles(dom, prev_styles?.[1], next_styles[1], "important"); } else update_styles(dom, prev_styles, next_styles); } return next_styles; } // node_modules/svelte/src/internal/client/dom/elements/bindings/select.js /** * Sets the `selected` attribute on an option so form reset can restore it. * @param {HTMLOptionElement} option * @param {boolean} selected */ function set_selected(option, selected) { if (selected) { if (!option.hasAttribute("selected")) option.setAttribute("selected", ""); } else option.removeAttribute("selected"); } /** * Sets the options a form reset should restore. The first call selects * them if nothing has set a value, later calls leave the current selection alone. * @param {HTMLSelectElement} select * @param {any} value */ function set_default_select_value(select, value) { var mounting = !("__defaultValue" in select); if (!mounting && select.__defaultValue === value) return; select.__defaultValue = value; apply_default_select_value(select, !mounting || "__value" in select); } /** * Marks the options matching `__defaultValue` as selected. Without `preserve` * a newly matching option gets selected, as an inserted `