diff --git a/build/app.css b/build/app.css index fbd582d..1346fe0 100644 --- a/build/app.css +++ b/build/app.css @@ -1,248 +1 @@ -/* fakecss:/home/runner/work/county/county/src/lib/components/DateForm.esbuild-svelte-fake-css */ -form.svelte-1ajygs9 { - max-width: 15em; - margin: auto; -} -fieldset.svelte-1ajygs9 { - margin: 0; - padding: 0; - display: flex; - flex-flow: column nowrap; - border: 0; -} -#add fieldset.svelte-1ajygs9 { - gap: 1em; -} -input.svelte-1ajygs9 { - font-family: inherit; - font-size: 1.5em; - font-weight: bold; - font-family: inherit; - line-height: 2em; - text-align: center; - margin: 0; - outline: 0; - width: 100%; - background: transparent; - border: 2px solid currentColor; - border-radius: 0.25rem; - color: inherit; - margin: auto; -} -input[type=date].svelte-1ajygs9::-webkit-datetime-edit { - flex: 1; -} -input.clear.svelte-1ajygs9 { - border-color: transparent; -} -form.svelte-1ajygs9 button:where(.svelte-1ajygs9) { - min-width: 100%; -} - -/* fakecss:/home/runner/work/county/county/src/lib/components/Icon.esbuild-svelte-fake-css */ -svg.svelte-e5fszy { - flex: 0 0 var(--icon-size); -} -.spin.svelte-e5fszy { - animation: svelte-e5fszy-spin 0.75s linear infinite; -} -.bordered.svelte-e5fszy { - box-shadow: 0 0 0 1px var(--color-border); - border-radius: 4px; -} -@keyframes svelte-e5fszy-spin { - to { - transform: rotate(360deg); - } -} - -/* fakecss:/home/runner/work/county/county/src/lib/components/Control.esbuild-svelte-fake-css */ -button.svelte-11jjohb { - background: transparent; -} -button.svelte-11jjohb:hover { - background-color: #f2f2f250; -} -button.svelte-11jjohb:hover:active { - background-color: #f2f2f200; -} - -/* fakecss:/home/runner/work/county/county/src/lib/components/Button.esbuild-svelte-fake-css */ -button.svelte-1wl0gbz { - padding: 0; -} -button.clear.svelte-1wl0gbz { - background: transparent; - font-family: inherit; - font-weight: inherit; -} - -/* fakecss:/home/runner/work/county/county/src/lib/components/County.esbuild-svelte-fake-css */ -li.svelte-1ntyu6w { - position: relative; -} -li.svelte-1ntyu6w::after { - content: attr(id); - font-size: 20%; - font-weight: normal; - position: absolute; - inset: 0; - top: 90%; -} - -/* fakecss:/home/runner/work/county/county/src/lib/components/Counter.esbuild-svelte-fake-css */ -ul.svelte-bj2ksd { - list-style: none; - padding: 0; - margin: 0; - font-size: calc(100vw / var(--county-length, 5) + 1em); - font-weight: bold; - display: flex; - justify-content: center; - gap: 0.25em; - margin-bottom: 0.5em; -} - -/* fakecss:/home/runner/work/county/county/src/lib/components/Quote.esbuild-svelte-fake-css */ -blockquote.svelte-18lskcb { - font-size: large; - margin: 0; -} -blockquote.svelte-18lskcb p:where(.svelte-18lskcb) { - font-style: italic; - margin: 1em; -} - -/* src/css/theme.css */ -:root { - --dark: #1c1b22; - --light: #f2f2f2; - --back: #e9e9ed; - --hover: #d0d0d7; - --active: #b1b1b9; -} -@media (prefers-color-scheme: dark) { - :root { - color-scheme: dark; - --light: #1c1b22; - --dark: #f2f2f2; - --back: #2b2a33; - --hover: #52525e; - --active: #5b5b66; - } -} -:root { - color-scheme: dark; - --light: #1c1b22; - --dark: #f2f2f2; - --back: #2b2a33; - --hover: #52525e; - --active: #5b5b66; -} - -/* src/css/base.css */ -html { - height: 100vh; - font-family: system-ui; -} -html::before { - content: ""; - background: rgba(0, 0, 0, 0.27); - position: fixed; - z-index: -1; - inset: 0; -} -html::after { - content: attr(title); - position: fixed; - inset: 0; - bottom: 0; - top: auto; - font-size: 0.8rem; - font-weight: 300; - font-family: inherit; - text-align: center; - opacity: 0.69; -} -body { - margin: 0; - display: grid; - grid-template-rows: 1fr 4.5rem; - grid-template-columns: 1fr; - text-align: center; - overflow: hidden; - height: 100%; -} -header, -footer { - display: flex; - align-items: center; - justify-content: space-between; - padding: 1rem; -} -header > * { - margin: 0; -} -button { - text-align: inherit; - color: inherit; - background-color: var(--back); - padding: 0.45rem 1rem; - margin: 0; - border: 0; - border-radius: 0.25rem; - font-size: inherit; - user-select: none; - -webkit-user-select: none; - cursor: pointer; -} -button:hover { - background-color: var(--hover); -} -button:hover:active { - background-color: var(--active); -} -button.box { - aspect-ratio: 1/1; - align-items: center; - display: flex; -} -a { - color: inherit; -} -* { - box-sizing: border-box; -} - -/* src/app.css */ - -/* fakecss:/home/runner/work/county/county/src/App.esbuild-svelte-fake-css */ -header.svelte-h7pve0 { - justify-content: center; - padding: 0; -} -main.svelte-h7pve0 { - display: flex; - max-width: 100vw; - overflow: scroll; - scroll-snap-type: x mandatory; - -ms-overflow-style: none; - scrollbar-width: none; -} -main.svelte-h7pve0::-webkit-scrollbar { - display: none; -} -main.svelte-h7pve0 > :where(.svelte-h7pve0) { - flex: 1 0 100%; - scroll-snap-align: center; - align-content: center; -} -section#add.svelte-h7pve0 { - align-content: center; -} -footer.svelte-h7pve0 { - justify-content: center; -} -footer.active.svelte-h7pve0 { - justify-content: space-between; -} +form.svelte-1ajygs9{max-width:15em;margin:auto}fieldset.svelte-1ajygs9{margin:0;padding:0;display:flex;flex-flow:column nowrap;border:0}#add fieldset.svelte-1ajygs9{gap:1em}input.svelte-1ajygs9{font-size:1.5em;font-weight:700;font-family:inherit;line-height:2em;text-align:center;outline:0;width:100%;background:transparent;border:2px solid currentColor;border-radius:.25rem;color:inherit;margin:auto}input[type=date].svelte-1ajygs9::-webkit-datetime-edit{flex:1}input.clear.svelte-1ajygs9{border-color:transparent}form.svelte-1ajygs9 button:where(.svelte-1ajygs9){min-width:100%}svg.svelte-e5fszy{flex:0 0 var(--icon-size)}.spin.svelte-e5fszy{animation:svelte-e5fszy-spin .75s linear infinite}.bordered.svelte-e5fszy{box-shadow:0 0 0 1px var(--color-border);border-radius:4px}@keyframes svelte-e5fszy-spin{to{transform:rotate(360deg)}}button.svelte-11jjohb{background:transparent}button.svelte-11jjohb:hover{background-color:#f2f2f250}button.svelte-11jjohb:hover:active{background-color:#f2f2f200}button.svelte-1wl0gbz{padding:0}button.clear.svelte-1wl0gbz{background:transparent;font-family:inherit;font-weight:inherit}li.svelte-1ntyu6w{position:relative}li.svelte-1ntyu6w:after{content:attr(id);font-size:20%;font-weight:400;position:absolute;inset:90% 0 0}ul.svelte-bj2ksd{list-style:none;padding:0;margin:0 0 .5em;font-size:calc(100vw / var(--county-length, 5) + 1em);font-weight:700;display:flex;justify-content:center;gap:.25em}blockquote.svelte-18lskcb{font-size:large;margin:0}blockquote.svelte-18lskcb p:where(.svelte-18lskcb){font-style:italic;margin:1em}:root{--dark: #1c1b22;--light: #f2f2f2;--back: #e9e9ed;--hover: #d0d0d7;--active: #b1b1b9}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--light: #1c1b22;--dark: #f2f2f2;--back: #2b2a33;--hover: #52525e;--active: #5b5b66}}:root{color-scheme:dark;--light: #1c1b22;--dark: #f2f2f2;--back: #2b2a33;--hover: #52525e;--active: #5b5b66}html{height:100vh;font-family:system-ui}html:before{content:"";background:#00000045;position:fixed;z-index:-1;inset:0}html:after{content:attr(title);position:fixed;inset:auto 0 0;font-size:.8rem;font-weight:300;font-family:inherit;text-align:center;opacity:.69}body{margin:0;display:grid;grid-template-rows:1fr 4.5rem;grid-template-columns:1fr;text-align:center;overflow:hidden;height:100%}header,footer{display:flex;align-items:center;justify-content:space-between;padding:1rem}header>*{margin:0}button{text-align:inherit;color:inherit;background-color:var(--back);padding:.45rem 1rem;margin:0;border:0;border-radius:.25rem;font-size:inherit;user-select:none;-webkit-user-select:none;cursor:pointer}button:hover{background-color:var(--hover)}button:hover:active{background-color:var(--active)}button.box{aspect-ratio:1/1;align-items:center;display:flex}a{color:inherit}*{box-sizing:border-box}header.svelte-h7pve0{justify-content:center;padding:0}main.svelte-h7pve0{display:flex;max-width:100vw;overflow:scroll;scroll-snap-type:x mandatory;-ms-overflow-style:none;scrollbar-width:none}main.svelte-h7pve0::-webkit-scrollbar{display:none}main.svelte-h7pve0>:where(.svelte-h7pve0){flex:1 0 100%;scroll-snap-align:center;align-content:center}section#add.svelte-h7pve0{align-content:center}footer.svelte-h7pve0{justify-content:center}footer.active.svelte-h7pve0{justify-content:space-between} diff --git a/build/app.js b/build/app.js index 14788e2..846f51a 100644 --- a/build/app.js +++ b/build/app.js @@ -1,11181 +1,15 @@ -// package.json -var name = "county"; - -// node_modules/esm-env/browser.js -var BROWSER = true; -var DEV = false; - -// node_modules/svelte/src/internal/shared/utils.js -var is_array = Array.isArray; -var array_from = Array.from; -var object_keys = Object.keys; -var define_property = Object.defineProperty; -var get_descriptor = Object.getOwnPropertyDescriptor; -var get_descriptors = Object.getOwnPropertyDescriptors; -var object_prototype = Object.prototype; -var array_prototype = Array.prototype; -var get_prototype_of = Object.getPrototypeOf; -function is_function(thing) { - return typeof thing === "function"; -} -var noop = () => { -}; -function is_promise(value) { - return typeof value?.then === "function"; -} -function run_all(arr) { - for (var i = 0; i < arr.length; i++) { - arr[i](); - } -} - -// node_modules/svelte/src/internal/client/constants.js -var DERIVED = 1 << 1; -var EFFECT = 1 << 2; -var RENDER_EFFECT = 1 << 3; -var BLOCK_EFFECT = 1 << 4; -var BRANCH_EFFECT = 1 << 5; -var ROOT_EFFECT = 1 << 6; -var UNOWNED = 1 << 7; -var DISCONNECTED = 1 << 8; -var CLEAN = 1 << 9; -var DIRTY = 1 << 10; -var MAYBE_DIRTY = 1 << 11; -var INERT = 1 << 12; -var DESTROYED = 1 << 13; -var EFFECT_RAN = 1 << 14; -var EFFECT_TRANSPARENT = 1 << 15; -var LEGACY_DERIVED_PROP = 1 << 16; -var INSPECT_EFFECT = 1 << 17; -var HEAD_EFFECT = 1 << 18; -var EFFECT_HAS_DERIVED = 1 << 19; -var STATE_SYMBOL = Symbol("$state"); -var STATE_SYMBOL_METADATA = Symbol("$state metadata"); -var LOADING_ATTR_SYMBOL = Symbol(""); - -// node_modules/svelte/src/internal/client/reactivity/equality.js -function equals(value) { - return value === this.v; -} -function safe_not_equal(a, b) { - return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function"; -} -function safe_equals(value) { - return !safe_not_equal(value, this.v); -} - -// node_modules/svelte/src/internal/client/errors.js -function derived_references_self() { - if (DEV) { - const error = new Error(`derived_references_self -A derived value cannot reference itself recursively`); - error.name = "Svelte error"; - throw error; - } else { - throw new Error("derived_references_self"); - } -} -function effect_update_depth_exceeded() { - if (DEV) { - const error = new Error(`effect_update_depth_exceeded -Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops`); - error.name = "Svelte error"; - throw error; - } else { - throw new Error("effect_update_depth_exceeded"); - } -} -function hydration_failed() { - if (DEV) { - const error = new Error(`hydration_failed -Failed to hydrate the application`); - error.name = "Svelte error"; - throw error; - } else { - throw new Error("hydration_failed"); - } -} -function invalid_snippet() { - if (DEV) { - const error = new Error(`invalid_snippet -Could not \`{@render}\` snippet due to the expression being \`null\` or \`undefined\`. Consider using optional chaining \`{@render snippet?.()}\``); - error.name = "Svelte error"; - throw error; - } else { - throw new Error("invalid_snippet"); - } -} -function props_invalid_value(key) { - if (DEV) { - const error = new Error(`props_invalid_value -Cannot do \`bind:${key}={undefined}\` when \`${key}\` has a fallback value`); - error.name = "Svelte error"; - throw error; - } else { - throw new Error("props_invalid_value"); - } -} -function rune_outside_svelte(rune) { - if (DEV) { - const error = new Error(`rune_outside_svelte -The \`${rune}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files`); - error.name = "Svelte error"; - throw error; - } else { - throw new Error("rune_outside_svelte"); - } -} -function state_descriptors_fixed() { - if (DEV) { - const error = new Error(`state_descriptors_fixed -Property descriptors defined on \`$state\` objects must contain \`value\` and always be \`enumerable\`, \`configurable\` and \`writable\`.`); - error.name = "Svelte error"; - throw error; - } else { - throw new Error("state_descriptors_fixed"); - } -} -function state_prototype_fixed() { - if (DEV) { - const error = new Error(`state_prototype_fixed -Cannot set prototype of \`$state\` object`); - error.name = "Svelte error"; - throw error; - } else { - throw new Error("state_prototype_fixed"); - } -} -function state_unsafe_local_read() { - if (DEV) { - const error = new Error(`state_unsafe_local_read -Reading state that was created inside the same derived is forbidden. Consider using \`untrack\` to read locally created state`); - error.name = "Svelte error"; - throw error; - } else { - throw new Error("state_unsafe_local_read"); - } -} -function state_unsafe_mutation() { - if (DEV) { - const error = new Error(`state_unsafe_mutation -Updating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without \`$state\``); - error.name = "Svelte error"; - throw error; - } else { - throw new Error("state_unsafe_mutation"); - } -} - -// node_modules/svelte/src/internal/flags/index.js -var legacy_mode_flag = false; - -// node_modules/svelte/src/internal/client/reactivity/sources.js -var inspect_effects = /* @__PURE__ */ new Set(); -function set_inspect_effects(v) { - inspect_effects = v; -} -function source(v) { - return { - f: 0, - // TODO ideally we could skip this altogether, but it causes type errors - v, - reactions: null, - equals, - version: 0 - }; -} -function state(v) { - return /* @__PURE__ */ push_derived_source(source(v)); -} -// @__NO_SIDE_EFFECTS__ -function mutable_source(initial_value, immutable = false) { - const s2 = source(initial_value); - if (!immutable) { - s2.equals = safe_equals; - } - if (legacy_mode_flag && component_context !== null && component_context.l !== null) { - (component_context.l.s ??= []).push(s2); - } - return s2; -} -// @__NO_SIDE_EFFECTS__ -function push_derived_source(source2) { - if (active_reaction !== null && (active_reaction.f & DERIVED) !== 0) { - if (derived_sources === null) { - set_derived_sources([source2]); - } else { - derived_sources.push(source2); - } - } - return source2; -} -function set(source2, value) { - if (active_reaction !== null && is_runes() && (active_reaction.f & (DERIVED | BLOCK_EFFECT)) !== 0 && // If the source was created locally within the current derived, then - // we allow the mutation. - (derived_sources === null || !derived_sources.includes(source2))) { - state_unsafe_mutation(); - } - return internal_set(source2, value); -} -function internal_set(source2, value) { - if (!source2.equals(value)) { - source2.v = value; - source2.version = increment_version(); - mark_reactions(source2, DIRTY); - if (is_runes() && active_effect !== null && (active_effect.f & CLEAN) !== 0 && (active_effect.f & BRANCH_EFFECT) === 0) { - if (new_deps !== null && new_deps.includes(source2)) { - set_signal_status(active_effect, DIRTY); - schedule_effect(active_effect); - } else { - if (untracked_writes === null) { - set_untracked_writes([source2]); - } else { - untracked_writes.push(source2); - } - } - } - if (DEV && inspect_effects.size > 0) { - const inspects = Array.from(inspect_effects); - var previously_flushing_effect = is_flushing_effect; - set_is_flushing_effect(true); - try { - for (const effect2 of inspects) { - if ((effect2.f & CLEAN) !== 0) { - set_signal_status(effect2, MAYBE_DIRTY); - } - if (check_dirtiness(effect2)) { - update_effect(effect2); - } - } - } finally { - set_is_flushing_effect(previously_flushing_effect); - } - inspect_effects.clear(); - } - } - return value; -} -function mark_reactions(signal, status) { - var reactions = signal.reactions; - if (reactions === null) return; - var runes = is_runes(); - var length = reactions.length; - for (var i = 0; i < length; i++) { - var reaction = reactions[i]; - var flags = reaction.f; - if ((flags & DIRTY) !== 0) continue; - if (!runes && reaction === active_effect) continue; - if (DEV && (flags & INSPECT_EFFECT) !== 0) { - inspect_effects.add(reaction); - continue; - } - set_signal_status(reaction, status); - if ((flags & (CLEAN | UNOWNED)) !== 0) { - if ((flags & DERIVED) !== 0) { - mark_reactions( - /** @type {Derived} */ - reaction, - MAYBE_DIRTY - ); - } else { - schedule_effect( - /** @type {Effect} */ - reaction - ); - } - } - } -} - -// node_modules/svelte/src/constants.js -var EACH_ITEM_REACTIVE = 1; -var EACH_INDEX_REACTIVE = 1 << 1; -var EACH_IS_CONTROLLED = 1 << 2; -var EACH_IS_ANIMATED = 1 << 3; -var EACH_ITEM_IMMUTABLE = 1 << 4; -var PROPS_IS_IMMUTABLE = 1; -var PROPS_IS_RUNES = 1 << 1; -var PROPS_IS_UPDATED = 1 << 2; -var PROPS_IS_BINDABLE = 1 << 3; -var PROPS_IS_LAZY_INITIAL = 1 << 4; -var TRANSITION_IN = 1; -var TRANSITION_OUT = 1 << 1; -var TRANSITION_GLOBAL = 1 << 2; -var TEMPLATE_FRAGMENT = 1; -var TEMPLATE_USE_IMPORT_NODE = 1 << 1; -var HYDRATION_START = "["; -var HYDRATION_START_ELSE = "[!"; -var HYDRATION_END = "]"; -var HYDRATION_ERROR = {}; -var ELEMENT_PRESERVE_ATTRIBUTE_CASE = 1 << 1; -var UNINITIALIZED = Symbol(); -var FILENAME = Symbol("filename"); -var HMR = Symbol("hmr"); - -// node_modules/svelte/src/internal/client/warnings.js -var bold = "font-weight: bold"; -var normal = "font-weight: normal"; -function hydration_attribute_changed(attribute, html2, value) { - if (DEV) { - console.warn(`%c[svelte] hydration_attribute_changed -%cThe \`${attribute}\` attribute on \`${html2}\` changed its value between server and client renders. The client value, \`${value}\`, will be ignored in favour of the server value`, bold, normal); - } else { - console.warn("hydration_attribute_changed"); - } -} -function hydration_mismatch(location) { - if (DEV) { - console.warn(`%c[svelte] hydration_mismatch -%c${location ? `Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${location}` : "Hydration failed because the initial UI does not match what was rendered on the server"}`, bold, normal); - } else { - console.warn("hydration_mismatch"); - } -} -function lifecycle_double_unmount() { - if (DEV) { - console.warn(`%c[svelte] lifecycle_double_unmount -%cTried to unmount a component that was not mounted`, bold, normal); - } else { - console.warn("lifecycle_double_unmount"); - } -} -function ownership_invalid_mutation(component2, owner) { - if (DEV) { - console.warn(`%c[svelte] ownership_invalid_mutation -%c${component2 ? `${component2} mutated a value owned by ${owner}. This is strongly discouraged. Consider passing values to child components with \`bind:\`, or use a callback instead` : "Mutating a value outside the component that created it is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead"}`, bold, normal); - } else { - console.warn("ownership_invalid_mutation"); - } -} -function state_proxy_equality_mismatch(operator) { - if (DEV) { - console.warn(`%c[svelte] state_proxy_equality_mismatch -%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${operator}\` will produce unexpected results`, bold, normal); - } else { - console.warn("state_proxy_equality_mismatch"); - } -} - -// node_modules/svelte/src/internal/client/dom/hydration.js -var hydrating = false; -function set_hydrating(value) { - hydrating = value; -} -var hydrate_node; -function set_hydrate_node(node) { - if (node === null) { - hydration_mismatch(); - throw HYDRATION_ERROR; - } - return hydrate_node = node; -} -function hydrate_next() { - return set_hydrate_node( - /** @type {TemplateNode} */ - get_next_sibling(hydrate_node) - ); -} -function reset(node) { - if (!hydrating) return; - if (get_next_sibling(hydrate_node) !== null) { - hydration_mismatch(); - throw HYDRATION_ERROR; - } - hydrate_node = node; -} -function next(count = 1) { - if (hydrating) { - var i = count; - var node = hydrate_node; - while (i--) { - node = /** @type {TemplateNode} */ - get_next_sibling(node); - } - hydrate_node = node; - } -} -function remove_nodes() { - var depth = 0; - var node = hydrate_node; - while (true) { - if (node.nodeType === 8) { - var data = ( - /** @type {Comment} */ - node.data - ); - if (data === HYDRATION_END) { - if (depth === 0) return node; - depth -= 1; - } else if (data === HYDRATION_START || data === HYDRATION_START_ELSE) { - depth += 1; - } - } - var next2 = ( - /** @type {TemplateNode} */ - get_next_sibling(node) - ); - node.remove(); - node = next2; - } -} - -// node_modules/svelte/src/internal/client/dev/ownership.js -var boundaries = {}; -var chrome_pattern = /at (?:.+ \()?(.+):(\d+):(\d+)\)?$/; -var firefox_pattern = /@(.+):(\d+):(\d+)$/; -function get_stack() { - const stack2 = new Error().stack; - if (!stack2) return null; - const entries = []; - for (const line of stack2.split("\n")) { - let match2 = chrome_pattern.exec(line) ?? firefox_pattern.exec(line); - if (match2) { - entries.push({ - file: match2[1], - line: +match2[2], - column: +match2[3] - }); - } - } - return entries; -} -function get_component() { - const stack2 = get_stack()?.slice(4); - if (!stack2) return null; - for (let i = 0; i < stack2.length; i++) { - const entry = stack2[i]; - const modules = boundaries[entry.file]; - if (!modules) { - if (i === 0) return null; - continue; - } - for (const module of modules) { - if (module.start.line < entry.line && module.end.line > entry.line) { - return module.component; - } - } - } - return null; -} -var ADD_OWNER = Symbol("ADD_OWNER"); -function widen_ownership(from, to) { - if (to.owners === null) { - return; - } - while (from) { - if (from.owners === null) { - to.owners = null; - break; - } - for (const owner of from.owners) { - to.owners.add(owner); - } - from = from.parent; - } -} -function has_owner(metadata, component2) { - if (metadata.owners === null) { - return true; - } - return metadata.owners.has(component2) || metadata.parent !== null && has_owner(metadata.parent, component2); -} -function get_owner(metadata) { - return metadata?.owners?.values().next().value ?? get_owner( - /** @type {ProxyMetadata} */ - metadata.parent - ); -} -var skip = false; -function check_ownership(metadata) { - if (skip) return; - const component2 = get_component(); - if (component2 && !has_owner(metadata, component2)) { - let original = get_owner(metadata); - if (original[FILENAME] !== component2[FILENAME]) { - ownership_invalid_mutation(component2[FILENAME], original[FILENAME]); - } else { - ownership_invalid_mutation(); - } - } -} - -// node_modules/svelte/src/internal/client/proxy.js -function proxy(value, parent = null, prev) { - if (typeof value !== "object" || value === null || STATE_SYMBOL in value) { - return value; - } - const prototype = get_prototype_of(value); - if (prototype !== object_prototype && prototype !== array_prototype) { - return value; - } - var sources = /* @__PURE__ */ new Map(); - var is_proxied_array = is_array(value); - var version = source(0); - if (is_proxied_array) { - sources.set("length", source( - /** @type {any[]} */ - value.length - )); - } - var metadata; - if (DEV) { - metadata = { - parent, - owners: null - }; - if (prev) { - const prev_owners = prev.v?.[STATE_SYMBOL_METADATA]?.owners; - metadata.owners = prev_owners ? new Set(prev_owners) : null; - } else { - metadata.owners = parent === null ? component_context !== null ? /* @__PURE__ */ new Set([component_context.function]) : null : /* @__PURE__ */ new Set(); - } - } - return new Proxy( - /** @type {any} */ - value, - { - defineProperty(_, prop2, descriptor) { - if (!("value" in descriptor) || descriptor.configurable === false || descriptor.enumerable === false || descriptor.writable === false) { - state_descriptors_fixed(); - } - var s2 = sources.get(prop2); - if (s2 === void 0) { - s2 = source(descriptor.value); - sources.set(prop2, s2); - } else { - set(s2, proxy(descriptor.value, metadata)); - } - return true; - }, - deleteProperty(target, prop2) { - var s2 = sources.get(prop2); - if (s2 === void 0) { - if (prop2 in target) { - sources.set(prop2, source(UNINITIALIZED)); - } - } else { - if (is_proxied_array && typeof prop2 === "string") { - var ls = ( - /** @type {Source} */ - sources.get("length") - ); - var n2 = Number(prop2); - if (Number.isInteger(n2) && n2 < ls.v) { - set(ls, n2); - } - } - set(s2, UNINITIALIZED); - update_version(version); - } - return true; - }, - get(target, prop2, receiver) { - if (DEV && prop2 === STATE_SYMBOL_METADATA) { - return metadata; - } - if (prop2 === STATE_SYMBOL) { - return value; - } - var s2 = sources.get(prop2); - var exists = prop2 in target; - if (s2 === void 0 && (!exists || get_descriptor(target, prop2)?.writable)) { - s2 = source(proxy(exists ? target[prop2] : UNINITIALIZED, metadata)); - sources.set(prop2, s2); - } - if (s2 !== void 0) { - var v = get(s2); - if (DEV) { - var prop_metadata = v?.[STATE_SYMBOL_METADATA]; - if (prop_metadata && prop_metadata?.parent !== metadata) { - widen_ownership(metadata, prop_metadata); - } - } - return v === UNINITIALIZED ? void 0 : v; - } - return Reflect.get(target, prop2, receiver); - }, - getOwnPropertyDescriptor(target, prop2) { - var descriptor = Reflect.getOwnPropertyDescriptor(target, prop2); - if (descriptor && "value" in descriptor) { - var s2 = sources.get(prop2); - if (s2) descriptor.value = get(s2); - } else if (descriptor === void 0) { - var source2 = sources.get(prop2); - var value2 = source2?.v; - if (source2 !== void 0 && value2 !== UNINITIALIZED) { - return { - enumerable: true, - configurable: true, - value: value2, - writable: true - }; - } - } - return descriptor; - }, - has(target, prop2) { - if (DEV && prop2 === STATE_SYMBOL_METADATA) { - return true; - } - if (prop2 === STATE_SYMBOL) { - return true; - } - var s2 = sources.get(prop2); - var has = s2 !== void 0 && s2.v !== UNINITIALIZED || Reflect.has(target, prop2); - if (s2 !== void 0 || active_effect !== null && (!has || get_descriptor(target, prop2)?.writable)) { - if (s2 === void 0) { - s2 = source(has ? proxy(target[prop2], metadata) : UNINITIALIZED); - sources.set(prop2, s2); - } - var value2 = get(s2); - if (value2 === UNINITIALIZED) { - return false; - } - } - return has; - }, - set(target, prop2, value2, receiver) { - var s2 = sources.get(prop2); - var has = prop2 in target; - if (is_proxied_array && prop2 === "length") { - for (var i = value2; i < /** @type {Source} */ - s2.v; i += 1) { - var other_s = sources.get(i + ""); - if (other_s !== void 0) { - set(other_s, UNINITIALIZED); - } else if (i in target) { - other_s = source(UNINITIALIZED); - sources.set(i + "", other_s); - } - } - } - if (s2 === void 0) { - if (!has || get_descriptor(target, prop2)?.writable) { - s2 = source(void 0); - set(s2, proxy(value2, metadata)); - sources.set(prop2, s2); - } - } else { - has = s2.v !== UNINITIALIZED; - set(s2, proxy(value2, metadata)); - } - if (DEV) { - var prop_metadata = value2?.[STATE_SYMBOL_METADATA]; - if (prop_metadata && prop_metadata?.parent !== metadata) { - widen_ownership(metadata, prop_metadata); - } - check_ownership(metadata); - } - var descriptor = Reflect.getOwnPropertyDescriptor(target, prop2); - if (descriptor?.set) { - descriptor.set.call(receiver, value2); - } - if (!has) { - if (is_proxied_array && typeof prop2 === "string") { - var ls = ( - /** @type {Source} */ - sources.get("length") - ); - var n2 = Number(prop2); - if (Number.isInteger(n2) && n2 >= ls.v) { - set(ls, n2 + 1); - } - } - update_version(version); - } - return true; - }, - ownKeys(target) { - get(version); - var own_keys = Reflect.ownKeys(target).filter((key2) => { - var source3 = sources.get(key2); - return source3 === void 0 || source3.v !== UNINITIALIZED; - }); - for (var [key, source2] of sources) { - if (source2.v !== UNINITIALIZED && !(key in target)) { - own_keys.push(key); - } - } - return own_keys; - }, - setPrototypeOf() { - state_prototype_fixed(); - } - } - ); -} -function update_version(signal, d = 1) { - set(signal, signal.v + d); -} -function get_proxied_value(value) { - if (value !== null && typeof value === "object" && STATE_SYMBOL in value) { - return value[STATE_SYMBOL]; - } - return value; -} - -// node_modules/svelte/src/internal/client/dev/equality.js -function init_array_prototype_warnings() { - const array_prototype2 = Array.prototype; - const cleanup = Array.__svelte_cleanup; - if (cleanup) { - cleanup(); - } - const { indexOf, lastIndexOf, includes } = array_prototype2; - array_prototype2.indexOf = function(item, from_index) { - const index2 = indexOf.call(this, item, from_index); - if (index2 === -1) { - const test = indexOf.call(get_proxied_value(this), get_proxied_value(item), from_index); - if (test !== -1) { - state_proxy_equality_mismatch("array.indexOf(...)"); - } - } - return index2; - }; - array_prototype2.lastIndexOf = function(item, from_index) { - const index2 = lastIndexOf.call(this, item, from_index ?? this.length - 1); - if (index2 === -1) { - const test = lastIndexOf.call( - get_proxied_value(this), - get_proxied_value(item), - from_index ?? this.length - 1 - ); - if (test !== -1) { - state_proxy_equality_mismatch("array.lastIndexOf(...)"); - } - } - return index2; - }; - array_prototype2.includes = function(item, from_index) { - const has = includes.call(this, item, from_index); - if (!has) { - const test = includes.call(get_proxied_value(this), get_proxied_value(item), from_index); - if (test) { - state_proxy_equality_mismatch("array.includes(...)"); - } - } - return has; - }; - Array.__svelte_cleanup = () => { - array_prototype2.indexOf = indexOf; - array_prototype2.lastIndexOf = lastIndexOf; - array_prototype2.includes = includes; - }; -} - -// node_modules/svelte/src/internal/client/dom/operations.js -var $window; -var $document; -var first_child_getter; -var next_sibling_getter; -function init_operations() { - if ($window !== void 0) { - return; - } - $window = window; - $document = document; - var element_prototype = Element.prototype; - var node_prototype = Node.prototype; - first_child_getter = get_descriptor(node_prototype, "firstChild").get; - next_sibling_getter = get_descriptor(node_prototype, "nextSibling").get; - element_prototype.__click = void 0; - element_prototype.__className = ""; - element_prototype.__attributes = null; - element_prototype.__styles = null; - element_prototype.__e = void 0; - Text.prototype.__t = void 0; - if (DEV) { - element_prototype.__svelte_meta = null; - init_array_prototype_warnings(); - } -} -function create_text(value = "") { - return document.createTextNode(value); -} -// @__NO_SIDE_EFFECTS__ -function get_first_child(node) { - return first_child_getter.call(node); -} -// @__NO_SIDE_EFFECTS__ -function get_next_sibling(node) { - return next_sibling_getter.call(node); -} -function child(node, is_text) { - if (!hydrating) { - return /* @__PURE__ */ get_first_child(node); - } - var child2 = ( - /** @type {TemplateNode} */ - /* @__PURE__ */ get_first_child(hydrate_node) - ); - if (child2 === null) { - child2 = hydrate_node.appendChild(create_text()); - } else if (is_text && child2.nodeType !== 3) { - var text2 = create_text(); - child2?.before(text2); - set_hydrate_node(text2); - return text2; - } - set_hydrate_node(child2); - return child2; -} -function first_child(fragment, is_text) { - if (!hydrating) { - var first = ( - /** @type {DocumentFragment} */ - /* @__PURE__ */ get_first_child( - /** @type {Node} */ - fragment - ) - ); - if (first instanceof Comment && first.data === "") return /* @__PURE__ */ get_next_sibling(first); - return first; - } - if (is_text && hydrate_node?.nodeType !== 3) { - var text2 = create_text(); - hydrate_node?.before(text2); - set_hydrate_node(text2); - return text2; - } - return hydrate_node; -} -function sibling(node, count = 1, is_text = false) { - let next_sibling = hydrating ? hydrate_node : node; - while (count--) { - next_sibling = /** @type {TemplateNode} */ - /* @__PURE__ */ get_next_sibling(next_sibling); - } - if (!hydrating) { - return next_sibling; - } - var type = next_sibling.nodeType; - if (is_text && type !== 3) { - var text2 = create_text(); - next_sibling?.before(text2); - set_hydrate_node(text2); - return text2; - } - set_hydrate_node(next_sibling); - return ( - /** @type {TemplateNode} */ - next_sibling - ); -} -function clear_text_content(node) { - node.textContent = ""; -} - -// node_modules/svelte/src/internal/client/reactivity/deriveds.js -// @__NO_SIDE_EFFECTS__ -function derived(fn) { - var flags = DERIVED | DIRTY; - if (active_effect === null) { - flags |= UNOWNED; - } else { - active_effect.f |= EFFECT_HAS_DERIVED; - } - const signal = { - children: null, - ctx: component_context, - deps: null, - equals, - f: flags, - fn, - reactions: null, - v: ( - /** @type {V} */ - null - ), - version: 0, - parent: active_effect - }; - if (active_reaction !== null && (active_reaction.f & DERIVED) !== 0) { - var derived3 = ( - /** @type {Derived} */ - active_reaction - ); - (derived3.children ??= []).push(signal); - } - return signal; -} -// @__NO_SIDE_EFFECTS__ -function derived_safe_equal(fn) { - const signal = /* @__PURE__ */ derived(fn); - signal.equals = safe_equals; - return signal; -} -function destroy_derived_children(derived3) { - var children = derived3.children; - if (children !== null) { - derived3.children = null; - for (var i = 0; i < children.length; i += 1) { - var child2 = children[i]; - if ((child2.f & DERIVED) !== 0) { - destroy_derived( - /** @type {Derived} */ - child2 - ); - } else { - destroy_effect( - /** @type {Effect} */ - child2 - ); - } - } - } -} -var stack = []; -function execute_derived(derived3) { - var value; - var prev_active_effect = active_effect; - set_active_effect(derived3.parent); - if (DEV) { - let prev_inspect_effects = inspect_effects; - set_inspect_effects(/* @__PURE__ */ new Set()); - try { - if (stack.includes(derived3)) { - derived_references_self(); - } - stack.push(derived3); - destroy_derived_children(derived3); - value = update_reaction(derived3); - } finally { - set_active_effect(prev_active_effect); - set_inspect_effects(prev_inspect_effects); - stack.pop(); - } - } else { - try { - destroy_derived_children(derived3); - value = update_reaction(derived3); - } finally { - set_active_effect(prev_active_effect); - } - } - return value; -} -function update_derived(derived3) { - var value = execute_derived(derived3); - var status = (skip_reaction || (derived3.f & UNOWNED) !== 0) && derived3.deps !== null ? MAYBE_DIRTY : CLEAN; - set_signal_status(derived3, status); - if (!derived3.equals(value)) { - derived3.v = value; - derived3.version = increment_version(); - } -} -function destroy_derived(signal) { - destroy_derived_children(signal); - remove_reactions(signal, 0); - set_signal_status(signal, DESTROYED); - signal.v = signal.children = signal.deps = signal.ctx = signal.reactions = null; -} - -// node_modules/svelte/src/internal/client/reactivity/effects.js -function push_effect(effect2, parent_effect) { - var parent_last = parent_effect.last; - if (parent_last === null) { - parent_effect.last = parent_effect.first = effect2; - } else { - parent_last.next = effect2; - effect2.prev = parent_last; - parent_effect.last = effect2; - } -} -function create_effect(type, fn, sync, push2 = true) { - var is_root = (type & ROOT_EFFECT) !== 0; - var parent_effect = active_effect; - if (DEV) { - while (parent_effect !== null && (parent_effect.f & INSPECT_EFFECT) !== 0) { - parent_effect = parent_effect.parent; - } - } - var effect2 = { - ctx: component_context, - deps: null, - deriveds: null, - nodes_start: null, - nodes_end: null, - f: type | DIRTY, - first: null, - fn, - last: null, - next: null, - parent: is_root ? null : parent_effect, - prev: null, - teardown: null, - transitions: null, - version: 0 - }; - if (DEV) { - effect2.component_function = dev_current_component_function; - } - if (sync) { - var previously_flushing_effect = is_flushing_effect; - try { - set_is_flushing_effect(true); - update_effect(effect2); - effect2.f |= EFFECT_RAN; - } catch (e) { - destroy_effect(effect2); - throw e; - } finally { - set_is_flushing_effect(previously_flushing_effect); - } - } else if (fn !== null) { - schedule_effect(effect2); - } - var inert = sync && effect2.deps === null && effect2.first === null && effect2.nodes_start === null && effect2.teardown === null && (effect2.f & EFFECT_HAS_DERIVED) === 0; - if (!inert && !is_root && push2) { - if (parent_effect !== null) { - push_effect(effect2, parent_effect); - } - if (active_reaction !== null && (active_reaction.f & DERIVED) !== 0) { - var derived3 = ( - /** @type {Derived} */ - active_reaction - ); - (derived3.children ??= []).push(effect2); - } - } - return effect2; -} -function teardown(fn) { - const effect2 = create_effect(RENDER_EFFECT, null, false); - set_signal_status(effect2, CLEAN); - effect2.teardown = fn; - return effect2; -} -function effect_root(fn) { - const effect2 = create_effect(ROOT_EFFECT, fn, true); - return () => { - destroy_effect(effect2); - }; -} -function effect(fn) { - return create_effect(EFFECT, fn, false); -} -function render_effect(fn) { - return create_effect(RENDER_EFFECT, fn, true); -} -function template_effect(fn) { - if (DEV) { - define_property(fn, "name", { - value: "{expression}" - }); - } - return block(fn); -} -function block(fn, flags = 0) { - return create_effect(RENDER_EFFECT | BLOCK_EFFECT | flags, fn, true); -} -function branch(fn, push2 = true) { - return create_effect(RENDER_EFFECT | BRANCH_EFFECT, fn, true, push2); -} -function execute_effect_teardown(effect2) { - var teardown2 = effect2.teardown; - if (teardown2 !== null) { - const previously_destroying_effect = is_destroying_effect; - const previous_reaction = active_reaction; - set_is_destroying_effect(true); - set_active_reaction(null); - try { - teardown2.call(null); - } finally { - set_is_destroying_effect(previously_destroying_effect); - set_active_reaction(previous_reaction); - } - } -} -function destroy_effect_deriveds(signal) { - var deriveds = signal.deriveds; - if (deriveds !== null) { - signal.deriveds = null; - for (var i = 0; i < deriveds.length; i += 1) { - destroy_derived(deriveds[i]); - } - } -} -function destroy_effect_children(signal, remove_dom = false) { - var effect2 = signal.first; - signal.first = signal.last = null; - while (effect2 !== null) { - var next2 = effect2.next; - destroy_effect(effect2, remove_dom); - effect2 = next2; - } -} -function destroy_block_effect_children(signal) { - var effect2 = signal.first; - while (effect2 !== null) { - var next2 = effect2.next; - if ((effect2.f & BRANCH_EFFECT) === 0) { - destroy_effect(effect2); - } - effect2 = next2; - } -} -function destroy_effect(effect2, remove_dom = true) { - var removed = false; - if ((remove_dom || (effect2.f & HEAD_EFFECT) !== 0) && effect2.nodes_start !== null) { - var node = effect2.nodes_start; - var end = effect2.nodes_end; - while (node !== null) { - var next2 = node === end ? null : ( - /** @type {TemplateNode} */ - get_next_sibling(node) - ); - node.remove(); - node = next2; - } - removed = true; - } - destroy_effect_children(effect2, remove_dom && !removed); - destroy_effect_deriveds(effect2); - remove_reactions(effect2, 0); - set_signal_status(effect2, DESTROYED); - var transitions = effect2.transitions; - if (transitions !== null) { - for (const transition2 of transitions) { - transition2.stop(); - } - } - execute_effect_teardown(effect2); - var parent = effect2.parent; - if (parent !== null && parent.first !== null) { - unlink_effect(effect2); - } - if (DEV) { - effect2.component_function = null; - } - effect2.next = effect2.prev = effect2.teardown = effect2.ctx = effect2.deps = effect2.parent = effect2.fn = effect2.nodes_start = effect2.nodes_end = null; -} -function unlink_effect(effect2) { - var parent = effect2.parent; - var prev = effect2.prev; - var next2 = effect2.next; - if (prev !== null) prev.next = next2; - if (next2 !== null) next2.prev = prev; - if (parent !== null) { - if (parent.first === effect2) parent.first = next2; - if (parent.last === effect2) parent.last = prev; - } -} -function pause_effect(effect2, callback) { - var transitions = []; - pause_children(effect2, transitions, true); - run_out_transitions(transitions, () => { - destroy_effect(effect2); - if (callback) callback(); - }); -} -function run_out_transitions(transitions, fn) { - var remaining = transitions.length; - if (remaining > 0) { - var check = () => --remaining || fn(); - for (var transition2 of transitions) { - transition2.out(check); - } - } else { - fn(); - } -} -function pause_children(effect2, transitions, local) { - if ((effect2.f & INERT) !== 0) return; - effect2.f ^= INERT; - if (effect2.transitions !== null) { - for (const transition2 of effect2.transitions) { - if (transition2.is_global || local) { - transitions.push(transition2); - } - } - } - var child2 = effect2.first; - while (child2 !== null) { - var sibling2 = child2.next; - var transparent = (child2.f & EFFECT_TRANSPARENT) !== 0 || (child2.f & BRANCH_EFFECT) !== 0; - pause_children(child2, transitions, transparent ? local : false); - child2 = sibling2; - } -} -function resume_effect(effect2) { - resume_children(effect2, true); -} -function resume_children(effect2, local) { - if ((effect2.f & INERT) === 0) return; - if (check_dirtiness(effect2)) { - update_effect(effect2); - } - effect2.f ^= INERT; - var child2 = effect2.first; - while (child2 !== null) { - var sibling2 = child2.next; - var transparent = (child2.f & EFFECT_TRANSPARENT) !== 0 || (child2.f & BRANCH_EFFECT) !== 0; - resume_children(child2, transparent ? local : false); - child2 = sibling2; - } - if (effect2.transitions !== null) { - for (const transition2 of effect2.transitions) { - if (transition2.is_global || local) { - transition2.in(); - } - } - } -} - -// node_modules/svelte/src/internal/client/dom/task.js -var request_idle_callback = typeof requestIdleCallback === "undefined" ? (cb) => setTimeout(cb, 1) : requestIdleCallback; -var is_micro_task_queued = false; -var is_idle_task_queued = false; -var current_queued_micro_tasks = []; -var current_queued_idle_tasks = []; -function process_micro_tasks() { - is_micro_task_queued = false; - const tasks = current_queued_micro_tasks.slice(); - current_queued_micro_tasks = []; - run_all(tasks); -} -function process_idle_tasks() { - is_idle_task_queued = false; - const tasks = current_queued_idle_tasks.slice(); - current_queued_idle_tasks = []; - run_all(tasks); -} -function queue_micro_task(fn) { - if (!is_micro_task_queued) { - is_micro_task_queued = true; - queueMicrotask(process_micro_tasks); - } - current_queued_micro_tasks.push(fn); -} -function queue_idle_task(fn) { - if (!is_idle_task_queued) { - is_idle_task_queued = true; - request_idle_callback(process_idle_tasks); - } - current_queued_idle_tasks.push(fn); -} -function flush_tasks() { - if (is_micro_task_queued) { - process_micro_tasks(); - } - if (is_idle_task_queued) { - process_idle_tasks(); - } -} - -// node_modules/svelte/src/internal/client/runtime.js -var FLUSH_MICROTASK = 0; -var FLUSH_SYNC = 1; -var handled_errors = /* @__PURE__ */ new WeakSet(); -var scheduler_mode = FLUSH_MICROTASK; -var is_micro_task_queued2 = false; -var is_flushing_effect = false; -var is_destroying_effect = false; -function set_is_flushing_effect(value) { - is_flushing_effect = value; -} -function set_is_destroying_effect(value) { - is_destroying_effect = value; -} -var queued_root_effects = []; -var flush_count = 0; -var dev_effect_stack = []; -var active_reaction = null; -function set_active_reaction(reaction) { - active_reaction = reaction; -} -var active_effect = null; -function set_active_effect(effect2) { - active_effect = effect2; -} -var derived_sources = null; -function set_derived_sources(sources) { - derived_sources = sources; -} -var new_deps = null; -var skipped_deps = 0; -var untracked_writes = null; -function set_untracked_writes(value) { - untracked_writes = value; -} -var current_version = 0; -var skip_reaction = false; -var is_signals_recorded = false; -var captured_signals = /* @__PURE__ */ new Set(); -var component_context = null; -function set_component_context(context) { - component_context = context; -} -var dev_current_component_function = null; -function set_dev_current_component_function(fn) { - dev_current_component_function = fn; -} -function increment_version() { - return ++current_version; -} -function is_runes() { - return !legacy_mode_flag || component_context !== null && component_context.l === null; -} -function check_dirtiness(reaction) { - var flags = reaction.f; - if ((flags & DIRTY) !== 0) { - return true; - } - if ((flags & MAYBE_DIRTY) !== 0) { - var dependencies = reaction.deps; - var is_unowned = (flags & UNOWNED) !== 0; - if (dependencies !== null) { - var i; - if ((flags & DISCONNECTED) !== 0) { - for (i = 0; i < dependencies.length; i++) { - (dependencies[i].reactions ??= []).push(reaction); - } - reaction.f ^= DISCONNECTED; - } - for (i = 0; i < dependencies.length; i++) { - var dependency = dependencies[i]; - if (check_dirtiness( - /** @type {Derived} */ - dependency - )) { - update_derived( - /** @type {Derived} */ - dependency - ); - } - if (is_unowned && active_effect !== null && !skip_reaction && !dependency?.reactions?.includes(reaction)) { - (dependency.reactions ??= []).push(reaction); - } - if (dependency.version > reaction.version) { - return true; - } - } - } - if (!is_unowned) { - set_signal_status(reaction, CLEAN); - } - } - return false; -} -function handle_error(error, effect2, component_context2) { - if (!DEV || handled_errors.has(error) || component_context2 === null) { - throw error; - } - const component_stack = []; - const effect_name = effect2.fn?.name; - if (effect_name) { - component_stack.push(effect_name); - } - let current_context = component_context2; - while (current_context !== null) { - if (DEV) { - var filename = current_context.function?.[FILENAME]; - if (filename) { - const file = filename.split("/").pop(); - component_stack.push(file); - } - } - current_context = current_context.p; - } - const indent = /Firefox/.test(navigator.userAgent) ? " " : " "; - define_property(error, "message", { - value: error.message + ` -${component_stack.map((name2) => ` -${indent}in ${name2}`).join("")} -` - }); - const stack2 = error.stack; - if (stack2) { - const lines = stack2.split("\n"); - const new_lines = []; - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - if (line.includes("svelte/src/internal")) { - continue; - } - new_lines.push(line); - } - define_property(error, "stack", { - value: error.stack + new_lines.join("\n") - }); - } - handled_errors.add(error); - throw error; -} -function update_reaction(reaction) { - var previous_deps = new_deps; - var previous_skipped_deps = skipped_deps; - var previous_untracked_writes = untracked_writes; - var previous_reaction = active_reaction; - var previous_skip_reaction = skip_reaction; - var prev_derived_sources = derived_sources; - var previous_component_context = component_context; - var flags = reaction.f; - new_deps = /** @type {null | Value[]} */ - null; - skipped_deps = 0; - untracked_writes = null; - active_reaction = (flags & (BRANCH_EFFECT | ROOT_EFFECT)) === 0 ? reaction : null; - skip_reaction = !is_flushing_effect && (flags & UNOWNED) !== 0; - derived_sources = null; - component_context = reaction.ctx; - try { - var result = ( - /** @type {Function} */ - (0, reaction.fn)() - ); - var deps = reaction.deps; - if (new_deps !== null) { - var i; - remove_reactions(reaction, skipped_deps); - if (deps !== null && skipped_deps > 0) { - deps.length = skipped_deps + new_deps.length; - for (i = 0; i < new_deps.length; i++) { - deps[skipped_deps + i] = new_deps[i]; - } - } else { - reaction.deps = deps = new_deps; - } - if (!skip_reaction) { - for (i = skipped_deps; i < deps.length; i++) { - (deps[i].reactions ??= []).push(reaction); - } - } - } else if (deps !== null && skipped_deps < deps.length) { - remove_reactions(reaction, skipped_deps); - deps.length = skipped_deps; - } - return result; - } finally { - new_deps = previous_deps; - skipped_deps = previous_skipped_deps; - untracked_writes = previous_untracked_writes; - active_reaction = previous_reaction; - skip_reaction = previous_skip_reaction; - derived_sources = prev_derived_sources; - component_context = previous_component_context; - } -} -function remove_reaction(signal, dependency) { - let reactions = dependency.reactions; - if (reactions !== null) { - var index2 = reactions.indexOf(signal); - if (index2 !== -1) { - var new_length = reactions.length - 1; - if (new_length === 0) { - reactions = dependency.reactions = null; - } else { - reactions[index2] = reactions[new_length]; - reactions.pop(); - } - } - } - if (reactions === null && (dependency.f & DERIVED) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear - // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps` - // allows us to skip the expensive work of disconnecting and immediately reconnecting it - (new_deps === null || !new_deps.includes(dependency))) { - set_signal_status(dependency, MAYBE_DIRTY); - if ((dependency.f & (UNOWNED | DISCONNECTED)) === 0) { - dependency.f ^= DISCONNECTED; - } - remove_reactions( - /** @type {Derived} **/ - dependency, - 0 - ); - } -} -function remove_reactions(signal, start_index) { - var dependencies = signal.deps; - if (dependencies === null) return; - for (var i = start_index; i < dependencies.length; i++) { - remove_reaction(signal, dependencies[i]); - } -} -function update_effect(effect2) { - var flags = effect2.f; - if ((flags & DESTROYED) !== 0) { - return; - } - set_signal_status(effect2, CLEAN); - var previous_effect = active_effect; - var previous_component_context = component_context; - active_effect = effect2; - if (DEV) { - var previous_component_fn = dev_current_component_function; - dev_current_component_function = effect2.component_function; - } - try { - if ((flags & BLOCK_EFFECT) !== 0) { - destroy_block_effect_children(effect2); - } else { - destroy_effect_children(effect2); - } - destroy_effect_deriveds(effect2); - execute_effect_teardown(effect2); - var teardown2 = update_reaction(effect2); - effect2.teardown = typeof teardown2 === "function" ? teardown2 : null; - effect2.version = current_version; - if (DEV) { - dev_effect_stack.push(effect2); - } - } catch (error) { - handle_error( - /** @type {Error} */ - error, - effect2, - previous_component_context - ); - } finally { - active_effect = previous_effect; - if (DEV) { - dev_current_component_function = previous_component_fn; - } - } -} -function infinite_loop_guard() { - if (flush_count > 1e3) { - flush_count = 0; - if (DEV) { - try { - effect_update_depth_exceeded(); - } catch (error) { - define_property(error, "stack", { - value: "" - }); - console.error( - "Last ten effects were: ", - dev_effect_stack.slice(-10).map((d) => d.fn) - ); - dev_effect_stack = []; - throw error; - } - } else { - effect_update_depth_exceeded(); - } - } - flush_count++; -} -function flush_queued_root_effects(root_effects) { - var length = root_effects.length; - if (length === 0) { - return; - } - infinite_loop_guard(); - var previously_flushing_effect = is_flushing_effect; - is_flushing_effect = true; - try { - for (var i = 0; i < length; i++) { - var effect2 = root_effects[i]; - if ((effect2.f & CLEAN) === 0) { - effect2.f ^= CLEAN; - } - var collected_effects = []; - process_effects(effect2, collected_effects); - flush_queued_effects(collected_effects); - } - } finally { - is_flushing_effect = previously_flushing_effect; - } -} -function flush_queued_effects(effects) { - var length = effects.length; - if (length === 0) return; - for (var i = 0; i < length; i++) { - var effect2 = effects[i]; - if ((effect2.f & (DESTROYED | INERT)) === 0 && check_dirtiness(effect2)) { - update_effect(effect2); - if (effect2.deps === null && effect2.first === null && effect2.nodes_start === null) { - if (effect2.teardown === null) { - unlink_effect(effect2); - } else { - effect2.fn = null; - } - } - } - } -} -function process_deferred() { - is_micro_task_queued2 = false; - if (flush_count > 1001) { - return; - } - const previous_queued_root_effects = queued_root_effects; - queued_root_effects = []; - flush_queued_root_effects(previous_queued_root_effects); - if (!is_micro_task_queued2) { - flush_count = 0; - if (DEV) { - dev_effect_stack = []; - } - } -} -function schedule_effect(signal) { - if (scheduler_mode === FLUSH_MICROTASK) { - if (!is_micro_task_queued2) { - is_micro_task_queued2 = true; - queueMicrotask(process_deferred); - } - } - var effect2 = signal; - while (effect2.parent !== null) { - effect2 = effect2.parent; - var flags = effect2.f; - if ((flags & (ROOT_EFFECT | BRANCH_EFFECT)) !== 0) { - if ((flags & CLEAN) === 0) return; - effect2.f ^= CLEAN; - } - } - queued_root_effects.push(effect2); -} -function process_effects(effect2, collected_effects) { - var current_effect = effect2.first; - var effects = []; - main_loop: while (current_effect !== null) { - var flags = current_effect.f; - var is_branch = (flags & BRANCH_EFFECT) !== 0; - var is_skippable_branch = is_branch && (flags & CLEAN) !== 0; - if (!is_skippable_branch && (flags & INERT) === 0) { - if ((flags & RENDER_EFFECT) !== 0) { - if (is_branch) { - current_effect.f ^= CLEAN; - } else if (check_dirtiness(current_effect)) { - update_effect(current_effect); - } - var child2 = current_effect.first; - if (child2 !== null) { - current_effect = child2; - continue; - } - } else if ((flags & EFFECT) !== 0) { - effects.push(current_effect); - } - } - var sibling2 = current_effect.next; - if (sibling2 === null) { - let parent = current_effect.parent; - while (parent !== null) { - if (effect2 === parent) { - break main_loop; - } - var parent_sibling = parent.next; - if (parent_sibling !== null) { - current_effect = parent_sibling; - continue main_loop; - } - parent = parent.parent; - } - } - current_effect = sibling2; - } - for (var i = 0; i < effects.length; i++) { - child2 = effects[i]; - collected_effects.push(child2); - process_effects(child2, collected_effects); - } -} -function flush_sync(fn) { - var previous_scheduler_mode = scheduler_mode; - var previous_queued_root_effects = queued_root_effects; - try { - infinite_loop_guard(); - const root_effects = []; - scheduler_mode = FLUSH_SYNC; - queued_root_effects = root_effects; - is_micro_task_queued2 = false; - flush_queued_root_effects(previous_queued_root_effects); - var result = fn?.(); - flush_tasks(); - if (queued_root_effects.length > 0 || root_effects.length > 0) { - flush_sync(); - } - flush_count = 0; - if (DEV) { - dev_effect_stack = []; - } - return result; - } finally { - scheduler_mode = previous_scheduler_mode; - queued_root_effects = previous_queued_root_effects; - } -} -function get(signal) { - var flags = signal.f; - var is_derived = (flags & DERIVED) !== 0; - if (is_derived && (flags & DESTROYED) !== 0) { - var value = execute_derived( - /** @type {Derived} */ - signal - ); - destroy_derived( - /** @type {Derived} */ - signal - ); - return value; - } - if (is_signals_recorded) { - captured_signals.add(signal); - } - if (active_reaction !== null) { - if (derived_sources !== null && derived_sources.includes(signal)) { - state_unsafe_local_read(); - } - var deps = active_reaction.deps; - if (new_deps === null && deps !== null && deps[skipped_deps] === signal) { - skipped_deps++; - } else if (new_deps === null) { - new_deps = [signal]; - } else { - new_deps.push(signal); - } - if (untracked_writes !== null && active_effect !== null && (active_effect.f & CLEAN) !== 0 && (active_effect.f & BRANCH_EFFECT) === 0 && untracked_writes.includes(signal)) { - set_signal_status(active_effect, DIRTY); - schedule_effect(active_effect); - } - } else if (is_derived && /** @type {Derived} */ - signal.deps === null) { - var derived3 = ( - /** @type {Derived} */ - signal - ); - var parent = derived3.parent; - if (parent !== null && !parent.deriveds?.includes(derived3)) { - (parent.deriveds ??= []).push(derived3); - } - } - if (is_derived) { - derived3 = /** @type {Derived} */ - signal; - if (check_dirtiness(derived3)) { - update_derived(derived3); - } - } - return signal.v; -} -function untrack(fn) { - const previous_reaction = active_reaction; - try { - active_reaction = null; - return fn(); - } finally { - active_reaction = previous_reaction; - } -} -var STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN); -function set_signal_status(signal, status) { - signal.f = signal.f & STATUS_MASK | status; -} -function push(props, runes = false, fn) { - component_context = { - p: component_context, - c: null, - e: null, - m: false, - s: props, - x: null, - l: null - }; - if (legacy_mode_flag && !runes) { - component_context.l = { - s: null, - u: null, - r1: [], - r2: source(false) - }; - } - if (DEV) { - component_context.function = fn; - dev_current_component_function = fn; - } -} -function pop(component2) { - const context_stack_item = component_context; - if (context_stack_item !== null) { - if (component2 !== void 0) { - context_stack_item.x = component2; - } - const component_effects = context_stack_item.e; - if (component_effects !== null) { - var previous_effect = active_effect; - var previous_reaction = active_reaction; - context_stack_item.e = null; - try { - for (var i = 0; i < component_effects.length; i++) { - var component_effect = component_effects[i]; - set_active_effect(component_effect.effect); - set_active_reaction(component_effect.reaction); - effect(component_effect.fn); - } - } finally { - set_active_effect(previous_effect); - set_active_reaction(previous_reaction); - } - } - component_context = context_stack_item.p; - if (DEV) { - dev_current_component_function = context_stack_item.p?.function ?? null; - } - context_stack_item.m = true; - } - return component2 || /** @type {T} */ - {}; -} -function deep_read_state(value) { - if (typeof value !== "object" || !value || value instanceof EventTarget) { - return; - } - if (STATE_SYMBOL in value) { - deep_read(value); - } else if (!Array.isArray(value)) { - for (let key in value) { - const prop2 = value[key]; - if (typeof prop2 === "object" && prop2 && STATE_SYMBOL in prop2) { - deep_read(prop2); - } - } - } -} -function deep_read(value, visited = /* @__PURE__ */ new Set()) { - if (typeof value === "object" && value !== null && // We don't want to traverse DOM elements - !(value instanceof EventTarget) && !visited.has(value)) { - visited.add(value); - if (value instanceof Date) { - value.getTime(); - } - for (let key in value) { - try { - deep_read(value[key], visited); - } catch (e) { - } - } - const proto = get_prototype_of(value); - if (proto !== Object.prototype && proto !== Array.prototype && proto !== Map.prototype && proto !== Set.prototype && proto !== Date.prototype) { - const descriptors = get_descriptors(proto); - for (let key in descriptors) { - const get3 = descriptors[key].get; - if (get3) { - try { - get3.call(value); - } catch (e) { - } - } - } - } - } -} -if (DEV) { - let throw_rune_error = function(rune) { - if (!(rune in globalThis)) { - let value; - Object.defineProperty(globalThis, rune, { - configurable: true, - // eslint-disable-next-line getter-return - get: () => { - if (value !== void 0) { - return value; - } - rune_outside_svelte(rune); - }, - set: (v) => { - value = v; - } - }); - } - }; - throw_rune_error("$state"); - throw_rune_error("$effect"); - throw_rune_error("$derived"); - throw_rune_error("$inspect"); - throw_rune_error("$props"); - throw_rune_error("$bindable"); -} - -// node_modules/svelte/src/internal/client/dom/elements/misc.js -var listening_to_form_reset = false; -function add_form_reset_listener() { - if (!listening_to_form_reset) { - listening_to_form_reset = true; - document.addEventListener( - "reset", - (evt) => { - Promise.resolve().then(() => { - if (!evt.defaultPrevented) { - for ( - const e of - /**@type {HTMLFormElement} */ - evt.target.elements - ) { - e.__on_r?.(); - } - } - }); - }, - // In the capture phase to guarantee we get noticed of it (no possiblity of stopPropagation) - { capture: true } - ); - } -} - -// node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js -function without_reactive_context(fn) { - var previous_reaction = active_reaction; - var previous_effect = active_effect; - set_active_reaction(null); - set_active_effect(null); - try { - return fn(); - } finally { - set_active_reaction(previous_reaction); - set_active_effect(previous_effect); - } -} - -// node_modules/svelte/src/internal/client/dom/elements/events.js -var all_registered_events = /* @__PURE__ */ new Set(); -var root_event_handles = /* @__PURE__ */ new Set(); -function create_event(event_name, dom, handler, options) { - function target_handler(event2) { - if (!options.capture) { - handle_event_propagation.call(dom, event2); - } - if (!event2.cancelBubble) { - return without_reactive_context(() => { - return handler.call(this, event2); - }); - } - } - if (event_name.startsWith("pointer") || event_name.startsWith("touch") || event_name === "wheel") { - queue_micro_task(() => { - dom.addEventListener(event_name, target_handler, options); - }); - } else { - dom.addEventListener(event_name, target_handler, options); - } - return target_handler; -} -function event(event_name, dom, handler, capture, passive2) { - var options = { capture, passive: passive2 }; - var target_handler = create_event(event_name, dom, handler, options); - if (dom === document.body || dom === window || dom === document) { - teardown(() => { - dom.removeEventListener(event_name, target_handler, options); - }); - } -} -function delegate(events) { - for (var i = 0; i < events.length; i++) { - all_registered_events.add(events[i]); - } - for (var fn of root_event_handles) { - fn(events); - } -} -function handle_event_propagation(event2) { - var handler_element = this; - var owner_document = ( - /** @type {Node} */ - handler_element.ownerDocument - ); - var event_name = event2.type; - var path = event2.composedPath?.() || []; - var current_target = ( - /** @type {null | Element} */ - path[0] || event2.target - ); - var path_idx = 0; - var handled_at = event2.__root; - if (handled_at) { - var at_idx = path.indexOf(handled_at); - if (at_idx !== -1 && (handler_element === document || handler_element === /** @type {any} */ - window)) { - event2.__root = handler_element; - return; - } - var handler_idx = path.indexOf(handler_element); - if (handler_idx === -1) { - return; - } - if (at_idx <= handler_idx) { - path_idx = at_idx; - } - } - current_target = /** @type {Element} */ - path[path_idx] || event2.target; - if (current_target === handler_element) return; - define_property(event2, "currentTarget", { - configurable: true, - get() { - return current_target || owner_document; - } - }); - var previous_reaction = active_reaction; - var previous_effect = active_effect; - set_active_reaction(null); - set_active_effect(null); - try { - var throw_error; - var other_errors = []; - while (current_target !== null) { - var parent_element = current_target.assignedSlot || current_target.parentNode || /** @type {any} */ - current_target.host || null; - try { - var delegated = current_target["__" + event_name]; - if (delegated !== void 0 && !/** @type {any} */ - current_target.disabled) { - if (is_array(delegated)) { - var [fn, ...data] = delegated; - fn.apply(current_target, [event2, ...data]); - } else { - delegated.call(current_target, event2); - } - } - } catch (error) { - if (throw_error) { - other_errors.push(error); - } else { - throw_error = error; - } - } - if (event2.cancelBubble || parent_element === handler_element || parent_element === null) { - break; - } - current_target = parent_element; - } - if (throw_error) { - for (let error of other_errors) { - queueMicrotask(() => { - throw error; - }); - } - throw throw_error; - } - } finally { - event2.__root = handler_element; - delete event2.currentTarget; - set_active_reaction(previous_reaction); - set_active_effect(previous_effect); - } -} - -// node_modules/svelte/src/internal/client/dom/blocks/svelte-head.js -var head_anchor; -function reset_head_anchor() { - head_anchor = void 0; -} -function head(render_fn) { - let previous_hydrate_node = null; - let was_hydrating = hydrating; - var anchor; - if (hydrating) { - previous_hydrate_node = hydrate_node; - if (head_anchor === void 0) { - head_anchor = /** @type {TemplateNode} */ - get_first_child(document.head); - } - while (head_anchor !== null && (head_anchor.nodeType !== 8 || /** @type {Comment} */ - head_anchor.data !== HYDRATION_START)) { - head_anchor = /** @type {TemplateNode} */ - get_next_sibling(head_anchor); - } - if (head_anchor === null) { - set_hydrating(false); - } else { - head_anchor = set_hydrate_node( - /** @type {TemplateNode} */ - get_next_sibling(head_anchor) - ); - } - } - if (!hydrating) { - anchor = document.head.appendChild(create_text()); - } - try { - block(() => render_fn(anchor), HEAD_EFFECT); - } finally { - if (was_hydrating) { - set_hydrating(true); - head_anchor = hydrate_node; - set_hydrate_node( - /** @type {TemplateNode} */ - previous_hydrate_node - ); - } - } -} - -// node_modules/svelte/src/internal/client/dom/reconciler.js -function create_fragment_from_html(html2) { - var elem = document.createElement("template"); - elem.innerHTML = html2; - return elem.content; -} - -// node_modules/svelte/src/internal/client/dom/template.js -function assign_nodes(start, end) { - var effect2 = ( - /** @type {Effect} */ - active_effect - ); - if (effect2.nodes_start === null) { - effect2.nodes_start = start; - effect2.nodes_end = end; - } -} -// @__NO_SIDE_EFFECTS__ -function template(content, flags) { - var is_fragment = (flags & TEMPLATE_FRAGMENT) !== 0; - var use_import_node = (flags & TEMPLATE_USE_IMPORT_NODE) !== 0; - var node; - var has_start = !content.startsWith(""); - return () => { - if (hydrating) { - assign_nodes(hydrate_node, null); - return hydrate_node; - } - if (node === void 0) { - node = create_fragment_from_html(has_start ? content : "" + content); - if (!is_fragment) node = /** @type {Node} */ - get_first_child(node); - } - var clone3 = ( - /** @type {TemplateNode} */ - use_import_node ? document.importNode(node, true) : node.cloneNode(true) - ); - if (is_fragment) { - var start = ( - /** @type {TemplateNode} */ - get_first_child(clone3) - ); - var end = ( - /** @type {TemplateNode} */ - clone3.lastChild - ); - assign_nodes(start, end); - } else { - assign_nodes(clone3, clone3); - } - return clone3; - }; -} -// @__NO_SIDE_EFFECTS__ -function ns_template(content, flags, ns = "svg") { - var has_start = !content.startsWith(""); - var is_fragment = (flags & TEMPLATE_FRAGMENT) !== 0; - var wrapped = `<${ns}>${has_start ? content : "" + content}`; - var node; - return () => { - if (hydrating) { - assign_nodes(hydrate_node, null); - return hydrate_node; - } - if (!node) { - var fragment = ( - /** @type {DocumentFragment} */ - create_fragment_from_html(wrapped) - ); - var root7 = ( - /** @type {Element} */ - get_first_child(fragment) - ); - if (is_fragment) { - node = document.createDocumentFragment(); - while (get_first_child(root7)) { - node.appendChild( - /** @type {Node} */ - get_first_child(root7) - ); - } - } else { - node = /** @type {Element} */ - get_first_child(root7); - } - } - var clone3 = ( - /** @type {TemplateNode} */ - node.cloneNode(true) - ); - if (is_fragment) { - var start = ( - /** @type {TemplateNode} */ - get_first_child(clone3) - ); - var end = ( - /** @type {TemplateNode} */ - clone3.lastChild - ); - assign_nodes(start, end); - } else { - assign_nodes(clone3, clone3); - } - return clone3; - }; -} -function text(value = "") { - if (!hydrating) { - var t2 = create_text(value + ""); - assign_nodes(t2, t2); - return t2; - } - var node = hydrate_node; - if (node.nodeType !== 3) { - node.before(node = create_text()); - set_hydrate_node(node); - } - assign_nodes(node, node); - return node; -} -function comment() { - if (hydrating) { - assign_nodes(hydrate_node, null); - return hydrate_node; - } - var frag = document.createDocumentFragment(); - var start = document.createComment(""); - var anchor = create_text(); - frag.append(start, anchor); - assign_nodes(start, anchor); - return frag; -} -function append(anchor, dom) { - if (hydrating) { - active_effect.nodes_end = hydrate_node; - hydrate_next(); - return; - } - if (anchor === null) { - return; - } - anchor.before( - /** @type {Node} */ - dom - ); -} - -// node_modules/svelte/src/utils.js -var DOM_BOOLEAN_ATTRIBUTES = [ - "allowfullscreen", - "async", - "autofocus", - "autoplay", - "checked", - "controls", - "default", - "disabled", - "formnovalidate", - "hidden", - "indeterminate", - "ismap", - "loop", - "multiple", - "muted", - "nomodule", - "novalidate", - "open", - "playsinline", - "readonly", - "required", - "reversed", - "seamless", - "selected", - "webkitdirectory" -]; -var DOM_PROPERTIES = [ - ...DOM_BOOLEAN_ATTRIBUTES, - "formNoValidate", - "isMap", - "noModule", - "playsInline", - "readOnly", - "value", - "inert", - "volume" -]; -var PASSIVE_EVENTS = ["touchstart", "touchmove"]; -function is_passive_event(name2) { - return PASSIVE_EVENTS.includes(name2); -} - -// node_modules/svelte/src/internal/client/render.js -var should_intro = true; -function set_text(text2, value) { - var str = value == null ? "" : typeof value === "object" ? value + "" : value; - if (str !== (text2.__t ??= text2.nodeValue)) { - text2.__t = str; - text2.nodeValue = str == null ? "" : str + ""; - } -} -function mount(component2, options) { - return _mount(component2, options); -} -function hydrate(component2, options) { - init_operations(); - options.intro = options.intro ?? false; - const target = options.target; - const was_hydrating = hydrating; - const previous_hydrate_node = hydrate_node; - try { - var anchor = ( - /** @type {TemplateNode} */ - get_first_child(target) - ); - while (anchor && (anchor.nodeType !== 8 || /** @type {Comment} */ - anchor.data !== HYDRATION_START)) { - anchor = /** @type {TemplateNode} */ - get_next_sibling(anchor); - } - if (!anchor) { - throw HYDRATION_ERROR; - } - set_hydrating(true); - set_hydrate_node( - /** @type {Comment} */ - anchor - ); - hydrate_next(); - const instance = _mount(component2, { ...options, anchor }); - if (hydrate_node === null || hydrate_node.nodeType !== 8 || /** @type {Comment} */ - hydrate_node.data !== HYDRATION_END) { - hydration_mismatch(); - throw HYDRATION_ERROR; - } - set_hydrating(false); - return ( - /** @type {Exports} */ - instance - ); - } catch (error) { - if (error === HYDRATION_ERROR) { - if (options.recover === false) { - hydration_failed(); - } - init_operations(); - clear_text_content(target); - set_hydrating(false); - return mount(component2, options); - } - throw error; - } finally { - set_hydrating(was_hydrating); - set_hydrate_node(previous_hydrate_node); - reset_head_anchor(); - } -} -var document_listeners = /* @__PURE__ */ new Map(); -function _mount(Component, { target, anchor, props = {}, events, context, intro = true }) { - init_operations(); - var registered_events = /* @__PURE__ */ new Set(); - var event_handle = (events2) => { - for (var i = 0; i < events2.length; i++) { - var event_name = events2[i]; - if (registered_events.has(event_name)) continue; - registered_events.add(event_name); - var passive2 = is_passive_event(event_name); - target.addEventListener(event_name, handle_event_propagation, { passive: passive2 }); - var n2 = document_listeners.get(event_name); - if (n2 === void 0) { - document.addEventListener(event_name, handle_event_propagation, { passive: passive2 }); - document_listeners.set(event_name, 1); - } else { - document_listeners.set(event_name, n2 + 1); - } - } - }; - event_handle(array_from(all_registered_events)); - root_event_handles.add(event_handle); - var component2 = void 0; - var unmount2 = effect_root(() => { - var anchor_node = anchor ?? target.appendChild(create_text()); - branch(() => { - if (context) { - push({}); - var ctx = ( - /** @type {ComponentContext} */ - component_context - ); - ctx.c = context; - } - if (events) { - props.$$events = events; - } - if (hydrating) { - assign_nodes( - /** @type {TemplateNode} */ - anchor_node, - null - ); - } - should_intro = intro; - component2 = Component(anchor_node, props) || {}; - should_intro = true; - if (hydrating) { - active_effect.nodes_end = hydrate_node; - } - if (context) { - pop(); - } - }); - return () => { - for (var event_name of registered_events) { - target.removeEventListener(event_name, handle_event_propagation); - var n2 = ( - /** @type {number} */ - document_listeners.get(event_name) - ); - if (--n2 === 0) { - document.removeEventListener(event_name, handle_event_propagation); - document_listeners.delete(event_name); - } else { - document_listeners.set(event_name, n2); - } - } - root_event_handles.delete(event_handle); - mounted_components.delete(component2); - if (anchor_node !== anchor) { - anchor_node.parentNode?.removeChild(anchor_node); - } - }; - }); - mounted_components.set(component2, unmount2); - return component2; -} -var mounted_components = /* @__PURE__ */ new WeakMap(); -function unmount(component2) { - const fn = mounted_components.get(component2); - if (fn) { - fn(); - } else if (DEV) { - lifecycle_double_unmount(); - } -} - -// node_modules/svelte/src/internal/client/dom/blocks/await.js -var PENDING = 0; -var THEN = 1; -var CATCH = 2; -function await_block(node, get_input, pending_fn, then_fn, catch_fn) { - if (hydrating) { - hydrate_next(); - } - var anchor = node; - var runes = is_runes(); - var active_component_context = component_context; - var component_function = DEV ? component_context?.function : null; - var input; - var pending_effect; - var then_effect; - var catch_effect; - var input_source = (runes ? source : mutable_source)( - /** @type {V} */ - void 0 - ); - var error_source = (runes ? source : mutable_source)(void 0); - var resolved = false; - function update2(state2, restore) { - resolved = true; - if (restore) { - set_active_effect(effect2); - set_active_reaction(effect2); - set_component_context(active_component_context); - if (DEV) set_dev_current_component_function(component_function); - } - try { - if (state2 === PENDING && pending_fn) { - if (pending_effect) resume_effect(pending_effect); - else pending_effect = branch(() => pending_fn(anchor)); - } - if (state2 === THEN && then_fn) { - if (then_effect) resume_effect(then_effect); - else then_effect = branch(() => then_fn(anchor, input_source)); - } - if (state2 === CATCH && catch_fn) { - if (catch_effect) resume_effect(catch_effect); - else catch_effect = branch(() => catch_fn(anchor, error_source)); - } - if (state2 !== PENDING && pending_effect) { - pause_effect(pending_effect, () => pending_effect = null); - } - if (state2 !== THEN && then_effect) { - pause_effect(then_effect, () => then_effect = null); - } - if (state2 !== CATCH && catch_effect) { - pause_effect(catch_effect, () => catch_effect = null); - } - } finally { - if (restore) { - if (DEV) set_dev_current_component_function(null); - set_component_context(null); - set_active_reaction(null); - set_active_effect(null); - flush_sync(); - } - } - } - var effect2 = block(() => { - if (input === (input = get_input())) return; - if (is_promise(input)) { - var promise = input; - resolved = false; - promise.then( - (value) => { - if (promise !== input) return; - internal_set(input_source, value); - update2(THEN, true); - }, - (error) => { - if (promise !== input) return; - internal_set(error_source, error); - update2(CATCH, true); - if (!catch_fn) { - throw error_source.v; - } - } - ); - if (hydrating) { - if (pending_fn) { - pending_effect = branch(() => pending_fn(anchor)); - } - } else { - queue_micro_task(() => { - if (!resolved) update2(PENDING, true); - }); - } - } else { - internal_set(input_source, input); - update2(THEN, false); - } - return () => input = null; - }); - if (hydrating) { - anchor = hydrate_node; - } -} - -// node_modules/svelte/src/internal/client/dom/blocks/if.js -function if_block(node, get_condition, consequent_fn, alternate_fn = null, elseif = false) { - if (hydrating) { - hydrate_next(); - } - var anchor = node; - var consequent_effect = null; - var alternate_effect = null; - var condition = null; - var flags = elseif ? EFFECT_TRANSPARENT : 0; - block(() => { - if (condition === (condition = !!get_condition())) return; - let mismatch = false; - if (hydrating) { - const is_else = ( - /** @type {Comment} */ - anchor.data === HYDRATION_START_ELSE - ); - if (condition === is_else) { - anchor = remove_nodes(); - set_hydrate_node(anchor); - set_hydrating(false); - mismatch = true; - } - } - if (condition) { - if (consequent_effect) { - resume_effect(consequent_effect); - } else { - consequent_effect = branch(() => consequent_fn(anchor)); - } - if (alternate_effect) { - pause_effect(alternate_effect, () => { - alternate_effect = null; - }); - } - } else { - if (alternate_effect) { - resume_effect(alternate_effect); - } else if (alternate_fn) { - alternate_effect = branch(() => alternate_fn(anchor)); - } - if (consequent_effect) { - pause_effect(consequent_effect, () => { - consequent_effect = null; - }); - } - } - if (mismatch) { - set_hydrating(true); - } - }, flags); - if (hydrating) { - anchor = hydrate_node; - } -} - -// node_modules/svelte/src/internal/client/dom/blocks/key.js -function key_block(node, get_key, render_fn) { - if (hydrating) { - hydrate_next(); - } - var anchor = node; - var key = UNINITIALIZED; - var effect2; - block(() => { - if (safe_not_equal(key, key = get_key())) { - if (effect2) { - pause_effect(effect2); - } - effect2 = branch(() => render_fn(anchor)); - } - }); - if (hydrating) { - anchor = hydrate_node; - } -} - -// node_modules/svelte/src/internal/client/dom/blocks/each.js -var current_each_item = null; -function index(_, i) { - return i; -} -function pause_effects(state2, items, controlled_anchor, items_map) { - var transitions = []; - var length = items.length; - for (var i = 0; i < length; i++) { - pause_children(items[i].e, transitions, true); - } - var is_controlled = length > 0 && transitions.length === 0 && controlled_anchor !== null; - if (is_controlled) { - var parent_node = ( - /** @type {Element} */ - /** @type {Element} */ - controlled_anchor.parentNode - ); - clear_text_content(parent_node); - parent_node.append( - /** @type {Element} */ - controlled_anchor - ); - items_map.clear(); - link(state2, items[0].prev, items[length - 1].next); - } - run_out_transitions(transitions, () => { - for (var i2 = 0; i2 < length; i2++) { - var item = items[i2]; - if (!is_controlled) { - items_map.delete(item.k); - link(state2, item.prev, item.next); - } - destroy_effect(item.e, !is_controlled); - } - }); -} -function each(node, flags, get_collection, get_key, render_fn, fallback_fn = null) { - var anchor = node; - var state2 = { flags, items: /* @__PURE__ */ new Map(), first: null }; - var is_controlled = (flags & EACH_IS_CONTROLLED) !== 0; - if (is_controlled) { - var parent_node = ( - /** @type {Element} */ - node - ); - anchor = hydrating ? set_hydrate_node( - /** @type {Comment | Text} */ - get_first_child(parent_node) - ) : parent_node.appendChild(create_text()); - } - if (hydrating) { - hydrate_next(); - } - var fallback2 = null; - var was_empty = false; - block(() => { - var collection = get_collection(); - var array = is_array(collection) ? collection : collection == null ? [] : array_from(collection); - var length = array.length; - if (was_empty && length === 0) { - return; - } - was_empty = length === 0; - let mismatch = false; - if (hydrating) { - var is_else = ( - /** @type {Comment} */ - anchor.data === HYDRATION_START_ELSE - ); - if (is_else !== (length === 0)) { - anchor = remove_nodes(); - set_hydrate_node(anchor); - set_hydrating(false); - mismatch = true; - } - } - if (hydrating) { - var prev = null; - var item; - for (var i = 0; i < length; i++) { - if (hydrate_node.nodeType === 8 && /** @type {Comment} */ - hydrate_node.data === HYDRATION_END) { - anchor = /** @type {Comment} */ - hydrate_node; - mismatch = true; - set_hydrating(false); - break; - } - var value = array[i]; - var key = get_key(value, i); - item = create_item(hydrate_node, state2, prev, null, value, key, i, render_fn, flags); - state2.items.set(key, item); - prev = item; - } - if (length > 0) { - set_hydrate_node(remove_nodes()); - } - } - if (!hydrating) { - var effect2 = ( - /** @type {Effect} */ - active_reaction - ); - reconcile(array, state2, anchor, render_fn, flags, (effect2.f & INERT) !== 0, get_key); - } - if (fallback_fn !== null) { - if (length === 0) { - if (fallback2) { - resume_effect(fallback2); - } else { - fallback2 = branch(() => fallback_fn(anchor)); - } - } else if (fallback2 !== null) { - pause_effect(fallback2, () => { - fallback2 = null; - }); - } - } - if (mismatch) { - set_hydrating(true); - } - get_collection(); - }); - if (hydrating) { - anchor = hydrate_node; - } -} -function reconcile(array, state2, anchor, render_fn, flags, is_inert, get_key) { - var is_animated = (flags & EACH_IS_ANIMATED) !== 0; - var should_update = (flags & (EACH_ITEM_REACTIVE | EACH_INDEX_REACTIVE)) !== 0; - var length = array.length; - var items = state2.items; - var first = state2.first; - var current = first; - var seen; - var prev = null; - var to_animate; - var matched = []; - var stashed = []; - var value; - var key; - var item; - var i; - if (is_animated) { - for (i = 0; i < length; i += 1) { - value = array[i]; - key = get_key(value, i); - item = items.get(key); - if (item !== void 0) { - item.a?.measure(); - (to_animate ??= /* @__PURE__ */ new Set()).add(item); - } - } - } - for (i = 0; i < length; i += 1) { - value = array[i]; - key = get_key(value, i); - item = items.get(key); - if (item === void 0) { - var child_anchor = current ? ( - /** @type {TemplateNode} */ - current.e.nodes_start - ) : anchor; - prev = create_item( - child_anchor, - state2, - prev, - prev === null ? state2.first : prev.next, - value, - key, - i, - render_fn, - flags - ); - items.set(key, prev); - matched = []; - stashed = []; - current = prev.next; - continue; - } - if (should_update) { - update_item(item, value, i, flags); - } - if ((item.e.f & INERT) !== 0) { - resume_effect(item.e); - if (is_animated) { - item.a?.unfix(); - (to_animate ??= /* @__PURE__ */ new Set()).delete(item); - } - } - if (item !== current) { - if (seen !== void 0 && seen.has(item)) { - 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(state2, a.prev, b.next); - link(state2, prev, a); - link(state2, b, start); - current = start; - prev = b; - i -= 1; - matched = []; - stashed = []; - } else { - seen.delete(item); - move(item, current, anchor); - link(state2, item.prev, item.next); - link(state2, item, prev === null ? state2.first : prev.next); - link(state2, prev, item); - prev = item; - } - continue; - } - matched = []; - stashed = []; - while (current !== null && current.k !== key) { - if (is_inert || (current.e.f & INERT) === 0) { - (seen ??= /* @__PURE__ */ new Set()).add(current); - } - stashed.push(current); - current = current.next; - } - if (current === null) { - continue; - } - item = current; - } - matched.push(item); - prev = item; - current = item.next; - } - if (current !== null || seen !== void 0) { - var to_destroy = seen === void 0 ? [] : array_from(seen); - while (current !== null) { - if (is_inert || (current.e.f & INERT) === 0) { - to_destroy.push(current); - } - current = current.next; - } - var destroy_length = to_destroy.length; - if (destroy_length > 0) { - var controlled_anchor = (flags & EACH_IS_CONTROLLED) !== 0 && length === 0 ? anchor : null; - if (is_animated) { - for (i = 0; i < destroy_length; i += 1) { - to_destroy[i].a?.measure(); - } - for (i = 0; i < destroy_length; i += 1) { - to_destroy[i].a?.fix(); - } - } - pause_effects(state2, to_destroy, controlled_anchor, items); - } - } - if (is_animated) { - queue_micro_task(() => { - if (to_animate === void 0) return; - for (item of to_animate) { - item.a?.apply(); - } - }); - } - active_effect.first = state2.first && state2.first.e; - active_effect.last = prev && prev.e; -} -function update_item(item, value, index2, type) { - if ((type & EACH_ITEM_REACTIVE) !== 0) { - internal_set(item.v, value); - } - if ((type & EACH_INDEX_REACTIVE) !== 0) { - internal_set( - /** @type {Value} */ - item.i, - index2 - ); - } else { - item.i = index2; - } -} -function create_item(anchor, state2, prev, next2, value, key, index2, render_fn, flags) { - var previous_each_item = current_each_item; - var reactive = (flags & EACH_ITEM_REACTIVE) !== 0; - var mutable = (flags & EACH_ITEM_IMMUTABLE) === 0; - var v = reactive ? mutable ? mutable_source(value) : source(value) : value; - var i = (flags & EACH_INDEX_REACTIVE) === 0 ? index2 : source(index2); - var item = { - i, - v, - k: key, - a: null, - // @ts-expect-error - e: null, - prev, - next: next2 - }; - current_each_item = item; - try { - item.e = branch(() => render_fn(anchor, v, i), hydrating); - item.e.prev = prev && prev.e; - item.e.next = next2 && next2.e; - if (prev === null) { - state2.first = item; - } else { - prev.next = item; - prev.e.next = item.e; - } - if (next2 !== null) { - next2.prev = item; - next2.e.prev = item.e; - } - return item; - } finally { - current_each_item = previous_each_item; - } -} -function move(item, next2, anchor) { - var end = item.next ? ( - /** @type {TemplateNode} */ - item.next.e.nodes_start - ) : anchor; - var dest = next2 ? ( - /** @type {TemplateNode} */ - next2.e.nodes_start - ) : anchor; - var node = ( - /** @type {TemplateNode} */ - item.e.nodes_start - ); - while (node !== end) { - var next_node = ( - /** @type {TemplateNode} */ - get_next_sibling(node) - ); - dest.before(node); - node = next_node; - } -} -function link(state2, prev, next2) { - if (prev === null) { - state2.first = next2; - } else { - prev.next = next2; - prev.e.next = next2 && next2.e; - } - if (next2 !== null) { - next2.prev = prev; - next2.e.prev = prev && prev.e; - } -} - -// node_modules/svelte/src/internal/client/dom/blocks/snippet.js -function snippet(node, get_snippet, ...args) { - var anchor = node; - var snippet2 = noop; - var snippet_effect; - block(() => { - if (snippet2 === (snippet2 = get_snippet())) return; - if (snippet_effect) { - destroy_effect(snippet_effect); - snippet_effect = null; - } - if (DEV && snippet2 == null) { - invalid_snippet(); - } - snippet_effect = branch(() => ( - /** @type {SnippetFn} */ - snippet2(anchor, ...args) - )); - }, EFFECT_TRANSPARENT); - if (hydrating) { - anchor = hydrate_node; - } -} - -// node_modules/svelte/src/internal/client/dom/elements/actions.js -function action(dom, action2, get_value) { - effect(() => { - var payload = untrack(() => action2(dom, get_value?.()) || {}); - if (get_value && payload?.update) { - var inited = false; - var prev = ( - /** @type {any} */ - {} - ); - render_effect(() => { - var value = get_value(); - deep_read_state(value); - if (inited && safe_not_equal(prev, value)) { - prev = value; - payload.update(value); - } - }); - inited = true; - } - if (payload?.destroy) { - return () => ( - /** @type {Function} */ - payload.destroy() - ); - } - }); -} - -// node_modules/svelte/src/internal/client/dom/elements/attributes.js -function remove_input_defaults(input) { - if (!hydrating) return; - var already_removed = false; - var remove_defaults = () => { - if (already_removed) return; - already_removed = true; - if (input.hasAttribute("value")) { - var value = input.value; - set_attribute(input, "value", null); - input.value = value; - } - if (input.hasAttribute("checked")) { - var checked = input.checked; - set_attribute(input, "checked", null); - input.checked = checked; - } - }; - input.__on_r = remove_defaults; - queue_idle_task(remove_defaults); - add_form_reset_listener(); -} -function set_value(element2, value) { - var attributes = element2.__attributes ??= {}; - if (attributes.value === (attributes.value = value) || // @ts-expect-error - // `progress` elements always need their value set when its `0` - element2.value === value && (value !== 0 || element2.nodeName !== "PROGRESS")) - return; - element2.value = value; -} -function set_attribute(element2, attribute, value, skip_warning) { - var attributes = element2.__attributes ??= {}; - if (hydrating) { - attributes[attribute] = element2.getAttribute(attribute); - if (attribute === "src" || attribute === "srcset" || attribute === "href" && element2.nodeName === "LINK") { - if (!skip_warning) { - check_src_in_dev_hydration(element2, attribute, value ?? ""); - } - return; - } - } - if (attributes[attribute] === (attributes[attribute] = value)) return; - if (attribute === "style" && "__styles" in element2) { - element2.__styles = {}; - } - if (attribute === "loading") { - element2[LOADING_ATTR_SYMBOL] = value; - } - if (value == null) { - element2.removeAttribute(attribute); - } else if (typeof value !== "string" && get_setters(element2).includes(attribute)) { - element2[attribute] = value; - } else { - element2.setAttribute(attribute, value); - } -} -var setters_cache = /* @__PURE__ */ new Map(); -function get_setters(element2) { - var setters = setters_cache.get(element2.nodeName); - if (setters) return setters; - setters_cache.set(element2.nodeName, setters = []); - var descriptors; - var proto = get_prototype_of(element2); - var element_proto = Element.prototype; - while (element_proto !== proto) { - descriptors = get_descriptors(proto); - for (var key in descriptors) { - if (descriptors[key].set) { - setters.push(key); - } - } - proto = get_prototype_of(proto); - } - return setters; -} -function check_src_in_dev_hydration(element2, attribute, value) { - if (!DEV) return; - if (attribute === "srcset" && srcset_url_equal(element2, value)) return; - if (src_url_equal(element2.getAttribute(attribute) ?? "", value)) return; - hydration_attribute_changed( - attribute, - element2.outerHTML.replace(element2.innerHTML, element2.innerHTML && "..."), - String(value) - ); -} -function src_url_equal(element_src, url) { - if (element_src === url) return true; - return new URL(element_src, document.baseURI).href === new URL(url, document.baseURI).href; -} -function split_srcset(srcset) { - return srcset.split(",").map((src) => src.trim().split(" ").filter(Boolean)); -} -function srcset_url_equal(element2, srcset) { - var element_urls = split_srcset(element2.srcset); - var urls = split_srcset(srcset); - return urls.length === element_urls.length && urls.every( - ([url, width], i) => width === element_urls[i][1] && // We need to test both ways because Vite will create an a full URL with - // `new URL(asset, import.meta.url).href` for the client when `base: './'`, and the - // relative URLs inside srcset are not automatically resolved to absolute URLs by - // browsers (in contrast to img.src). This means both SSR and DOM code could - // contain relative or absolute URLs. - (src_url_equal(element_urls[i][0], url) || src_url_equal(url, element_urls[i][0])) - ); -} - -// node_modules/svelte/src/internal/client/dom/elements/class.js -function toggle_class(dom, class_name, value) { - if (value) { - if (dom.classList.contains(class_name)) return; - dom.classList.add(class_name); - } else { - if (!dom.classList.contains(class_name)) return; - dom.classList.remove(class_name); - } -} - -// node_modules/svelte/src/internal/client/timing.js -var now = BROWSER ? () => performance.now() : () => Date.now(); -var raf = { - // don't access requestAnimationFrame eagerly outside method - // this allows basic testing of user code without JSDOM - // bunder will eval and remove ternary when the user's app is built - tick: ( - /** @param {any} _ */ - (_) => (BROWSER ? requestAnimationFrame : noop)(_) - ), - now: () => now(), - tasks: /* @__PURE__ */ new Set() -}; - -// node_modules/svelte/src/internal/client/loop.js -function run_tasks(now3) { - raf.tasks.forEach((task) => { - if (!task.c(now3)) { - raf.tasks.delete(task); - task.f(); - } - }); - if (raf.tasks.size !== 0) { - raf.tick(run_tasks); - } -} -function loop(callback) { - 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 -function dispatch_event(element2, type) { - element2.dispatchEvent(new CustomEvent(type)); -} -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(""); -} -function css_to_keyframe(css) { - 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; -} -var linear = (t2) => t2; -function transition(flags, element2, get_fn, get_params) { - var is_intro = (flags & TRANSITION_IN) !== 0; - var is_outro = (flags & TRANSITION_OUT) !== 0; - var is_both = is_intro && is_outro; - var is_global = (flags & TRANSITION_GLOBAL) !== 0; - var direction = is_both ? "both" : is_intro ? "in" : "out"; - var current_options; - var inert = element2.inert; - var intro; - var outro; - function get_options() { - var previous_reaction = active_reaction; - var previous_effect = active_effect; - set_active_reaction(null); - set_active_effect(null); - try { - return current_options ??= get_fn()(element2, get_params?.() ?? /** @type {P} */ - {}, { - direction - }); - } finally { - set_active_reaction(previous_reaction); - set_active_effect(previous_effect); - } - } - var transition2 = { - is_global, - in() { - element2.inert = inert; - if (!is_intro) { - outro?.abort(); - outro?.reset?.(); - return; - } - if (!is_outro) { - intro?.abort(); - } - dispatch_event(element2, "introstart"); - intro = animate(element2, get_options(), outro, 1, () => { - dispatch_event(element2, "introend"); - intro?.abort(); - intro = current_options = void 0; - }); - }, - out(fn) { - if (!is_outro) { - fn?.(); - current_options = void 0; - return; - } - element2.inert = true; - dispatch_event(element2, "outrostart"); - outro = animate(element2, get_options(), intro, 0, () => { - dispatch_event(element2, "outroend"); - fn?.(); - }); - }, - stop: () => { - intro?.abort(); - outro?.abort(); - } - }; - var e = ( - /** @type {Effect} */ - active_effect - ); - (e.transitions ??= []).push(transition2); - if (is_intro && should_intro) { - var run2 = is_global; - if (!run2) { - var block2 = ( - /** @type {Effect | null} */ - e.parent - ); - while (block2 && (block2.f & EFFECT_TRANSPARENT) !== 0) { - while (block2 = block2.parent) { - if ((block2.f & BLOCK_EFFECT) !== 0) break; - } - } - run2 = !block2 || (block2.f & EFFECT_RAN) !== 0; - } - if (run2) { - effect(() => { - untrack(() => transition2.in()); - }); - } - } -} -function animate(element2, options, counterpart, t2, on_finish) { - var is_intro = t2 === 1; - if (is_function(options)) { - var a; - var aborted = false; - queue_micro_task(() => { - if (aborted) return; - var o = options({ direction: is_intro ? "in" : "out" }); - a = animate(element2, o, counterpart, t2, on_finish); - }); - return { - abort: () => { - aborted = true; - a?.abort(); - }, - deactivate: () => a.deactivate(), - reset: () => a.reset(), - t: () => a.t() - }; - } - counterpart?.deactivate(); - if (!options?.duration) { - on_finish(); - return { - abort: noop, - deactivate: noop, - reset: noop, - t: () => t2 - }; - } - const { delay = 0, css, tick: tick2, easing = linear } = options; - var keyframes = []; - if (is_intro && counterpart === void 0) { - if (tick2) { - tick2(0, 1); - } - if (css) { - var styles = css_to_keyframe(css(0, 1)); - keyframes.push(styles, styles); - } - } - var get_t = () => 1 - t2; - var animation2 = element2.animate(keyframes, { duration: delay }); - animation2.onfinish = () => { - var t1 = counterpart?.t() ?? 1 - t2; - counterpart?.abort(); - var delta = t2 - t1; - var duration = ( - /** @type {number} */ - options.duration * Math.abs(delta) - ); - var keyframes2 = []; - if (duration > 0) { - if (css) { - var n2 = Math.ceil(duration / (1e3 / 60)); - for (var i = 0; i <= n2; i += 1) { - var t3 = t1 + delta * easing(i / n2); - var styles2 = css(t3, 1 - t3); - keyframes2.push(css_to_keyframe(styles2)); - } - } - get_t = () => { - var time2 = ( - /** @type {number} */ - /** @type {globalThis.Animation} */ - animation2.currentTime - ); - return t1 + delta * easing(time2 / duration); - }; - if (tick2) { - loop(() => { - if (animation2.playState !== "running") return false; - var t4 = get_t(); - tick2(t4, 1 - t4); - return true; - }); - } - } - animation2 = element2.animate(keyframes2, { duration, fill: "forwards" }); - animation2.onfinish = () => { - get_t = () => t2; - tick2?.(t2, 1 - t2); - on_finish(); - }; - }; - return { - abort: () => { - if (animation2) { - animation2.cancel(); - animation2.effect = null; - animation2.onfinish = noop; - } - }, - deactivate: () => { - on_finish = noop; - }, - reset: () => { - if (t2 === 0) { - tick2?.(1, 0); - } - }, - t: () => get_t() - }; -} - -// node_modules/svelte/src/store/utils.js -function subscribe_to_store(store, run2, invalidate) { - if (store == null) { - run2(void 0); - if (invalidate) invalidate(void 0); - return noop; - } - const unsub = untrack( - () => store.subscribe( - run2, - // @ts-expect-error - invalidate - ) - ); - return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub; -} - -// node_modules/svelte/src/internal/client/reactivity/store.js -var is_store_binding = false; -function store_get(store, store_name, stores) { - const entry = stores[store_name] ??= { - store: null, - source: mutable_source(void 0), - unsubscribe: noop - }; - if (entry.store !== store) { - entry.unsubscribe(); - entry.store = store ?? null; - if (store == null) { - entry.source.v = void 0; - entry.unsubscribe = noop; - } else { - var is_synchronous_callback = true; - entry.unsubscribe = subscribe_to_store(store, (v) => { - if (is_synchronous_callback) { - entry.source.v = v; - } else { - set(entry.source, v); - } - }); - is_synchronous_callback = false; - } - } - return get(entry.source); -} -function setup_stores() { - const stores = {}; - teardown(() => { - for (var store_name in stores) { - const ref = stores[store_name]; - ref.unsubscribe(); - } - }); - return stores; -} -function capture_store_binding(fn) { - var previous_is_store_binding = is_store_binding; - try { - is_store_binding = false; - return [fn(), is_store_binding]; - } finally { - is_store_binding = previous_is_store_binding; - } -} - -// node_modules/svelte/src/internal/client/reactivity/props.js -function with_parent_branch(fn) { - var effect2 = active_effect; - var previous_effect = active_effect; - while (effect2 !== null && (effect2.f & (BRANCH_EFFECT | ROOT_EFFECT)) === 0) { - effect2 = effect2.parent; - } - try { - set_active_effect(effect2); - return fn(); - } finally { - set_active_effect(previous_effect); - } -} -function prop(props, key, flags, fallback2) { - var immutable = (flags & PROPS_IS_IMMUTABLE) !== 0; - var runes = !legacy_mode_flag || (flags & PROPS_IS_RUNES) !== 0; - var bindable = (flags & PROPS_IS_BINDABLE) !== 0; - var lazy = (flags & PROPS_IS_LAZY_INITIAL) !== 0; - var is_store_sub = false; - var prop_value; - if (bindable) { - [prop_value, is_store_sub] = capture_store_binding(() => ( - /** @type {V} */ - props[key] - )); - } else { - prop_value = /** @type {V} */ - props[key]; - } - var setter = get_descriptor(props, key)?.set; - var fallback_value = ( - /** @type {V} */ - fallback2 - ); - var fallback_dirty = true; - var fallback_used = false; - var get_fallback = () => { - fallback_used = true; - if (fallback_dirty) { - fallback_dirty = false; - if (lazy) { - fallback_value = untrack( - /** @type {() => V} */ - fallback2 - ); - } else { - fallback_value = /** @type {V} */ - fallback2; - } - } - return fallback_value; - }; - if (prop_value === void 0 && fallback2 !== void 0) { - if (setter && runes) { - props_invalid_value(key); - } - prop_value = get_fallback(); - if (setter) setter(prop_value); - } - var getter; - if (runes) { - getter = () => { - var value = ( - /** @type {V} */ - props[key] - ); - if (value === void 0) return get_fallback(); - fallback_dirty = true; - fallback_used = false; - return value; - }; - } else { - var derived_getter = with_parent_branch( - () => (immutable ? derived : derived_safe_equal)(() => ( - /** @type {V} */ - props[key] - )) - ); - derived_getter.f |= LEGACY_DERIVED_PROP; - getter = () => { - var value = get(derived_getter); - if (value !== void 0) fallback_value = /** @type {V} */ - void 0; - return value === void 0 ? fallback_value : value; - }; - } - if ((flags & PROPS_IS_UPDATED) === 0) { - return getter; - } - if (setter) { - var legacy_parent = props.$$legacy; - return function(value, mutation) { - if (arguments.length > 0) { - if (!runes || !mutation || legacy_parent || is_store_sub) { - setter(mutation ? getter() : value); - } - return value; - } else { - return getter(); - } - }; - } - var from_child = false; - var was_from_child = false; - var inner_current_value = mutable_source(prop_value); - var current_value = with_parent_branch( - () => derived(() => { - var parent_value = getter(); - var child_value = get(inner_current_value); - if (from_child) { - from_child = false; - was_from_child = true; - return child_value; - } - was_from_child = false; - return inner_current_value.v = parent_value; - }) - ); - if (!immutable) current_value.equals = safe_equals; - return function(value, mutation) { - if (is_signals_recorded) { - from_child = was_from_child; - getter(); - get(inner_current_value); - } - if (arguments.length > 0) { - const new_value = mutation ? get(current_value) : runes && bindable ? proxy(value) : value; - if (!current_value.equals(new_value)) { - from_child = true; - set(inner_current_value, new_value); - if (fallback_used && fallback_value !== void 0) { - fallback_value = new_value; - } - untrack(() => get(current_value)); - } - return value; - } - return get(current_value); - }; -} - -// node_modules/svelte/src/legacy/legacy-client.js -function createClassComponent(options) { - return new Svelte4Component(options); -} -var Svelte4Component = class { - /** @type {any} */ - #events; - /** @type {Record} */ - #instance; - /** - * @param {ComponentConstructorOptions & { - * component: any; - * }} options - */ - constructor(options) { - var sources = /* @__PURE__ */ new Map(); - var add_source = (key, value) => { - var s2 = mutable_source(value); - sources.set(key, s2); - return s2; - }; - const props = new Proxy( - { ...options.props || {}, $$events: {} }, - { - get(target, prop2) { - return get(sources.get(prop2) ?? add_source(prop2, Reflect.get(target, prop2))); - }, - has(target, prop2) { - get(sources.get(prop2) ?? add_source(prop2, Reflect.get(target, prop2))); - return Reflect.has(target, prop2); - }, - set(target, prop2, value) { - set(sources.get(prop2) ?? add_source(prop2, value), value); - return Reflect.set(target, prop2, value); - } - } - ); - this.#instance = (options.hydrate ? hydrate : mount)(options.component, { - target: options.target, - anchor: options.anchor, - props, - context: options.context, - intro: options.intro ?? false, - recover: options.recover - }); - if (!options?.props?.$$host || options.sync === false) { - flush_sync(); - } - this.#events = props.$$events; - for (const key of Object.keys(this.#instance)) { - if (key === "$set" || key === "$destroy" || key === "$on") continue; - define_property(this, key, { - get() { - return this.#instance[key]; - }, - /** @param {any} value */ - set(value) { - this.#instance[key] = value; - }, - enumerable: true - }); - } - this.#instance.$set = /** @param {Record} next */ - (next2) => { - Object.assign(props, next2); - }; - this.#instance.$destroy = () => { - unmount(this.#instance); - }; - } - /** @param {Record} props */ - $set(props) { - this.#instance.$set(props); - } - /** - * @param {string} event - * @param {(...args: any[]) => any} callback - * @returns {any} - */ - $on(event2, callback) { - this.#events[event2] = this.#events[event2] || []; - const cb = (...args) => callback.call(this, ...args); - this.#events[event2].push(cb); - return () => { - this.#events[event2] = this.#events[event2].filter( - /** @param {any} fn */ - (fn) => fn !== cb - ); - }; - } - $destroy() { - this.#instance.$destroy(); - } -}; - -// node_modules/svelte/src/internal/client/dom/elements/custom-element.js -var SvelteElement; -if (typeof HTMLElement === "function") { - SvelteElement = class extends HTMLElement { - /** The Svelte component constructor */ - $$ctor; - /** Slots */ - $$s; - /** @type {any} The Svelte component instance */ - $$c; - /** Whether or not the custom element is connected */ - $$cn = false; - /** @type {Record} Component props data */ - $$d = {}; - /** `true` if currently in the process of reflecting component props back to attributes */ - $$r = false; - /** @type {Record} Props definition (name, reflected, type etc) */ - $$p_d = {}; - /** @type {Record} Event listeners */ - $$l = {}; - /** @type {Map} Event listener unsubscribe functions */ - $$l_u = /* @__PURE__ */ new Map(); - /** @type {any} The managed render effect for reflecting attributes */ - $$me; - /** - * @param {*} $$componentCtor - * @param {*} $$slots - * @param {*} use_shadow_dom - */ - constructor($$componentCtor, $$slots, use_shadow_dom) { - super(); - this.$$ctor = $$componentCtor; - this.$$s = $$slots; - if (use_shadow_dom) { - this.attachShadow({ mode: "open" }); - } - } - /** - * @param {string} type - * @param {EventListenerOrEventListenerObject} listener - * @param {boolean | AddEventListenerOptions} [options] - */ - addEventListener(type, listener, options) { - this.$$l[type] = this.$$l[type] || []; - this.$$l[type].push(listener); - if (this.$$c) { - const unsub = this.$$c.$on(type, listener); - this.$$l_u.set(listener, unsub); - } - super.addEventListener(type, listener, options); - } - /** - * @param {string} type - * @param {EventListenerOrEventListenerObject} listener - * @param {boolean | AddEventListenerOptions} [options] - */ - removeEventListener(type, listener, options) { - super.removeEventListener(type, listener, options); - if (this.$$c) { - const unsub = this.$$l_u.get(listener); - if (unsub) { - unsub(); - this.$$l_u.delete(listener); - } - } - } - async connectedCallback() { - this.$$cn = true; - if (!this.$$c) { - let create_slot = function(name2) { - return (anchor) => { - const slot2 = document.createElement("slot"); - if (name2 !== "default") slot2.name = name2; - append(anchor, slot2); - }; - }; - await Promise.resolve(); - if (!this.$$cn || this.$$c) { - return; - } - const $$slots = {}; - const existing_slots = get_custom_elements_slots(this); - for (const name2 of this.$$s) { - if (name2 in existing_slots) { - if (name2 === "default" && !this.$$d.children) { - this.$$d.children = create_slot(name2); - $$slots.default = true; - } else { - $$slots[name2] = create_slot(name2); - } - } - } - for (const attribute of this.attributes) { - const name2 = this.$$g_p(attribute.name); - if (!(name2 in this.$$d)) { - this.$$d[name2] = get_custom_element_value(name2, attribute.value, this.$$p_d, "toProp"); - } - } - for (const key in this.$$p_d) { - if (!(key in this.$$d) && this[key] !== void 0) { - this.$$d[key] = this[key]; - delete this[key]; - } - } - this.$$c = createClassComponent({ - component: this.$$ctor, - target: this.shadowRoot || this, - props: { - ...this.$$d, - $$slots, - $$host: this - } - }); - this.$$me = effect_root(() => { - render_effect(() => { - this.$$r = true; - for (const key of object_keys(this.$$c)) { - if (!this.$$p_d[key]?.reflect) continue; - this.$$d[key] = this.$$c[key]; - const attribute_value = get_custom_element_value( - key, - this.$$d[key], - this.$$p_d, - "toAttribute" - ); - if (attribute_value == null) { - this.removeAttribute(this.$$p_d[key].attribute || key); - } else { - this.setAttribute(this.$$p_d[key].attribute || key, attribute_value); - } - } - this.$$r = false; - }); - }); - for (const type in this.$$l) { - for (const listener of this.$$l[type]) { - const unsub = this.$$c.$on(type, listener); - this.$$l_u.set(listener, unsub); - } - } - this.$$l = {}; - } - } - // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte - // and setting attributes through setAttribute etc, this is helpful - /** - * @param {string} attr - * @param {string} _oldValue - * @param {string} newValue - */ - attributeChangedCallback(attr, _oldValue, newValue) { - if (this.$$r) return; - attr = this.$$g_p(attr); - this.$$d[attr] = get_custom_element_value(attr, newValue, this.$$p_d, "toProp"); - this.$$c?.$set({ [attr]: this.$$d[attr] }); - } - disconnectedCallback() { - this.$$cn = false; - Promise.resolve().then(() => { - if (!this.$$cn && this.$$c) { - this.$$c.$destroy(); - this.$$me(); - this.$$c = void 0; - } - }); - } - /** - * @param {string} attribute_name - */ - $$g_p(attribute_name) { - return object_keys(this.$$p_d).find( - (key) => this.$$p_d[key].attribute === attribute_name || !this.$$p_d[key].attribute && key.toLowerCase() === attribute_name - ) || attribute_name; - } - }; -} -function get_custom_element_value(prop2, value, props_definition, transform) { - const type = props_definition[prop2]?.type; - value = type === "Boolean" && typeof value !== "boolean" ? value != null : value; - if (!transform || !props_definition[prop2]) { - return value; - } else if (transform === "toAttribute") { - switch (type) { - case "Object": - case "Array": - return value == null ? null : JSON.stringify(value); - case "Boolean": - return value ? "" : null; - case "Number": - return value == null ? null : value; - default: - return value; - } - } else { - switch (type) { - case "Object": - case "Array": - return value && JSON.parse(value); - case "Boolean": - return value; - // conversion already handled above - case "Number": - return value != null ? +value : value; - default: - return value; - } - } -} -function get_custom_elements_slots(element2) { - const result = {}; - element2.childNodes.forEach((node) => { - result[ - /** @type {Element} node */ - node.slot || "default" - ] = true; - }); - return result; -} - -// node_modules/svelte/src/version.js -var PUBLIC_VERSION = "5"; - -// node_modules/svelte/src/internal/disclose-version.js -if (typeof window !== "undefined") - (window.__svelte ||= { v: /* @__PURE__ */ new Set() }).v.add(PUBLIC_VERSION); - -// node_modules/svelte/src/store/shared/index.js -var subscriber_queue = []; -function readable(value, start) { - return { - subscribe: writable(value, start).subscribe - }; -} -function writable(value, start = noop) { - let stop = null; - const subscribers = /* @__PURE__ */ new Set(); - function set2(new_value) { - if (safe_not_equal(value, new_value)) { - value = new_value; - if (stop) { - const run_queue = !subscriber_queue.length; - for (const subscriber of subscribers) { - subscriber[1](); - subscriber_queue.push(subscriber, value); - } - if (run_queue) { - for (let i = 0; i < subscriber_queue.length; i += 2) { - subscriber_queue[i][0](subscriber_queue[i + 1]); - } - subscriber_queue.length = 0; - } - } - } - } - function update2(fn) { - set2(fn( - /** @type {T} */ - value - )); - } - function subscribe(run2, invalidate = noop) { - const subscriber = [run2, invalidate]; - subscribers.add(subscriber); - if (subscribers.size === 1) { - stop = start(set2, update2) || noop; - } - run2( - /** @type {T} */ - value - ); - return () => { - subscribers.delete(subscriber); - if (subscribers.size === 0 && stop) { - stop(); - stop = null; - } - }; - } - return { set: set2, update: update2, subscribe }; -} -function derived2(stores, fn, initial_value) { - const single = !Array.isArray(stores); - const stores_array = single ? [stores] : stores; - if (!stores_array.every(Boolean)) { - throw new Error("derived() expects stores as input, got a falsy value"); - } - const auto = fn.length < 2; - return readable(initial_value, (set2, update2) => { - let started = false; - const values = []; - let pending = 0; - let cleanup = noop; - const sync = () => { - if (pending) { - return; - } - cleanup(); - const result = fn(single ? values[0] : values, set2, update2); - if (auto) { - set2(result); - } else { - cleanup = typeof result === "function" ? result : noop; - } - }; - const unsubscribers = stores_array.map( - (store, i) => subscribe_to_store( - store, - (value) => { - values[i] = value; - pending &= ~(1 << i); - if (started) { - sync(); - } - }, - () => { - pending |= 1 << i; - } - ) - ); - started = true; - sync(); - return function stop() { - run_all(unsubscribers); - cleanup(); - started = false; - }; - }); -} - -// src/lib/cacheable.ts -function cacheable(key, initial, local) { - const { subscribe, set: set2 } = writable(initial); - const store = typeof window === "object" ? local ? localStorage : sessionStorage : void 0; - const item = store?.getItem(key) || ""; - try { - initial = item ? JSON.parse(item) : initial; - } catch { - initial = initial; - } - sync(initial); - function sync(value) { - store?.setItem(key, JSON.stringify(value)); - initial = value; - return set2(initial); - } - return { - get: () => initial, - set: (value) => sync(value), - update: (fn) => sync(fn(initial)), - remove: () => store?.removeItem(key), - clear: () => store?.clear(), - subscribe - }; -} - -// src/lib/utils.ts -function random(length) { - return Math.floor(Math.random() * length); -} -function t(en, ru) { - return locale() === "ru" ? ru : en; -} -function locale() { - return navigator.language.includes("ru") ? "ru" : "en"; -} -function convert(en, count = 0) { - const RU = locale() === "ru"; - const FIRSTABLE = count === 1 || count > 20 && String(count).endsWith("1"); - const SECONDABLE = [2, 3, 4].includes(count); - const trans = { - years: FIRSTABLE ? "\u0433\u043E\u0434" : SECONDABLE ? "\u0433\u043E\u0434\u0430" : "\u043B\u0435\u0442", - months: !count || count > 4 ? "\u043C\u0435\u0441\u044F\u0446\u0435\u0432" : SECONDABLE ? "\u043C\u0435\u0441\u044F\u0446\u0430" : "\u043C\u0435\u0441\u044F\u0446", - days: FIRSTABLE ? "\u0434\u0435\u043D\u044C" : SECONDABLE ? "\u0434\u043D\u044F" : "\u0434\u043D\u0435\u0439", - weeks: FIRSTABLE ? "\u043D\u0435\u0434\u0435\u043B\u044F" : SECONDABLE ? "\u043D\u0435\u0434\u0435\u043B\u0438" : "\u043D\u0435\u0434\u0435\u043B\u044C", - hours: FIRSTABLE ? "\u0447\u0430\u0441" : SECONDABLE ? "\u0447\u0430\u0441\u0430" : "\u0447\u0430\u0441\u043E\u0432" - }; - return RU ? trans[en] : count === 1 ? en.substring(0, en.length - 1) : en; -} - -// src/lib/quotes.ts -var quotes = createQuotes(); -function createQuotes() { - const { subscribe, set: set2, get: get3, update: update2 } = cacheable("County_Quotes", [], true); - return { - subscribe, - set: set2, - get: get3, - update: update2, - async load() { - if (!get3().length) { - const url = `./assets/quotes_${locale()}.json`; - const res = await fetch(url); - set2(await res.json()); - } - }, - random(id) { - return get3()[random(get3().length - id)]; - } - }; -} - -// src/lib/dates.ts -var dates = createDates(); -function createDates() { - const { subscribe, get: get3, set: set2, update: update2 } = cacheable("County_Dates", [], true); - return { - subscribe, - get: get3, - set: set2, - update: update2, - add(date2) { - update2((dates2) => dates2.concat(date2)); - }, - change(id, value) { - dates.update( - (dates2) => dates2.map((d, i) => i === Number(id) ? Object.assign(d, value) : d) - ); - }, - del(id) { - dates.update((dates2) => dates2.filter((d, i) => i !== id)); - }, - quote(id) { - this.change(id, { quote: quotes.random(id) }); - } - }; -} -var date = readable((/* @__PURE__ */ new Date()).toLocaleDateString("en-CA")); -var time = readable((/* @__PURE__ */ new Date()).toLocaleTimeString("ru"), (set2) => { - const interval = setInterval(() => { - const date2 = (/* @__PURE__ */ new Date()).toLocaleTimeString("ru"); - set2(date2); - }, 1e3); - return () => clearInterval(interval); -}); - -// src/lib/images.ts -var images = createImages(); -function createImages() { - const { subscribe, set: set2, get: get3, update: update2 } = cacheable( - "County_Images", - [], - true - ); - async function load() { - if (!get3().length) { - const url = "./assets/photos.json"; - const res = await fetch(url); - set2(await res.json()); - } - back(); - } - function back() { - const [{ src, alt }] = prepare(); - document.documentElement.style.cssText = ` - background: url(${src}) center no-repeat; +var vs="county";var qe=Array.isArray,Ar=Array.from,To=Object.keys,Pe=Object.defineProperty,Ce=Object.getOwnPropertyDescriptor,In=Object.getOwnPropertyDescriptors,So=Object.prototype,ys=Array.prototype,mt=Object.getPrototypeOf;function Fo(t){return typeof t=="function"}var R=()=>{};function gs(t){return typeof t?.then=="function"}function ir(t){for(var e=0;er.line)return o.component}return null}var Jl=Symbol("ADD_OWNER");function No(t,e){if(e.owners!==null)for(;t;){if(t.owners===null){e.owners=null;break}for(let r of t.owners)e.owners.add(r);t=t.parent}}function As(t,e){return t.owners===null?!0:t.owners.has(e)||t.parent!==null&&As(t.parent,e)}function Qs(t){return t?.owners?.values().next().value??Qs(t.parent)}var jl=!1;function Bs(t){if(jl)return;let e=Cs();if(e&&!As(t,e)){let r=Qs(t);r[ye]!==e[ye]?Do(e[ye],r[ye]):Do()}}function K(t,e=null,r){if(typeof t!="object"||t===null||Ye in t)return t;let n=mt(t);if(n!==So&&n!==ys)return t;var o=new Map,i=qe(t),s=H(0);i&&o.set("length",H(t.length));var a;if(!1)if(a={parent:e,owners:null},r){let l=r.v?.[Bt]?.owners;a.owners=l?new Set(l):null}else a.owners=e===null?I!==null?new Set([I.function]):null:new Set;return new Proxy(t,{defineProperty(l,u,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&Fs();var f=o.get(u);return f===void 0?(f=H(c.value),o.set(u,f)):C(f,K(c.value,a)),!0},deleteProperty(l,u){var c=o.get(u);if(c===void 0)u in l&&o.set(u,H(fe));else{if(i&&typeof u=="string"){var f=o.get("length"),d=Number(u);Number.isInteger(d)&&d=v.v&&C(v,$+1)}Rs(s)}return!0},ownKeys(l){k(s);var u=Reflect.ownKeys(l).filter(d=>{var m=o.get(d);return m===void 0||m.v!==fe});for(var[c,f]of o)f.v!==fe&&!(c in l)&&u.push(c);return u},setPrototypeOf(){ks()}})}function Rs(t,e=1){C(t,t.v+e)}function Yt(t){return t!==null&&typeof t=="object"&&Ye in t?t[Ye]:t}function Vs(){let t=Array.prototype,e=Array.__svelte_cleanup;e&&e();let{indexOf:r,lastIndexOf:n,includes:o}=t;t.indexOf=function(i,s){let a=r.call(this,i,s);return a===-1&&r.call(Yt(this),Yt(i),s)!==-1&&Nn("array.indexOf(...)"),a},t.lastIndexOf=function(i,s){let a=n.call(this,i,s??this.length-1);return a===-1&&n.call(Yt(this),Yt(i),s??this.length-1)!==-1&&Nn("array.lastIndexOf(...)"),a},t.includes=function(i,s){let a=o.call(this,i,s);return a||o.call(Yt(this),Yt(i),s)&&Nn("array.includes(...)"),a},Array.__svelte_cleanup=()=>{t.indexOf=r,t.lastIndexOf=n,t.includes=o}}var Uo,Ln,Ws,Hs;function Mn(){if(Uo===void 0){Uo=window,Ln=document;var t=Element.prototype,e=Node.prototype;Ws=Ce(e,"firstChild").get,Hs=Ce(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0,!1}}function ge(t=""){return document.createTextNode(t)}function P(t){return Ws.call(t)}function ne(t){return Hs.call(t)}function U(t,e){if(!w)return P(t);var r=P(T);if(r===null)r=T.appendChild(ge());else if(e&&r.nodeType!==3){var n=ge();return r?.before(n),V(n),n}return V(r),r}function $e(t,e){if(!w){var r=P(t);return r instanceof Comment&&r.data===""?ne(r):r}if(e&&T?.nodeType!==3){var n=ge();return T?.before(n),V(n),n}return T}function oe(t,e=1,r=!1){let n=w?T:t;for(;e--;)n=ne(n);if(!w)return n;var o=n.nodeType;if(r&&o!==3){var i=ge();return n?.before(i),V(i),i}return V(n),n}function Wr(t){t.textContent=""}function Ft(t){var e=1026;F===null?e|=128:F.f|=524288;let r={children:null,ctx:I,deps:null,equals:Dn,f:e,fn:t,reactions:null,v:null,version:0,parent:F};if(O!==null&&O.f&2){var n=O;(n.children??=[]).push(r)}return r}function Ao(t){let e=Ft(t);return e.equals=sr,e}function Mo(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r{Te(e)}}function Ve(t){return fr(4,t,!1)}function Ee(t){return fr(8,t,!0)}function z(t){return!1,me(t)}function me(t,e=0){return fr(24|e,t,!0)}function G(t,e=!0){return fr(40,t,!0,e)}function zo(t){var e=t.teardown;if(e!==null){let r=Jo,n=O;Ro(!0),ie(null);try{e.call(null)}finally{Ro(r),ie(n)}}}function Zo(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r{Te(t),e&&e()})}function Yo(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var o of t)o.out(n)}else e()}function An(t,e,r){if(!(t.f&4096)){if(t.f^=4096,t.transitions!==null)for(let s of t.transitions)(s.is_global||r)&&e.push(s);for(var n=t.first;n!==null;){var o=n.next,i=(n.f&32768)!==0||(n.f&32)!==0;An(n,e,i?r:!1),n=o}}}function Ke(t){Zs(t,!0)}function Zs(t,e){if(t.f&4096){Tt(t)&&zt(t),t.f^=4096;for(var r=t.first;r!==null;){var n=r.next,o=(r.f&32768)!==0||(r.f&32)!==0;Zs(r,o?e:!1),r=n}if(t.transitions!==null)for(let i of t.transitions)(i.is_global||e)&&i.in()}}var Xl=typeof requestIdleCallback>"u"?t=>setTimeout(t,1):requestIdleCallback,Qn=!1,Bn=!1,jo=[],Go=[];function qs(){Qn=!1;let t=jo.slice();jo=[],ir(t)}function Ps(){Bn=!1;let t=Go.slice();Go=[],ir(t)}function Oe(t){Qn||(Qn=!0,queueMicrotask(qs)),jo.push(t)}function Ys(t){Bn||(Bn=!0,Xl(Ps)),Go.push(t)}function Js(){Qn&&qs(),Bn&&Ps()}var Ks=0,ru=1,js=new WeakSet,Rn=Ks,zr=!1,_t=!1,Jo=!1;function ar(t){_t=t}function Ro(t){Jo=t}var Xt=[],mr=0,Zr=[],O=null;function ie(t){O=t}var F=null;function Y(t){F=t}var Je=null;function Os(t){Je=t}var ce=null,Ne=0,pt=null;function Ns(t){pt=t}var ea=0,kt=!1,Xo=!1,nu=new Set,I=null;function Ko(t){I=t}var ke=null;function Hn(t){ke=t}function On(){return++ea}function Ht(){return!bt||I!==null&&I.l===null}function Tt(t){var e=t.f;if(e&1024)return!0;if(e&2048){var r=t.deps,n=(e&128)!==0;if(r!==null){var o;if(e&256){for(o=0;ot.version)return!0}}n||ve(t,512)}return!1}function ou(t,e,r){if(!!1||js.has(t)||r===null)throw t;let n=[],o=e.fn?.name;o&&n.push(o);let i=r;for(;i!==null;){if(!1){var s=i.function?.[ye];if(s){let u=s.split("/").pop();n.push(u)}}i=i.p}let a=/Firefox/.test(navigator.userAgent)?" ":" ";Pe(t,"message",{value:t.message+` +${n.map(u=>` +${a}in ${u}`).join("")} +`});let l=t.stack;if(l){let u=l.split(` +`),c=[];for(let f=0;f0)for(c.length=Ne+ce.length,f=0;f1e3)if(mr=0,!1)try{ko()}catch(t){throw Pe(t,"stack",{value:""}),console.error("Last ten effects were: ",Zr.slice(-10).map(e=>e.fn)),Zr=[],t}else ko();mr++}function ra(t){var e=t.length;if(e!==0){ta();var r=_t;_t=!0;try{for(var n=0;n1001)return;let t=Xt;Xt=[],ra(t),zr||(mr=0,!1)}function lr(t){Rn===Ks&&(zr||(zr=!0,queueMicrotask(au)));for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&96){if(!(r&512))return;e.f^=512}}Xt.push(e)}function na(t,e){var r=t.first,n=[];e:for(;r!==null;){var o=r.f,i=(o&32)!==0,s=i&&(o&512)!==0;if(!s&&!(o&4096))if(o&8){i?r.f^=512:Tt(r)&&zt(r);var a=r.first;if(a!==null){r=a;continue}}else o&4&&n.push(r);var l=r.next;if(l===null){let f=r.parent;for(;f!==null;){if(t===f)break e;var u=f.next;if(u!==null){r=u;continue e}f=f.parent}}r=l}for(var c=0;c0||o.length>0)&&Kt(),mr=0,!1,n}finally{Rn=e,Xt=r}}function k(t){var e=t.f,r=(e&2)!==0;if(r&&e&8192){var n=Qo(t);return Hr(t),n}if(Xo&&nu.add(t),O!==null){Je!==null&&Je.includes(t)&&$s();var o=O.deps;ce===null&&o!==null&&o[Ne]===t?Ne++:ce===null?ce=[t]:ce.push(t),pt!==null&&F!==null&&F.f&512&&!(F.f&32)&&pt.includes(t)&&(ve(F,1024),lr(F))}else if(r&&t.deps===null){var i=t,s=i.parent;s!==null&&!s.deriveds?.includes(i)&&(s.deriveds??=[]).push(i)}return r&&(i=t,Tt(i)&&Bo(i)),t.v}function X(t){let e=O;try{return O=null,t()}finally{O=e}}var lu=-3585;function ve(t,e){t.f=t.f&lu|e}function xe(t,e=!1,r){I={p:I,c:null,e:null,m:!1,s:t,x:null,l:null},bt&&!e&&(I.l={s:null,u:null,r1:[],r2:H(!1)}),!1}function we(t){let e=I;if(e!==null){t!==void 0&&(e.x=t);let s=e.e;if(s!==null){var r=F,n=O;e.e=null;try{for(var o=0;o{if(r!==void 0)return r;Ss(e)},set:n=>{r=n}})}};t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var oa=!1;function ei(){oa||(oa=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(let e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function ti(t){var e=O,r=F;ie(null),Y(null);try{return t()}finally{ie(e),Y(r)}}var ri=new Set,Zn=new Set;function ia(t,e,r,n){function o(i){if(n.capture||pr.call(e,i),!i.cancelBubble)return ti(()=>r.call(this,i))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Oe(()=>{e.addEventListener(t,o,n)}):e.addEventListener(t,o,n),o}function ni(t,e,r,n,o){var i={capture:n,passive:o},s=ia(t,e,r,i);(e===document.body||e===window||e===document)&&Ie(()=>{e.removeEventListener(t,s,i)})}function $t(t){for(var e=0;e{throw v});throw d}}finally{t.__root=e,delete t.currentTarget,ie(c),Y(f)}}}var We;function sa(){We=void 0}function oi(t){let e=null,r=w;var n;if(w){for(e=T,We===void 0&&(We=P(document.head));We!==null&&(We.nodeType!==8||We.data!==Zt);)We=ne(We);We===null?pe(!1):We=V(ne(We))}w||(n=document.head.appendChild(ge()));try{me(()=>t(n),262144)}finally{r&&(pe(!0),We=T,V(e))}}function qr(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function be(t,e){var r=F;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function ee(t,e){var r=(e&1)!==0,n=(e&2)!==0,o,i=!t.startsWith("");return()=>{if(w)return be(T,null),T;o===void 0&&(o=qr(i?t:""+t),r||(o=P(o)));var s=n?document.importNode(o,!0):o.cloneNode(!0);if(r){var a=P(s),l=s.lastChild;be(a,l)}else be(s,s);return s}}function ii(t,e,r="svg"){var n=!t.startsWith(""),o=(e&1)!==0,i=`<${r}>${n?t:""+t}`,s;return()=>{if(w)return be(T,null),T;if(!s){var a=qr(i),l=P(a);if(o)for(s=document.createDocumentFragment();P(l);)s.appendChild(P(l));else s=P(l)}var u=s.cloneNode(!0);if(o){var c=P(u),f=u.lastChild;be(c,f)}else be(u,u);return u}}function si(t=""){if(!w){var e=ge(t+"");return be(e,e),e}var r=T;return r.nodeType!==3&&(r.before(r=ge()),V(r)),be(r,r),r}function vt(){if(w)return be(T,null),T;var t=document.createDocumentFragment(),e=document.createComment(""),r=ge();return t.append(e,r),be(e,r),t}function Q(t,e){if(w){F.nodes_end=T,de();return}t!==null&&t.before(e)}var cu=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory"];var zm=[...cu,"formNoValidate","isMap","noModule","playsInline","readOnly","value","inert","volume"];var fu=["touchstart","touchmove"];function la(t){return fu.includes(t)}var qn=!0;function lt(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function _r(t,e){return ua(t,e)}function li(t,e){Mn(),e.intro=e.intro??!1;let r=e.target,n=w,o=T;try{for(var i=P(r);i&&(i.nodeType!==8||i.data!==Zt);)i=ne(i);if(!i)throw St;pe(!0),V(i),de();let s=ua(t,{...e,anchor:i});if(T===null||T.nodeType!==8||T.data!==Pt)throw ur(),St;return pe(!1),s}catch(s){if(s===St)return e.recover===!1&&bs(),Mn(),Wr(r),pe(!1),_r(t,e);throw s}finally{pe(n),V(o),sa()}}var hr=new Map;function ua(t,{target:e,anchor:r,props:n={},events:o,context:i,intro:s=!0}){Mn();var a=new Set,l=f=>{for(var d=0;d{var f=r??e.appendChild(ge());return G(()=>{if(i){xe({});var d=I;d.c=i}o&&(n.$$events=o),w&&be(f,null),qn=s,u=t(f,n)||{},qn=!0,w&&(F.nodes_end=T),i&&we()}),()=>{for(var d of a){e.removeEventListener(d,pr);var m=hr.get(d);--m===0?(document.removeEventListener(d,pr),hr.delete(d)):hr.set(d,m)}Zn.delete(l),ai.delete(u),f!==r&&f.parentNode?.removeChild(f)}});return ai.set(u,c),u}var ai=new WeakMap;function ui(t){let e=ai.get(t);e?e():!1}var ci=0,Pn=1,fi=2;function di(t,e,r,n,o){w&&de();var i=t,s=Ht(),a=I,l=null,u,c,f,d,m=(s?H:je)(void 0),p=(s?H:je)(void 0),h=!1;function g(v,$){h=!0,$&&(Y(x),ie(x),Ko(a),!1);try{v===ci&&r&&(c?Ke(c):c=G(()=>r(i))),v===Pn&&n&&(f?Ke(f):f=G(()=>n(i,m))),v===fi&&o&&(d?Ke(d):d=G(()=>o(i,p))),v!==ci&&c&&De(c,()=>c=null),v!==Pn&&f&&De(f,()=>f=null),v!==fi&&d&&De(d,()=>d=null)}finally{$&&(!1,Ko(null),ie(null),Y(null),Kt())}}var x=me(()=>{if(u!==(u=e())){if(gs(u)){var v=u;h=!1,v.then($=>{v===u&&(Et(m,$),g(Pn,!0))},$=>{if(v===u&&(Et(p,$),g(fi,!0),!o))throw p.v}),w?r&&(c=G(()=>r(i))):Oe(()=>{h||g(ci,!0)})}else Et(m,u),g(Pn,!1);return()=>u=null}});w&&(i=T)}function he(t,e,r,n=null,o=!1){w&&de();var i=t,s=null,a=null,l=null,u=o?32768:0;me(()=>{if(l===(l=!!e()))return;let c=!1;if(w){let f=i.data===qt;l===f&&(i=Vr(),V(i),pe(!1),c=!0)}l?(s?Ke(s):s=G(()=>r(i)),a&&De(a,()=>{a=null})):(a?Ke(a):n&&(a=G(()=>n(i))),s&&De(s,()=>{s=null})),c&&pe(!0)},u),w&&(i=T)}function mi(t,e,r){w&&de();var n=t,o=fe,i;me(()=>{Rt(o,o=e())&&(i&&De(i),i=G(()=>r(n)))}),w&&(n=T)}var Pr=null;function _i(t,e){return e}function hu(t,e,r,n){for(var o=[],i=e.length,s=0;s0&&o.length===0&&r!==null;if(a){var l=r.parentNode;Wr(l),l.append(r),n.clear(),It(t,e[0].prev,e[i-1].next)}Yo(o,()=>{for(var u=0;u{var d=r(),m=qe(d)?d:d==null?[]:Ar(d),p=m.length;if(f&&p===0)return;f=p===0;let h=!1;if(w){var g=s.data===qt;g!==(p===0)&&(s=Vr(),V(s),pe(!1),h=!0)}if(w){for(var x=null,v,$=0;$0&&V(Vr())}if(!w){var B=O;_u(m,a,s,o,e,(B.f&4096)!==0,n)}i!==null&&(p===0?c?Ke(c):c=G(()=>i(s)):c!==null&&De(c,()=>{c=null})),h&&pe(!0),r()}),w&&(s=T)}function _u(t,e,r,n,o,i,s){var a=(o&8)!==0,l=(o&3)!==0,u=t.length,c=e.items,f=e.first,d=f,m,p=null,h,g=[],x=[],v,$,b,S;if(a)for(S=0;S0){var Wl=o&4&&u===0?r:null;if(a){for(S=0;S{if(h!==void 0)for(b of h)b.a?.apply()}),F.first=e.first&&e.first.e,F.last=p&&p.e}function vu(t,e,r,n){n&1&&Et(t.v,e),n&2?Et(t.i,r):t.i=r}function pa(t,e,r,n,o,i,s,a,l){var u=Pr,c=(l&1)!==0,f=(l&16)===0,d=c?f?je(o):H(o):o,m=l&2?H(s):s,p={i:m,v:d,k:i,a:null,e:null,prev:r,next:n};Pr=p;try{return p.e=G(()=>a(t,d,m),w),p.e.prev=r&&r.e,p.e.next=n&&n.e,r===null?e.first=p:(r.next=p,r.e.next=p.e),n!==null&&(n.prev=p,n.e.prev=p.e),p}finally{Pr=u}}function da(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,o=e?e.e.nodes_start:r,i=t.e.nodes_start;i!==n;){var s=ne(i);o.before(i),i=s}}function It(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function yi(t,e,...r){var n=t,o=R,i;me(()=>{o!==(o=e())&&(i&&(Te(i),i=null),!1,i=G(()=>o(n,...r)))},32768),w&&(n=T)}function gi(t,e,r){Ve(()=>{var n=X(()=>e(t,r?.())||{});if(r&&n?.update){var o=!1,i={};Ee(()=>{var s=r();zn(s),o&&Rt(i,s)&&(i=s,n.update(s))}),o=!0}if(n?.destroy)return()=>n.destroy()})}function Yn(t){if(w){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;W(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var o=t.checked;W(t,"checked",null),t.checked=o}}};t.__on_r=r,Ys(r),ei()}}function Jn(t,e){var r=t.__attributes??={};r.value===(r.value=e)||t.value===e&&(e!==0||t.nodeName!=="PROGRESS")||(t.value=e)}function W(t,e,r,n){var o=t.__attributes??={};if(w&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){n||wu(t,e,r??"");return}o[e]!==(o[e]=r)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[xs]=r),r==null?t.removeAttribute(e):typeof r!="string"&&xu(t).includes(e)?t[e]=r:t.setAttribute(e,r))}var ha=new Map;function xu(t){var e=ha.get(t.nodeName);if(e)return e;ha.set(t.nodeName,e=[]);for(var r,n=mt(t),o=Element.prototype;o!==n;){r=In(n);for(var i in r)r[i].set&&e.push(i);n=mt(n)}return e}function wu(t,e,r){!1}function xi(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function _a(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function bu(t,e){var r=_a(t.srcset),n=_a(e);return n.length===r.length&&n.every(([o,i],s)=>i===r[s][1]&&(xi(r[s][0],o)||xi(o,r[s][0])))}function yt(t,e,r){if(r){if(t.classList.contains(e))return;t.classList.add(e)}else{if(!t.classList.contains(e))return;t.classList.remove(e)}}var Eu=()=>performance.now(),ut={tick:t=>requestAnimationFrame(t),now:()=>Eu(),tasks:new Set};function ya(t){ut.tasks.forEach(e=>{e.c(t)||(ut.tasks.delete(e),e.f())}),ut.tasks.size!==0&&ut.tick(ya)}function ga(t){let e;return ut.tasks.size===0&&ut.tick(ya),{promise:new Promise(r=>{ut.tasks.add(e={c:t,f:r})}),abort(){ut.tasks.delete(e)}}}function jn(t,e){t.dispatchEvent(new CustomEvent(e))}function ku(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;let e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function xa(t){let e={},r=t.split(";");for(let n of r){let[o,i]=n.split(":");if(!o||i===void 0)break;let s=ku(o.trim());e[s]=i.trim()}return e}var $u=t=>t;function bi(t,e,r,n){var o=(t&1)!==0,i=(t&2)!==0,s=o&&i,a=(t&4)!==0,l=s?"both":o?"in":"out",u,c=e.inert,f,d;function m(){var v=O,$=F;ie(null),Y(null);try{return u??=r()(e,n?.()??{},{direction:l})}finally{ie(v),Y($)}}var p={is_global:a,in(){if(e.inert=c,!o){d?.abort(),d?.reset?.();return}i||f?.abort(),jn(e,"introstart"),f=wi(e,m(),d,1,()=>{jn(e,"introend"),f?.abort(),f=u=void 0})},out(v){if(!i){v?.(),u=void 0;return}e.inert=!0,jn(e,"outrostart"),d=wi(e,m(),f,0,()=>{jn(e,"outroend"),v?.()})},stop:()=>{f?.abort(),d?.abort()}},h=F;if((h.transitions??=[]).push(p),o&&qn){var g=a;if(!g){for(var x=h.parent;x&&x.f&32768;)for(;(x=x.parent)&&!(x.f&16););g=!x||(x.f&16384)!==0}g&&Ve(()=>{X(()=>p.in())})}}function wi(t,e,r,n,o){var i=n===1;if(Fo(e)){var s,a=!1;return Oe(()=>{if(!a){var g=e({direction:i?"in":"out"});s=wi(t,g,r,n,o)}}),{abort:()=>{a=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(r?.deactivate(),!e?.duration)return o(),{abort:R,deactivate:R,reset:R,t:()=>n};let{delay:l=0,css:u,tick:c,easing:f=$u}=e;var d=[];if(i&&r===void 0&&(c&&c(0,1),u)){var m=xa(u(0,1));d.push(m,m)}var p=()=>1-n,h=t.animate(d,{duration:l});return h.onfinish=()=>{var g=r?.t()??1-n;r?.abort();var x=n-g,v=e.duration*Math.abs(x),$=[];if(v>0){if(u)for(var b=Math.ceil(v/16.666666666666668),S=0;S<=b;S+=1){var B=g+x*f(S/b),te=u(B,1-B);$.push(xa(te))}p=()=>{var j=h.currentTime;return g+x*f(j/v)},c&&ga(()=>{if(h.playState!=="running")return!1;var j=p();return c(j,1-j),!0})}h=t.animate($,{duration:v,fill:"forwards"}),h.onfinish=()=>{p=()=>n,c?.(n,1-n),o()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=R)},deactivate:()=>{o=R},reset:()=>{n===0&&c?.(1,0)},t:()=>p()}}function Xn(t,e,r){if(t==null)return e(void 0),r&&r(void 0),R;let n=X(()=>t.subscribe(e,r));return n.unsubscribe?()=>n.unsubscribe():n}var Kn=!1;function vr(t,e,r){let n=r[e]??={store:null,source:je(void 0),unsubscribe:R};if(n.store!==t)if(n.unsubscribe(),n.store=t??null,t==null)n.source.v=void 0,n.unsubscribe=R;else{var o=!0;n.unsubscribe=Xn(t,i=>{o?n.source.v=i:C(n.source,i)}),o=!1}return k(n.source)}function Yr(){let t={};return Ie(()=>{for(var e in t)t[e].unsubscribe()}),t}function Ei(t){var e=Kn;try{return Kn=!1,[t(),Kn]}finally{Kn=e}}function ba(t){for(var e=F,r=F;e!==null&&!(e.f&96);)e=e.parent;try{return Y(e),t()}finally{Y(r)}}function se(t,e,r,n){var o=(r&1)!==0,i=!bt||(r&2)!==0,s=(r&8)!==0,a=(r&16)!==0,l=!1,u;s?[u,l]=Ei(()=>t[e]):u=t[e];var c=Ce(t,e)?.set,f=n,d=!0,m=!1,p=()=>(m=!0,d&&(d=!1,a?f=X(n):f=n),f);u===void 0&&n!==void 0&&(c&&i&&Ts(e),u=p(),c&&c(u));var h;if(i)h=()=>{var B=t[e];return B===void 0?p():(d=!0,m=!1,B)};else{var g=ba(()=>(o?Ft:Ao)(()=>t[e]));g.f|=65536,h=()=>{var B=k(g);return B!==void 0&&(f=void 0),B===void 0?f:B}}if(!(r&4))return h;if(c){var x=t.$$legacy;return function(B,te){return arguments.length>0?((!i||!te||x||l)&&c(te?h():B),B):h()}}var v=!1,$=!1,b=je(u),S=ba(()=>Ft(()=>{var B=h(),te=k(b);return v?(v=!1,$=!0,te):($=!1,b.v=B)}));return o||(S.equals=sr),function(B,te){if(Xo&&(v=$,h(),k(b)),arguments.length>0){let j=te?k(S):i&&s?K(B):B;return S.equals(j)||(v=!0,C(b,j),m&&f!==void 0&&(f=j),X(()=>k(S))),B}return k(S)}}function Ea(t){return new Ti(t)}var Ti=class{#t;#e;constructor(e){var r=new Map,n=(i,s)=>{var a=je(s);return r.set(i,a),a};let o=new Proxy({...e.props||{},$$events:{}},{get(i,s){return k(r.get(s)??n(s,Reflect.get(i,s)))},has(i,s){return k(r.get(s)??n(s,Reflect.get(i,s))),Reflect.has(i,s)},set(i,s,a){return C(r.get(s)??n(s,a),a),Reflect.set(i,s,a)}});this.#e=(e.hydrate?li:_r)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&Kt(),this.#t=o.$$events;for(let i of Object.keys(this.#e))i==="$set"||i==="$destroy"||i==="$on"||Pe(this,i,{get(){return this.#e[i]},set(s){this.#e[i]=s},enumerable:!0});this.#e.$set=i=>{Object.assign(o,i)},this.#e.$destroy=()=>{ui(this.#e)}}$set(e){this.#e.$set(e)}$on(e,r){this.#t[e]=this.#t[e]||[];let n=(...o)=>r.call(this,...o);return this.#t[e].push(n),()=>{this.#t[e]=this.#t[e].filter(o=>o!==n)}}$destroy(){this.#e.$destroy()}};var Hu;typeof HTMLElement=="function"&&(Hu=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,r){super(),this.$$ctor=t,this.$$s=e,r&&this.attachShadow({mode:"open"})}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){let n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){let n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return o=>{let i=document.createElement("slot");n!=="default"&&(i.name=n),Q(o,i)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let e={},r=zu(this);for(let n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(let n of this.attributes){let o=this.$$g_p(n.name);o in this.$$d||(this.$$d[o]=Si(o,n.value,this.$$p_d,"toProp"))}for(let n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=Ea({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=dr(()=>{Ee(()=>{this.$$r=!0;for(let n of To(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];let o=Si(n,this.$$d[n],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,o)}this.$$r=!1})});for(let n in this.$$l)for(let o of this.$$l[n]){let i=this.$$c.$on(n,o);this.$$l_u.set(o,i)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Si(t,r,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return To(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Si(t,e,r,n){let o=r[t]?.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function zu(t){let e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}var Sa="5";typeof window<"u"&&(window.__svelte||={v:new Set}).v.add(Sa);var yr=[];function Jr(t,e){return{subscribe:jr(t,e).subscribe}}function jr(t,e=R){let r=null,n=new Set;function o(a){if(Rt(t,a)&&(t=a,r)){let l=!yr.length;for(let u of n)u[1](),yr.push(u,t);if(l){for(let u=0;u{n.delete(u),n.size===0&&r&&(r(),r=null)}}return{set:o,update:i,subscribe:s}}function Fi(t,e,r){let n=!Array.isArray(t),o=n?[t]:t;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let i=e.length<2;return Jr(r,(s,a)=>{let l=!1,u=[],c=0,f=R,d=()=>{if(c)return;f();let p=e(n?u[0]:u,s,a);i?s(p):f=typeof p=="function"?p:R},m=o.map((p,h)=>Xn(p,g=>{u[h]=g,c&=~(1<{c|=1<e,set:l=>a(l),update:l=>a(l(e)),remove:()=>i?.removeItem(t),clear:()=>i?.clear(),subscribe:n}}function Fa(t){return Math.floor(Math.random()*t)}function ki(t,e){return eo()==="ru"?e:t}function eo(){return navigator.language.includes("ru")?"ru":"en"}function ka(t,e=0){let r=eo()==="ru",n=e===1||e>20&&String(e).endsWith("1"),o=[2,3,4].includes(e),i={years:n?"\u0433\u043E\u0434":o?"\u0433\u043E\u0434\u0430":"\u043B\u0435\u0442",months:!e||e>4?"\u043C\u0435\u0441\u044F\u0446\u0435\u0432":o?"\u043C\u0435\u0441\u044F\u0446\u0430":"\u043C\u0435\u0441\u044F\u0446",days:n?"\u0434\u0435\u043D\u044C":o?"\u0434\u043D\u044F":"\u0434\u043D\u0435\u0439",weeks:n?"\u043D\u0435\u0434\u0435\u043B\u044F":o?"\u043D\u0435\u0434\u0435\u043B\u0438":"\u043D\u0435\u0434\u0435\u043B\u044C",hours:n?"\u0447\u0430\u0441":o?"\u0447\u0430\u0441\u0430":"\u0447\u0430\u0441\u043E\u0432"};return r?i[t]:e===1?t.substring(0,t.length-1):t}var xr=Xu();function Xu(){let{subscribe:t,set:e,get:r,update:n}=gr("County_Quotes",[],!0);return{subscribe:t,set:e,get:r,update:n,async load(){if(!r().length){let o=`./assets/quotes_${eo()}.json`,i=await fetch(o);e(await i.json())}},random(o){return r()[Fa(r().length-o)]}}}var ct=Ku();function Ku(){let{subscribe:t,get:e,set:r,update:n}=gr("County_Dates",[],!0);return{subscribe:t,get:e,set:r,update:n,add(o){n(i=>i.concat(o))},change(o,i){ct.update(s=>s.map((a,l)=>l===Number(o)?Object.assign(a,i):a))},del(o){ct.update(i=>i.filter((s,a)=>a!==o))},quote(o){this.change(o,{quote:xr.random(o)})}}}var $a=Jr(new Date().toLocaleDateString("en-CA")),Ia=Jr(new Date().toLocaleTimeString("ru"),t=>{let e=setInterval(()=>{let r=new Date().toLocaleTimeString("ru");t(r)},1e3);return()=>clearInterval(e)});var to=ec();function ec(){let{subscribe:t,set:e,get:r,update:n}=gr("County_Images",[],!0);async function o(){if(!r().length){let l=await fetch("./assets/photos.json");e(await l.json())}i()}function i(){let[{src:a,alt:l}]=s();document.documentElement.style.cssText=` + background: url(${a}) center no-repeat; background-size: cover; - `; - document.documentElement.title = alt; - } - function prepare(limit = 1, size = { width: window.innerWidth, height: window.innerHeight }) { - const indexes = Array.from( - { length: limit }, - () => Math.floor(Math.random() * 24644) - ); - return get3().reduce( - (acc, [src, aspectRatio, author], id) => { - if (indexes.includes(id)) { - const source2 = { - width: size.height * (aspectRatio / 10), - height: size.height - }; - const max = { width: size.width, height: size.height }; - const query = `?w=${ratio(applyRatio(source2, max).width)}`; - acc.push({ - id, - src: `https://images.unsplash.com/photo-${src}${query}`, - alt: `Image by ${author} from Unsplash`, - ...applyRatio(source2, max) - }); - } - return acc; - }, - [] - ); - function ratio(size2) { - return size2 * devicePixelRatio; - } - function applyRatio(src, size2) { - const ratio2 = Math.min(size2.width / src.width, size2.height, src.height); - return { - width: Math.round(src.width * ratio2), - height: Math.round(src.height * ratio2) - }; - } - } - return { - subscribe, - set: set2, - update: update2, - load, - prepare, - back - }; -} - -// src/lib/components/DateForm.svelte -var root_1 = template(`

`); -var root = template(`
`); -function DateForm($$anchor, $$props) { - push($$props, true); - const $$stores = setup_stores(); - const $date = () => store_get(date, "$date", $$stores); - "use strict"; - let id = prop($$props, "id", 3, 0); - function setDate(e) { - e.preventDefault(); - if ($$props.counter) return; - const data = new FormData(e.target); - const date2 = Object.fromEntries(data); - dates.add(date2); - } - function changeDate(e) { - if (!$$props.counter) return; - const { id: id2, name: name2, value } = e.currentTarget; - const changed = { [name2]: value }; - dates.change(Number(id2), changed); - } - var form = root(); - var fieldset = child(form); - var label = child(fieldset); - var input = child(label); - remove_input_defaults(input); - template_effect(() => set_attribute(input, "id", String(id()))); - input.__input = changeDate; - reset(label); - var label_1 = sibling(label, 2); - var input_1 = child(label_1); - remove_input_defaults(input_1); - template_effect(() => set_attribute(input_1, "id", String(id()))); - template_effect(() => set_attribute(input_1, "placeholder", t("Counter name", "\u0418\u043C\u044F \u0441\u0447\u0451\u0442\u0447\u0438\u043A\u0430"))); - input_1.__change = changeDate; - reset(label_1); - var node = sibling(label_1, 2); - if_block(node, () => !$$props.counter, ($$anchor2) => { - var fieldset_1 = root_1(); - var h2 = child(fieldset_1); - var button = child(h2); - var text2 = child(button, true); - template_effect(() => set_text(text2, t("Add counter", "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u0447\u0451\u0442\u0447\u0438\u043A"))); - reset(button); - reset(h2); - reset(fieldset_1); - append($$anchor2, fieldset_1); - }); - reset(fieldset); - reset(form); - template_effect(() => { - set_attribute(input, "max", $date()); - set_value(input, $$props.counter?.start || $date()); - toggle_class(input, "clear", $$props.counter); - set_value(input_1, $$props.counter?.title || ""); - toggle_class(input_1, "clear", $$props.counter); - }); - event("submit", form, setDate); - append($$anchor, form); - pop(); -} -delegate(["input", "change"]); - -// src/lib/components/Icon.svelte -var root2 = ns_template(``); -function Icon($$anchor, $$props) { - "use strict"; - let id = prop($$props, "id", 3, ""), name2 = prop($$props, "name", 3, "Close"), size = prop($$props, "size", 3, "16px"), color = prop($$props, "color", 3, "currentColor"), rotate = prop($$props, "rotate", 3, 0), spin = prop($$props, "spin", 3, false), style = prop($$props, "style", 3, ""), bordered = prop($$props, "bordered", 3, false); - var svg = root2(); - var use = child(svg); - reset(svg); - template_effect(() => { - set_attribute(svg, "id", id()); - set_attribute(svg, "width", size()); - set_attribute(svg, "height", size()); - set_attribute(svg, "fill", color()); - set_attribute(svg, "style", `transform: rotate(${rotate() ?? ""}deg); --icon-size: ${size() ?? ""}; ${style() ?? ""}`); - toggle_class(svg, "spin", spin()); - toggle_class(svg, "bordered", bordered()); - set_attribute(use, "href", `./assets/sprite.svg#${name2() ?? ""}`); - }); - append($$anchor, svg); -} - -// src/lib/components/Control.svelte -function randomQuote(e) { - const { id } = e.target; - dates.quote(Number(id)); -} -function deleteDate(e) { - const { id } = e.target; - dates.del(Number(id)); -} -var root3 = template(` `, 1); -function Control($$anchor, $$props) { - push($$props, true); - "use strict"; - var fragment = root3(); - var button = first_child(fragment); - button.__click = function(...$$args) { - images.back?.apply(this, $$args); - }; - var node = child(button); - Icon(node, { name: "Images" }); - reset(button); - var button_1 = sibling(button, 2); - button_1.__click = [deleteDate]; - var node_1 = child(button_1); - Icon(node_1, { name: "Delete" }); - reset(button_1); - var button_2 = sibling(button_1, 2); - button_2.__click = [randomQuote]; - var node_2 = child(button_2); - Icon(node_2, { name: "Quote" }); - reset(button_2); - template_effect(() => { - set_attribute(button_1, "id", $$props.active); - set_attribute(button_2, "id", $$props.active); - }); - append($$anchor, fragment); - pop(); -} -delegate(["click"]); - -// src/lib/components/Button.svelte -var root4 = template(``); -function Button($$anchor, $$props) { - push($$props, true); - "use strict"; - let id = prop($$props, "id", 3, ""), type = prop($$props, "type", 15); - function set2(e) { - const { id: id2 } = e.currentTarget; - type(id2); - } - var button = root4(); - button.__click = set2; - var node = child(button); - snippet(node, () => $$props.children ?? noop); - reset(button); - template_effect(() => set_attribute(button, "id", id())); - append($$anchor, button); - pop(); -} -delegate(["click"]); - -// src/lib/components/County.svelte -var root5 = template(`
  • `); -function County($$anchor, $$props) { - push($$props, true); - "use strict"; - let id = prop($$props, "id", 3, ""), type = prop($$props, "type", 15); - var li = root5(); - template_effect(() => set_attribute(li, "id", convert($$props.name, $$props.value))); - var node = child(li); - Button(node, { - get id() { - return id(); - }, - get type() { - return type(); - }, - set type($$value) { - type($$value); - }, - children: ($$anchor2, $$slotProps) => { - next(); - var text2 = text(); - template_effect(() => set_text(text2, $$props.value)); - append($$anchor2, text2); - }, - $$slots: { default: true } - }); - reset(li); - append($$anchor, li); - pop(); -} - -// src/lib/components/Counter.svelte -var root_8 = template(` `, 1); -var root6 = template(`
    `); -function Counter($$anchor, $$props) { - push($$props, true); - "use strict"; - let type = state(""); - var ul = root6(); - var node = child(ul); - if_block( - node, - () => get(type) === "months", - ($$anchor2) => { - County($$anchor2, { - name: "months", - get value() { - return $$props.counter.full.months; - }, - get type() { - return get(type); - }, - set type($$value) { - set(type, proxy($$value)); - } - }); - }, - ($$anchor2) => { - var fragment_1 = comment(); - var node_1 = first_child(fragment_1); - if_block( - node_1, - () => get(type) === "weeks", - ($$anchor3) => { - County($$anchor3, { - name: "weeks", - get value() { - return $$props.counter.full.weeks; - }, - get type() { - return get(type); - }, - set type($$value) { - set(type, proxy($$value)); - } - }); - }, - ($$anchor3) => { - var fragment_3 = comment(); - var node_2 = first_child(fragment_3); - if_block( - node_2, - () => get(type) === "days", - ($$anchor4) => { - County($$anchor4, { - name: "days", - get value() { - return $$props.counter.full.days; - }, - get type() { - return get(type); - }, - set type($$value) { - set(type, proxy($$value)); - } - }); - }, - ($$anchor4) => { - var fragment_5 = comment(); - var node_3 = first_child(fragment_5); - if_block( - node_3, - () => get(type) === "hours", - ($$anchor5) => { - County($$anchor5, { - name: "hours", - get value() { - return $$props.counter.full.hours; - }, - get type() { - return get(type); - }, - set type($$value) { - set(type, proxy($$value)); - } - }); - }, - ($$anchor5) => { - var fragment_7 = root_8(); - var node_4 = first_child(fragment_7); - if_block(node_4, () => $$props.counter.years, ($$anchor6) => { - County($$anchor6, { - name: "years", - id: "hours", - get value() { - return $$props.counter.years; - }, - get type() { - return get(type); - }, - set type($$value) { - set(type, proxy($$value)); - } - }); - }); - var node_5 = sibling(node_4, 2); - if_block(node_5, () => $$props.counter.months, ($$anchor6) => { - County($$anchor6, { - name: "months", - id: "months", - get value() { - return $$props.counter.months; - }, - get type() { - return get(type); - }, - set type($$value) { - set(type, proxy($$value)); - } - }); - }); - var node_6 = sibling(node_5, 2); - if_block(node_6, () => $$props.counter.weeks, ($$anchor6) => { - County($$anchor6, { - name: "weeks", - id: "weeks", - get value() { - return $$props.counter.weeks; - }, - get type() { - return get(type); - }, - set type($$value) { - set(type, proxy($$value)); - } - }); - }); - var node_7 = sibling(node_6, 2); - if_block(node_7, () => $$props.counter.days, ($$anchor6) => { - County($$anchor6, { - name: "days", - id: "days", - get value() { - return $$props.counter.days; - }, - get type() { - return get(type); - }, - set type($$value) { - set(type, proxy($$value)); - } - }); - }); - append($$anchor5, fragment_7); - }, - true - ); - append($$anchor4, fragment_5); - }, - true - ); - append($$anchor3, fragment_3); - }, - true - ); - append($$anchor2, fragment_1); - } - ); - reset(ul); - append($$anchor, ul); - pop(); -} - -// node_modules/svelte/src/transition/index.js -var linear2 = (x) => x; -function fade(node, { delay = 0, duration = 400, easing = linear2 } = {}) { - const o = +getComputedStyle(node).opacity; - return { - delay, - duration, - easing, - css: (t2) => `opacity: ${t2 * o}` - }; -} - -// src/lib/components/Quote.svelte -var root_12 = template(`

    `); -function Quote($$anchor, $$props) { - "use strict"; - var fragment = comment(); - var node = first_child(fragment); - if_block(node, () => $$props.quote, ($$anchor2) => { - var blockquote = root_12(); - const computed_const = derived(() => { - const [text2, author] = $$props.quote; - return { text: text2, author }; - }); - var p = child(blockquote); - var text_1 = child(p, true); - reset(p); - var cite = sibling(p, 2); - var text_2 = child(cite); - reset(cite); - reset(blockquote); - template_effect(() => { - set_text(text_1, get(computed_const).text); - set_text(text_2, `~ ${get(computed_const).author ?? ""}`); - }); - transition(1, blockquote, () => fade); - append($$anchor2, blockquote); - }); - append($$anchor, fragment); -} - -// node_modules/luxon/src/errors.js -var LuxonError = class extends Error { -}; -var InvalidDateTimeError = class extends LuxonError { - constructor(reason) { - super(`Invalid DateTime: ${reason.toMessage()}`); - } -}; -var InvalidIntervalError = class extends LuxonError { - constructor(reason) { - super(`Invalid Interval: ${reason.toMessage()}`); - } -}; -var InvalidDurationError = class extends LuxonError { - constructor(reason) { - super(`Invalid Duration: ${reason.toMessage()}`); - } -}; -var ConflictingSpecificationError = class extends LuxonError { -}; -var InvalidUnitError = class extends LuxonError { - constructor(unit) { - super(`Invalid unit ${unit}`); - } -}; -var InvalidArgumentError = class extends LuxonError { -}; -var ZoneIsAbstractError = class extends LuxonError { - constructor() { - super("Zone is an abstract class"); - } -}; - -// node_modules/luxon/src/impl/formats.js -var n = "numeric"; -var s = "short"; -var l = "long"; -var DATE_SHORT = { - year: n, - month: n, - day: n -}; -var DATE_MED = { - year: n, - month: s, - day: n -}; -var DATE_MED_WITH_WEEKDAY = { - year: n, - month: s, - day: n, - weekday: s -}; -var DATE_FULL = { - year: n, - month: l, - day: n -}; -var DATE_HUGE = { - year: n, - month: l, - day: n, - weekday: l -}; -var TIME_SIMPLE = { - hour: n, - minute: n -}; -var TIME_WITH_SECONDS = { - hour: n, - minute: n, - second: n -}; -var TIME_WITH_SHORT_OFFSET = { - hour: n, - minute: n, - second: n, - timeZoneName: s -}; -var TIME_WITH_LONG_OFFSET = { - hour: n, - minute: n, - second: n, - timeZoneName: l -}; -var TIME_24_SIMPLE = { - hour: n, - minute: n, - hourCycle: "h23" -}; -var TIME_24_WITH_SECONDS = { - hour: n, - minute: n, - second: n, - hourCycle: "h23" -}; -var TIME_24_WITH_SHORT_OFFSET = { - hour: n, - minute: n, - second: n, - hourCycle: "h23", - timeZoneName: s -}; -var TIME_24_WITH_LONG_OFFSET = { - hour: n, - minute: n, - second: n, - hourCycle: "h23", - timeZoneName: l -}; -var DATETIME_SHORT = { - year: n, - month: n, - day: n, - hour: n, - minute: n -}; -var DATETIME_SHORT_WITH_SECONDS = { - year: n, - month: n, - day: n, - hour: n, - minute: n, - second: n -}; -var DATETIME_MED = { - year: n, - month: s, - day: n, - hour: n, - minute: n -}; -var DATETIME_MED_WITH_SECONDS = { - year: n, - month: s, - day: n, - hour: n, - minute: n, - second: n -}; -var DATETIME_MED_WITH_WEEKDAY = { - year: n, - month: s, - day: n, - weekday: s, - hour: n, - minute: n -}; -var DATETIME_FULL = { - year: n, - month: l, - day: n, - hour: n, - minute: n, - timeZoneName: s -}; -var DATETIME_FULL_WITH_SECONDS = { - year: n, - month: l, - day: n, - hour: n, - minute: n, - second: n, - timeZoneName: s -}; -var DATETIME_HUGE = { - year: n, - month: l, - day: n, - weekday: l, - hour: n, - minute: n, - timeZoneName: l -}; -var DATETIME_HUGE_WITH_SECONDS = { - year: n, - month: l, - day: n, - weekday: l, - hour: n, - minute: n, - second: n, - timeZoneName: l -}; - -// node_modules/luxon/src/zone.js -var Zone = class { - /** - * The type of zone - * @abstract - * @type {string} - */ - get type() { - throw new ZoneIsAbstractError(); - } - /** - * The name of this zone. - * @abstract - * @type {string} - */ - get name() { - throw new ZoneIsAbstractError(); - } - /** - * The IANA name of this zone. - * Defaults to `name` if not overwritten by a subclass. - * @abstract - * @type {string} - */ - get ianaName() { - return this.name; - } - /** - * Returns whether the offset is known to be fixed for the whole year. - * @abstract - * @type {boolean} - */ - get isUniversal() { - throw new ZoneIsAbstractError(); - } - /** - * Returns the offset's common name (such as EST) at the specified timestamp - * @abstract - * @param {number} ts - Epoch milliseconds for which to get the name - * @param {Object} opts - Options to affect the format - * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'. - * @param {string} opts.locale - What locale to return the offset name in. - * @return {string} - */ - offsetName(ts, opts) { - throw new ZoneIsAbstractError(); - } - /** - * Returns the offset's value as a string - * @abstract - * @param {number} ts - Epoch milliseconds for which to get the offset - * @param {string} format - What style of offset to return. - * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively - * @return {string} - */ - formatOffset(ts, format) { - throw new ZoneIsAbstractError(); - } - /** - * Return the offset in minutes for this zone at the specified timestamp. - * @abstract - * @param {number} ts - Epoch milliseconds for which to compute the offset - * @return {number} - */ - offset(ts) { - throw new ZoneIsAbstractError(); - } - /** - * Return whether this Zone is equal to another zone - * @abstract - * @param {Zone} otherZone - the zone to compare - * @return {boolean} - */ - equals(otherZone) { - throw new ZoneIsAbstractError(); - } - /** - * Return whether this Zone is valid. - * @abstract - * @type {boolean} - */ - get isValid() { - throw new ZoneIsAbstractError(); - } -}; - -// node_modules/luxon/src/zones/systemZone.js -var singleton = null; -var SystemZone = class _SystemZone extends Zone { - /** - * Get a singleton instance of the local zone - * @return {SystemZone} - */ - static get instance() { - if (singleton === null) { - singleton = new _SystemZone(); - } - return singleton; - } - /** @override **/ - get type() { - return "system"; - } - /** @override **/ - get name() { - return new Intl.DateTimeFormat().resolvedOptions().timeZone; - } - /** @override **/ - get isUniversal() { - return false; - } - /** @override **/ - offsetName(ts, { format, locale: locale2 }) { - return parseZoneInfo(ts, format, locale2); - } - /** @override **/ - formatOffset(ts, format) { - return formatOffset(this.offset(ts), format); - } - /** @override **/ - offset(ts) { - return -new Date(ts).getTimezoneOffset(); - } - /** @override **/ - equals(otherZone) { - return otherZone.type === "system"; - } - /** @override **/ - get isValid() { - return true; - } -}; - -// node_modules/luxon/src/zones/IANAZone.js -var dtfCache = {}; -function makeDTF(zone) { - if (!dtfCache[zone]) { - dtfCache[zone] = new Intl.DateTimeFormat("en-US", { - hour12: false, - timeZone: zone, - year: "numeric", - month: "2-digit", - day: "2-digit", - hour: "2-digit", - minute: "2-digit", - second: "2-digit", - era: "short" - }); - } - return dtfCache[zone]; -} -var typeToPos = { - year: 0, - month: 1, - day: 2, - era: 3, - hour: 4, - minute: 5, - second: 6 -}; -function hackyOffset(dtf, date2) { - const formatted = dtf.format(date2).replace(/\u200E/g, ""), parsed = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(formatted), [, fMonth, fDay, fYear, fadOrBc, fHour, fMinute, fSecond] = parsed; - return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond]; -} -function partsOffset(dtf, date2) { - const formatted = dtf.formatToParts(date2); - const filled = []; - for (let i = 0; i < formatted.length; i++) { - const { type, value } = formatted[i]; - const pos = typeToPos[type]; - if (type === "era") { - filled[pos] = value; - } else if (!isUndefined(pos)) { - filled[pos] = parseInt(value, 10); - } - } - return filled; -} -var ianaZoneCache = {}; -var IANAZone = class _IANAZone extends Zone { - /** - * @param {string} name - Zone name - * @return {IANAZone} - */ - static create(name2) { - if (!ianaZoneCache[name2]) { - ianaZoneCache[name2] = new _IANAZone(name2); - } - return ianaZoneCache[name2]; - } - /** - * Reset local caches. Should only be necessary in testing scenarios. - * @return {void} - */ - static resetCache() { - ianaZoneCache = {}; - dtfCache = {}; - } - /** - * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that. - * @param {string} s - The string to check validity on - * @example IANAZone.isValidSpecifier("America/New_York") //=> true - * @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false - * @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead. - * @return {boolean} - */ - static isValidSpecifier(s2) { - return this.isValidZone(s2); - } - /** - * Returns whether the provided string identifies a real zone - * @param {string} zone - The string to check - * @example IANAZone.isValidZone("America/New_York") //=> true - * @example IANAZone.isValidZone("Fantasia/Castle") //=> false - * @example IANAZone.isValidZone("Sport~~blorp") //=> false - * @return {boolean} - */ - static isValidZone(zone) { - if (!zone) { - return false; - } - try { - new Intl.DateTimeFormat("en-US", { timeZone: zone }).format(); - return true; - } catch (e) { - return false; - } - } - constructor(name2) { - super(); - this.zoneName = name2; - this.valid = _IANAZone.isValidZone(name2); - } - /** - * The type of zone. `iana` for all instances of `IANAZone`. - * @override - * @type {string} - */ - get type() { - return "iana"; - } - /** - * The name of this zone (i.e. the IANA zone name). - * @override - * @type {string} - */ - get name() { - return this.zoneName; - } - /** - * Returns whether the offset is known to be fixed for the whole year: - * Always returns false for all IANA zones. - * @override - * @type {boolean} - */ - get isUniversal() { - return false; - } - /** - * Returns the offset's common name (such as EST) at the specified timestamp - * @override - * @param {number} ts - Epoch milliseconds for which to get the name - * @param {Object} opts - Options to affect the format - * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'. - * @param {string} opts.locale - What locale to return the offset name in. - * @return {string} - */ - offsetName(ts, { format, locale: locale2 }) { - return parseZoneInfo(ts, format, locale2, this.name); - } - /** - * Returns the offset's value as a string - * @override - * @param {number} ts - Epoch milliseconds for which to get the offset - * @param {string} format - What style of offset to return. - * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively - * @return {string} - */ - formatOffset(ts, format) { - return formatOffset(this.offset(ts), format); - } - /** - * Return the offset in minutes for this zone at the specified timestamp. - * @override - * @param {number} ts - Epoch milliseconds for which to compute the offset - * @return {number} - */ - offset(ts) { - const date2 = new Date(ts); - if (isNaN(date2)) return NaN; - const dtf = makeDTF(this.name); - let [year, month, day, adOrBc, hour, minute, second] = dtf.formatToParts ? partsOffset(dtf, date2) : hackyOffset(dtf, date2); - if (adOrBc === "BC") { - year = -Math.abs(year) + 1; - } - const adjustedHour = hour === 24 ? 0 : hour; - const asUTC = objToLocalTS({ - year, - month, - day, - hour: adjustedHour, - minute, - second, - millisecond: 0 - }); - let asTS = +date2; - const over = asTS % 1e3; - asTS -= over >= 0 ? over : 1e3 + over; - return (asUTC - asTS) / (60 * 1e3); - } - /** - * Return whether this Zone is equal to another zone - * @override - * @param {Zone} otherZone - the zone to compare - * @return {boolean} - */ - equals(otherZone) { - return otherZone.type === "iana" && otherZone.name === this.name; - } - /** - * Return whether this Zone is valid. - * @override - * @type {boolean} - */ - get isValid() { - return this.valid; - } -}; - -// node_modules/luxon/src/impl/locale.js -var intlLFCache = {}; -function getCachedLF(locString, opts = {}) { - const key = JSON.stringify([locString, opts]); - let dtf = intlLFCache[key]; - if (!dtf) { - dtf = new Intl.ListFormat(locString, opts); - intlLFCache[key] = dtf; - } - return dtf; -} -var intlDTCache = {}; -function getCachedDTF(locString, opts = {}) { - const key = JSON.stringify([locString, opts]); - let dtf = intlDTCache[key]; - if (!dtf) { - dtf = new Intl.DateTimeFormat(locString, opts); - intlDTCache[key] = dtf; - } - return dtf; -} -var intlNumCache = {}; -function getCachedINF(locString, opts = {}) { - const key = JSON.stringify([locString, opts]); - let inf = intlNumCache[key]; - if (!inf) { - inf = new Intl.NumberFormat(locString, opts); - intlNumCache[key] = inf; - } - return inf; -} -var intlRelCache = {}; -function getCachedRTF(locString, opts = {}) { - const { base, ...cacheKeyOpts } = opts; - const key = JSON.stringify([locString, cacheKeyOpts]); - let inf = intlRelCache[key]; - if (!inf) { - inf = new Intl.RelativeTimeFormat(locString, opts); - intlRelCache[key] = inf; - } - return inf; -} -var sysLocaleCache = null; -function systemLocale() { - if (sysLocaleCache) { - return sysLocaleCache; - } else { - sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale; - return sysLocaleCache; - } -} -var weekInfoCache = {}; -function getCachedWeekInfo(locString) { - let data = weekInfoCache[locString]; - if (!data) { - const locale2 = new Intl.Locale(locString); - data = "getWeekInfo" in locale2 ? locale2.getWeekInfo() : locale2.weekInfo; - weekInfoCache[locString] = data; - } - return data; -} -function parseLocaleString(localeStr) { - const xIndex = localeStr.indexOf("-x-"); - if (xIndex !== -1) { - localeStr = localeStr.substring(0, xIndex); - } - const uIndex = localeStr.indexOf("-u-"); - if (uIndex === -1) { - return [localeStr]; - } else { - let options; - let selectedStr; - try { - options = getCachedDTF(localeStr).resolvedOptions(); - selectedStr = localeStr; - } catch (e) { - const smaller = localeStr.substring(0, uIndex); - options = getCachedDTF(smaller).resolvedOptions(); - selectedStr = smaller; - } - const { numberingSystem, calendar } = options; - return [selectedStr, numberingSystem, calendar]; - } -} -function intlConfigString(localeStr, numberingSystem, outputCalendar) { - if (outputCalendar || numberingSystem) { - if (!localeStr.includes("-u-")) { - localeStr += "-u"; - } - if (outputCalendar) { - localeStr += `-ca-${outputCalendar}`; - } - if (numberingSystem) { - localeStr += `-nu-${numberingSystem}`; - } - return localeStr; - } else { - return localeStr; - } -} -function mapMonths(f) { - const ms = []; - for (let i = 1; i <= 12; i++) { - const dt = DateTime.utc(2009, i, 1); - ms.push(f(dt)); - } - return ms; -} -function mapWeekdays(f) { - const ms = []; - for (let i = 1; i <= 7; i++) { - const dt = DateTime.utc(2016, 11, 13 + i); - ms.push(f(dt)); - } - return ms; -} -function listStuff(loc, length, englishFn, intlFn) { - const mode = loc.listingMode(); - if (mode === "error") { - return null; - } else if (mode === "en") { - return englishFn(length); - } else { - return intlFn(length); - } -} -function supportsFastNumbers(loc) { - if (loc.numberingSystem && loc.numberingSystem !== "latn") { - return false; - } else { - return loc.numberingSystem === "latn" || !loc.locale || loc.locale.startsWith("en") || new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === "latn"; - } -} -var PolyNumberFormatter = class { - constructor(intl, forceSimple, opts) { - this.padTo = opts.padTo || 0; - this.floor = opts.floor || false; - const { padTo, floor, ...otherOpts } = opts; - if (!forceSimple || Object.keys(otherOpts).length > 0) { - const intlOpts = { useGrouping: false, ...opts }; - if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo; - this.inf = getCachedINF(intl, intlOpts); - } - } - format(i) { - if (this.inf) { - const fixed = this.floor ? Math.floor(i) : i; - return this.inf.format(fixed); - } else { - const fixed = this.floor ? Math.floor(i) : roundTo(i, 3); - return padStart(fixed, this.padTo); - } - } -}; -var PolyDateFormatter = class { - constructor(dt, intl, opts) { - this.opts = opts; - this.originalZone = void 0; - let z = void 0; - if (this.opts.timeZone) { - this.dt = dt; - } else if (dt.zone.type === "fixed") { - const gmtOffset = -1 * (dt.offset / 60); - const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`; - if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) { - z = offsetZ; - this.dt = dt; - } else { - z = "UTC"; - this.dt = dt.offset === 0 ? dt : dt.setZone("UTC").plus({ minutes: dt.offset }); - this.originalZone = dt.zone; - } - } else if (dt.zone.type === "system") { - this.dt = dt; - } else if (dt.zone.type === "iana") { - this.dt = dt; - z = dt.zone.name; - } else { - z = "UTC"; - this.dt = dt.setZone("UTC").plus({ minutes: dt.offset }); - this.originalZone = dt.zone; - } - const intlOpts = { ...this.opts }; - intlOpts.timeZone = intlOpts.timeZone || z; - this.dtf = getCachedDTF(intl, intlOpts); - } - format() { - if (this.originalZone) { - return this.formatToParts().map(({ value }) => value).join(""); - } - return this.dtf.format(this.dt.toJSDate()); - } - formatToParts() { - const parts = this.dtf.formatToParts(this.dt.toJSDate()); - if (this.originalZone) { - return parts.map((part) => { - if (part.type === "timeZoneName") { - const offsetName = this.originalZone.offsetName(this.dt.ts, { - locale: this.dt.locale, - format: this.opts.timeZoneName - }); - return { - ...part, - value: offsetName - }; - } else { - return part; - } - }); - } - return parts; - } - resolvedOptions() { - return this.dtf.resolvedOptions(); - } -}; -var PolyRelFormatter = class { - constructor(intl, isEnglish, opts) { - this.opts = { style: "long", ...opts }; - if (!isEnglish && hasRelative()) { - this.rtf = getCachedRTF(intl, opts); - } - } - format(count, unit) { - if (this.rtf) { - return this.rtf.format(count, unit); - } else { - return formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== "long"); - } - } - formatToParts(count, unit) { - if (this.rtf) { - return this.rtf.formatToParts(count, unit); - } else { - return []; - } - } -}; -var fallbackWeekSettings = { - firstDay: 1, - minimalDays: 4, - weekend: [6, 7] -}; -var Locale = class _Locale { - static fromOpts(opts) { - return _Locale.create( - opts.locale, - opts.numberingSystem, - opts.outputCalendar, - opts.weekSettings, - opts.defaultToEN - ); - } - static create(locale2, numberingSystem, outputCalendar, weekSettings, defaultToEN = false) { - const specifiedLocale = locale2 || Settings.defaultLocale; - const localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale()); - const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem; - const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar; - const weekSettingsR = validateWeekSettings(weekSettings) || Settings.defaultWeekSettings; - return new _Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale); - } - static resetCache() { - sysLocaleCache = null; - intlDTCache = {}; - intlNumCache = {}; - intlRelCache = {}; - } - static fromObject({ locale: locale2, numberingSystem, outputCalendar, weekSettings } = {}) { - return _Locale.create(locale2, numberingSystem, outputCalendar, weekSettings); - } - constructor(locale2, numbering, outputCalendar, weekSettings, specifiedLocale) { - const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale2); - this.locale = parsedLocale; - this.numberingSystem = numbering || parsedNumberingSystem || null; - this.outputCalendar = outputCalendar || parsedOutputCalendar || null; - this.weekSettings = weekSettings; - this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar); - this.weekdaysCache = { format: {}, standalone: {} }; - this.monthsCache = { format: {}, standalone: {} }; - this.meridiemCache = null; - this.eraCache = {}; - this.specifiedLocale = specifiedLocale; - this.fastNumbersCached = null; - } - get fastNumbers() { - if (this.fastNumbersCached == null) { - this.fastNumbersCached = supportsFastNumbers(this); - } - return this.fastNumbersCached; - } - listingMode() { - const isActuallyEn = this.isEnglish(); - const hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory"); - return isActuallyEn && hasNoWeirdness ? "en" : "intl"; - } - clone(alts) { - if (!alts || Object.getOwnPropertyNames(alts).length === 0) { - return this; - } else { - return _Locale.create( - alts.locale || this.specifiedLocale, - alts.numberingSystem || this.numberingSystem, - alts.outputCalendar || this.outputCalendar, - validateWeekSettings(alts.weekSettings) || this.weekSettings, - alts.defaultToEN || false - ); - } - } - redefaultToEN(alts = {}) { - return this.clone({ ...alts, defaultToEN: true }); - } - redefaultToSystem(alts = {}) { - return this.clone({ ...alts, defaultToEN: false }); - } - months(length, format = false) { - return listStuff(this, length, months, () => { - const intl = format ? { month: length, day: "numeric" } : { month: length }, formatStr = format ? "format" : "standalone"; - if (!this.monthsCache[formatStr][length]) { - this.monthsCache[formatStr][length] = mapMonths((dt) => this.extract(dt, intl, "month")); - } - return this.monthsCache[formatStr][length]; - }); - } - weekdays(length, format = false) { - return listStuff(this, length, weekdays, () => { - const intl = format ? { weekday: length, year: "numeric", month: "long", day: "numeric" } : { weekday: length }, formatStr = format ? "format" : "standalone"; - if (!this.weekdaysCache[formatStr][length]) { - this.weekdaysCache[formatStr][length] = mapWeekdays( - (dt) => this.extract(dt, intl, "weekday") - ); - } - return this.weekdaysCache[formatStr][length]; - }); - } - meridiems() { - return listStuff( - this, - void 0, - () => meridiems, - () => { - if (!this.meridiemCache) { - const intl = { hour: "numeric", hourCycle: "h12" }; - this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map( - (dt) => this.extract(dt, intl, "dayperiod") - ); - } - return this.meridiemCache; - } - ); - } - eras(length) { - return listStuff(this, length, eras, () => { - const intl = { era: length }; - if (!this.eraCache[length]) { - this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map( - (dt) => this.extract(dt, intl, "era") - ); - } - return this.eraCache[length]; - }); - } - extract(dt, intlOpts, field) { - const df = this.dtFormatter(dt, intlOpts), results = df.formatToParts(), matching = results.find((m) => m.type.toLowerCase() === field); - return matching ? matching.value : null; - } - numberFormatter(opts = {}) { - return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts); - } - dtFormatter(dt, intlOpts = {}) { - return new PolyDateFormatter(dt, this.intl, intlOpts); - } - relFormatter(opts = {}) { - return new PolyRelFormatter(this.intl, this.isEnglish(), opts); - } - listFormatter(opts = {}) { - return getCachedLF(this.intl, opts); - } - isEnglish() { - return this.locale === "en" || this.locale.toLowerCase() === "en-us" || new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us"); - } - getWeekSettings() { - if (this.weekSettings) { - return this.weekSettings; - } else if (!hasLocaleWeekInfo()) { - return fallbackWeekSettings; - } else { - return getCachedWeekInfo(this.locale); - } - } - getStartOfWeek() { - return this.getWeekSettings().firstDay; - } - getMinDaysInFirstWeek() { - return this.getWeekSettings().minimalDays; - } - getWeekendDays() { - return this.getWeekSettings().weekend; - } - equals(other) { - return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar; - } - toString() { - return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`; - } -}; - -// node_modules/luxon/src/zones/fixedOffsetZone.js -var singleton2 = null; -var FixedOffsetZone = class _FixedOffsetZone extends Zone { - /** - * Get a singleton instance of UTC - * @return {FixedOffsetZone} - */ - static get utcInstance() { - if (singleton2 === null) { - singleton2 = new _FixedOffsetZone(0); - } - return singleton2; - } - /** - * Get an instance with a specified offset - * @param {number} offset - The offset in minutes - * @return {FixedOffsetZone} - */ - static instance(offset2) { - return offset2 === 0 ? _FixedOffsetZone.utcInstance : new _FixedOffsetZone(offset2); - } - /** - * Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6" - * @param {string} s - The offset string to parse - * @example FixedOffsetZone.parseSpecifier("UTC+6") - * @example FixedOffsetZone.parseSpecifier("UTC+06") - * @example FixedOffsetZone.parseSpecifier("UTC-6:00") - * @return {FixedOffsetZone} - */ - static parseSpecifier(s2) { - if (s2) { - const r = s2.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i); - if (r) { - return new _FixedOffsetZone(signedOffset(r[1], r[2])); - } - } - return null; - } - constructor(offset2) { - super(); - this.fixed = offset2; - } - /** - * The type of zone. `fixed` for all instances of `FixedOffsetZone`. - * @override - * @type {string} - */ - get type() { - return "fixed"; - } - /** - * The name of this zone. - * All fixed zones' names always start with "UTC" (plus optional offset) - * @override - * @type {string} - */ - get name() { - return this.fixed === 0 ? "UTC" : `UTC${formatOffset(this.fixed, "narrow")}`; - } - /** - * The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn` - * - * @override - * @type {string} - */ - get ianaName() { - if (this.fixed === 0) { - return "Etc/UTC"; - } else { - return `Etc/GMT${formatOffset(-this.fixed, "narrow")}`; - } - } - /** - * Returns the offset's common name at the specified timestamp. - * - * For fixed offset zones this equals to the zone name. - * @override - */ - offsetName() { - return this.name; - } - /** - * Returns the offset's value as a string - * @override - * @param {number} ts - Epoch milliseconds for which to get the offset - * @param {string} format - What style of offset to return. - * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively - * @return {string} - */ - formatOffset(ts, format) { - return formatOffset(this.fixed, format); - } - /** - * Returns whether the offset is known to be fixed for the whole year: - * Always returns true for all fixed offset zones. - * @override - * @type {boolean} - */ - get isUniversal() { - return true; - } - /** - * Return the offset in minutes for this zone at the specified timestamp. - * - * For fixed offset zones, this is constant and does not depend on a timestamp. - * @override - * @return {number} - */ - offset() { - return this.fixed; - } - /** - * Return whether this Zone is equal to another zone (i.e. also fixed and same offset) - * @override - * @param {Zone} otherZone - the zone to compare - * @return {boolean} - */ - equals(otherZone) { - return otherZone.type === "fixed" && otherZone.fixed === this.fixed; - } - /** - * Return whether this Zone is valid: - * All fixed offset zones are valid. - * @override - * @type {boolean} - */ - get isValid() { - return true; - } -}; - -// node_modules/luxon/src/zones/invalidZone.js -var InvalidZone = class extends Zone { - constructor(zoneName) { - super(); - this.zoneName = zoneName; - } - /** @override **/ - get type() { - return "invalid"; - } - /** @override **/ - get name() { - return this.zoneName; - } - /** @override **/ - get isUniversal() { - return false; - } - /** @override **/ - offsetName() { - return null; - } - /** @override **/ - formatOffset() { - return ""; - } - /** @override **/ - offset() { - return NaN; - } - /** @override **/ - equals() { - return false; - } - /** @override **/ - get isValid() { - return false; - } -}; - -// node_modules/luxon/src/impl/zoneUtil.js -function normalizeZone(input, defaultZone2) { - let offset2; - if (isUndefined(input) || input === null) { - return defaultZone2; - } else if (input instanceof Zone) { - return input; - } else if (isString(input)) { - const lowered = input.toLowerCase(); - if (lowered === "default") return defaultZone2; - else if (lowered === "local" || lowered === "system") return SystemZone.instance; - else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance; - else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input); - } else if (isNumber(input)) { - return FixedOffsetZone.instance(input); - } else if (typeof input === "object" && "offset" in input && typeof input.offset === "function") { - return input; - } else { - return new InvalidZone(input); - } -} - -// node_modules/luxon/src/impl/digits.js -var numberingSystems = { - arab: "[\u0660-\u0669]", - arabext: "[\u06F0-\u06F9]", - bali: "[\u1B50-\u1B59]", - beng: "[\u09E6-\u09EF]", - deva: "[\u0966-\u096F]", - fullwide: "[\uFF10-\uFF19]", - gujr: "[\u0AE6-\u0AEF]", - hanidec: "[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]", - khmr: "[\u17E0-\u17E9]", - knda: "[\u0CE6-\u0CEF]", - laoo: "[\u0ED0-\u0ED9]", - limb: "[\u1946-\u194F]", - mlym: "[\u0D66-\u0D6F]", - mong: "[\u1810-\u1819]", - mymr: "[\u1040-\u1049]", - orya: "[\u0B66-\u0B6F]", - tamldec: "[\u0BE6-\u0BEF]", - telu: "[\u0C66-\u0C6F]", - thai: "[\u0E50-\u0E59]", - tibt: "[\u0F20-\u0F29]", - latn: "\\d" -}; -var numberingSystemsUTF16 = { - arab: [1632, 1641], - arabext: [1776, 1785], - bali: [6992, 7001], - beng: [2534, 2543], - deva: [2406, 2415], - fullwide: [65296, 65303], - gujr: [2790, 2799], - khmr: [6112, 6121], - knda: [3302, 3311], - laoo: [3792, 3801], - limb: [6470, 6479], - mlym: [3430, 3439], - mong: [6160, 6169], - mymr: [4160, 4169], - orya: [2918, 2927], - tamldec: [3046, 3055], - telu: [3174, 3183], - thai: [3664, 3673], - tibt: [3872, 3881] -}; -var hanidecChars = numberingSystems.hanidec.replace(/[\[|\]]/g, "").split(""); -function parseDigits(str) { - let value = parseInt(str, 10); - if (isNaN(value)) { - value = ""; - for (let i = 0; i < str.length; i++) { - const code = str.charCodeAt(i); - if (str[i].search(numberingSystems.hanidec) !== -1) { - value += hanidecChars.indexOf(str[i]); - } else { - for (const key in numberingSystemsUTF16) { - const [min, max] = numberingSystemsUTF16[key]; - if (code >= min && code <= max) { - value += code - min; - } - } - } - } - return parseInt(value, 10); - } else { - return value; - } -} -var digitRegexCache = {}; -function resetDigitRegexCache() { - digitRegexCache = {}; -} -function digitRegex({ numberingSystem }, append2 = "") { - const ns = numberingSystem || "latn"; - if (!digitRegexCache[ns]) { - digitRegexCache[ns] = {}; - } - if (!digitRegexCache[ns][append2]) { - digitRegexCache[ns][append2] = new RegExp(`${numberingSystems[ns]}${append2}`); - } - return digitRegexCache[ns][append2]; -} - -// node_modules/luxon/src/settings.js -var now2 = () => Date.now(); -var defaultZone = "system"; -var defaultLocale = null; -var defaultNumberingSystem = null; -var defaultOutputCalendar = null; -var twoDigitCutoffYear = 60; -var throwOnInvalid; -var defaultWeekSettings = null; -var Settings = class { - /** - * Get the callback for returning the current timestamp. - * @type {function} - */ - static get now() { - return now2; - } - /** - * Set the callback for returning the current timestamp. - * The function should return a number, which will be interpreted as an Epoch millisecond count - * @type {function} - * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future - * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time - */ - static set now(n2) { - now2 = n2; - } - /** - * Set the default time zone to create DateTimes in. Does not affect existing instances. - * Use the value "system" to reset this value to the system's time zone. - * @type {string} - */ - static set defaultZone(zone) { - defaultZone = zone; - } - /** - * Get the default time zone object currently used to create DateTimes. Does not affect existing instances. - * The default value is the system's time zone (the one set on the machine that runs this code). - * @type {Zone} - */ - static get defaultZone() { - return normalizeZone(defaultZone, SystemZone.instance); - } - /** - * Get the default locale to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - static get defaultLocale() { - return defaultLocale; - } - /** - * Set the default locale to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - static set defaultLocale(locale2) { - defaultLocale = locale2; - } - /** - * Get the default numbering system to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - static get defaultNumberingSystem() { - return defaultNumberingSystem; - } - /** - * Set the default numbering system to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - static set defaultNumberingSystem(numberingSystem) { - defaultNumberingSystem = numberingSystem; - } - /** - * Get the default output calendar to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - static get defaultOutputCalendar() { - return defaultOutputCalendar; - } - /** - * Set the default output calendar to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - static set defaultOutputCalendar(outputCalendar) { - defaultOutputCalendar = outputCalendar; - } - /** - * @typedef {Object} WeekSettings - * @property {number} firstDay - * @property {number} minimalDays - * @property {number[]} weekend - */ - /** - * @return {WeekSettings|null} - */ - static get defaultWeekSettings() { - return defaultWeekSettings; - } - /** - * Allows overriding the default locale week settings, i.e. the start of the week, the weekend and - * how many days are required in the first week of a year. - * Does not affect existing instances. - * - * @param {WeekSettings|null} weekSettings - */ - static set defaultWeekSettings(weekSettings) { - defaultWeekSettings = validateWeekSettings(weekSettings); - } - /** - * Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx. - * @type {number} - */ - static get twoDigitCutoffYear() { - return twoDigitCutoffYear; - } - /** - * Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx. - * @type {number} - * @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century - * @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century - * @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950 - * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50 - * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50 - */ - static set twoDigitCutoffYear(cutoffYear) { - twoDigitCutoffYear = cutoffYear % 100; - } - /** - * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals - * @type {boolean} - */ - static get throwOnInvalid() { - return throwOnInvalid; - } - /** - * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals - * @type {boolean} - */ - static set throwOnInvalid(t2) { - throwOnInvalid = t2; - } - /** - * Reset Luxon's global caches. Should only be necessary in testing scenarios. - * @return {void} - */ - static resetCaches() { - Locale.resetCache(); - IANAZone.resetCache(); - DateTime.resetCache(); - resetDigitRegexCache(); - } -}; - -// node_modules/luxon/src/impl/invalid.js -var Invalid = class { - constructor(reason, explanation) { - this.reason = reason; - this.explanation = explanation; - } - toMessage() { - if (this.explanation) { - return `${this.reason}: ${this.explanation}`; - } else { - return this.reason; - } - } -}; - -// node_modules/luxon/src/impl/conversions.js -var nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; -var leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]; -function unitOutOfRange(unit, value) { - return new Invalid( - "unit out of range", - `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid` - ); -} -function dayOfWeek(year, month, day) { - const d = new Date(Date.UTC(year, month - 1, day)); - if (year < 100 && year >= 0) { - d.setUTCFullYear(d.getUTCFullYear() - 1900); - } - const js = d.getUTCDay(); - return js === 0 ? 7 : js; -} -function computeOrdinal(year, month, day) { - return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1]; -} -function uncomputeOrdinal(year, ordinal) { - const table = isLeapYear(year) ? leapLadder : nonLeapLadder, month0 = table.findIndex((i) => i < ordinal), day = ordinal - table[month0]; - return { month: month0 + 1, day }; -} -function isoWeekdayToLocal(isoWeekday, startOfWeek) { - return (isoWeekday - startOfWeek + 7) % 7 + 1; -} -function gregorianToWeek(gregObj, minDaysInFirstWeek = 4, startOfWeek = 1) { - const { year, month, day } = gregObj, ordinal = computeOrdinal(year, month, day), weekday = isoWeekdayToLocal(dayOfWeek(year, month, day), startOfWeek); - let weekNumber = Math.floor((ordinal - weekday + 14 - minDaysInFirstWeek) / 7), weekYear; - if (weekNumber < 1) { - weekYear = year - 1; - weekNumber = weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek); - } else if (weekNumber > weeksInWeekYear(year, minDaysInFirstWeek, startOfWeek)) { - weekYear = year + 1; - weekNumber = 1; - } else { - weekYear = year; - } - return { weekYear, weekNumber, weekday, ...timeObject(gregObj) }; -} -function weekToGregorian(weekData, minDaysInFirstWeek = 4, startOfWeek = 1) { - const { weekYear, weekNumber, weekday } = weekData, weekdayOfJan4 = isoWeekdayToLocal(dayOfWeek(weekYear, 1, minDaysInFirstWeek), startOfWeek), yearInDays = daysInYear(weekYear); - let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 7 + minDaysInFirstWeek, year; - if (ordinal < 1) { - year = weekYear - 1; - ordinal += daysInYear(year); - } else if (ordinal > yearInDays) { - year = weekYear + 1; - ordinal -= daysInYear(weekYear); - } else { - year = weekYear; - } - const { month, day } = uncomputeOrdinal(year, ordinal); - return { year, month, day, ...timeObject(weekData) }; -} -function gregorianToOrdinal(gregData) { - const { year, month, day } = gregData; - const ordinal = computeOrdinal(year, month, day); - return { year, ordinal, ...timeObject(gregData) }; -} -function ordinalToGregorian(ordinalData) { - const { year, ordinal } = ordinalData; - const { month, day } = uncomputeOrdinal(year, ordinal); - return { year, month, day, ...timeObject(ordinalData) }; -} -function usesLocalWeekValues(obj, loc) { - const hasLocaleWeekData = !isUndefined(obj.localWeekday) || !isUndefined(obj.localWeekNumber) || !isUndefined(obj.localWeekYear); - if (hasLocaleWeekData) { - const hasIsoWeekData = !isUndefined(obj.weekday) || !isUndefined(obj.weekNumber) || !isUndefined(obj.weekYear); - if (hasIsoWeekData) { - throw new ConflictingSpecificationError( - "Cannot mix locale-based week fields with ISO-based week fields" - ); - } - if (!isUndefined(obj.localWeekday)) obj.weekday = obj.localWeekday; - if (!isUndefined(obj.localWeekNumber)) obj.weekNumber = obj.localWeekNumber; - if (!isUndefined(obj.localWeekYear)) obj.weekYear = obj.localWeekYear; - delete obj.localWeekday; - delete obj.localWeekNumber; - delete obj.localWeekYear; - return { - minDaysInFirstWeek: loc.getMinDaysInFirstWeek(), - startOfWeek: loc.getStartOfWeek() - }; - } else { - return { minDaysInFirstWeek: 4, startOfWeek: 1 }; - } -} -function hasInvalidWeekData(obj, minDaysInFirstWeek = 4, startOfWeek = 1) { - const validYear = isInteger(obj.weekYear), validWeek = integerBetween( - obj.weekNumber, - 1, - weeksInWeekYear(obj.weekYear, minDaysInFirstWeek, startOfWeek) - ), validWeekday = integerBetween(obj.weekday, 1, 7); - if (!validYear) { - return unitOutOfRange("weekYear", obj.weekYear); - } else if (!validWeek) { - return unitOutOfRange("week", obj.weekNumber); - } else if (!validWeekday) { - return unitOutOfRange("weekday", obj.weekday); - } else return false; -} -function hasInvalidOrdinalData(obj) { - const validYear = isInteger(obj.year), validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year)); - if (!validYear) { - return unitOutOfRange("year", obj.year); - } else if (!validOrdinal) { - return unitOutOfRange("ordinal", obj.ordinal); - } else return false; -} -function hasInvalidGregorianData(obj) { - const validYear = isInteger(obj.year), validMonth = integerBetween(obj.month, 1, 12), validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month)); - if (!validYear) { - return unitOutOfRange("year", obj.year); - } else if (!validMonth) { - return unitOutOfRange("month", obj.month); - } else if (!validDay) { - return unitOutOfRange("day", obj.day); - } else return false; -} -function hasInvalidTimeData(obj) { - const { hour, minute, second, millisecond } = obj; - const validHour = integerBetween(hour, 0, 23) || hour === 24 && minute === 0 && second === 0 && millisecond === 0, validMinute = integerBetween(minute, 0, 59), validSecond = integerBetween(second, 0, 59), validMillisecond = integerBetween(millisecond, 0, 999); - if (!validHour) { - return unitOutOfRange("hour", hour); - } else if (!validMinute) { - return unitOutOfRange("minute", minute); - } else if (!validSecond) { - return unitOutOfRange("second", second); - } else if (!validMillisecond) { - return unitOutOfRange("millisecond", millisecond); - } else return false; -} - -// node_modules/luxon/src/impl/util.js -function isUndefined(o) { - return typeof o === "undefined"; -} -function isNumber(o) { - return typeof o === "number"; -} -function isInteger(o) { - return typeof o === "number" && o % 1 === 0; -} -function isString(o) { - return typeof o === "string"; -} -function isDate(o) { - return Object.prototype.toString.call(o) === "[object Date]"; -} -function hasRelative() { - try { - return typeof Intl !== "undefined" && !!Intl.RelativeTimeFormat; - } catch (e) { - return false; - } -} -function hasLocaleWeekInfo() { - try { - return typeof Intl !== "undefined" && !!Intl.Locale && ("weekInfo" in Intl.Locale.prototype || "getWeekInfo" in Intl.Locale.prototype); - } catch (e) { - return false; - } -} -function maybeArray(thing) { - return Array.isArray(thing) ? thing : [thing]; -} -function bestBy(arr, by, compare) { - if (arr.length === 0) { - return void 0; - } - return arr.reduce((best, next2) => { - const pair = [by(next2), next2]; - if (!best) { - return pair; - } else if (compare(best[0], pair[0]) === best[0]) { - return best; - } else { - return pair; - } - }, null)[1]; -} -function pick(obj, keys) { - return keys.reduce((a, k) => { - a[k] = obj[k]; - return a; - }, {}); -} -function hasOwnProperty(obj, prop2) { - return Object.prototype.hasOwnProperty.call(obj, prop2); -} -function validateWeekSettings(settings) { - if (settings == null) { - return null; - } else if (typeof settings !== "object") { - throw new InvalidArgumentError("Week settings must be an object"); - } else { - if (!integerBetween(settings.firstDay, 1, 7) || !integerBetween(settings.minimalDays, 1, 7) || !Array.isArray(settings.weekend) || settings.weekend.some((v) => !integerBetween(v, 1, 7))) { - throw new InvalidArgumentError("Invalid week settings"); - } - return { - firstDay: settings.firstDay, - minimalDays: settings.minimalDays, - weekend: Array.from(settings.weekend) - }; - } -} -function integerBetween(thing, bottom, top) { - return isInteger(thing) && thing >= bottom && thing <= top; -} -function floorMod(x, n2) { - return x - n2 * Math.floor(x / n2); -} -function padStart(input, n2 = 2) { - const isNeg = input < 0; - let padded; - if (isNeg) { - padded = "-" + ("" + -input).padStart(n2, "0"); - } else { - padded = ("" + input).padStart(n2, "0"); - } - return padded; -} -function parseInteger(string) { - if (isUndefined(string) || string === null || string === "") { - return void 0; - } else { - return parseInt(string, 10); - } -} -function parseFloating(string) { - if (isUndefined(string) || string === null || string === "") { - return void 0; - } else { - return parseFloat(string); - } -} -function parseMillis(fraction) { - if (isUndefined(fraction) || fraction === null || fraction === "") { - return void 0; - } else { - const f = parseFloat("0." + fraction) * 1e3; - return Math.floor(f); - } -} -function roundTo(number, digits, towardZero = false) { - const factor = 10 ** digits, rounder = towardZero ? Math.trunc : Math.round; - return rounder(number * factor) / factor; -} -function isLeapYear(year) { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); -} -function daysInYear(year) { - return isLeapYear(year) ? 366 : 365; -} -function daysInMonth(year, month) { - const modMonth = floorMod(month - 1, 12) + 1, modYear = year + (month - modMonth) / 12; - if (modMonth === 2) { - return isLeapYear(modYear) ? 29 : 28; - } else { - return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1]; - } -} -function objToLocalTS(obj) { - let d = Date.UTC( - obj.year, - obj.month - 1, - obj.day, - obj.hour, - obj.minute, - obj.second, - obj.millisecond - ); - if (obj.year < 100 && obj.year >= 0) { - d = new Date(d); - d.setUTCFullYear(obj.year, obj.month - 1, obj.day); - } - return +d; -} -function firstWeekOffset(year, minDaysInFirstWeek, startOfWeek) { - const fwdlw = isoWeekdayToLocal(dayOfWeek(year, 1, minDaysInFirstWeek), startOfWeek); - return -fwdlw + minDaysInFirstWeek - 1; -} -function weeksInWeekYear(weekYear, minDaysInFirstWeek = 4, startOfWeek = 1) { - const weekOffset = firstWeekOffset(weekYear, minDaysInFirstWeek, startOfWeek); - const weekOffsetNext = firstWeekOffset(weekYear + 1, minDaysInFirstWeek, startOfWeek); - return (daysInYear(weekYear) - weekOffset + weekOffsetNext) / 7; -} -function untruncateYear(year) { - if (year > 99) { - return year; - } else return year > Settings.twoDigitCutoffYear ? 1900 + year : 2e3 + year; -} -function parseZoneInfo(ts, offsetFormat, locale2, timeZone = null) { - const date2 = new Date(ts), intlOpts = { - hourCycle: "h23", - year: "numeric", - month: "2-digit", - day: "2-digit", - hour: "2-digit", - minute: "2-digit" - }; - if (timeZone) { - intlOpts.timeZone = timeZone; - } - const modified = { timeZoneName: offsetFormat, ...intlOpts }; - const parsed = new Intl.DateTimeFormat(locale2, modified).formatToParts(date2).find((m) => m.type.toLowerCase() === "timezonename"); - return parsed ? parsed.value : null; -} -function signedOffset(offHourStr, offMinuteStr) { - let offHour = parseInt(offHourStr, 10); - if (Number.isNaN(offHour)) { - offHour = 0; - } - const offMin = parseInt(offMinuteStr, 10) || 0, offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin; - return offHour * 60 + offMinSigned; -} -function asNumber(value) { - const numericValue = Number(value); - if (typeof value === "boolean" || value === "" || Number.isNaN(numericValue)) - throw new InvalidArgumentError(`Invalid unit value ${value}`); - return numericValue; -} -function normalizeObject(obj, normalizer) { - const normalized = {}; - for (const u in obj) { - if (hasOwnProperty(obj, u)) { - const v = obj[u]; - if (v === void 0 || v === null) continue; - normalized[normalizer(u)] = asNumber(v); - } - } - return normalized; -} -function formatOffset(offset2, format) { - const hours = Math.trunc(Math.abs(offset2 / 60)), minutes = Math.trunc(Math.abs(offset2 % 60)), sign = offset2 >= 0 ? "+" : "-"; - switch (format) { - case "short": - return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`; - case "narrow": - return `${sign}${hours}${minutes > 0 ? `:${minutes}` : ""}`; - case "techie": - return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`; - default: - throw new RangeError(`Value format ${format} is out of range for property format`); - } -} -function timeObject(obj) { - return pick(obj, ["hour", "minute", "second", "millisecond"]); -} - -// node_modules/luxon/src/impl/english.js -var monthsLong = [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" -]; -var monthsShort = [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" -]; -var monthsNarrow = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"]; -function months(length) { - switch (length) { - case "narrow": - return [...monthsNarrow]; - case "short": - return [...monthsShort]; - case "long": - return [...monthsLong]; - case "numeric": - return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]; - case "2-digit": - return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]; - default: - return null; - } -} -var weekdaysLong = [ - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", - "Sunday" -]; -var weekdaysShort = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]; -var weekdaysNarrow = ["M", "T", "W", "T", "F", "S", "S"]; -function weekdays(length) { - switch (length) { - case "narrow": - return [...weekdaysNarrow]; - case "short": - return [...weekdaysShort]; - case "long": - return [...weekdaysLong]; - case "numeric": - return ["1", "2", "3", "4", "5", "6", "7"]; - default: - return null; - } -} -var meridiems = ["AM", "PM"]; -var erasLong = ["Before Christ", "Anno Domini"]; -var erasShort = ["BC", "AD"]; -var erasNarrow = ["B", "A"]; -function eras(length) { - switch (length) { - case "narrow": - return [...erasNarrow]; - case "short": - return [...erasShort]; - case "long": - return [...erasLong]; - default: - return null; - } -} -function meridiemForDateTime(dt) { - return meridiems[dt.hour < 12 ? 0 : 1]; -} -function weekdayForDateTime(dt, length) { - return weekdays(length)[dt.weekday - 1]; -} -function monthForDateTime(dt, length) { - return months(length)[dt.month - 1]; -} -function eraForDateTime(dt, length) { - return eras(length)[dt.year < 0 ? 0 : 1]; -} -function formatRelativeTime(unit, count, numeric = "always", narrow = false) { - const units = { - years: ["year", "yr."], - quarters: ["quarter", "qtr."], - months: ["month", "mo."], - weeks: ["week", "wk."], - days: ["day", "day", "days"], - hours: ["hour", "hr."], - minutes: ["minute", "min."], - seconds: ["second", "sec."] - }; - const lastable = ["hours", "minutes", "seconds"].indexOf(unit) === -1; - if (numeric === "auto" && lastable) { - const isDay = unit === "days"; - switch (count) { - case 1: - return isDay ? "tomorrow" : `next ${units[unit][0]}`; - case -1: - return isDay ? "yesterday" : `last ${units[unit][0]}`; - case 0: - return isDay ? "today" : `this ${units[unit][0]}`; - default: - } - } - const isInPast = Object.is(count, -0) || count < 0, fmtValue = Math.abs(count), singular = fmtValue === 1, lilUnits = units[unit], fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units[unit][0] : unit; - return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`; -} - -// node_modules/luxon/src/impl/formatter.js -function stringifyTokens(splits, tokenToString) { - let s2 = ""; - for (const token of splits) { - if (token.literal) { - s2 += token.val; - } else { - s2 += tokenToString(token.val); - } - } - return s2; -} -var macroTokenToFormatOpts = { - D: DATE_SHORT, - DD: DATE_MED, - DDD: DATE_FULL, - DDDD: DATE_HUGE, - t: TIME_SIMPLE, - tt: TIME_WITH_SECONDS, - ttt: TIME_WITH_SHORT_OFFSET, - tttt: TIME_WITH_LONG_OFFSET, - T: TIME_24_SIMPLE, - TT: TIME_24_WITH_SECONDS, - TTT: TIME_24_WITH_SHORT_OFFSET, - TTTT: TIME_24_WITH_LONG_OFFSET, - f: DATETIME_SHORT, - ff: DATETIME_MED, - fff: DATETIME_FULL, - ffff: DATETIME_HUGE, - F: DATETIME_SHORT_WITH_SECONDS, - FF: DATETIME_MED_WITH_SECONDS, - FFF: DATETIME_FULL_WITH_SECONDS, - FFFF: DATETIME_HUGE_WITH_SECONDS -}; -var Formatter = class _Formatter { - static create(locale2, opts = {}) { - return new _Formatter(locale2, opts); - } - static parseFormat(fmt) { - let current = null, currentFull = "", bracketed = false; - const splits = []; - for (let i = 0; i < fmt.length; i++) { - const c = fmt.charAt(i); - if (c === "'") { - if (currentFull.length > 0) { - splits.push({ literal: bracketed || /^\s+$/.test(currentFull), val: currentFull }); - } - current = null; - currentFull = ""; - bracketed = !bracketed; - } else if (bracketed) { - currentFull += c; - } else if (c === current) { - currentFull += c; - } else { - if (currentFull.length > 0) { - splits.push({ literal: /^\s+$/.test(currentFull), val: currentFull }); - } - currentFull = c; - current = c; - } - } - if (currentFull.length > 0) { - splits.push({ literal: bracketed || /^\s+$/.test(currentFull), val: currentFull }); - } - return splits; - } - static macroTokenToFormatOpts(token) { - return macroTokenToFormatOpts[token]; - } - constructor(locale2, formatOpts) { - this.opts = formatOpts; - this.loc = locale2; - this.systemLoc = null; - } - formatWithSystemDefault(dt, opts) { - if (this.systemLoc === null) { - this.systemLoc = this.loc.redefaultToSystem(); - } - const df = this.systemLoc.dtFormatter(dt, { ...this.opts, ...opts }); - return df.format(); - } - dtFormatter(dt, opts = {}) { - return this.loc.dtFormatter(dt, { ...this.opts, ...opts }); - } - formatDateTime(dt, opts) { - return this.dtFormatter(dt, opts).format(); - } - formatDateTimeParts(dt, opts) { - return this.dtFormatter(dt, opts).formatToParts(); - } - formatInterval(interval, opts) { - const df = this.dtFormatter(interval.start, opts); - return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate()); - } - resolvedOptions(dt, opts) { - return this.dtFormatter(dt, opts).resolvedOptions(); - } - num(n2, p = 0) { - if (this.opts.forceSimple) { - return padStart(n2, p); - } - const opts = { ...this.opts }; - if (p > 0) { - opts.padTo = p; - } - return this.loc.numberFormatter(opts).format(n2); - } - formatDateTimeFromString(dt, fmt) { - const knownEnglish = this.loc.listingMode() === "en", useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", string = (opts, extract) => this.loc.extract(dt, opts, extract), formatOffset2 = (opts) => { - if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) { - return "Z"; - } - return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : ""; - }, meridiem = () => knownEnglish ? meridiemForDateTime(dt) : string({ hour: "numeric", hourCycle: "h12" }, "dayperiod"), month = (length, standalone) => knownEnglish ? monthForDateTime(dt, length) : string(standalone ? { month: length } : { month: length, day: "numeric" }, "month"), weekday = (length, standalone) => knownEnglish ? weekdayForDateTime(dt, length) : string( - standalone ? { weekday: length } : { weekday: length, month: "long", day: "numeric" }, - "weekday" - ), maybeMacro = (token) => { - const formatOpts = _Formatter.macroTokenToFormatOpts(token); - if (formatOpts) { - return this.formatWithSystemDefault(dt, formatOpts); - } else { - return token; - } - }, era = (length) => knownEnglish ? eraForDateTime(dt, length) : string({ era: length }, "era"), tokenToString = (token) => { - switch (token) { - // ms - case "S": - return this.num(dt.millisecond); - case "u": - // falls through - case "SSS": - return this.num(dt.millisecond, 3); - // seconds - case "s": - return this.num(dt.second); - case "ss": - return this.num(dt.second, 2); - // fractional seconds - case "uu": - return this.num(Math.floor(dt.millisecond / 10), 2); - case "uuu": - return this.num(Math.floor(dt.millisecond / 100)); - // minutes - case "m": - return this.num(dt.minute); - case "mm": - return this.num(dt.minute, 2); - // hours - case "h": - return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12); - case "hh": - return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2); - case "H": - return this.num(dt.hour); - case "HH": - return this.num(dt.hour, 2); - // offset - case "Z": - return formatOffset2({ format: "narrow", allowZ: this.opts.allowZ }); - case "ZZ": - return formatOffset2({ format: "short", allowZ: this.opts.allowZ }); - case "ZZZ": - return formatOffset2({ format: "techie", allowZ: this.opts.allowZ }); - case "ZZZZ": - return dt.zone.offsetName(dt.ts, { format: "short", locale: this.loc.locale }); - case "ZZZZZ": - return dt.zone.offsetName(dt.ts, { format: "long", locale: this.loc.locale }); - // zone - case "z": - return dt.zoneName; - // meridiems - case "a": - return meridiem(); - // dates - case "d": - return useDateTimeFormatter ? string({ day: "numeric" }, "day") : this.num(dt.day); - case "dd": - return useDateTimeFormatter ? string({ day: "2-digit" }, "day") : this.num(dt.day, 2); - // weekdays - standalone - case "c": - return this.num(dt.weekday); - case "ccc": - return weekday("short", true); - case "cccc": - return weekday("long", true); - case "ccccc": - return weekday("narrow", true); - // weekdays - format - case "E": - return this.num(dt.weekday); - case "EEE": - return weekday("short", false); - case "EEEE": - return weekday("long", false); - case "EEEEE": - return weekday("narrow", false); - // months - standalone - case "L": - return useDateTimeFormatter ? string({ month: "numeric", day: "numeric" }, "month") : this.num(dt.month); - case "LL": - return useDateTimeFormatter ? string({ month: "2-digit", day: "numeric" }, "month") : this.num(dt.month, 2); - case "LLL": - return month("short", true); - case "LLLL": - return month("long", true); - case "LLLLL": - return month("narrow", true); - // months - format - case "M": - return useDateTimeFormatter ? string({ month: "numeric" }, "month") : this.num(dt.month); - case "MM": - return useDateTimeFormatter ? string({ month: "2-digit" }, "month") : this.num(dt.month, 2); - case "MMM": - return month("short", false); - case "MMMM": - return month("long", false); - case "MMMMM": - return month("narrow", false); - // years - case "y": - return useDateTimeFormatter ? string({ year: "numeric" }, "year") : this.num(dt.year); - case "yy": - return useDateTimeFormatter ? string({ year: "2-digit" }, "year") : this.num(dt.year.toString().slice(-2), 2); - case "yyyy": - return useDateTimeFormatter ? string({ year: "numeric" }, "year") : this.num(dt.year, 4); - case "yyyyyy": - return useDateTimeFormatter ? string({ year: "numeric" }, "year") : this.num(dt.year, 6); - // eras - case "G": - return era("short"); - case "GG": - return era("long"); - case "GGGGG": - return era("narrow"); - case "kk": - return this.num(dt.weekYear.toString().slice(-2), 2); - case "kkkk": - return this.num(dt.weekYear, 4); - case "W": - return this.num(dt.weekNumber); - case "WW": - return this.num(dt.weekNumber, 2); - case "n": - return this.num(dt.localWeekNumber); - case "nn": - return this.num(dt.localWeekNumber, 2); - case "ii": - return this.num(dt.localWeekYear.toString().slice(-2), 2); - case "iiii": - return this.num(dt.localWeekYear, 4); - case "o": - return this.num(dt.ordinal); - case "ooo": - return this.num(dt.ordinal, 3); - case "q": - return this.num(dt.quarter); - case "qq": - return this.num(dt.quarter, 2); - case "X": - return this.num(Math.floor(dt.ts / 1e3)); - case "x": - return this.num(dt.ts); - default: - return maybeMacro(token); - } - }; - return stringifyTokens(_Formatter.parseFormat(fmt), tokenToString); - } - formatDurationFromString(dur, fmt) { - const tokenToField = (token) => { - switch (token[0]) { - case "S": - return "millisecond"; - case "s": - return "second"; - case "m": - return "minute"; - case "h": - return "hour"; - case "d": - return "day"; - case "w": - return "week"; - case "M": - return "month"; - case "y": - return "year"; - default: - return null; - } - }, tokenToString = (lildur) => (token) => { - const mapped = tokenToField(token); - if (mapped) { - return this.num(lildur.get(mapped), token.length); - } else { - return token; - } - }, tokens = _Formatter.parseFormat(fmt), realTokens = tokens.reduce( - (found, { literal, val }) => literal ? found : found.concat(val), - [] - ), collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t2) => t2)); - return stringifyTokens(tokens, tokenToString(collapsed)); - } -}; - -// node_modules/luxon/src/impl/regexParser.js -var ianaRegex = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/; -function combineRegexes(...regexes) { - const full = regexes.reduce((f, r) => f + r.source, ""); - return RegExp(`^${full}$`); -} -function combineExtractors(...extractors) { - return (m) => extractors.reduce( - ([mergedVals, mergedZone, cursor], ex) => { - const [val, zone, next2] = ex(m, cursor); - return [{ ...mergedVals, ...val }, zone || mergedZone, next2]; - }, - [{}, null, 1] - ).slice(0, 2); -} -function parse(s2, ...patterns) { - if (s2 == null) { - return [null, null]; - } - for (const [regex, extractor] of patterns) { - const m = regex.exec(s2); - if (m) { - return extractor(m); - } - } - return [null, null]; -} -function simpleParse(...keys) { - return (match2, cursor) => { - const ret = {}; - let i; - for (i = 0; i < keys.length; i++) { - ret[keys[i]] = parseInteger(match2[cursor + i]); - } - return [ret, null, cursor + i]; - }; -} -var offsetRegex = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/; -var isoExtendedZone = `(?:${offsetRegex.source}?(?:\\[(${ianaRegex.source})\\])?)?`; -var isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/; -var isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`); -var isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`); -var isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/; -var isoWeekRegex = /(\d{4})-?W(\d\d)(?:-?(\d))?/; -var isoOrdinalRegex = /(\d{4})-?(\d{3})/; -var extractISOWeekData = simpleParse("weekYear", "weekNumber", "weekDay"); -var extractISOOrdinalData = simpleParse("year", "ordinal"); -var sqlYmdRegex = /(\d{4})-(\d\d)-(\d\d)/; -var sqlTimeRegex = RegExp( - `${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?` -); -var sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`); -function int(match2, pos, fallback2) { - const m = match2[pos]; - return isUndefined(m) ? fallback2 : parseInteger(m); -} -function extractISOYmd(match2, cursor) { - const item = { - year: int(match2, cursor), - month: int(match2, cursor + 1, 1), - day: int(match2, cursor + 2, 1) - }; - return [item, null, cursor + 3]; -} -function extractISOTime(match2, cursor) { - const item = { - hours: int(match2, cursor, 0), - minutes: int(match2, cursor + 1, 0), - seconds: int(match2, cursor + 2, 0), - milliseconds: parseMillis(match2[cursor + 3]) - }; - return [item, null, cursor + 4]; -} -function extractISOOffset(match2, cursor) { - const local = !match2[cursor] && !match2[cursor + 1], fullOffset = signedOffset(match2[cursor + 1], match2[cursor + 2]), zone = local ? null : FixedOffsetZone.instance(fullOffset); - return [{}, zone, cursor + 3]; -} -function extractIANAZone(match2, cursor) { - const zone = match2[cursor] ? IANAZone.create(match2[cursor]) : null; - return [{}, zone, cursor + 1]; -} -var isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`); -var isoDuration = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/; -function extractISODuration(match2) { - const [s2, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] = match2; - const hasNegativePrefix = s2[0] === "-"; - const negativeSeconds = secondStr && secondStr[0] === "-"; - const maybeNegate = (num, force = false) => num !== void 0 && (force || num && hasNegativePrefix) ? -num : num; - return [ - { - years: maybeNegate(parseFloating(yearStr)), - months: maybeNegate(parseFloating(monthStr)), - weeks: maybeNegate(parseFloating(weekStr)), - days: maybeNegate(parseFloating(dayStr)), - hours: maybeNegate(parseFloating(hourStr)), - minutes: maybeNegate(parseFloating(minuteStr)), - seconds: maybeNegate(parseFloating(secondStr), secondStr === "-0"), - milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds) - } - ]; -} -var obsOffsets = { - GMT: 0, - EDT: -4 * 60, - EST: -5 * 60, - CDT: -5 * 60, - CST: -6 * 60, - MDT: -6 * 60, - MST: -7 * 60, - PDT: -7 * 60, - PST: -8 * 60 -}; -function fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { - const result = { - year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr), - month: monthsShort.indexOf(monthStr) + 1, - day: parseInteger(dayStr), - hour: parseInteger(hourStr), - minute: parseInteger(minuteStr) - }; - if (secondStr) result.second = parseInteger(secondStr); - if (weekdayStr) { - result.weekday = weekdayStr.length > 3 ? weekdaysLong.indexOf(weekdayStr) + 1 : weekdaysShort.indexOf(weekdayStr) + 1; - } - return result; -} -var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/; -function extractRFC2822(match2) { - const [ - , - weekdayStr, - dayStr, - monthStr, - yearStr, - hourStr, - minuteStr, - secondStr, - obsOffset, - milOffset, - offHourStr, - offMinuteStr - ] = match2, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - let offset2; - if (obsOffset) { - offset2 = obsOffsets[obsOffset]; - } else if (milOffset) { - offset2 = 0; - } else { - offset2 = signedOffset(offHourStr, offMinuteStr); - } - return [result, new FixedOffsetZone(offset2)]; -} -function preprocessRFC2822(s2) { - return s2.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim(); -} -var rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/; -var rfc850 = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/; -var ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/; -function extractRFC1123Or850(match2) { - const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match2, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - return [result, FixedOffsetZone.utcInstance]; -} -function extractASCII(match2) { - const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match2, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - return [result, FixedOffsetZone.utcInstance]; -} -var isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex); -var isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex); -var isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex); -var isoTimeCombinedRegex = combineRegexes(isoTimeRegex); -var extractISOYmdTimeAndOffset = combineExtractors( - extractISOYmd, - extractISOTime, - extractISOOffset, - extractIANAZone -); -var extractISOWeekTimeAndOffset = combineExtractors( - extractISOWeekData, - extractISOTime, - extractISOOffset, - extractIANAZone -); -var extractISOOrdinalDateAndTime = combineExtractors( - extractISOOrdinalData, - extractISOTime, - extractISOOffset, - extractIANAZone -); -var extractISOTimeAndOffset = combineExtractors( - extractISOTime, - extractISOOffset, - extractIANAZone -); -function parseISODate(s2) { - return parse( - s2, - [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], - [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset], - [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime], - [isoTimeCombinedRegex, extractISOTimeAndOffset] - ); -} -function parseRFC2822Date(s2) { - return parse(preprocessRFC2822(s2), [rfc2822, extractRFC2822]); -} -function parseHTTPDate(s2) { - return parse( - s2, - [rfc1123, extractRFC1123Or850], - [rfc850, extractRFC1123Or850], - [ascii, extractASCII] - ); -} -function parseISODuration(s2) { - return parse(s2, [isoDuration, extractISODuration]); -} -var extractISOTimeOnly = combineExtractors(extractISOTime); -function parseISOTimeOnly(s2) { - return parse(s2, [isoTimeOnly, extractISOTimeOnly]); -} -var sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex); -var sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex); -var extractISOTimeOffsetAndIANAZone = combineExtractors( - extractISOTime, - extractISOOffset, - extractIANAZone -); -function parseSQL(s2) { - return parse( - s2, - [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], - [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone] - ); -} - -// node_modules/luxon/src/duration.js -var INVALID = "Invalid Duration"; -var lowOrderMatrix = { - weeks: { - days: 7, - hours: 7 * 24, - minutes: 7 * 24 * 60, - seconds: 7 * 24 * 60 * 60, - milliseconds: 7 * 24 * 60 * 60 * 1e3 - }, - days: { - hours: 24, - minutes: 24 * 60, - seconds: 24 * 60 * 60, - milliseconds: 24 * 60 * 60 * 1e3 - }, - hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1e3 }, - minutes: { seconds: 60, milliseconds: 60 * 1e3 }, - seconds: { milliseconds: 1e3 } -}; -var casualMatrix = { - years: { - quarters: 4, - months: 12, - weeks: 52, - days: 365, - hours: 365 * 24, - minutes: 365 * 24 * 60, - seconds: 365 * 24 * 60 * 60, - milliseconds: 365 * 24 * 60 * 60 * 1e3 - }, - quarters: { - months: 3, - weeks: 13, - days: 91, - hours: 91 * 24, - minutes: 91 * 24 * 60, - seconds: 91 * 24 * 60 * 60, - milliseconds: 91 * 24 * 60 * 60 * 1e3 - }, - months: { - weeks: 4, - days: 30, - hours: 30 * 24, - minutes: 30 * 24 * 60, - seconds: 30 * 24 * 60 * 60, - milliseconds: 30 * 24 * 60 * 60 * 1e3 - }, - ...lowOrderMatrix -}; -var daysInYearAccurate = 146097 / 400; -var daysInMonthAccurate = 146097 / 4800; -var accurateMatrix = { - years: { - quarters: 4, - months: 12, - weeks: daysInYearAccurate / 7, - days: daysInYearAccurate, - hours: daysInYearAccurate * 24, - minutes: daysInYearAccurate * 24 * 60, - seconds: daysInYearAccurate * 24 * 60 * 60, - milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1e3 - }, - quarters: { - months: 3, - weeks: daysInYearAccurate / 28, - days: daysInYearAccurate / 4, - hours: daysInYearAccurate * 24 / 4, - minutes: daysInYearAccurate * 24 * 60 / 4, - seconds: daysInYearAccurate * 24 * 60 * 60 / 4, - milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1e3 / 4 - }, - months: { - weeks: daysInMonthAccurate / 7, - days: daysInMonthAccurate, - hours: daysInMonthAccurate * 24, - minutes: daysInMonthAccurate * 24 * 60, - seconds: daysInMonthAccurate * 24 * 60 * 60, - milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1e3 - }, - ...lowOrderMatrix -}; -var orderedUnits = [ - "years", - "quarters", - "months", - "weeks", - "days", - "hours", - "minutes", - "seconds", - "milliseconds" -]; -var reverseUnits = orderedUnits.slice(0).reverse(); -function clone(dur, alts, clear = false) { - const conf = { - values: clear ? alts.values : { ...dur.values, ...alts.values || {} }, - loc: dur.loc.clone(alts.loc), - conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy, - matrix: alts.matrix || dur.matrix - }; - return new Duration(conf); -} -function durationToMillis(matrix, vals) { - let sum = vals.milliseconds ?? 0; - for (const unit of reverseUnits.slice(1)) { - if (vals[unit]) { - sum += vals[unit] * matrix[unit]["milliseconds"]; - } - } - return sum; -} -function normalizeValues(matrix, vals) { - const factor = durationToMillis(matrix, vals) < 0 ? -1 : 1; - orderedUnits.reduceRight((previous, current) => { - if (!isUndefined(vals[current])) { - if (previous) { - const previousVal = vals[previous] * factor; - const conv = matrix[current][previous]; - const rollUp = Math.floor(previousVal / conv); - vals[current] += rollUp * factor; - vals[previous] -= rollUp * conv * factor; - } - return current; - } else { - return previous; - } - }, null); - orderedUnits.reduce((previous, current) => { - if (!isUndefined(vals[current])) { - if (previous) { - const fraction = vals[previous] % 1; - vals[previous] -= fraction; - vals[current] += fraction * matrix[previous][current]; - } - return current; - } else { - return previous; - } - }, null); -} -function removeZeroes(vals) { - const newVals = {}; - for (const [key, value] of Object.entries(vals)) { - if (value !== 0) { - newVals[key] = value; - } - } - return newVals; -} -var Duration = class _Duration { - /** - * @private - */ - constructor(config) { - const accurate = config.conversionAccuracy === "longterm" || false; - let matrix = accurate ? accurateMatrix : casualMatrix; - if (config.matrix) { - matrix = config.matrix; - } - this.values = config.values; - this.loc = config.loc || Locale.create(); - this.conversionAccuracy = accurate ? "longterm" : "casual"; - this.invalid = config.invalid || null; - this.matrix = matrix; - this.isLuxonDuration = true; - } - /** - * Create Duration from a number of milliseconds. - * @param {number} count of milliseconds - * @param {Object} opts - options for parsing - * @param {string} [opts.locale='en-US'] - the locale to use - * @param {string} opts.numberingSystem - the numbering system to use - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - static fromMillis(count, opts) { - return _Duration.fromObject({ milliseconds: count }, opts); - } - /** - * Create a Duration from a JavaScript object with keys like 'years' and 'hours'. - * If this object is empty then a zero milliseconds duration is returned. - * @param {Object} obj - the object to create the DateTime from - * @param {number} obj.years - * @param {number} obj.quarters - * @param {number} obj.months - * @param {number} obj.weeks - * @param {number} obj.days - * @param {number} obj.hours - * @param {number} obj.minutes - * @param {number} obj.seconds - * @param {number} obj.milliseconds - * @param {Object} [opts=[]] - options for creating this Duration - * @param {string} [opts.locale='en-US'] - the locale to use - * @param {string} opts.numberingSystem - the numbering system to use - * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use - * @param {string} [opts.matrix=Object] - the custom conversion system to use - * @return {Duration} - */ - static fromObject(obj, opts = {}) { - if (obj == null || typeof obj !== "object") { - throw new InvalidArgumentError( - `Duration.fromObject: argument expected to be an object, got ${obj === null ? "null" : typeof obj}` - ); - } - return new _Duration({ - values: normalizeObject(obj, _Duration.normalizeUnit), - loc: Locale.fromObject(opts), - conversionAccuracy: opts.conversionAccuracy, - matrix: opts.matrix - }); - } - /** - * Create a Duration from DurationLike. - * - * @param {Object | number | Duration} durationLike - * One of: - * - object with keys like 'years' and 'hours'. - * - number representing milliseconds - * - Duration instance - * @return {Duration} - */ - static fromDurationLike(durationLike) { - if (isNumber(durationLike)) { - return _Duration.fromMillis(durationLike); - } else if (_Duration.isDuration(durationLike)) { - return durationLike; - } else if (typeof durationLike === "object") { - return _Duration.fromObject(durationLike); - } else { - throw new InvalidArgumentError( - `Unknown duration argument ${durationLike} of type ${typeof durationLike}` - ); - } - } - /** - * Create a Duration from an ISO 8601 duration string. - * @param {string} text - text to parse - * @param {Object} opts - options for parsing - * @param {string} [opts.locale='en-US'] - the locale to use - * @param {string} opts.numberingSystem - the numbering system to use - * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use - * @param {string} [opts.matrix=Object] - the preset conversion system to use - * @see https://en.wikipedia.org/wiki/ISO_8601#Durations - * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 } - * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 } - * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 } - * @return {Duration} - */ - static fromISO(text2, opts) { - const [parsed] = parseISODuration(text2); - if (parsed) { - return _Duration.fromObject(parsed, opts); - } else { - return _Duration.invalid("unparsable", `the input "${text2}" can't be parsed as ISO 8601`); - } - } - /** - * Create a Duration from an ISO 8601 time string. - * @param {string} text - text to parse - * @param {Object} opts - options for parsing - * @param {string} [opts.locale='en-US'] - the locale to use - * @param {string} opts.numberingSystem - the numbering system to use - * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use - * @param {string} [opts.matrix=Object] - the conversion system to use - * @see https://en.wikipedia.org/wiki/ISO_8601#Times - * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 } - * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } - * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } - * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } - * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } - * @return {Duration} - */ - static fromISOTime(text2, opts) { - const [parsed] = parseISOTimeOnly(text2); - if (parsed) { - return _Duration.fromObject(parsed, opts); - } else { - return _Duration.invalid("unparsable", `the input "${text2}" can't be parsed as ISO 8601`); - } - } - /** - * Create an invalid Duration. - * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {Duration} - */ - static invalid(reason, explanation = null) { - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the Duration is invalid"); - } - const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - if (Settings.throwOnInvalid) { - throw new InvalidDurationError(invalid); - } else { - return new _Duration({ invalid }); - } - } - /** - * @private - */ - static normalizeUnit(unit) { - const normalized = { - year: "years", - years: "years", - quarter: "quarters", - quarters: "quarters", - month: "months", - months: "months", - week: "weeks", - weeks: "weeks", - day: "days", - days: "days", - hour: "hours", - hours: "hours", - minute: "minutes", - minutes: "minutes", - second: "seconds", - seconds: "seconds", - millisecond: "milliseconds", - milliseconds: "milliseconds" - }[unit ? unit.toLowerCase() : unit]; - if (!normalized) throw new InvalidUnitError(unit); - return normalized; - } - /** - * Check if an object is a Duration. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - static isDuration(o) { - return o && o.isLuxonDuration || false; - } - /** - * Get the locale of a Duration, such 'en-GB' - * @type {string} - */ - get locale() { - return this.isValid ? this.loc.locale : null; - } - /** - * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration - * - * @type {string} - */ - get numberingSystem() { - return this.isValid ? this.loc.numberingSystem : null; - } - /** - * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens: - * * `S` for milliseconds - * * `s` for seconds - * * `m` for minutes - * * `h` for hours - * * `d` for days - * * `w` for weeks - * * `M` for months - * * `y` for years - * Notes: - * * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits - * * Tokens can be escaped by wrapping with single quotes. - * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting. - * @param {string} fmt - the format string - * @param {Object} opts - options - * @param {boolean} [opts.floor=true] - floor numerical values - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2" - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002" - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000" - * @return {string} - */ - toFormat(fmt, opts = {}) { - const fmtOpts = { - ...opts, - floor: opts.round !== false && opts.floor !== false - }; - return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID; - } - /** - * Returns a string representation of a Duration with all units included. - * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant. - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options - * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`. - * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor. - * @example - * ```js - * var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 }) - * dur.toHuman() //=> '1 day, 5 hours, 6 minutes' - * dur.toHuman({ listStyle: "long" }) //=> '1 day, 5 hours, and 6 minutes' - * dur.toHuman({ unitDisplay: "short" }) //=> '1 day, 5 hr, 6 min' - * ``` - */ - toHuman(opts = {}) { - if (!this.isValid) return INVALID; - const l2 = orderedUnits.map((unit) => { - const val = this.values[unit]; - if (isUndefined(val)) { - return null; - } - return this.loc.numberFormatter({ style: "unit", unitDisplay: "long", ...opts, unit: unit.slice(0, -1) }).format(val); - }).filter((n2) => n2); - return this.loc.listFormatter({ type: "conjunction", style: opts.listStyle || "narrow", ...opts }).format(l2); - } - /** - * Returns a JavaScript object with this Duration's values. - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 } - * @return {Object} - */ - toObject() { - if (!this.isValid) return {}; - return { ...this.values }; - } - /** - * Returns an ISO 8601-compliant string representation of this Duration. - * @see https://en.wikipedia.org/wiki/ISO_8601#Durations - * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S' - * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S' - * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M' - * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M' - * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S' - * @return {string} - */ - toISO() { - if (!this.isValid) return null; - let s2 = "P"; - if (this.years !== 0) s2 += this.years + "Y"; - if (this.months !== 0 || this.quarters !== 0) s2 += this.months + this.quarters * 3 + "M"; - if (this.weeks !== 0) s2 += this.weeks + "W"; - if (this.days !== 0) s2 += this.days + "D"; - if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) - s2 += "T"; - if (this.hours !== 0) s2 += this.hours + "H"; - if (this.minutes !== 0) s2 += this.minutes + "M"; - if (this.seconds !== 0 || this.milliseconds !== 0) - s2 += roundTo(this.seconds + this.milliseconds / 1e3, 3) + "S"; - if (s2 === "P") s2 += "T0S"; - return s2; - } - /** - * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day. - * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours. - * @see https://en.wikipedia.org/wiki/ISO_8601#Times - * @param {Object} opts - options - * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 - * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 - * @param {boolean} [opts.includePrefix=false] - include the `T` prefix - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000' - * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00' - * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00' - * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000' - * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000' - * @return {string} - */ - toISOTime(opts = {}) { - if (!this.isValid) return null; - const millis = this.toMillis(); - if (millis < 0 || millis >= 864e5) return null; - opts = { - suppressMilliseconds: false, - suppressSeconds: false, - includePrefix: false, - format: "extended", - ...opts, - includeOffset: false - }; - const dateTime = DateTime.fromMillis(millis, { zone: "UTC" }); - return dateTime.toISOTime(opts); - } - /** - * Returns an ISO 8601 representation of this Duration appropriate for use in JSON. - * @return {string} - */ - toJSON() { - return this.toISO(); - } - /** - * Returns an ISO 8601 representation of this Duration appropriate for use in debugging. - * @return {string} - */ - toString() { - return this.toISO(); - } - /** - * Returns a string representation of this Duration appropriate for the REPL. - * @return {string} - */ - [Symbol.for("nodejs.util.inspect.custom")]() { - if (this.isValid) { - return `Duration { values: ${JSON.stringify(this.values)} }`; - } else { - return `Duration { Invalid, reason: ${this.invalidReason} }`; - } - } - /** - * Returns an milliseconds value of this Duration. - * @return {number} - */ - toMillis() { - if (!this.isValid) return NaN; - return durationToMillis(this.matrix, this.values); - } - /** - * Returns an milliseconds value of this Duration. Alias of {@link toMillis} - * @return {number} - */ - valueOf() { - return this.toMillis(); - } - /** - * Make this Duration longer by the specified amount. Return a newly-constructed Duration. - * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @return {Duration} - */ - plus(duration) { - if (!this.isValid) return this; - const dur = _Duration.fromDurationLike(duration), result = {}; - for (const k of orderedUnits) { - if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) { - result[k] = dur.get(k) + this.get(k); - } - } - return clone(this, { values: result }, true); - } - /** - * Make this Duration shorter by the specified amount. Return a newly-constructed Duration. - * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @return {Duration} - */ - minus(duration) { - if (!this.isValid) return this; - const dur = _Duration.fromDurationLike(duration); - return this.plus(dur.negate()); - } - /** - * Scale this Duration by the specified amount. Return a newly-constructed Duration. - * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number. - * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 } - * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === "hours" ? x * 2 : x) //=> { hours: 2, minutes: 30 } - * @return {Duration} - */ - mapUnits(fn) { - if (!this.isValid) return this; - const result = {}; - for (const k of Object.keys(this.values)) { - result[k] = asNumber(fn(this.values[k], k)); - } - return clone(this, { values: result }, true); - } - /** - * Get the value of unit. - * @param {string} unit - a unit such as 'minute' or 'day' - * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2 - * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0 - * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3 - * @return {number} - */ - get(unit) { - return this[_Duration.normalizeUnit(unit)]; - } - /** - * "Set" the values of specified units. Return a newly-constructed Duration. - * @param {Object} values - a mapping of units to numbers - * @example dur.set({ years: 2017 }) - * @example dur.set({ hours: 8, minutes: 30 }) - * @return {Duration} - */ - set(values) { - if (!this.isValid) return this; - const mixed = { ...this.values, ...normalizeObject(values, _Duration.normalizeUnit) }; - return clone(this, { values: mixed }); - } - /** - * "Set" the locale and/or numberingSystem. Returns a newly-constructed Duration. - * @example dur.reconfigure({ locale: 'en-GB' }) - * @return {Duration} - */ - reconfigure({ locale: locale2, numberingSystem, conversionAccuracy, matrix } = {}) { - const loc = this.loc.clone({ locale: locale2, numberingSystem }); - const opts = { loc, matrix, conversionAccuracy }; - return clone(this, opts); - } - /** - * Return the length of the duration in the specified unit. - * @param {string} unit - a unit such as 'minutes' or 'days' - * @example Duration.fromObject({years: 1}).as('days') //=> 365 - * @example Duration.fromObject({years: 1}).as('months') //=> 12 - * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5 - * @return {number} - */ - as(unit) { - return this.isValid ? this.shiftTo(unit).get(unit) : NaN; - } - /** - * Reduce this Duration to its canonical representation in its current units. - * Assuming the overall value of the Duration is positive, this means: - * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example) - * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise - * the overall value would be negative, see third example) - * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example) - * - * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`. - * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 } - * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 } - * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 } - * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 } - * @return {Duration} - */ - normalize() { - if (!this.isValid) return this; - const vals = this.toObject(); - normalizeValues(this.matrix, vals); - return clone(this, { values: vals }, true); - } - /** - * Rescale units to its largest representation - * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 } - * @return {Duration} - */ - rescale() { - if (!this.isValid) return this; - const vals = removeZeroes(this.normalize().shiftToAll().toObject()); - return clone(this, { values: vals }, true); - } - /** - * Convert this Duration into its representation in a different set of units. - * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 } - * @return {Duration} - */ - shiftTo(...units) { - if (!this.isValid) return this; - if (units.length === 0) { - return this; - } - units = units.map((u) => _Duration.normalizeUnit(u)); - const built = {}, accumulated = {}, vals = this.toObject(); - let lastUnit; - for (const k of orderedUnits) { - if (units.indexOf(k) >= 0) { - lastUnit = k; - let own = 0; - for (const ak in accumulated) { - own += this.matrix[ak][k] * accumulated[ak]; - accumulated[ak] = 0; - } - if (isNumber(vals[k])) { - own += vals[k]; - } - const i = Math.trunc(own); - built[k] = i; - accumulated[k] = (own * 1e3 - i * 1e3) / 1e3; - } else if (isNumber(vals[k])) { - accumulated[k] = vals[k]; - } - } - for (const key in accumulated) { - if (accumulated[key] !== 0) { - built[lastUnit] += key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key]; - } - } - normalizeValues(this.matrix, built); - return clone(this, { values: built }, true); - } - /** - * Shift this Duration to all available units. - * Same as shiftTo("years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds") - * @return {Duration} - */ - shiftToAll() { - if (!this.isValid) return this; - return this.shiftTo( - "years", - "months", - "weeks", - "days", - "hours", - "minutes", - "seconds", - "milliseconds" - ); - } - /** - * Return the negative of this Duration. - * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 } - * @return {Duration} - */ - negate() { - if (!this.isValid) return this; - const negated = {}; - for (const k of Object.keys(this.values)) { - negated[k] = this.values[k] === 0 ? 0 : -this.values[k]; - } - return clone(this, { values: negated }, true); - } - /** - * Get the years. - * @type {number} - */ - get years() { - return this.isValid ? this.values.years || 0 : NaN; - } - /** - * Get the quarters. - * @type {number} - */ - get quarters() { - return this.isValid ? this.values.quarters || 0 : NaN; - } - /** - * Get the months. - * @type {number} - */ - get months() { - return this.isValid ? this.values.months || 0 : NaN; - } - /** - * Get the weeks - * @type {number} - */ - get weeks() { - return this.isValid ? this.values.weeks || 0 : NaN; - } - /** - * Get the days. - * @type {number} - */ - get days() { - return this.isValid ? this.values.days || 0 : NaN; - } - /** - * Get the hours. - * @type {number} - */ - get hours() { - return this.isValid ? this.values.hours || 0 : NaN; - } - /** - * Get the minutes. - * @type {number} - */ - get minutes() { - return this.isValid ? this.values.minutes || 0 : NaN; - } - /** - * Get the seconds. - * @return {number} - */ - get seconds() { - return this.isValid ? this.values.seconds || 0 : NaN; - } - /** - * Get the milliseconds. - * @return {number} - */ - get milliseconds() { - return this.isValid ? this.values.milliseconds || 0 : NaN; - } - /** - * Returns whether the Duration is invalid. Invalid durations are returned by diff operations - * on invalid DateTimes or Intervals. - * @return {boolean} - */ - get isValid() { - return this.invalid === null; - } - /** - * Returns an error code if this Duration became invalid, or null if the Duration is valid - * @return {string} - */ - get invalidReason() { - return this.invalid ? this.invalid.reason : null; - } - /** - * Returns an explanation of why this Duration became invalid, or null if the Duration is valid - * @type {string} - */ - get invalidExplanation() { - return this.invalid ? this.invalid.explanation : null; - } - /** - * Equality check - * Two Durations are equal iff they have the same units and the same values for each unit. - * @param {Duration} other - * @return {boolean} - */ - equals(other) { - if (!this.isValid || !other.isValid) { - return false; - } - if (!this.loc.equals(other.loc)) { - return false; - } - function eq(v1, v2) { - if (v1 === void 0 || v1 === 0) return v2 === void 0 || v2 === 0; - return v1 === v2; - } - for (const u of orderedUnits) { - if (!eq(this.values[u], other.values[u])) { - return false; - } - } - return true; - } -}; - -// node_modules/luxon/src/interval.js -var INVALID2 = "Invalid Interval"; -function validateStartEnd(start, end) { - if (!start || !start.isValid) { - return Interval.invalid("missing or invalid start"); - } else if (!end || !end.isValid) { - return Interval.invalid("missing or invalid end"); - } else if (end < start) { - return Interval.invalid( - "end before start", - `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}` - ); - } else { - return null; - } -} -var Interval = class _Interval { - /** - * @private - */ - constructor(config) { - this.s = config.start; - this.e = config.end; - this.invalid = config.invalid || null; - this.isLuxonInterval = true; - } - /** - * Create an invalid Interval. - * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {Interval} - */ - static invalid(reason, explanation = null) { - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the Interval is invalid"); - } - const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - if (Settings.throwOnInvalid) { - throw new InvalidIntervalError(invalid); - } else { - return new _Interval({ invalid }); - } - } - /** - * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end. - * @param {DateTime|Date|Object} start - * @param {DateTime|Date|Object} end - * @return {Interval} - */ - static fromDateTimes(start, end) { - const builtStart = friendlyDateTime(start), builtEnd = friendlyDateTime(end); - const validateError = validateStartEnd(builtStart, builtEnd); - if (validateError == null) { - return new _Interval({ - start: builtStart, - end: builtEnd - }); - } else { - return validateError; - } - } - /** - * Create an Interval from a start DateTime and a Duration to extend to. - * @param {DateTime|Date|Object} start - * @param {Duration|Object|number} duration - the length of the Interval. - * @return {Interval} - */ - static after(start, duration) { - const dur = Duration.fromDurationLike(duration), dt = friendlyDateTime(start); - return _Interval.fromDateTimes(dt, dt.plus(dur)); - } - /** - * Create an Interval from an end DateTime and a Duration to extend backwards to. - * @param {DateTime|Date|Object} end - * @param {Duration|Object|number} duration - the length of the Interval. - * @return {Interval} - */ - static before(end, duration) { - const dur = Duration.fromDurationLike(duration), dt = friendlyDateTime(end); - return _Interval.fromDateTimes(dt.minus(dur), dt); - } - /** - * Create an Interval from an ISO 8601 string. - * Accepts `/`, `/`, and `/` formats. - * @param {string} text - the ISO string to parse - * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO} - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @return {Interval} - */ - static fromISO(text2, opts) { - const [s2, e] = (text2 || "").split("/", 2); - if (s2 && e) { - let start, startIsValid; - try { - start = DateTime.fromISO(s2, opts); - startIsValid = start.isValid; - } catch (e2) { - startIsValid = false; - } - let end, endIsValid; - try { - end = DateTime.fromISO(e, opts); - endIsValid = end.isValid; - } catch (e2) { - endIsValid = false; - } - if (startIsValid && endIsValid) { - return _Interval.fromDateTimes(start, end); - } - if (startIsValid) { - const dur = Duration.fromISO(e, opts); - if (dur.isValid) { - return _Interval.after(start, dur); - } - } else if (endIsValid) { - const dur = Duration.fromISO(s2, opts); - if (dur.isValid) { - return _Interval.before(end, dur); - } - } - } - return _Interval.invalid("unparsable", `the input "${text2}" can't be parsed as ISO 8601`); - } - /** - * Check if an object is an Interval. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - static isInterval(o) { - return o && o.isLuxonInterval || false; - } - /** - * Returns the start of the Interval - * @type {DateTime} - */ - get start() { - return this.isValid ? this.s : null; - } - /** - * Returns the end of the Interval - * @type {DateTime} - */ - get end() { - return this.isValid ? this.e : null; - } - /** - * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'. - * @type {boolean} - */ - get isValid() { - return this.invalidReason === null; - } - /** - * Returns an error code if this Interval is invalid, or null if the Interval is valid - * @type {string} - */ - get invalidReason() { - return this.invalid ? this.invalid.reason : null; - } - /** - * Returns an explanation of why this Interval became invalid, or null if the Interval is valid - * @type {string} - */ - get invalidExplanation() { - return this.invalid ? this.invalid.explanation : null; - } - /** - * Returns the length of the Interval in the specified unit. - * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in. - * @return {number} - */ - length(unit = "milliseconds") { - return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN; - } - /** - * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part. - * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day' - * asks 'what dates are included in this interval?', not 'how many days long is this interval?' - * @param {string} [unit='milliseconds'] - the unit of time to count. - * @param {Object} opts - options - * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime - * @return {number} - */ - count(unit = "milliseconds", opts) { - if (!this.isValid) return NaN; - const start = this.start.startOf(unit, opts); - let end; - if (opts?.useLocaleWeeks) { - end = this.end.reconfigure({ locale: start.locale }); - } else { - end = this.end; - } - end = end.startOf(unit, opts); - return Math.floor(end.diff(start, unit).get(unit)) + (end.valueOf() !== this.end.valueOf()); - } - /** - * Returns whether this Interval's start and end are both in the same unit of time - * @param {string} unit - the unit of time to check sameness on - * @return {boolean} - */ - hasSame(unit) { - return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false; - } - /** - * Return whether this Interval has the same start and end DateTimes. - * @return {boolean} - */ - isEmpty() { - return this.s.valueOf() === this.e.valueOf(); - } - /** - * Return whether this Interval's start is after the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - isAfter(dateTime) { - if (!this.isValid) return false; - return this.s > dateTime; - } - /** - * Return whether this Interval's end is before the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - isBefore(dateTime) { - if (!this.isValid) return false; - return this.e <= dateTime; - } - /** - * Return whether this Interval contains the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - contains(dateTime) { - if (!this.isValid) return false; - return this.s <= dateTime && this.e > dateTime; - } - /** - * "Sets" the start and/or end dates. Returns a newly-constructed Interval. - * @param {Object} values - the values to set - * @param {DateTime} values.start - the starting DateTime - * @param {DateTime} values.end - the ending DateTime - * @return {Interval} - */ - set({ start, end } = {}) { - if (!this.isValid) return this; - return _Interval.fromDateTimes(start || this.s, end || this.e); - } - /** - * Split this Interval at each of the specified DateTimes - * @param {...DateTime} dateTimes - the unit of time to count. - * @return {Array} - */ - splitAt(...dateTimes) { - if (!this.isValid) return []; - const sorted = dateTimes.map(friendlyDateTime).filter((d) => this.contains(d)).sort((a, b) => a.toMillis() - b.toMillis()), results = []; - let { s: s2 } = this, i = 0; - while (s2 < this.e) { - const added = sorted[i] || this.e, next2 = +added > +this.e ? this.e : added; - results.push(_Interval.fromDateTimes(s2, next2)); - s2 = next2; - i += 1; - } - return results; - } - /** - * Split this Interval into smaller Intervals, each of the specified length. - * Left over time is grouped into a smaller interval - * @param {Duration|Object|number} duration - The length of each resulting interval. - * @return {Array} - */ - splitBy(duration) { - const dur = Duration.fromDurationLike(duration); - if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) { - return []; - } - let { s: s2 } = this, idx = 1, next2; - const results = []; - while (s2 < this.e) { - const added = this.start.plus(dur.mapUnits((x) => x * idx)); - next2 = +added > +this.e ? this.e : added; - results.push(_Interval.fromDateTimes(s2, next2)); - s2 = next2; - idx += 1; - } - return results; - } - /** - * Split this Interval into the specified number of smaller intervals. - * @param {number} numberOfParts - The number of Intervals to divide the Interval into. - * @return {Array} - */ - divideEqually(numberOfParts) { - if (!this.isValid) return []; - return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts); - } - /** - * Return whether this Interval overlaps with the specified Interval - * @param {Interval} other - * @return {boolean} - */ - overlaps(other) { - return this.e > other.s && this.s < other.e; - } - /** - * Return whether this Interval's end is adjacent to the specified Interval's start. - * @param {Interval} other - * @return {boolean} - */ - abutsStart(other) { - if (!this.isValid) return false; - return +this.e === +other.s; - } - /** - * Return whether this Interval's start is adjacent to the specified Interval's end. - * @param {Interval} other - * @return {boolean} - */ - abutsEnd(other) { - if (!this.isValid) return false; - return +other.e === +this.s; - } - /** - * Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise. - * @param {Interval} other - * @return {boolean} - */ - engulfs(other) { - if (!this.isValid) return false; - return this.s <= other.s && this.e >= other.e; - } - /** - * Return whether this Interval has the same start and end as the specified Interval. - * @param {Interval} other - * @return {boolean} - */ - equals(other) { - if (!this.isValid || !other.isValid) { - return false; - } - return this.s.equals(other.s) && this.e.equals(other.e); - } - /** - * Return an Interval representing the intersection of this Interval and the specified Interval. - * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals. - * Returns null if the intersection is empty, meaning, the intervals don't intersect. - * @param {Interval} other - * @return {Interval} - */ - intersection(other) { - if (!this.isValid) return this; - const s2 = this.s > other.s ? this.s : other.s, e = this.e < other.e ? this.e : other.e; - if (s2 >= e) { - return null; - } else { - return _Interval.fromDateTimes(s2, e); - } - } - /** - * Return an Interval representing the union of this Interval and the specified Interval. - * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals. - * @param {Interval} other - * @return {Interval} - */ - union(other) { - if (!this.isValid) return this; - const s2 = this.s < other.s ? this.s : other.s, e = this.e > other.e ? this.e : other.e; - return _Interval.fromDateTimes(s2, e); - } - /** - * Merge an array of Intervals into a equivalent minimal set of Intervals. - * Combines overlapping and adjacent Intervals. - * @param {Array} intervals - * @return {Array} - */ - static merge(intervals) { - const [found, final] = intervals.sort((a, b) => a.s - b.s).reduce( - ([sofar, current], item) => { - if (!current) { - return [sofar, item]; - } else if (current.overlaps(item) || current.abutsStart(item)) { - return [sofar, current.union(item)]; - } else { - return [sofar.concat([current]), item]; - } - }, - [[], null] - ); - if (final) { - found.push(final); - } - return found; - } - /** - * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals. - * @param {Array} intervals - * @return {Array} - */ - static xor(intervals) { - let start = null, currentCount = 0; - const results = [], ends = intervals.map((i) => [ - { time: i.s, type: "s" }, - { time: i.e, type: "e" } - ]), flattened = Array.prototype.concat(...ends), arr = flattened.sort((a, b) => a.time - b.time); - for (const i of arr) { - currentCount += i.type === "s" ? 1 : -1; - if (currentCount === 1) { - start = i.time; - } else { - if (start && +start !== +i.time) { - results.push(_Interval.fromDateTimes(start, i.time)); - } - start = null; - } - } - return _Interval.merge(results); - } - /** - * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals. - * @param {...Interval} intervals - * @return {Array} - */ - difference(...intervals) { - return _Interval.xor([this].concat(intervals)).map((i) => this.intersection(i)).filter((i) => i && !i.isEmpty()); - } - /** - * Returns a string representation of this Interval appropriate for debugging. - * @return {string} - */ - toString() { - if (!this.isValid) return INVALID2; - return `[${this.s.toISO()} \u2013 ${this.e.toISO()})`; - } - /** - * Returns a string representation of this Interval appropriate for the REPL. - * @return {string} - */ - [Symbol.for("nodejs.util.inspect.custom")]() { - if (this.isValid) { - return `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`; - } else { - return `Interval { Invalid, reason: ${this.invalidReason} }`; - } - } - /** - * Returns a localized string representing this Interval. Accepts the same options as the - * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as - * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method - * is browser-specific, but in general it will return an appropriate representation of the - * Interval in the assigned locale. Defaults to the system's locale if no locale has been - * specified. - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or - * Intl.DateTimeFormat constructor options. - * @param {Object} opts - Options to override the configuration of the start DateTime. - * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022 - * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022 - * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022 - * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM - * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p - * @return {string} - */ - toLocaleString(formatOpts = DATE_SHORT, opts = {}) { - return this.isValid ? Formatter.create(this.s.loc.clone(opts), formatOpts).formatInterval(this) : INVALID2; - } - /** - * Returns an ISO 8601-compliant string representation of this Interval. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @param {Object} opts - The same options as {@link DateTime#toISO} - * @return {string} - */ - toISO(opts) { - if (!this.isValid) return INVALID2; - return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`; - } - /** - * Returns an ISO 8601-compliant string representation of date of this Interval. - * The time components are ignored. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @return {string} - */ - toISODate() { - if (!this.isValid) return INVALID2; - return `${this.s.toISODate()}/${this.e.toISODate()}`; - } - /** - * Returns an ISO 8601-compliant string representation of time of this Interval. - * The date components are ignored. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @param {Object} opts - The same options as {@link DateTime#toISO} - * @return {string} - */ - toISOTime(opts) { - if (!this.isValid) return INVALID2; - return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`; - } - /** - * Returns a string representation of this Interval formatted according to the specified format - * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible - * formatting tool. - * @param {string} dateFormat - The format string. This string formats the start and end time. - * See {@link DateTime#toFormat} for details. - * @param {Object} opts - Options. - * @param {string} [opts.separator = ' – '] - A separator to place between the start and end - * representations. - * @return {string} - */ - toFormat(dateFormat, { separator = " \u2013 " } = {}) { - if (!this.isValid) return INVALID2; - return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`; - } - /** - * Return a Duration representing the time spanned by this interval. - * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration. - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 } - * @return {Duration} - */ - toDuration(unit, opts) { - if (!this.isValid) { - return Duration.invalid(this.invalidReason); - } - return this.e.diff(this.s, unit, opts); - } - /** - * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes - * @param {function} mapFn - * @return {Interval} - * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC()) - * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 })) - */ - mapEndpoints(mapFn) { - return _Interval.fromDateTimes(mapFn(this.s), mapFn(this.e)); - } -}; - -// node_modules/luxon/src/info.js -var Info = class { - /** - * Return whether the specified zone contains a DST. - * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone. - * @return {boolean} - */ - static hasDST(zone = Settings.defaultZone) { - const proto = DateTime.now().setZone(zone).set({ month: 12 }); - return !zone.isUniversal && proto.offset !== proto.set({ month: 6 }).offset; - } - /** - * Return whether the specified zone is a valid IANA specifier. - * @param {string} zone - Zone to check - * @return {boolean} - */ - static isValidIANAZone(zone) { - return IANAZone.isValidZone(zone); - } - /** - * Converts the input into a {@link Zone} instance. - * - * * If `input` is already a Zone instance, it is returned unchanged. - * * If `input` is a string containing a valid time zone name, a Zone instance - * with that name is returned. - * * If `input` is a string that doesn't refer to a known time zone, a Zone - * instance with {@link Zone#isValid} == false is returned. - * * If `input is a number, a Zone instance with the specified fixed offset - * in minutes is returned. - * * If `input` is `null` or `undefined`, the default zone is returned. - * @param {string|Zone|number} [input] - the value to be converted - * @return {Zone} - */ - static normalizeZone(input) { - return normalizeZone(input, Settings.defaultZone); - } - /** - * Get the weekday on which the week starts according to the given locale. - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.locObj=null] - an existing locale object to use - * @returns {number} the start of the week, 1 for Monday through 7 for Sunday - */ - static getStartOfWeek({ locale: locale2 = null, locObj = null } = {}) { - return (locObj || Locale.create(locale2)).getStartOfWeek(); - } - /** - * Get the minimum number of days necessary in a week before it is considered part of the next year according - * to the given locale. - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.locObj=null] - an existing locale object to use - * @returns {number} - */ - static getMinimumDaysInFirstWeek({ locale: locale2 = null, locObj = null } = {}) { - return (locObj || Locale.create(locale2)).getMinDaysInFirstWeek(); - } - /** - * Get the weekdays, which are considered the weekend according to the given locale - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.locObj=null] - an existing locale object to use - * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday - */ - static getWeekendWeekdays({ locale: locale2 = null, locObj = null } = {}) { - return (locObj || Locale.create(locale2)).getWeekendDays().slice(); - } - /** - * Return an array of standalone month names. - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @param {string} [opts.locObj=null] - an existing locale object to use - * @param {string} [opts.outputCalendar='gregory'] - the calendar - * @example Info.months()[0] //=> 'January' - * @example Info.months('short')[0] //=> 'Jan' - * @example Info.months('numeric')[0] //=> '1' - * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.' - * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١' - * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I' - * @return {Array} - */ - static months(length = "long", { locale: locale2 = null, numberingSystem = null, locObj = null, outputCalendar = "gregory" } = {}) { - return (locObj || Locale.create(locale2, numberingSystem, outputCalendar)).months(length); - } - /** - * Return an array of format month names. - * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that - * changes the string. - * See {@link Info#months} - * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @param {string} [opts.locObj=null] - an existing locale object to use - * @param {string} [opts.outputCalendar='gregory'] - the calendar - * @return {Array} - */ - static monthsFormat(length = "long", { locale: locale2 = null, numberingSystem = null, locObj = null, outputCalendar = "gregory" } = {}) { - return (locObj || Locale.create(locale2, numberingSystem, outputCalendar)).months(length, true); - } - /** - * Return an array of standalone week names. - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long". - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @param {string} [opts.locObj=null] - an existing locale object to use - * @example Info.weekdays()[0] //=> 'Monday' - * @example Info.weekdays('short')[0] //=> 'Mon' - * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.' - * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين' - * @return {Array} - */ - static weekdays(length = "long", { locale: locale2 = null, numberingSystem = null, locObj = null } = {}) { - return (locObj || Locale.create(locale2, numberingSystem, null)).weekdays(length); - } - /** - * Return an array of format week names. - * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that - * changes the string. - * See {@link Info#weekdays} - * @param {string} [length='long'] - the length of the month representation, such as "narrow", "short", "long". - * @param {Object} opts - options - * @param {string} [opts.locale=null] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @param {string} [opts.locObj=null] - an existing locale object to use - * @return {Array} - */ - static weekdaysFormat(length = "long", { locale: locale2 = null, numberingSystem = null, locObj = null } = {}) { - return (locObj || Locale.create(locale2, numberingSystem, null)).weekdays(length, true); - } - /** - * Return an array of meridiems. - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @example Info.meridiems() //=> [ 'AM', 'PM' ] - * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ] - * @return {Array} - */ - static meridiems({ locale: locale2 = null } = {}) { - return Locale.create(locale2).meridiems(); - } - /** - * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian. - * @param {string} [length='short'] - the length of the era representation, such as "short" or "long". - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @example Info.eras() //=> [ 'BC', 'AD' ] - * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ] - * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ] - * @return {Array} - */ - static eras(length = "short", { locale: locale2 = null } = {}) { - return Locale.create(locale2, null, "gregory").eras(length); - } - /** - * Return the set of available features in this environment. - * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case. - * Keys: - * * `relative`: whether this environment supports relative time formatting - * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale - * @example Info.features() //=> { relative: false, localeWeek: true } - * @return {Object} - */ - static features() { - return { relative: hasRelative(), localeWeek: hasLocaleWeekInfo() }; - } -}; - -// node_modules/luxon/src/impl/diff.js -function dayDiff(earlier, later) { - const utcDayStart = (dt) => dt.toUTC(0, { keepLocalTime: true }).startOf("day").valueOf(), ms = utcDayStart(later) - utcDayStart(earlier); - return Math.floor(Duration.fromMillis(ms).as("days")); -} -function highOrderDiffs(cursor, later, units) { - const differs = [ - ["years", (a, b) => b.year - a.year], - ["quarters", (a, b) => b.quarter - a.quarter + (b.year - a.year) * 4], - ["months", (a, b) => b.month - a.month + (b.year - a.year) * 12], - [ - "weeks", - (a, b) => { - const days = dayDiff(a, b); - return (days - days % 7) / 7; - } - ], - ["days", dayDiff] - ]; - const results = {}; - const earlier = cursor; - let lowestOrder, highWater; - for (const [unit, differ] of differs) { - if (units.indexOf(unit) >= 0) { - lowestOrder = unit; - results[unit] = differ(cursor, later); - highWater = earlier.plus(results); - if (highWater > later) { - results[unit]--; - cursor = earlier.plus(results); - if (cursor > later) { - highWater = cursor; - results[unit]--; - cursor = earlier.plus(results); - } - } else { - cursor = highWater; - } - } - } - return [cursor, results, highWater, lowestOrder]; -} -function diff_default(earlier, later, units, opts) { - let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units); - const remainingMillis = later - cursor; - const lowerOrderUnits = units.filter( - (u) => ["hours", "minutes", "seconds", "milliseconds"].indexOf(u) >= 0 - ); - if (lowerOrderUnits.length === 0) { - if (highWater < later) { - highWater = cursor.plus({ [lowestOrder]: 1 }); - } - if (highWater !== cursor) { - results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor); - } - } - const duration = Duration.fromObject(results, opts); - if (lowerOrderUnits.length > 0) { - return Duration.fromMillis(remainingMillis, opts).shiftTo(...lowerOrderUnits).plus(duration); - } else { - return duration; - } -} - -// node_modules/luxon/src/impl/tokenParser.js -var MISSING_FTP = "missing Intl.DateTimeFormat.formatToParts support"; -function intUnit(regex, post = (i) => i) { - return { regex, deser: ([s2]) => post(parseDigits(s2)) }; -} -var NBSP = String.fromCharCode(160); -var spaceOrNBSP = `[ ${NBSP}]`; -var spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, "g"); -function fixListRegex(s2) { - return s2.replace(/\./g, "\\.?").replace(spaceOrNBSPRegExp, spaceOrNBSP); -} -function stripInsensitivities(s2) { - return s2.replace(/\./g, "").replace(spaceOrNBSPRegExp, " ").toLowerCase(); -} -function oneOf(strings, startIndex) { - if (strings === null) { - return null; - } else { - return { - regex: RegExp(strings.map(fixListRegex).join("|")), - deser: ([s2]) => strings.findIndex((i) => stripInsensitivities(s2) === stripInsensitivities(i)) + startIndex - }; - } -} -function offset(regex, groups) { - return { regex, deser: ([, h, m]) => signedOffset(h, m), groups }; -} -function simple(regex) { - return { regex, deser: ([s2]) => s2 }; -} -function escapeToken(value) { - return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); -} -function unitForToken(token, loc) { - const one = digitRegex(loc), two = digitRegex(loc, "{2}"), three = digitRegex(loc, "{3}"), four = digitRegex(loc, "{4}"), six = digitRegex(loc, "{6}"), oneOrTwo = digitRegex(loc, "{1,2}"), oneToThree = digitRegex(loc, "{1,3}"), oneToSix = digitRegex(loc, "{1,6}"), oneToNine = digitRegex(loc, "{1,9}"), twoToFour = digitRegex(loc, "{2,4}"), fourToSix = digitRegex(loc, "{4,6}"), literal = (t2) => ({ regex: RegExp(escapeToken(t2.val)), deser: ([s2]) => s2, literal: true }), unitate = (t2) => { - if (token.literal) { - return literal(t2); - } - switch (t2.val) { - // era - case "G": - return oneOf(loc.eras("short"), 0); - case "GG": - return oneOf(loc.eras("long"), 0); - // years - case "y": - return intUnit(oneToSix); - case "yy": - return intUnit(twoToFour, untruncateYear); - case "yyyy": - return intUnit(four); - case "yyyyy": - return intUnit(fourToSix); - case "yyyyyy": - return intUnit(six); - // months - case "M": - return intUnit(oneOrTwo); - case "MM": - return intUnit(two); - case "MMM": - return oneOf(loc.months("short", true), 1); - case "MMMM": - return oneOf(loc.months("long", true), 1); - case "L": - return intUnit(oneOrTwo); - case "LL": - return intUnit(two); - case "LLL": - return oneOf(loc.months("short", false), 1); - case "LLLL": - return oneOf(loc.months("long", false), 1); - // dates - case "d": - return intUnit(oneOrTwo); - case "dd": - return intUnit(two); - // ordinals - case "o": - return intUnit(oneToThree); - case "ooo": - return intUnit(three); - // time - case "HH": - return intUnit(two); - case "H": - return intUnit(oneOrTwo); - case "hh": - return intUnit(two); - case "h": - return intUnit(oneOrTwo); - case "mm": - return intUnit(two); - case "m": - return intUnit(oneOrTwo); - case "q": - return intUnit(oneOrTwo); - case "qq": - return intUnit(two); - case "s": - return intUnit(oneOrTwo); - case "ss": - return intUnit(two); - case "S": - return intUnit(oneToThree); - case "SSS": - return intUnit(three); - case "u": - return simple(oneToNine); - case "uu": - return simple(oneOrTwo); - case "uuu": - return intUnit(one); - // meridiem - case "a": - return oneOf(loc.meridiems(), 0); - // weekYear (k) - case "kkkk": - return intUnit(four); - case "kk": - return intUnit(twoToFour, untruncateYear); - // weekNumber (W) - case "W": - return intUnit(oneOrTwo); - case "WW": - return intUnit(two); - // weekdays - case "E": - case "c": - return intUnit(one); - case "EEE": - return oneOf(loc.weekdays("short", false), 1); - case "EEEE": - return oneOf(loc.weekdays("long", false), 1); - case "ccc": - return oneOf(loc.weekdays("short", true), 1); - case "cccc": - return oneOf(loc.weekdays("long", true), 1); - // offset/zone - case "Z": - case "ZZ": - return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2); - case "ZZZ": - return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2); - // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing - // because we don't have any way to figure out what they are - case "z": - return simple(/[a-z_+-/]{1,256}?/i); - // this special-case "token" represents a place where a macro-token expanded into a white-space literal - // in this case we accept any non-newline white-space - case " ": - return simple(/[^\S\n\r]/); - default: - return literal(t2); - } - }; - const unit = unitate(token) || { - invalidReason: MISSING_FTP - }; - unit.token = token; - return unit; -} -var partTypeStyleToTokenVal = { - year: { - "2-digit": "yy", - numeric: "yyyyy" - }, - month: { - numeric: "M", - "2-digit": "MM", - short: "MMM", - long: "MMMM" - }, - day: { - numeric: "d", - "2-digit": "dd" - }, - weekday: { - short: "EEE", - long: "EEEE" - }, - dayperiod: "a", - dayPeriod: "a", - hour12: { - numeric: "h", - "2-digit": "hh" - }, - hour24: { - numeric: "H", - "2-digit": "HH" - }, - minute: { - numeric: "m", - "2-digit": "mm" - }, - second: { - numeric: "s", - "2-digit": "ss" - }, - timeZoneName: { - long: "ZZZZZ", - short: "ZZZ" - } -}; -function tokenForPart(part, formatOpts, resolvedOpts) { - const { type, value } = part; - if (type === "literal") { - const isSpace = /^\s+$/.test(value); - return { - literal: !isSpace, - val: isSpace ? " " : value - }; - } - const style = formatOpts[type]; - let actualType = type; - if (type === "hour") { - if (formatOpts.hour12 != null) { - actualType = formatOpts.hour12 ? "hour12" : "hour24"; - } else if (formatOpts.hourCycle != null) { - if (formatOpts.hourCycle === "h11" || formatOpts.hourCycle === "h12") { - actualType = "hour12"; - } else { - actualType = "hour24"; - } - } else { - actualType = resolvedOpts.hour12 ? "hour12" : "hour24"; - } - } - let val = partTypeStyleToTokenVal[actualType]; - if (typeof val === "object") { - val = val[style]; - } - if (val) { - return { - literal: false, - val - }; - } - return void 0; -} -function buildRegex(units) { - const re = units.map((u) => u.regex).reduce((f, r) => `${f}(${r.source})`, ""); - return [`^${re}$`, units]; -} -function match(input, regex, handlers) { - const matches = input.match(regex); - if (matches) { - const all = {}; - let matchIndex = 1; - for (const i in handlers) { - if (hasOwnProperty(handlers, i)) { - const h = handlers[i], groups = h.groups ? h.groups + 1 : 1; - if (!h.literal && h.token) { - all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups)); - } - matchIndex += groups; - } - } - return [matches, all]; - } else { - return [matches, {}]; - } -} -function dateTimeFromMatches(matches) { - const toField = (token) => { - switch (token) { - case "S": - return "millisecond"; - case "s": - return "second"; - case "m": - return "minute"; - case "h": - case "H": - return "hour"; - case "d": - return "day"; - case "o": - return "ordinal"; - case "L": - case "M": - return "month"; - case "y": - return "year"; - case "E": - case "c": - return "weekday"; - case "W": - return "weekNumber"; - case "k": - return "weekYear"; - case "q": - return "quarter"; - default: - return null; - } - }; - let zone = null; - let specificOffset; - if (!isUndefined(matches.z)) { - zone = IANAZone.create(matches.z); - } - if (!isUndefined(matches.Z)) { - if (!zone) { - zone = new FixedOffsetZone(matches.Z); - } - specificOffset = matches.Z; - } - if (!isUndefined(matches.q)) { - matches.M = (matches.q - 1) * 3 + 1; - } - if (!isUndefined(matches.h)) { - if (matches.h < 12 && matches.a === 1) { - matches.h += 12; - } else if (matches.h === 12 && matches.a === 0) { - matches.h = 0; - } - } - if (matches.G === 0 && matches.y) { - matches.y = -matches.y; - } - if (!isUndefined(matches.u)) { - matches.S = parseMillis(matches.u); - } - const vals = Object.keys(matches).reduce((r, k) => { - const f = toField(k); - if (f) { - r[f] = matches[k]; - } - return r; - }, {}); - return [vals, zone, specificOffset]; -} -var dummyDateTimeCache = null; -function getDummyDateTime() { - if (!dummyDateTimeCache) { - dummyDateTimeCache = DateTime.fromMillis(1555555555555); - } - return dummyDateTimeCache; -} -function maybeExpandMacroToken(token, locale2) { - if (token.literal) { - return token; - } - const formatOpts = Formatter.macroTokenToFormatOpts(token.val); - const tokens = formatOptsToTokens(formatOpts, locale2); - if (tokens == null || tokens.includes(void 0)) { - return token; - } - return tokens; -} -function expandMacroTokens(tokens, locale2) { - return Array.prototype.concat(...tokens.map((t2) => maybeExpandMacroToken(t2, locale2))); -} -var TokenParser = class { - constructor(locale2, format) { - this.locale = locale2; - this.format = format; - this.tokens = expandMacroTokens(Formatter.parseFormat(format), locale2); - this.units = this.tokens.map((t2) => unitForToken(t2, locale2)); - this.disqualifyingUnit = this.units.find((t2) => t2.invalidReason); - if (!this.disqualifyingUnit) { - const [regexString, handlers] = buildRegex(this.units); - this.regex = RegExp(regexString, "i"); - this.handlers = handlers; - } - } - explainFromTokens(input) { - if (!this.isValid) { - return { input, tokens: this.tokens, invalidReason: this.invalidReason }; - } else { - const [rawMatches, matches] = match(input, this.regex, this.handlers), [result, zone, specificOffset] = matches ? dateTimeFromMatches(matches) : [null, null, void 0]; - if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) { - throw new ConflictingSpecificationError( - "Can't include meridiem when specifying 24-hour format" - ); - } - return { - input, - tokens: this.tokens, - regex: this.regex, - rawMatches, - matches, - result, - zone, - specificOffset - }; - } - } - get isValid() { - return !this.disqualifyingUnit; - } - get invalidReason() { - return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null; - } -}; -function explainFromTokens(locale2, input, format) { - const parser = new TokenParser(locale2, format); - return parser.explainFromTokens(input); -} -function parseFromTokens(locale2, input, format) { - const { result, zone, specificOffset, invalidReason } = explainFromTokens(locale2, input, format); - return [result, zone, specificOffset, invalidReason]; -} -function formatOptsToTokens(formatOpts, locale2) { - if (!formatOpts) { - return null; - } - const formatter = Formatter.create(locale2, formatOpts); - const df = formatter.dtFormatter(getDummyDateTime()); - const parts = df.formatToParts(); - const resolvedOpts = df.resolvedOptions(); - return parts.map((p) => tokenForPart(p, formatOpts, resolvedOpts)); -} - -// node_modules/luxon/src/datetime.js -var INVALID3 = "Invalid DateTime"; -var MAX_DATE = 864e13; -function unsupportedZone(zone) { - return new Invalid("unsupported zone", `the zone "${zone.name}" is not supported`); -} -function possiblyCachedWeekData(dt) { - if (dt.weekData === null) { - dt.weekData = gregorianToWeek(dt.c); - } - return dt.weekData; -} -function possiblyCachedLocalWeekData(dt) { - if (dt.localWeekData === null) { - dt.localWeekData = gregorianToWeek( - dt.c, - dt.loc.getMinDaysInFirstWeek(), - dt.loc.getStartOfWeek() - ); - } - return dt.localWeekData; -} -function clone2(inst, alts) { - const current = { - ts: inst.ts, - zone: inst.zone, - c: inst.c, - o: inst.o, - loc: inst.loc, - invalid: inst.invalid - }; - return new DateTime({ ...current, ...alts, old: current }); -} -function fixOffset(localTS, o, tz) { - let utcGuess = localTS - o * 60 * 1e3; - const o2 = tz.offset(utcGuess); - if (o === o2) { - return [utcGuess, o]; - } - utcGuess -= (o2 - o) * 60 * 1e3; - const o3 = tz.offset(utcGuess); - if (o2 === o3) { - return [utcGuess, o2]; - } - return [localTS - Math.min(o2, o3) * 60 * 1e3, Math.max(o2, o3)]; -} -function tsToObj(ts, offset2) { - ts += offset2 * 60 * 1e3; - const d = new Date(ts); - return { - year: d.getUTCFullYear(), - month: d.getUTCMonth() + 1, - day: d.getUTCDate(), - hour: d.getUTCHours(), - minute: d.getUTCMinutes(), - second: d.getUTCSeconds(), - millisecond: d.getUTCMilliseconds() - }; -} -function objToTS(obj, offset2, zone) { - return fixOffset(objToLocalTS(obj), offset2, zone); -} -function adjustTime(inst, dur) { - const oPre = inst.o, year = inst.c.year + Math.trunc(dur.years), month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, c = { - ...inst.c, - year, - month, - day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7 - }, millisToAdd = Duration.fromObject({ - years: dur.years - Math.trunc(dur.years), - quarters: dur.quarters - Math.trunc(dur.quarters), - months: dur.months - Math.trunc(dur.months), - weeks: dur.weeks - Math.trunc(dur.weeks), - days: dur.days - Math.trunc(dur.days), - hours: dur.hours, - minutes: dur.minutes, - seconds: dur.seconds, - milliseconds: dur.milliseconds - }).as("milliseconds"), localTS = objToLocalTS(c); - let [ts, o] = fixOffset(localTS, oPre, inst.zone); - if (millisToAdd !== 0) { - ts += millisToAdd; - o = inst.zone.offset(ts); - } - return { ts, o }; -} -function parseDataToDateTime(parsed, parsedZone, opts, format, text2, specificOffset) { - const { setZone, zone } = opts; - if (parsed && Object.keys(parsed).length !== 0 || parsedZone) { - const interpretationZone = parsedZone || zone, inst = DateTime.fromObject(parsed, { - ...opts, - zone: interpretationZone, - specificOffset - }); - return setZone ? inst : inst.setZone(zone); - } else { - return DateTime.invalid( - new Invalid("unparsable", `the input "${text2}" can't be parsed as ${format}`) - ); - } -} -function toTechFormat(dt, format, allowZ = true) { - return dt.isValid ? Formatter.create(Locale.create("en-US"), { - allowZ, - forceSimple: true - }).formatDateTimeFromString(dt, format) : null; -} -function toISODate(o, extended) { - const longFormat = o.c.year > 9999 || o.c.year < 0; - let c = ""; - if (longFormat && o.c.year >= 0) c += "+"; - c += padStart(o.c.year, longFormat ? 6 : 4); - if (extended) { - c += "-"; - c += padStart(o.c.month); - c += "-"; - c += padStart(o.c.day); - } else { - c += padStart(o.c.month); - c += padStart(o.c.day); - } - return c; -} -function toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone) { - let c = padStart(o.c.hour); - if (extended) { - c += ":"; - c += padStart(o.c.minute); - if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) { - c += ":"; - } - } else { - c += padStart(o.c.minute); - } - if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) { - c += padStart(o.c.second); - if (o.c.millisecond !== 0 || !suppressMilliseconds) { - c += "."; - c += padStart(o.c.millisecond, 3); - } - } - if (includeOffset) { - if (o.isOffsetFixed && o.offset === 0 && !extendedZone) { - c += "Z"; - } else if (o.o < 0) { - c += "-"; - c += padStart(Math.trunc(-o.o / 60)); - c += ":"; - c += padStart(Math.trunc(-o.o % 60)); - } else { - c += "+"; - c += padStart(Math.trunc(o.o / 60)); - c += ":"; - c += padStart(Math.trunc(o.o % 60)); - } - } - if (extendedZone) { - c += "[" + o.zone.ianaName + "]"; - } - return c; -} -var defaultUnitValues = { - month: 1, - day: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 -}; -var defaultWeekUnitValues = { - weekNumber: 1, - weekday: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 -}; -var defaultOrdinalUnitValues = { - ordinal: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 -}; -var orderedUnits2 = ["year", "month", "day", "hour", "minute", "second", "millisecond"]; -var orderedWeekUnits = [ - "weekYear", - "weekNumber", - "weekday", - "hour", - "minute", - "second", - "millisecond" -]; -var orderedOrdinalUnits = ["year", "ordinal", "hour", "minute", "second", "millisecond"]; -function normalizeUnit(unit) { - const normalized = { - year: "year", - years: "year", - month: "month", - months: "month", - day: "day", - days: "day", - hour: "hour", - hours: "hour", - minute: "minute", - minutes: "minute", - quarter: "quarter", - quarters: "quarter", - second: "second", - seconds: "second", - millisecond: "millisecond", - milliseconds: "millisecond", - weekday: "weekday", - weekdays: "weekday", - weeknumber: "weekNumber", - weeksnumber: "weekNumber", - weeknumbers: "weekNumber", - weekyear: "weekYear", - weekyears: "weekYear", - ordinal: "ordinal" - }[unit.toLowerCase()]; - if (!normalized) throw new InvalidUnitError(unit); - return normalized; -} -function normalizeUnitWithLocalWeeks(unit) { - switch (unit.toLowerCase()) { - case "localweekday": - case "localweekdays": - return "localWeekday"; - case "localweeknumber": - case "localweeknumbers": - return "localWeekNumber"; - case "localweekyear": - case "localweekyears": - return "localWeekYear"; - default: - return normalizeUnit(unit); - } -} -function guessOffsetForZone(zone) { - if (!zoneOffsetGuessCache[zone]) { - if (zoneOffsetTs === void 0) { - zoneOffsetTs = Settings.now(); - } - zoneOffsetGuessCache[zone] = zone.offset(zoneOffsetTs); - } - return zoneOffsetGuessCache[zone]; -} -function quickDT(obj, opts) { - const zone = normalizeZone(opts.zone, Settings.defaultZone); - if (!zone.isValid) { - return DateTime.invalid(unsupportedZone(zone)); - } - const loc = Locale.fromObject(opts); - let ts, o; - if (!isUndefined(obj.year)) { - for (const u of orderedUnits2) { - if (isUndefined(obj[u])) { - obj[u] = defaultUnitValues[u]; - } - } - const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj); - if (invalid) { - return DateTime.invalid(invalid); - } - const offsetProvis = guessOffsetForZone(zone); - [ts, o] = objToTS(obj, offsetProvis, zone); - } else { - ts = Settings.now(); - } - return new DateTime({ ts, zone, loc, o }); -} -function diffRelative(start, end, opts) { - const round = isUndefined(opts.round) ? true : opts.round, format = (c, unit) => { - c = roundTo(c, round || opts.calendary ? 0 : 2, true); - const formatter = end.loc.clone(opts).relFormatter(opts); - return formatter.format(c, unit); - }, differ = (unit) => { - if (opts.calendary) { - if (!end.hasSame(start, unit)) { - return end.startOf(unit).diff(start.startOf(unit), unit).get(unit); - } else return 0; - } else { - return end.diff(start, unit).get(unit); - } - }; - if (opts.unit) { - return format(differ(opts.unit), opts.unit); - } - for (const unit of opts.units) { - const count = differ(unit); - if (Math.abs(count) >= 1) { - return format(count, unit); - } - } - return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]); -} -function lastOpts(argList) { - let opts = {}, args; - if (argList.length > 0 && typeof argList[argList.length - 1] === "object") { - opts = argList[argList.length - 1]; - args = Array.from(argList).slice(0, argList.length - 1); - } else { - args = Array.from(argList); - } - return [opts, args]; -} -var zoneOffsetTs; -var zoneOffsetGuessCache = {}; -var DateTime = class _DateTime { - /** - * @access private - */ - constructor(config) { - const zone = config.zone || Settings.defaultZone; - let invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null); - this.ts = isUndefined(config.ts) ? Settings.now() : config.ts; - let c = null, o = null; - if (!invalid) { - const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone); - if (unchanged) { - [c, o] = [config.old.c, config.old.o]; - } else { - const ot = isNumber(config.o) && !config.old ? config.o : zone.offset(this.ts); - c = tsToObj(this.ts, ot); - invalid = Number.isNaN(c.year) ? new Invalid("invalid input") : null; - c = invalid ? null : c; - o = invalid ? null : ot; - } - } - this._zone = zone; - this.loc = config.loc || Locale.create(); - this.invalid = invalid; - this.weekData = null; - this.localWeekData = null; - this.c = c; - this.o = o; - this.isLuxonDateTime = true; - } - // CONSTRUCT - /** - * Create a DateTime for the current instant, in the system's time zone. - * - * Use Settings to override these default values if needed. - * @example DateTime.now().toISO() //~> now in the ISO format - * @return {DateTime} - */ - static now() { - return new _DateTime({}); - } - /** - * Create a local DateTime - * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used - * @param {number} [month=1] - The month, 1-indexed - * @param {number} [day=1] - The day of the month, 1-indexed - * @param {number} [hour=0] - The hour of the day, in 24-hour time - * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 - * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 - * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 - * @example DateTime.local() //~> now - * @example DateTime.local({ zone: "America/New_York" }) //~> now, in US east coast time - * @example DateTime.local(2017) //~> 2017-01-01T00:00:00 - * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00 - * @example DateTime.local(2017, 3, 12, { locale: "fr" }) //~> 2017-03-12T00:00:00, with a French locale - * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00 - * @example DateTime.local(2017, 3, 12, 5, { zone: "utc" }) //~> 2017-03-12T05:00:00, in UTC - * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00 - * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10 - * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765 - * @return {DateTime} - */ - static local() { - const [opts, args] = lastOpts(arguments), [year, month, day, hour, minute, second, millisecond] = args; - return quickDT({ year, month, day, hour, minute, second, millisecond }, opts); - } - /** - * Create a DateTime in UTC - * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used - * @param {number} [month=1] - The month, 1-indexed - * @param {number} [day=1] - The day of the month - * @param {number} [hour=0] - The hour of the day, in 24-hour time - * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 - * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 - * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 - * @param {Object} options - configuration options for the DateTime - * @param {string} [options.locale] - a locale to set on the resulting DateTime instance - * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance - * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance - * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance - * @example DateTime.utc() //~> now - * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z - * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z - * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z - * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z - * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z - * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: "fr" }) //~> 2017-03-12T05:45:00Z with a French locale - * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z - * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: "fr" }) //~> 2017-03-12T05:45:10.765Z with a French locale - * @return {DateTime} - */ - static utc() { - const [opts, args] = lastOpts(arguments), [year, month, day, hour, minute, second, millisecond] = args; - opts.zone = FixedOffsetZone.utcInstance; - return quickDT({ year, month, day, hour, minute, second, millisecond }, opts); - } - /** - * Create a DateTime from a JavaScript Date object. Uses the default zone. - * @param {Date} date - a JavaScript Date object - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @return {DateTime} - */ - static fromJSDate(date2, options = {}) { - const ts = isDate(date2) ? date2.valueOf() : NaN; - if (Number.isNaN(ts)) { - return _DateTime.invalid("invalid input"); - } - const zoneToUse = normalizeZone(options.zone, Settings.defaultZone); - if (!zoneToUse.isValid) { - return _DateTime.invalid(unsupportedZone(zoneToUse)); - } - return new _DateTime({ - ts, - zone: zoneToUse, - loc: Locale.fromObject(options) - }); - } - /** - * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. - * @param {number} milliseconds - a number of milliseconds since 1970 UTC - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @param {string} [options.locale] - a locale to set on the resulting DateTime instance - * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance - * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance - * @return {DateTime} - */ - static fromMillis(milliseconds, options = {}) { - if (!isNumber(milliseconds)) { - throw new InvalidArgumentError( - `fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}` - ); - } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) { - return _DateTime.invalid("Timestamp out of range"); - } else { - return new _DateTime({ - ts: milliseconds, - zone: normalizeZone(options.zone, Settings.defaultZone), - loc: Locale.fromObject(options) - }); - } - } - /** - * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. - * @param {number} seconds - a number of seconds since 1970 UTC - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @param {string} [options.locale] - a locale to set on the resulting DateTime instance - * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance - * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance - * @return {DateTime} - */ - static fromSeconds(seconds, options = {}) { - if (!isNumber(seconds)) { - throw new InvalidArgumentError("fromSeconds requires a numerical input"); - } else { - return new _DateTime({ - ts: seconds * 1e3, - zone: normalizeZone(options.zone, Settings.defaultZone), - loc: Locale.fromObject(options) - }); - } - } - /** - * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults. - * @param {Object} obj - the object to create the DateTime from - * @param {number} obj.year - a year, such as 1987 - * @param {number} obj.month - a month, 1-12 - * @param {number} obj.day - a day of the month, 1-31, depending on the month - * @param {number} obj.ordinal - day of the year, 1-365 or 366 - * @param {number} obj.weekYear - an ISO week year - * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year - * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday - * @param {number} obj.localWeekYear - a week year, according to the locale - * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale - * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale - * @param {number} obj.hour - hour of the day, 0-23 - * @param {number} obj.minute - minute of the hour, 0-59 - * @param {number} obj.second - second of the minute, 0-59 - * @param {number} obj.millisecond - millisecond of the second, 0-999 - * @param {Object} opts - options for creating this DateTime - * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone() - * @param {string} [opts.locale='system\'s locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance - * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25' - * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01' - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06 - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }), - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' }) - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' }) - * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13' - * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: "en-US" }).toISODate() //=> '2021-12-26' - * @return {DateTime} - */ - static fromObject(obj, opts = {}) { - obj = obj || {}; - const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone); - if (!zoneToUse.isValid) { - return _DateTime.invalid(unsupportedZone(zoneToUse)); - } - const loc = Locale.fromObject(opts); - const normalized = normalizeObject(obj, normalizeUnitWithLocalWeeks); - const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, loc); - const tsNow = Settings.now(), offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber; - if ((containsGregor || containsOrdinal) && definiteWeekDef) { - throw new ConflictingSpecificationError( - "Can't mix weekYear/weekNumber units with year/month/day or ordinals" - ); - } - if (containsGregorMD && containsOrdinal) { - throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day"); - } - const useWeekData = definiteWeekDef || normalized.weekday && !containsGregor; - let units, defaultValues, objNow = tsToObj(tsNow, offsetProvis); - if (useWeekData) { - units = orderedWeekUnits; - defaultValues = defaultWeekUnitValues; - objNow = gregorianToWeek(objNow, minDaysInFirstWeek, startOfWeek); - } else if (containsOrdinal) { - units = orderedOrdinalUnits; - defaultValues = defaultOrdinalUnitValues; - objNow = gregorianToOrdinal(objNow); - } else { - units = orderedUnits2; - defaultValues = defaultUnitValues; - } - let foundFirst = false; - for (const u of units) { - const v = normalized[u]; - if (!isUndefined(v)) { - foundFirst = true; - } else if (foundFirst) { - normalized[u] = defaultValues[u]; - } else { - normalized[u] = objNow[u]; - } - } - const higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized), invalid = higherOrderInvalid || hasInvalidTimeData(normalized); - if (invalid) { - return _DateTime.invalid(invalid); - } - const gregorian = useWeekData ? weekToGregorian(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? ordinalToGregorian(normalized) : normalized, [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse), inst = new _DateTime({ - ts: tsFinal, - zone: zoneToUse, - o: offsetFinal, - loc - }); - if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) { - return _DateTime.invalid( - "mismatched weekday", - `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}` - ); - } - if (!inst.isValid) { - return _DateTime.invalid(inst.invalid); - } - return inst; - } - /** - * Create a DateTime from an ISO 8601 string - * @param {string} text - the ISO string - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance - * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance - * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance - * @example DateTime.fromISO('2016-05-25T09:08:34.123') - * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00') - * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true}) - * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'}) - * @example DateTime.fromISO('2016-W05-4') - * @return {DateTime} - */ - static fromISO(text2, opts = {}) { - const [vals, parsedZone] = parseISODate(text2); - return parseDataToDateTime(vals, parsedZone, opts, "ISO 8601", text2); - } - /** - * Create a DateTime from an RFC 2822 string - * @param {string} text - the RFC 2822 string - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. - * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance - * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT') - * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600') - * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z') - * @return {DateTime} - */ - static fromRFC2822(text2, opts = {}) { - const [vals, parsedZone] = parseRFC2822Date(text2); - return parseDataToDateTime(vals, parsedZone, opts, "RFC 2822", text2); - } - /** - * Create a DateTime from an HTTP header date - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 - * @param {string} text - the HTTP header date - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. - * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods. - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance - * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT') - * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT') - * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994') - * @return {DateTime} - */ - static fromHTTP(text2, opts = {}) { - const [vals, parsedZone] = parseHTTPDate(text2); - return parseDataToDateTime(vals, parsedZone, opts, "HTTP", opts); - } - /** - * Create a DateTime from an input string and format string. - * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens). - * @param {string} text - the string to parse - * @param {string} fmt - the format the string is expected to be in (see the link below for the formats) - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale - * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system - * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @return {DateTime} - */ - static fromFormat(text2, fmt, opts = {}) { - if (isUndefined(text2) || isUndefined(fmt)) { - throw new InvalidArgumentError("fromFormat requires an input string and a format"); - } - const { locale: locale2 = null, numberingSystem = null } = opts, localeToUse = Locale.fromOpts({ - locale: locale2, - numberingSystem, - defaultToEN: true - }), [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text2, fmt); - if (invalid) { - return _DateTime.invalid(invalid); - } else { - return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text2, specificOffset); - } - } - /** - * @deprecated use fromFormat instead - */ - static fromString(text2, fmt, opts = {}) { - return _DateTime.fromFormat(text2, fmt, opts); - } - /** - * Create a DateTime from a SQL date, time, or datetime - * Defaults to en-US if no locale has been specified, regardless of the system's locale - * @param {string} text - the string to parse - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale - * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system - * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @example DateTime.fromSQL('2017-05-15') - * @example DateTime.fromSQL('2017-05-15 09:12:34') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true }) - * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' }) - * @example DateTime.fromSQL('09:12:34.342') - * @return {DateTime} - */ - static fromSQL(text2, opts = {}) { - const [vals, parsedZone] = parseSQL(text2); - return parseDataToDateTime(vals, parsedZone, opts, "SQL", text2); - } - /** - * Create an invalid DateTime. - * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent. - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {DateTime} - */ - static invalid(reason, explanation = null) { - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the DateTime is invalid"); - } - const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - if (Settings.throwOnInvalid) { - throw new InvalidDateTimeError(invalid); - } else { - return new _DateTime({ invalid }); - } - } - /** - * Check if an object is an instance of DateTime. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - static isDateTime(o) { - return o && o.isLuxonDateTime || false; - } - /** - * Produce the format string for a set of options - * @param formatOpts - * @param localeOpts - * @returns {string} - */ - static parseFormatForOpts(formatOpts, localeOpts = {}) { - const tokenList = formatOptsToTokens(formatOpts, Locale.fromObject(localeOpts)); - return !tokenList ? null : tokenList.map((t2) => t2 ? t2.val : null).join(""); - } - /** - * Produce the the fully expanded format token for the locale - * Does NOT quote characters, so quoted tokens will not round trip correctly - * @param fmt - * @param localeOpts - * @returns {string} - */ - static expandFormat(fmt, localeOpts = {}) { - const expanded = expandMacroTokens(Formatter.parseFormat(fmt), Locale.fromObject(localeOpts)); - return expanded.map((t2) => t2.val).join(""); - } - static resetCache() { - zoneOffsetTs = void 0; - zoneOffsetGuessCache = {}; - } - // INFO - /** - * Get the value of unit. - * @param {string} unit - a unit such as 'minute' or 'day' - * @example DateTime.local(2017, 7, 4).get('month'); //=> 7 - * @example DateTime.local(2017, 7, 4).get('day'); //=> 4 - * @return {number} - */ - get(unit) { - return this[unit]; - } - /** - * Returns whether the DateTime is valid. Invalid DateTimes occur when: - * * The DateTime was created from invalid calendar information, such as the 13th month or February 30 - * * The DateTime was created by an operation on another invalid date - * @type {boolean} - */ - get isValid() { - return this.invalid === null; - } - /** - * Returns an error code if this DateTime is invalid, or null if the DateTime is valid - * @type {string} - */ - get invalidReason() { - return this.invalid ? this.invalid.reason : null; - } - /** - * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid - * @type {string} - */ - get invalidExplanation() { - return this.invalid ? this.invalid.explanation : null; - } - /** - * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime - * - * @type {string} - */ - get locale() { - return this.isValid ? this.loc.locale : null; - } - /** - * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime - * - * @type {string} - */ - get numberingSystem() { - return this.isValid ? this.loc.numberingSystem : null; - } - /** - * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime - * - * @type {string} - */ - get outputCalendar() { - return this.isValid ? this.loc.outputCalendar : null; - } - /** - * Get the time zone associated with this DateTime. - * @type {Zone} - */ - get zone() { - return this._zone; - } - /** - * Get the name of the time zone. - * @type {string} - */ - get zoneName() { - return this.isValid ? this.zone.name : null; - } - /** - * Get the year - * @example DateTime.local(2017, 5, 25).year //=> 2017 - * @type {number} - */ - get year() { - return this.isValid ? this.c.year : NaN; - } - /** - * Get the quarter - * @example DateTime.local(2017, 5, 25).quarter //=> 2 - * @type {number} - */ - get quarter() { - return this.isValid ? Math.ceil(this.c.month / 3) : NaN; - } - /** - * Get the month (1-12). - * @example DateTime.local(2017, 5, 25).month //=> 5 - * @type {number} - */ - get month() { - return this.isValid ? this.c.month : NaN; - } - /** - * Get the day of the month (1-30ish). - * @example DateTime.local(2017, 5, 25).day //=> 25 - * @type {number} - */ - get day() { - return this.isValid ? this.c.day : NaN; - } - /** - * Get the hour of the day (0-23). - * @example DateTime.local(2017, 5, 25, 9).hour //=> 9 - * @type {number} - */ - get hour() { - return this.isValid ? this.c.hour : NaN; - } - /** - * Get the minute of the hour (0-59). - * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30 - * @type {number} - */ - get minute() { - return this.isValid ? this.c.minute : NaN; - } - /** - * Get the second of the minute (0-59). - * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52 - * @type {number} - */ - get second() { - return this.isValid ? this.c.second : NaN; - } - /** - * Get the millisecond of the second (0-999). - * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654 - * @type {number} - */ - get millisecond() { - return this.isValid ? this.c.millisecond : NaN; - } - /** - * Get the week year - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2014, 12, 31).weekYear //=> 2015 - * @type {number} - */ - get weekYear() { - return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN; - } - /** - * Get the week number of the week year (1-52ish). - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2017, 5, 25).weekNumber //=> 21 - * @type {number} - */ - get weekNumber() { - return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN; - } - /** - * Get the day of the week. - * 1 is Monday and 7 is Sunday - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2014, 11, 31).weekday //=> 4 - * @type {number} - */ - get weekday() { - return this.isValid ? possiblyCachedWeekData(this).weekday : NaN; - } - /** - * Returns true if this date is on a weekend according to the locale, false otherwise - * @returns {boolean} - */ - get isWeekend() { - return this.isValid && this.loc.getWeekendDays().includes(this.weekday); - } - /** - * Get the day of the week according to the locale. - * 1 is the first day of the week and 7 is the last day of the week. - * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1, - * @returns {number} - */ - get localWeekday() { - return this.isValid ? possiblyCachedLocalWeekData(this).weekday : NaN; - } - /** - * Get the week number of the week year according to the locale. Different locales assign week numbers differently, - * because the week can start on different days of the week (see localWeekday) and because a different number of days - * is required for a week to count as the first week of a year. - * @returns {number} - */ - get localWeekNumber() { - return this.isValid ? possiblyCachedLocalWeekData(this).weekNumber : NaN; - } - /** - * Get the week year according to the locale. Different locales assign week numbers (and therefor week years) - * differently, see localWeekNumber. - * @returns {number} - */ - get localWeekYear() { - return this.isValid ? possiblyCachedLocalWeekData(this).weekYear : NaN; - } - /** - * Get the ordinal (meaning the day of the year) - * @example DateTime.local(2017, 5, 25).ordinal //=> 145 - * @type {number|DateTime} - */ - get ordinal() { - return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN; - } - /** - * Get the human readable short month name, such as 'Oct'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).monthShort //=> Oct - * @type {string} - */ - get monthShort() { - return this.isValid ? Info.months("short", { locObj: this.loc })[this.month - 1] : null; - } - /** - * Get the human readable long month name, such as 'October'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).monthLong //=> October - * @type {string} - */ - get monthLong() { - return this.isValid ? Info.months("long", { locObj: this.loc })[this.month - 1] : null; - } - /** - * Get the human readable short weekday, such as 'Mon'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon - * @type {string} - */ - get weekdayShort() { - return this.isValid ? Info.weekdays("short", { locObj: this.loc })[this.weekday - 1] : null; - } - /** - * Get the human readable long weekday, such as 'Monday'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday - * @type {string} - */ - get weekdayLong() { - return this.isValid ? Info.weekdays("long", { locObj: this.loc })[this.weekday - 1] : null; - } - /** - * Get the UTC offset of this DateTime in minutes - * @example DateTime.now().offset //=> -240 - * @example DateTime.utc().offset //=> 0 - * @type {number} - */ - get offset() { - return this.isValid ? +this.o : NaN; - } - /** - * Get the short human name for the zone's current offset, for example "EST" or "EDT". - * Defaults to the system's locale if no locale has been specified - * @type {string} - */ - get offsetNameShort() { - if (this.isValid) { - return this.zone.offsetName(this.ts, { - format: "short", - locale: this.locale - }); - } else { - return null; - } - } - /** - * Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time". - * Defaults to the system's locale if no locale has been specified - * @type {string} - */ - get offsetNameLong() { - if (this.isValid) { - return this.zone.offsetName(this.ts, { - format: "long", - locale: this.locale - }); - } else { - return null; - } - } - /** - * Get whether this zone's offset ever changes, as in a DST. - * @type {boolean} - */ - get isOffsetFixed() { - return this.isValid ? this.zone.isUniversal : null; - } - /** - * Get whether the DateTime is in a DST. - * @type {boolean} - */ - get isInDST() { - if (this.isOffsetFixed) { - return false; - } else { - return this.offset > this.set({ month: 1, day: 1 }).offset || this.offset > this.set({ month: 5 }).offset; - } - } - /** - * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC - * in this DateTime's zone. During DST changes local time can be ambiguous, for example - * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`. - * This method will return both possible DateTimes if this DateTime's local time is ambiguous. - * @returns {DateTime[]} - */ - getPossibleOffsets() { - if (!this.isValid || this.isOffsetFixed) { - return [this]; - } - const dayMs = 864e5; - const minuteMs = 6e4; - const localTS = objToLocalTS(this.c); - const oEarlier = this.zone.offset(localTS - dayMs); - const oLater = this.zone.offset(localTS + dayMs); - const o1 = this.zone.offset(localTS - oEarlier * minuteMs); - const o2 = this.zone.offset(localTS - oLater * minuteMs); - if (o1 === o2) { - return [this]; - } - const ts1 = localTS - o1 * minuteMs; - const ts2 = localTS - o2 * minuteMs; - const c1 = tsToObj(ts1, o1); - const c2 = tsToObj(ts2, o2); - if (c1.hour === c2.hour && c1.minute === c2.minute && c1.second === c2.second && c1.millisecond === c2.millisecond) { - return [clone2(this, { ts: ts1 }), clone2(this, { ts: ts2 })]; - } - return [this]; - } - /** - * Returns true if this DateTime is in a leap year, false otherwise - * @example DateTime.local(2016).isInLeapYear //=> true - * @example DateTime.local(2013).isInLeapYear //=> false - * @type {boolean} - */ - get isInLeapYear() { - return isLeapYear(this.year); - } - /** - * Returns the number of days in this DateTime's month - * @example DateTime.local(2016, 2).daysInMonth //=> 29 - * @example DateTime.local(2016, 3).daysInMonth //=> 31 - * @type {number} - */ - get daysInMonth() { - return daysInMonth(this.year, this.month); - } - /** - * Returns the number of days in this DateTime's year - * @example DateTime.local(2016).daysInYear //=> 366 - * @example DateTime.local(2013).daysInYear //=> 365 - * @type {number} - */ - get daysInYear() { - return this.isValid ? daysInYear(this.year) : NaN; - } - /** - * Returns the number of weeks in this DateTime's year - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2004).weeksInWeekYear //=> 53 - * @example DateTime.local(2013).weeksInWeekYear //=> 52 - * @type {number} - */ - get weeksInWeekYear() { - return this.isValid ? weeksInWeekYear(this.weekYear) : NaN; - } - /** - * Returns the number of weeks in this DateTime's local week year - * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52 - * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53 - * @type {number} - */ - get weeksInLocalWeekYear() { - return this.isValid ? weeksInWeekYear( - this.localWeekYear, - this.loc.getMinDaysInFirstWeek(), - this.loc.getStartOfWeek() - ) : NaN; - } - /** - * Returns the resolved Intl options for this DateTime. - * This is useful in understanding the behavior of formatting methods - * @param {Object} opts - the same options as toLocaleString - * @return {Object} - */ - resolvedLocaleOptions(opts = {}) { - const { locale: locale2, numberingSystem, calendar } = Formatter.create( - this.loc.clone(opts), - opts - ).resolvedOptions(this); - return { locale: locale2, numberingSystem, outputCalendar: calendar }; - } - // TRANSFORM - /** - * "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime. - * - * Equivalent to {@link DateTime#setZone}('utc') - * @param {number} [offset=0] - optionally, an offset from UTC in minutes - * @param {Object} [opts={}] - options to pass to `setZone()` - * @return {DateTime} - */ - toUTC(offset2 = 0, opts = {}) { - return this.setZone(FixedOffsetZone.instance(offset2), opts); - } - /** - * "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime. - * - * Equivalent to `setZone('local')` - * @return {DateTime} - */ - toLocal() { - return this.setZone(Settings.defaultZone); - } - /** - * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime. - * - * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones. - * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class. - * @param {Object} opts - options - * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this. - * @return {DateTime} - */ - setZone(zone, { keepLocalTime = false, keepCalendarTime = false } = {}) { - zone = normalizeZone(zone, Settings.defaultZone); - if (zone.equals(this.zone)) { - return this; - } else if (!zone.isValid) { - return _DateTime.invalid(unsupportedZone(zone)); - } else { - let newTS = this.ts; - if (keepLocalTime || keepCalendarTime) { - const offsetGuess = zone.offset(this.ts); - const asObj = this.toObject(); - [newTS] = objToTS(asObj, offsetGuess, zone); - } - return clone2(this, { ts: newTS, zone }); - } - } - /** - * "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime. - * @param {Object} properties - the properties to set - * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' }) - * @return {DateTime} - */ - reconfigure({ locale: locale2, numberingSystem, outputCalendar } = {}) { - const loc = this.loc.clone({ locale: locale2, numberingSystem, outputCalendar }); - return clone2(this, { loc }); - } - /** - * "Set" the locale. Returns a newly-constructed DateTime. - * Just a convenient alias for reconfigure({ locale }) - * @example DateTime.local(2017, 5, 25).setLocale('en-GB') - * @return {DateTime} - */ - setLocale(locale2) { - return this.reconfigure({ locale: locale2 }); - } - /** - * "Set" the values of specified units. Returns a newly-constructed DateTime. - * You can only set units with this method; for "setting" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}. - * - * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`. - * They cannot be mixed with ISO-week units like `weekday`. - * @param {Object} values - a mapping of units to numbers - * @example dt.set({ year: 2017 }) - * @example dt.set({ hour: 8, minute: 30 }) - * @example dt.set({ weekday: 5 }) - * @example dt.set({ year: 2005, ordinal: 234 }) - * @return {DateTime} - */ - set(values) { - if (!this.isValid) return this; - const normalized = normalizeObject(values, normalizeUnitWithLocalWeeks); - const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, this.loc); - const settingWeekStuff = !isUndefined(normalized.weekYear) || !isUndefined(normalized.weekNumber) || !isUndefined(normalized.weekday), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber; - if ((containsGregor || containsOrdinal) && definiteWeekDef) { - throw new ConflictingSpecificationError( - "Can't mix weekYear/weekNumber units with year/month/day or ordinals" - ); - } - if (containsGregorMD && containsOrdinal) { - throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day"); - } - let mixed; - if (settingWeekStuff) { - mixed = weekToGregorian( - { ...gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), ...normalized }, - minDaysInFirstWeek, - startOfWeek - ); - } else if (!isUndefined(normalized.ordinal)) { - mixed = ordinalToGregorian({ ...gregorianToOrdinal(this.c), ...normalized }); - } else { - mixed = { ...this.toObject(), ...normalized }; - if (isUndefined(normalized.day)) { - mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day); - } - } - const [ts, o] = objToTS(mixed, this.o, this.zone); - return clone2(this, { ts, o }); - } - /** - * Add a period of time to this DateTime and return the resulting DateTime - * - * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between. - * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @example DateTime.now().plus(123) //~> in 123 milliseconds - * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes - * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow - * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday - * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min - * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min - * @return {DateTime} - */ - plus(duration) { - if (!this.isValid) return this; - const dur = Duration.fromDurationLike(duration); - return clone2(this, adjustTime(this, dur)); - } - /** - * Subtract a period of time to this DateTime and return the resulting DateTime - * See {@link DateTime#plus} - * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - @return {DateTime} - */ - minus(duration) { - if (!this.isValid) return this; - const dur = Duration.fromDurationLike(duration).negate(); - return clone2(this, adjustTime(this, dur)); - } - /** - * "Set" this DateTime to the beginning of a unit of time. - * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. - * @param {Object} opts - options - * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week - * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01' - * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01' - * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays - * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00' - * @return {DateTime} - */ - startOf(unit, { useLocaleWeeks = false } = {}) { - if (!this.isValid) return this; - const o = {}, normalizedUnit = Duration.normalizeUnit(unit); - switch (normalizedUnit) { - case "years": - o.month = 1; - // falls through - case "quarters": - case "months": - o.day = 1; - // falls through - case "weeks": - case "days": - o.hour = 0; - // falls through - case "hours": - o.minute = 0; - // falls through - case "minutes": - o.second = 0; - // falls through - case "seconds": - o.millisecond = 0; - break; - case "milliseconds": - break; - } - if (normalizedUnit === "weeks") { - if (useLocaleWeeks) { - const startOfWeek = this.loc.getStartOfWeek(); - const { weekday } = this; - if (weekday < startOfWeek) { - o.weekNumber = this.weekNumber - 1; - } - o.weekday = startOfWeek; - } else { - o.weekday = 1; - } - } - if (normalizedUnit === "quarters") { - const q = Math.ceil(this.month / 3); - o.month = (q - 1) * 3 + 1; - } - return this.set(o); - } - /** - * "Set" this DateTime to the end (meaning the last millisecond) of a unit of time - * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. - * @param {Object} opts - options - * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week - * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays - * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00' - * @return {DateTime} - */ - endOf(unit, opts) { - return this.isValid ? this.plus({ [unit]: 1 }).startOf(unit, opts).minus(1) : this; - } - // OUTPUT - /** - * Returns a string representation of this DateTime formatted according to the specified format string. - * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens). - * Defaults to en-US if no locale has been specified, regardless of the system's locale. - * @param {string} fmt - the format string - * @param {Object} opts - opts to override the configuration options on this DateTime - * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22' - * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22' - * @example DateTime.now().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22' - * @example DateTime.now().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes' - * @return {string} - */ - toFormat(fmt, opts = {}) { - return this.isValid ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID3; - } - /** - * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`. - * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation - * of the DateTime in the assigned locale. - * Defaults to the system's locale if no locale has been specified - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options - * @param {Object} opts - opts to override the configuration options on this DateTime - * @example DateTime.now().toLocaleString(); //=> 4/20/2017 - * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017' - * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017' - * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022' - * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM' - * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM' - * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20' - * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM' - * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32' - * @return {string} - */ - toLocaleString(formatOpts = DATE_SHORT, opts = {}) { - return this.isValid ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this) : INVALID3; - } - /** - * Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output. - * Defaults to the system's locale if no locale has been specified - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts - * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`. - * @example DateTime.now().toLocaleParts(); //=> [ - * //=> { type: 'day', value: '25' }, - * //=> { type: 'literal', value: '/' }, - * //=> { type: 'month', value: '05' }, - * //=> { type: 'literal', value: '/' }, - * //=> { type: 'year', value: '1982' } - * //=> ] - */ - toLocaleParts(opts = {}) { - return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : []; - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime - * @param {Object} opts - options - * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 - * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @param {boolean} [opts.extendedZone=false] - add the time zone format extension - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z' - * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00' - * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335' - * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400' - * @return {string} - */ - toISO({ - format = "extended", - suppressSeconds = false, - suppressMilliseconds = false, - includeOffset = true, - extendedZone = false - } = {}) { - if (!this.isValid) { - return null; - } - const ext = format === "extended"; - let c = toISODate(this, ext); - c += "T"; - c += toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone); - return c; - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime's date component - * @param {Object} opts - options - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25' - * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525' - * @return {string} - */ - toISODate({ format = "extended" } = {}) { - if (!this.isValid) { - return null; - } - return toISODate(this, format === "extended"); - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime's week date - * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2' - * @return {string} - */ - toISOWeekDate() { - return toTechFormat(this, "kkkk-'W'WW-c"); - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime's time component - * @param {Object} opts - options - * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 - * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @param {boolean} [opts.extendedZone=true] - add the time zone format extension - * @param {boolean} [opts.includePrefix=false] - include the `T` prefix - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z' - * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z' - * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z' - * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z' - * @return {string} - */ - toISOTime({ - suppressMilliseconds = false, - suppressSeconds = false, - includeOffset = true, - includePrefix = false, - extendedZone = false, - format = "extended" - } = {}) { - if (!this.isValid) { - return null; - } - let c = includePrefix ? "T" : ""; - return c + toISOTime( - this, - format === "extended", - suppressSeconds, - suppressMilliseconds, - includeOffset, - extendedZone - ); - } - /** - * Returns an RFC 2822-compatible string representation of this DateTime - * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000' - * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400' - * @return {string} - */ - toRFC2822() { - return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false); - } - /** - * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT. - * Specifically, the string conforms to RFC 1123. - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 - * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT' - * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT' - * @return {string} - */ - toHTTP() { - return toTechFormat(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'"); - } - /** - * Returns a string representation of this DateTime appropriate for use in SQL Date - * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13' - * @return {string} - */ - toSQLDate() { - if (!this.isValid) { - return null; - } - return toISODate(this, true); - } - /** - * Returns a string representation of this DateTime appropriate for use in SQL Time - * @param {Object} opts - options - * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00' - * @example DateTime.utc().toSQL() //=> '05:15:16.345' - * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00' - * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345' - * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York' - * @return {string} - */ - toSQLTime({ includeOffset = true, includeZone = false, includeOffsetSpace = true } = {}) { - let fmt = "HH:mm:ss.SSS"; - if (includeZone || includeOffset) { - if (includeOffsetSpace) { - fmt += " "; - } - if (includeZone) { - fmt += "z"; - } else if (includeOffset) { - fmt += "ZZ"; - } - } - return toTechFormat(this, fmt, true); - } - /** - * Returns a string representation of this DateTime appropriate for use in SQL DateTime - * @param {Object} opts - options - * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00' - * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z' - * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00' - * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000' - * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York' - * @return {string} - */ - toSQL(opts = {}) { - if (!this.isValid) { - return null; - } - return `${this.toSQLDate()} ${this.toSQLTime(opts)}`; - } - /** - * Returns a string representation of this DateTime appropriate for debugging - * @return {string} - */ - toString() { - return this.isValid ? this.toISO() : INVALID3; - } - /** - * Returns a string representation of this DateTime appropriate for the REPL. - * @return {string} - */ - [Symbol.for("nodejs.util.inspect.custom")]() { - if (this.isValid) { - return `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`; - } else { - return `DateTime { Invalid, reason: ${this.invalidReason} }`; - } - } - /** - * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis} - * @return {number} - */ - valueOf() { - return this.toMillis(); - } - /** - * Returns the epoch milliseconds of this DateTime. - * @return {number} - */ - toMillis() { - return this.isValid ? this.ts : NaN; - } - /** - * Returns the epoch seconds of this DateTime. - * @return {number} - */ - toSeconds() { - return this.isValid ? this.ts / 1e3 : NaN; - } - /** - * Returns the epoch seconds (as a whole number) of this DateTime. - * @return {number} - */ - toUnixInteger() { - return this.isValid ? Math.floor(this.ts / 1e3) : NaN; - } - /** - * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON. - * @return {string} - */ - toJSON() { - return this.toISO(); - } - /** - * Returns a BSON serializable equivalent to this DateTime. - * @return {Date} - */ - toBSON() { - return this.toJSDate(); - } - /** - * Returns a JavaScript object with this DateTime's year, month, day, and so on. - * @param opts - options for generating the object - * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output - * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 } - * @return {Object} - */ - toObject(opts = {}) { - if (!this.isValid) return {}; - const base = { ...this.c }; - if (opts.includeConfig) { - base.outputCalendar = this.outputCalendar; - base.numberingSystem = this.loc.numberingSystem; - base.locale = this.loc.locale; - } - return base; - } - /** - * Returns a JavaScript Date equivalent to this DateTime. - * @return {Date} - */ - toJSDate() { - return new Date(this.isValid ? this.ts : NaN); - } - // COMPARE - /** - * Return the difference between two DateTimes as a Duration. - * @param {DateTime} otherDateTime - the DateTime to compare this one to - * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration. - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @example - * var i1 = DateTime.fromISO('1982-05-25T09:45'), - * i2 = DateTime.fromISO('1983-10-14T10:30'); - * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 } - * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 } - * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 } - * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 } - * @return {Duration} - */ - diff(otherDateTime, unit = "milliseconds", opts = {}) { - if (!this.isValid || !otherDateTime.isValid) { - return Duration.invalid("created by diffing an invalid DateTime"); - } - const durOpts = { locale: this.locale, numberingSystem: this.numberingSystem, ...opts }; - const units = maybeArray(unit).map(Duration.normalizeUnit), otherIsLater = otherDateTime.valueOf() > this.valueOf(), earlier = otherIsLater ? this : otherDateTime, later = otherIsLater ? otherDateTime : this, diffed = diff_default(earlier, later, units, durOpts); - return otherIsLater ? diffed.negate() : diffed; - } - /** - * Return the difference between this DateTime and right now. - * See {@link DateTime#diff} - * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - diffNow(unit = "milliseconds", opts = {}) { - return this.diff(_DateTime.now(), unit, opts); - } - /** - * Return an Interval spanning between this DateTime and another DateTime - * @param {DateTime} otherDateTime - the other end point of the Interval - * @return {Interval} - */ - until(otherDateTime) { - return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this; - } - /** - * Return whether this DateTime is in the same unit of time as another DateTime. - * Higher-order units must also be identical for this function to return `true`. - * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed. - * @param {DateTime} otherDateTime - the other DateTime - * @param {string} unit - the unit of time to check sameness on - * @param {Object} opts - options - * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used - * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day - * @return {boolean} - */ - hasSame(otherDateTime, unit, opts) { - if (!this.isValid) return false; - const inputMs = otherDateTime.valueOf(); - const adjustedToZone = this.setZone(otherDateTime.zone, { keepLocalTime: true }); - return adjustedToZone.startOf(unit, opts) <= inputMs && inputMs <= adjustedToZone.endOf(unit, opts); - } - /** - * Equality check - * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid. - * To compare just the millisecond values, use `+dt1 === +dt2`. - * @param {DateTime} other - the other DateTime - * @return {boolean} - */ - equals(other) { - return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc); - } - /** - * Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your - * platform supports Intl.RelativeTimeFormat. Rounds down by default. - * @param {Object} options - options that affect the output - * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now. - * @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow" - * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds" - * @param {boolean} [options.round=true] - whether to round the numbers in the output. - * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding. - * @param {string} options.locale - override the locale of this DateTime - * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this - * @example DateTime.now().plus({ days: 1 }).toRelative() //=> "in 1 day" - * @example DateTime.now().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día" - * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures" - * @example DateTime.now().minus({ days: 2 }).toRelative() //=> "2 days ago" - * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago" - * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago" - */ - toRelative(options = {}) { - if (!this.isValid) return null; - const base = options.base || _DateTime.fromObject({}, { zone: this.zone }), padding = options.padding ? this < base ? -options.padding : options.padding : 0; - let units = ["years", "months", "days", "hours", "minutes", "seconds"]; - let unit = options.unit; - if (Array.isArray(options.unit)) { - units = options.unit; - unit = void 0; - } - return diffRelative(base, this.plus(padding), { - ...options, - numeric: "always", - units, - unit - }); - } - /** - * Returns a string representation of this date relative to today, such as "yesterday" or "next month". - * Only internationalizes on platforms that supports Intl.RelativeTimeFormat. - * @param {Object} options - options that affect the output - * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now. - * @param {string} options.locale - override the locale of this DateTime - * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days" - * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this - * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow" - * @example DateTime.now().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana" - * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain" - * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago" - */ - toRelativeCalendar(options = {}) { - if (!this.isValid) return null; - return diffRelative(options.base || _DateTime.fromObject({}, { zone: this.zone }), this, { - ...options, - numeric: "auto", - units: ["years", "months", "days"], - calendary: true - }); - } - /** - * Return the min of several date times - * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum - * @return {DateTime} the min DateTime, or undefined if called with no argument - */ - static min(...dateTimes) { - if (!dateTimes.every(_DateTime.isDateTime)) { - throw new InvalidArgumentError("min requires all arguments be DateTimes"); - } - return bestBy(dateTimes, (i) => i.valueOf(), Math.min); - } - /** - * Return the max of several date times - * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum - * @return {DateTime} the max DateTime, or undefined if called with no argument - */ - static max(...dateTimes) { - if (!dateTimes.every(_DateTime.isDateTime)) { - throw new InvalidArgumentError("max requires all arguments be DateTimes"); - } - return bestBy(dateTimes, (i) => i.valueOf(), Math.max); - } - // MISC - /** - * Explain how a string would be parsed by fromFormat() - * @param {string} text - the string to parse - * @param {string} fmt - the format the string is expected to be in (see description) - * @param {Object} options - options taken by fromFormat() - * @return {Object} - */ - static fromFormatExplain(text2, fmt, options = {}) { - const { locale: locale2 = null, numberingSystem = null } = options, localeToUse = Locale.fromOpts({ - locale: locale2, - numberingSystem, - defaultToEN: true - }); - return explainFromTokens(localeToUse, text2, fmt); - } - /** - * @deprecated use fromFormatExplain instead - */ - static fromStringExplain(text2, fmt, options = {}) { - return _DateTime.fromFormatExplain(text2, fmt, options); - } - /** - * Build a parser for `fmt` using the given locale. This parser can be passed - * to {@link DateTime.fromFormatParser} to a parse a date in this format. This - * can be used to optimize cases where many dates need to be parsed in a - * specific format. - * - * @param {String} fmt - the format the string is expected to be in (see - * description) - * @param {Object} options - options used to set locale and numberingSystem - * for parser - * @returns {TokenParser} - opaque object to be used - */ - static buildFormatParser(fmt, options = {}) { - const { locale: locale2 = null, numberingSystem = null } = options, localeToUse = Locale.fromOpts({ - locale: locale2, - numberingSystem, - defaultToEN: true - }); - return new TokenParser(localeToUse, fmt); - } - /** - * Create a DateTime from an input string and format parser. - * - * The format parser must have been created with the same locale as this call. - * - * @param {String} text - the string to parse - * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser} - * @param {Object} opts - options taken by fromFormat() - * @returns {DateTime} - */ - static fromFormatParser(text2, formatParser, opts = {}) { - if (isUndefined(text2) || isUndefined(formatParser)) { - throw new InvalidArgumentError( - "fromFormatParser requires an input string and a format parser" - ); - } - const { locale: locale2 = null, numberingSystem = null } = opts, localeToUse = Locale.fromOpts({ - locale: locale2, - numberingSystem, - defaultToEN: true - }); - if (!localeToUse.equals(formatParser.locale)) { - throw new InvalidArgumentError( - `fromFormatParser called with a locale of ${localeToUse}, but the format parser was created for ${formatParser.locale}` - ); - } - const { result, zone, specificOffset, invalidReason } = formatParser.explainFromTokens(text2); - if (invalidReason) { - return _DateTime.invalid(invalidReason); - } else { - return parseDataToDateTime( - result, - zone, - opts, - `format ${formatParser.format}`, - text2, - specificOffset - ); - } - } - // FORMAT PRESETS - /** - * {@link DateTime#toLocaleString} format like 10/14/1983 - * @type {Object} - */ - static get DATE_SHORT() { - return DATE_SHORT; - } - /** - * {@link DateTime#toLocaleString} format like 'Oct 14, 1983' - * @type {Object} - */ - static get DATE_MED() { - return DATE_MED; - } - /** - * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983' - * @type {Object} - */ - static get DATE_MED_WITH_WEEKDAY() { - return DATE_MED_WITH_WEEKDAY; - } - /** - * {@link DateTime#toLocaleString} format like 'October 14, 1983' - * @type {Object} - */ - static get DATE_FULL() { - return DATE_FULL; - } - /** - * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983' - * @type {Object} - */ - static get DATE_HUGE() { - return DATE_HUGE; - } - /** - * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - static get TIME_SIMPLE() { - return TIME_SIMPLE; - } - /** - * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - static get TIME_WITH_SECONDS() { - return TIME_WITH_SECONDS; - } - /** - * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - static get TIME_WITH_SHORT_OFFSET() { - return TIME_WITH_SHORT_OFFSET; - } - /** - * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - static get TIME_WITH_LONG_OFFSET() { - return TIME_WITH_LONG_OFFSET; - } - /** - * {@link DateTime#toLocaleString} format like '09:30', always 24-hour. - * @type {Object} - */ - static get TIME_24_SIMPLE() { - return TIME_24_SIMPLE; - } - /** - * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour. - * @type {Object} - */ - static get TIME_24_WITH_SECONDS() { - return TIME_24_WITH_SECONDS; - } - /** - * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour. - * @type {Object} - */ - static get TIME_24_WITH_SHORT_OFFSET() { - return TIME_24_WITH_SHORT_OFFSET; - } - /** - * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour. - * @type {Object} - */ - static get TIME_24_WITH_LONG_OFFSET() { - return TIME_24_WITH_LONG_OFFSET; - } - /** - * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_SHORT() { - return DATETIME_SHORT; - } - /** - * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_SHORT_WITH_SECONDS() { - return DATETIME_SHORT_WITH_SECONDS; - } - /** - * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_MED() { - return DATETIME_MED; - } - /** - * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_MED_WITH_SECONDS() { - return DATETIME_MED_WITH_SECONDS; - } - /** - * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_MED_WITH_WEEKDAY() { - return DATETIME_MED_WITH_WEEKDAY; - } - /** - * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_FULL() { - return DATETIME_FULL; - } - /** - * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_FULL_WITH_SECONDS() { - return DATETIME_FULL_WITH_SECONDS; - } - /** - * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_HUGE() { - return DATETIME_HUGE; - } - /** - * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_HUGE_WITH_SECONDS() { - return DATETIME_HUGE_WITH_SECONDS; - } -}; -function friendlyDateTime(dateTimeish) { - if (DateTime.isDateTime(dateTimeish)) { - return dateTimeish; - } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) { - return DateTime.fromJSDate(dateTimeish); - } else if (dateTimeish && typeof dateTimeish === "object") { - return DateTime.fromObject(dateTimeish); - } else { - throw new InvalidArgumentError( - `Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}` - ); - } -} - -// src/lib/counters.ts -var counters = derived2(dates, ($dates, set2) => { - set2($dates.map(({ start, title }, id) => count(id, start, title))); - function count(id, start, title) { - const { years, months: months2, weeks, days, interval } = elapse(start); - return { - id, - title, - start, - quote: quotes.random(id), - years, - months: months2, - days, - weeks, - full: { - months: Math.trunc(interval.length("months")), - weeks: Math.trunc(interval.length("weeks")), - days: Math.trunc(interval.length("days")), - hours: Math.trunc(interval.length("hours")) - } - }; - } -}, []); -function elapse(start) { - const TO = DateTime.now(); - const FROM = DateTime.fromISO(start); - const DIFF = TO.diff( - FROM, - ["years", "months", "weeks", "days", "milliseconds"], - { conversionAccuracy: "longterm" } - ).toObject(); - return { - years: DIFF.years || 0, - months: DIFF.months || 0, - days: DIFF.days || 0, - weeks: DIFF.weeks || 0, - interval: Interval.fromDateTimes(FROM, TO) - }; -} - -// src/App.svelte -var root_3 = template(`
    `); -var root_6 = template(`

    `); -var root_2 = template(`
    `, 1); -function App($$anchor, $$props) { - push($$props, true); - const $$stores = setup_stores(); - const $counters = () => store_get(counters, "$counters", $$stores); - const $time = () => store_get(time, "$time", $$stores); - "use strict"; - let active = state(void 0); - function intersection(section) { - const observer = new IntersectionObserver(observe, { threshold: 1 }); - observer.observe(section); - function observe(entries) { - const intersecting = entries.find((e) => e.isIntersecting); - set(active, proxy(intersecting?.target.id)); - } - } - var fragment = comment(); - head(($$anchor2) => { - template_effect(() => $document.title = $$props.name); - }); - var node = first_child(fragment); - await_block(node, () => Promise.all([images.load(), quotes.load()]), null, ($$anchor2) => { - var fragment_1 = root_2(); - var main = first_child(fragment_1); - var node_1 = child(main); - each(node_1, 1, $counters, index, ($$anchor3, counter, id) => { - var section_1 = root_3(); - template_effect(() => set_attribute(section_1, "id", String(id))); - var header = child(section_1); - var node_2 = child(header); - DateForm(node_2, { - id, - get counter() { - return get(counter); - } - }); - reset(header); - var node_3 = sibling(header, 2); - Counter(node_3, { - get counter() { - return get(counter); - } - }); - var node_4 = sibling(node_3, 2); - key_block(node_4, () => get(counter).quote, ($$anchor4) => { - Quote($$anchor4, { - get quote() { - return get(counter).quote; - } - }); - }); - reset(section_1); - action(section_1, ($$node) => intersection($$node)); - append($$anchor3, section_1); - }); - var section_2 = sibling(node_1, 2); - var node_5 = child(section_2); - DateForm(node_5, {}); - reset(section_2); - reset(main); - var footer = sibling(main, 2); - var node_6 = child(footer); - if_block( - node_6, - () => get(active), - ($$anchor3) => { - Control($$anchor3, { - get active() { - return get(active); - } - }); - }, - ($$anchor3) => { - var h2 = root_6(); - var text2 = child(h2, true); - reset(h2); - template_effect(() => set_text(text2, $time())); - append($$anchor3, h2); - } - ); - reset(footer); - template_effect(() => toggle_class(footer, "active", get(active))); - append($$anchor2, fragment_1); - }); - append($$anchor, fragment); - pop(); -} - -// src/app.ts -var app_default = mount(App, { - target: document.body, - props: { name } -}); -export { - app_default as default -}; + `,document.documentElement.title=l}function s(a=1,l={width:window.innerWidth,height:window.innerHeight}){let u=Array.from({length:a},()=>Math.floor(Math.random()*24644));return r().reduce((d,[m,p,h],g)=>{if(u.includes(g)){let x={width:l.height*(p/10),height:l.height},v={width:l.width,height:l.height},$=`?w=${c(f(x,v).width)}`;d.push({id:g,src:`https://images.unsplash.com/photo-${m}${$}`,alt:`Image by ${h} from Unsplash`,...f(x,v)})}return d},[]);function c(d){return d*devicePixelRatio}function f(d,m){let p=Math.min(m.width/d.width,m.height,d.height);return{width:Math.round(d.width*p),height:Math.round(d.height*p)}}}return{subscribe:t,set:e,update:n,load:o,prepare:s,back:i}}var tc=ee('

    '),rc=ee('
    ');function ro(t,e){xe(e,!0);let r=Yr(),n=()=>vr($a,"$date",r),o=se(e,"id",3,0);function i(p){if(p.preventDefault(),e.counter)return;let h=new FormData(p.target),g=Object.fromEntries(h);ct.add(g)}function s(p){if(!e.counter)return;let{id:h,name:g,value:x}=p.currentTarget,v={[g]:x};ct.change(Number(h),v)}var a=rc(),l=U(a),u=U(l),c=U(u);Yn(c),z(()=>W(c,"id",String(o()))),c.__input=s,N(u);var f=oe(u,2),d=U(f);Yn(d),z(()=>W(d,"id",String(o()))),z(()=>W(d,"placeholder",ki("Counter name","\u0418\u043C\u044F \u0441\u0447\u0451\u0442\u0447\u0438\u043A\u0430"))),d.__change=s,N(f);var m=oe(f,2);he(m,()=>!e.counter,p=>{var h=tc(),g=U(h),x=U(g),v=U(x,!0);z(()=>lt(v,ki("Add counter","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u0447\u0451\u0442\u0447\u0438\u043A"))),N(x),N(g),N(h),Q(p,h)}),N(l),N(a),z(()=>{W(c,"max",n()),Jn(c,e.counter?.start||n()),yt(c,"clear",e.counter),Jn(d,e.counter?.title||""),yt(d,"clear",e.counter)}),ni("submit",a,i),Q(t,a),we()}$t(["input","change"]);var nc=ii('');function Gr(t,e){"use strict";let r=se(e,"id",3,""),n=se(e,"name",3,"Close"),o=se(e,"size",3,"16px"),i=se(e,"color",3,"currentColor"),s=se(e,"rotate",3,0),a=se(e,"spin",3,!1),l=se(e,"style",3,""),u=se(e,"bordered",3,!1);var c=nc(),f=U(c);N(c),z(()=>{W(c,"id",r()),W(c,"width",o()),W(c,"height",o()),W(c,"fill",i()),W(c,"style",`transform: rotate(${s()??""}deg); --icon-size: ${o()??""}; ${l()??""}`),yt(c,"spin",a()),yt(c,"bordered",u()),W(f,"href",`./assets/sprite.svg#${n()??""}`)}),Q(t,c)}function oc(t){let{id:e}=t.target;ct.quote(Number(e))}function ic(t){let{id:e}=t.target;ct.del(Number(e))}var sc=ee(' ',1);function $i(t,e){xe(e,!0);var r=sc(),n=$e(r);n.__click=function(...u){to.back?.apply(this,u)};var o=U(n);Gr(o,{name:"Images"}),N(n);var i=oe(n,2);i.__click=[ic];var s=U(i);Gr(s,{name:"Delete"}),N(i);var a=oe(i,2);a.__click=[oc];var l=U(a);Gr(l,{name:"Quote"}),N(a),z(()=>{W(i,"id",e.active),W(a,"id",e.active)}),Q(t,r),we()}$t(["click"]);var ac=ee('');function Ii(t,e){xe(e,!0);let r=se(e,"id",3,""),n=se(e,"type",15);function o(a){let{id:l}=a.currentTarget;n(l)}var i=ac();i.__click=o;var s=U(i);yi(s,()=>e.children??R),N(i),z(()=>W(i,"id",r())),Q(t,i),we()}$t(["click"]);var lc=ee('
  • ');function ft(t,e){xe(e,!0);let r=se(e,"id",3,""),n=se(e,"type",15);var o=lc();z(()=>W(o,"id",ka(e.name,e.value)));var i=U(o);Ii(i,{get id(){return r()},get type(){return n()},set type(s){n(s)},children:(s,a)=>{Oo();var l=si();z(()=>lt(l,e.value)),Q(s,l)},$$slots:{default:!0}}),N(o),Q(t,o),we()}var uc=ee(" ",1),cc=ee('
    ');function Di(t,e){xe(e,!0);let r=Qr("");var n=cc(),o=U(n);he(o,()=>k(r)==="months",i=>{ft(i,{name:"months",get value(){return e.counter.full.months},get type(){return k(r)},set type(s){C(r,K(s))}})},i=>{var s=vt(),a=$e(s);he(a,()=>k(r)==="weeks",l=>{ft(l,{name:"weeks",get value(){return e.counter.full.weeks},get type(){return k(r)},set type(u){C(r,K(u))}})},l=>{var u=vt(),c=$e(u);he(c,()=>k(r)==="days",f=>{ft(f,{name:"days",get value(){return e.counter.full.days},get type(){return k(r)},set type(d){C(r,K(d))}})},f=>{var d=vt(),m=$e(d);he(m,()=>k(r)==="hours",p=>{ft(p,{name:"hours",get value(){return e.counter.full.hours},get type(){return k(r)},set type(h){C(r,K(h))}})},p=>{var h=uc(),g=$e(h);he(g,()=>e.counter.years,b=>{ft(b,{name:"years",id:"hours",get value(){return e.counter.years},get type(){return k(r)},set type(S){C(r,K(S))}})});var x=oe(g,2);he(x,()=>e.counter.months,b=>{ft(b,{name:"months",id:"months",get value(){return e.counter.months},get type(){return k(r)},set type(S){C(r,K(S))}})});var v=oe(x,2);he(v,()=>e.counter.weeks,b=>{ft(b,{name:"weeks",id:"weeks",get value(){return e.counter.weeks},get type(){return k(r)},set type(S){C(r,K(S))}})});var $=oe(v,2);he($,()=>e.counter.days,b=>{ft(b,{name:"days",id:"days",get value(){return e.counter.days},get type(){return k(r)},set type(S){C(r,K(S))}})}),Q(p,h)},!0),Q(f,d)},!0),Q(l,u)},!0),Q(i,s)}),N(n),Q(t,n),we()}var fc=t=>t;function Da(t,{delay:e=0,duration:r=400,easing:n=fc}={}){let o=+getComputedStyle(t).opacity;return{delay:e,duration:r,easing:n,css:i=>`opacity: ${i*o}`}}var dc=ee('

    ');function Oi(t,e){"use strict";var r=vt(),n=$e(r);he(n,()=>e.quote,o=>{var i=dc();let s=Ft(()=>{let[f,d]=e.quote;return{text:f,author:d}});var a=U(i),l=U(a,!0);N(a);var u=oe(a,2),c=U(u);N(u),N(i),z(()=>{lt(l,k(s).text),lt(c,`~ ${k(s).author??""}`)}),bi(1,i,()=>Da),Q(o,i)}),Q(t,r)}var gt=class extends Error{},no=class extends gt{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},oo=class extends gt{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},io=class extends gt{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},et=class extends gt{},wr=class extends gt{constructor(e){super(`Invalid unit ${e}`)}},J=class extends gt{},tt=class extends gt{constructor(){super("Zone is an abstract class")}};var _="numeric",rt="short",Ue="long",Ot={year:_,month:_,day:_},Xr={year:_,month:rt,day:_},Ni={year:_,month:rt,day:_,weekday:rt},Kr={year:_,month:Ue,day:_},en={year:_,month:Ue,day:_,weekday:Ue},tn={hour:_,minute:_},rn={hour:_,minute:_,second:_},nn={hour:_,minute:_,second:_,timeZoneName:rt},on={hour:_,minute:_,second:_,timeZoneName:Ue},sn={hour:_,minute:_,hourCycle:"h23"},an={hour:_,minute:_,second:_,hourCycle:"h23"},ln={hour:_,minute:_,second:_,hourCycle:"h23",timeZoneName:rt},un={hour:_,minute:_,second:_,hourCycle:"h23",timeZoneName:Ue},cn={year:_,month:_,day:_,hour:_,minute:_},fn={year:_,month:_,day:_,hour:_,minute:_,second:_},dn={year:_,month:rt,day:_,hour:_,minute:_},mn={year:_,month:rt,day:_,hour:_,minute:_,second:_},Ui={year:_,month:rt,day:_,weekday:rt,hour:_,minute:_},pn={year:_,month:Ue,day:_,hour:_,minute:_,timeZoneName:rt},hn={year:_,month:Ue,day:_,hour:_,minute:_,second:_,timeZoneName:rt},_n={year:_,month:Ue,day:_,weekday:Ue,hour:_,minute:_,timeZoneName:Ue},vn={year:_,month:Ue,day:_,weekday:Ue,hour:_,minute:_,second:_,timeZoneName:Ue};var Se=class{get type(){throw new tt}get name(){throw new tt}get ianaName(){return this.name}get isUniversal(){throw new tt}offsetName(e,r){throw new tt}formatOffset(e,r){throw new tt}offset(e){throw new tt}equals(e){throw new tt}get isValid(){throw new tt}};var Li=null,Nt=class t extends Se{static get instance(){return Li===null&&(Li=new t),Li}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:r,locale:n}){return ao(e,r,n)}formatOffset(e,r){return Ut(this.offset(e),r)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}};var uo={};function mc(t){return uo[t]||(uo[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),uo[t]}var pc={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function hc(t,e){let r=t.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,o,i,s,a,l,u,c]=n;return[s,o,i,a,l,u,c]}function _c(t,e){let r=t.formatToParts(e),n=[];for(let o=0;o=0?p:1e3+p,(d-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}};var Oa={};function vc(t,e={}){let r=JSON.stringify([t,e]),n=Oa[r];return n||(n=new Intl.ListFormat(t,e),Oa[r]=n),n}var Mi={};function Ci(t,e={}){let r=JSON.stringify([t,e]),n=Mi[r];return n||(n=new Intl.DateTimeFormat(t,e),Mi[r]=n),n}var Ai={};function yc(t,e={}){let r=JSON.stringify([t,e]),n=Ai[r];return n||(n=new Intl.NumberFormat(t,e),Ai[r]=n),n}var Qi={};function gc(t,e={}){let{base:r,...n}=e,o=JSON.stringify([t,n]),i=Qi[o];return i||(i=new Intl.RelativeTimeFormat(t,e),Qi[o]=i),i}var yn=null;function xc(){return yn||(yn=new Intl.DateTimeFormat().resolvedOptions().locale,yn)}var Na={};function wc(t){let e=Na[t];if(!e){let r=new Intl.Locale(t);e="getWeekInfo"in r?r.getWeekInfo():r.weekInfo,Na[t]=e}return e}function bc(t){let e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));let r=t.indexOf("-u-");if(r===-1)return[t];{let n,o;try{n=Ci(t).resolvedOptions(),o=t}catch{let l=t.substring(0,r);n=Ci(l).resolvedOptions(),o=l}let{numberingSystem:i,calendar:s}=n;return[o,i,s]}}function Ec(t,e,r){return(r||e)&&(t.includes("-u-")||(t+="-u"),r&&(t+=`-ca-${r}`),e&&(t+=`-nu-${e}`)),t}function Tc(t){let e=[];for(let r=1;r<=12;r++){let n=D.utc(2009,r,1);e.push(t(n))}return e}function Sc(t){let e=[];for(let r=1;r<=7;r++){let n=D.utc(2016,11,13+r);e.push(t(n))}return e}function co(t,e,r,n){let o=t.listingMode();return o==="error"?null:o==="en"?r(e):n(e)}function Fc(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}var Bi=class{constructor(e,r,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:o,floor:i,...s}=n;if(!r||Object.keys(s).length>0){let a={useGrouping:!1,...n};n.padTo>0&&(a.minimumIntegerDigits=n.padTo),this.inf=yc(e,a)}}format(e){if(this.inf){let r=this.floor?Math.floor(e):e;return this.inf.format(r)}else{let r=this.floor?Math.floor(e):Er(e,3);return Z(r,this.padTo)}}},Ri=class{constructor(e,r,n){this.opts=n,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let s=-1*(e.offset/60),a=s>=0?`Etc/GMT+${s}`:`Etc/GMT${s}`;e.offset!==0&&_e.create(a).valid?(o=a,this.dt=e):(o="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,o=e.zone.name):(o="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=Ci(r,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(r=>{if(r.type==="timeZoneName"){let n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...r,value:n}}else return r}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},Vi=class{constructor(e,r,n){this.opts={style:"long",...n},!r&&fo()&&(this.rtf=gc(e,n))}format(e,r){return this.rtf?this.rtf.format(e,r):Ua(r,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,r){return this.rtf?this.rtf.formatToParts(e,r):[]}},kc={firstDay:1,minimalDays:4,weekend:[6,7]},M=class t{static fromOpts(e){return t.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,r,n,o,i=!1){let s=e||L.defaultLocale,a=s||(i?"en-US":xc()),l=r||L.defaultNumberingSystem,u=n||L.defaultOutputCalendar,c=gn(o)||L.defaultWeekSettings;return new t(a,l,u,c,s)}static resetCache(){yn=null,Mi={},Ai={},Qi={}}static fromObject({locale:e,numberingSystem:r,outputCalendar:n,weekSettings:o}={}){return t.create(e,r,n,o)}constructor(e,r,n,o,i){let[s,a,l]=bc(e);this.locale=s,this.numberingSystem=r||a||null,this.outputCalendar=n||l||null,this.weekSettings=o,this.intl=Ec(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Fc(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&r?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,gn(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,r=!1){return co(this,e,Wi,()=>{let n=r?{month:e,day:"numeric"}:{month:e},o=r?"format":"standalone";return this.monthsCache[o][e]||(this.monthsCache[o][e]=Tc(i=>this.extract(i,n,"month"))),this.monthsCache[o][e]})}weekdays(e,r=!1){return co(this,e,Hi,()=>{let n=r?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},o=r?"format":"standalone";return this.weekdaysCache[o][e]||(this.weekdaysCache[o][e]=Sc(i=>this.extract(i,n,"weekday"))),this.weekdaysCache[o][e]})}meridiems(){return co(this,void 0,()=>zi,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[D.utc(2016,11,13,9),D.utc(2016,11,13,19)].map(r=>this.extract(r,e,"dayperiod"))}return this.meridiemCache})}eras(e){return co(this,e,Zi,()=>{let r={era:e};return this.eraCache[e]||(this.eraCache[e]=[D.utc(-40,1,1),D.utc(2017,1,1)].map(n=>this.extract(n,r,"era"))),this.eraCache[e]})}extract(e,r,n){let o=this.dtFormatter(e,r),i=o.formatToParts(),s=i.find(a=>a.type.toLowerCase()===n);return s?s.value:null}numberFormatter(e={}){return new Bi(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,r={}){return new Ri(e,this.intl,r)}relFormatter(e={}){return new Vi(this.intl,this.isEnglish(),e)}listFormatter(e={}){return vc(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:mo()?wc(this.locale):kc}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}};var Pi=null,ae=class t extends Se{static get utcInstance(){return Pi===null&&(Pi=new t(0)),Pi}static instance(e){return e===0?t.utcInstance:new t(e)}static parseSpecifier(e){if(e){let r=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new t(er(r[1],r[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Ut(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Ut(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,r){return Ut(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}};var Tr=class extends Se{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function nt(t,e){let r;if(E(t)||t===null)return e;if(t instanceof Se)return t;if(La(t)){let n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?Nt.instance:n==="utc"||n==="gmt"?ae.utcInstance:ae.parseSpecifier(n)||_e.create(t)}else return ot(t)?ae.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new Tr(t)}var Yi={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},Ma={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},$c=Yi.hanidec.replace(/[\[|\]]/g,"").split("");function Ca(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let r=0;r=i&&n<=s&&(e+=n-i)}}return parseInt(e,10)}else return e}var Sr={};function Aa(){Sr={}}function He({numberingSystem:t},e=""){let r=t||"latn";return Sr[r]||(Sr[r]={}),Sr[r][e]||(Sr[r][e]=new RegExp(`${Yi[r]}${e}`)),Sr[r][e]}var Qa=()=>Date.now(),Ba="system",Ra=null,Va=null,Wa=null,Ha=60,za,Za=null,L=class{static get now(){return Qa}static set now(e){Qa=e}static set defaultZone(e){Ba=e}static get defaultZone(){return nt(Ba,Nt.instance)}static get defaultLocale(){return Ra}static set defaultLocale(e){Ra=e}static get defaultNumberingSystem(){return Va}static set defaultNumberingSystem(e){Va=e}static get defaultOutputCalendar(){return Wa}static set defaultOutputCalendar(e){Wa=e}static get defaultWeekSettings(){return Za}static set defaultWeekSettings(e){Za=gn(e)}static get twoDigitCutoffYear(){return Ha}static set twoDigitCutoffYear(e){Ha=e%100}static get throwOnInvalid(){return za}static set throwOnInvalid(e){za=e}static resetCaches(){M.resetCache(),_e.resetCache(),D.resetCache(),Aa()}};var le=class{constructor(e,r){this.reason=e,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}};var qa=[0,31,59,90,120,151,181,212,243,273,304,334],Pa=[0,31,60,91,121,152,182,213,244,274,305,335];function ze(t,e){return new le("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function po(t,e,r){let n=new Date(Date.UTC(t,e-1,r));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);let o=n.getUTCDay();return o===0?7:o}function Ya(t,e,r){return r+(rr(t)?Pa:qa)[e-1]}function Ja(t,e){let r=rr(t)?Pa:qa,n=r.findIndex(i=>itr(n,e,r)?(u=n+1,l=1):u=n,{weekYear:u,weekNumber:l,weekday:a,...bn(t)}}function Ji(t,e=4,r=1){let{weekYear:n,weekNumber:o,weekday:i}=t,s=ho(po(n,1,e),r),a=Lt(n),l=o*7+i-s-7+e,u;l<1?(u=n-1,l+=Lt(u)):l>a?(u=n+1,l-=Lt(n)):u=n;let{month:c,day:f}=Ja(u,l);return{year:u,month:c,day:f,...bn(t)}}function _o(t){let{year:e,month:r,day:n}=t,o=Ya(e,r,n);return{year:e,ordinal:o,...bn(t)}}function ji(t){let{year:e,ordinal:r}=t,{month:n,day:o}=Ja(e,r);return{year:e,month:n,day:o,...bn(t)}}function Gi(t,e){if(!E(t.localWeekday)||!E(t.localWeekNumber)||!E(t.localWeekYear)){if(!E(t.weekday)||!E(t.weekNumber)||!E(t.weekYear))throw new et("Cannot mix locale-based week fields with ISO-based week fields");return E(t.localWeekday)||(t.weekday=t.localWeekday),E(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),E(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function ja(t,e=4,r=1){let n=wn(t.weekYear),o=Le(t.weekNumber,1,tr(t.weekYear,e,r)),i=Le(t.weekday,1,7);return n?o?i?!1:ze("weekday",t.weekday):ze("week",t.weekNumber):ze("weekYear",t.weekYear)}function Ga(t){let e=wn(t.year),r=Le(t.ordinal,1,Lt(t.year));return e?r?!1:ze("ordinal",t.ordinal):ze("year",t.year)}function Xi(t){let e=wn(t.year),r=Le(t.month,1,12),n=Le(t.day,1,Fr(t.year,t.month));return e?r?n?!1:ze("day",t.day):ze("month",t.month):ze("year",t.year)}function Ki(t){let{hour:e,minute:r,second:n,millisecond:o}=t,i=Le(e,0,23)||e===24&&r===0&&n===0&&o===0,s=Le(r,0,59),a=Le(n,0,59),l=Le(o,0,999);return i?s?a?l?!1:ze("millisecond",o):ze("second",n):ze("minute",r):ze("hour",e)}function E(t){return typeof t>"u"}function ot(t){return typeof t=="number"}function wn(t){return typeof t=="number"&&t%1===0}function La(t){return typeof t=="string"}function Ka(t){return Object.prototype.toString.call(t)==="[object Date]"}function fo(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function mo(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function el(t){return Array.isArray(t)?t:[t]}function es(t,e,r){if(t.length!==0)return t.reduce((n,o)=>{let i=[e(o),o];return n&&r(n[0],i[0])===n[0]?n:i},null)[1]}function tl(t,e){return e.reduce((r,n)=>(r[n]=t[n],r),{})}function Mt(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function gn(t){if(t==null)return null;if(typeof t!="object")throw new J("Week settings must be an object");if(!Le(t.firstDay,1,7)||!Le(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!Le(e,1,7)))throw new J("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Le(t,e,r){return wn(t)&&t>=e&&t<=r}function Ic(t,e){return t-e*Math.floor(t/e)}function Z(t,e=2){let r=t<0,n;return r?n="-"+(""+-t).padStart(e,"0"):n=(""+t).padStart(e,"0"),n}function xt(t){if(!(E(t)||t===null||t===""))return parseInt(t,10)}function Ct(t){if(!(E(t)||t===null||t===""))return parseFloat(t)}function En(t){if(!(E(t)||t===null||t==="")){let e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function Er(t,e,r=!1){let n=10**e;return(r?Math.trunc:Math.round)(t*n)/n}function rr(t){return t%4===0&&(t%100!==0||t%400===0)}function Lt(t){return rr(t)?366:365}function Fr(t,e){let r=Ic(e-1,12)+1,n=t+(e-r)/12;return r===2?rr(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function br(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function Xa(t,e,r){return-ho(po(t,1,e),r)+e-1}function tr(t,e=4,r=1){let n=Xa(t,e,r),o=Xa(t+1,e,r);return(Lt(t)-n+o)/7}function Tn(t){return t>99?t:t>L.twoDigitCutoffYear?1900+t:2e3+t}function ao(t,e,r,n=null){let o=new Date(t),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(i.timeZone=n);let s={timeZoneName:e,...i},a=new Intl.DateTimeFormat(r,s).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function er(t,e){let r=parseInt(t,10);Number.isNaN(r)&&(r=0);let n=parseInt(e,10)||0,o=r<0||Object.is(r,-0)?-n:n;return r*60+o}function ts(t){let e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new J(`Invalid unit value ${t}`);return e}function kr(t,e){let r={};for(let n in t)if(Mt(t,n)){let o=t[n];if(o==null)continue;r[e(n)]=ts(o)}return r}function Ut(t,e){let r=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),o=t>=0?"+":"-";switch(e){case"short":return`${o}${Z(r,2)}:${Z(n,2)}`;case"narrow":return`${o}${r}${n>0?`:${n}`:""}`;case"techie":return`${o}${Z(r,2)}${Z(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function bn(t){return tl(t,["hour","minute","second","millisecond"])}var Dc=["January","February","March","April","May","June","July","August","September","October","November","December"],rs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Oc=["J","F","M","A","M","J","J","A","S","O","N","D"];function Wi(t){switch(t){case"narrow":return[...Oc];case"short":return[...rs];case"long":return[...Dc];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var ns=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],os=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Nc=["M","T","W","T","F","S","S"];function Hi(t){switch(t){case"narrow":return[...Nc];case"short":return[...os];case"long":return[...ns];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var zi=["AM","PM"],Uc=["Before Christ","Anno Domini"],Lc=["BC","AD"],Mc=["B","A"];function Zi(t){switch(t){case"narrow":return[...Mc];case"short":return[...Lc];case"long":return[...Uc];default:return null}}function rl(t){return zi[t.hour<12?0:1]}function nl(t,e){return Hi(e)[t.weekday-1]}function ol(t,e){return Wi(e)[t.month-1]}function il(t,e){return Zi(e)[t.year<0?0:1]}function Ua(t,e,r="always",n=!1){let o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(t)===-1;if(r==="auto"&&i){let f=t==="days";switch(e){case 1:return f?"tomorrow":`next ${o[t][0]}`;case-1:return f?"yesterday":`last ${o[t][0]}`;case 0:return f?"today":`this ${o[t][0]}`;default:}}let s=Object.is(e,-0)||e<0,a=Math.abs(e),l=a===1,u=o[t],c=n?l?u[1]:u[2]||u[1]:l?o[t][0]:t;return s?`${a} ${c} ago`:`in ${a} ${c}`}function sl(t,e){let r="";for(let n of t)n.literal?r+=n.val:r+=e(n.val);return r}var Cc={D:Ot,DD:Xr,DDD:Kr,DDDD:en,t:tn,tt:rn,ttt:nn,tttt:on,T:sn,TT:an,TTT:ln,TTTT:un,f:cn,ff:dn,fff:pn,ffff:_n,F:fn,FF:mn,FFF:hn,FFFF:vn},ue=class t{static create(e,r={}){return new t(e,r)}static parseFormat(e){let r=null,n="",o=!1,i=[];for(let s=0;s0&&i.push({literal:o||/^\s+$/.test(n),val:n}),r=null,n="",o=!o):o||a===r?n+=a:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=a,r=a)}return n.length>0&&i.push({literal:o||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return Cc[e]}constructor(e,r){this.opts=r,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...r}).format()}dtFormatter(e,r={}){return this.loc.dtFormatter(e,{...this.opts,...r})}formatDateTime(e,r){return this.dtFormatter(e,r).format()}formatDateTimeParts(e,r){return this.dtFormatter(e,r).formatToParts()}formatInterval(e,r){return this.dtFormatter(e.start,r).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,r){return this.dtFormatter(e,r).resolvedOptions()}num(e,r=0){if(this.opts.forceSimple)return Z(e,r);let n={...this.opts};return r>0&&(n.padTo=r),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,r){let n=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(m,p)=>this.loc.extract(e,m,p),s=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",a=()=>n?rl(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(m,p)=>n?ol(e,m):i(p?{month:m}:{month:m,day:"numeric"},"month"),u=(m,p)=>n?nl(e,m):i(p?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),c=m=>{let p=t.macroTokenToFormatOpts(m);return p?this.formatWithSystemDefault(e,p):m},f=m=>n?il(e,m):i({era:m},"era"),d=m=>{switch(m){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return o?i({day:"numeric"},"day"):this.num(e.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(e.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(e.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return c(m)}};return sl(t.parseFormat(r),d)}formatDurationFromString(e,r){let n=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=l=>u=>{let c=n(u);return c?this.num(l.get(c),u.length):u},i=t.parseFormat(r),s=i.reduce((l,{literal:u,val:c})=>u?l:l.concat(c),[]),a=e.shiftTo(...s.map(n).filter(l=>l));return sl(i,o(a))}};var ll=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ir(...t){let e=t.reduce((r,n)=>r+n.source,"");return RegExp(`^${e}$`)}function Dr(...t){return e=>t.reduce(([r,n,o],i)=>{let[s,a,l]=i(e,o);return[{...r,...s},a||n,l]},[{},null,1]).slice(0,2)}function Or(t,...e){if(t==null)return[null,null];for(let[r,n]of e){let o=r.exec(t);if(o)return n(o)}return[null,null]}function ul(...t){return(e,r)=>{let n={},o;for(o=0;om!==void 0&&(p||m&&c)?-m:m;return[{years:d(Ct(r)),months:d(Ct(n)),weeks:d(Ct(o)),days:d(Ct(i)),hours:d(Ct(s)),minutes:d(Ct(a)),seconds:d(Ct(l),l==="-0"),milliseconds:d(En(u),f)}]}var Jc={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function as(t,e,r,n,o,i,s){let a={year:e.length===2?Tn(xt(e)):xt(e),month:rs.indexOf(r)+1,day:xt(n),hour:xt(o),minute:xt(i)};return s&&(a.second=xt(s)),t&&(a.weekday=t.length>3?ns.indexOf(t)+1:os.indexOf(t)+1),a}var jc=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Gc(t){let[,e,r,n,o,i,s,a,l,u,c,f]=t,d=as(e,o,n,r,i,s,a),m;return l?m=Jc[l]:u?m=0:m=er(c,f),[d,new ae(m)]}function Xc(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var Kc=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,ef=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,tf=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function al(t){let[,e,r,n,o,i,s,a]=t;return[as(e,o,n,r,i,s,a),ae.utcInstance]}function rf(t){let[,e,r,n,o,i,s,a]=t;return[as(e,a,r,n,o,i,s),ae.utcInstance]}var nf=Ir(Qc,ss),of=Ir(Bc,ss),sf=Ir(Rc,ss),af=Ir(fl),ml=Dr(Zc,Nr,Sn,Fn),lf=Dr(Vc,Nr,Sn,Fn),uf=Dr(Wc,Nr,Sn,Fn),cf=Dr(Nr,Sn,Fn);function pl(t){return Or(t,[nf,ml],[of,lf],[sf,uf],[af,cf])}function hl(t){return Or(Xc(t),[jc,Gc])}function _l(t){return Or(t,[Kc,al],[ef,al],[tf,rf])}function vl(t){return Or(t,[Pc,Yc])}var ff=Dr(Nr);function yl(t){return Or(t,[qc,ff])}var df=Ir(Hc,zc),mf=Ir(dl),pf=Dr(Nr,Sn,Fn);function gl(t){return Or(t,[df,ml],[mf,pf])}var xl="Invalid Duration",bl={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},hf={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...bl},Ze=146097/400,Ur=146097/4800,_f={years:{quarters:4,months:12,weeks:Ze/7,days:Ze,hours:Ze*24,minutes:Ze*24*60,seconds:Ze*24*60*60,milliseconds:Ze*24*60*60*1e3},quarters:{months:3,weeks:Ze/28,days:Ze/4,hours:Ze*24/4,minutes:Ze*24*60/4,seconds:Ze*24*60*60/4,milliseconds:Ze*24*60*60*1e3/4},months:{weeks:Ur/7,days:Ur,hours:Ur*24,minutes:Ur*24*60,seconds:Ur*24*60*60,milliseconds:Ur*24*60*60*1e3},...bl},nr=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],vf=nr.slice(0).reverse();function At(t,e,r=!1){let n={values:r?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new q(n)}function El(t,e){let r=e.milliseconds??0;for(let n of vf.slice(1))e[n]&&(r+=e[n]*t[n].milliseconds);return r}function wl(t,e){let r=El(t,e)<0?-1:1;nr.reduceRight((n,o)=>{if(E(e[o]))return n;if(n){let i=e[n]*r,s=t[o][n],a=Math.floor(i/s);e[o]+=a*r,e[n]-=a*s*r}return o},null),nr.reduce((n,o)=>{if(E(e[o]))return n;if(n){let i=e[n]%1;e[n]-=i,e[o]+=i*t[n][o]}return o},null)}function yf(t){let e={};for(let[r,n]of Object.entries(t))n!==0&&(e[r]=n);return e}var q=class t{constructor(e){let r=e.conversionAccuracy==="longterm"||!1,n=r?_f:hf;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||M.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,r){return t.fromObject({milliseconds:e},r)}static fromObject(e,r={}){if(e==null||typeof e!="object")throw new J(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new t({values:kr(e,t.normalizeUnit),loc:M.fromObject(r),conversionAccuracy:r.conversionAccuracy,matrix:r.matrix})}static fromDurationLike(e){if(ot(e))return t.fromMillis(e);if(t.isDuration(e))return e;if(typeof e=="object")return t.fromObject(e);throw new J(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,r){let[n]=vl(e);return n?t.fromObject(n,r):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,r){let[n]=yl(e);return n?t.fromObject(n,r):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,r=null){if(!e)throw new J("need to specify a reason the Duration is invalid");let n=e instanceof le?e:new le(e,r);if(L.throwOnInvalid)throw new io(n);return new t({invalid:n})}static normalizeUnit(e){let r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!r)throw new wr(e);return r}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,r={}){let n={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?ue.create(this.loc,n).formatDurationFromString(this,e):xl}toHuman(e={}){if(!this.isValid)return xl;let r=nr.map(n=>{let o=this.values[n];return E(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(o)}).filter(n=>n);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Er(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let r=this.toMillis();return r<0||r>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},D.fromMillis(r,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?El(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let r=t.fromDurationLike(e),n={};for(let o of nr)(Mt(r.values,o)||Mt(this.values,o))&&(n[o]=r.get(o)+this.get(o));return At(this,{values:n},!0)}minus(e){if(!this.isValid)return this;let r=t.fromDurationLike(e);return this.plus(r.negate())}mapUnits(e){if(!this.isValid)return this;let r={};for(let n of Object.keys(this.values))r[n]=ts(e(this.values[n],n));return At(this,{values:r},!0)}get(e){return this[t.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let r={...this.values,...kr(e,t.normalizeUnit)};return At(this,{values:r})}reconfigure({locale:e,numberingSystem:r,conversionAccuracy:n,matrix:o}={}){let s={loc:this.loc.clone({locale:e,numberingSystem:r}),matrix:o,conversionAccuracy:n};return At(this,s)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return wl(this.matrix,e),At(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=yf(this.normalize().shiftToAll().toObject());return At(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(s=>t.normalizeUnit(s));let r={},n={},o=this.toObject(),i;for(let s of nr)if(e.indexOf(s)>=0){i=s;let a=0;for(let u in n)a+=this.matrix[u][s]*n[u],n[u]=0;ot(o[s])&&(a+=o[s]);let l=Math.trunc(a);r[s]=l,n[s]=(a*1e3-l*1e3)/1e3}else ot(o[s])&&(n[s]=o[s]);for(let s in n)n[s]!==0&&(r[i]+=s===i?n[s]:n[s]/this.matrix[i][s]);return wl(this.matrix,r),At(this,{values:r},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let r of Object.keys(this.values))e[r]=this.values[r]===0?0:-this.values[r];return At(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function r(n,o){return n===void 0||n===0?o===void 0||o===0:n===o}for(let n of nr)if(!r(this.values[n],e.values[n]))return!1;return!0}};var Lr="Invalid Interval";function gf(t,e){return!t||!t.isValid?it.invalid("missing or invalid start"):!e||!e.isValid?it.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:r}={}){return this.isValid?t.fromDateTimes(e||this.s,r||this.e):this}splitAt(...e){if(!this.isValid)return[];let r=e.map(Mr).filter(s=>this.contains(s)).sort((s,a)=>s.toMillis()-a.toMillis()),n=[],{s:o}=this,i=0;for(;o+this.e?this.e:s;n.push(t.fromDateTimes(o,a)),o=a,i+=1}return n}splitBy(e){let r=q.fromDurationLike(e);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:n}=this,o=1,i,s=[];for(;nl*o));i=+a>+this.e?this.e:a,s.push(t.fromDateTimes(n,i)),n=i,o+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let r=this.s>e.s?this.s:e.s,n=this.e=n?null:t.fromDateTimes(r,n)}union(e){if(!this.isValid)return this;let r=this.se.e?this.e:e.e;return t.fromDateTimes(r,n)}static merge(e){let[r,n]=e.sort((o,i)=>o.s-i.s).reduce(([o,i],s)=>i?i.overlaps(s)||i.abutsStart(s)?[o,i.union(s)]:[o.concat([i]),s]:[o,s],[[],null]);return n&&r.push(n),r}static xor(e){let r=null,n=0,o=[],i=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),s=Array.prototype.concat(...i),a=s.sort((l,u)=>l.time-u.time);for(let l of a)n+=l.type==="s"?1:-1,n===1?r=l.time:(r&&+r!=+l.time&&o.push(t.fromDateTimes(r,l.time)),r=null);return t.merge(o)}difference(...e){return t.xor([this].concat(e)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Lr}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Ot,r={}){return this.isValid?ue.create(this.s.loc.clone(r),e).formatInterval(this):Lr}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Lr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Lr}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Lr}toFormat(e,{separator:r=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${r}${this.e.toFormat(e)}`:Lr}toDuration(e,r){return this.isValid?this.e.diff(this.s,e,r):q.invalid(this.invalidReason)}mapEndpoints(e){return t.fromDateTimes(e(this.s),e(this.e))}};var wt=class{static hasDST(e=L.defaultZone){let r=D.now().setZone(e).set({month:12});return!e.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(e){return _e.isValidZone(e)}static normalizeZone(e){return nt(e,L.defaultZone)}static getStartOfWeek({locale:e=null,locObj:r=null}={}){return(r||M.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:r=null}={}){return(r||M.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:r=null}={}){return(r||M.create(e)).getWeekendDays().slice()}static months(e="long",{locale:r=null,numberingSystem:n=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||M.create(r,n,i)).months(e)}static monthsFormat(e="long",{locale:r=null,numberingSystem:n=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||M.create(r,n,i)).months(e,!0)}static weekdays(e="long",{locale:r=null,numberingSystem:n=null,locObj:o=null}={}){return(o||M.create(r,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:r=null,numberingSystem:n=null,locObj:o=null}={}){return(o||M.create(r,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return M.create(e).meridiems()}static eras(e="short",{locale:r=null}={}){return M.create(r,null,"gregory").eras(e)}static features(){return{relative:fo(),localeWeek:mo()}}};function Tl(t,e){let r=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=r(e)-r(t);return Math.floor(q.fromMillis(n).as("days"))}function xf(t,e,r){let n=[["years",(l,u)=>u.year-l.year],["quarters",(l,u)=>u.quarter-l.quarter+(u.year-l.year)*4],["months",(l,u)=>u.month-l.month+(u.year-l.year)*12],["weeks",(l,u)=>{let c=Tl(l,u);return(c-c%7)/7}],["days",Tl]],o={},i=t,s,a;for(let[l,u]of n)r.indexOf(l)>=0&&(s=l,o[l]=u(t,e),a=i.plus(o),a>e?(o[l]--,t=i.plus(o),t>e&&(a=t,o[l]--,t=i.plus(o))):t=a);return[t,o,a,s]}function Sl(t,e,r,n){let[o,i,s,a]=xf(t,e,r),l=e-o,u=r.filter(f=>["hours","minutes","seconds","milliseconds"].indexOf(f)>=0);u.length===0&&(s0?q.fromMillis(l,n).shiftTo(...u).plus(c):c}var wf="missing Intl.DateTimeFormat.formatToParts support";function A(t,e=r=>r){return{regex:t,deser:([r])=>e(Ca(r))}}var bf="\xA0",$l=`[ ${bf}]`,Il=new RegExp($l,"g");function Ef(t){return t.replace(/\./g,"\\.?").replace(Il,$l)}function Fl(t){return t.replace(/\./g,"").replace(Il," ").toLowerCase()}function st(t,e){return t===null?null:{regex:RegExp(t.map(Ef).join("|")),deser:([r])=>t.findIndex(n=>Fl(r)===Fl(n))+e}}function kl(t,e){return{regex:t,deser:([,r,n])=>er(r,n),groups:e}}function vo(t){return{regex:t,deser:([e])=>e}}function Tf(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Sf(t,e){let r=He(e),n=He(e,"{2}"),o=He(e,"{3}"),i=He(e,"{4}"),s=He(e,"{6}"),a=He(e,"{1,2}"),l=He(e,"{1,3}"),u=He(e,"{1,6}"),c=He(e,"{1,9}"),f=He(e,"{2,4}"),d=He(e,"{4,6}"),m=g=>({regex:RegExp(Tf(g.val)),deser:([x])=>x,literal:!0}),h=(g=>{if(t.literal)return m(g);switch(g.val){case"G":return st(e.eras("short"),0);case"GG":return st(e.eras("long"),0);case"y":return A(u);case"yy":return A(f,Tn);case"yyyy":return A(i);case"yyyyy":return A(d);case"yyyyyy":return A(s);case"M":return A(a);case"MM":return A(n);case"MMM":return st(e.months("short",!0),1);case"MMMM":return st(e.months("long",!0),1);case"L":return A(a);case"LL":return A(n);case"LLL":return st(e.months("short",!1),1);case"LLLL":return st(e.months("long",!1),1);case"d":return A(a);case"dd":return A(n);case"o":return A(l);case"ooo":return A(o);case"HH":return A(n);case"H":return A(a);case"hh":return A(n);case"h":return A(a);case"mm":return A(n);case"m":return A(a);case"q":return A(a);case"qq":return A(n);case"s":return A(a);case"ss":return A(n);case"S":return A(l);case"SSS":return A(o);case"u":return vo(c);case"uu":return vo(a);case"uuu":return A(r);case"a":return st(e.meridiems(),0);case"kkkk":return A(i);case"kk":return A(f,Tn);case"W":return A(a);case"WW":return A(n);case"E":case"c":return A(r);case"EEE":return st(e.weekdays("short",!1),1);case"EEEE":return st(e.weekdays("long",!1),1);case"ccc":return st(e.weekdays("short",!0),1);case"cccc":return st(e.weekdays("long",!0),1);case"Z":case"ZZ":return kl(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return kl(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return vo(/[a-z_+-/]{1,256}?/i);case" ":return vo(/[^\S\n\r]/);default:return m(g)}})(t)||{invalidReason:wf};return h.token=t,h}var Ff={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function kf(t,e,r){let{type:n,value:o}=t;if(n==="literal"){let l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}let i=e[n],s=n;n==="hour"&&(e.hour12!=null?s=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?s="hour12":s="hour24":s=r.hour12?"hour12":"hour24");let a=Ff[s];if(typeof a=="object"&&(a=a[i]),a)return{literal:!1,val:a}}function $f(t){return[`^${t.map(r=>r.regex).reduce((r,n)=>`${r}(${n.source})`,"")}$`,t]}function If(t,e,r){let n=t.match(e);if(n){let o={},i=1;for(let s in r)if(Mt(r,s)){let a=r[s],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(o[a.token.val[0]]=a.deser(n.slice(i,i+l))),i+=l}return[n,o]}else return[n,{}]}function Df(t){let e=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},r=null,n;return E(t.z)||(r=_e.create(t.z)),E(t.Z)||(r||(r=new ae(t.Z)),n=t.Z),E(t.q)||(t.M=(t.q-1)*3+1),E(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),E(t.u)||(t.S=En(t.u)),[Object.keys(t).reduce((i,s)=>{let a=e(s);return a&&(i[a]=t[s]),i},{}),r,n]}var ls=null;function Of(){return ls||(ls=D.fromMillis(1555555555555)),ls}function Nf(t,e){if(t.literal)return t;let r=ue.macroTokenToFormatOpts(t.val),n=fs(r,e);return n==null||n.includes(void 0)?t:n}function us(t,e){return Array.prototype.concat(...t.map(r=>Nf(r,e)))}var kn=class{constructor(e,r){if(this.locale=e,this.format=r,this.tokens=us(ue.parseFormat(r),e),this.units=this.tokens.map(n=>Sf(n,e)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){let[n,o]=$f(this.units);this.regex=RegExp(n,"i"),this.handlers=o}}explainFromTokens(e){if(this.isValid){let[r,n]=If(e,this.regex,this.handlers),[o,i,s]=n?Df(n):[null,null,void 0];if(Mt(n,"a")&&Mt(n,"H"))throw new et("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:r,matches:n,result:o,zone:i,specificOffset:s}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function cs(t,e,r){return new kn(t,r).explainFromTokens(e)}function Dl(t,e,r){let{result:n,zone:o,specificOffset:i,invalidReason:s}=cs(t,e,r);return[n,o,i,s]}function fs(t,e){if(!t)return null;let n=ue.create(e,t).dtFormatter(Of()),o=n.formatToParts(),i=n.resolvedOptions();return o.map(s=>kf(s,t,i))}var ds="Invalid DateTime",Ol=864e13;function $n(t){return new le("unsupported zone",`the zone "${t.name}" is not supported`)}function ms(t){return t.weekData===null&&(t.weekData=xn(t.c)),t.weekData}function ps(t){return t.localWeekData===null&&(t.localWeekData=xn(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function or(t,e){let r={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new D({...r,...e,old:r})}function Ql(t,e,r){let n=t-e*60*1e3,o=r.offset(n);if(e===o)return[n,e];n-=(o-e)*60*1e3;let i=r.offset(n);return o===i?[n,o]:[t-Math.min(o,i)*60*1e3,Math.max(o,i)]}function yo(t,e){t+=e*60*1e3;let r=new Date(t);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function xo(t,e,r){return Ql(br(t),e,r)}function Nl(t,e){let r=t.o,n=t.c.year+Math.trunc(e.years),o=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...t.c,year:n,month:o,day:Math.min(t.c.day,Fr(n,o))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},s=q.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=br(i),[l,u]=Ql(a,r,t.zone);return s!==0&&(l+=s,u=t.zone.offset(l)),{ts:l,o:u}}function Cr(t,e,r,n,o,i){let{setZone:s,zone:a}=r;if(t&&Object.keys(t).length!==0||e){let l=e||a,u=D.fromObject(t,{...r,zone:l,specificOffset:i});return s?u:u.setZone(a)}else return D.invalid(new le("unparsable",`the input "${o}" can't be parsed as ${n}`))}function go(t,e,r=!0){return t.isValid?ue.create(M.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(t,e):null}function hs(t,e){let r=t.c.year>9999||t.c.year<0,n="";return r&&t.c.year>=0&&(n+="+"),n+=Z(t.c.year,r?6:4),e?(n+="-",n+=Z(t.c.month),n+="-",n+=Z(t.c.day)):(n+=Z(t.c.month),n+=Z(t.c.day)),n}function Ul(t,e,r,n,o,i){let s=Z(t.c.hour);return e?(s+=":",s+=Z(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!r)&&(s+=":")):s+=Z(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!r)&&(s+=Z(t.c.second),(t.c.millisecond!==0||!n)&&(s+=".",s+=Z(t.c.millisecond,3))),o&&(t.isOffsetFixed&&t.offset===0&&!i?s+="Z":t.o<0?(s+="-",s+=Z(Math.trunc(-t.o/60)),s+=":",s+=Z(Math.trunc(-t.o%60))):(s+="+",s+=Z(Math.trunc(t.o/60)),s+=":",s+=Z(Math.trunc(t.o%60)))),i&&(s+="["+t.zone.ianaName+"]"),s}var Bl={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Uf={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Lf={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Rl=["year","month","day","hour","minute","second","millisecond"],Mf=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Cf=["year","ordinal","hour","minute","second","millisecond"];function Af(t){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new wr(t);return e}function Ll(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Af(t)}}function Qf(t){return bo[t]||(wo===void 0&&(wo=L.now()),bo[t]=t.offset(wo)),bo[t]}function Ml(t,e){let r=nt(e.zone,L.defaultZone);if(!r.isValid)return D.invalid($n(r));let n=M.fromObject(e),o,i;if(E(t.year))o=L.now();else{for(let l of Rl)E(t[l])&&(t[l]=Bl[l]);let s=Xi(t)||Ki(t);if(s)return D.invalid(s);let a=Qf(r);[o,i]=xo(t,a,r)}return new D({ts:o,zone:r,loc:n,o:i})}function Cl(t,e,r){let n=E(r.round)?!0:r.round,o=(s,a)=>(s=Er(s,n||r.calendary?0:2,!0),e.loc.clone(r).relFormatter(r).format(s,a)),i=s=>r.calendary?e.hasSame(t,s)?0:e.startOf(s).diff(t.startOf(s),s).get(s):e.diff(t,s).get(s);if(r.unit)return o(i(r.unit),r.unit);for(let s of r.units){let a=i(s);if(Math.abs(a)>=1)return o(a,s)}return o(t>e?-0:0,r.units[r.units.length-1])}function Al(t){let e={},r;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],r=Array.from(t).slice(0,t.length-1)):r=Array.from(t),[e,r]}var wo,bo={},D=class t{constructor(e){let r=e.zone||L.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new le("invalid input"):null)||(r.isValid?null:$n(r));this.ts=E(e.ts)?L.now():e.ts;let o=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(r))[o,i]=[e.old.c,e.old.o];else{let a=ot(e.o)&&!e.old?e.o:r.offset(this.ts);o=yo(this.ts,a),n=Number.isNaN(o.year)?new le("invalid input"):null,o=n?null:o,i=n?null:a}this._zone=r,this.loc=e.loc||M.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new t({})}static local(){let[e,r]=Al(arguments),[n,o,i,s,a,l,u]=r;return Ml({year:n,month:o,day:i,hour:s,minute:a,second:l,millisecond:u},e)}static utc(){let[e,r]=Al(arguments),[n,o,i,s,a,l,u]=r;return e.zone=ae.utcInstance,Ml({year:n,month:o,day:i,hour:s,minute:a,second:l,millisecond:u},e)}static fromJSDate(e,r={}){let n=Ka(e)?e.valueOf():NaN;if(Number.isNaN(n))return t.invalid("invalid input");let o=nt(r.zone,L.defaultZone);return o.isValid?new t({ts:n,zone:o,loc:M.fromObject(r)}):t.invalid($n(o))}static fromMillis(e,r={}){if(ot(e))return e<-Ol||e>Ol?t.invalid("Timestamp out of range"):new t({ts:e,zone:nt(r.zone,L.defaultZone),loc:M.fromObject(r)});throw new J(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,r={}){if(ot(e))return new t({ts:e*1e3,zone:nt(r.zone,L.defaultZone),loc:M.fromObject(r)});throw new J("fromSeconds requires a numerical input")}static fromObject(e,r={}){e=e||{};let n=nt(r.zone,L.defaultZone);if(!n.isValid)return t.invalid($n(n));let o=M.fromObject(r),i=kr(e,Ll),{minDaysInFirstWeek:s,startOfWeek:a}=Gi(i,o),l=L.now(),u=E(r.specificOffset)?n.offset(l):r.specificOffset,c=!E(i.ordinal),f=!E(i.year),d=!E(i.month)||!E(i.day),m=f||d,p=i.weekYear||i.weekNumber;if((m||c)&&p)throw new et("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&c)throw new et("Can't mix ordinal dates with month/day");let h=p||i.weekday&&!m,g,x,v=yo(l,u);h?(g=Mf,x=Uf,v=xn(v,s,a)):c?(g=Cf,x=Lf,v=_o(v)):(g=Rl,x=Bl);let $=!1;for(let dt of g){let Qt=i[dt];E(Qt)?$?i[dt]=x[dt]:i[dt]=v[dt]:$=!0}let b=h?ja(i,s,a):c?Ga(i):Xi(i),S=b||Ki(i);if(S)return t.invalid(S);let B=h?Ji(i,s,a):c?ji(i):i,[te,j]=xo(B,u,n),Me=new t({ts:te,zone:n,o:j,loc:o});return i.weekday&&m&&e.weekday!==Me.weekday?t.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${Me.toISO()}`):Me.isValid?Me:t.invalid(Me.invalid)}static fromISO(e,r={}){let[n,o]=pl(e);return Cr(n,o,r,"ISO 8601",e)}static fromRFC2822(e,r={}){let[n,o]=hl(e);return Cr(n,o,r,"RFC 2822",e)}static fromHTTP(e,r={}){let[n,o]=_l(e);return Cr(n,o,r,"HTTP",r)}static fromFormat(e,r,n={}){if(E(e)||E(r))throw new J("fromFormat requires an input string and a format");let{locale:o=null,numberingSystem:i=null}=n,s=M.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[a,l,u,c]=Dl(s,e,r);return c?t.invalid(c):Cr(a,l,n,`format ${r}`,e,u)}static fromString(e,r,n={}){return t.fromFormat(e,r,n)}static fromSQL(e,r={}){let[n,o]=gl(e);return Cr(n,o,r,"SQL",e)}static invalid(e,r=null){if(!e)throw new J("need to specify a reason the DateTime is invalid");let n=e instanceof le?e:new le(e,r);if(L.throwOnInvalid)throw new no(n);return new t({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,r={}){let n=fs(e,M.fromObject(r));return n?n.map(o=>o?o.val:null).join(""):null}static expandFormat(e,r={}){return us(ue.parseFormat(e),M.fromObject(r)).map(o=>o.val).join("")}static resetCache(){wo=void 0,bo={}}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ms(this).weekYear:NaN}get weekNumber(){return this.isValid?ms(this).weekNumber:NaN}get weekday(){return this.isValid?ms(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?ps(this).weekday:NaN}get localWeekNumber(){return this.isValid?ps(this).weekNumber:NaN}get localWeekYear(){return this.isValid?ps(this).weekYear:NaN}get ordinal(){return this.isValid?_o(this.c).ordinal:NaN}get monthShort(){return this.isValid?wt.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?wt.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?wt.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?wt.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,r=6e4,n=br(this.c),o=this.zone.offset(n-e),i=this.zone.offset(n+e),s=this.zone.offset(n-o*r),a=this.zone.offset(n-i*r);if(s===a)return[this];let l=n-s*r,u=n-a*r,c=yo(l,s),f=yo(u,a);return c.hour===f.hour&&c.minute===f.minute&&c.second===f.second&&c.millisecond===f.millisecond?[or(this,{ts:l}),or(this,{ts:u})]:[this]}get isInLeapYear(){return rr(this.year)}get daysInMonth(){return Fr(this.year,this.month)}get daysInYear(){return this.isValid?Lt(this.year):NaN}get weeksInWeekYear(){return this.isValid?tr(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?tr(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:r,numberingSystem:n,calendar:o}=ue.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:r,numberingSystem:n,outputCalendar:o}}toUTC(e=0,r={}){return this.setZone(ae.instance(e),r)}toLocal(){return this.setZone(L.defaultZone)}setZone(e,{keepLocalTime:r=!1,keepCalendarTime:n=!1}={}){if(e=nt(e,L.defaultZone),e.equals(this.zone))return this;if(e.isValid){let o=this.ts;if(r||n){let i=e.offset(this.ts),s=this.toObject();[o]=xo(s,i,e)}return or(this,{ts:o,zone:e})}else return t.invalid($n(e))}reconfigure({locale:e,numberingSystem:r,outputCalendar:n}={}){let o=this.loc.clone({locale:e,numberingSystem:r,outputCalendar:n});return or(this,{loc:o})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let r=kr(e,Ll),{minDaysInFirstWeek:n,startOfWeek:o}=Gi(r,this.loc),i=!E(r.weekYear)||!E(r.weekNumber)||!E(r.weekday),s=!E(r.ordinal),a=!E(r.year),l=!E(r.month)||!E(r.day),u=a||l,c=r.weekYear||r.weekNumber;if((u||s)&&c)throw new et("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new et("Can't mix ordinal dates with month/day");let f;i?f=Ji({...xn(this.c,n,o),...r},n,o):E(r.ordinal)?(f={...this.toObject(),...r},E(r.day)&&(f.day=Math.min(Fr(f.year,f.month),f.day))):f=ji({..._o(this.c),...r});let[d,m]=xo(f,this.o,this.zone);return or(this,{ts:d,o:m})}plus(e){if(!this.isValid)return this;let r=q.fromDurationLike(e);return or(this,Nl(this,r))}minus(e){if(!this.isValid)return this;let r=q.fromDurationLike(e).negate();return or(this,Nl(this,r))}startOf(e,{useLocaleWeeks:r=!1}={}){if(!this.isValid)return this;let n={},o=q.normalizeUnit(e);switch(o){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break;case"milliseconds":break}if(o==="weeks")if(r){let i=this.loc.getStartOfWeek(),{weekday:s}=this;sthis.valueOf(),a=s?this:e,l=s?e:this,u=Sl(a,l,i,o);return s?u.negate():u}diffNow(e="milliseconds",r={}){return this.diff(t.now(),e,r)}until(e){return this.isValid?it.fromDateTimes(this,e):this}hasSame(e,r,n){if(!this.isValid)return!1;let o=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(r,n)<=o&&o<=i.endOf(r,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let r=e.base||t.fromObject({},{zone:this.zone}),n=e.padding?thisr.valueOf(),Math.min)}static max(...e){if(!e.every(t.isDateTime))throw new J("max requires all arguments be DateTimes");return es(e,r=>r.valueOf(),Math.max)}static fromFormatExplain(e,r,n={}){let{locale:o=null,numberingSystem:i=null}=n,s=M.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return cs(s,e,r)}static fromStringExplain(e,r,n={}){return t.fromFormatExplain(e,r,n)}static buildFormatParser(e,r={}){let{locale:n=null,numberingSystem:o=null}=r,i=M.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0});return new kn(i,e)}static fromFormatParser(e,r,n={}){if(E(e)||E(r))throw new J("fromFormatParser requires an input string and a format parser");let{locale:o=null,numberingSystem:i=null}=n,s=M.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});if(!s.equals(r.locale))throw new J(`fromFormatParser called with a locale of ${s}, but the format parser was created for ${r.locale}`);let{result:a,zone:l,specificOffset:u,invalidReason:c}=r.explainFromTokens(e);return c?t.invalid(c):Cr(a,l,n,`format ${r.format}`,e,u)}static get DATE_SHORT(){return Ot}static get DATE_MED(){return Xr}static get DATE_MED_WITH_WEEKDAY(){return Ni}static get DATE_FULL(){return Kr}static get DATE_HUGE(){return en}static get TIME_SIMPLE(){return tn}static get TIME_WITH_SECONDS(){return rn}static get TIME_WITH_SHORT_OFFSET(){return nn}static get TIME_WITH_LONG_OFFSET(){return on}static get TIME_24_SIMPLE(){return sn}static get TIME_24_WITH_SECONDS(){return an}static get TIME_24_WITH_SHORT_OFFSET(){return ln}static get TIME_24_WITH_LONG_OFFSET(){return un}static get DATETIME_SHORT(){return cn}static get DATETIME_SHORT_WITH_SECONDS(){return fn}static get DATETIME_MED(){return dn}static get DATETIME_MED_WITH_SECONDS(){return mn}static get DATETIME_MED_WITH_WEEKDAY(){return Ui}static get DATETIME_FULL(){return pn}static get DATETIME_FULL_WITH_SECONDS(){return hn}static get DATETIME_HUGE(){return _n}static get DATETIME_HUGE_WITH_SECONDS(){return vn}};function Mr(t){if(D.isDateTime(t))return t;if(t&&t.valueOf&&ot(t.valueOf()))return D.fromJSDate(t);if(t&&typeof t=="object")return D.fromObject(t);throw new J(`Unknown datetime argument: ${t}, of type ${typeof t}`)}var Vl=Fi(ct,(t,e)=>{e(t.map(({start:n,title:o},i)=>r(i,n,o)));function r(n,o,i){let{years:s,months:a,weeks:l,days:u,interval:c}=Bf(o);return{id:n,title:i,start:o,quote:xr.random(n),years:s,months:a,days:u,weeks:l,full:{months:Math.trunc(c.length("months")),weeks:Math.trunc(c.length("weeks")),days:Math.trunc(c.length("days")),hours:Math.trunc(c.length("hours"))}}}},[]);function Bf(t){let e=D.now(),r=D.fromISO(t),n=e.diff(r,["years","months","weeks","days","milliseconds"],{conversionAccuracy:"longterm"}).toObject();return{years:n.years||0,months:n.months||0,days:n.days||0,weeks:n.weeks||0,interval:it.fromDateTimes(r,e)}}var Rf=ee('
    '),Vf=ee("

    "),Wf=ee('
    ',1);function _s(t,e){xe(e,!0);let r=Yr(),n=()=>vr(Vl,"$counters",r),o=()=>vr(Ia,"$time",r),i=Qr(void 0);function s(u){new IntersectionObserver(f,{threshold:1}).observe(u);function f(d){let m=d.find(p=>p.isIntersecting);C(i,K(m?.target.id))}}var a=vt();oi(u=>{z(()=>Ln.title=e.name)});var l=$e(a);di(l,()=>Promise.all([to.load(),xr.load()]),null,u=>{var c=Wf(),f=$e(c),d=U(f);vi(d,1,n,_i,(x,v,$)=>{var b=Rf();z(()=>W(b,"id",String($)));var S=U(b),B=U(S);ro(B,{id:$,get counter(){return k(v)}}),N(S);var te=oe(S,2);Di(te,{get counter(){return k(v)}});var j=oe(te,2);mi(j,()=>k(v).quote,Me=>{Oi(Me,{get quote(){return k(v).quote}})}),N(b),gi(b,Me=>s(Me)),Q(x,b)});var m=oe(d,2),p=U(m);ro(p,{}),N(m),N(f);var h=oe(f,2),g=U(h);he(g,()=>k(i),x=>{$i(x,{get active(){return k(i)}})},x=>{var v=Vf(),$=U(v,!0);N(v),z(()=>lt($,o())),Q(x,v)}),N(h),z(()=>yt(h,"active",k(i))),Q(u,c)}),Q(t,a),we()}var YT=_r(_s,{target:document.body,props:{name:vs}});export{YT as default};