@gomusdev/web-components 4.13.0 → 4.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,56 +1,56 @@
1
- (function(){var Wy=globalThis;(Wy.__zod_globalConfig??={}).jitless=!0,typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");var jn={},ut=Symbol("uninitialized"),sl=Symbol("filename"),Hy="http://www.w3.org/1999/xhtml",Gy="http://www.w3.org/2000/svg",Ky="http://www.w3.org/1998/Math/MathML",Yy="@attach",ya=Array.isArray,Jy=Array.prototype.indexOf,ba=Array.prototype.includes,_a=Array.from,wa=Object.keys,wn=Object.defineProperty,Fr=Object.getOwnPropertyDescriptor,yd=Object.getOwnPropertyDescriptors,bd=Object.prototype,Qy=Array.prototype,ka=Object.getPrototypeOf,_d=Object.isExtensible;function us(e){return typeof e=="function"}var qe=()=>{};function Xy(e){return e()}function al(e){for(var t=0;t<e.length;t++)e[t]()}function wd(){var e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}function eb(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const r=[];for(const n of e)if(r.push(n),r.length===t)break;return r}var tb=1<<24,ir=1024,sr=2048,Zn=4096,ol=8192,rb=16384,ll=32768,kd=1<<25,cs=65536,AF=1<<17,CF=1<<18,yi=1<<19,Sd=1<<20,ds=1<<25,fs=65536,Ed=1<<21,nb=1<<22,Sa=1<<23,Nr=Symbol("$state"),ul=Symbol("legacy props"),ib=Symbol(""),sb=Symbol("proxy path"),xd=Symbol("attributes"),cl=Symbol("class"),dl=Symbol("style"),fl=Symbol("text"),hs=Symbol("form reset"),OF=Symbol("hmr anchor"),Ea=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ps=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function ab(e){throw new Error("https://svelte.dev/e/invariant_violation")}function Td(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function ob(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function DF(){throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function IF(){throw new Error("https://svelte.dev/e/derived_references_self")}function Ad(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function PF(e,t,r){throw new Error("https://svelte.dev/e/each_key_volatile")}function lb(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ub(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function cb(e){throw new Error("https://svelte.dev/e/effect_orphan")}function db(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function fb(){throw new Error("https://svelte.dev/e/hydration_failed")}function MF(){throw new Error("https://svelte.dev/e/invalid_snippet")}function hb(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function $F(e){throw new Error("https://svelte.dev/e/props_rest_readonly")}function FF(e){throw new Error("https://svelte.dev/e/rune_outside_svelte")}function pb(){throw new Error("https://svelte.dev/e/set_context_after_init")}function mb(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function vb(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function gb(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function yb(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var NF="font-weight: bold",RF="font-weight: normal";function LF(e){console.warn("https://svelte.dev/e/await_reactivity_loss")}function zF(e,t){console.warn("https://svelte.dev/e/await_waterfall")}function bb(){console.warn("https://svelte.dev/e/derived_inert")}function _b(e,t,r){console.warn("https://svelte.dev/e/hydration_attribute_changed")}function wb(e){console.warn("https://svelte.dev/e/hydration_html_changed")}function ms(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function qF(){console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function kb(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function hl(e){console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function UF(){console.warn("https://svelte.dev/e/state_proxy_unmount")}function Sb(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var ke=!1;function kt(e){ke=e}var Ce;function ht(e){if(e===null)throw ms(),jn;return Ce=e}function tn(){return ht(br(Ce))}function I(e){if(ke){if(br(Ce)!==null)throw ms(),jn;Ce=e}}function Ot(e=1){if(ke){for(var t=e,r=Ce;t--;)r=br(r);Ce=r}}function vs(e=!0){for(var t=0,r=Ce;;){if(r.nodeType===8){var n=r.data;if(n==="]"){if(t===0)return r;t-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var i=br(r);e&&r.remove(),r=i}}function pl(e){if(!e||e.nodeType!==8)throw ms(),jn;return e.data}function Cd(e){return e===this.v}function Eb(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Od(e){return!Eb(e,this.v)}var Kt=!1,bi=!1,BF=!1;function xb(){bi=!0}var VF="font-weight: bold",jF="font-weight: normal";function ZF(e){console.warn("https://svelte.dev/e/state_snapshot_uncloneable")}var Tb=[];function ml(e,t=!1,r=!1){return xa(e,new Map,"",Tb,null,r)}function xa(e,t,r,n,i=null,s=!1){if(typeof e=="object"&&e!==null){var a=t.get(e);if(a!==void 0)return a;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(ya(e)){var o=Array(e.length);t.set(e,o),i!==null&&t.set(i,o);for(var l=0;l<e.length;l+=1){var c=e[l];l in e&&(o[l]=xa(c,t,r,n,null,s))}return o}if(ka(e)===bd){o={},t.set(e,o),i!==null&&t.set(i,o);for(var f of Object.keys(e))o[f]=xa(e[f],t,r,n,null,s);return o}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON=="function"&&!s)return xa(e.toJSON(),t,r,n,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}var WF=null;function Dd(e,t){return e.label=t,Ab(e.v,t),e}function Ab(e,t){return e?.[sb]?.(t),e}function HF(e){return typeof e=="symbol"?`Symbol(${e.description})`:typeof e=="function"?"<function>":typeof e=="object"&&e?"<object>":String(e)}function GF(e){const t=new Error,r=Cb();return r.length===0?null:(r.unshift(`
1
+ (function(){var zy=globalThis;(zy.__zod_globalConfig??={}).jitless=!0,typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");var Vn={},ut=Symbol("uninitialized"),nl=Symbol("filename"),qy="http://www.w3.org/1999/xhtml",Uy="http://www.w3.org/2000/svg",By="http://www.w3.org/1998/Math/MathML",Vy="@attach",ma=Array.isArray,jy=Array.prototype.indexOf,va=Array.prototype.includes,ga=Array.from,ya=Object.keys,wn=Object.defineProperty,Fr=Object.getOwnPropertyDescriptor,pd=Object.getOwnPropertyDescriptors,md=Object.prototype,Zy=Array.prototype,ba=Object.getPrototypeOf,vd=Object.isExtensible;function os(e){return typeof e=="function"}var qe=()=>{};function Wy(e){return e()}function il(e){for(var t=0;t<e.length;t++)e[t]()}function gd(){var e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}function Hy(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const r=[];for(const n of e)if(r.push(n),r.length===t)break;return r}var Gy=1<<24,ir=1024,sr=2048,jn=4096,sl=8192,Ky=16384,al=32768,yd=1<<25,ls=65536,SF=1<<17,EF=1<<18,vi=1<<19,bd=1<<20,us=1<<25,cs=65536,_d=1<<21,Yy=1<<22,_a=1<<23,Nr=Symbol("$state"),ol=Symbol("legacy props"),Jy=Symbol(""),Qy=Symbol("proxy path"),wd=Symbol("attributes"),ll=Symbol("class"),ul=Symbol("style"),cl=Symbol("text"),ds=Symbol("form reset"),TF=Symbol("hmr anchor"),wa=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},fs=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Xy(e){throw new Error("https://svelte.dev/e/invariant_violation")}function kd(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function eb(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function xF(){throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function AF(){throw new Error("https://svelte.dev/e/derived_references_self")}function Sd(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function CF(e,t,r){throw new Error("https://svelte.dev/e/each_key_volatile")}function tb(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function rb(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function nb(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ib(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function sb(){throw new Error("https://svelte.dev/e/hydration_failed")}function OF(){throw new Error("https://svelte.dev/e/invalid_snippet")}function ab(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function DF(e){throw new Error("https://svelte.dev/e/props_rest_readonly")}function IF(e){throw new Error("https://svelte.dev/e/rune_outside_svelte")}function ob(){throw new Error("https://svelte.dev/e/set_context_after_init")}function lb(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ub(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function cb(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function db(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var PF="font-weight: bold",MF="font-weight: normal";function $F(e){console.warn("https://svelte.dev/e/await_reactivity_loss")}function FF(e,t){console.warn("https://svelte.dev/e/await_waterfall")}function fb(){console.warn("https://svelte.dev/e/derived_inert")}function hb(e,t,r){console.warn("https://svelte.dev/e/hydration_attribute_changed")}function pb(e){console.warn("https://svelte.dev/e/hydration_html_changed")}function hs(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function NF(){console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function mb(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function dl(e){console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function RF(){console.warn("https://svelte.dev/e/state_proxy_unmount")}function vb(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var ke=!1;function kt(e){ke=e}var Ce;function ht(e){if(e===null)throw hs(),Vn;return Ce=e}function tn(){return ht(_r(Ce))}function I(e){if(ke){if(_r(Ce)!==null)throw hs(),Vn;Ce=e}}function Ot(e=1){if(ke){for(var t=e,r=Ce;t--;)r=_r(r);Ce=r}}function ps(e=!0){for(var t=0,r=Ce;;){if(r.nodeType===8){var n=r.data;if(n==="]"){if(t===0)return r;t-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var i=_r(r);e&&r.remove(),r=i}}function fl(e){if(!e||e.nodeType!==8)throw hs(),Vn;return e.data}function Ed(e){return e===this.v}function gb(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Td(e){return!gb(e,this.v)}var Kt=!1,gi=!1,LF=!1;function yb(){gi=!0}var zF="font-weight: bold",qF="font-weight: normal";function UF(e){console.warn("https://svelte.dev/e/state_snapshot_uncloneable")}var bb=[];function hl(e,t=!1,r=!1){return ka(e,new Map,"",bb,null,r)}function ka(e,t,r,n,i=null,s=!1){if(typeof e=="object"&&e!==null){var a=t.get(e);if(a!==void 0)return a;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(ma(e)){var o=Array(e.length);t.set(e,o),i!==null&&t.set(i,o);for(var l=0;l<e.length;l+=1){var c=e[l];l in e&&(o[l]=ka(c,t,r,n,null,s))}return o}if(ba(e)===md){o={},t.set(e,o),i!==null&&t.set(i,o);for(var f of Object.keys(e))o[f]=ka(e[f],t,r,n,null,s);return o}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON=="function"&&!s)return ka(e.toJSON(),t,r,n,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}var BF=null;function xd(e,t){return e.label=t,_b(e.v,t),e}function _b(e,t){return e?.[Qy]?.(t),e}function VF(e){return typeof e=="symbol"?`Symbol(${e.description})`:typeof e=="function"?"<function>":typeof e=="object"&&e?"<object>":String(e)}function jF(e){const t=new Error,r=wb();return r.length===0?null:(r.unshift(`
2
2
  `),wn(t,"stack",{value:r.join(`
3
- `)}),wn(t,"name",{value:e}),t)}function Cb(){const e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;const t=new Error().stack;if(Error.stackTraceLimit=e,!t)return[];const r=t.split(`
4
- `),n=[];for(let i=0;i<r.length;i++){const s=r[i],a=s.replaceAll("\\","/");if(s.trim()!=="Error"){if(s.includes("validate_each_keys"))return[];a.includes("svelte/src/internal")||a.includes("node_modules/.vite")||n.push(s)}}return n}function KF(e,t){throw new Error("invariant(...) was not guarded by if (DEV)")}var Ze=null;function _i(e){Ze=e}var Ob=null;function YF(e){Ob=e}var vl=null;function JF(e){vl=e}function Id(e){return gl("getContext").get(e)}function Db(e,t){const r=gl("setContext");if(Kt){var n=Te.f;!Oe&&(n&32)!==0&&!Ze.i||pb()}return r.set(e,t),t}function Ib(e){return gl("hasContext").has(e)}function ne(e,t=!1,r){Ze={p:Ze,i:!1,c:null,e:null,s:e,x:null,r:Te,l:bi&&!t?{s:null,u:null,$:[]}:null}}function ie(e){var t=Ze,r=t.e;if(r!==null){t.e=null;for(var n of r)rf(n)}return e!==void 0&&(t.x=e),t.i=!0,Ze=t.p,e??{}}function gs(){return!bi||Ze!==null&&Ze.l===null}function gl(e){return Ze===null&&Td(e),Ze.c??=new Map(Pb(Ze)||void 0)}function Pb(e){let t=e.p;for(;t!==null;){const r=t.c;if(r!==null)return r;t=t.p}return null}var Wn=[];function Pd(){var e=Wn;Wn=[],al(e)}function ar(e){if(Wn.length===0&&!bs){var t=Wn;queueMicrotask(()=>{t===Wn&&Pd()})}Wn.push(e)}function Mb(){for(;Wn.length>0;)Pd()}var $b=new WeakMap;function Md(e){var t=Te;if(t===null)return Oe.f|=Sa,e;if((t.f&32768)===0&&(t.f&4)===0)throw e;kn(e,t)}function kn(e,t){for(;t!==null;){if((t.f&128)!==0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}function QF(e,t){const r=Fr(e,"message");if(!(r&&!r.configurable)){for(var n=Al?" ":" ",i=`
3
+ `)}),wn(t,"name",{value:e}),t)}function wb(){const e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;const t=new Error().stack;if(Error.stackTraceLimit=e,!t)return[];const r=t.split(`
4
+ `),n=[];for(let i=0;i<r.length;i++){const s=r[i],a=s.replaceAll("\\","/");if(s.trim()!=="Error"){if(s.includes("validate_each_keys"))return[];a.includes("svelte/src/internal")||a.includes("node_modules/.vite")||n.push(s)}}return n}function ZF(e,t){throw new Error("invariant(...) was not guarded by if (DEV)")}var Ze=null;function yi(e){Ze=e}var kb=null;function WF(e){kb=e}var pl=null;function HF(e){pl=e}function Ad(e){return ml("getContext").get(e)}function Sb(e,t){const r=ml("setContext");if(Kt){var n=xe.f;!Oe&&(n&32)!==0&&!Ze.i||ob()}return r.set(e,t),t}function Eb(e){return ml("hasContext").has(e)}function ne(e,t=!1,r){Ze={p:Ze,i:!1,c:null,e:null,s:e,x:null,r:xe,l:gi&&!t?{s:null,u:null,$:[]}:null}}function ie(e){var t=Ze,r=t.e;if(r!==null){t.e=null;for(var n of r)Qd(n)}return e!==void 0&&(t.x=e),t.i=!0,Ze=t.p,e??{}}function ms(){return!gi||Ze!==null&&Ze.l===null}function ml(e){return Ze===null&&kd(e),Ze.c??=new Map(Tb(Ze)||void 0)}function Tb(e){let t=e.p;for(;t!==null;){const r=t.c;if(r!==null)return r;t=t.p}return null}var Zn=[];function Cd(){var e=Zn;Zn=[],il(e)}function ar(e){if(Zn.length===0&&!gs){var t=Zn;queueMicrotask(()=>{t===Zn&&Cd()})}Zn.push(e)}function xb(){for(;Zn.length>0;)Cd()}var Ab=new WeakMap;function Od(e){var t=xe;if(t===null)return Oe.f|=_a,e;if((t.f&32768)===0&&(t.f&4)===0)throw e;kn(e,t)}function kn(e,t){for(;t!==null;){if((t.f&128)!==0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}function GF(e,t){const r=Fr(e,"message");if(!(r&&!r.configurable)){for(var n=Tl?" ":" ",i=`
5
5
  ${n}in ${t.fn?.name||"<unknown>"}`,s=t.ctx;s!==null;)i+=`
6
- ${n}in ${s.function?.[sl].split("/").pop()}`,s=s.p;return{message:e.message+`
6
+ ${n}in ${s.function?.[nl].split("/").pop()}`,s=s.p;return{message:e.message+`
7
7
  ${i}
8
8
  `,stack:e.stack?.split(`
9
9
  `).filter(a=>!a.includes("svelte/src/internal")).join(`
10
- `)}}}function XF(e){const t=$b.get(e);t&&(wn(e,"message",{value:t.message}),wn(e,"stack",{value:t.stack}))}var Fb=~(sr|Zn|ir);function at(e,t){e.f=e.f&Fb|t}function yl(e){(e.f&512)!==0||e.deps===null?at(e,ir):at(e,Zn)}function $d(e){if(e!==null)for(const t of e)(t.f&2)===0||(t.f&65536)===0||(t.f^=fs,$d(t.deps))}function Fd(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),$d(e.deps),at(e,ir)}var Nb=!1,Ta=!1;function Rb(e){var t=Ta;try{return Ta=!1,[e(),Ta]}finally{Ta=t}}var Aa=null,wi=null,Ee=null,ys=null,Dt=null,bl=null,bs=!1,_l=!1,ki=null,Ca=null,Nd=0,eN=new Set,Lb=1,Si=class dd{id=Lb++;#e=!1;linked=!0;#t=null;#r=null;async_deriveds=new Map;current=new Map;previous=new Map;#n=new Set;#i=new Set;#s=0;#o=new Map;#a=null;#l=[];#u=[];#c=new Set;#d=new Set;#h=new Map;#p=new Set;is_fork=!1;#f=!1;constructor(){wi===null?Aa=wi=this:(wi.#r=this,this.#t=wi),wi=this}#m(){if(this.is_fork)return!0;for(const n of this.#o.keys()){for(var t=n,r=!1;t.parent!==null;){if(this.#h.has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1}skip_effect(t){this.#h.has(t)||this.#h.set(t,{d:[],m:[]}),this.#p.delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=this.#h.get(t);if(n){this.#h.delete(t);for(var i of n.d)at(i,sr),r(i);for(i of n.m)at(i,Zn),r(i)}this.#p.add(t)}#v(){this.#e=!0,Nd++>1e3&&(this.#b(),zb());for(const l of this.#c)this.#d.delete(l),at(l,sr),this.schedule(l);for(const l of this.#d)at(l,Zn),this.schedule(l);const t=this.#l;this.#l=[],this.apply();var r=ki=[],n=[],i=Ca=[];for(const l of t)try{this.#y(l,r,n)}catch(c){throw qd(l),this.#m()||this.discard(),c}if(Ee=null,i.length>0){var s=dd.ensure();for(const l of i)s.schedule(l)}if(ki=null,Ca=null,this.#m()){this.#g(n),this.#g(r);for(const[l,c]of this.#h)zd(l,c);i.length>0&&Ee.#v();return}const a=this.#w();if(a){this.#g(n),this.#g(r),a.#_(this);return}this.#c.clear(),this.#d.clear();for(const l of this.#n)l(this);this.#n.clear(),ys=this,Rd(n),Rd(r),ys=null,this.#a?.resolve();var o=Ee;if(this.#s===0&&(this.#l.length===0||o!==null)&&(this.#b(),Kt&&(this.#k(),Ee=o)),this.#l.length>0)if(o!==null){const l=o;l.#l.push(...this.#l.filter(c=>!l.#l.includes(c)))}else o=this;o!==null&&o.#v()}#y(t,r,n){t.f^=ir;for(var i=t.first;i!==null;){var s=i.f,a=(s&96)!==0;if(!(a&&(s&1024)!==0||(s&8192)!==0||this.#h.has(i))&&i.fn!==null){a?i.f^=ir:(s&4)!==0?r.push(i):Kt&&(s&16777224)!==0?n.push(i):Es(i)&&((s&16)!==0&&this.#d.add(i),Ai(i));var o=i.first;if(o!==null){i=o;continue}}for(;i!==null;){var l=i.next;if(l!==null){i=l;break}i=i.parent}}}#w(){for(var t=this.#t;t!==null;){if(!t.is_fork){for(const[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=t.#t}return null}#_(t){for(const[n,i]of t.current)!this.previous.has(n)&&t.previous.has(n)&&this.previous.set(n,t.previous.get(n)),this.current.set(n,i);for(const[n,i]of t.async_deriveds){const s=this.async_deriveds.get(n);s&&i.promise.then(s.resolve).catch(s.reject)}this.transfer_effects(t.#c,t.#d);const r=n=>{var i=n.reactions;if(i!==null)for(const o of i){var s=o.f;if((s&2)!==0)r(o);else{var a=o;s&4194320&&!this.async_deriveds.has(a)&&(this.#d.delete(a),at(a,sr),this.schedule(a))}}};for(const n of this.current.keys())r(n);this.oncommit(()=>t.discard()),t.#b(),Ee=this,this.#v()}#g(t){for(var r=0;r<t.length;r+=1)Fd(t[r],this.#c,this.#d)}capture(t,r,n=!1){t.v!==ut&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&8388608)===0&&(this.current.set(t,[r,n]),Dt?.set(t,r)),this.is_fork||(t.v=r)}activate(){Ee=this}deactivate(){Ee=null,Dt=null}flush(){try{_l=!0,Ee=this,this.#v()}finally{Nd=0,bl=null,ki=null,Ca=null,_l=!1,Ee=null,Dt=null,Hn.clear()}}discard(){for(const t of this.#i)t(this);this.#i.clear(),this.#b(),this.#a?.resolve()}register_created_effect(t){this.#u.push(t)}#k(){for(let f=Aa;f!==null;f=f.#r){var t=f.id<this.id,r=[];for(const[u,[p,h]]of this.current){if(f.current.has(u)){var n=f.current.get(u)[0];if(t&&p!==n)f.current.set(u,[p,h]);else continue}r.push(u)}if(t)for(const[u,p]of this.async_deriveds){const h=f.async_deriveds.get(u);h&&p.promise.then(h.resolve).catch(h.reject)}if(f.#e){var i=[...f.current.keys()].filter(u=>!f.current.get(u)[1]&&!this.current.has(u));if(i.length===0)t&&f.discard();else if(r.length>0){if(t)for(const u of this.#p)f.unskip_effect(u,p=>{(p.f&4194320)!==0?f.schedule(p):f.#g([p])});f.activate();var s=new Set,a=new Map;for(var o of r)Ld(o,i,s,a);a=new Map;var l=[...f.current].filter(([u,p])=>{const h=this.current.get(u);return h?h[0]!==p[0]||h[1]!==p[1]:!0}).map(([u])=>u);if(l.length>0)for(const u of this.#u)(u.f&155648)===0&&wl(u,l,a)&&((u.f&4194320)!==0?(at(u,sr),f.schedule(u)):f.#c.add(u));if(f.#l.length>0&&!f.#f){f.apply();for(var c of f.#l)f.#y(c,[],[]);f.#l=[]}f.deactivate()}}}}increment(t,r){if(this.#s+=1,t){let n=this.#o.get(r)??0;this.#o.set(r,n+1)}}decrement(t,r){if(this.#s-=1,t){let n=this.#o.get(r)??0;n===1?this.#o.delete(r):this.#o.set(r,n-1)}this.#f||(this.#f=!0,ar(()=>{this.#f=!1,this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)this.#c.add(n);for(const n of r)this.#d.add(n);t.clear(),r.clear()}oncommit(t){this.#n.add(t)}ondiscard(t){this.#i.add(t)}settled(){return(this.#a??=wd()).promise}static ensure(){if(Ee===null){const t=Ee=new dd;!_l&&!bs&&ar(()=>{t.#e||t.flush()})}return Ee}apply(){if(!Kt||!this.is_fork&&this.#t===null&&this.#r===null){Dt=null;return}Dt=new Map;for(const[r,[n]]of this.current)Dt.set(r,n);for(let r=Aa;r!==null;r=r.#r)if(!(r===this||r.is_fork)){var t=!1;if(r.id<this.id){for(const[n,[,i]]of r.current)if(!i&&this.current.has(n)){t=!0;break}}if(!t)for(const[n,i]of r.previous)Dt.has(n)||Dt.set(n,i)}}schedule(t){if(bl=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(ki!==null&&r===Te&&(Kt||(Oe===null||(Oe.f&2)===0)&&!Nb))return;if((n&96)!==0){if((n&1024)===0)return;r.f^=ir}}this.#l.push(r)}#b(){if(this.linked){var t=this.#t,r=this.#r;t===null?Aa=r:t.#r=r,r===null?wi=t:r.#t=t,this.linked=!1}}};function b(e){var t=bs;bs=!0;try{var r;for(e&&(Ee!==null&&!Ee.is_fork&&Ee.flush(),r=e());;){if(Mb(),Ee===null)return r;Ee.flush()}}finally{bs=t}}function zb(){if(0){var e;for(const r of Ee.current.keys())for(const[n,i]of r.updated??[])var t}try{db()}catch(r){kn(r,bl)}}var Rr=null;function Rd(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&Es(n)&&(Rr=new Set,Ai(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&of(n),Rr?.size>0)){Hn.clear();for(const i of Rr){if((i.f&24576)!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)Rr.has(a)&&(Rr.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const l=s[o];(l.f&24576)===0&&Ai(l)}}Rr.clear()}}Rr=null}}function Ld(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&2)!==0?Ld(i,t,r,n):(s&4194320)!==0&&(s&2048)===0&&wl(i,t,n)&&(at(i,sr),kl(i))}}function wl(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(ba.call(t,i))return!0;if((i.f&2)!==0&&wl(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function kl(e){Ee.schedule(e)}function zd(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):(e.f&4096)!==0&&t.m.push(e),at(e,ir);for(var r=e.first;r!==null;)zd(r,t),r=r.next}}function qd(e){at(e,ir);for(var t=e.first;t!==null;)qd(t),t=t.next}function Sl(e){let t=0,r=Sn(0),n;return()=>{Dl()&&(d(r),Ti(()=>(t===0&&(n=Re(()=>e(()=>Lr(r)))),t+=1,()=>{ar(()=>{t-=1,t===0&&(n?.(),n=void 0,Lr(r))})})))}}var qb=cs|yi;function Ub(e,t,r,n){new Bb(e,t,r,n)}var Bb=class{parent;is_pending=!1;transform_error;#e;#t=ke?Ce:null;#r;#n;#i;#s=null;#o=null;#a=null;#l=null;#u=0;#c=0;#d=!1;#h=new Set;#p=new Set;#f=null;#m=Sl(()=>(this.#f=Sn(this.#u),()=>{this.#f=null}));constructor(e,t,r,n){this.#e=e,this.#r=t,this.#n=i=>{var s=Te;s.b=this,s.f|=128,r(i)},this.parent=Te.b,this.transform_error=n??this.parent?.transform_error??(i=>i),this.#i=Ss(()=>{if(ke){const i=this.#t;tn();const s=i.data==="[!";if(i.data.startsWith("[?")){const a=JSON.parse(i.data.slice(2));this.#y(a)}else s?this.#w():this.#v()}else this.#_()},qb),ke&&(this.#e=Ce)}#v(){try{this.#s=zt(()=>this.#n(this.#e))}catch(e){this.error(e)}}#y(e){const t=this.#r.failed;t&&(this.#a=zt(()=>{t(this.#e,()=>e,()=>()=>{})}))}#w(){const e=this.#r.pending;e&&(this.is_pending=!0,this.#o=zt(()=>e(this.#e)),ar(()=>{var t=this.#l=document.createDocumentFragment(),r=Lt();t.append(r),this.#s=this.#k(()=>zt(()=>this.#n(r))),this.#c===0&&(this.#e.before(t),this.#l=null,Gn(this.#o,()=>{this.#o=null}),this.#g(Ee))}))}#_(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#u=0,this.#s=zt(()=>{this.#n(this.#e)}),this.#c>0){var e=this.#l=document.createDocumentFragment();Ml(this.#s,e);const t=this.#r.pending;this.#o=zt(()=>t(this.#e))}else this.#g(Ee)}catch(t){this.error(t)}}#g(e){this.is_pending=!1,e.transfer_effects(this.#h,this.#p)}defer_effect(e){Fd(e,this.#h,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#k(e){var t=Te,r=Oe,n=Ze;lr(this.#i),qt(this.#i),_i(this.#i.ctx);try{return Si.ensure(),e()}catch(i){return Md(i),null}finally{lr(t),qt(r),_i(n)}}#b(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(e,t);return}this.#c+=e,this.#c===0&&(this.#g(t),this.#o&&Gn(this.#o,()=>{this.#o=null}),this.#l&&(this.#e.before(this.#l),this.#l=null))}update_pending_count(e,t){this.#b(e,t),this.#u+=e,!(!this.#f||this.#d)&&(this.#d=!0,ar(()=>{this.#d=!1,this.#f&&xi(this.#f,this.#u)}))}get_effect_pending(){return this.#m(),d(this.#f)}error(e){if(!this.#r.onerror&&!this.#r.failed)throw e;Ee?.is_fork?(this.#s&&Ee.skip_effect(this.#s),this.#o&&Ee.skip_effect(this.#o),this.#a&&Ee.skip_effect(this.#a),Ee.oncommit(()=>{this.#S(e)})):this.#S(e)}#S(e){this.#s&&(vt(this.#s),this.#s=null),this.#o&&(vt(this.#o),this.#o=null),this.#a&&(vt(this.#a),this.#a=null),ke&&(ht(this.#t),Ot(),ht(vs()));var t=this.#r.onerror;let r=this.#r.failed;var n=!1,i=!1;const s=()=>{if(n){Sb();return}n=!0,i&&yb(),this.#a!==null&&Gn(this.#a,()=>{this.#a=null}),this.#k(()=>{this.#_()})},a=o=>{try{i=!0,t?.(o,s),i=!1}catch(l){kn(l,this.#i&&this.#i.parent)}r&&(this.#a=this.#k(()=>{try{return zt(()=>{var l=Te;l.b=this,l.f|=128,r(this.#e,()=>o,()=>s)})}catch(l){return kn(l,this.#i.parent),null}}))};ar(()=>{var o;try{o=this.transform_error(e)}catch(l){kn(l,this.#i&&this.#i.parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(a,l=>kn(l,this.#i&&this.#i.parent)):a(o)})}};function Ud(e,t,r,n){const i=gs()?Ei:El;var s=e.filter(h=>!h.settled),a=t.map(i);if(r.length===0&&s.length===0){n(a);return}var o=Te,l=Vb(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function f(h){if((o.f&16384)===0){l();try{n([...a,...h])}catch(g){kn(g,o)}Oa()}}var u=Bd();if(r.length===0){c.then(()=>f([])).finally(u);return}function p(){Promise.all(r.map(h=>Zb(h))).then(f).catch(h=>kn(h,o)).finally(u)}c?c.then(()=>{l(),p(),Oa()}):p()}function Vb(){var e=Te,t=Oe,r=Ze,n=Ee;if(0)var i;return function(a=!0){lr(e),qt(t),_i(r),a&&(e.f&16384)===0&&(n?.activate(),n?.apply())}}function Oa(e=!0){lr(null),qt(null),_i(null),e&&Ee?.deactivate()}function Bd(){var e=Te,t=e.b,r=Ee,n=!!t?.is_rendered();return t?.update_pending_count(1,r),r.increment(n,e),()=>{t?.update_pending_count(-1,r),r.decrement(n,e)}}var jb=null;function tN(e){jb=e}var rN=new Set;function Ei(e){var t=2|sr;return Te!==null&&(Te.f|=yi),{ctx:Ze,deps:null,effects:null,equals:Cd,f:t,fn:e,reactions:null,rv:0,v:ut,wv:0,parent:Te,ac:null}}var Da=Symbol("obsolete");function Zb(e,t,r){let n=Te;n===null&&ob();var i=void 0,s=Sn(ut),a=!Oe,o=new Set;return i_(()=>{var l=Te,c=wd();i=c.promise;try{Promise.resolve(e()).then(c.resolve,h=>{h!==Ea&&c.reject(h)}).finally(Oa)}catch(h){c.reject(h),Oa()}var f=Ee;if(a){if((l.f&32768)!==0)var u=Bd();if(n.b?.is_rendered())f.async_deriveds.get(l)?.reject(Da);else for(const h of o.values())h.reject(Da);o.add(c),f.async_deriveds.set(l,c)}const p=(h,g=void 0)=>{u?.(),o.delete(c),g!==Da&&(f.activate(),g?(s.f|=Sa,xi(s,g)):((s.f&8388608)!==0&&(s.f^=Sa),xi(s,h)),f.deactivate())};c.promise.then(p,h=>p(null,h||"unknown"))}),Fa(()=>{for(const l of o)l.reject(Da)}),new Promise(l=>{function c(f){function u(){f===i?l(s):c(i)}f.then(u,u)}c(i)})}function D(e){const t=Ei(e);return Kt||df(t),t}function El(e){const t=Ei(e);return t.equals=Od,t}function Wb(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)vt(t[r])}}var nN=[];function xl(e){var t,r=Te,n=e.parent;if(!rn&&n!==null&&e.v!==ut&&(n.f&24576)!==0)return bb(),e.v;lr(n);try{e.f&=~fs,Wb(e),t=vf(e)}finally{lr(r)}return t}function Vd(e){var t=xl(e);if(!e.equals(t)&&(e.wv=pf(),(!Ee?.is_fork||e.deps===null)&&(Ee!==null?(Ee.capture(e,t,!0),ys?.capture(e,t,!0)):e.v=t,e.deps===null))){at(e,ir);return}rn||(Dt!==null?(Dl()||Ee?.is_fork)&&Dt.set(e,t):yl(e))}function Hb(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(Ea),t.fn!==null&&(t.teardown=qe),t.ac=null,xs(t,0),Pl(t))}function jd(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Ai(t)}var _s=new Set,Hn=new Map;function iN(e){_s=e}var Tl=!1;function Gb(){Tl=!0}function Sn(e,t){var r={f:0,v:e,reactions:null,equals:Cd,rv:0,wv:0};return r}function ae(e,t){const r=Sn(e,t);return df(r),r}function Zd(e,t=!1,r=!0){const n=Sn(e);return t||(n.equals=Od),bi&&r&&Ze!==null&&Ze.l!==null&&(Ze.l.s??=[]).push(n),n}function $(e,t,r=!1){Oe!==null&&(!_r||(Oe.f&131072)!==0)&&gs()&&(Oe.f&4325394)!==0&&(zr===null||!zr.has(e))&&gb();let n=r?Me(t):t;return xi(e,n,Ca)}function xi(e,t,r=null){if(!e.equals(t)){Hn.set(e,rn?t:e.v);var n=Si.ensure();if(n.capture(e,t),(e.f&2)!==0){const i=e;(e.f&2048)!==0&&xl(i),Dt===null&&yl(i)}e.wv=pf(),Hd(e,sr,r),gs()&&Te!==null&&(Te.f&1024)!==0&&(Te.f&96)===0&&(ur===null?o_([e]):ur.push(e)),!n.is_fork&&_s.size>0&&!Tl&&Wd()}return t}function Wd(){Tl=!1;for(const e of _s){(e.f&1024)!==0&&at(e,Zn);let t;try{t=Es(e)}catch{t=!0}t&&Ai(e)}_s.clear()}function Lr(e){$(e,e.v+1)}function Hd(e,t,r){var n=e.reactions;if(n!==null)for(var i=gs(),s=n.length,a=0;a<s;a++){var o=n[a],l=o.f;if(!(!i&&o===Te)){var c=(l&sr)===0;if(c&&at(o,t),(l&131072)!==0)_s.add(o);else if((l&2)!==0){var f=o;Dt?.delete(f),(l&65536)===0&&(l&512&&(Te===null||(Te.f&2097152)===0)&&(o.f|=fs),Hd(f,Zn,r))}else if(c){var u=o;(l&16)!==0&&Rr!==null&&Rr.add(u),r!==null?r.push(u):kl(u)}}}}var Kb=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Me(e){if(typeof e!="object"||e===null||Nr in e)return e;const t=ka(e);if(t!==bd&&t!==Qy)return e;var r=new Map,n=ya(e),i=ae(0),s=null,a=nn,o=u=>{if(nn===a)return u();var p=Oe,h=nn;qt(null),hf(a);var g=u();return qt(p),hf(h),g};n&&r.set("length",ae(e.length,s));var l="";let c=!1;function f(u){if(!c){c=!0,l=u,Dd(i,`${l} version`);for(const[p,h]of r)Dd(h,Yb(l,p));c=!1}}return new Proxy(e,{defineProperty(u,p,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&mb();var g=r.get(p);return g===void 0?o(()=>{var v=ae(h.value,s);return r.set(p,v),v}):$(g,h.value,!0),!0},deleteProperty(u,p){var h=r.get(p);if(h===void 0){if(p in u){const g=o(()=>ae(ut,s));r.set(p,g),Lr(i)}}else $(h,ut),Lr(i);return!0},get(u,p,h){if(p===Nr)return e;var g=r.get(p),v=p in u;if(g===void 0&&(!v||Fr(u,p)?.writable)&&(g=o(()=>{var y=ae(Me(v?u[p]:ut),s);return y}),r.set(p,g)),g!==void 0){var m=d(g);return m===ut?void 0:m}return Reflect.get(u,p,h)},getOwnPropertyDescriptor(u,p){var h=Reflect.getOwnPropertyDescriptor(u,p);if(h&&"value"in h){var g=r.get(p);g&&(h.value=d(g))}else if(h===void 0){var v=r.get(p),m=v?.v;if(v!==void 0&&m!==ut)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return h},has(u,p){if(p===Nr)return!0;var h=r.get(p),g=h!==void 0&&h.v!==ut||Reflect.has(u,p);return(h!==void 0||Te!==null&&(!g||Fr(u,p)?.writable))&&(h===void 0&&(h=o(()=>{var v=ae(g?Me(u[p]):ut,s);return v}),r.set(p,h)),d(h)===ut)?!1:g},set(u,p,h,g){var v=r.get(p),m=p in u;if(n&&p==="length")for(var y=h;y<v.v;y+=1){var S=r.get(y+"");S!==void 0?$(S,ut):y in u&&(S=o(()=>ae(ut,s)),r.set(y+"",S))}if(v===void 0)(!m||Fr(u,p)?.writable)&&(v=o(()=>ae(void 0,s)),$(v,Me(h)),r.set(p,v));else{m=v.v!==ut;var k=o(()=>Me(h));$(v,k)}var E=Reflect.getOwnPropertyDescriptor(u,p);if(E?.set&&E.set.call(g,h),!m){if(n&&typeof p=="string"){var T=r.get("length"),O=Number(p);Number.isInteger(O)&&O>=T.v&&$(T,O+1)}Lr(i)}return!0},ownKeys(u){d(i);var p=Reflect.ownKeys(u).filter(v=>{var m=r.get(v);return m===void 0||m.v!==ut});for(var[h,g]of r)g.v!==ut&&!(h in u)&&p.push(h);return p},setPrototypeOf(){vb()}})}function Yb(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:Kb.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function ws(e){try{if(e!==null&&typeof e=="object"&&Nr in e)return e[Nr]}catch{}return e}function Gd(e,t){return Object.is(ws(e),ws(t))}var Jb=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function sN(e){return new Proxy(e,{get(t,r,n){var i=Reflect.get(t,r,n);return Jb.has(r)?function(...s){Gb();var a=i.apply(this,s);return Wd(),a}:i}})}function aN(){const e=Array.prototype,t=Array.__svelte_cleanup;t&&t();const{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(s,a){const o=r.call(this,s,a);if(o===-1){for(let l=a??0;l<this.length;l+=1)if(ws(this[l])===s){hl("array.indexOf(...)");break}}return o},e.lastIndexOf=function(s,a){const o=n.call(this,s,a??this.length-1);if(o===-1){for(let l=0;l<=(a??this.length-1);l+=1)if(ws(this[l])===s){hl("array.lastIndexOf(...)");break}}return o},e.includes=function(s,a){const o=i.call(this,s,a);if(!o){for(let l=0;l<this.length;l+=1)if(ws(this[l])===s){hl("array.includes(...)");break}}return o},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var Kd,Qb,Al,Yd,Jd;function Cl(){if(Kd===void 0){Kd=window,Qb=document,Al=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Yd=Fr(t,"firstChild").get,Jd=Fr(t,"nextSibling").get,_d(e)&&(e[cl]=void 0,e[xd]=null,e[dl]=void 0,e.__e=void 0),_d(r)&&(r[fl]=void 0)}}function Lt(e=""){return document.createTextNode(e)}function Yt(e){return Yd.call(e)}function br(e){return Jd.call(e)}function M(e,t){if(!ke)return Yt(e);var r=Yt(Ce);if(r===null)r=Ce.appendChild(Lt());else if(t&&r.nodeType!==3){var n=Lt();return r?.before(n),ht(n),n}return t&&Pa(r),ht(r),r}function U(e,t=!1){if(!ke){var r=Yt(e);return r instanceof Comment&&r.data===""?br(r):r}if(t){if(Ce?.nodeType!==3){var n=Lt();return Ce?.before(n),ht(n),n}Pa(Ce)}return Ce}function V(e,t=1,r=!1){let n=ke?Ce:e;for(var i;t--;)i=n,n=br(n);if(!ke)return n;if(r){if(n?.nodeType!==3){var s=Lt();return n===null?i?.after(s):n.before(s),ht(s),s}Pa(n)}return ht(n),n}function Ol(e){e.textContent=""}function Qd(){return!Kt||Rr!==null?!1:(Te.f&ll)!==0}function Ia(e,t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function Xb(e=""){return document.createComment(e)}function Pa(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function e_(e,t){if(t){const r=document.body;e.autofocus=!0,ar(()=>{document.activeElement===r&&e.focus()})}}function t_(e){ke&&Yt(e)!==null&&Ol(e)}var Xd=!1;function ef(){Xd||(Xd=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[hs]?.()})},{capture:!0}))}function Ma(e){var t=Oe,r=Te;qt(null),lr(null);try{return e()}finally{qt(t),lr(r)}}function $a(e,t,r,n=r){e.addEventListener(t,()=>Ma(r));const i=e[hs];i?e[hs]=()=>{i(),n(!0)}:e[hs]=()=>n(!0),ef()}function tf(e){Te===null&&(Oe===null&&cb(e),ub()),rn&&lb(e)}function r_(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function or(e,t){var r=Te;r!==null&&(r.f&8192)!==0&&(e|=ol);var n={ctx:Ze,deps:null,nodes:null,f:e|sr|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};Ee?.register_created_effect(n);var i=n;if((e&4)!==0)ki!==null?ki.push(n):Si.ensure().schedule(n);else if(t!==null){try{Ai(n)}catch(a){throw vt(n),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&524288)===0&&(i=i.first,(e&16)!==0&&(e&65536)!==0&&i!==null&&(i.f|=cs))}if(i!==null&&(i.parent=r,r!==null&&r_(i,r),Oe!==null&&(Oe.f&2)!==0&&(e&64)===0)){var s=Oe;(s.effects??=[]).push(i)}return n}function Dl(){return Oe!==null&&!_r}function Fa(e){const t=or(8,null);return at(t,ir),t.teardown=e,t}function ve(e){tf("$effect");var t=Te.f;if(!Oe&&(t&32)!==0&&Ze!==null&&!Ze.i){var r=Ze;(r.e??=[]).push(e)}else return rf(e)}function rf(e){return or(4|Sd,e)}function Il(e){return tf("$effect.pre"),or(8|Sd,e)}function ks(e){Si.ensure();const t=or(64|yi,e);return()=>{vt(t)}}function n_(e){Si.ensure();const t=or(64|yi,e);return(r={})=>new Promise(n=>{r.outro?Gn(t,()=>{vt(t),n(void 0)}):(vt(t),n(void 0))})}function Na(e){return or(4,e)}function i_(e){return or(nb|yi,e)}function Ti(e,t=0){return or(8|t,e)}function J(e,t=[],r=[],n=[]){Ud(n,t,r,i=>{or(8,()=>{e(...i.map(d))})})}function Ss(e,t=0){var r=or(16|t,e);return r}function nf(e,t=0){var r=or(tb|t,e);return r}function zt(e){return or(32|yi,e)}function sf(e){var t=e.teardown;if(t!==null){const r=rn,n=Oe;cf(!0),qt(null);try{t.call(null)}finally{cf(r),qt(n)}}}function Pl(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Ma(()=>{i.abort(Ea)});var n=r.next;(r.f&64)!==0?r.parent=null:vt(r,t),r=n}}function s_(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&vt(t),t=r}}function vt(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(af(e.nodes.start,e.nodes.end),r=!0),e.f|=kd,Pl(e,t&&!r),xs(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();sf(e),e.f^=kd,e.f|=rb;var i=e.parent;i!==null&&i.first!==null&&of(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function af(e,t){for(;e!==null;){var r=e===t?null:br(e);e.remove(),e=r}}function of(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Gn(e,t,r=!0){var n=[];lf(e,n,!0);var i=()=>{r&&vt(e),t&&t()},s=n.length;if(s>0){var a=()=>--s||i();for(var o of n)o.out(a)}else i()}function lf(e,t,r){if((e.f&8192)===0){e.f^=ol;var n=e.nodes&&e.nodes.t;if(n!==null)for(const o of n)(o.is_global||r)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next;if((i.f&64)===0){var a=(i.f&65536)!==0||(i.f&32)!==0&&(e.f&16)!==0;lf(i,t,a?r:!1)}i=s}}}function Ra(e){uf(e,!0)}function uf(e,t){if((e.f&8192)!==0){e.f^=ol,(e.f&1024)===0&&(at(e,sr),Si.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;uf(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function Ml(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:br(r);t.append(r),r=i}}var a_=null,La=!1,rn=!1;function cf(e){rn=e}var Oe=null,_r=!1;function qt(e){Oe=e}var Te=null;function lr(e){Te=e}var zr=null;function df(e){Oe!==null&&(!Kt||(Oe.f&2)!==0)&&(zr??=new Set).add(e)}var Ut=null,Jt=0,ur=null;function o_(e){ur=e}var ff=1,Kn=0,nn=Kn;function hf(e){nn=e}function pf(){return++ff}function Es(e){var t=e.f;if((t&2048)!==0)return!0;if(t&2&&(e.f&=~fs),(t&4096)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(Es(s)&&Vd(s),s.wv>e.wv)return!0}(t&512)!==0&&Dt===null&&at(e,ir)}return!1}function mf(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!Kt&&zr!==null&&zr.has(e)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&2)!==0?mf(s,t,!1):t===s&&(r?at(s,sr):(s.f&1024)!==0&&at(s,Zn),kl(s))}}function vf(e){var t=Ut,r=Jt,n=ur,i=Oe,s=zr,a=Ze,o=_r,l=nn,c=e.f;Ut=null,Jt=0,ur=null,Oe=(c&96)===0?e:null,zr=null,_i(e.ctx),_r=!1,nn=++Kn,e.ac!==null&&(Ma(()=>{e.ac.abort(Ea)}),e.ac=null);try{e.f|=Ed;var f=e.fn,u=f();e.f|=ll;var p=e.deps,h=Ee?.is_fork;if(Ut!==null){var g;if(h||xs(e,Jt),p!==null&&Jt>0)for(p.length=Jt+Ut.length,g=0;g<Ut.length;g++)p[Jt+g]=Ut[g];else e.deps=p=Ut;if(Dl()&&(e.f&512)!==0)for(g=Jt;g<p.length;g++)(p[g].reactions??=[]).push(e)}else!h&&p!==null&&Jt<p.length&&(xs(e,Jt),p.length=Jt);if(gs()&&ur!==null&&!_r&&p!==null&&(e.f&6146)===0)for(g=0;g<ur.length;g++)mf(ur[g],e);if(i!==null&&i!==e){if(Kn++,i.deps!==null)for(let v=0;v<r;v+=1)i.deps[v].rv=Kn;if(t!==null)for(const v of t)v.rv=Kn;ur!==null&&(n===null?n=ur:n.push(...ur))}return(e.f&8388608)!==0&&(e.f^=Sa),u}catch(v){return Md(v)}finally{e.f^=Ed,Ut=t,Jt=r,ur=n,Oe=i,zr=s,_i(a),_r=o,nn=l}}function l_(e,t){let r=t.reactions;if(r!==null){var n=Jy.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(t.f&2)!==0&&(Ut===null||!ba.call(Ut,t))){var s=t;(s.f&512)!==0&&(s.f^=512,s.f&=~fs),s.v!==ut&&yl(s),Hb(s),xs(s,0)}}function xs(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)l_(e,r[n])}function Ai(e){var t=e.f;if((t&16384)===0){at(e,ir);var r=Te,n=La;if(Te=e,La=!0,0)var i,s;try{(t&16777232)!==0?s_(e):Pl(e),sf(e);var a=vf(e);if(e.teardown=typeof a=="function"?a:null,e.wv=ff,0)for(var o of e.deps);}finally{La=n,Te=r}}}async function gf(){if(Kt)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),b()}function d(e){var t=(e.f&2)!==0;if(a_?.add(e),Oe!==null&&!_r&&!(Te!==null&&(Te.f&16384)!==0)&&(zr===null||!zr.has(e))){var r=Oe.deps;if((Oe.f&2097152)!==0)e.rv<Kn&&(e.rv=Kn,Ut===null&&r!==null&&r[Jt]===e?Jt++:Ut===null?Ut=[e]:Ut.push(e));else{Oe.deps??=[],ba.call(Oe.deps,e)||Oe.deps.push(e);var n=e.reactions;n===null?e.reactions=[Oe]:ba.call(n,Oe)||n.push(Oe)}}if(0){if(!_r&&jb&&!jb.warned&&(jb.effect.f&2097152)===0&&!jb.effect_deps.has(e))var i;if(BF&&!_r&&WF!==null&&Oe!==null&&WF.reaction===Oe&&!e.trace){if(i)var s,a}}if(rn&&Hn.has(e))return Hn.get(e);if(t){var o=e;if(rn){var l=o.v;return((o.f&1024)===0&&o.reactions!==null||bf(o))&&(l=xl(o)),Hn.set(o,l),l}var c=(o.f&512)===0&&!_r&&Oe!==null&&(La||(Oe.f&512)!==0),f=(o.f&ll)===0;Es(o)&&(c&&(o.f|=512),Vd(o)),c&&!f&&(jd(o),yf(o))}if(Dt?.has(e))return Dt.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function yf(e){if(e.f|=512,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&2)!==0&&(t.f&512)===0&&(jd(t),yf(t))}function bf(e){if(e.v===ut)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Hn.has(t)||(t.f&2)!==0&&bf(t))return!0;return!1}function Re(e){var t=_r;try{return _r=!0,e()}finally{_r=t}}function u_(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Nr in e)$l(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Nr in r&&$l(r)}}}function $l(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{$l(e[n],t)}catch{}const r=ka(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=yd(r);for(let i in n){const s=n[i].get;if(s)try{s.call(e)}catch{}}}}}var Ts=Symbol("events"),_f=new Set,Fl=new Set;function Nl(e,t,r,n={}){function i(s){if(n.capture||Rl.call(t,s),!s.cancelBubble)return Ma(()=>r?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ar(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function gt(e,t,r,n={}){var i=Nl(t,e,r,n);return()=>{e.removeEventListener(t,i,n)}}function As(e,t,r,n,i){var s={capture:n,passive:i},a=Nl(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Fa(()=>{t.removeEventListener(e,a,s)})}function pt(e,t,r){(t[Ts]??={})[e]=r}function cr(e){for(var t=0;t<e.length;t++)_f.add(e[t]);for(var r of Fl)r(e)}var wf=null;function Rl(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;wf=e;var a=0,o=wf===e&&e[Ts];if(o){var l=i.indexOf(o);if(l!==-1&&(t===document||t===window)){e[Ts]=t;return}var c=i.indexOf(t);if(c===-1)return;l<=c&&(a=l)}if(s=i[a]||e.target,s!==t){wn(e,"currentTarget",{configurable:!0,get(){return s||r}});var f=Oe,u=Te;qt(null),lr(null);try{for(var p,h=[];s!==null&&s!==t;){try{var g=s[Ts]?.[n];g!=null&&(!s.disabled||e.target===s)&&g.call(s,e)}catch(v){p?h.push(v):p=v}if(e.cancelBubble)break;a++,s=a<i.length?i[a]:null}if(p){for(let v of h)queueMicrotask(()=>{throw v});throw p}}finally{e[Ts]=t,delete e.currentTarget,qt(f),lr(u)}}}var c_=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function kf(e){return c_?.createHTML(e)??e}function d_(e){var t=Ia("template");return t.innerHTML=kf(e.replaceAll("<!>","<!---->")),t.content}function wr(e,t){var r=Te;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function B(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,s=!e.startsWith("<!>");return()=>{if(ke)return wr(Ce,null),Ce;i===void 0&&(i=d_(s?e:"<!>"+e),r||(i=Yt(i)));var a=n||Al?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=Yt(a),l=a.lastChild;wr(o,l)}else wr(a,a);return a}}function Bt(e=""){if(!ke){var t=Lt(e+"");return wr(t,t),t}var r=Ce;return r.nodeType!==3?(r.before(r=Lt()),ht(r)):Pa(r),wr(r,r),r}function re(){if(ke)return wr(Ce,null),Ce;var e=document.createDocumentFragment(),t=document.createComment(""),r=Lt();return e.append(t,r),wr(t,r),e}function x(e,t){if(ke){var r=Te;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=Ce),tn();return}e!==null&&e.before(t)}function mt(){if(ke&&Ce&&Ce.nodeType===8&&Ce.textContent?.startsWith("$")){const e=Ce.textContent.substring(1);return tn(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}var f_=/\r/g;function h_(e){e=e.replace(f_,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}function p_(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}var m_=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function v_(e){return m_.includes(e)}var g_=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"],y_={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function b_(e){return e=e.toLowerCase(),y_[e]??e}var oN=[...g_,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"],__=["touchstart","touchmove"];function w_(e){return __.includes(e)}var k_=["$state","$state.raw","$derived","$derived.by"],lN=[...k_,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function S_(e){return e?.replace(/\//g,"/​")}var Sf=!0;function H(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[fl]??=e.nodeValue)&&(e[fl]=r,e.nodeValue=`${r}`)}function Ef(e,t){return xf(e,t)}function E_(e,t){Cl(),t.intro=t.intro??!1;const r=t.target,n=ke,i=Ce;try{for(var s=Yt(r);s&&(s.nodeType!==8||s.data!=="[");)s=br(s);if(!s)throw jn;kt(!0),ht(s);const a=xf(e,{...t,anchor:s});return kt(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
11
- `).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==jn&&console.warn("Failed to hydrate: ",a),t.recover===!1&&fb(),Cl(),Ol(r),kt(!1),Ef(e,t)}finally{kt(n),ht(i)}}var za=new Map;function xf(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:a=!0,transformError:o}){Cl();var l=void 0,c=n_(()=>{var f=r??t.appendChild(Lt());Ub(f,{pending:()=>{}},h=>{ne({});var g=Ze;if(s&&(g.c=s),i&&(n.$$events=i),ke&&wr(h,null),Sf=a,l=e(h,n)||{},Sf=!0,ke&&(Te.nodes.end=Ce,Ce===null||Ce.nodeType!==8||Ce.data!=="]"))throw ms(),jn;ie()},o);var u=new Set,p=h=>{for(var g=0;g<h.length;g++){var v=h[g];if(!u.has(v)){u.add(v);var m=w_(v);for(const k of[t,document]){var y=za.get(k);y===void 0&&(y=new Map,za.set(k,y));var S=y.get(v);S===void 0?(k.addEventListener(v,Rl,{passive:m}),y.set(v,1)):y.set(v,S+1)}}}};return p(_a(_f)),Fl.add(p),()=>{for(var h of u)for(const m of[t,document]){var g=za.get(m),v=g.get(h);--v==0?(m.removeEventListener(h,Rl),g.delete(h),g.size===0&&za.delete(m)):g.set(h,v)}Fl.delete(p),f!==r&&f.parentNode?.removeChild(f)}});return Ll.set(l,c),l}var Ll=new WeakMap;function x_(e,t){const r=Ll.get(e);return r?(Ll.delete(e),r(t)):Promise.resolve()}var zl=class{anchor;#e=new Map;#t=new Map;#r=new Map;#n=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#s=e=>{if(this.#e.has(e)){var t=this.#e.get(e),r=this.#t.get(t);if(r)Ra(r),this.#n.delete(t);else{var n=this.#r.get(t);n&&(Ra(n.effect),this.#t.set(t,n.effect),this.#r.delete(t),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),r=n.effect)}for(const[i,s]of this.#e){if(this.#e.delete(i),i===e)break;const a=this.#r.get(s);a&&(vt(a.effect),this.#r.delete(s))}for(const[i,s]of this.#t){if(i===t||this.#n.has(i))continue;const a=()=>{if(Array.from(this.#e.values()).includes(i)){var o=document.createDocumentFragment();Ml(s,o),o.append(Lt()),this.#r.set(i,{effect:s,fragment:o})}else vt(s);this.#n.delete(i),this.#t.delete(i)};this.#i||!r?(this.#n.add(i),Gn(s,a,!1)):a()}}};#o=e=>{this.#e.delete(e);const t=Array.from(this.#e.values());for(const[r,n]of this.#r)t.includes(r)||(vt(n.effect),this.#r.delete(r))};ensure(e,t){var r=Ee,n=Qd();if(t&&!this.#t.has(e)&&!this.#r.has(e))if(n){var i=document.createDocumentFragment(),s=Lt();i.append(s),this.#r.set(e,{effect:zt(()=>t(s)),fragment:i})}else this.#t.set(e,zt(()=>t(this.anchor)));if(this.#e.set(r,e),n){for(const[a,o]of this.#t)a===e?r.unskip_effect(o):r.skip_effect(o);for(const[a,o]of this.#r)a===e?r.unskip_effect(o.effect):r.skip_effect(o.effect);r.oncommit(this.#s),r.ondiscard(this.#o)}else ke&&(this.anchor=Ce),this.#s(r)}};function Se(e,t,...r){var n=new zl(e);Ss(()=>{const i=t()??null;n.ensure(i,i&&(s=>i(s,...r)))},cs)}if(0)var UN;function En(e){Ze===null&&Td("onMount"),bi&&Ze.l!==null?T_(Ze).m.push(e):ve(()=>{const t=Re(e);if(typeof t=="function")return t})}function T_(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function A_(){return Symbol(Yy)}function ue(e,t,r=!1){var n;ke&&(n=Ce,tn());var i=new zl(e),s=r?cs:0;function a(o,l){if(ke){var c=pl(n);if(o!==parseInt(c.substring(1))){var f=vs();ht(f),i.anchor=f,kt(!1),i.ensure(o,l),kt(!0);return}}i.ensure(o,l)}Ss(()=>{var o=!1;t((l,c=0)=>{o=!0,a(c,l)}),o||a(-1,null)},s)}function sn(e,t){return t}function C_(e,t,r){for(var n=[],i=t.length,s,a=t.length,o=0;o<i;o++){let u=t[o];Gn(u,()=>{if(s){if(s.pending.delete(u),s.done.add(u),s.pending.size===0){var p=e.outrogroups;ql(e,_a(s.done)),p.delete(s),p.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=n.length===0&&r!==null;if(l){var c=r,f=c.parentNode;Ol(f),f.append(c),e.items.clear()}ql(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function ql(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(const a of e.pending.values())for(const o of a)n.add(e.items.get(o).e)}for(var i=0;i<t.length;i++){var s=t[i];n?.has(s)?(s.f|=ds,Ml(s,document.createDocumentFragment())):vt(t[i],r)}}var Tf;function Ne(e,t,r,n,i,s=null){var a=e,o=new Map;if((t&4)!==0){var l=e;a=ke?ht(Yt(l)):l.appendChild(Lt())}ke&&tn();var c=null,f=El(()=>{var y=r();return ya(y)?y:y==null?[]:_a(y)}),u,p=new Map,h=!0;function g(y){(m.effect.f&16384)===0&&(m.pending.delete(y),m.fallback=c,O_(m,u,a,t,n),c!==null&&(u.length===0?(c.f&33554432)===0?Ra(c):(c.f^=ds,Os(c,null,a)):Gn(c,()=>{c=null})))}function v(y){m.pending.delete(y)}var m={effect:Ss(()=>{u=d(f);var y=u.length;let S=!1;ke&&pl(a)==="[!"!=(y===0)&&(a=vs(),ht(a),kt(!1),S=!0);for(var k=new Set,E=Ee,T=Qd(),O=0;O<y;O+=1){ke&&Ce.nodeType===8&&Ce.data==="]"&&(a=Ce,S=!0,kt(!1));var F=u[O],R=n(F,O);if(0)var Y;var N=h?null:o.get(R);N?(N.v&&xi(N.v,F),N.i&&xi(N.i,O),T&&E.unskip_effect(N.e)):(N=D_(o,h?a:Tf??=Lt(),F,R,O,i,t,r),h||(N.e.f|=ds),o.set(R,N)),k.add(R)}if(y===0&&s&&!c&&(h?c=zt(()=>s(a)):(c=zt(()=>s(Tf??=Lt())),c.f|=ds)),y>k.size&&Ad("","",""),ke&&y>0&&ht(vs()),!h)if(p.set(E,k),T){for(const[X,q]of o)k.has(X)||E.skip_effect(q.e);E.oncommit(g),E.ondiscard(v)}else g(E);S&&kt(!0),d(f)}),flags:t,items:o,pending:p,outrogroups:null,fallback:c};h=!1,ke&&(a=Ce)}function Cs(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function O_(e,t,r,n,i){var s=(n&8)!==0,a=t.length,o=e.items,l=Cs(e.effect.first),c,f=null,u,p=[],h=[],g,v,m,y;if(s)for(y=0;y<a;y+=1)g=t[y],v=i(g,y),m=o.get(v).e,(m.f&33554432)===0&&(m.nodes?.a?.measure(),(u??=new Set).add(m));for(y=0;y<a;y+=1){if(g=t[y],v=i(g,y),m=o.get(v).e,e.outrogroups!==null)for(const N of e.outrogroups)N.pending.delete(m),N.done.delete(m);if((m.f&8192)!==0&&(Ra(m),s&&(m.nodes?.a?.unfix(),(u??=new Set).delete(m))),(m.f&33554432)!==0)if(m.f^=ds,m===l)Os(m,null,r);else{var S=f?f.next:l;m===e.effect.last&&(e.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),xn(e,f,m),xn(e,m,S),Os(m,S,r),f=m,p=[],h=[],l=Cs(f.next);continue}if(m!==l){if(c!==void 0&&c.has(m)){if(p.length<h.length){var k=h[0],E;f=k.prev;var T=p[0],O=p[p.length-1];for(E=0;E<p.length;E+=1)Os(p[E],k,r);for(E=0;E<h.length;E+=1)c.delete(h[E]);xn(e,T.prev,O.next),xn(e,f,T),xn(e,O,k),l=k,f=O,y-=1,p=[],h=[]}else c.delete(m),Os(m,l,r),xn(e,m.prev,m.next),xn(e,m,f===null?e.effect.first:f.next),xn(e,f,m),f=m;continue}for(p=[],h=[];l!==null&&l!==m;)(c??=new Set).add(l),h.push(l),l=Cs(l.next);if(l===null)continue}(m.f&33554432)===0&&p.push(m),f=m,l=Cs(m.next)}if(e.outrogroups!==null){for(const N of e.outrogroups)N.pending.size===0&&(ql(e,_a(N.done)),e.outrogroups?.delete(N));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||c!==void 0){var F=[];if(c!==void 0)for(m of c)(m.f&8192)===0&&F.push(m);for(;l!==null;)(l.f&8192)===0&&l!==e.fallback&&F.push(l),l=Cs(l.next);var R=F.length;if(R>0){var Y=(n&4)!==0&&a===0?r:null;if(s){for(y=0;y<R;y+=1)F[y].nodes?.a?.measure();for(y=0;y<R;y+=1)F[y].nodes?.a?.fix()}C_(e,F,Y)}}s&&ar(()=>{if(u!==void 0)for(m of u)m.nodes?.a?.apply()})}function D_(e,t,r,n,i,s,a,o){var l=(a&1)!==0?(a&16)===0?Zd(r,!1,!1):Sn(r):null,c=(a&2)!==0?Sn(i):null;return{v:l,i:c,e:zt(()=>(s(t,l??r,c??i,o),()=>{e.delete(n)}))}}function Os(e,t,r){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end,s=t&&(t.f&33554432)===0?t.nodes.start:r;n!==null;){var a=br(n);if(s.before(n),n===i)return;n=a}}function xn(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function uN(e,t){const r=new Map,n=e.length;for(let i=0;i<n;i++){const s=t(e[i],i);if(r.has(s)){const a=String(r.get(s)),o=String(i);let l=String(s);l.startsWith("[object ")&&(l=null),Ad(a,o,l)}r.set(s,i)}}function cN(e,t,r){if(!t||t===h_(String(r??"")))return;let n;const i=e.__svelte_meta?.loc;i?n=`near ${i.file}:${i.line}:${i.column}`:vl?.[sl]&&(n=`in ${vl[sl]}`),wb(S_(n))}function Af(e,t,r=!1,n=!1,i=!1,s=!1){var a=e,o="";if(r){var l=e;ke&&(a=ht(Yt(l)))}J(()=>{var c=Te;if(o===(o=t()??"")){ke&&tn();return}if(r&&!ke){c.nodes=null,l.innerHTML=o,o!==""&&wr(Yt(l),l.lastChild);return}if(c.nodes!==null&&(af(c.nodes.start,c.nodes.end),c.nodes=null),o!==""){if(ke){for(var f=Ce.data,u=tn(),p=u;u!==null&&(u.nodeType!==8||u.data!=="");)p=u,u=br(u);if(u===null)throw ms(),jn;wr(Ce,p),a=ht(u);return}var h=Ia(n?"svg":i?"math":"template",n?Gy:i?Ky:void 0);h.innerHTML=o;var g=n||i?h:h.content;if(wr(Yt(g),g.lastChild),n||i)for(;Yt(g);)a.before(Yt(g));else a.before(g)}})}function I_(e,t,r,n,i){ke&&tn();var s=t.$$slots?.[r],a=!1;s===!0&&(s=t[r==="default"?"children":r],a=!0),s===void 0?i!==null&&i(e):s(e,a?()=>n:n)}function $e(e,t,r){var n;ke&&(n=Ce,tn());var i=new zl(e);Ss(()=>{var s=t()??null;if(ke&&pl(n)==="["!=(s!==null)){var a=vs();ht(a),i.anchor=a,kt(!1),i.ensure(s,s&&(o=>r(o,s))),kt(!0);return}i.ensure(s,s&&(o=>r(o,s)))},cs)}function P_(e,t){var r=void 0,n;nf(()=>{r!==(r=t())&&(n&&(vt(n),n=null),r&&(n=zt(()=>{Na(()=>r(e))})))})}function Cf(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Cf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function qa(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Cf(e))&&(n&&(n+=" "),n+=t);return n}function dr(e){return typeof e=="object"?qa(e):e??""}var Of=[...`
12
- \r\f \v\uFEFF`];function M_(e,t,r){var n=e==null?"":""+e;if(t&&(n=n?n+" "+t:t),r){for(var i of Object.keys(r))if(r[i])n=n?n+" "+i:i;else if(n.length)for(var s=i.length,a=0;(a=n.indexOf(i,a))>=0;){var o=a+s;(a===0||Of.includes(n[a-1]))&&(o===n.length||Of.includes(n[o]))?n=(a===0?"":n.substring(0,a))+n.substring(o+1):a=o}}return n===""?null:n}function Df(e,t=!1){var r=t?" !important;":";",n="";for(var i of Object.keys(e)){var s=e[i];s!=null&&s!==""&&(n+=" "+i+": "+s+r)}return n}function Ul(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function $_(e,t){if(t){var r="",n,i;if(Array.isArray(t)?(n=t[0],i=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,a=0,o=!1,l=[];n&&l.push(...Object.keys(n).map(Ul)),i&&l.push(...Object.keys(i).map(Ul));var c=0,f=-1;const v=e.length;for(var u=0;u<v;u++){var p=e[u];if(o?p==="/"&&e[u-1]==="*"&&(o=!1):s?s===p&&(s=!1):p==="/"&&e[u+1]==="*"?o=!0:p==='"'||p==="'"?s=p:p==="("?a++:p===")"&&a--,!o&&s===!1&&a===0){if(p===":"&&f===-1)f=u;else if(p===";"||u===v-1){if(f!==-1){var h=Ul(e.substring(c,f).trim());if(!l.includes(h)){p!==";"&&u++;var g=e.substring(c,u).trim();r+=" "+g+";"}}c=u+1,f=-1}}}}return n&&(r+=Df(n)),i&&(r+=Df(i,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function St(e,t,r,n,i,s){var a=e[cl];if(ke||a!==r||a===void 0){var o=M_(r,n,s);(!ke||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):t?e.className=o:e.setAttribute("class",o)),e[cl]=r}else if(s&&i!==s)for(var l in s){var c=!!s[l];(i==null||c!==!!i[l])&&e.classList.toggle(l,c)}return s}function Bl(e,t={},r,n){for(var i in r){var s=r[i];t[i]!==s&&(r[i]==null?e.style.removeProperty(i):e.style.setProperty(i,s,n))}}function F_(e,t,r,n){var i=e[dl];if(ke||i!==t){var s=$_(t,n);(!ke||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e[dl]=t}else n&&(Array.isArray(n)?(Bl(e,r?.[0],n[0]),Bl(e,r?.[1],n[1],"important")):Bl(e,r,n));return n}function Ua(e,t,r=!1){if(e.multiple){if(t==null)return;if(!ya(t))return kb();for(var n of e.options)n.selected=t.includes(Ds(n));return}for(n of e.options)if(Gd(Ds(n),t)){n.selected=!0;return}(!r||t!==void 0)&&(e.selectedIndex=-1)}function If(e){var t=new MutationObserver(()=>{Ua(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Fa(()=>{t.disconnect()})}function N_(e,t,r=t){var n=new WeakSet,i=!0;$a(e,"change",s=>{var a=s?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(a),Ds);else{var l=e.querySelector(a)??e.querySelector("option:not([disabled])");o=l&&Ds(l)}r(o),e.__value=o,Ee!==null&&n.add(Ee)}),Na(()=>{var s=t();if(e===document.activeElement){var a=Kt?ys:Ee;if(n.has(a))return}if(Ua(e,s,i),i&&s===void 0){var o=e.querySelector(":checked");o!==null&&(s=Ds(o),r(s))}e.__value=s,i=!1}),If(e)}function Ds(e){return"__value"in e?e.__value:e.value}var Is=Symbol("class"),Ps=Symbol("style"),Pf=Symbol("is custom element"),Mf=Symbol("is html"),R_=ps?"link":"LINK",$f=ps?"input":"INPUT",L_=ps?"option":"OPTION",z_=ps?"select":"SELECT",q_=ps?"progress":"PROGRESS";function Ms(e){if(ke){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;me(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;me(e,"checked",null),e.checked=i}}};e[hs]=r,ar(r),ef()}}function Vl(e,t){var r=Ba(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==q_)||(e.value=t??"")}function U_(e,t){var r=Ba(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function Ff(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function me(e,t,r,n){var i=Ba(e);if(ke&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===R_)){n||void 0;return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[ib]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Zl(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Tn(e,t,r){var n=Oe,i=Te;let s=ke;ke&&kt(!1),qt(null),lr(null);try{t!=="style"&&(jl.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Zl(e).includes(t):r&&typeof r=="object")?e[t]=r:me(e,t,r==null?r:String(r))}finally{qt(n),lr(i),s&&kt(!0)}}function B_(e,t,r,n,i=!1,s=!1){if(ke&&i&&e.nodeName===$f){var a=e;(a.type==="checkbox"?"defaultChecked":"defaultValue")in r||Ms(a)}var o=Ba(e),l=o[Pf],c=!o[Mf];let f=ke&&l;f&&kt(!1);var u=t||{},p=e.nodeName===L_;for(var h in t)h in r||(r[h]=null);r.class?r.class=dr(r.class):(n||r[Is])&&(r.class=null),r[Ps]&&(r.style??=null);var g=Zl(e);if(e.nodeName===$f&&"type"in r&&("value"in r||"__value"in r)){var v=r.type;(v!==u.type||v===void 0&&e.hasAttribute("type"))&&(u.type=v,me(e,"type",v,s))}for(const O in r){let F=r[O];if(p&&O==="value"&&F==null){e.value=e.__value="",u[O]=F;continue}if(O==="class"){St(e,e.namespaceURI==="http://www.w3.org/1999/xhtml",F,n,t?.[Is],r[Is]),u[O]=F,u[Is]=r[Is];continue}if(O==="style"){F_(e,F,t?.[Ps],r[Ps]),u[O]=F,u[Ps]=r[Ps];continue}var m=u[O];if(!(F===m&&!(F===void 0&&e.hasAttribute(O)))){u[O]=F;var y=O[0]+O[1];if(y!=="$$")if(y==="on"){const R={},Y="$$"+O;let N=O.slice(2);var S=v_(N);if(p_(N)&&(N=N.slice(0,-7),R.capture=!0),!S&&m){if(F!=null)continue;e.removeEventListener(N,u[Y],R),u[Y]=null}if(S)pt(N,e,F),cr([N]);else if(F!=null){let X=function(q){u[O].call(this,q)};var T=X;u[Y]=Nl(N,e,X,R)}}else if(O==="style")me(e,O,F);else if(O==="autofocus")e_(e,!!F);else if(!l&&(O==="__value"||O==="value"&&F!=null))e.value=e.__value=F;else if(O==="selected"&&p)Ff(e,F);else{var k=O;c||(k=b_(k));var E=k==="defaultValue"||k==="defaultChecked";if(F==null&&!l&&!E)if(o[O]=null,k==="value"||k==="checked"){let R=e;const Y=t===void 0;if(k==="value"){let N=R.defaultValue;R.removeAttribute(k),R.defaultValue=N,R.value=R.__value=Y?N:null}else{let N=R.defaultChecked;R.removeAttribute(k),R.defaultChecked=N,R.checked=Y?N:!1}}else e.removeAttribute(O);else E||g.includes(k)&&(l||typeof F!="string")?(e[k]=F,k in o&&(o[k]=ut)):typeof F!="function"&&me(e,k,F,s)}}}return f&&kt(!0),u}function Ue(e,t,r=[],n=[],i=[],s,a=!1,o=!1){Ud(i,r,n,l=>{var c=void 0,f={},u=e.nodeName===z_,p=!1;if(nf(()=>{var g=t(...l.map(d)),v=B_(e,c,g,s,a,o);p&&u&&"value"in g&&Ua(e,g.value);for(let y of Object.getOwnPropertySymbols(f))g[y]||vt(f[y]);for(let y of Object.getOwnPropertySymbols(g)){var m=g[y];y.description==="@attach"&&(!c||m!==c[y])&&(f[y]&&vt(f[y]),f[y]=zt(()=>P_(e,()=>m))),v[y]=m}c=v}),u){var h=e;Na(()=>{Ua(h,c.value,!0),If(h)})}p=!0})}function Ba(e){return e[xd]??={[Pf]:e.nodeName.includes("-"),[Mf]:e.namespaceURI===Hy}}var jl=new Map;function Zl(e){var t=e.getAttribute("is")||e.nodeName,r=jl.get(t);if(r)return r;jl.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=yd(i);for(var a in n)n[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.push(a);i=ka(i)}return r}function dN(e,t,r){}function Wl(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function Nf(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function V_(e,t){var r=Nf(e.srcset),n=Nf(t);return n.length===r.length&&n.every(([i,s],a)=>s===r[a][1]&&(Wl(r[a][0],i)||Wl(i,r[a][0])))}var Hl=null;function j_(){if(Hl===null){var e=Ia("select");e.innerHTML=kf("<option><span>t</span></option>"),Hl=e.firstChild?.firstChild?.nodeType===1}return Hl}function Z_(e,t){var r=ke;j_()||(kt(!1),e.textContent="",e.append(Xb("")));try{t()}finally{r&&(ke?I(e):(kt(!0),ht(e)))}}function Va(e,t,r=t){var n=new WeakSet;$a(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=Kl(e)?Yl(s):s,r(s),Ee!==null&&n.add(Ee),await gf(),s!==(s=t())){var a=e.selectionStart,o=e.selectionEnd,l=e.value.length;if(e.value=s??"",o!==null){var c=e.value.length;a===o&&o===l&&c>l?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=a,e.selectionEnd=Math.min(o,c))}}}),(ke&&e.defaultValue!==e.value||Re(t)==null&&e.value)&&(r(Kl(e)?Yl(e.value):e.value),Ee!==null&&n.add(Ee)),Ti(()=>{var i=t();if(e===document.activeElement){var s=Kt?ys:Ee;if(n.has(s))return}Kl(e)&&i===Yl(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}var Gl=new Set;function W_(e,t,r,n,i=n){var s=r.getAttribute("type")==="checkbox",a=e;let o=!1;if(t!==null)for(var l of t)a=a[l]??=[];a.push(r),$a(r,"change",()=>{var c=r.__value;s&&(c=Rf(a,c,r.checked)),i(c)},()=>i(s?[]:null)),Ti(()=>{var c=n();if(ke&&r.defaultChecked!==r.checked){o=!0;return}s?(c=c||[],r.checked=c.includes(r.__value)):r.checked=Gd(r.__value,c)}),Fa(()=>{var c=a.indexOf(r);c!==-1&&a.splice(c,1)}),Gl.has(a)||(Gl.add(a),ar(()=>{a.sort((c,f)=>c.compareDocumentPosition(f)===4?-1:1),Gl.delete(a)})),ar(()=>{if(o){var c;s?c=Rf(a,c,r.checked):c=a.find(f=>f.checked)?.__value,i(c)}})}function H_(e,t,r=t){$a(e,"change",n=>{r(n?e.defaultChecked:e.checked)}),(ke&&e.defaultChecked!==e.checked||Re(t)==null)&&r(e.checked),Ti(()=>{var n=t();e.checked=!!n})}function Rf(e,t,r){for(var n=new Set,i=0;i<e.length;i+=1)e[i].checked&&n.add(e[i].__value);return r||n.delete(t),Array.from(n)}function Kl(e){var t=e.type;return t==="number"||t==="range"}function Yl(e){return e===""?null:+e}function Jl(e,t){return e===t||e?.[Nr]===t}function Ql(e={},t,r,n){var i=Ze.r,s=Te;return Na(()=>{var a,o;return Ti(()=>{a=o,o=n?.()||[],Re(()=>{Jl(r(...o),e)||(t(e,...o),a&&Jl(r(...a),e)&&t(null,...a))})}),()=>{let l=s;for(;l!==i&&l.parent!==null&&l.parent.f&33554432;)l=l.parent;const c=()=>{o&&Jl(r(...o),e)&&t(null,...o)},f=l.teardown;l.teardown=()=>{c(),f?.()}}}),e}function Xl(e=!1){const t=Ze,r=t.l.u;if(!r)return;let n=()=>u_(t.s);if(e){let i=0,s={};const a=Ei(()=>{let o=!1;const l=t.s;for(const c in l)l[c]!==s[c]&&(s[c]=l[c],o=!0);return o&&i++,i});n=()=>d(a)}r.b.length&&Il(()=>{Lf(t,n),al(r.b)}),ve(()=>{const i=Re(()=>r.m.map(Xy));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&ve(()=>{Lf(t,n),al(r.a)})}function Lf(e,t){if(e.l.s)for(const r of e.l.s)d(r);t()}var G_={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.has(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function He(e,t,r){return new Proxy({props:e,exclude:t},G_)}var K_={get(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(us(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n)return n[t]}},set(e,t,r){let n=e.props.length;for(;n--;){let i=e.props[n];us(i)&&(i=i());const s=Fr(i,t);if(s&&s.set)return s.set(r),!0}return!1},getOwnPropertyDescriptor(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(us(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n){const i=Fr(n,t);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,t){if(t===Nr||t===ul)return!1;for(let r of e.props)if(us(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(us(r)&&(r=r()),!!r){for(const n in r)t.includes(n)||t.push(n);for(const n of Object.getOwnPropertySymbols(r))t.includes(n)||t.push(n)}return t}};function An(...e){return new Proxy({props:e},K_)}function _(e,t,r,n){var i=!bi||(r&2)!==0,s=(r&8)!==0,a=(r&16)!==0,o=n,l=!0,c=void 0,f=()=>a&&i?(c??=Ei(n),d(c)):(l&&(l=!1,o=a?Re(n):n),o);let u;if(s){var p=Nr in e||ul in e;u=Fr(e,t)?.set??(p&&t in e?E=>e[t]=E:void 0)}var h,g=!1;s?[h,g]=Rb(()=>e[t]):h=e[t],h===void 0&&n!==void 0&&(h=f(),u&&(i&&hb(t),u(h)));var v;if(i?v=()=>{var E=e[t];return E===void 0?f():(l=!0,E)}:v=()=>{var E=e[t];return E!==void 0&&(o=void 0),E===void 0?o:E},i&&(r&4)===0)return v;if(u){var m=e.$$legacy;return(function(E,T){return arguments.length>0?((!i||!T||m||g)&&u(T?v():E),E):v()})}var y=!1,S=((r&1)!==0?Ei:El)(()=>(y=!1,v()));s&&d(S);var k=Te;return(function(E,T){if(arguments.length>0){const O=T?d(S):i&&s?Me(E):E;return $(S,O),y=!0,o!==void 0&&(o=O),E}return rn&&y||(k.f&16384)!==0?S.v:d(S)})}function Y_(e){return new J_(e)}var J_=class{#e;#t;constructor(e){var t=new Map,r=(i,s)=>{var a=Zd(s,!1,!1);return t.set(i,a),a};const n=new Proxy({...e.props||{},$$events:{}},{get(i,s){return d(t.get(s)??r(s,Reflect.get(i,s)))},has(i,s){return s===ul?!0:(d(t.get(s)??r(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,a){return $(t.get(s)??r(s,a),a),Reflect.set(i,s,a)}});this.#t=(e.hydrate?E_:Ef)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!Kt&&(!e?.props?.$$host||e.sync===!1)&&b(),this.#e=n.$$events;for(const i of Object.keys(this.#t))i==="$set"||i==="$destroy"||i==="$on"||wn(this,i,{get(){return this.#t[i]},set(s){this.#t[i]=s},enumerable:!0});this.#t.$set=i=>{Object.assign(n,i)},this.#t.$destroy=()=>{x_(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];const r=(...n)=>t.call(this,...n);return this.#e[e].push(r),()=>{this.#e[e]=this.#e[e].filter(n=>n!==r)}}$destroy(){this.#t.$destroy()}},zf;typeof HTMLElement=="function"&&(zf=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return s=>{const a=Ia("slot");i!=="default"&&(a.name=i),x(s,a)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=Q_(this);for(const i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(const i of this.attributes){const s=this.$$g_p(i.name);s in this.$$d||(this.$$d[s]=ja(s,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=Y_({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=ks(()=>{Ti(()=>{this.$$r=!0;for(const i of wa(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const s=ja(i,this.$$d[i],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,s)}this.$$r=!1})});for(const i in this.$$l)for(const s of this.$$l[i]){const a=this.$$c.$on(i,s);this.$$l_u.set(s,a)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=ja(e,r,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return wa(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function ja(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Q_(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function se(e,t,r,n,i,s){let a=class extends zf{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return wa(t).map(o=>(t[o].attribute||o).toLowerCase())}};return wa(t).forEach(o=>{wn(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){l=ja(o,l,t),this.$$d[o]=l;var c=this.$$c;c&&(Fr(c,o)?.get?c[o]=l:c.$set({[o]:l}))}})}),n.forEach(o=>{wn(a.prototype,o,{get(){return this.$$c?.[o]}})}),s&&(a=s(a)),e.element=a,a}function X_(e){try{Intl.NumberFormat.supportedLocalesOf(e).length===0&&console.warn(`[go] Unknown locale "${e}" — the browser has no locale data for it; price and date formatting will fall back to the browser default.`)}catch{console.warn(`[go] Invalid locale "${e}" — not a valid BCP 47 language tag (use "de", "de-CH", "en", …). Price and date formatting will throw.`)}}var ew={"quantity.remove":"Remove item","quantity.remove.label":"✕","cart.item.remove":"✕"},tw={"quantity.remove":"Artikel entfernen","quantity.remove.label":"✕","cart.item.remove":"✕"},rw={en:ew,de:tw},qf={account:()=>"/#/user/account",annualTickets:()=>"/#/tickets/annual",checkoutFailure:e=>`/#/checkout/failure?payment_error=${e}`,checkoutSuccess:e=>`/#/checkout/success?ORDERID=${e}`,checkoutForm:()=>"/#/checkout",coupons:()=>"/#/coupons",combiTickets:()=>"/#/tickets/combi",combiTicketGroup:e=>"/#/tickets/combi?group="+e,dayTickets:()=>"/#/tickets/day",eventGroup:sw,event:e=>"/#/product/event/"+e,events:()=>"/#/products/events",exhibition:e=>"/#/exhibition/"+e,exhibitions:()=>"/#/exhibitions",home:()=>"/#/start",login:()=>"/#/login",merchandise:e=>"/#/merchandise/detail/"+e,merchandises:()=>"/#/merchandise/list",museum:e=>"/#/museum/"+e,museums:()=>"/#/museums",publicTours:()=>"/#/products/public-tours",register:()=>"/#/registration",tickets:()=>"/#/tickets/filters",ticketGroup:e=>"/#/tickets/filters?group="+e,tour:e=>"/#/product/tour/"+e,tours:()=>"/#/products/tours",toursGroup:aw,cart:()=>"/#/cart",annualTicketPersonalizationForm:(e,t)=>`/#/tickets/annual/personalisation/${e}/${t}`,annualTicketPersonalizationList:e=>`/#/tickets/annual/personalisation/${e}`,annualTicketPersonalizationFormSubmit:e=>`/#/tickets/annual/personalisation/${e}`},nw={...qf,checkoutSuccess:e=>`/checkout/success/?token=${e}`,checkoutFailure:e=>`/checkout/failure?error=${e}`};function iw(e){return e==="angular"?qf:nw}function sw(e){return`/#/products/events?category_id=${(A.settings?.multipleEventsMenuItems.event_groups[e]||[]).join("&category_id=")}`}function aw(e){return`/#/products/tours?category_id=${(A.settings?.multipleToursMenuItems.tour_groups[e]||[]).join("&category_id=")}`}function ow(e){return new Promise(t=>setTimeout(t,e))}function Uf(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function lw(e){return typeof e=="boolean"}function eu(e,t=1e3){return new Promise((r,n)=>{const i=Date.now(),s=20,a=()=>{try{const o=e();if(o){r(o);return}if(Date.now()-i>=t){n(new Error("Timeout reached without truthy value"));return}setTimeout(a,s)}catch(o){n(o)}};a()})}var tu=Array.isArray,Bf=e=>!!e&&e.constructor===Object,uw=e=>!!(e&&e.constructor&&e.call&&e.apply),cw=e=>typeof e=="string"||e instanceof String,dw=e=>{try{return Number(e)===e}catch{return!1}},fw=e=>!(!e||!e.then||!uw(e.then)),hw=(e,t)=>e.reduce((r,n)=>{const i=t(n);return r[i]||(r[i]=[]),r[i].push(n),r},{}),Vf=(e,t)=>!e||(e.length??0)===0?null:e.reduce(t);function qr(e,t){return(e||[]).reduce((r,n)=>r+(t?t(n):n),0)}var jf=(e,t,r=!1)=>{if(!e)return[];const n=(s,a)=>t(s)-t(a),i=(s,a)=>t(a)-t(s);return e.slice().sort(r===!0?i:n)};function pw(e,t){const r=t??(n=>n);return Vf(e,(n,i)=>r(n)>r(i)?n:i)}function ru(e,t){const r=t??(n=>n);return Vf(e,(n,i)=>r(n)<r(i)?n:i)}var mw=(e,t)=>{const r=e.reduce((n,i)=>{const s=t?t(i):i;return n[s]||(n[s]=i),n},{});return Object.values(r)},Zf=(e,t,r)=>{let n=r;for(let i=1;i<=e;i++)n=t(n,i);return n},vw=(e,t)=>e?!t||t.length===0?e:t.reduce((r,n)=>(delete r[n],r),{...e}):{},Vt=(e,t)=>!e||!t?e??t??{}:Object.entries({...e,...t}).reduce((r,[n,i])=>({...r,[n]:Bf(e[n])?Vt(e[n],i):i}),{}),Wf=class{#e=ae(Me({uid:"",client:"",accessToken:"",expiry:0}));constructor(){this.load(),typeof window<"u"&&window.addEventListener("storage",e=>{e.key==="go-auth"&&this.load()})}customerLevel(){if(this.isGuest())return 10;if(this.isLoggedIn())return 20}isAuthenticated(){return this.data.uid!==""}isLoggedIn(){return!!(this.data.uid&&Uf(this.data.uid))}isGuest(){return!!(this.data.uid&&!Uf(this.data.uid))}signOut(){d(this.#e).uid="",d(this.#e).client="",d(this.#e).accessToken="",d(this.#e).expiry=0,this.save()}signIn(e){d(this.#e).uid=e.uid,d(this.#e).client=e.client,d(this.#e).accessToken=e.accessToken,d(this.#e).expiry=e.expiry,this.save()}get data(){return d(this.#e).uid!==""&&d(this.#e).expiry<Math.floor(Date.now()/1e3)?{uid:"",client:"",accessToken:"",expiry:0}:d(this.#e)}toString(){return JSON.stringify(d(this.#e))}save(){typeof localStorage>"u"||localStorage.setItem("go-auth",this.toString())}load(){if(typeof localStorage>"u")return;const e=localStorage.getItem("go-auth");if(!e){this.signOut();return}const t=JSON.parse(e);if(!(Bf(t)&&"uid"in t&&"client"in t&&"accessToken"in t&&"expiry"in t))throw new Error(`(Auth.loadFromString) invalid auth json ${e}`);if(t.uid!==""&&t.expiry<Math.floor(Date.now()/1e3)){this.signOut();return}this.signIn(t)}},gw=class{auth;constructor(e){this.auth=e}onRequest({request:e}){const{uid:t,client:r,accessToken:n,expiry:i}=this.auth.data,s=e.headers;t&&!s.has("uid")&&s.set("uid",t),r&&!s.has("client")&&s.set("client",r),n&&!s.has("access-token")&&s.set("access-token",n),i&&!s.has("expiry")&&s.set("expiry",String(i)),n&&!s.has("token-type")&&s.set("token-type","Bearer")}onResponse({response:e}){const t=e.headers.get("access-token"),r=e.headers.get("client"),n=e.headers.get("uid"),i=parseInt(e.headers.get("expiry")||"");return t&&r&&n&&i&&this.auth.signIn({uid:n,client:r,accessToken:t,expiry:i}),e}},Hf;function K(e,t,r){function n(o,l){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),o._zod.traits.has(e))return;o._zod.traits.add(e),t(o,l);const c=a.prototype,f=Object.keys(c);for(let u=0;u<f.length;u++){const p=f[u];p in o||(o[p]=c[p].bind(o))}}const i=r?.Parent??Object;class s extends i{}Object.defineProperty(s,"name",{value:e});function a(o){var l;const c=r?.Parent?new s:this;n(c,o),(l=c._zod).deferred??(l.deferred=[]);for(const f of c._zod.deferred)f();return c}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:o=>r?.Parent&&o instanceof r.Parent?!0:o?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Ci=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Gf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Hf=globalThis).__zod_globalConfig??(Hf.__zod_globalConfig={});var Za=globalThis.__zod_globalConfig;function Yn(e){return e&&Object.assign(Za,e),Za}function Kf(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,n])=>t.indexOf(+r)===-1).map(([r,n])=>n)}function nu(e,t){return typeof t=="bigint"?t.toString():t}function iu(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}function su(e){return e==null}function au(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function yw(e,t){const r=e/t,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<i?0:r-n}var Yf=Symbol("evaluating");function We(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Yf)return n===void 0&&(n=Yf,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Jn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Cn(...e){const t={};for(const r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function Jf(e){return JSON.stringify(e)}function bw(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Qf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Wa(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var _w=iu(()=>{if(Za.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function $s(e){if(Wa(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Wa(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Xf(e){return $s(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var ww=new Set(["string","number","symbol"]);function Ha(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function On(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function ye(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function kw(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Sw={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Ew(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return On(e,Cn(e._zod.def,{get shape(){const i={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(i[s]=r.shape[s])}return Jn(this,"shape",i),i},checks:[]}))}function xw(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");return On(e,Cn(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete i[s]}return Jn(this,"shape",i),i},checks:[]}))}function Tw(e,t){if(!$s(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const n=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(n,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return On(e,Cn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Jn(this,"shape",n),n}}))}function Aw(e,t){if(!$s(t))throw new Error("Invalid input to safeExtend: expected a plain object");return On(e,Cn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Jn(this,"shape",r),r}}))}function Cw(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");return On(e,Cn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Jn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Ow(e,t,r){const n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");return On(t,Cn(t._zod.def,{get shape(){const i=t._zod.def.shape,s={...i};if(r)for(const a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(s[a]=e?new e({type:"optional",innerType:i[a]}):i[a])}else for(const a in i)s[a]=e?new e({type:"optional",innerType:i[a]}):i[a];return Jn(this,"shape",s),s},checks:[]}))}function Dw(e,t,r){return On(t,Cn(t._zod.def,{get shape(){const n=t._zod.def.shape,i={...n};if(r)for(const s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(const s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Jn(this,"shape",i),i}}))}function Oi(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Iw(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function eh(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Ga(e){return typeof e=="string"?e:e?.message}function Qn(e,t,r){const n=e.message?e.message:Ga(e.inst?._zod.def?.error?.(e))??Ga(t?.error?.(e))??Ga(r.customError?.(e))??Ga(r.localeError?.(e))??"Invalid input",{inst:i,continue:s,input:a,...o}=e;return o.path??(o.path=[]),o.message=n,t?.reportInput&&(o.input=a),o}function ou(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Fs(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}var th=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,nu,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},rh=K("$ZodError",th),nh=K("$ZodError",th,{Parent:Error});function Pw(e,t=r=>r.message){const r={},n=[];for(const i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}function Mw(e,t=r=>r.message){const r={_errors:[]},n=(i,s=[])=>{for(const a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(o=>n({issues:o},[...s,...a.path]));else if(a.code==="invalid_key")n({issues:a.issues},[...s,...a.path]);else if(a.code==="invalid_element")n({issues:a.issues},[...s,...a.path]);else{const o=[...s,...a.path];if(o.length===0)r._errors.push(t(a));else{let l=r,c=0;for(;c<o.length;){const f=o[c];c!==o.length-1?l[f]=l[f]||{_errors:[]}:(l[f]=l[f]||{_errors:[]},l[f]._errors.push(t(a))),l=l[f],c++}}}};return n(e),r}var lu=e=>(t,r,n,i)=>{const s=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},s);if(a instanceof Promise)throw new Ci;if(a.issues.length){const o=new(i?.Err??e)(a.issues.map(l=>Qn(l,s,Yn())));throw Qf(o,i?.callee),o}return a.value},uu=e=>async(t,r,n,i)=>{const s=n?{...n,async:!0}:{async:!0};let a=t._zod.run({value:r,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const o=new(i?.Err??e)(a.issues.map(l=>Qn(l,s,Yn())));throw Qf(o,i?.callee),o}return a.value},Ka=e=>(t,r,n)=>{const i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Ci;return s.issues.length?{success:!1,error:new(e??rh)(s.issues.map(a=>Qn(a,i,Yn())))}:{success:!0,data:s.value}},$w=Ka(nh),Ya=e=>async(t,r,n)=>{const i=n?{...n,async:!0}:{async:!0};let s=t._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(a=>Qn(a,i,Yn())))}:{success:!0,data:s.value}},Fw=Ya(nh),Nw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return lu(e)(t,r,i)},Rw=e=>(t,r,n)=>lu(e)(t,r,n),Lw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return uu(e)(t,r,i)},zw=e=>async(t,r,n)=>uu(e)(t,r,n),qw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Ka(e)(t,r,i)},Uw=e=>(t,r,n)=>Ka(e)(t,r,n),Bw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Ya(e)(t,r,i)},Vw=e=>async(t,r,n)=>Ya(e)(t,r,n),jw=/^[cC][0-9a-z]{6,}$/,Zw=/^[0-9a-z]+$/,Ww=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Hw=/^[0-9a-vA-V]{20}$/,Gw=/^[A-Za-z0-9]{27}$/,Kw=/^[a-zA-Z0-9_-]{21}$/,Yw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Jw=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ih=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Qw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Xw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function e0(){return new RegExp(Xw,"u")}var t0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,r0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,n0=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,i0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,s0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,sh=/^[A-Za-z0-9_-]*$/,a0=/^https?$/,o0=/^\+[1-9]\d{6,14}$/,ah="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",l0=new RegExp(`^${ah}$`);function oh(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function u0(e){return new RegExp(`^${oh(e)}$`)}function c0(e){const t=oh({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${ah}T(?:${n})$`)}var d0=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},f0=/^-?\d+$/,h0=/^-?\d+(?:\.\d+)?$/,p0=/^[^A-Z]*$/,m0=/^[^a-z]*$/,jt=K("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),lh={number:"number",bigint:"bigint",object:"date"},uh=K("$ZodCheckLessThan",(e,t)=>{jt.init(e,t);const r=lh[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,s=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ch=K("$ZodCheckGreaterThan",(e,t)=>{jt.init(e,t);const r=lh[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),v0=K("$ZodCheckMultipleOf",(e,t)=>{jt.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):yw(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),g0=K("$ZodCheckNumberFormat",(e,t)=>{jt.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[i,s]=Sw[t.format];e._zod.onattach.push(a=>{const o=a._zod.bag;o.format=t.format,o.minimum=i,o.maximum=s,r&&(o.pattern=f0)}),e._zod.check=a=>{const o=a.value;if(r){if(!Number.isInteger(o)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});return}if(!Number.isSafeInteger(o)){o>0?a.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}o<i&&a.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),o>s&&a.issues.push({origin:"number",input:o,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),y0=K("$ZodCheckMaxLength",(e,t)=>{var r;jt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!su(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;if(i.length<=t.maximum)return;const s=ou(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),b0=K("$ZodCheckMinLength",(e,t)=>{var r;jt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!su(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const s=ou(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),_0=K("$ZodCheckLengthEquals",(e,t)=>{var r;jt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!su(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=n=>{const i=n.value,s=i.length;if(s===t.length)return;const a=ou(i),o=s>t.length;n.issues.push({origin:a,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ja=K("$ZodCheckStringFormat",(e,t)=>{var r,n;jt.init(e,t),e._zod.onattach.push(i=>{const s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),w0=K("$ZodCheckRegex",(e,t)=>{Ja.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),k0=K("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=p0),Ja.init(e,t)}),S0=K("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=m0),Ja.init(e,t)}),E0=K("$ZodCheckIncludes",(e,t)=>{jt.init(e,t);const r=Ha(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),x0=K("$ZodCheckStartsWith",(e,t)=>{jt.init(e,t);const r=new RegExp(`^${Ha(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),T0=K("$ZodCheckEndsWith",(e,t)=>{jt.init(e,t);const r=new RegExp(`.*${Ha(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),A0=K("$ZodCheckOverwrite",(e,t)=>{jt.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),C0=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const t=e.split(`
10
+ `)}}}function KF(e){const t=Ab.get(e);t&&(wn(e,"message",{value:t.message}),wn(e,"stack",{value:t.stack}))}var Cb=~(sr|jn|ir);function at(e,t){e.f=e.f&Cb|t}function vl(e){(e.f&512)!==0||e.deps===null?at(e,ir):at(e,jn)}function Dd(e){if(e!==null)for(const t of e)(t.f&2)===0||(t.f&65536)===0||(t.f^=cs,Dd(t.deps))}function Id(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),Dd(e.deps),at(e,ir)}var Ob=!1,Sa=!1;function Db(e){var t=Sa;try{return Sa=!1,[e(),Sa]}finally{Sa=t}}var Ea=null,bi=null,Ee=null,vs=null,Dt=null,gl=null,gs=!1,yl=!1,_i=null,Ta=null,Pd=0,YF=new Set,Ib=1,wi=class od{id=Ib++;#e=!1;linked=!0;#t=null;#r=null;async_deriveds=new Map;current=new Map;previous=new Map;#n=new Set;#i=new Set;#s=0;#o=new Map;#a=null;#l=[];#u=[];#c=new Set;#d=new Set;#h=new Map;#p=new Set;is_fork=!1;#f=!1;constructor(){bi===null?Ea=bi=this:(bi.#r=this,this.#t=bi),bi=this}#m(){if(this.is_fork)return!0;for(const n of this.#o.keys()){for(var t=n,r=!1;t.parent!==null;){if(this.#h.has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1}skip_effect(t){this.#h.has(t)||this.#h.set(t,{d:[],m:[]}),this.#p.delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=this.#h.get(t);if(n){this.#h.delete(t);for(var i of n.d)at(i,sr),r(i);for(i of n.m)at(i,jn),r(i)}this.#p.add(t)}#v(){this.#e=!0,Pd++>1e3&&(this.#b(),Pb());for(const l of this.#c)this.#d.delete(l),at(l,sr),this.schedule(l);for(const l of this.#d)at(l,jn),this.schedule(l);const t=this.#l;this.#l=[],this.apply();var r=_i=[],n=[],i=Ta=[];for(const l of t)try{this.#y(l,r,n)}catch(c){throw Nd(l),this.#m()||this.discard(),c}if(Ee=null,i.length>0){var s=od.ensure();for(const l of i)s.schedule(l)}if(_i=null,Ta=null,this.#m()){this.#g(n),this.#g(r);for(const[l,c]of this.#h)Fd(l,c);i.length>0&&Ee.#v();return}const a=this.#w();if(a){this.#g(n),this.#g(r),a.#_(this);return}this.#c.clear(),this.#d.clear();for(const l of this.#n)l(this);this.#n.clear(),vs=this,Md(n),Md(r),vs=null,this.#a?.resolve();var o=Ee;if(this.#s===0&&(this.#l.length===0||o!==null)&&(this.#b(),Kt&&(this.#k(),Ee=o)),this.#l.length>0)if(o!==null){const l=o;l.#l.push(...this.#l.filter(c=>!l.#l.includes(c)))}else o=this;o!==null&&o.#v()}#y(t,r,n){t.f^=ir;for(var i=t.first;i!==null;){var s=i.f,a=(s&96)!==0;if(!(a&&(s&1024)!==0||(s&8192)!==0||this.#h.has(i))&&i.fn!==null){a?i.f^=ir:(s&4)!==0?r.push(i):Kt&&(s&16777224)!==0?n.push(i):ks(i)&&((s&16)!==0&&this.#d.add(i),Ti(i));var o=i.first;if(o!==null){i=o;continue}}for(;i!==null;){var l=i.next;if(l!==null){i=l;break}i=i.parent}}}#w(){for(var t=this.#t;t!==null;){if(!t.is_fork){for(const[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=t.#t}return null}#_(t){for(const[n,i]of t.current)!this.previous.has(n)&&t.previous.has(n)&&this.previous.set(n,t.previous.get(n)),this.current.set(n,i);for(const[n,i]of t.async_deriveds){const s=this.async_deriveds.get(n);s&&i.promise.then(s.resolve).catch(s.reject)}this.transfer_effects(t.#c,t.#d);const r=n=>{var i=n.reactions;if(i!==null)for(const o of i){var s=o.f;if((s&2)!==0)r(o);else{var a=o;s&4194320&&!this.async_deriveds.has(a)&&(this.#d.delete(a),at(a,sr),this.schedule(a))}}};for(const n of this.current.keys())r(n);this.oncommit(()=>t.discard()),t.#b(),Ee=this,this.#v()}#g(t){for(var r=0;r<t.length;r+=1)Id(t[r],this.#c,this.#d)}capture(t,r,n=!1){t.v!==ut&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&8388608)===0&&(this.current.set(t,[r,n]),Dt?.set(t,r)),this.is_fork||(t.v=r)}activate(){Ee=this}deactivate(){Ee=null,Dt=null}flush(){try{yl=!0,Ee=this,this.#v()}finally{Pd=0,gl=null,_i=null,Ta=null,yl=!1,Ee=null,Dt=null,Wn.clear()}}discard(){for(const t of this.#i)t(this);this.#i.clear(),this.#b(),this.#a?.resolve()}register_created_effect(t){this.#u.push(t)}#k(){for(let f=Ea;f!==null;f=f.#r){var t=f.id<this.id,r=[];for(const[u,[p,h]]of this.current){if(f.current.has(u)){var n=f.current.get(u)[0];if(t&&p!==n)f.current.set(u,[p,h]);else continue}r.push(u)}if(t)for(const[u,p]of this.async_deriveds){const h=f.async_deriveds.get(u);h&&p.promise.then(h.resolve).catch(h.reject)}if(f.#e){var i=[...f.current.keys()].filter(u=>!f.current.get(u)[1]&&!this.current.has(u));if(i.length===0)t&&f.discard();else if(r.length>0){if(t)for(const u of this.#p)f.unskip_effect(u,p=>{(p.f&4194320)!==0?f.schedule(p):f.#g([p])});f.activate();var s=new Set,a=new Map;for(var o of r)$d(o,i,s,a);a=new Map;var l=[...f.current].filter(([u,p])=>{const h=this.current.get(u);return h?h[0]!==p[0]||h[1]!==p[1]:!0}).map(([u])=>u);if(l.length>0)for(const u of this.#u)(u.f&155648)===0&&bl(u,l,a)&&((u.f&4194320)!==0?(at(u,sr),f.schedule(u)):f.#c.add(u));if(f.#l.length>0&&!f.#f){f.apply();for(var c of f.#l)f.#y(c,[],[]);f.#l=[]}f.deactivate()}}}}increment(t,r){if(this.#s+=1,t){let n=this.#o.get(r)??0;this.#o.set(r,n+1)}}decrement(t,r){if(this.#s-=1,t){let n=this.#o.get(r)??0;n===1?this.#o.delete(r):this.#o.set(r,n-1)}this.#f||(this.#f=!0,ar(()=>{this.#f=!1,this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)this.#c.add(n);for(const n of r)this.#d.add(n);t.clear(),r.clear()}oncommit(t){this.#n.add(t)}ondiscard(t){this.#i.add(t)}settled(){return(this.#a??=gd()).promise}static ensure(){if(Ee===null){const t=Ee=new od;!yl&&!gs&&ar(()=>{t.#e||t.flush()})}return Ee}apply(){if(!Kt||!this.is_fork&&this.#t===null&&this.#r===null){Dt=null;return}Dt=new Map;for(const[r,[n]]of this.current)Dt.set(r,n);for(let r=Ea;r!==null;r=r.#r)if(!(r===this||r.is_fork)){var t=!1;if(r.id<this.id){for(const[n,[,i]]of r.current)if(!i&&this.current.has(n)){t=!0;break}}if(!t)for(const[n,i]of r.previous)Dt.has(n)||Dt.set(n,i)}}schedule(t){if(gl=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(_i!==null&&r===xe&&(Kt||(Oe===null||(Oe.f&2)===0)&&!Ob))return;if((n&96)!==0){if((n&1024)===0)return;r.f^=ir}}this.#l.push(r)}#b(){if(this.linked){var t=this.#t,r=this.#r;t===null?Ea=r:t.#r=r,r===null?bi=t:r.#t=t,this.linked=!1}}};function b(e){var t=gs;gs=!0;try{var r;for(e&&(Ee!==null&&!Ee.is_fork&&Ee.flush(),r=e());;){if(xb(),Ee===null)return r;Ee.flush()}}finally{gs=t}}function Pb(){if(0){var e;for(const r of Ee.current.keys())for(const[n,i]of r.updated??[])var t}try{ib()}catch(r){kn(r,gl)}}var Rr=null;function Md(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&ks(n)&&(Rr=new Set,Ti(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&rf(n),Rr?.size>0)){Wn.clear();for(const i of Rr){if((i.f&24576)!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)Rr.has(a)&&(Rr.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const l=s[o];(l.f&24576)===0&&Ti(l)}}Rr.clear()}}Rr=null}}function $d(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&2)!==0?$d(i,t,r,n):(s&4194320)!==0&&(s&2048)===0&&bl(i,t,n)&&(at(i,sr),_l(i))}}function bl(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(va.call(t,i))return!0;if((i.f&2)!==0&&bl(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function _l(e){Ee.schedule(e)}function Fd(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):(e.f&4096)!==0&&t.m.push(e),at(e,ir);for(var r=e.first;r!==null;)Fd(r,t),r=r.next}}function Nd(e){at(e,ir);for(var t=e.first;t!==null;)Nd(t),t=t.next}function wl(e){let t=0,r=Sn(0),n;return()=>{Cl()&&(d(r),Ei(()=>(t===0&&(n=Re(()=>e(()=>Lr(r)))),t+=1,()=>{ar(()=>{t-=1,t===0&&(n?.(),n=void 0,Lr(r))})})))}}var Mb=ls|vi;function $b(e,t,r,n){new Fb(e,t,r,n)}var Fb=class{parent;is_pending=!1;transform_error;#e;#t=ke?Ce:null;#r;#n;#i;#s=null;#o=null;#a=null;#l=null;#u=0;#c=0;#d=!1;#h=new Set;#p=new Set;#f=null;#m=wl(()=>(this.#f=Sn(this.#u),()=>{this.#f=null}));constructor(e,t,r,n){this.#e=e,this.#r=t,this.#n=i=>{var s=xe;s.b=this,s.f|=128,r(i)},this.parent=xe.b,this.transform_error=n??this.parent?.transform_error??(i=>i),this.#i=ws(()=>{if(ke){const i=this.#t;tn();const s=i.data==="[!";if(i.data.startsWith("[?")){const a=JSON.parse(i.data.slice(2));this.#y(a)}else s?this.#w():this.#v()}else this.#_()},Mb),ke&&(this.#e=Ce)}#v(){try{this.#s=zt(()=>this.#n(this.#e))}catch(e){this.error(e)}}#y(e){const t=this.#r.failed;t&&(this.#a=zt(()=>{t(this.#e,()=>e,()=>()=>{})}))}#w(){const e=this.#r.pending;e&&(this.is_pending=!0,this.#o=zt(()=>e(this.#e)),ar(()=>{var t=this.#l=document.createDocumentFragment(),r=Lt();t.append(r),this.#s=this.#k(()=>zt(()=>this.#n(r))),this.#c===0&&(this.#e.before(t),this.#l=null,Hn(this.#o,()=>{this.#o=null}),this.#g(Ee))}))}#_(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#u=0,this.#s=zt(()=>{this.#n(this.#e)}),this.#c>0){var e=this.#l=document.createDocumentFragment();Il(this.#s,e);const t=this.#r.pending;this.#o=zt(()=>t(this.#e))}else this.#g(Ee)}catch(t){this.error(t)}}#g(e){this.is_pending=!1,e.transfer_effects(this.#h,this.#p)}defer_effect(e){Id(e,this.#h,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#k(e){var t=xe,r=Oe,n=Ze;lr(this.#i),qt(this.#i),yi(this.#i.ctx);try{return wi.ensure(),e()}catch(i){return Od(i),null}finally{lr(t),qt(r),yi(n)}}#b(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(e,t);return}this.#c+=e,this.#c===0&&(this.#g(t),this.#o&&Hn(this.#o,()=>{this.#o=null}),this.#l&&(this.#e.before(this.#l),this.#l=null))}update_pending_count(e,t){this.#b(e,t),this.#u+=e,!(!this.#f||this.#d)&&(this.#d=!0,ar(()=>{this.#d=!1,this.#f&&Si(this.#f,this.#u)}))}get_effect_pending(){return this.#m(),d(this.#f)}error(e){if(!this.#r.onerror&&!this.#r.failed)throw e;Ee?.is_fork?(this.#s&&Ee.skip_effect(this.#s),this.#o&&Ee.skip_effect(this.#o),this.#a&&Ee.skip_effect(this.#a),Ee.oncommit(()=>{this.#S(e)})):this.#S(e)}#S(e){this.#s&&(vt(this.#s),this.#s=null),this.#o&&(vt(this.#o),this.#o=null),this.#a&&(vt(this.#a),this.#a=null),ke&&(ht(this.#t),Ot(),ht(ps()));var t=this.#r.onerror;let r=this.#r.failed;var n=!1,i=!1;const s=()=>{if(n){vb();return}n=!0,i&&db(),this.#a!==null&&Hn(this.#a,()=>{this.#a=null}),this.#k(()=>{this.#_()})},a=o=>{try{i=!0,t?.(o,s),i=!1}catch(l){kn(l,this.#i&&this.#i.parent)}r&&(this.#a=this.#k(()=>{try{return zt(()=>{var l=xe;l.b=this,l.f|=128,r(this.#e,()=>o,()=>s)})}catch(l){return kn(l,this.#i.parent),null}}))};ar(()=>{var o;try{o=this.transform_error(e)}catch(l){kn(l,this.#i&&this.#i.parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(a,l=>kn(l,this.#i&&this.#i.parent)):a(o)})}};function Rd(e,t,r,n){const i=ms()?ki:kl;var s=e.filter(h=>!h.settled),a=t.map(i);if(r.length===0&&s.length===0){n(a);return}var o=xe,l=Nb(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function f(h){if((o.f&16384)===0){l();try{n([...a,...h])}catch(g){kn(g,o)}xa()}}var u=Ld();if(r.length===0){c.then(()=>f([])).finally(u);return}function p(){Promise.all(r.map(h=>Lb(h))).then(f).catch(h=>kn(h,o)).finally(u)}c?c.then(()=>{l(),p(),xa()}):p()}function Nb(){var e=xe,t=Oe,r=Ze,n=Ee;if(0)var i;return function(a=!0){lr(e),qt(t),yi(r),a&&(e.f&16384)===0&&(n?.activate(),n?.apply())}}function xa(e=!0){lr(null),qt(null),yi(null),e&&Ee?.deactivate()}function Ld(){var e=xe,t=e.b,r=Ee,n=!!t?.is_rendered();return t?.update_pending_count(1,r),r.increment(n,e),()=>{t?.update_pending_count(-1,r),r.decrement(n,e)}}var Rb=null;function JF(e){Rb=e}var QF=new Set;function ki(e){var t=2|sr;return xe!==null&&(xe.f|=vi),{ctx:Ze,deps:null,effects:null,equals:Ed,f:t,fn:e,reactions:null,rv:0,v:ut,wv:0,parent:xe,ac:null}}var Aa=Symbol("obsolete");function Lb(e,t,r){let n=xe;n===null&&eb();var i=void 0,s=Sn(ut),a=!Oe,o=new Set;return Jb(()=>{var l=xe,c=gd();i=c.promise;try{Promise.resolve(e()).then(c.resolve,h=>{h!==wa&&c.reject(h)}).finally(xa)}catch(h){c.reject(h),xa()}var f=Ee;if(a){if((l.f&32768)!==0)var u=Ld();if(n.b?.is_rendered())f.async_deriveds.get(l)?.reject(Aa);else for(const h of o.values())h.reject(Aa);o.add(c),f.async_deriveds.set(l,c)}const p=(h,g=void 0)=>{u?.(),o.delete(c),g!==Aa&&(f.activate(),g?(s.f|=_a,Si(s,g)):((s.f&8388608)!==0&&(s.f^=_a),Si(s,h)),f.deactivate())};c.promise.then(p,h=>p(null,h||"unknown"))}),Pa(()=>{for(const l of o)l.reject(Aa)}),new Promise(l=>{function c(f){function u(){f===i?l(s):c(i)}f.then(u,u)}c(i)})}function D(e){const t=ki(e);return Kt||of(t),t}function kl(e){const t=ki(e);return t.equals=Td,t}function zb(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)vt(t[r])}}var XF=[];function Sl(e){var t,r=xe,n=e.parent;if(!rn&&n!==null&&e.v!==ut&&(n.f&24576)!==0)return fb(),e.v;lr(n);try{e.f&=~cs,zb(e),t=ff(e)}finally{lr(r)}return t}function zd(e){var t=Sl(e);if(!e.equals(t)&&(e.wv=cf(),(!Ee?.is_fork||e.deps===null)&&(Ee!==null?(Ee.capture(e,t,!0),vs?.capture(e,t,!0)):e.v=t,e.deps===null))){at(e,ir);return}rn||(Dt!==null?(Cl()||Ee?.is_fork)&&Dt.set(e,t):vl(e))}function qb(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(wa),t.fn!==null&&(t.teardown=qe),t.ac=null,Ss(t,0),Dl(t))}function qd(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Ti(t)}var ys=new Set,Wn=new Map;function eN(e){ys=e}var El=!1;function Ub(){El=!0}function Sn(e,t){var r={f:0,v:e,reactions:null,equals:Ed,rv:0,wv:0};return r}function ae(e,t){const r=Sn(e,t);return of(r),r}function Ud(e,t=!1,r=!0){const n=Sn(e);return t||(n.equals=Td),gi&&r&&Ze!==null&&Ze.l!==null&&(Ze.l.s??=[]).push(n),n}function $(e,t,r=!1){Oe!==null&&(!wr||(Oe.f&131072)!==0)&&ms()&&(Oe.f&4325394)!==0&&(zr===null||!zr.has(e))&&cb();let n=r?Me(t):t;return Si(e,n,Ta)}function Si(e,t,r=null){if(!e.equals(t)){Wn.set(e,rn?t:e.v);var n=wi.ensure();if(n.capture(e,t),(e.f&2)!==0){const i=e;(e.f&2048)!==0&&Sl(i),Dt===null&&vl(i)}e.wv=cf(),Vd(e,sr,r),ms()&&xe!==null&&(xe.f&1024)!==0&&(xe.f&96)===0&&(ur===null?e_([e]):ur.push(e)),!n.is_fork&&ys.size>0&&!El&&Bd()}return t}function Bd(){El=!1;for(const e of ys){(e.f&1024)!==0&&at(e,jn);let t;try{t=ks(e)}catch{t=!0}t&&Ti(e)}ys.clear()}function Lr(e){$(e,e.v+1)}function Vd(e,t,r){var n=e.reactions;if(n!==null)for(var i=ms(),s=n.length,a=0;a<s;a++){var o=n[a],l=o.f;if(!(!i&&o===xe)){var c=(l&sr)===0;if(c&&at(o,t),(l&131072)!==0)ys.add(o);else if((l&2)!==0){var f=o;Dt?.delete(f),(l&65536)===0&&(l&512&&(xe===null||(xe.f&2097152)===0)&&(o.f|=cs),Vd(f,jn,r))}else if(c){var u=o;(l&16)!==0&&Rr!==null&&Rr.add(u),r!==null?r.push(u):_l(u)}}}}var Bb=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Me(e){if(typeof e!="object"||e===null||Nr in e)return e;const t=ba(e);if(t!==md&&t!==Zy)return e;var r=new Map,n=ma(e),i=ae(0),s=null,a=nn,o=u=>{if(nn===a)return u();var p=Oe,h=nn;qt(null),uf(a);var g=u();return qt(p),uf(h),g};n&&r.set("length",ae(e.length,s));var l="";let c=!1;function f(u){if(!c){c=!0,l=u,xd(i,`${l} version`);for(const[p,h]of r)xd(h,Vb(l,p));c=!1}}return new Proxy(e,{defineProperty(u,p,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&lb();var g=r.get(p);return g===void 0?o(()=>{var v=ae(h.value,s);return r.set(p,v),v}):$(g,h.value,!0),!0},deleteProperty(u,p){var h=r.get(p);if(h===void 0){if(p in u){const g=o(()=>ae(ut,s));r.set(p,g),Lr(i)}}else $(h,ut),Lr(i);return!0},get(u,p,h){if(p===Nr)return e;var g=r.get(p),v=p in u;if(g===void 0&&(!v||Fr(u,p)?.writable)&&(g=o(()=>{var y=ae(Me(v?u[p]:ut),s);return y}),r.set(p,g)),g!==void 0){var m=d(g);return m===ut?void 0:m}return Reflect.get(u,p,h)},getOwnPropertyDescriptor(u,p){var h=Reflect.getOwnPropertyDescriptor(u,p);if(h&&"value"in h){var g=r.get(p);g&&(h.value=d(g))}else if(h===void 0){var v=r.get(p),m=v?.v;if(v!==void 0&&m!==ut)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return h},has(u,p){if(p===Nr)return!0;var h=r.get(p),g=h!==void 0&&h.v!==ut||Reflect.has(u,p);return(h!==void 0||xe!==null&&(!g||Fr(u,p)?.writable))&&(h===void 0&&(h=o(()=>{var v=ae(g?Me(u[p]):ut,s);return v}),r.set(p,h)),d(h)===ut)?!1:g},set(u,p,h,g){var v=r.get(p),m=p in u;if(n&&p==="length")for(var y=h;y<v.v;y+=1){var S=r.get(y+"");S!==void 0?$(S,ut):y in u&&(S=o(()=>ae(ut,s)),r.set(y+"",S))}if(v===void 0)(!m||Fr(u,p)?.writable)&&(v=o(()=>ae(void 0,s)),$(v,Me(h)),r.set(p,v));else{m=v.v!==ut;var k=o(()=>Me(h));$(v,k)}var E=Reflect.getOwnPropertyDescriptor(u,p);if(E?.set&&E.set.call(g,h),!m){if(n&&typeof p=="string"){var A=r.get("length"),O=Number(p);Number.isInteger(O)&&O>=A.v&&$(A,O+1)}Lr(i)}return!0},ownKeys(u){d(i);var p=Reflect.ownKeys(u).filter(v=>{var m=r.get(v);return m===void 0||m.v!==ut});for(var[h,g]of r)g.v!==ut&&!(h in u)&&p.push(h);return p},setPrototypeOf(){ub()}})}function Vb(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:Bb.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function bs(e){try{if(e!==null&&typeof e=="object"&&Nr in e)return e[Nr]}catch{}return e}function jd(e,t){return Object.is(bs(e),bs(t))}var jb=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function tN(e){return new Proxy(e,{get(t,r,n){var i=Reflect.get(t,r,n);return jb.has(r)?function(...s){Ub();var a=i.apply(this,s);return Bd(),a}:i}})}function rN(){const e=Array.prototype,t=Array.__svelte_cleanup;t&&t();const{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(s,a){const o=r.call(this,s,a);if(o===-1){for(let l=a??0;l<this.length;l+=1)if(bs(this[l])===s){dl("array.indexOf(...)");break}}return o},e.lastIndexOf=function(s,a){const o=n.call(this,s,a??this.length-1);if(o===-1){for(let l=0;l<=(a??this.length-1);l+=1)if(bs(this[l])===s){dl("array.lastIndexOf(...)");break}}return o},e.includes=function(s,a){const o=i.call(this,s,a);if(!o){for(let l=0;l<this.length;l+=1)if(bs(this[l])===s){dl("array.includes(...)");break}}return o},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var Zd,Zb,Tl,Wd,Hd;function xl(){if(Zd===void 0){Zd=window,Zb=document,Tl=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Wd=Fr(t,"firstChild").get,Hd=Fr(t,"nextSibling").get,vd(e)&&(e[ll]=void 0,e[wd]=null,e[ul]=void 0,e.__e=void 0),vd(r)&&(r[cl]=void 0)}}function Lt(e=""){return document.createTextNode(e)}function Yt(e){return Wd.call(e)}function _r(e){return Hd.call(e)}function M(e,t){if(!ke)return Yt(e);var r=Yt(Ce);if(r===null)r=Ce.appendChild(Lt());else if(t&&r.nodeType!==3){var n=Lt();return r?.before(n),ht(n),n}return t&&Oa(r),ht(r),r}function U(e,t=!1){if(!ke){var r=Yt(e);return r instanceof Comment&&r.data===""?_r(r):r}if(t){if(Ce?.nodeType!==3){var n=Lt();return Ce?.before(n),ht(n),n}Oa(Ce)}return Ce}function V(e,t=1,r=!1){let n=ke?Ce:e;for(var i;t--;)i=n,n=_r(n);if(!ke)return n;if(r){if(n?.nodeType!==3){var s=Lt();return n===null?i?.after(s):n.before(s),ht(s),s}Oa(n)}return ht(n),n}function Al(e){e.textContent=""}function Gd(){return!Kt||Rr!==null?!1:(xe.f&al)!==0}function Ca(e,t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function Wb(e=""){return document.createComment(e)}function Oa(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Hb(e,t){if(t){const r=document.body;e.autofocus=!0,ar(()=>{document.activeElement===r&&e.focus()})}}function Gb(e){ke&&Yt(e)!==null&&Al(e)}var Kd=!1;function Yd(){Kd||(Kd=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[ds]?.()})},{capture:!0}))}function Da(e){var t=Oe,r=xe;qt(null),lr(null);try{return e()}finally{qt(t),lr(r)}}function Ia(e,t,r,n=r){e.addEventListener(t,()=>Da(r));const i=e[ds];i?e[ds]=()=>{i(),n(!0)}:e[ds]=()=>n(!0),Yd()}function Jd(e){xe===null&&(Oe===null&&nb(e),rb()),rn&&tb(e)}function Kb(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function or(e,t){var r=xe;r!==null&&(r.f&8192)!==0&&(e|=sl);var n={ctx:Ze,deps:null,nodes:null,f:e|sr|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};Ee?.register_created_effect(n);var i=n;if((e&4)!==0)_i!==null?_i.push(n):wi.ensure().schedule(n);else if(t!==null){try{Ti(n)}catch(a){throw vt(n),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&524288)===0&&(i=i.first,(e&16)!==0&&(e&65536)!==0&&i!==null&&(i.f|=ls))}if(i!==null&&(i.parent=r,r!==null&&Kb(i,r),Oe!==null&&(Oe.f&2)!==0&&(e&64)===0)){var s=Oe;(s.effects??=[]).push(i)}return n}function Cl(){return Oe!==null&&!wr}function Pa(e){const t=or(8,null);return at(t,ir),t.teardown=e,t}function ve(e){Jd("$effect");var t=xe.f;if(!Oe&&(t&32)!==0&&Ze!==null&&!Ze.i){var r=Ze;(r.e??=[]).push(e)}else return Qd(e)}function Qd(e){return or(4|bd,e)}function Ol(e){return Jd("$effect.pre"),or(8|bd,e)}function _s(e){wi.ensure();const t=or(64|vi,e);return()=>{vt(t)}}function Yb(e){wi.ensure();const t=or(64|vi,e);return(r={})=>new Promise(n=>{r.outro?Hn(t,()=>{vt(t),n(void 0)}):(vt(t),n(void 0))})}function Ma(e){return or(4,e)}function Jb(e){return or(Yy|vi,e)}function Ei(e,t=0){return or(8|t,e)}function J(e,t=[],r=[],n=[]){Rd(n,t,r,i=>{or(8,()=>{e(...i.map(d))})})}function ws(e,t=0){var r=or(16|t,e);return r}function Xd(e,t=0){var r=or(Gy|t,e);return r}function zt(e){return or(32|vi,e)}function ef(e){var t=e.teardown;if(t!==null){const r=rn,n=Oe;af(!0),qt(null);try{t.call(null)}finally{af(r),qt(n)}}}function Dl(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Da(()=>{i.abort(wa)});var n=r.next;(r.f&64)!==0?r.parent=null:vt(r,t),r=n}}function Qb(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&vt(t),t=r}}function vt(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(tf(e.nodes.start,e.nodes.end),r=!0),e.f|=yd,Dl(e,t&&!r),Ss(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();ef(e),e.f^=yd,e.f|=Ky;var i=e.parent;i!==null&&i.first!==null&&rf(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function tf(e,t){for(;e!==null;){var r=e===t?null:_r(e);e.remove(),e=r}}function rf(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Hn(e,t,r=!0){var n=[];nf(e,n,!0);var i=()=>{r&&vt(e),t&&t()},s=n.length;if(s>0){var a=()=>--s||i();for(var o of n)o.out(a)}else i()}function nf(e,t,r){if((e.f&8192)===0){e.f^=sl;var n=e.nodes&&e.nodes.t;if(n!==null)for(const o of n)(o.is_global||r)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next;if((i.f&64)===0){var a=(i.f&65536)!==0||(i.f&32)!==0&&(e.f&16)!==0;nf(i,t,a?r:!1)}i=s}}}function $a(e){sf(e,!0)}function sf(e,t){if((e.f&8192)!==0){e.f^=sl,(e.f&1024)===0&&(at(e,sr),wi.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;sf(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function Il(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:_r(r);t.append(r),r=i}}var Xb=null,Fa=!1,rn=!1;function af(e){rn=e}var Oe=null,wr=!1;function qt(e){Oe=e}var xe=null;function lr(e){xe=e}var zr=null;function of(e){Oe!==null&&(!Kt||(Oe.f&2)!==0)&&(zr??=new Set).add(e)}var Ut=null,Jt=0,ur=null;function e_(e){ur=e}var lf=1,Gn=0,nn=Gn;function uf(e){nn=e}function cf(){return++lf}function ks(e){var t=e.f;if((t&2048)!==0)return!0;if(t&2&&(e.f&=~cs),(t&4096)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(ks(s)&&zd(s),s.wv>e.wv)return!0}(t&512)!==0&&Dt===null&&at(e,ir)}return!1}function df(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!Kt&&zr!==null&&zr.has(e)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&2)!==0?df(s,t,!1):t===s&&(r?at(s,sr):(s.f&1024)!==0&&at(s,jn),_l(s))}}function ff(e){var t=Ut,r=Jt,n=ur,i=Oe,s=zr,a=Ze,o=wr,l=nn,c=e.f;Ut=null,Jt=0,ur=null,Oe=(c&96)===0?e:null,zr=null,yi(e.ctx),wr=!1,nn=++Gn,e.ac!==null&&(Da(()=>{e.ac.abort(wa)}),e.ac=null);try{e.f|=_d;var f=e.fn,u=f();e.f|=al;var p=e.deps,h=Ee?.is_fork;if(Ut!==null){var g;if(h||Ss(e,Jt),p!==null&&Jt>0)for(p.length=Jt+Ut.length,g=0;g<Ut.length;g++)p[Jt+g]=Ut[g];else e.deps=p=Ut;if(Cl()&&(e.f&512)!==0)for(g=Jt;g<p.length;g++)(p[g].reactions??=[]).push(e)}else!h&&p!==null&&Jt<p.length&&(Ss(e,Jt),p.length=Jt);if(ms()&&ur!==null&&!wr&&p!==null&&(e.f&6146)===0)for(g=0;g<ur.length;g++)df(ur[g],e);if(i!==null&&i!==e){if(Gn++,i.deps!==null)for(let v=0;v<r;v+=1)i.deps[v].rv=Gn;if(t!==null)for(const v of t)v.rv=Gn;ur!==null&&(n===null?n=ur:n.push(...ur))}return(e.f&8388608)!==0&&(e.f^=_a),u}catch(v){return Od(v)}finally{e.f^=_d,Ut=t,Jt=r,ur=n,Oe=i,zr=s,yi(a),wr=o,nn=l}}function t_(e,t){let r=t.reactions;if(r!==null){var n=jy.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(t.f&2)!==0&&(Ut===null||!va.call(Ut,t))){var s=t;(s.f&512)!==0&&(s.f^=512,s.f&=~cs),s.v!==ut&&vl(s),qb(s),Ss(s,0)}}function Ss(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)t_(e,r[n])}function Ti(e){var t=e.f;if((t&16384)===0){at(e,ir);var r=xe,n=Fa;if(xe=e,Fa=!0,0)var i,s;try{(t&16777232)!==0?Qb(e):Dl(e),ef(e);var a=ff(e);if(e.teardown=typeof a=="function"?a:null,e.wv=lf,0)for(var o of e.deps);}finally{Fa=n,xe=r}}}async function hf(){if(Kt)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),b()}function d(e){var t=(e.f&2)!==0;if(Xb?.add(e),Oe!==null&&!wr&&!(xe!==null&&(xe.f&16384)!==0)&&(zr===null||!zr.has(e))){var r=Oe.deps;if((Oe.f&2097152)!==0)e.rv<Gn&&(e.rv=Gn,Ut===null&&r!==null&&r[Jt]===e?Jt++:Ut===null?Ut=[e]:Ut.push(e));else{Oe.deps??=[],va.call(Oe.deps,e)||Oe.deps.push(e);var n=e.reactions;n===null?e.reactions=[Oe]:va.call(n,Oe)||n.push(Oe)}}if(0){if(!wr&&Rb&&!Rb.warned&&(Rb.effect.f&2097152)===0&&!Rb.effect_deps.has(e))var i;if(LF&&!wr&&BF!==null&&Oe!==null&&BF.reaction===Oe&&!e.trace){if(i)var s,a}}if(rn&&Wn.has(e))return Wn.get(e);if(t){var o=e;if(rn){var l=o.v;return((o.f&1024)===0&&o.reactions!==null||mf(o))&&(l=Sl(o)),Wn.set(o,l),l}var c=(o.f&512)===0&&!wr&&Oe!==null&&(Fa||(Oe.f&512)!==0),f=(o.f&al)===0;ks(o)&&(c&&(o.f|=512),zd(o)),c&&!f&&(qd(o),pf(o))}if(Dt?.has(e))return Dt.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function pf(e){if(e.f|=512,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&2)!==0&&(t.f&512)===0&&(qd(t),pf(t))}function mf(e){if(e.v===ut)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Wn.has(t)||(t.f&2)!==0&&mf(t))return!0;return!1}function Re(e){var t=wr;try{return wr=!0,e()}finally{wr=t}}function r_(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Nr in e)Pl(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Nr in r&&Pl(r)}}}function Pl(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Pl(e[n],t)}catch{}const r=ba(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=pd(r);for(let i in n){const s=n[i].get;if(s)try{s.call(e)}catch{}}}}}var Es=Symbol("events"),vf=new Set,Ml=new Set;function $l(e,t,r,n={}){function i(s){if(n.capture||Fl.call(t,s),!s.cancelBubble)return Da(()=>r?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ar(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function gt(e,t,r,n={}){var i=$l(t,e,r,n);return()=>{e.removeEventListener(t,i,n)}}function Ts(e,t,r,n,i){var s={capture:n,passive:i},a=$l(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Pa(()=>{t.removeEventListener(e,a,s)})}function pt(e,t,r){(t[Es]??={})[e]=r}function cr(e){for(var t=0;t<e.length;t++)vf.add(e[t]);for(var r of Ml)r(e)}var gf=null;function Fl(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;gf=e;var a=0,o=gf===e&&e[Es];if(o){var l=i.indexOf(o);if(l!==-1&&(t===document||t===window)){e[Es]=t;return}var c=i.indexOf(t);if(c===-1)return;l<=c&&(a=l)}if(s=i[a]||e.target,s!==t){wn(e,"currentTarget",{configurable:!0,get(){return s||r}});var f=Oe,u=xe;qt(null),lr(null);try{for(var p,h=[];s!==null&&s!==t;){try{var g=s[Es]?.[n];g!=null&&(!s.disabled||e.target===s)&&g.call(s,e)}catch(v){p?h.push(v):p=v}if(e.cancelBubble)break;a++,s=a<i.length?i[a]:null}if(p){for(let v of h)queueMicrotask(()=>{throw v});throw p}}finally{e[Es]=t,delete e.currentTarget,qt(f),lr(u)}}}var n_=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function yf(e){return n_?.createHTML(e)??e}function i_(e){var t=Ca("template");return t.innerHTML=yf(e.replaceAll("<!>","<!---->")),t.content}function kr(e,t){var r=xe;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function B(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,s=!e.startsWith("<!>");return()=>{if(ke)return kr(Ce,null),Ce;i===void 0&&(i=i_(s?e:"<!>"+e),r||(i=Yt(i)));var a=n||Tl?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=Yt(a),l=a.lastChild;kr(o,l)}else kr(a,a);return a}}function Bt(e=""){if(!ke){var t=Lt(e+"");return kr(t,t),t}var r=Ce;return r.nodeType!==3?(r.before(r=Lt()),ht(r)):Oa(r),kr(r,r),r}function re(){if(ke)return kr(Ce,null),Ce;var e=document.createDocumentFragment(),t=document.createComment(""),r=Lt();return e.append(t,r),kr(t,r),e}function T(e,t){if(ke){var r=xe;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=Ce),tn();return}e!==null&&e.before(t)}function mt(){if(ke&&Ce&&Ce.nodeType===8&&Ce.textContent?.startsWith("$")){const e=Ce.textContent.substring(1);return tn(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}var s_=/\r/g;function a_(e){e=e.replace(s_,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}function o_(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}var l_=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function u_(e){return l_.includes(e)}var c_=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"],d_={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function f_(e){return e=e.toLowerCase(),d_[e]??e}var nN=[...c_,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"],h_=["touchstart","touchmove"];function p_(e){return h_.includes(e)}var m_=["$state","$state.raw","$derived","$derived.by"],iN=[...m_,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function v_(e){return e?.replace(/\//g,"/​")}var bf=!0;function H(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[cl]??=e.nodeValue)&&(e[cl]=r,e.nodeValue=`${r}`)}function _f(e,t){return wf(e,t)}function g_(e,t){xl(),t.intro=t.intro??!1;const r=t.target,n=ke,i=Ce;try{for(var s=Yt(r);s&&(s.nodeType!==8||s.data!=="[");)s=_r(s);if(!s)throw Vn;kt(!0),ht(s);const a=wf(e,{...t,anchor:s});return kt(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
11
+ `).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==Vn&&console.warn("Failed to hydrate: ",a),t.recover===!1&&sb(),xl(),Al(r),kt(!1),_f(e,t)}finally{kt(n),ht(i)}}var Na=new Map;function wf(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:a=!0,transformError:o}){xl();var l=void 0,c=Yb(()=>{var f=r??t.appendChild(Lt());$b(f,{pending:()=>{}},h=>{ne({});var g=Ze;if(s&&(g.c=s),i&&(n.$$events=i),ke&&kr(h,null),bf=a,l=e(h,n)||{},bf=!0,ke&&(xe.nodes.end=Ce,Ce===null||Ce.nodeType!==8||Ce.data!=="]"))throw hs(),Vn;ie()},o);var u=new Set,p=h=>{for(var g=0;g<h.length;g++){var v=h[g];if(!u.has(v)){u.add(v);var m=p_(v);for(const k of[t,document]){var y=Na.get(k);y===void 0&&(y=new Map,Na.set(k,y));var S=y.get(v);S===void 0?(k.addEventListener(v,Fl,{passive:m}),y.set(v,1)):y.set(v,S+1)}}}};return p(ga(vf)),Ml.add(p),()=>{for(var h of u)for(const m of[t,document]){var g=Na.get(m),v=g.get(h);--v==0?(m.removeEventListener(h,Fl),g.delete(h),g.size===0&&Na.delete(m)):g.set(h,v)}Ml.delete(p),f!==r&&f.parentNode?.removeChild(f)}});return Nl.set(l,c),l}var Nl=new WeakMap;function y_(e,t){const r=Nl.get(e);return r?(Nl.delete(e),r(t)):Promise.resolve()}var Rl=class{anchor;#e=new Map;#t=new Map;#r=new Map;#n=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#s=e=>{if(this.#e.has(e)){var t=this.#e.get(e),r=this.#t.get(t);if(r)$a(r),this.#n.delete(t);else{var n=this.#r.get(t);n&&($a(n.effect),this.#t.set(t,n.effect),this.#r.delete(t),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),r=n.effect)}for(const[i,s]of this.#e){if(this.#e.delete(i),i===e)break;const a=this.#r.get(s);a&&(vt(a.effect),this.#r.delete(s))}for(const[i,s]of this.#t){if(i===t||this.#n.has(i))continue;const a=()=>{if(Array.from(this.#e.values()).includes(i)){var o=document.createDocumentFragment();Il(s,o),o.append(Lt()),this.#r.set(i,{effect:s,fragment:o})}else vt(s);this.#n.delete(i),this.#t.delete(i)};this.#i||!r?(this.#n.add(i),Hn(s,a,!1)):a()}}};#o=e=>{this.#e.delete(e);const t=Array.from(this.#e.values());for(const[r,n]of this.#r)t.includes(r)||(vt(n.effect),this.#r.delete(r))};ensure(e,t){var r=Ee,n=Gd();if(t&&!this.#t.has(e)&&!this.#r.has(e))if(n){var i=document.createDocumentFragment(),s=Lt();i.append(s),this.#r.set(e,{effect:zt(()=>t(s)),fragment:i})}else this.#t.set(e,zt(()=>t(this.anchor)));if(this.#e.set(r,e),n){for(const[a,o]of this.#t)a===e?r.unskip_effect(o):r.skip_effect(o);for(const[a,o]of this.#r)a===e?r.unskip_effect(o.effect):r.skip_effect(o.effect);r.oncommit(this.#s),r.ondiscard(this.#o)}else ke&&(this.anchor=Ce),this.#s(r)}};function Se(e,t,...r){var n=new Rl(e);ws(()=>{const i=t()??null;n.ensure(i,i&&(s=>i(s,...r)))},ls)}if(0)var RN;function En(e){Ze===null&&kd("onMount"),gi&&Ze.l!==null?b_(Ze).m.push(e):ve(()=>{const t=Re(e);if(typeof t=="function")return t})}function b_(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function __(){return Symbol(Vy)}function ue(e,t,r=!1){var n;ke&&(n=Ce,tn());var i=new Rl(e),s=r?ls:0;function a(o,l){if(ke){var c=fl(n);if(o!==parseInt(c.substring(1))){var f=ps();ht(f),i.anchor=f,kt(!1),i.ensure(o,l),kt(!0);return}}i.ensure(o,l)}ws(()=>{var o=!1;t((l,c=0)=>{o=!0,a(c,l)}),o||a(-1,null)},s)}function sn(e,t){return t}function w_(e,t,r){for(var n=[],i=t.length,s,a=t.length,o=0;o<i;o++){let u=t[o];Hn(u,()=>{if(s){if(s.pending.delete(u),s.done.add(u),s.pending.size===0){var p=e.outrogroups;Ll(e,ga(s.done)),p.delete(s),p.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=n.length===0&&r!==null;if(l){var c=r,f=c.parentNode;Al(f),f.append(c),e.items.clear()}Ll(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function Ll(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(const a of e.pending.values())for(const o of a)n.add(e.items.get(o).e)}for(var i=0;i<t.length;i++){var s=t[i];n?.has(s)?(s.f|=us,Il(s,document.createDocumentFragment())):vt(t[i],r)}}var kf;function Ne(e,t,r,n,i,s=null){var a=e,o=new Map;if((t&4)!==0){var l=e;a=ke?ht(Yt(l)):l.appendChild(Lt())}ke&&tn();var c=null,f=kl(()=>{var y=r();return ma(y)?y:y==null?[]:ga(y)}),u,p=new Map,h=!0;function g(y){(m.effect.f&16384)===0&&(m.pending.delete(y),m.fallback=c,k_(m,u,a,t,n),c!==null&&(u.length===0?(c.f&33554432)===0?$a(c):(c.f^=us,As(c,null,a)):Hn(c,()=>{c=null})))}function v(y){m.pending.delete(y)}var m={effect:ws(()=>{u=d(f);var y=u.length;let S=!1;ke&&fl(a)==="[!"!=(y===0)&&(a=ps(),ht(a),kt(!1),S=!0);for(var k=new Set,E=Ee,A=Gd(),O=0;O<y;O+=1){ke&&Ce.nodeType===8&&Ce.data==="]"&&(a=Ce,S=!0,kt(!1));var F=u[O],R=n(F,O);if(0)var Y;var N=h?null:o.get(R);N?(N.v&&Si(N.v,F),N.i&&Si(N.i,O),A&&E.unskip_effect(N.e)):(N=S_(o,h?a:kf??=Lt(),F,R,O,i,t,r),h||(N.e.f|=us),o.set(R,N)),k.add(R)}if(y===0&&s&&!c&&(h?c=zt(()=>s(a)):(c=zt(()=>s(kf??=Lt())),c.f|=us)),y>k.size&&Sd("","",""),ke&&y>0&&ht(ps()),!h)if(p.set(E,k),A){for(const[X,q]of o)k.has(X)||E.skip_effect(q.e);E.oncommit(g),E.ondiscard(v)}else g(E);S&&kt(!0),d(f)}),flags:t,items:o,pending:p,outrogroups:null,fallback:c};h=!1,ke&&(a=Ce)}function xs(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function k_(e,t,r,n,i){var s=(n&8)!==0,a=t.length,o=e.items,l=xs(e.effect.first),c,f=null,u,p=[],h=[],g,v,m,y;if(s)for(y=0;y<a;y+=1)g=t[y],v=i(g,y),m=o.get(v).e,(m.f&33554432)===0&&(m.nodes?.a?.measure(),(u??=new Set).add(m));for(y=0;y<a;y+=1){if(g=t[y],v=i(g,y),m=o.get(v).e,e.outrogroups!==null)for(const N of e.outrogroups)N.pending.delete(m),N.done.delete(m);if((m.f&8192)!==0&&($a(m),s&&(m.nodes?.a?.unfix(),(u??=new Set).delete(m))),(m.f&33554432)!==0)if(m.f^=us,m===l)As(m,null,r);else{var S=f?f.next:l;m===e.effect.last&&(e.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),Tn(e,f,m),Tn(e,m,S),As(m,S,r),f=m,p=[],h=[],l=xs(f.next);continue}if(m!==l){if(c!==void 0&&c.has(m)){if(p.length<h.length){var k=h[0],E;f=k.prev;var A=p[0],O=p[p.length-1];for(E=0;E<p.length;E+=1)As(p[E],k,r);for(E=0;E<h.length;E+=1)c.delete(h[E]);Tn(e,A.prev,O.next),Tn(e,f,A),Tn(e,O,k),l=k,f=O,y-=1,p=[],h=[]}else c.delete(m),As(m,l,r),Tn(e,m.prev,m.next),Tn(e,m,f===null?e.effect.first:f.next),Tn(e,f,m),f=m;continue}for(p=[],h=[];l!==null&&l!==m;)(c??=new Set).add(l),h.push(l),l=xs(l.next);if(l===null)continue}(m.f&33554432)===0&&p.push(m),f=m,l=xs(m.next)}if(e.outrogroups!==null){for(const N of e.outrogroups)N.pending.size===0&&(Ll(e,ga(N.done)),e.outrogroups?.delete(N));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||c!==void 0){var F=[];if(c!==void 0)for(m of c)(m.f&8192)===0&&F.push(m);for(;l!==null;)(l.f&8192)===0&&l!==e.fallback&&F.push(l),l=xs(l.next);var R=F.length;if(R>0){var Y=(n&4)!==0&&a===0?r:null;if(s){for(y=0;y<R;y+=1)F[y].nodes?.a?.measure();for(y=0;y<R;y+=1)F[y].nodes?.a?.fix()}w_(e,F,Y)}}s&&ar(()=>{if(u!==void 0)for(m of u)m.nodes?.a?.apply()})}function S_(e,t,r,n,i,s,a,o){var l=(a&1)!==0?(a&16)===0?Ud(r,!1,!1):Sn(r):null,c=(a&2)!==0?Sn(i):null;return{v:l,i:c,e:zt(()=>(s(t,l??r,c??i,o),()=>{e.delete(n)}))}}function As(e,t,r){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end,s=t&&(t.f&33554432)===0?t.nodes.start:r;n!==null;){var a=_r(n);if(s.before(n),n===i)return;n=a}}function Tn(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function sN(e,t){const r=new Map,n=e.length;for(let i=0;i<n;i++){const s=t(e[i],i);if(r.has(s)){const a=String(r.get(s)),o=String(i);let l=String(s);l.startsWith("[object ")&&(l=null),Sd(a,o,l)}r.set(s,i)}}function aN(e,t,r){if(!t||t===a_(String(r??"")))return;let n;const i=e.__svelte_meta?.loc;i?n=`near ${i.file}:${i.line}:${i.column}`:pl?.[nl]&&(n=`in ${pl[nl]}`),pb(v_(n))}function Sf(e,t,r=!1,n=!1,i=!1,s=!1){var a=e,o="";if(r){var l=e;ke&&(a=ht(Yt(l)))}J(()=>{var c=xe;if(o===(o=t()??"")){ke&&tn();return}if(r&&!ke){c.nodes=null,l.innerHTML=o,o!==""&&kr(Yt(l),l.lastChild);return}if(c.nodes!==null&&(tf(c.nodes.start,c.nodes.end),c.nodes=null),o!==""){if(ke){for(var f=Ce.data,u=tn(),p=u;u!==null&&(u.nodeType!==8||u.data!=="");)p=u,u=_r(u);if(u===null)throw hs(),Vn;kr(Ce,p),a=ht(u);return}var h=Ca(n?"svg":i?"math":"template",n?Uy:i?By:void 0);h.innerHTML=o;var g=n||i?h:h.content;if(kr(Yt(g),g.lastChild),n||i)for(;Yt(g);)a.before(Yt(g));else a.before(g)}})}function E_(e,t,r,n,i){ke&&tn();var s=t.$$slots?.[r],a=!1;s===!0&&(s=t[r==="default"?"children":r],a=!0),s===void 0?i!==null&&i(e):s(e,a?()=>n:n)}function $e(e,t,r){var n;ke&&(n=Ce,tn());var i=new Rl(e);ws(()=>{var s=t()??null;if(ke&&fl(n)==="["!=(s!==null)){var a=ps();ht(a),i.anchor=a,kt(!1),i.ensure(s,s&&(o=>r(o,s))),kt(!0);return}i.ensure(s,s&&(o=>r(o,s)))},ls)}function T_(e,t){var r=void 0,n;Xd(()=>{r!==(r=t())&&(n&&(vt(n),n=null),r&&(n=zt(()=>{Ma(()=>r(e))})))})}function Ef(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Ef(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ra(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Ef(e))&&(n&&(n+=" "),n+=t);return n}function dr(e){return typeof e=="object"?Ra(e):e??""}var Tf=[...`
12
+ \r\f \v\uFEFF`];function x_(e,t,r){var n=e==null?"":""+e;if(t&&(n=n?n+" "+t:t),r){for(var i of Object.keys(r))if(r[i])n=n?n+" "+i:i;else if(n.length)for(var s=i.length,a=0;(a=n.indexOf(i,a))>=0;){var o=a+s;(a===0||Tf.includes(n[a-1]))&&(o===n.length||Tf.includes(n[o]))?n=(a===0?"":n.substring(0,a))+n.substring(o+1):a=o}}return n===""?null:n}function xf(e,t=!1){var r=t?" !important;":";",n="";for(var i of Object.keys(e)){var s=e[i];s!=null&&s!==""&&(n+=" "+i+": "+s+r)}return n}function zl(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function A_(e,t){if(t){var r="",n,i;if(Array.isArray(t)?(n=t[0],i=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,a=0,o=!1,l=[];n&&l.push(...Object.keys(n).map(zl)),i&&l.push(...Object.keys(i).map(zl));var c=0,f=-1;const v=e.length;for(var u=0;u<v;u++){var p=e[u];if(o?p==="/"&&e[u-1]==="*"&&(o=!1):s?s===p&&(s=!1):p==="/"&&e[u+1]==="*"?o=!0:p==='"'||p==="'"?s=p:p==="("?a++:p===")"&&a--,!o&&s===!1&&a===0){if(p===":"&&f===-1)f=u;else if(p===";"||u===v-1){if(f!==-1){var h=zl(e.substring(c,f).trim());if(!l.includes(h)){p!==";"&&u++;var g=e.substring(c,u).trim();r+=" "+g+";"}}c=u+1,f=-1}}}}return n&&(r+=xf(n)),i&&(r+=xf(i,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function St(e,t,r,n,i,s){var a=e[ll];if(ke||a!==r||a===void 0){var o=x_(r,n,s);(!ke||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):t?e.className=o:e.setAttribute("class",o)),e[ll]=r}else if(s&&i!==s)for(var l in s){var c=!!s[l];(i==null||c!==!!i[l])&&e.classList.toggle(l,c)}return s}function ql(e,t={},r,n){for(var i in r){var s=r[i];t[i]!==s&&(r[i]==null?e.style.removeProperty(i):e.style.setProperty(i,s,n))}}function C_(e,t,r,n){var i=e[ul];if(ke||i!==t){var s=A_(t,n);(!ke||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e[ul]=t}else n&&(Array.isArray(n)?(ql(e,r?.[0],n[0]),ql(e,r?.[1],n[1],"important")):ql(e,r,n));return n}function La(e,t,r=!1){if(e.multiple){if(t==null)return;if(!ma(t))return mb();for(var n of e.options)n.selected=t.includes(Cs(n));return}for(n of e.options)if(jd(Cs(n),t)){n.selected=!0;return}(!r||t!==void 0)&&(e.selectedIndex=-1)}function Af(e){var t=new MutationObserver(()=>{La(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Pa(()=>{t.disconnect()})}function O_(e,t,r=t){var n=new WeakSet,i=!0;Ia(e,"change",s=>{var a=s?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(a),Cs);else{var l=e.querySelector(a)??e.querySelector("option:not([disabled])");o=l&&Cs(l)}r(o),e.__value=o,Ee!==null&&n.add(Ee)}),Ma(()=>{var s=t();if(e===document.activeElement){var a=Kt?vs:Ee;if(n.has(a))return}if(La(e,s,i),i&&s===void 0){var o=e.querySelector(":checked");o!==null&&(s=Cs(o),r(s))}e.__value=s,i=!1}),Af(e)}function Cs(e){return"__value"in e?e.__value:e.value}var Os=Symbol("class"),Ds=Symbol("style"),Cf=Symbol("is custom element"),Of=Symbol("is html"),D_=fs?"link":"LINK",Df=fs?"input":"INPUT",I_=fs?"option":"OPTION",P_=fs?"select":"SELECT",M_=fs?"progress":"PROGRESS";function Is(e){if(ke){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;me(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;me(e,"checked",null),e.checked=i}}};e[ds]=r,ar(r),Yd()}}function Ul(e,t){var r=za(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==M_)||(e.value=t??"")}function $_(e,t){var r=za(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function If(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function me(e,t,r,n){var i=za(e);if(ke&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===D_)){n||void 0;return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[Jy]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Vl(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function xn(e,t,r){var n=Oe,i=xe;let s=ke;ke&&kt(!1),qt(null),lr(null);try{t!=="style"&&(Bl.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Vl(e).includes(t):r&&typeof r=="object")?e[t]=r:me(e,t,r==null?r:String(r))}finally{qt(n),lr(i),s&&kt(!0)}}function F_(e,t,r,n,i=!1,s=!1){if(ke&&i&&e.nodeName===Df){var a=e;(a.type==="checkbox"?"defaultChecked":"defaultValue")in r||Is(a)}var o=za(e),l=o[Cf],c=!o[Of];let f=ke&&l;f&&kt(!1);var u=t||{},p=e.nodeName===I_;for(var h in t)h in r||(r[h]=null);r.class?r.class=dr(r.class):(n||r[Os])&&(r.class=null),r[Ds]&&(r.style??=null);var g=Vl(e);if(e.nodeName===Df&&"type"in r&&("value"in r||"__value"in r)){var v=r.type;(v!==u.type||v===void 0&&e.hasAttribute("type"))&&(u.type=v,me(e,"type",v,s))}for(const O in r){let F=r[O];if(p&&O==="value"&&F==null){e.value=e.__value="",u[O]=F;continue}if(O==="class"){St(e,e.namespaceURI==="http://www.w3.org/1999/xhtml",F,n,t?.[Os],r[Os]),u[O]=F,u[Os]=r[Os];continue}if(O==="style"){C_(e,F,t?.[Ds],r[Ds]),u[O]=F,u[Ds]=r[Ds];continue}var m=u[O];if(!(F===m&&!(F===void 0&&e.hasAttribute(O)))){u[O]=F;var y=O[0]+O[1];if(y!=="$$")if(y==="on"){const R={},Y="$$"+O;let N=O.slice(2);var S=u_(N);if(o_(N)&&(N=N.slice(0,-7),R.capture=!0),!S&&m){if(F!=null)continue;e.removeEventListener(N,u[Y],R),u[Y]=null}if(S)pt(N,e,F),cr([N]);else if(F!=null){let X=function(q){u[O].call(this,q)};var A=X;u[Y]=$l(N,e,X,R)}}else if(O==="style")me(e,O,F);else if(O==="autofocus")Hb(e,!!F);else if(!l&&(O==="__value"||O==="value"&&F!=null))e.value=e.__value=F;else if(O==="selected"&&p)If(e,F);else{var k=O;c||(k=f_(k));var E=k==="defaultValue"||k==="defaultChecked";if(F==null&&!l&&!E)if(o[O]=null,k==="value"||k==="checked"){let R=e;const Y=t===void 0;if(k==="value"){let N=R.defaultValue;R.removeAttribute(k),R.defaultValue=N,R.value=R.__value=Y?N:null}else{let N=R.defaultChecked;R.removeAttribute(k),R.defaultChecked=N,R.checked=Y?N:!1}}else e.removeAttribute(O);else E||g.includes(k)&&(l||typeof F!="string")?(e[k]=F,k in o&&(o[k]=ut)):typeof F!="function"&&me(e,k,F,s)}}}return f&&kt(!0),u}function Ue(e,t,r=[],n=[],i=[],s,a=!1,o=!1){Rd(i,r,n,l=>{var c=void 0,f={},u=e.nodeName===P_,p=!1;if(Xd(()=>{var g=t(...l.map(d)),v=F_(e,c,g,s,a,o);p&&u&&"value"in g&&La(e,g.value);for(let y of Object.getOwnPropertySymbols(f))g[y]||vt(f[y]);for(let y of Object.getOwnPropertySymbols(g)){var m=g[y];y.description==="@attach"&&(!c||m!==c[y])&&(f[y]&&vt(f[y]),f[y]=zt(()=>T_(e,()=>m))),v[y]=m}c=v}),u){var h=e;Ma(()=>{La(h,c.value,!0),Af(h)})}p=!0})}function za(e){return e[wd]??={[Cf]:e.nodeName.includes("-"),[Of]:e.namespaceURI===qy}}var Bl=new Map;function Vl(e){var t=e.getAttribute("is")||e.nodeName,r=Bl.get(t);if(r)return r;Bl.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=pd(i);for(var a in n)n[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.push(a);i=ba(i)}return r}function oN(e,t,r){}function jl(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function Pf(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function N_(e,t){var r=Pf(e.srcset),n=Pf(t);return n.length===r.length&&n.every(([i,s],a)=>s===r[a][1]&&(jl(r[a][0],i)||jl(i,r[a][0])))}var Zl=null;function R_(){if(Zl===null){var e=Ca("select");e.innerHTML=yf("<option><span>t</span></option>"),Zl=e.firstChild?.firstChild?.nodeType===1}return Zl}function L_(e,t){var r=ke;R_()||(kt(!1),e.textContent="",e.append(Wb("")));try{t()}finally{r&&(ke?I(e):(kt(!0),ht(e)))}}function qa(e,t,r=t){var n=new WeakSet;Ia(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=Hl(e)?Gl(s):s,r(s),Ee!==null&&n.add(Ee),await hf(),s!==(s=t())){var a=e.selectionStart,o=e.selectionEnd,l=e.value.length;if(e.value=s??"",o!==null){var c=e.value.length;a===o&&o===l&&c>l?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=a,e.selectionEnd=Math.min(o,c))}}}),(ke&&e.defaultValue!==e.value||Re(t)==null&&e.value)&&(r(Hl(e)?Gl(e.value):e.value),Ee!==null&&n.add(Ee)),Ei(()=>{var i=t();if(e===document.activeElement){var s=Kt?vs:Ee;if(n.has(s))return}Hl(e)&&i===Gl(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}var Wl=new Set;function z_(e,t,r,n,i=n){var s=r.getAttribute("type")==="checkbox",a=e;let o=!1;if(t!==null)for(var l of t)a=a[l]??=[];a.push(r),Ia(r,"change",()=>{var c=r.__value;s&&(c=Mf(a,c,r.checked)),i(c)},()=>i(s?[]:null)),Ei(()=>{var c=n();if(ke&&r.defaultChecked!==r.checked){o=!0;return}s?(c=c||[],r.checked=c.includes(r.__value)):r.checked=jd(r.__value,c)}),Pa(()=>{var c=a.indexOf(r);c!==-1&&a.splice(c,1)}),Wl.has(a)||(Wl.add(a),ar(()=>{a.sort((c,f)=>c.compareDocumentPosition(f)===4?-1:1),Wl.delete(a)})),ar(()=>{if(o){var c;s?c=Mf(a,c,r.checked):c=a.find(f=>f.checked)?.__value,i(c)}})}function q_(e,t,r=t){Ia(e,"change",n=>{r(n?e.defaultChecked:e.checked)}),(ke&&e.defaultChecked!==e.checked||Re(t)==null)&&r(e.checked),Ei(()=>{var n=t();e.checked=!!n})}function Mf(e,t,r){for(var n=new Set,i=0;i<e.length;i+=1)e[i].checked&&n.add(e[i].__value);return r||n.delete(t),Array.from(n)}function Hl(e){var t=e.type;return t==="number"||t==="range"}function Gl(e){return e===""?null:+e}function Kl(e,t){return e===t||e?.[Nr]===t}function Yl(e={},t,r,n){var i=Ze.r,s=xe;return Ma(()=>{var a,o;return Ei(()=>{a=o,o=n?.()||[],Re(()=>{Kl(r(...o),e)||(t(e,...o),a&&Kl(r(...a),e)&&t(null,...a))})}),()=>{let l=s;for(;l!==i&&l.parent!==null&&l.parent.f&33554432;)l=l.parent;const c=()=>{o&&Kl(r(...o),e)&&t(null,...o)},f=l.teardown;l.teardown=()=>{c(),f?.()}}}),e}function Jl(e=!1){const t=Ze,r=t.l.u;if(!r)return;let n=()=>r_(t.s);if(e){let i=0,s={};const a=ki(()=>{let o=!1;const l=t.s;for(const c in l)l[c]!==s[c]&&(s[c]=l[c],o=!0);return o&&i++,i});n=()=>d(a)}r.b.length&&Ol(()=>{$f(t,n),il(r.b)}),ve(()=>{const i=Re(()=>r.m.map(Wy));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&ve(()=>{$f(t,n),il(r.a)})}function $f(e,t){if(e.l.s)for(const r of e.l.s)d(r);t()}var U_={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.has(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function He(e,t,r){return new Proxy({props:e,exclude:t},U_)}var B_={get(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(os(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n)return n[t]}},set(e,t,r){let n=e.props.length;for(;n--;){let i=e.props[n];os(i)&&(i=i());const s=Fr(i,t);if(s&&s.set)return s.set(r),!0}return!1},getOwnPropertyDescriptor(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(os(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n){const i=Fr(n,t);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,t){if(t===Nr||t===ol)return!1;for(let r of e.props)if(os(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(os(r)&&(r=r()),!!r){for(const n in r)t.includes(n)||t.push(n);for(const n of Object.getOwnPropertySymbols(r))t.includes(n)||t.push(n)}return t}};function An(...e){return new Proxy({props:e},B_)}function _(e,t,r,n){var i=!gi||(r&2)!==0,s=(r&8)!==0,a=(r&16)!==0,o=n,l=!0,c=void 0,f=()=>a&&i?(c??=ki(n),d(c)):(l&&(l=!1,o=a?Re(n):n),o);let u;if(s){var p=Nr in e||ol in e;u=Fr(e,t)?.set??(p&&t in e?E=>e[t]=E:void 0)}var h,g=!1;s?[h,g]=Db(()=>e[t]):h=e[t],h===void 0&&n!==void 0&&(h=f(),u&&(i&&ab(t),u(h)));var v;if(i?v=()=>{var E=e[t];return E===void 0?f():(l=!0,E)}:v=()=>{var E=e[t];return E!==void 0&&(o=void 0),E===void 0?o:E},i&&(r&4)===0)return v;if(u){var m=e.$$legacy;return(function(E,A){return arguments.length>0?((!i||!A||m||g)&&u(A?v():E),E):v()})}var y=!1,S=((r&1)!==0?ki:kl)(()=>(y=!1,v()));s&&d(S);var k=xe;return(function(E,A){if(arguments.length>0){const O=A?d(S):i&&s?Me(E):E;return $(S,O),y=!0,o!==void 0&&(o=O),E}return rn&&y||(k.f&16384)!==0?S.v:d(S)})}function V_(e){return new j_(e)}var j_=class{#e;#t;constructor(e){var t=new Map,r=(i,s)=>{var a=Ud(s,!1,!1);return t.set(i,a),a};const n=new Proxy({...e.props||{},$$events:{}},{get(i,s){return d(t.get(s)??r(s,Reflect.get(i,s)))},has(i,s){return s===ol?!0:(d(t.get(s)??r(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,a){return $(t.get(s)??r(s,a),a),Reflect.set(i,s,a)}});this.#t=(e.hydrate?g_:_f)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!Kt&&(!e?.props?.$$host||e.sync===!1)&&b(),this.#e=n.$$events;for(const i of Object.keys(this.#t))i==="$set"||i==="$destroy"||i==="$on"||wn(this,i,{get(){return this.#t[i]},set(s){this.#t[i]=s},enumerable:!0});this.#t.$set=i=>{Object.assign(n,i)},this.#t.$destroy=()=>{y_(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];const r=(...n)=>t.call(this,...n);return this.#e[e].push(r),()=>{this.#e[e]=this.#e[e].filter(n=>n!==r)}}$destroy(){this.#t.$destroy()}},Ff;typeof HTMLElement=="function"&&(Ff=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return s=>{const a=Ca("slot");i!=="default"&&(a.name=i),T(s,a)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=Z_(this);for(const i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(const i of this.attributes){const s=this.$$g_p(i.name);s in this.$$d||(this.$$d[s]=Ua(s,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=V_({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=_s(()=>{Ei(()=>{this.$$r=!0;for(const i of ya(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const s=Ua(i,this.$$d[i],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,s)}this.$$r=!1})});for(const i in this.$$l)for(const s of this.$$l[i]){const a=this.$$c.$on(i,s);this.$$l_u.set(s,a)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ua(e,r,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return ya(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Ua(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Z_(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function se(e,t,r,n,i,s){let a=class extends Ff{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return ya(t).map(o=>(t[o].attribute||o).toLowerCase())}};return ya(t).forEach(o=>{wn(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){l=Ua(o,l,t),this.$$d[o]=l;var c=this.$$c;c&&(Fr(c,o)?.get?c[o]=l:c.$set({[o]:l}))}})}),n.forEach(o=>{wn(a.prototype,o,{get(){return this.$$c?.[o]}})}),s&&(a=s(a)),e.element=a,a}function W_(e){try{Intl.NumberFormat.supportedLocalesOf(e).length===0&&console.warn(`[go] Unknown locale "${e}" — the browser has no locale data for it; price and date formatting will fall back to the browser default.`)}catch{console.warn(`[go] Invalid locale "${e}" — not a valid BCP 47 language tag (use "de", "de-CH", "en", …). Price and date formatting will throw.`)}}var H_={"quantity.remove":"Remove item","quantity.remove.label":"✕","cart.item.remove":"✕"},G_={"quantity.remove":"Artikel entfernen","quantity.remove.label":"✕","cart.item.remove":"✕"},K_={en:H_,de:G_},Nf={account:()=>"/#/user/account",annualTickets:()=>"/#/tickets/annual",checkoutFailure:e=>`/#/checkout/failure?payment_error=${e}`,checkoutSuccess:e=>`/#/checkout/success?ORDERID=${e}`,checkoutForm:()=>"/#/checkout",coupons:()=>"/#/coupons",combiTickets:()=>"/#/tickets/combi",combiTicketGroup:e=>"/#/tickets/combi?group="+e,dayTickets:()=>"/#/tickets/day",eventGroup:Q_,event:e=>"/#/product/event/"+e,events:()=>"/#/products/events",exhibition:e=>"/#/exhibition/"+e,exhibitions:()=>"/#/exhibitions",home:()=>"/#/start",login:()=>"/#/login",merchandise:e=>"/#/merchandise/detail/"+e,merchandises:()=>"/#/merchandise/list",museum:e=>"/#/museum/"+e,museums:()=>"/#/museums",publicTours:()=>"/#/products/public-tours",register:()=>"/#/registration",tickets:()=>"/#/tickets/filters",ticketGroup:e=>"/#/tickets/filters?group="+e,tour:e=>"/#/product/tour/"+e,tours:()=>"/#/products/tours",toursGroup:X_,cart:()=>"/#/cart",annualTicketPersonalizationForm:(e,t)=>`/#/tickets/annual/personalisation/${e}/${t}`,annualTicketPersonalizationList:e=>`/#/tickets/annual/personalisation/${e}`,annualTicketPersonalizationFormSubmit:e=>`/#/tickets/annual/personalisation/${e}`},Y_={...Nf,checkoutSuccess:e=>`/checkout/success/?token=${e}`,checkoutFailure:e=>`/checkout/failure?error=${e}`};function J_(e){return e==="angular"?Nf:Y_}function Q_(e){return`/#/products/events?category_id=${(x.settings?.multipleEventsMenuItems.event_groups[e]||[]).join("&category_id=")}`}function X_(e){return`/#/products/tours?category_id=${(x.settings?.multipleToursMenuItems.tour_groups[e]||[]).join("&category_id=")}`}function ew(e){return new Promise(t=>setTimeout(t,e))}function Rf(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function tw(e){return typeof e=="boolean"}function Ql(e,t=1e3){return new Promise((r,n)=>{const i=Date.now(),s=20,a=()=>{try{const o=e();if(o){r(o);return}if(Date.now()-i>=t){n(new Error("Timeout reached without truthy value"));return}setTimeout(a,s)}catch(o){n(o)}};a()})}var Xl=Array.isArray,Lf=e=>!!e&&e.constructor===Object,rw=e=>!!(e&&e.constructor&&e.call&&e.apply),nw=e=>typeof e=="string"||e instanceof String,iw=e=>{try{return Number(e)===e}catch{return!1}},sw=e=>!(!e||!e.then||!rw(e.then)),aw=(e,t)=>e.reduce((r,n)=>{const i=t(n);return r[i]||(r[i]=[]),r[i].push(n),r},{}),zf=(e,t)=>!e||(e.length??0)===0?null:e.reduce(t);function qr(e,t){return(e||[]).reduce((r,n)=>r+(t?t(n):n),0)}var qf=(e,t,r=!1)=>{if(!e)return[];const n=(s,a)=>t(s)-t(a),i=(s,a)=>t(a)-t(s);return e.slice().sort(r===!0?i:n)};function ow(e,t){const r=t??(n=>n);return zf(e,(n,i)=>r(n)>r(i)?n:i)}function eu(e,t){const r=t??(n=>n);return zf(e,(n,i)=>r(n)<r(i)?n:i)}var lw=(e,t)=>{const r=e.reduce((n,i)=>{const s=t?t(i):i;return n[s]||(n[s]=i),n},{});return Object.values(r)},Uf=(e,t,r)=>{let n=r;for(let i=1;i<=e;i++)n=t(n,i);return n},uw=(e,t)=>e?!t||t.length===0?e:t.reduce((r,n)=>(delete r[n],r),{...e}):{},Vt=(e,t)=>!e||!t?e??t??{}:Object.entries({...e,...t}).reduce((r,[n,i])=>({...r,[n]:Lf(e[n])?Vt(e[n],i):i}),{}),Bf=class{#e=ae(Me({uid:"",client:"",accessToken:"",expiry:0}));constructor(){this.load(),typeof window<"u"&&window.addEventListener("storage",e=>{e.key==="go-auth"&&this.load()})}customerLevel(){if(this.isGuest())return 10;if(this.isLoggedIn())return 20}isAuthenticated(){return this.data.uid!==""}isLoggedIn(){return!!(this.data.uid&&Rf(this.data.uid))}isGuest(){return!!(this.data.uid&&!Rf(this.data.uid))}signOut(){d(this.#e).uid="",d(this.#e).client="",d(this.#e).accessToken="",d(this.#e).expiry=0,this.save()}signIn(e){d(this.#e).uid=e.uid,d(this.#e).client=e.client,d(this.#e).accessToken=e.accessToken,d(this.#e).expiry=e.expiry,this.save()}get data(){return d(this.#e).uid!==""&&d(this.#e).expiry<Math.floor(Date.now()/1e3)?{uid:"",client:"",accessToken:"",expiry:0}:d(this.#e)}toString(){return JSON.stringify(d(this.#e))}save(){typeof localStorage>"u"||localStorage.setItem("go-auth",this.toString())}load(){if(typeof localStorage>"u")return;const e=localStorage.getItem("go-auth");if(!e){this.signOut();return}const t=JSON.parse(e);if(!(Lf(t)&&"uid"in t&&"client"in t&&"accessToken"in t&&"expiry"in t))throw new Error(`(Auth.loadFromString) invalid auth json ${e}`);if(t.uid!==""&&t.expiry<Math.floor(Date.now()/1e3)){this.signOut();return}this.signIn(t)}},cw=class{auth;constructor(e){this.auth=e}onRequest({request:e}){const{uid:t,client:r,accessToken:n,expiry:i}=this.auth.data,s=e.headers;t&&!s.has("uid")&&s.set("uid",t),r&&!s.has("client")&&s.set("client",r),n&&!s.has("access-token")&&s.set("access-token",n),i&&!s.has("expiry")&&s.set("expiry",String(i)),n&&!s.has("token-type")&&s.set("token-type","Bearer")}onResponse({response:e}){const t=e.headers.get("access-token"),r=e.headers.get("client"),n=e.headers.get("uid"),i=parseInt(e.headers.get("expiry")||"");return t&&r&&n&&i&&this.auth.signIn({uid:n,client:r,accessToken:t,expiry:i}),e}},Vf;function K(e,t,r){function n(o,l){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),o._zod.traits.has(e))return;o._zod.traits.add(e),t(o,l);const c=a.prototype,f=Object.keys(c);for(let u=0;u<f.length;u++){const p=f[u];p in o||(o[p]=c[p].bind(o))}}const i=r?.Parent??Object;class s extends i{}Object.defineProperty(s,"name",{value:e});function a(o){var l;const c=r?.Parent?new s:this;n(c,o),(l=c._zod).deferred??(l.deferred=[]);for(const f of c._zod.deferred)f();return c}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:o=>r?.Parent&&o instanceof r.Parent?!0:o?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var xi=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},jf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Vf=globalThis).__zod_globalConfig??(Vf.__zod_globalConfig={});var Ba=globalThis.__zod_globalConfig;function Kn(e){return e&&Object.assign(Ba,e),Ba}function Zf(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,n])=>t.indexOf(+r)===-1).map(([r,n])=>n)}function tu(e,t){return typeof t=="bigint"?t.toString():t}function ru(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}function nu(e){return e==null}function iu(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function dw(e,t){const r=e/t,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<i?0:r-n}var Wf=Symbol("evaluating");function We(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Wf)return n===void 0&&(n=Wf,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Yn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Cn(...e){const t={};for(const r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function Hf(e){return JSON.stringify(e)}function fw(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Gf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Va(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var hw=ru(()=>{if(Ba.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function Ps(e){if(Va(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Va(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Kf(e){return Ps(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var pw=new Set(["string","number","symbol"]);function ja(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function On(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function ye(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function mw(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var vw={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function gw(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return On(e,Cn(e._zod.def,{get shape(){const i={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(i[s]=r.shape[s])}return Yn(this,"shape",i),i},checks:[]}))}function yw(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");return On(e,Cn(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete i[s]}return Yn(this,"shape",i),i},checks:[]}))}function bw(e,t){if(!Ps(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const n=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(n,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return On(e,Cn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Yn(this,"shape",n),n}}))}function _w(e,t){if(!Ps(t))throw new Error("Invalid input to safeExtend: expected a plain object");return On(e,Cn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Yn(this,"shape",r),r}}))}function ww(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");return On(e,Cn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Yn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function kw(e,t,r){const n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");return On(t,Cn(t._zod.def,{get shape(){const i=t._zod.def.shape,s={...i};if(r)for(const a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(s[a]=e?new e({type:"optional",innerType:i[a]}):i[a])}else for(const a in i)s[a]=e?new e({type:"optional",innerType:i[a]}):i[a];return Yn(this,"shape",s),s},checks:[]}))}function Sw(e,t,r){return On(t,Cn(t._zod.def,{get shape(){const n=t._zod.def.shape,i={...n};if(r)for(const s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(const s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Yn(this,"shape",i),i}}))}function Ai(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Ew(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Yf(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Za(e){return typeof e=="string"?e:e?.message}function Jn(e,t,r){const n=e.message?e.message:Za(e.inst?._zod.def?.error?.(e))??Za(t?.error?.(e))??Za(r.customError?.(e))??Za(r.localeError?.(e))??"Invalid input",{inst:i,continue:s,input:a,...o}=e;return o.path??(o.path=[]),o.message=n,t?.reportInput&&(o.input=a),o}function su(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ms(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}var Jf=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,tu,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Qf=K("$ZodError",Jf),Xf=K("$ZodError",Jf,{Parent:Error});function Tw(e,t=r=>r.message){const r={},n=[];for(const i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}function xw(e,t=r=>r.message){const r={_errors:[]},n=(i,s=[])=>{for(const a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(o=>n({issues:o},[...s,...a.path]));else if(a.code==="invalid_key")n({issues:a.issues},[...s,...a.path]);else if(a.code==="invalid_element")n({issues:a.issues},[...s,...a.path]);else{const o=[...s,...a.path];if(o.length===0)r._errors.push(t(a));else{let l=r,c=0;for(;c<o.length;){const f=o[c];c!==o.length-1?l[f]=l[f]||{_errors:[]}:(l[f]=l[f]||{_errors:[]},l[f]._errors.push(t(a))),l=l[f],c++}}}};return n(e),r}var au=e=>(t,r,n,i)=>{const s=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},s);if(a instanceof Promise)throw new xi;if(a.issues.length){const o=new(i?.Err??e)(a.issues.map(l=>Jn(l,s,Kn())));throw Gf(o,i?.callee),o}return a.value},ou=e=>async(t,r,n,i)=>{const s=n?{...n,async:!0}:{async:!0};let a=t._zod.run({value:r,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const o=new(i?.Err??e)(a.issues.map(l=>Jn(l,s,Kn())));throw Gf(o,i?.callee),o}return a.value},Wa=e=>(t,r,n)=>{const i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new xi;return s.issues.length?{success:!1,error:new(e??Qf)(s.issues.map(a=>Jn(a,i,Kn())))}:{success:!0,data:s.value}},Aw=Wa(Xf),Ha=e=>async(t,r,n)=>{const i=n?{...n,async:!0}:{async:!0};let s=t._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(a=>Jn(a,i,Kn())))}:{success:!0,data:s.value}},Cw=Ha(Xf),Ow=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return au(e)(t,r,i)},Dw=e=>(t,r,n)=>au(e)(t,r,n),Iw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return ou(e)(t,r,i)},Pw=e=>async(t,r,n)=>ou(e)(t,r,n),Mw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Wa(e)(t,r,i)},$w=e=>(t,r,n)=>Wa(e)(t,r,n),Fw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Ha(e)(t,r,i)},Nw=e=>async(t,r,n)=>Ha(e)(t,r,n),Rw=/^[cC][0-9a-z]{6,}$/,Lw=/^[0-9a-z]+$/,zw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,qw=/^[0-9a-vA-V]{20}$/,Uw=/^[A-Za-z0-9]{27}$/,Bw=/^[a-zA-Z0-9_-]{21}$/,Vw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,jw=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,eh=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Zw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ww="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Hw(){return new RegExp(Ww,"u")}var Gw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Kw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Yw=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Jw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Qw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,th=/^[A-Za-z0-9_-]*$/,Xw=/^https?$/,e0=/^\+[1-9]\d{6,14}$/,rh="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",t0=new RegExp(`^${rh}$`);function nh(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function r0(e){return new RegExp(`^${nh(e)}$`)}function n0(e){const t=nh({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${rh}T(?:${n})$`)}var i0=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},s0=/^-?\d+$/,a0=/^-?\d+(?:\.\d+)?$/,o0=/^[^A-Z]*$/,l0=/^[^a-z]*$/,jt=K("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),ih={number:"number",bigint:"bigint",object:"date"},sh=K("$ZodCheckLessThan",(e,t)=>{jt.init(e,t);const r=ih[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,s=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ah=K("$ZodCheckGreaterThan",(e,t)=>{jt.init(e,t);const r=ih[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),u0=K("$ZodCheckMultipleOf",(e,t)=>{jt.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):dw(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),c0=K("$ZodCheckNumberFormat",(e,t)=>{jt.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[i,s]=vw[t.format];e._zod.onattach.push(a=>{const o=a._zod.bag;o.format=t.format,o.minimum=i,o.maximum=s,r&&(o.pattern=s0)}),e._zod.check=a=>{const o=a.value;if(r){if(!Number.isInteger(o)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});return}if(!Number.isSafeInteger(o)){o>0?a.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}o<i&&a.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),o>s&&a.issues.push({origin:"number",input:o,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),d0=K("$ZodCheckMaxLength",(e,t)=>{var r;jt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!nu(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;if(i.length<=t.maximum)return;const s=su(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),f0=K("$ZodCheckMinLength",(e,t)=>{var r;jt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!nu(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const s=su(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),h0=K("$ZodCheckLengthEquals",(e,t)=>{var r;jt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!nu(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=n=>{const i=n.value,s=i.length;if(s===t.length)return;const a=su(i),o=s>t.length;n.issues.push({origin:a,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ga=K("$ZodCheckStringFormat",(e,t)=>{var r,n;jt.init(e,t),e._zod.onattach.push(i=>{const s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),p0=K("$ZodCheckRegex",(e,t)=>{Ga.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),m0=K("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=o0),Ga.init(e,t)}),v0=K("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=l0),Ga.init(e,t)}),g0=K("$ZodCheckIncludes",(e,t)=>{jt.init(e,t);const r=ja(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),y0=K("$ZodCheckStartsWith",(e,t)=>{jt.init(e,t);const r=new RegExp(`^${ja(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),b0=K("$ZodCheckEndsWith",(e,t)=>{jt.init(e,t);const r=new RegExp(`.*${ja(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),_0=K("$ZodCheckOverwrite",(e,t)=>{jt.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),w0=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const t=e.split(`
13
13
  `).filter(i=>i),r=Math.min(...t.map(i=>i.length-i.trimStart().length)),n=t.map(i=>i.slice(r)).map(i=>" ".repeat(this.indent*2)+i);for(const i of n)this.content.push(i)}compile(){const e=Function,t=this?.args,r=[...(this?.content??[""]).map(n=>` ${n}`)];return new e(...t,r.join(`
14
- `))}},O0={major:4,minor:4,patch:3},ct=K("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=O0;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const i of n)for(const s of i._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(a,o,l)=>{let c=Oi(a),f;for(const u of o){if(u._zod.def.when){if(Iw(a)||!u._zod.def.when(a))continue}else if(c)continue;const p=a.issues.length,h=u._zod.check(a);if(h instanceof Promise&&l?.async===!1)throw new Ci;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,a.issues.length!==p&&(c||(c=Oi(a,p)))});else{if(a.issues.length===p)continue;c||(c=Oi(a,p))}}return f?f.then(()=>a):a},s=(a,o,l)=>{if(Oi(a))return a.aborted=!0,a;const c=i(o,n,l);if(c instanceof Promise){if(l.async===!1)throw new Ci;return c.then(f=>e._zod.parse(f,l))}return e._zod.parse(c,l)};e._zod.run=(a,o)=>{if(o.skipChecks)return e._zod.parse(a,o);if(o.direction==="backward"){const c=e._zod.parse({value:a.value,issues:[]},{...o,skipChecks:!0});return c instanceof Promise?c.then(f=>s(f,a,o)):s(c,a,o)}const l=e._zod.parse(a,o);if(l instanceof Promise){if(o.async===!1)throw new Ci;return l.then(c=>i(c,n,o))}return i(l,n,o)}}We(e,"~standard",()=>({validate:i=>{try{const s=$w(e,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Fw(e,i).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),cu=K("$ZodString",(e,t)=>{ct.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??d0(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Je=K("$ZodStringFormat",(e,t)=>{Ja.init(e,t),cu.init(e,t)}),D0=K("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Jw),Je.init(e,t)}),I0=K("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ih(r))}else t.pattern??(t.pattern=ih());Je.init(e,t)}),P0=K("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Qw),Je.init(e,t)}),M0=K("$ZodURL",(e,t)=>{Je.init(e,t),e._zod.check=r=>{try{const n=r.value.trim();if(!t.normalize&&t.protocol?.source===a0.source&&!/^https?:\/\//i.test(n)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}const i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),$0=K("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=e0()),Je.init(e,t)}),F0=K("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Kw),Je.init(e,t)}),N0=K("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=jw),Je.init(e,t)}),R0=K("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Zw),Je.init(e,t)}),L0=K("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ww),Je.init(e,t)}),z0=K("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Hw),Je.init(e,t)}),q0=K("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Gw),Je.init(e,t)}),U0=K("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=c0(t)),Je.init(e,t)}),B0=K("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=l0),Je.init(e,t)}),V0=K("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=u0(t)),Je.init(e,t)}),j0=K("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Yw),Je.init(e,t)}),Z0=K("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=t0),Je.init(e,t),e._zod.bag.format="ipv4"}),W0=K("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=r0),Je.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),H0=K("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=n0),Je.init(e,t)}),G0=K("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=i0),Je.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[i,s]=n;if(!s)throw new Error;const a=Number(s);if(`${a}`!==s)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function dh(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var K0=K("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=s0),Je.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{dh(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Y0(e){if(!sh.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/");return dh(t.padEnd(Math.ceil(t.length/4)*4,"="))}var J0=K("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=sh),Je.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Y0(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Q0=K("$ZodE164",(e,t)=>{t.pattern??(t.pattern=o0),Je.init(e,t)});function X0(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}var ek=K("$ZodJWT",(e,t)=>{Je.init(e,t),e._zod.check=r=>{X0(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),fh=K("$ZodNumber",(e,t)=>{ct.init(e,t),e._zod.pattern=e._zod.bag.pattern??h0,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;const s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...s?{received:s}:{}}),r}}),tk=K("$ZodNumberFormat",(e,t)=>{g0.init(e,t),fh.init(e,t)}),rk=K("$ZodUnknown",(e,t)=>{ct.init(e,t),e._zod.parse=r=>r}),nk=K("$ZodNever",(e,t)=>{ct.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function hh(e,t,r){e.issues.length&&t.issues.push(...eh(r,e.issues)),t.value[r]=e.value}var ik=K("$ZodArray",(e,t)=>{ct.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);const s=[];for(let a=0;a<i.length;a++){const o=i[a],l=t.element._zod.run({value:o,issues:[]},n);l instanceof Promise?s.push(l.then(c=>hh(c,r,a))):hh(l,r,a)}return s.length?Promise.all(s).then(()=>r):r}});function Qa(e,t,r,n,i,s){const a=r in n;if(e.issues.length){if(i&&s&&!a)return;t.issues.push(...eh(r,e.issues))}if(!a&&!i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}function ph(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=kw(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function mh(e,t,r,n,i,s){const a=[],o=i.keySet,l=i.catchall._zod,c=l.def.type,f=l.optin==="optional",u=l.optout==="optional";for(const p in t){if(p==="__proto__"||o.has(p))continue;if(c==="never"){a.push(p);continue}const h=l.run({value:t[p],issues:[]},n);h instanceof Promise?e.push(h.then(g=>Qa(g,r,p,t,f,u))):Qa(h,r,p,t,f,u)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}var sk=K("$ZodObject",(e,t)=>{if(ct.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const o={...a};return Object.defineProperty(t,"shape",{value:o}),o}})}const r=iu(()=>ph(t));We(e._zod,"propValues",()=>{const a=t.shape,o={};for(const l in a){const c=a[l]._zod;if(c.values){o[l]??(o[l]=new Set);for(const f of c.values)o[l].add(f)}}return o});const n=Wa,i=t.catchall;let s;e._zod.parse=(a,o)=>{s??(s=r.value);const l=a.value;if(!n(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};const c=[],f=s.shape;for(const u of s.keys){const p=f[u],h=p._zod.optin==="optional",g=p._zod.optout==="optional",v=p._zod.run({value:l[u],issues:[]},o);v instanceof Promise?c.push(v.then(m=>Qa(m,a,u,l,h,g))):Qa(v,a,u,l,h,g)}return i?mh(c,l,a,o,r.value,e):c.length?Promise.all(c).then(()=>a):a}}),ak=K("$ZodObjectJIT",(e,t)=>{sk.init(e,t);const r=e._zod.parse,n=iu(()=>ph(t)),i=p=>{const h=new C0(["shape","payload","ctx"]),g=n.value,v=k=>{const E=Jf(k);return`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`};h.write("const input = payload.value;");const m=Object.create(null);let y=0;for(const k of g.keys)m[k]=`key_${y++}`;h.write("const newResult = {};");for(const k of g.keys){const E=m[k],T=Jf(k),O=p[k],F=O?._zod?.optin==="optional",R=O?._zod?.optout==="optional";h.write(`const ${E} = ${v(k)};`),F&&R?h.write(`
14
+ `))}},k0={major:4,minor:4,patch:3},ct=K("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=k0;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const i of n)for(const s of i._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(a,o,l)=>{let c=Ai(a),f;for(const u of o){if(u._zod.def.when){if(Ew(a)||!u._zod.def.when(a))continue}else if(c)continue;const p=a.issues.length,h=u._zod.check(a);if(h instanceof Promise&&l?.async===!1)throw new xi;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,a.issues.length!==p&&(c||(c=Ai(a,p)))});else{if(a.issues.length===p)continue;c||(c=Ai(a,p))}}return f?f.then(()=>a):a},s=(a,o,l)=>{if(Ai(a))return a.aborted=!0,a;const c=i(o,n,l);if(c instanceof Promise){if(l.async===!1)throw new xi;return c.then(f=>e._zod.parse(f,l))}return e._zod.parse(c,l)};e._zod.run=(a,o)=>{if(o.skipChecks)return e._zod.parse(a,o);if(o.direction==="backward"){const c=e._zod.parse({value:a.value,issues:[]},{...o,skipChecks:!0});return c instanceof Promise?c.then(f=>s(f,a,o)):s(c,a,o)}const l=e._zod.parse(a,o);if(l instanceof Promise){if(o.async===!1)throw new xi;return l.then(c=>i(c,n,o))}return i(l,n,o)}}We(e,"~standard",()=>({validate:i=>{try{const s=Aw(e,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Cw(e,i).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),lu=K("$ZodString",(e,t)=>{ct.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??i0(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Je=K("$ZodStringFormat",(e,t)=>{Ga.init(e,t),lu.init(e,t)}),S0=K("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=jw),Je.init(e,t)}),E0=K("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=eh(r))}else t.pattern??(t.pattern=eh());Je.init(e,t)}),T0=K("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Zw),Je.init(e,t)}),x0=K("$ZodURL",(e,t)=>{Je.init(e,t),e._zod.check=r=>{try{const n=r.value.trim();if(!t.normalize&&t.protocol?.source===Xw.source&&!/^https?:\/\//i.test(n)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}const i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),A0=K("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Hw()),Je.init(e,t)}),C0=K("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Bw),Je.init(e,t)}),O0=K("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Rw),Je.init(e,t)}),D0=K("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Lw),Je.init(e,t)}),I0=K("$ZodULID",(e,t)=>{t.pattern??(t.pattern=zw),Je.init(e,t)}),P0=K("$ZodXID",(e,t)=>{t.pattern??(t.pattern=qw),Je.init(e,t)}),M0=K("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Uw),Je.init(e,t)}),$0=K("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=n0(t)),Je.init(e,t)}),F0=K("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=t0),Je.init(e,t)}),N0=K("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=r0(t)),Je.init(e,t)}),R0=K("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Vw),Je.init(e,t)}),L0=K("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Gw),Je.init(e,t),e._zod.bag.format="ipv4"}),z0=K("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Kw),Je.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),q0=K("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Yw),Je.init(e,t)}),U0=K("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Jw),Je.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[i,s]=n;if(!s)throw new Error;const a=Number(s);if(`${a}`!==s)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function oh(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var B0=K("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Qw),Je.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{oh(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function V0(e){if(!th.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/");return oh(t.padEnd(Math.ceil(t.length/4)*4,"="))}var j0=K("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=th),Je.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{V0(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Z0=K("$ZodE164",(e,t)=>{t.pattern??(t.pattern=e0),Je.init(e,t)});function W0(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}var H0=K("$ZodJWT",(e,t)=>{Je.init(e,t),e._zod.check=r=>{W0(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),lh=K("$ZodNumber",(e,t)=>{ct.init(e,t),e._zod.pattern=e._zod.bag.pattern??a0,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;const s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...s?{received:s}:{}}),r}}),G0=K("$ZodNumberFormat",(e,t)=>{c0.init(e,t),lh.init(e,t)}),K0=K("$ZodUnknown",(e,t)=>{ct.init(e,t),e._zod.parse=r=>r}),Y0=K("$ZodNever",(e,t)=>{ct.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function uh(e,t,r){e.issues.length&&t.issues.push(...Yf(r,e.issues)),t.value[r]=e.value}var J0=K("$ZodArray",(e,t)=>{ct.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);const s=[];for(let a=0;a<i.length;a++){const o=i[a],l=t.element._zod.run({value:o,issues:[]},n);l instanceof Promise?s.push(l.then(c=>uh(c,r,a))):uh(l,r,a)}return s.length?Promise.all(s).then(()=>r):r}});function Ka(e,t,r,n,i,s){const a=r in n;if(e.issues.length){if(i&&s&&!a)return;t.issues.push(...Yf(r,e.issues))}if(!a&&!i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}function ch(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=mw(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function dh(e,t,r,n,i,s){const a=[],o=i.keySet,l=i.catchall._zod,c=l.def.type,f=l.optin==="optional",u=l.optout==="optional";for(const p in t){if(p==="__proto__"||o.has(p))continue;if(c==="never"){a.push(p);continue}const h=l.run({value:t[p],issues:[]},n);h instanceof Promise?e.push(h.then(g=>Ka(g,r,p,t,f,u))):Ka(h,r,p,t,f,u)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}var Q0=K("$ZodObject",(e,t)=>{if(ct.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const o={...a};return Object.defineProperty(t,"shape",{value:o}),o}})}const r=ru(()=>ch(t));We(e._zod,"propValues",()=>{const a=t.shape,o={};for(const l in a){const c=a[l]._zod;if(c.values){o[l]??(o[l]=new Set);for(const f of c.values)o[l].add(f)}}return o});const n=Va,i=t.catchall;let s;e._zod.parse=(a,o)=>{s??(s=r.value);const l=a.value;if(!n(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};const c=[],f=s.shape;for(const u of s.keys){const p=f[u],h=p._zod.optin==="optional",g=p._zod.optout==="optional",v=p._zod.run({value:l[u],issues:[]},o);v instanceof Promise?c.push(v.then(m=>Ka(m,a,u,l,h,g))):Ka(v,a,u,l,h,g)}return i?dh(c,l,a,o,r.value,e):c.length?Promise.all(c).then(()=>a):a}}),X0=K("$ZodObjectJIT",(e,t)=>{Q0.init(e,t);const r=e._zod.parse,n=ru(()=>ch(t)),i=p=>{const h=new w0(["shape","payload","ctx"]),g=n.value,v=k=>{const E=Hf(k);return`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`};h.write("const input = payload.value;");const m=Object.create(null);let y=0;for(const k of g.keys)m[k]=`key_${y++}`;h.write("const newResult = {};");for(const k of g.keys){const E=m[k],A=Hf(k),O=p[k],F=O?._zod?.optin==="optional",R=O?._zod?.optout==="optional";h.write(`const ${E} = ${v(k)};`),F&&R?h.write(`
15
15
  if (${E}.issues.length) {
16
- if (${T} in input) {
16
+ if (${A} in input) {
17
17
  payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
18
18
  ...iss,
19
- path: iss.path ? [${T}, ...iss.path] : [${T}]
19
+ path: iss.path ? [${A}, ...iss.path] : [${A}]
20
20
  })));
21
21
  }
22
22
  }
23
23
 
24
24
  if (${E}.value === undefined) {
25
- if (${T} in input) {
26
- newResult[${T}] = undefined;
25
+ if (${A} in input) {
26
+ newResult[${A}] = undefined;
27
27
  }
28
28
  } else {
29
- newResult[${T}] = ${E}.value;
29
+ newResult[${A}] = ${E}.value;
30
30
  }
31
31
 
32
32
  `):F?h.write(`
33
33
  if (${E}.issues.length) {
34
34
  payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
35
35
  ...iss,
36
- path: iss.path ? [${T}, ...iss.path] : [${T}]
36
+ path: iss.path ? [${A}, ...iss.path] : [${A}]
37
37
  })));
38
38
  }
39
39
 
40
40
  if (${E}.value === undefined) {
41
- if (${T} in input) {
42
- newResult[${T}] = undefined;
41
+ if (${A} in input) {
42
+ newResult[${A}] = undefined;
43
43
  }
44
44
  } else {
45
- newResult[${T}] = ${E}.value;
45
+ newResult[${A}] = ${E}.value;
46
46
  }
47
47
 
48
48
  `):h.write(`
49
- const ${E}_present = ${T} in input;
49
+ const ${E}_present = ${A} in input;
50
50
  if (${E}.issues.length) {
51
51
  payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
52
52
  ...iss,
53
- path: iss.path ? [${T}, ...iss.path] : [${T}]
53
+ path: iss.path ? [${A}, ...iss.path] : [${A}]
54
54
  })));
55
55
  }
56
56
  if (!${E}_present && !${E}.issues.length) {
@@ -58,28 +58,28 @@ ${i}
58
58
  code: "invalid_type",
59
59
  expected: "nonoptional",
60
60
  input: undefined,
61
- path: [${T}]
61
+ path: [${A}]
62
62
  });
63
63
  }
64
64
 
65
65
  if (${E}_present) {
66
66
  if (${E}.value === undefined) {
67
- newResult[${T}] = undefined;
67
+ newResult[${A}] = undefined;
68
68
  } else {
69
- newResult[${T}] = ${E}.value;
69
+ newResult[${A}] = ${E}.value;
70
70
  }
71
71
  }
72
72
 
73
- `)}h.write("payload.value = newResult;"),h.write("return payload;");const S=h.compile();return(k,E)=>S(p,k,E)};let s;const a=Wa,o=!Za.jitless,c=o&&_w.value,f=t.catchall;let u;e._zod.parse=(p,h)=>{u??(u=n.value);const g=p.value;return a(g)?o&&c&&h?.async===!1&&h.jitless!==!0?(s||(s=i(t.shape)),p=s(p,h),f?mh([],g,p,h,u,e):p):r(p,h):(p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p)}});function vh(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const i=e.filter(s=>!Oi(s));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(a=>Qn(a,n,Yn())))}),t)}var ok=K("$ZodUnion",(e,t)=>{ct.init(e,t),We(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),We(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),We(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),We(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>au(i.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,i)=>{if(r)return r(n,i);let s=!1;const a=[];for(const o of t.options){const l=o._zod.run({value:n.value,issues:[]},i);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(o=>vh(o,n,e,i)):vh(a,n,e,i)}}),lk=K("$ZodIntersection",(e,t)=>{ct.init(e,t),e._zod.parse=(r,n)=>{const i=r.value,s=t.left._zod.run({value:i,issues:[]},n),a=t.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||a instanceof Promise?Promise.all([s,a]).then(([o,l])=>gh(r,o,l)):gh(r,s,a)}});function du(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if($s(e)&&$s(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),i={...e,...t};for(const s of n){const a=du(e[s],t[s]);if(!a.valid)return{valid:!1,mergeErrorPath:[s,...a.mergeErrorPath]};i[s]=a.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const i=e[n],s=t[n],a=du(i,s);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function gh(e,t,r){const n=new Map;let i;for(const o of t.issues)if(o.code==="unrecognized_keys"){i??(i=o);for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else e.issues.push(o);for(const o of r.issues)if(o.code==="unrecognized_keys")for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else e.issues.push(o);const s=[...n].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(s.length&&i&&e.issues.push({...i,keys:s}),Oi(e))return e;const a=du(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var uk=K("$ZodEnum",(e,t)=>{ct.init(e,t);const r=Kf(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>ww.has(typeof i)).map(i=>typeof i=="string"?Ha(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{const a=i.value;return n.has(a)||i.issues.push({code:"invalid_value",values:r,input:a,inst:e}),i}}),ck=K("$ZodTransform",(e,t)=>{ct.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Gf(e.constructor.name);const i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(r.value=s,r.fallback=!0,r));if(i instanceof Promise)throw new Ci;return r.value=i,r.fallback=!0,r}});function yh(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var bh=K("$ZodOptional",(e,t)=>{ct.init(e,t),e._zod.optin="optional",e._zod.optout="optional",We(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),We(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${au(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const i=r.value,s=t.innerType._zod.run(r,n);return s instanceof Promise?s.then(a=>yh(a,i)):yh(s,i)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),dk=K("$ZodExactOptional",(e,t)=>{bh.init(e,t),We(e._zod,"values",()=>t.innerType._zod.values),We(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),fk=K("$ZodNullable",(e,t)=>{ct.init(e,t),We(e._zod,"optin",()=>t.innerType._zod.optin),We(e._zod,"optout",()=>t.innerType._zod.optout),We(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${au(r.source)}|null)$`):void 0}),We(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),hk=K("$ZodDefault",(e,t)=>{ct.init(e,t),e._zod.optin="optional",We(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>_h(s,t)):_h(i,t)}});function _h(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var pk=K("$ZodPrefault",(e,t)=>{ct.init(e,t),e._zod.optin="optional",We(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),mk=K("$ZodNonOptional",(e,t)=>{ct.init(e,t),We(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>wh(s,e)):wh(i,e)}});function wh(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var vk=K("$ZodCatch",(e,t)=>{ct.init(e,t),e._zod.optin="optional",We(e._zod,"optout",()=>t.innerType._zod.optout),We(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(a=>Qn(a,n,Yn()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Qn(s,n,Yn()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),gk=K("$ZodPipe",(e,t)=>{ct.init(e,t),We(e._zod,"values",()=>t.in._zod.values),We(e._zod,"optin",()=>t.in._zod.optin),We(e._zod,"optout",()=>t.out._zod.optout),We(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(a=>Xa(a,t.in,n)):Xa(s,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Xa(s,t.out,n)):Xa(i,t.out,n)}});function Xa(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var yk=K("$ZodReadonly",(e,t)=>{ct.init(e,t),We(e._zod,"propValues",()=>t.innerType._zod.propValues),We(e._zod,"values",()=>t.innerType._zod.values),We(e._zod,"optin",()=>t.innerType?._zod?.optin),We(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(kh):kh(i)}});function kh(e){return e.value=Object.freeze(e.value),e}var bk=K("$ZodCustom",(e,t)=>{jt.init(e,t),ct.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(s=>Sh(s,r,n,e));Sh(i,r,n,e)}});function Sh(e,t,r,n){if(!e){const i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(Fs(i))}}var Eh,_k=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const r=t[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const r={...this.get(t)??{}};delete r.id;const n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function wk(){return new _k}(Eh=globalThis).__zod_globalRegistry??(Eh.__zod_globalRegistry=wk());var Ns=globalThis.__zod_globalRegistry;function kk(e,t){return new e({type:"string",...ye(t)})}function Sk(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ye(t)})}function xh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ye(t)})}function Ek(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ye(t)})}function xk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ye(t)})}function Tk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ye(t)})}function Ak(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ye(t)})}function Ck(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ye(t)})}function Ok(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ye(t)})}function Dk(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ye(t)})}function Ik(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ye(t)})}function Pk(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ye(t)})}function Mk(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ye(t)})}function $k(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ye(t)})}function Fk(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ye(t)})}function Nk(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ye(t)})}function Rk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ye(t)})}function Lk(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ye(t)})}function zk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ye(t)})}function qk(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ye(t)})}function Uk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ye(t)})}function Bk(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ye(t)})}function Vk(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ye(t)})}function jk(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ye(t)})}function Zk(e,t){return new e({type:"string",format:"date",check:"string_format",...ye(t)})}function Wk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ye(t)})}function Hk(e,t){return new e({type:"string",format:"duration",check:"string_format",...ye(t)})}function Gk(e,t){return new e({type:"number",checks:[],...ye(t)})}function Kk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ye(t)})}function Yk(e){return new e({type:"unknown"})}function Jk(e,t){return new e({type:"never",...ye(t)})}function Th(e,t){return new uh({check:"less_than",...ye(t),value:e,inclusive:!1})}function fu(e,t){return new uh({check:"less_than",...ye(t),value:e,inclusive:!0})}function Ah(e,t){return new ch({check:"greater_than",...ye(t),value:e,inclusive:!1})}function hu(e,t){return new ch({check:"greater_than",...ye(t),value:e,inclusive:!0})}function Ch(e,t){return new v0({check:"multiple_of",...ye(t),value:e})}function Oh(e,t){return new y0({check:"max_length",...ye(t),maximum:e})}function eo(e,t){return new b0({check:"min_length",...ye(t),minimum:e})}function Dh(e,t){return new _0({check:"length_equals",...ye(t),length:e})}function Qk(e,t){return new w0({check:"string_format",format:"regex",...ye(t),pattern:e})}function Xk(e){return new k0({check:"string_format",format:"lowercase",...ye(e)})}function eS(e){return new S0({check:"string_format",format:"uppercase",...ye(e)})}function tS(e,t){return new E0({check:"string_format",format:"includes",...ye(t),includes:e})}function rS(e,t){return new x0({check:"string_format",format:"starts_with",...ye(t),prefix:e})}function nS(e,t){return new T0({check:"string_format",format:"ends_with",...ye(t),suffix:e})}function Di(e){return new A0({check:"overwrite",tx:e})}function iS(e){return Di(t=>t.normalize(e))}function sS(){return Di(e=>e.trim())}function aS(){return Di(e=>e.toLowerCase())}function oS(){return Di(e=>e.toUpperCase())}function lS(){return Di(e=>bw(e))}function uS(e,t,r){return new e({type:"array",element:t,...ye(r)})}function cS(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ye(r)})}function dS(e,t){const r=fS(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Fs(i,n.value,r._zod.def));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=r),s.continue??(s.continue=!r._zod.def.abort),n.issues.push(Fs(s))}},e(n.value,n)),t);return r}function fS(e,t){const r=new jt({check:"custom",...ye(t)});return r._zod.check=e,r}function Ih(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Ns,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Et(e,t,r={path:[],schemaPath:[]}){var n;const i=e._zod.def,s=t.seen.get(e);if(s)return s.count++,r.schemaPath.includes(e)&&(s.cycle=r.path),s.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);const o=e._zod.toJSONSchema?.();if(o)a.schema=o;else{const c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,c);else{const u=a.schema,p=t.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(e,t,u,c)}const f=e._zod.parent;f&&(a.ref||(a.ref=f),Et(f,t,c),t.seen.get(f).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),t.io==="input"&&It(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Ph(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const a of e.seen.entries()){const o=e.metadataRegistry.get(a[0])?.id;if(o){const l=n.get(o);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${o}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(o,a[0])}}const i=a=>{const o=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(a[0])?.id,u=e.external.uri??(h=>h);if(f)return{ref:u(f)};const p=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=p,{defId:p,ref:`${u("__shared")}#/${o}/${p}`}}if(a[1]===r)return{ref:"#"};const l=`#/${o}/`,c=a[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:l+c}},s=a=>{if(a[1].schema.$ref)return;const o=a[1],{ref:l,defId:c}=i(a);o.def={...o.schema},c&&(o.defId=c);const f=o.schema;for(const u in f)delete f[u];f.$ref=l};if(e.cycles==="throw")for(const a of e.seen.entries()){const o=a[1];if(o.cycle)throw new Error(`Cycle detected: #/${o.cycle?.join("/")}/<root>
73
+ `)}h.write("payload.value = newResult;"),h.write("return payload;");const S=h.compile();return(k,E)=>S(p,k,E)};let s;const a=Va,o=!Ba.jitless,c=o&&hw.value,f=t.catchall;let u;e._zod.parse=(p,h)=>{u??(u=n.value);const g=p.value;return a(g)?o&&c&&h?.async===!1&&h.jitless!==!0?(s||(s=i(t.shape)),p=s(p,h),f?dh([],g,p,h,u,e):p):r(p,h):(p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p)}});function fh(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const i=e.filter(s=>!Ai(s));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(a=>Jn(a,n,Kn())))}),t)}var ek=K("$ZodUnion",(e,t)=>{ct.init(e,t),We(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),We(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),We(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),We(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>iu(i.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,i)=>{if(r)return r(n,i);let s=!1;const a=[];for(const o of t.options){const l=o._zod.run({value:n.value,issues:[]},i);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(o=>fh(o,n,e,i)):fh(a,n,e,i)}}),tk=K("$ZodIntersection",(e,t)=>{ct.init(e,t),e._zod.parse=(r,n)=>{const i=r.value,s=t.left._zod.run({value:i,issues:[]},n),a=t.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||a instanceof Promise?Promise.all([s,a]).then(([o,l])=>hh(r,o,l)):hh(r,s,a)}});function uu(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ps(e)&&Ps(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),i={...e,...t};for(const s of n){const a=uu(e[s],t[s]);if(!a.valid)return{valid:!1,mergeErrorPath:[s,...a.mergeErrorPath]};i[s]=a.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const i=e[n],s=t[n],a=uu(i,s);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function hh(e,t,r){const n=new Map;let i;for(const o of t.issues)if(o.code==="unrecognized_keys"){i??(i=o);for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else e.issues.push(o);for(const o of r.issues)if(o.code==="unrecognized_keys")for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else e.issues.push(o);const s=[...n].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(s.length&&i&&e.issues.push({...i,keys:s}),Ai(e))return e;const a=uu(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var rk=K("$ZodEnum",(e,t)=>{ct.init(e,t);const r=Zf(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>pw.has(typeof i)).map(i=>typeof i=="string"?ja(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{const a=i.value;return n.has(a)||i.issues.push({code:"invalid_value",values:r,input:a,inst:e}),i}}),nk=K("$ZodTransform",(e,t)=>{ct.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new jf(e.constructor.name);const i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(r.value=s,r.fallback=!0,r));if(i instanceof Promise)throw new xi;return r.value=i,r.fallback=!0,r}});function ph(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var mh=K("$ZodOptional",(e,t)=>{ct.init(e,t),e._zod.optin="optional",e._zod.optout="optional",We(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),We(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${iu(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const i=r.value,s=t.innerType._zod.run(r,n);return s instanceof Promise?s.then(a=>ph(a,i)):ph(s,i)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),ik=K("$ZodExactOptional",(e,t)=>{mh.init(e,t),We(e._zod,"values",()=>t.innerType._zod.values),We(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),sk=K("$ZodNullable",(e,t)=>{ct.init(e,t),We(e._zod,"optin",()=>t.innerType._zod.optin),We(e._zod,"optout",()=>t.innerType._zod.optout),We(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${iu(r.source)}|null)$`):void 0}),We(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),ak=K("$ZodDefault",(e,t)=>{ct.init(e,t),e._zod.optin="optional",We(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>vh(s,t)):vh(i,t)}});function vh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ok=K("$ZodPrefault",(e,t)=>{ct.init(e,t),e._zod.optin="optional",We(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),lk=K("$ZodNonOptional",(e,t)=>{ct.init(e,t),We(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>gh(s,e)):gh(i,e)}});function gh(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var uk=K("$ZodCatch",(e,t)=>{ct.init(e,t),e._zod.optin="optional",We(e._zod,"optout",()=>t.innerType._zod.optout),We(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(a=>Jn(a,n,Kn()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Jn(s,n,Kn()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),ck=K("$ZodPipe",(e,t)=>{ct.init(e,t),We(e._zod,"values",()=>t.in._zod.values),We(e._zod,"optin",()=>t.in._zod.optin),We(e._zod,"optout",()=>t.out._zod.optout),We(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(a=>Ya(a,t.in,n)):Ya(s,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Ya(s,t.out,n)):Ya(i,t.out,n)}});function Ya(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var dk=K("$ZodReadonly",(e,t)=>{ct.init(e,t),We(e._zod,"propValues",()=>t.innerType._zod.propValues),We(e._zod,"values",()=>t.innerType._zod.values),We(e._zod,"optin",()=>t.innerType?._zod?.optin),We(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(yh):yh(i)}});function yh(e){return e.value=Object.freeze(e.value),e}var fk=K("$ZodCustom",(e,t)=>{jt.init(e,t),ct.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(s=>bh(s,r,n,e));bh(i,r,n,e)}});function bh(e,t,r,n){if(!e){const i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(Ms(i))}}var _h,hk=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const r=t[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const r={...this.get(t)??{}};delete r.id;const n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function pk(){return new hk}(_h=globalThis).__zod_globalRegistry??(_h.__zod_globalRegistry=pk());var $s=globalThis.__zod_globalRegistry;function mk(e,t){return new e({type:"string",...ye(t)})}function vk(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ye(t)})}function wh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ye(t)})}function gk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ye(t)})}function yk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ye(t)})}function bk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ye(t)})}function _k(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ye(t)})}function wk(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ye(t)})}function kk(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ye(t)})}function Sk(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ye(t)})}function Ek(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ye(t)})}function Tk(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ye(t)})}function xk(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ye(t)})}function Ak(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ye(t)})}function Ck(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ye(t)})}function Ok(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ye(t)})}function Dk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ye(t)})}function Ik(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ye(t)})}function Pk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ye(t)})}function Mk(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ye(t)})}function $k(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ye(t)})}function Fk(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ye(t)})}function Nk(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ye(t)})}function Rk(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ye(t)})}function Lk(e,t){return new e({type:"string",format:"date",check:"string_format",...ye(t)})}function zk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ye(t)})}function qk(e,t){return new e({type:"string",format:"duration",check:"string_format",...ye(t)})}function Uk(e,t){return new e({type:"number",checks:[],...ye(t)})}function Bk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ye(t)})}function Vk(e){return new e({type:"unknown"})}function jk(e,t){return new e({type:"never",...ye(t)})}function kh(e,t){return new sh({check:"less_than",...ye(t),value:e,inclusive:!1})}function cu(e,t){return new sh({check:"less_than",...ye(t),value:e,inclusive:!0})}function Sh(e,t){return new ah({check:"greater_than",...ye(t),value:e,inclusive:!1})}function du(e,t){return new ah({check:"greater_than",...ye(t),value:e,inclusive:!0})}function Eh(e,t){return new u0({check:"multiple_of",...ye(t),value:e})}function Th(e,t){return new d0({check:"max_length",...ye(t),maximum:e})}function Ja(e,t){return new f0({check:"min_length",...ye(t),minimum:e})}function xh(e,t){return new h0({check:"length_equals",...ye(t),length:e})}function Zk(e,t){return new p0({check:"string_format",format:"regex",...ye(t),pattern:e})}function Wk(e){return new m0({check:"string_format",format:"lowercase",...ye(e)})}function Hk(e){return new v0({check:"string_format",format:"uppercase",...ye(e)})}function Gk(e,t){return new g0({check:"string_format",format:"includes",...ye(t),includes:e})}function Kk(e,t){return new y0({check:"string_format",format:"starts_with",...ye(t),prefix:e})}function Yk(e,t){return new b0({check:"string_format",format:"ends_with",...ye(t),suffix:e})}function Ci(e){return new _0({check:"overwrite",tx:e})}function Jk(e){return Ci(t=>t.normalize(e))}function Qk(){return Ci(e=>e.trim())}function Xk(){return Ci(e=>e.toLowerCase())}function eS(){return Ci(e=>e.toUpperCase())}function tS(){return Ci(e=>fw(e))}function rS(e,t,r){return new e({type:"array",element:t,...ye(r)})}function nS(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ye(r)})}function iS(e,t){const r=sS(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ms(i,n.value,r._zod.def));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=r),s.continue??(s.continue=!r._zod.def.abort),n.issues.push(Ms(s))}},e(n.value,n)),t);return r}function sS(e,t){const r=new jt({check:"custom",...ye(t)});return r._zod.check=e,r}function Ah(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??$s,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Et(e,t,r={path:[],schemaPath:[]}){var n;const i=e._zod.def,s=t.seen.get(e);if(s)return s.count++,r.schemaPath.includes(e)&&(s.cycle=r.path),s.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);const o=e._zod.toJSONSchema?.();if(o)a.schema=o;else{const c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,c);else{const u=a.schema,p=t.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(e,t,u,c)}const f=e._zod.parent;f&&(a.ref||(a.ref=f),Et(f,t,c),t.seen.get(f).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),t.io==="input"&&It(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Ch(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const a of e.seen.entries()){const o=e.metadataRegistry.get(a[0])?.id;if(o){const l=n.get(o);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${o}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(o,a[0])}}const i=a=>{const o=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(a[0])?.id,u=e.external.uri??(h=>h);if(f)return{ref:u(f)};const p=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=p,{defId:p,ref:`${u("__shared")}#/${o}/${p}`}}if(a[1]===r)return{ref:"#"};const l=`#/${o}/`,c=a[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:l+c}},s=a=>{if(a[1].schema.$ref)return;const o=a[1],{ref:l,defId:c}=i(a);o.def={...o.schema},c&&(o.defId=c);const f=o.schema;for(const u in f)delete f[u];f.$ref=l};if(e.cycles==="throw")for(const a of e.seen.entries()){const o=a[1];if(o.cycle)throw new Error(`Cycle detected: #/${o.cycle?.join("/")}/<root>
74
74
 
75
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const o=a[1];if(t===a[0]){s(a);continue}if(e.external){const l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){s(a);continue}}if(e.metadataRegistry.get(a[0])?.id){s(a);continue}if(o.cycle){s(a);continue}if(o.count>1&&e.reused==="ref"){s(a);continue}}}function Mh(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=o=>{const l=e.seen.get(o);if(l.ref===null)return;const c=l.def??l.schema,f={...c},u=l.ref;if(l.ref=null,u){n(u);const h=e.seen.get(u),g=h.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(g)):Object.assign(c,g),Object.assign(c,f),o._zod.parent===u)for(const v in c)v==="$ref"||v==="allOf"||v in f||delete c[v];if(g.$ref&&h.def)for(const v in c)v==="$ref"||v==="allOf"||v in h.def&&JSON.stringify(c[v])===JSON.stringify(h.def[v])&&delete c[v]}const p=o._zod.parent;if(p&&p!==u){n(p);const h=e.seen.get(p);if(h?.schema.$ref&&(c.$ref=h.schema.$ref,h.def))for(const g in c)g==="$ref"||g==="allOf"||g in h.def&&JSON.stringify(c[g])===JSON.stringify(h.def[g])&&delete c[g]}e.override({zodSchema:o,jsonSchema:c,path:l.path??[]})};for(const o of[...e.seen.entries()].reverse())n(o[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const o=e.external.registry.get(t)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(o)}Object.assign(i,r.def??r.schema);const s=e.metadataRegistry.get(t)?.id;s!==void 0&&i.id===s&&delete i.id;const a=e.external?.defs??{};for(const o of e.seen.entries()){const l=o[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,a[l.defId]=l.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?i.$defs=a:i.definitions=a);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:to(t,"input",e.processors),output:to(t,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function It(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return It(n.element,r);if(n.type==="set")return It(n.valueType,r);if(n.type==="lazy")return It(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return It(n.innerType,r);if(n.type==="intersection")return It(n.left,r)||It(n.right,r);if(n.type==="record"||n.type==="map")return It(n.keyType,r)||It(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:It(n.in,r)||It(n.out,r);if(n.type==="object"){for(const i in n.shape)if(It(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(It(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(It(i,r))return!0;return!!(n.rest&&It(n.rest,r))}return!1}var hS=(e,t={})=>r=>{const n=Ih({...r,processors:t});return Et(e,n),Ph(n,e),Mh(n,e)},to=(e,t,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},a=Ih({...i??{},target:s,io:t,processors:r});return Et(e,a),Ph(a,e),Mh(a,e)},pS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},mS=(e,t,r,n)=>{const i=r;i.type="string";const{minimum:s,maximum:a,format:o,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof a=="number"&&(i.maxLength=a),o&&(i.format=pS[o]??o,i.format===""&&delete i.format,o==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){const f=[...l];f.length===1?i.pattern=f[0].source:f.length>1&&(i.allOf=[...f.map(u=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:u.source}))])}},vS=(e,t,r,n)=>{const i=r,{minimum:s,maximum:a,format:o,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:f}=e._zod.bag;typeof o=="string"&&o.includes("int")?i.type="integer":i.type="number";const u=typeof f=="number"&&f>=(s??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";u?h?(i.minimum=f,i.exclusiveMinimum=!0):i.exclusiveMinimum=f:typeof s=="number"&&(i.minimum=s),p?h?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof a=="number"&&(i.maximum=a),typeof l=="number"&&(i.multipleOf=l)},gS=(e,t,r,n)=>{r.not={}},yS=(e,t,r,n)=>{},bS=(e,t,r,n)=>{const i=e._zod.def,s=Kf(i.entries);s.every(a=>typeof a=="number")&&(r.type="number"),s.every(a=>typeof a=="string")&&(r.type="string"),r.enum=s},_S=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},wS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},kS=(e,t,r,n)=>{const i=r,s=e._zod.def,{minimum:a,maximum:o}=e._zod.bag;typeof a=="number"&&(i.minItems=a),typeof o=="number"&&(i.maxItems=o),i.type="array",i.items=Et(s.element,t,{...n,path:[...n.path,"items"]})},SS=(e,t,r,n)=>{const i=r,s=e._zod.def;i.type="object",i.properties={};const a=s.shape;for(const c in a)i.properties[c]=Et(a[c],t,{...n,path:[...n.path,"properties",c]});const o=new Set(Object.keys(a)),l=new Set([...o].filter(c=>{const f=s.shape[c]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));l.size>0&&(i.required=Array.from(l)),s.catchall?._zod.def.type==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=Et(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},ES=(e,t,r,n)=>{const i=e._zod.def,s=i.inclusive===!1,a=i.options.map((o,l)=>Et(o,t,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=a:r.anyOf=a},xS=(e,t,r,n)=>{const i=e._zod.def,s=Et(i.left,t,{...n,path:[...n.path,"allOf",0]}),a=Et(i.right,t,{...n,path:[...n.path,"allOf",1]}),o=l=>"allOf"in l&&Object.keys(l).length===1;r.allOf=[...o(s)?s.allOf:[s],...o(a)?a.allOf:[a]]},TS=(e,t,r,n)=>{const i=e._zod.def,s=Et(i.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},AS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},CS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},OS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},DS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType;let a;try{a=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},IS=(e,t,r,n)=>{const i=e._zod.def,s=i.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?s?i.out:i.in:i.out;Et(a,t,n);const o=t.seen.get(e);o.ref=a},PS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.readOnly=!0},$h=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},MS=K("ZodISODateTime",(e,t)=>{U0.init(e,t),Qe.init(e,t)});function $S(e){return jk(MS,e)}var FS=K("ZodISODate",(e,t)=>{B0.init(e,t),Qe.init(e,t)});function NS(e){return Zk(FS,e)}var RS=K("ZodISOTime",(e,t)=>{V0.init(e,t),Qe.init(e,t)});function LS(e){return Wk(RS,e)}var zS=K("ZodISODuration",(e,t)=>{j0.init(e,t),Qe.init(e,t)});function qS(e){return Hk(zS,e)}var US=(e,t)=>{rh.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Mw(e,r)},flatten:{value:r=>Pw(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,nu,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,nu,2)}},isEmpty:{get(){return e.issues.length===0}}})},fr=K("ZodError",US,{Parent:Error}),BS=lu(fr),VS=uu(fr),jS=Ka(fr),ZS=Ya(fr),WS=Nw(fr),HS=Rw(fr),GS=Lw(fr),KS=zw(fr),YS=qw(fr),JS=Uw(fr),QS=Bw(fr),XS=Vw(fr),Fh=new WeakMap;function Rs(e,t,r){const n=Object.getPrototypeOf(e);let i=Fh.get(n);if(i||(i=new Set,Fh.set(n,i)),!i.has(t)){i.add(t);for(const s in r){const a=r[s];Object.defineProperty(n,s,{configurable:!0,enumerable:!1,get(){const o=a.bind(this);return Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:o}),o},set(o){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:o})}})}}}var dt=K("ZodType",(e,t)=>(ct.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:to(e,"input"),output:to(e,"output")}}),e.toJSONSchema=hS(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>BS(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>jS(e,r,n),e.parseAsync=async(r,n)=>VS(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>ZS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>WS(e,r,n),e.decode=(r,n)=>HS(e,r,n),e.encodeAsync=async(r,n)=>GS(e,r,n),e.decodeAsync=async(r,n)=>KS(e,r,n),e.safeEncode=(r,n)=>YS(e,r,n),e.safeDecode=(r,n)=>JS(e,r,n),e.safeEncodeAsync=async(r,n)=>QS(e,r,n),e.safeDecodeAsync=async(r,n)=>XS(e,r,n),Rs(e,"ZodType",{check(...r){const n=this.def;return this.clone(Cn(n,{checks:[...n.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return On(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(j1(r,n))},superRefine(r,n){return this.check(Z1(r,n))},overwrite(r){return this.check(Di(r))},optional(){return Vh(this)},exactOptional(){return P1(this)},nullable(){return jh(this)},nullish(){return Vh(jh(this))},nonoptional(r){return L1(this,r)},array(){return Uh(this)},or(r){return x1([this,r])},and(r){return A1(this,r)},transform(r){return Wh(this,D1(r))},default(r){return F1(this,r)},prefault(r){return R1(this,r)},catch(r){return q1(this,r)},pipe(r){return Wh(this,r)},readonly(){return V1(this)},describe(r){const n=this.clone();return Ns.add(n,{description:r}),n},meta(...r){if(r.length===0)return Ns.get(this);const n=this.clone();return Ns.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return Ns.get(e)?.description},configurable:!0}),e)),Nh=K("_ZodString",(e,t)=>{cu.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>mS(e,n,i,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Rs(e,"_ZodString",{regex(...n){return this.check(Qk(...n))},includes(...n){return this.check(tS(...n))},startsWith(...n){return this.check(rS(...n))},endsWith(...n){return this.check(nS(...n))},min(...n){return this.check(eo(...n))},max(...n){return this.check(Oh(...n))},length(...n){return this.check(Dh(...n))},nonempty(...n){return this.check(eo(1,...n))},lowercase(n){return this.check(Xk(n))},uppercase(n){return this.check(eS(n))},trim(){return this.check(sS())},normalize(...n){return this.check(iS(...n))},toLowerCase(){return this.check(aS())},toUpperCase(){return this.check(oS())},slugify(){return this.check(lS())}})}),e1=K("ZodString",(e,t)=>{cu.init(e,t),Nh.init(e,t),e.email=r=>e.check(Sk(t1,r)),e.url=r=>e.check(Ck(r1,r)),e.jwt=r=>e.check(Vk(g1,r)),e.emoji=r=>e.check(Ok(n1,r)),e.guid=r=>e.check(xh(Rh,r)),e.uuid=r=>e.check(Ek(ro,r)),e.uuidv4=r=>e.check(xk(ro,r)),e.uuidv6=r=>e.check(Tk(ro,r)),e.uuidv7=r=>e.check(Ak(ro,r)),e.nanoid=r=>e.check(Dk(i1,r)),e.guid=r=>e.check(xh(Rh,r)),e.cuid=r=>e.check(Ik(s1,r)),e.cuid2=r=>e.check(Pk(a1,r)),e.ulid=r=>e.check(Mk(o1,r)),e.base64=r=>e.check(qk(p1,r)),e.base64url=r=>e.check(Uk(m1,r)),e.xid=r=>e.check($k(l1,r)),e.ksuid=r=>e.check(Fk(u1,r)),e.ipv4=r=>e.check(Nk(c1,r)),e.ipv6=r=>e.check(Rk(d1,r)),e.cidrv4=r=>e.check(Lk(f1,r)),e.cidrv6=r=>e.check(zk(h1,r)),e.e164=r=>e.check(Bk(v1,r)),e.datetime=r=>e.check($S(r)),e.date=r=>e.check(NS(r)),e.time=r=>e.check(LS(r)),e.duration=r=>e.check(qS(r))});function Qt(e){return kk(e1,e)}var Qe=K("ZodStringFormat",(e,t)=>{Je.init(e,t),Nh.init(e,t)}),t1=K("ZodEmail",(e,t)=>{P0.init(e,t),Qe.init(e,t)}),Rh=K("ZodGUID",(e,t)=>{D0.init(e,t),Qe.init(e,t)}),ro=K("ZodUUID",(e,t)=>{I0.init(e,t),Qe.init(e,t)}),r1=K("ZodURL",(e,t)=>{M0.init(e,t),Qe.init(e,t)}),n1=K("ZodEmoji",(e,t)=>{$0.init(e,t),Qe.init(e,t)}),i1=K("ZodNanoID",(e,t)=>{F0.init(e,t),Qe.init(e,t)}),s1=K("ZodCUID",(e,t)=>{N0.init(e,t),Qe.init(e,t)}),a1=K("ZodCUID2",(e,t)=>{R0.init(e,t),Qe.init(e,t)}),o1=K("ZodULID",(e,t)=>{L0.init(e,t),Qe.init(e,t)}),l1=K("ZodXID",(e,t)=>{z0.init(e,t),Qe.init(e,t)}),u1=K("ZodKSUID",(e,t)=>{q0.init(e,t),Qe.init(e,t)}),c1=K("ZodIPv4",(e,t)=>{Z0.init(e,t),Qe.init(e,t)}),d1=K("ZodIPv6",(e,t)=>{W0.init(e,t),Qe.init(e,t)}),f1=K("ZodCIDRv4",(e,t)=>{H0.init(e,t),Qe.init(e,t)}),h1=K("ZodCIDRv6",(e,t)=>{G0.init(e,t),Qe.init(e,t)}),p1=K("ZodBase64",(e,t)=>{K0.init(e,t),Qe.init(e,t)}),m1=K("ZodBase64URL",(e,t)=>{J0.init(e,t),Qe.init(e,t)}),v1=K("ZodE164",(e,t)=>{Q0.init(e,t),Qe.init(e,t)}),g1=K("ZodJWT",(e,t)=>{ek.init(e,t),Qe.init(e,t)}),Lh=K("ZodNumber",(e,t)=>{fh.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>vS(e,n,i,s),Rs(e,"ZodNumber",{gt(n,i){return this.check(Ah(n,i))},gte(n,i){return this.check(hu(n,i))},min(n,i){return this.check(hu(n,i))},lt(n,i){return this.check(Th(n,i))},lte(n,i){return this.check(fu(n,i))},max(n,i){return this.check(fu(n,i))},int(n){return this.check(zh(n))},safe(n){return this.check(zh(n))},positive(n){return this.check(Ah(0,n))},nonnegative(n){return this.check(hu(0,n))},negative(n){return this.check(Th(0,n))},nonpositive(n){return this.check(fu(0,n))},multipleOf(n,i){return this.check(Ch(n,i))},step(n,i){return this.check(Ch(n,i))},finite(){return this}});const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Ls(e){return Gk(Lh,e)}var y1=K("ZodNumberFormat",(e,t)=>{tk.init(e,t),Lh.init(e,t)});function zh(e){return Kk(y1,e)}var b1=K("ZodUnknown",(e,t)=>{rk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>yS(e,r,n,i)});function qh(){return Yk(b1)}var _1=K("ZodNever",(e,t)=>{nk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>gS(e,r,n,i)});function w1(e){return Jk(_1,e)}var k1=K("ZodArray",(e,t)=>{ik.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kS(e,r,n,i),e.element=t.element,Rs(e,"ZodArray",{min(r,n){return this.check(eo(r,n))},nonempty(r){return this.check(eo(1,r))},max(r,n){return this.check(Oh(r,n))},length(r,n){return this.check(Dh(r,n))},unwrap(){return this.element}})});function Uh(e,t){return uS(k1,e,t)}var S1=K("ZodObject",(e,t)=>{ak.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>SS(e,r,n,i),We(e,"shape",()=>t.shape),Rs(e,"ZodObject",{keyof(){return C1(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:qh()})},loose(){return this.clone({...this._zod.def,catchall:qh()})},strict(){return this.clone({...this._zod.def,catchall:w1()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return Tw(this,r)},safeExtend(r){return Aw(this,r)},merge(r){return Cw(this,r)},pick(r){return Ew(this,r)},omit(r){return xw(this,r)},partial(...r){return Ow(Bh,this,r[0])},required(...r){return Dw(Zh,this,r[0])}})});function pu(e,t){return new S1({type:"object",shape:e??{},...ye(t)})}var E1=K("ZodUnion",(e,t)=>{ok.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>ES(e,r,n,i),e.options=t.options});function x1(e,t){return new E1({type:"union",options:e,...ye(t)})}var T1=K("ZodIntersection",(e,t)=>{lk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>xS(e,r,n,i)});function A1(e,t){return new T1({type:"intersection",left:e,right:t})}var mu=K("ZodEnum",(e,t)=>{uk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>bS(e,n,i,s),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{const s={};for(const a of n)if(r.has(a))s[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new mu({...t,checks:[],...ye(i),entries:s})},e.exclude=(n,i)=>{const s={...t.entries};for(const a of n)if(r.has(a))delete s[a];else throw new Error(`Key ${a} not found in enum`);return new mu({...t,checks:[],...ye(i),entries:s})}});function C1(e,t){return new mu({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...ye(t)})}var O1=K("ZodTransform",(e,t)=>{ck.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>wS(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Gf(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Fs(s,r.value,t));else{const a=s;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Fs(a))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(s=>(r.value=s,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function D1(e){return new O1({type:"transform",transform:e})}var Bh=K("ZodOptional",(e,t)=>{bh.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$h(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Vh(e){return new Bh({type:"optional",innerType:e})}var I1=K("ZodExactOptional",(e,t)=>{dk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$h(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function P1(e){return new I1({type:"optional",innerType:e})}var M1=K("ZodNullable",(e,t)=>{fk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>TS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function jh(e){return new M1({type:"nullable",innerType:e})}var $1=K("ZodDefault",(e,t)=>{hk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>CS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function F1(e,t){return new $1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Xf(t)}})}var N1=K("ZodPrefault",(e,t)=>{pk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>OS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function R1(e,t){return new N1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Xf(t)}})}var Zh=K("ZodNonOptional",(e,t)=>{mk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>AS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function L1(e,t){return new Zh({type:"nonoptional",innerType:e,...ye(t)})}var z1=K("ZodCatch",(e,t)=>{vk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>DS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function q1(e,t){return new z1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var U1=K("ZodPipe",(e,t)=>{gk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>IS(e,r,n,i),e.in=t.in,e.out=t.out});function Wh(e,t){return new U1({type:"pipe",in:e,out:t})}var B1=K("ZodReadonly",(e,t)=>{yk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>PS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function V1(e){return new B1({type:"readonly",innerType:e})}var Hh=K("ZodCustom",(e,t)=>{bk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_S(e,r,n,i)});function j1(e,t={}){return cS(Hh,e,t)}function Z1(e,t){return dS(e,t)}function W1(e,t={}){const r=new Hh({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...ye(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var H1=pu({id:Ls(),customer:pu({customer_salutation_id:Ls().positive({message:"user.fieldErrors.titleRequire"}),name:Qt().min(1,{message:"user.fieldErrors.nameRequire"}),surname:Qt().min(1,{message:"user.fieldErrors.surnameRequire"}),email:Qt().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:Qt().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:Qt().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:Qt().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:Qt().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:Ls().positive().default(60),language_id:Ls().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),fN=pu({ticket_sale_id:Ls(),start_at:Qt().date(),personalizations:Uh(H1)});function vu(e,t){return e-t*Math.floor(e/t)}var Gh=1721426;function no(e,t,r,n){t=gu(e,t);let i=t-1,s=-2;return r<=2?s=0:io(t)&&(s=-1),Gh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function io(e){return e%4===0&&(e%100!==0||e%400===0)}function gu(e,t){return e==="BC"?1-t:t}function G1(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var K1={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},Ii=class{fromJulianDay(e){let t=e,r=t-Gh,n=Math.floor(r/146097),i=vu(r,146097),s=Math.floor(i/36524),a=vu(i,36524),o=Math.floor(a/1461),l=vu(a,1461),c=Math.floor(l/365),[f,u]=G1(n*400+s*100+o*4+c+(s!==4&&c!==4?1:0)),p=t-no(f,u,1,1),h=2;t<no(f,u,3,1)?h=0:io(u)&&(h=1);let g=Math.floor(((p+h)*12+373)/367);return new Bs(f,u,g,t-no(f,u,g,1)+1)}toJulianDay(e){return no(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return K1[io(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return io(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return e.era==="BC"}balanceDate(e){e.year<=0&&(e.era=e.era==="BC"?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}},Y1={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Dn(e,t){return t=er(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function yu(e,t){return t=er(t,e.calendar),e=_u(e),t=_u(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function J1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function Q1(e,t){return Dn(e,Pi(t))}var X1={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Kh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?X1[r]:iE(t),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function eE(e){return Br(Date.now(),e)}function Pi(e){return oE(eE(e))}function Yh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Jh(e,t){return Qh(e)-Qh(t)}function Qh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var bu=null,tE=!1;function Xt(){return bu==null&&(bu=new Intl.DateTimeFormat().resolvedOptions().timeZone),bu}function Xh(){return tE}function _u(e){return e.subtract({days:e.day-1})}function rE(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var ep=new Map,wu=new Map;function nE(e){if(Intl.Locale){let r=ep.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&ep.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function iE(e){let t=wu.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return wu.set(e,t),t.firstDay}let r=nE(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];n==="mon"?t={firstDay:1}:n==="tue"?t={firstDay:2}:n==="wed"?t={firstDay:3}:n==="thu"?t={firstDay:4}:n==="fri"?t={firstDay:5}:n==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:r&&Y1[r]||0};wu.set(e,t)}return t.firstDay}function In(e){return e=er(e,new Ii),tp(gu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function tp(e,t,r,n,i,s,a){let o=new Date;return o.setUTCHours(n,i,s,a),o.setUTCFullYear(e,t-1,r),o.getTime()}function zs(e,t){if(t==="UTC")return 0;if(e>0&&t===Xt()&&!Xh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:a,second:o}=np(e,t);return tp(r,n,i,s,a,o,0)-Math.floor(e/1e3)*1e3}var rp=new Map;function np(e,t){let r=rp.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),rp.set(t,r));let n=r.formatToParts(new Date(e)),i={};for(let s of n)s.type!=="literal"&&(i[s.type]=s.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}var so=864e5;function sE(e,t){let r=In(e);return ip(e,t,r-zs(r-so,t),r-zs(r+so,t))}function ip(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>aE(e,t,i))}function aE(e,t,r){let n=np(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function Ur(e,t,r="compatible"){let n=Pn(e);if(t==="UTC")return In(n);if(t===Xt()&&r==="compatible"&&!Xh()){n=er(n,new Ii);let l=new Date,c=gu(n.era,n.year);return l.setFullYear(c,n.month-1,n.day),l.setHours(n.hour,n.minute,n.second,n.millisecond),l.getTime()}let i=In(n),s=zs(i-so,t),a=zs(i+so,t),o=ip(n,t,i-s,i-a);if(o.length===1)return o[0];if(o.length>1)switch(r){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(i-s,i-a);case"compatible":case"later":return Math.max(i-s,i-a);case"reject":throw new RangeError("No such absolute time found")}}function sp(e,t,r="compatible"){return new Date(Ur(e,t,r))}function Br(e,t){let r=zs(e,t),n=new Date(e+r),i=n.getUTCFullYear(),s=n.getUTCMonth()+1,a=n.getUTCDate(),o=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),f=n.getUTCMilliseconds();return new Mn(i<1?"BC":"AD",i<1?-i+1:i,s,a,t,r,o,l,c,f)}function oE(e){return new Bs(e.calendar,e.era,e.year,e.month,e.day)}function Pn(e,t){let r=0,n=0,i=0,s=0;if("timeZone"in e)({hour:r,minute:n,second:i,millisecond:s}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:i,millisecond:s}=t),new Mi(e.calendar,e.era,e.year,e.month,e.day,r,n,i,s)}function lE(e){return new kE(e.hour,e.minute,e.second,e.millisecond)}function er(e,t){if(J1(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,Xn(n),n}function uE(e,t,r){return e instanceof Mn?e.timeZone===t?e:ap(e,t):Br(Ur(e,t,r),t)}function cE(e){let t=In(e)-e.offset;return new Date(t)}function ap(e,t){return er(Br(In(e)-e.offset,t),e.calendar)}var qs=36e5;function ao(e,t){let r=e.copy(),n="hour"in r?cp(r,t):0;ku(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,Su(r),op(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,dE(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let i=r.calendar.getYearsInEra(r);if(r.year>i){let a=r.calendar.isInverseEra?.(r);r.year=i,r.month=a?1:r.calendar.getMonthsInYear(r),r.day=a?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function ku(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function Su(e){for(;e.month<1;)ku(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,ku(e,1)}function dE(e){for(;e.day<1;)e.month--,Su(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Su(e)}function op(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Xn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),op(e)}function Eu(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function lp(e,t){return ao(e,Eu(t))}function xu(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),Xn(r),r}function Us(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),up(r),r}function fE(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=oo(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=oo(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=oo(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=oo(e.hour,24),t}function up(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function oo(e,t){let r=e%t;return r<0&&(r+=t),r}function cp(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,fE(e)}function dp(e,t){let r=e.copy();return cp(r,t),r}function hE(e,t){return dp(e,Eu(t))}function Tu(e,t,r,n){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),a=s.indexOf(e.era);if(a<0)throw new Error("Invalid era: "+e.era);a=an(a,r,0,s.length-1,n?.round),i.era=s[a],Xn(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=an(e.year,r,-1/0,9999,n?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=an(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":i.day=an(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),Xn(i),i}function Au(e,t,r,n){let i=e.copy();switch(t){case"hour":{let s=e.hour,a=0,o=23;if(n?.hourCycle===12){let l=s>=12;a=l?12:0,o=l?23:11}i.hour=an(s,r,a,o,n?.round);break}case"minute":i.minute=an(e.minute,r,0,59,n?.round);break;case"second":i.second=an(e.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=an(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return i}function an(e,t,r,n,i=!1){if(i){e+=Math.sign(t),e<r&&(e=n);let s=Math.abs(t);t>0?e=Math.ceil(e/s)*s:e=Math.floor(e/s)*s,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function fp(e,t){let r;return t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?r=Ur(ao(Pn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):r=In(e)-e.offset,r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5,er(Br(r,e.timeZone),e.calendar)}function pE(e,t){return fp(e,Eu(t))}function mE(e,t,r,n){switch(t){case"hour":{let i=0,s=23;if(n?.hourCycle===12){let g=e.hour>=12;i=g?12:0,s=g?23:11}let a=Pn(e),o=er(Us(a,{hour:i}),new Ii),l=[Ur(o,e.timeZone,"earlier"),Ur(o,e.timeZone,"later")].filter(g=>Br(g,e.timeZone).day===o.day)[0],c=er(Us(a,{hour:s}),new Ii),f=[Ur(c,e.timeZone,"earlier"),Ur(c,e.timeZone,"later")].filter(g=>Br(g,e.timeZone).day===c.day).pop(),u=In(e)-e.offset,p=Math.floor(u/qs),h=u%qs;return u=an(p,r,Math.floor(l/qs),Math.floor(f/qs),n?.round)*qs+h,er(Br(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return Au(e,t,r,n);case"era":case"year":case"month":case"day":return er(Br(Ur(Tu(Pn(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function vE(e,t,r){let n=Pn(e),i=Us(xu(n,t),t);return i.compare(n)===0?e:er(Br(Ur(i,e.timeZone,r),e.timeZone),e.calendar)}var gE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,yE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,bE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,Cu=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/,_E=["hours","minutes","seconds"],hN=["years","months","weeks","days",..._E];function lo(e){let t=e.match(gE);if(!t)throw Cu.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new Bs(Be(t[1],0,9999),Be(t[2],1,12),1);return r.day=Be(t[3],1,r.calendar.getDaysInMonth(r)),r}function hp(e){let t=e.match(yE);if(!t)throw Cu.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=Be(t[1],-9999,9999),n=new Mi(r<1?"BC":"AD",r<1?-r+1:r,Be(t[2],1,12),1,t[4]?Be(t[4],0,23):0,t[5]?Be(t[5],0,59):0,t[6]?Be(t[6],0,59):0,t[7]?Be(t[7],0,1/0)*1e3:0);return n.day=Be(t[3],0,n.calendar.getDaysInMonth(n)),n}function pp(e,t){let r=e.match(bE);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Be(r[1],-9999,9999),i=new Mn(n<1?"BC":"AD",n<1?-n+1:n,Be(r[2],1,12),1,r[11],0,r[4]?Be(r[4],0,23):0,r[5]?Be(r[5],0,59):0,r[6]?Be(r[6],0,59):0,r[7]?Be(r[7],0,1/0)*1e3:0);i.day=Be(r[3],0,i.calendar.getDaysInMonth(i));let s=Pn(i),a;if(r[8]){let o=Be(r[8],-23,23);if(i.offset=Math.sign(o)*(Math.abs(o)*36e5+Be(r[9]??"0",0,59)*6e4+Be(r[10]??"0",0,59)*1e3),a=In(i)-i.offset,!sE(s,i.timeZone).includes(a))throw new Error(`Offset ${yp(i.offset)} is invalid for ${Ou(i)} in ${i.timeZone}`)}else a=Ur(Pn(s),i.timeZone,t);return Br(a,i.timeZone)}function mp(e,t){let r=e.match(Cu);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Be(r[1],-9999,9999),i=new Mn(n<1?"BC":"AD",n<1?-n+1:n,Be(r[2],1,12),1,t,0,r[4]?Be(r[4],0,23):0,r[5]?Be(r[5],0,59):0,r[6]?Be(r[6],0,59):0,r[7]?Be(r[7],0,1/0)*1e3:0);return i.day=Be(r[3],0,i.calendar.getDaysInMonth(i)),r[8]&&(i.offset=Be(r[8],-23,23)*36e5+Be(r[9]??"0",0,59)*6e4),ap(i,t)}function Be(e,t,r){let n=Number(e);if(n<t||n>r)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function vp(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function gp(e){let t=er(e,new Ii),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Ou(e){return`${gp(e)}T${vp(e)}`}function yp(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),s=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(s+=`:${String(i).padStart(2,"0")}`),s}function wE(e){return`${Ou(e)}${yp(e.offset)}[${e.timeZone}]`}function Du(e){let t=typeof e[0]=="object"?e.shift():new Ii,r;if(typeof e[0]=="string")r=e.shift();else{let a=t.getEras();r=a[a.length-1]}let n=e.shift(),i=e.shift(),s=e.shift();return[t,r,n,i,s]}var Bs=class fd{#e;constructor(...t){let[r,n,i,s,a]=Du(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,Xn(this)}copy(){return this.era?new fd(this.calendar,this.era,this.year,this.month,this.day):new fd(this.calendar,this.year,this.month,this.day)}add(t){return ao(this,t)}subtract(t){return lp(this,t)}set(t){return xu(this,t)}cycle(t,r,n){return Tu(this,t,r,n)}toDate(t){return sp(this,t)}toString(){return gp(this)}compare(t){return Yh(this,t)}},kE=class vy{#e;constructor(t=0,r=0,n=0,i=0){this.hour=t,this.minute=r,this.second=n,this.millisecond=i,up(this)}copy(){return new vy(this.hour,this.minute,this.second,this.millisecond)}add(t){return dp(this,t)}subtract(t){return hE(this,t)}set(t){return Us(this,t)}cycle(t,r,n){return Au(this,t,r,n)}toString(){return vp(this)}compare(t){return Jh(this,t)}},Mi=class hd{#e;constructor(...t){let[r,n,i,s,a]=Du(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Xn(this)}copy(){return this.era?new hd(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new hd(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return ao(this,t)}subtract(t){return lp(this,t)}set(t){return xu(Us(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return Tu(this,t,r,n);default:return Au(this,t,r,n)}}toDate(t,r){return sp(this,t,r)}toString(){return Ou(this)}compare(t){let r=Yh(this,t);return r===0?Jh(this,Pn(t)):r}},Mn=class pd{#e;constructor(...t){let[r,n,i,s,a]=Du(t),o=t.shift(),l=t.shift();this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,this.timeZone=o,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Xn(this)}copy(){return this.era?new pd(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new pd(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return fp(this,t)}subtract(t){return pE(this,t)}set(t,r){return vE(this,t,r)}cycle(t,r,n){return mE(this,t,r,n)}toDate(){return cE(this)}toString(){return wE(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-uE(t,this.timeZone).toDate().getTime()}},Iu=new Map,kr=class{constructor(e,t={}){this.formatter=bp(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,t);if(t<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,t);if(t<e)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return xE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=TE(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}},SE={true:{ja:"h11"},false:{}};function bp(e,t={}){if(typeof t.hour12=="boolean"&&EE()){t={...t};let i=SE[String(t.hour12)][e.split("-")[0]],s=t.hour12?"h12":"h23";t.hourCycle=i??s,delete t.hour12}let r=e+(t?Object.entries(t).sort((i,s)=>i[0]<s[0]?-1:1).join():"");if(Iu.has(r))return Iu.get(r);let n=new Intl.DateTimeFormat(e,t);return Iu.set(r,n),n}var Pu=null;function EE(){return Pu==null&&(Pu=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Pu}var Mu=null;function xE(){return Mu==null&&(Mu=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Mu}function TE(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=bp(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(s=>s.type==="hour").value,10),i=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(s=>s.type==="hour").value,10);if(n===0&&i===23)return"h23";if(n===24&&i===23)return"h24";if(n===0&&i===11)return"h11";if(n===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}function $n(e){return lE(mp(e,"Europe/Berlin")).toString().slice(0,-3)}function ei(e,t={weekday:"long",year:"numeric",month:"long",day:"numeric"},r="de"){const n=mp(e instanceof Date?e.toISOString():e,"Europe/Berlin");return new kr(r,{timeZone:n.timeZone,...t}).format(n.toDate())}function uo(e){return e?.type==="Ticket"}function Vr(e){const t=e;return!!t&&t.type==="Ticket"&&t.is_mantle===!0&&!!t.sub_tickets&&Object.keys(t.sub_tickets).length>0}function Vs(e){return Object.entries(e.sub_tickets??{}).map(([t,r])=>({id:Number(t),title:r?.title??"",description:r?.description??null,min_persons:r?.min_persons??0,max_persons:r?.max_persons??0}))}function js(e,t){return{...e,selectedTime:t?.selectedTime??"",type:"Ticket",subtype:{time_slot:"timeslot",normal:"day",annual:"annual"}[e.ticket_type],shop_order:e.shop_order??0,content:void 0}}function Zs(e,t=""){return jf(Object.values(e).map(r=>js(r,{selectedTime:t})),r=>r.shop_order)}function $u(e,t){const r=n=>Object.keys(n.total_capacities??{}).find(i=>(n.total_capacities?.[i]??0)>0);return jf(Object.values(e).filter(n=>r(n)||Object.keys(n.total_capacities??{}).length===0).map(n=>js(n,{selectedTime:r(n)??t})),n=>n.shop_order)}function Ws(e,t=""){let r=Object.entries(e);return t!==""&&(r=r.filter(([,n])=>n.total_capacities?.[t]&&n.total_capacities[t]>0)),Object.fromEntries(r)}var _p=e=>qr(Object.values(e.mantle?.composition??{}));function AE(e){const t=e.quantity??0;return Vr(e.product)?t*_p(e):t}function Fu(e,t,r,n){e.clearPrecart();let i=0;for(const s of[...r.items,...t.items]){if(!uo(s.product))continue;const a=AE(s);s===n&&(i=a),e.addPrecartItemQuantity(s.product.id,a)}return i}var CE=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!uo(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,s=e.quotaManager,a=Fu(s,t,n,r),o=s.ticketCapacity(i.id,i.selectedTime,a),l=s.totalCapacity(i.id,i.selectedTime);return{max:Math.min(i.max_persons||100,o),min:i.min_persons||0,bookedOut:o===0,unavailable:l===0}},OE=function(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxQuantity_Mantle) impossible");if(!Vr(r.product))throw new Error("(maxQuantity_Mantle) impossible");const i=r.product,s=e.quotaManager,a=Fu(s,t,n,r),o=s.ticketCapacity(i.id,i.selectedTime,a),l=s.totalCapacity(i.id,i.selectedTime),c=_p(r),f=c>1?Math.floor(o/c):o;return{max:Math.min(i.max_persons||100,f),min:i.min_persons||0,bookedOut:f===0,unavailable:l===0}},DE=e=>Object.fromEntries(Vs(e).map(t=>[t.id,t.max_persons]));function IE(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxSubQuantities) impossible");if(!Vr(r.product))throw new Error("(maxSubQuantities) impossible");const i=r.product,s=r.quantity??0;let a=1/0;return s>0&&(Fu(e.quotaManager,t,n,r),a=Math.floor(e.quotaManager.ticketCapacity(i.id,i.selectedTime,0)/s)),Object.fromEntries(Vs(i).map(o=>[o.id,Math.min(o.max_persons,(r.mantle?.composition?.[o.id]??0)+a)]))}function Hs(e){return e?.type==="Event"}function PE(e){return Hs(e)&&e.subtype==="scale"}function ME(e,t,r){const n={type:"Event",id:t,tax_included:!0,...e};if(r?.date){const i=r.date;r.date_title=i.title||"",r.date_description=i.description||"",r.event_title=i.event_title||"",r.event_subtitle=i.event_sub_title||"",r.price_title=e.title||"",r.price_description=e.description||""}return{dateId:t,minAvailableCapacity:0,selectedTime:"",...r,...n,...e,type:"Event",subtype:e.scale_price_id===void 0?"flat":"scale"}}function Nu(e,t,r){return ME(e,t,r)}var $E=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!Hs(r.product))throw new Error("(getMaxQuantitySeats) impossible");const i=r.product.dateId,s=e.allSeats[i];if(!s)return console.error("(getMaxQuantity) no seats found for dateId",i),{max:0,min:0,unavailable:!0,bookedOut:!1};const a=Math.min(s.max||100,s.max_per_registration||100,s.available??100),o={max_per_registration:a,available:100,overbook:!1,...s};let l=a;o.overbook&&(l=Math.min(o.max||100,o.max_per_registration||100));const c=n.totalQuantity,f=qr(t.items.filter(p=>n.items.some(h=>h.uuid===p.uuid)),p=>p.quantity),u=Math.max(l-f-c+r.quantity,0);return{max:u,min:o.min??0,unavailable:o.available===0,bookedOut:u===0}},FE=function(e,t,r,n){if(e.capacityPolicy(r)!=="unlimited")throw new Error("(getMaxQuantityUnlimited) impossible");return{max:r.product.max_persons??100,min:r.product.min_persons??0,unavailable:!1,bookedOut:!1}};function NE(e){return{apiData:e,_timeslots:[],addQuotas(t){this._timeslots=[],this.apiData={...this.apiData,...t}},precart:{},clearPrecart(){this.precart={},this._timeslots=[]},setPrecartItemQuantity(t,r){this.precart[t]=r,this._timeslots=[]},addPrecartItemQuantity(t,r){this.precart[t]=(this.precart[t]??0)+r,this._timeslots=[]},getPrecartItemQuantity(t){return this.precart[t]??0},timeslots(){return this._timeslots.length===0&&(this._timeslots=Object.entries(this.apiData).flatMap(([t,r])=>Object.keys(r.capacities).map(n=>{const i=qr(r.ticket_ids.map(s=>this.getPrecartItemQuantity(s)));return{timeSlot:n,quota:t,capacity:r.capacities[n]-i,tickets:r.ticket_ids,totalCapacity:r.total_capacities[n]}}))),this._timeslots},filterBy({timeslot:t,ticketId:r,date:n}={}){let i=this.timeslots();return r&&(i=i.filter(s=>s.tickets.includes(r))),t&&(i=i.filter(s=>s.timeSlot===t)),n&&(i=i.filter(s=>s.timeSlot.startsWith(n))),i.flatMap(s=>s.tickets.map(a=>({timeslot:t,ticket:a,quota:s.quota,capacity:s.capacity,totalCapacity:s.totalCapacity})))},ticketCapacity(t,r,n=this.getPrecartItemQuantity(t)){const i=ru(this.filterBy({timeslot:r,ticketId:t}).map(s=>s.capacity))??0;return Math.max(0,i+n)},totalCapacity(t,r){return ru(this.filterBy({timeslot:r,ticketId:t}).map(n=>n.totalCapacity))??0},timeslotsOn(t,r){let n=this.timeslots().filter(s=>s.timeSlot.startsWith(t.toString()));r&&(n=n.filter(s=>s.tickets.some(a=>r.includes(a))));const i=hw(n,s=>s.timeSlot);return Object.values(i).map(s=>pw(mw(s.flatMap(a=>a.tickets)).map(a=>ru(s.filter(o=>o.tickets.includes(a)),o=>o.capacity)).filter(a=>a!==null),a=>a.capacity)??s[0]).sort((s,a)=>s.timeSlot.localeCompare(a.timeSlot))}}}function RE(e){let t=0;ks(()=>{ve(()=>{if(e.items.length===t)return;const r=e.items.length>t?"go-cart-item-added":"go-cart-item-removed";t=e.items.length,document.dispatchEvent(new CustomEvent(r,{detail:e.items.length}))})})}function yt(e){let t;try{t=new Intl.NumberFormat(A.locale??"de",{style:"currency",currency:A.currency??"EUR"})}catch{t=new Intl.NumberFormat("de",{style:"currency",currency:"EUR"})}return t.format((e??0)/100)}function on(e){if(!e)return;const t=e.split(",").map(r=>r.trim()).map(Number).filter(r=>!isNaN(r)&&r>0);return t.length>0?t:void 0}function wp(e){return e?.type==="Tour"}function kp(e,t){return{...e,type:"Tour",description:"",price_cents:e.totalPriceCents,tax_included:!0,vat_pct:0,instanceKey:t?.instanceKey??crypto.randomUUID(),wire:LE(e)}}function LE(e){const t={language_id:e.languageId};return e.quantities?t.quantities=e.quantities:t.quantity=e.participants,e.gradeId!=null&&(t.grade_id=e.gradeId),e.ageGroupId!=null&&(t.age_group_id=e.ageGroupId),e.surcharges&&(t.surcharges=e.surcharges),e.equipment&&(t.equipment=e.equipment),e.attendees&&(t.attendees=e.attendees),e.customs&&(t.customs=e.customs),t}function zE(e){const{type:t,description:r,price_cents:n,tax_included:i,vat_pct:s,instanceKey:a,wire:o,...l}=e;return kp({...l,totalPriceCents:n},{instanceKey:a})}var qE=0;function ot(e,t){const r={quantity:0,time:"",...t??{}};return Vr(e)&&(r.mantle={composition:r.mantle?.composition??Object.fromEntries(Vs(e).map(n=>[n.id,n.max_persons])),key:r.mantle?.key??`mantle-${qE++}`}),{...r,quantity:r.quantity??0,time:r.time??"",type:e.type,product:e,orderAttributes(){const n={shipped_with_merchandise_id:null,shipping_mode:"email",id:this.product.id,uuid:this.uuid};switch(e.type){case"Ticket":return{...n,time:this.time,quantity:this.quantity,...Vr(this.product)&&this.mantle?{sub_ticket_quantities:this.mantle.composition}:{}};case"Event":switch(e.subtype){case"flat":return{...n,quantity:this.quantity};case"scale":return{...n,quantities:{[e.scale_price_id]:this.quantity}};default:throw new Error(`(orderAttributes) Unhandled Event subtype: ${e}`)}case"Coupon":return{...n,quantity:this.quantity};case"Tour":return{...n,start_time:this.time,...e.wire};default:throw new Error(`(orderAttributes) Unhandled product type: ${e}`)}},get uuid(){return this.type+"-"+this.product.id+this.subUId},get subUId(){const n=[];return this.time&&n.push(`time: ${this.time}`),PE(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),wp(this.product)&&n.push(`tour: ${this.product.instanceKey}`),this.display?.discounted&&n.push("discounted"),Vr(this.product)&&this.mantle?.key&&n.push(`mantle_key: ${this.mantle.key}`),this.voucher?.code&&n.push(`voucher_code: ${this.voucher.code}`),n.length>0?` (${n.join(", ")})`:""},toString(){return this.uuid+":"+this.quantity},get price_cents(){const n="dynamic_prices"in this.product?this.product.dynamic_prices:null;return this.time&&n?.[this.time]!=null?n[this.time]:this.product.price_cents},get price_formatted(){return yt(this.price_cents)},get final_price_cents(){const n=this.product.tax_included?1:1+this.product.vat_pct/100;return this.price_cents*n},get final_price_formatted(){return yt(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return yt(this.total_price_cents)}}}var pN=15*6e4;function co(){return typeof window<"u"&&typeof localStorage<"u"}function UE(e,t){if(co())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Ru(e){if(!co())return null;try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(t){return console.warn(`Failed to load from localStorage (${e}):`,t),null}}function Sp(e){if(co())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}function Ep(e){return{...e,description:"",tax_included:!0,type:"Coupon"}}var xp="go-cart",fo=(e,t)=>localStorage.setItem(xp,JSON.stringify({items:e,coupons:t,savedAt:Date.now()}));function BE(e){const t=e.product.type;switch(t){case"Ticket":return Lu(e)?ot(js(e.product,{selectedTime:e.product.selectedTime}),{time:e.time,quantity:e.quantity,mantle:e.mantle,voucher:e.voucher}):void 0;case"Event":return Lu(e)?ot(Nu(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;case"Tour":return Lu(e)?ot(zE(e.product),{time:e.time,quantity:e.quantity}):void 0;case"Coupon":return ot(Ep(e.product),{quantity:e.quantity});default:throw new Error(`Unhandled case: ${t}`)}}function VE(e){let t=[],r=[],n;try{const i=localStorage.getItem(xp);if(!i)return[];const s=JSON.parse(i);if(Array.isArray(s))t=s,r=[];else if(typeof s=="object"&&s!==null)t=s.items||[],r=s.coupons||[],n=s.savedAt;else throw console.dir({parsed:s,content:i}),new Error("go-cart has invalid format");return n&&Date.now()-n>9e5?(e.clearItems(),e.clearCoupons(),fo([],[]),[]):(t.length===0?e.clearItems():e.items=t.map(BE).filter(HE),e.clearCoupons(),r.forEach(a=>e.addCoupon(typeof a=="string"?{code:a,kind:"actionToken"}:a)),e.items)}catch(i){return console.error(i),fo([],[]),[]}}function jE(e){VE(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});fo(e.items||[],e.coupons||[]),ks(()=>{ve(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});r!==t&&(t=r,fo(e.items||[],e.coupons||[]))})})}var ZE=e=>new Date<new Date(e),WE=e=>lo(e.slice(0,10)).compare(Pi(Xt()))>=0,Lu=e=>e.time?e.product.subtype==="day"?WE(e.time):ZE(e.time):!0,HE=e=>e!==void 0,GE=0;function $i(e,t=20){const r=Me([]),n=Me([]);let i=ae(void 0);const s={items:r,coupons:n,get paymentModeId(){return d(i)},set paymentModeId(a){$(i,a,!0)},uid:`cart-${GE++}`,get nonEmptyItems(){return this.items.filter(a=>a.quantity>0)},get totalPriceCents(){return Math.max(0,qr(this.items,a=>a.total_price_cents))},get totalQuantity(){return qr(this.items,a=>a.quantity)},get valueVoucherCents(){return qr(this.coupons.filter(a=>a.kind==="valueVoucher"),a=>a.valueCents??0)},get amountToPayCents(){return Math.max(0,this.totalPriceCents-this.valueVoucherCents)},toString(){return this.uid+" > ["+this.items.map(a=>a.uuid+":"+a.quantity).join(", ")+"]"},orderData(){return{items:this.items.map(a=>({type:a.type,attributes:a.orderAttributes()})),shipping_address_id:null,comment:null,reference:null,payment_mode_id:this.paymentModeId??A.settings?.defaultPaymentModeId,coupons:this.coupons.map(a=>a.code),donations:[],affiliate:{},total:this.amountToPayCents}},get totalFormatted(){return yt(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(a){for(let o=this.items.length-1;o>=0;o--)this.items[o].uuid===a.uuid&&this.items.splice(o,1);a?.voucher?.code&&!this.items.some(o=>o.voucher?.code===a.voucher.code)&&this.removeCoupon(a.voucher.code)},addItem(a){const o=this.items.find(l=>l.uuid===a.uuid);o?o.quantity+=a.quantity:this.items.push(a)},addItems(a){a.forEach(o=>this.addItem(o))},addCoupon(a){const o={...a,code:a.code.toUpperCase()};this.coupons.some(l=>l.code===o.code)||this.coupons.push(o)},removeCoupon(a){const o=a.toUpperCase(),l=this.coupons.findIndex(c=>c.code===o);if(l>-1){const[c]=this.coupons.splice(l,1);if(c.kind==="serviceVoucher")for(let f=this.items.length-1;f>=0;f--)this.items[f].voucher?.code===o&&this.items.splice(f,1)}},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()}};return e&&e.forEach(a=>s.addItem(ot(a))),s}function KE(){const e=Me($i());return jE(e),RE(e),e}var Fi="go-capacity";function Tp(e,t){const r=Ru(Fi);UE(Fi,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function Ap(e){const t=Ru(Fi);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){Sp(Fi);return}if(t.allSeats)for(const r in t.allSeats){const n=parseInt(r);e.addSeats(n,t.allSeats[n],!1)}t.allQuotas&&e.addQuotas(t.allQuotas,!1)}}function YE(e){co()&&window.addEventListener("storage",t=>{if(t.key===Fi&&Ap(e),t.key==="go-cart"){const r=Ru("go-cart");(!r||!r.items||r.items.length===0)&&Sp(Fi)}})}function Cp(){const e={allSeats:{},allQuotas:{},quotaManager:NE({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&Tp(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&Tp(this.allSeats,this.allQuotas)},capacityPolicy(t){const r=t.product.type;switch(r){case"Ticket":const n=t.product,i=n.subtype;switch(i){case"timeslot":case"event:ticket":case"day":return Vr(n)?"mantle":"quotas";case"annual":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${i}`)}case"Event":const s=t.product.subtype;switch(s){case"flat":case"scale":return"seats";default:throw new Error(`(getMaxAvailability) Unhandled case: ${s}`)}case"Coupon":return"unlimited";case"Tour":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${r}`)}},capacity(t,r,n){const i=this.capacityPolicy(r),s={quotas:CE,mantle:OE,seats:$E,unlimited:FE}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Re(()=>s(this,t,r,n))},subTicketMaxes(t,r,n){if(!Vr(r.product))return{};const i=this.capacityPolicy(r);if(i!=="mantle"&&i!=="unlimited")throw new Error(`(subTicketMaxes) impossible: ${i}`);return Re(()=>i==="mantle"?IE(this,t,r,n):DE(r.product))}};return Ap(e),YE(e),e}function Op(e){if(typeof document>"u"||!e)return;const t=`; ${document.cookie}`.split(`; ${e}=`);if(t.length===2){const r=t.pop()?.split(";").shift();return r?decodeURIComponent(r):void 0}}var Dp=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},JE=class extends Dp{constructor(){super()}get isLoggedIn(){try{const e=Op("auth_headers");if(!e)return!1;const t=JSON.parse(e),r=Math.floor(Date.now()/1e3);return!t["access-token"]||parseInt(t.expiry,10)<r?!1:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.uid)}catch{return!1}}get isGuest(){if(this.isLoggedIn)return!1;try{const e=Op("auth_headers");if(!e)return!0;const t=JSON.parse(e);return typeof t.uid=="string"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.uid)}catch{return!0}}},QE=class extends Dp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},XE=e=>{switch(e){case"angular":return new JE;case"jmb":return new QE;default:throw new Error("Unhandled shop type: "+e)}};function ex(e){return e==null||typeof e=="string"&&e.trim()===""}function tx(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||ex(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function rx(e,t){return tx(e,t)}var nx={withStackTrace:!1},Ip=(e,t,r=nx)=>({data:t.isOk()?{type:"Ok",value:t.value}:{type:"Err",value:t.error},message:e,stack:r.withStackTrace?new Error().stack:void 0});function ti(e,t,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(f){try{c(n.next(f))}catch(u){a(u)}}function l(f){try{c(n.throw(f))}catch(u){a(u)}}function c(f){f.done?s(f.value):i(f.value).then(o,l)}c((n=n.apply(e,t||[])).next())})}function Pp(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function jr(e){return this instanceof jr?(this.v=e,this):new jr(e)}function Mp(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(h){return function(g){return Promise.resolve(g).then(h,u)}}function o(h,g){n[h]&&(i[h]=function(v){return new Promise(function(m,y){s.push([h,v,m,y])>1||l(h,v)})},g&&(i[h]=g(i[h])))}function l(h,g){try{c(n[h](g))}catch(v){p(s[0][3],v)}}function c(h){h.value instanceof jr?Promise.resolve(h.value.v).then(f,u):p(s[0][2],h)}function f(h){l("next",h)}function u(h){l("throw",h)}function p(h,g){h(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}function ix(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,s){t[i]=e[i]?function(a){return(r=!r)?{value:jr(e[i](a)),done:!1}:s?s(a):a}:s}}function sx(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Pp=="function"?Pp(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(a){return new Promise(function(o,l){a=e[s](a),i(o,l,a.done,a.value)})}}function i(s,a,o,l){Promise.resolve(l).then(function(c){s({value:c,done:o})},a)}}var ri=class yr{constructor(t){this._promise=t}static fromSafePromise(t){return new yr(t.then(r=>new Wr(r)))}static fromPromise(t,r){return new yr(t.then(n=>new Wr(n)).catch(n=>new Sr(r(n))))}static fromThrowable(t,r){return(...n)=>new yr(ti(this,void 0,void 0,function*(){try{return new Wr(yield t(...n))}catch(i){return new Sr(r?r(i):i)}}))}static combine(t){return ax(t)}static combineWithAllErrors(t){return ox(t)}map(t){return new yr(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?new Sr(r.error):new Wr(yield t(r.value))})))}andThrough(t){return new yr(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);const n=yield t(r.value);return n.isErr()?new Sr(n.error):new Wr(r.value)})))}andTee(t){return new yr(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);try{yield t(r.value)}catch{}return new Wr(r.value)})))}orTee(t){return new yr(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isOk())return new Wr(r.value);try{yield t(r.error)}catch{}return new Sr(r.error)})))}mapErr(t){return new yr(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isOk()?new Wr(r.value):new Sr(yield t(r.error))})))}andThen(t){return new yr(this._promise.then(r=>{if(r.isErr())return new Sr(r.error);const n=t(r.value);return n instanceof yr?n._promise:n}))}orElse(t){return new yr(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?t(r.error):new Wr(r.value)})))}match(t,r){return this._promise.then(n=>n.match(t,r))}unwrapOr(t){return this._promise.then(r=>r.unwrapOr(t))}safeUnwrap(){return Mp(this,arguments,function*(){return yield jr(yield jr(yield*ix(sx(yield jr(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return Mp(this,arguments,function*(){const r=yield jr(this._promise);return r.isErr()&&(yield yield jr(ho(r.error))),yield jr(r.value)})}};function ho(e){return new ri(Promise.resolve(new Sr(e)))}var mN=ri.fromPromise,vN=ri.fromSafePromise,gN=ri.fromThrowable,$p=e=>{let t=Fn([]);for(const r of e)if(r.isErr()){t=Zr(r.error);break}else t.map(n=>n.push(r.value));return t},ax=e=>ri.fromSafePromise(Promise.all(e)).andThen($p),Fp=e=>{let t=Fn([]);for(const r of e)r.isErr()&&t.isErr()?t.error.push(r.error):r.isErr()&&t.isOk()?t=Zr([r.error]):r.isOk()&&t.isOk()&&t.value.push(r.value);return t},ox=e=>ri.fromSafePromise(Promise.all(e)).andThen(Fp),zu;(function(e){function t(i,s){return(...a)=>{try{return Fn(i(...a))}catch(o){return Zr(s?s(o):o)}}}e.fromThrowable=t;function r(i){return $p(i)}e.combine=r;function n(i){return Fp(i)}e.combineWithAllErrors=n})(zu||(zu={}));function Fn(e){return new Wr(e)}function Zr(e){return new Sr(e)}var Wr=class{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return Fn(e(this.value))}mapErr(e){return Fn(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map(t=>this.value)}andTee(e){try{e(this.value)}catch{}return Fn(this.value)}orTee(e){return Fn(this.value)}orElse(e){return Fn(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return ri.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,t){return e(this.value)}safeUnwrap(){const e=this.value;return(function*(){return e})()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw Ip("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},Sr=class{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return Zr(this.error)}mapErr(e){return Zr(e(this.error))}andThrough(e){return Zr(this.error)}andTee(e){return Zr(this.error)}orTee(e){try{e(this.error)}catch{}return Zr(this.error)}andThen(e){return Zr(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return ho(this.error)}asyncAndThrough(e){return ho(this.error)}asyncMap(e){return ho(this.error)}unwrapOr(e){return e}match(e,t){return t(this.error)}safeUnwrap(){const e=this.error;return(function*(){throw yield Zr(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw Ip("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},yN=zu.fromThrowable,lx=/\{[^{}]+\}/g,ux=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function cx(){return Math.random().toString(36).slice(2,11)}function dx(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:s,pathSerializer:a,headers:o,requestInitExt:l=void 0,...c}={...e};l=ux()?l:void 0,t=qp(t);const f=[];async function u(p,h){const{baseUrl:g,fetch:v=n,Request:m=r,headers:y,params:S={},parseAs:k="json",querySerializer:E,bodySerializer:T=s??hx,pathSerializer:O,body:F,middleware:R=[],...Y}=h||{};let N=t;g&&(N=qp(g)??t);let X=typeof i=="function"?i:Lp(i);E&&(X=typeof E=="function"?E:Lp({...typeof i=="object"?i:{},...E}));const q=O||a||fx,le=F===void 0?void 0:T(F,zp(o,y,S.header)),he=zp(le===void 0||le instanceof FormData?{}:{"Content-Type":"application/json"},o,y,S.header),j=[...f,...R],oe={redirect:"follow",...c,...Y,body:le,headers:he};let ee,fe,ce=new m(px(p,{baseUrl:N,params:S,querySerializer:X,pathSerializer:q}),oe),de;for(const P in Y)P in ce||(ce[P]=Y[P]);if(j.length){ee=cx(),fe=Object.freeze({baseUrl:N,fetch:v,parseAs:k,querySerializer:X,bodySerializer:T,pathSerializer:q});for(const P of j)if(P&&typeof P=="object"&&typeof P.onRequest=="function"){const te=await P.onRequest({request:ce,schemaPath:p,params:S,options:fe,id:ee});if(te)if(te instanceof m)ce=te;else if(te instanceof Response){de=te;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!de){try{de=await v(ce,l)}catch(P){let te=P;if(j.length)for(let L=j.length-1;L>=0;L--){const be=j[L];if(be&&typeof be=="object"&&typeof be.onError=="function"){const Z=await be.onError({request:ce,error:te,schemaPath:p,params:S,options:fe,id:ee});if(Z){if(Z instanceof Response){te=void 0,de=Z;break}if(Z instanceof Error){te=Z;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(te)throw te}if(j.length)for(let P=j.length-1;P>=0;P--){const te=j[P];if(te&&typeof te=="object"&&typeof te.onResponse=="function"){const L=await te.onResponse({request:ce,response:de,schemaPath:p,params:S,options:fe,id:ee});if(L){if(!(L instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");de=L}}}}const G=de.headers.get("Content-Length");if(de.status===204||ce.method==="HEAD"||G==="0"&&!de.headers.get("Transfer-Encoding")?.includes("chunked"))return de.ok?{data:void 0,response:de}:{error:void 0,response:de};if(de.ok)return{data:await(async()=>{if(k==="stream")return de.body;if(k==="json"&&!G){const te=await de.text();return te?JSON.parse(te):void 0}return await de[k]()})(),response:de};let Q=await de.text();try{Q=JSON.parse(Q)}catch{}return{error:Q,response:de}}return{request(p,h,g){return u(h,{...g,method:p.toUpperCase()})},GET(p,h){return u(p,{...h,method:"GET"})},PUT(p,h){return u(p,{...h,method:"PUT"})},POST(p,h){return u(p,{...h,method:"POST"})},DELETE(p,h){return u(p,{...h,method:"DELETE"})},OPTIONS(p,h){return u(p,{...h,method:"OPTIONS"})},HEAD(p,h){return u(p,{...h,method:"HEAD"})},PATCH(p,h){return u(p,{...h,method:"PATCH"})},TRACE(p,h){return u(p,{...h,method:"TRACE"})},use(...p){for(const h of p)if(h){if(typeof h!="object"||!("onRequest"in h||"onResponse"in h||"onError"in h))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");f.push(h)}},eject(...p){for(const h of p){const g=f.indexOf(h);g!==-1&&f.splice(g,1)}}}}function po(e,t,r){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function Np(e,t,r){if(!t||typeof t!="object")return"";const n=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if(r.style!=="deepObject"&&r.explode===!1){for(const o in t)n.push(o,r.allowReserved===!0?t[o]:encodeURIComponent(t[o]));const a=n.join(",");switch(r.style){case"form":return`${e}=${a}`;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return a}}for(const a in t){const o=r.style==="deepObject"?`${e}[${a}]`:a;n.push(po(o,t[a],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function Rp(e,t,r){if(!Array.isArray(t))return"";if(r.explode===!1){const s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",a=(r.allowReserved===!0?t:t.map(o=>encodeURIComponent(o))).join(s);switch(r.style){case"simple":return a;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return`${e}=${a}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const s of t)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?s:encodeURIComponent(s)):i.push(po(e,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function Lp(e){return function(r){const n=[];if(r&&typeof r=="object")for(const i in r){const s=r[i];if(s!=null){if(Array.isArray(s)){if(s.length===0)continue;n.push(Rp(i,s,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(Np(i,s,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(po(i,s,e))}}return n.join("&")}}function fx(e,t){let r=e;for(const n of e.match(lx)??[]){let i=n.substring(1,n.length-1),s=!1,a="simple";if(i.endsWith("*")&&(s=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(a="label",i=i.substring(1)):i.startsWith(";")&&(a="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const o=t[i];if(Array.isArray(o)){r=r.replace(n,Rp(i,o,{style:a,explode:s}));continue}if(typeof o=="object"){r=r.replace(n,Np(i,o,{style:a,explode:s}));continue}if(a==="matrix"){r=r.replace(n,`;${po(i,o)}`);continue}r=r.replace(n,a==="label"?`.${encodeURIComponent(o)}`:encodeURIComponent(o))}return r}function hx(e,t){return e instanceof FormData?e:t&&(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])==="application/x-www-form-urlencoded"?new URLSearchParams(e).toString():JSON.stringify(e)}function px(e,t){let r=`${t.baseUrl}${e}`;t.params?.path&&(r=t.pathSerializer(r,t.params.path));let n=t.querySerializer(t.params.query??{});return n.startsWith("?")&&(n=n.substring(1)),n&&(r+=`?${n}`),r}function zp(...e){const t=new Headers;for(const r of e){if(!r||typeof r!="object")continue;const n=r instanceof Headers?r.entries():Object.entries(r);for(const[i,s]of n)if(s===null)t.delete(i);else if(Array.isArray(s))for(const a of s)t.append(i,a);else s!==void 0&&t.set(i,s)}return t}function qp(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function mx(e,t){return dx({baseUrl:e,headers:{"X-Shop-Url":t}})}var vx="/api/v4/calendar",gx="/api/v4/tickets/calendar",yx="/api/v4/auth/validate_token",bx="/api/v4/tickets/list_and_quotas",_x="/api/v4/tickets",wx="/api/v4/auth/sign_in",kx="/api/v4/auth",Sx="/api/v4/orders/withdrawals",Ex="/api/v4/customer/memberships/activate",xx="/api/v4/orders",Tx="/api/v4/customer/customer_addresses",Ax="/api/v4/customer/memberships",Up={SHOP_GUEST:10,SHOP:20},mo={error:{success:!1,errors:["Not signed in"]}},Bp=rw,Cx=class{type;#e=ae(Me({customerSalutations:[],countries:[],locales:[]}));#t={};constructor(e,t,r,n="angular"){this.type=n,e&&t&&r&&this.load(e,t,r,n)}async load(e,t,r,n="angular"){(e.includes("jmb-staging.gomus.de")||e.includes("jmb.gomus.de"))&&(this.type="jmb"),d(this.#e).urls=iw(this.type),d(this.#e).currentUser=XE(this.type),d(this.#e).apiUrl=e,d(this.#e).shopDomain=t,d(this.#e).locale=r||"de",X_(d(this.#e).locale),this.#t={},d(this.#e).client=mx(e,t),d(this.#e).capacityManager=Cp(),d(this.#e).cart=KE(),d(this.#e).auth=new Wf,d(this.#e).client.use(new gw(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return d(this.#e).capacityManager||(d(this.#e).capacityManager=Cp()),d(this.#e).capacityManager}get cart(){return d(this.#e).cart}get auth(){return d(this.#e).auth||(d(this.#e).auth=new Wf),d(this.#e).auth}get currentUser(){return d(this.#e).currentUser}get slug(){return this.shopDomain?.match(/^(?:https?:\/\/)?([^.-]+)/)?.[1]}get client(){return d(this.#e).client}get name(){return this.shop?.name}get config(){return this.shop?.config}get payment_modes(){return this.shop?.payment_modes}get content(){return this.shop?.content}get settings(){return this.shop?.settings}get donations(){return this.shop?.config.donations}get translations(){return{...Bp[(this.locale??"en").toLowerCase().split(/[-_]/)[0]]??Bp.en,...this.shop?.translations}}get currency(){return this.shop?.config.currency}t(e,t){return this.translate(e,t)}translate(e,t){if(!this.translations?.[e])return e;let r=this.translations[e];if(t&&r)for(const[n,i]of Object.entries(t))r=r.replace(`{{${n}}}`,i);return r||""}get apiUrl(){return d(this.#e).apiUrl}get shopDomain(){return d(this.#e).shopDomain}get baseUrl(){return"https://"+this.shopDomain}get locale(){return d(this.#e).locale}get shop(){return this.fetchAndCache("/api/v4/shop","shop","shop")}get _data(){return d(this.#e)}getCustomer(){return this.auth.data.accessToken?this.fetchAndCache(yx,"getCustomer","",{cache:5}):mo}getOrders(e={}){return this.auth.data.accessToken?this.fetchAndCache(xx,`orders-${JSON.stringify(e)}`,"",{cache:5,query:e}):mo}getCustomerAddresses(){return this.auth.data.accessToken?this.fetchAndCache(Tx,"customerAddresses","",{cache:5}):mo}getCustomerMemberships(){return this.auth.data.accessToken?this.fetchAndCache(Ax,"customerMemberships","",{cache:5}):mo}ticketsCalendar(e){return this.fetchAndCache(gx,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(vx,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(bx,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:Vt({per_page:100},e??{})})}tickets(e){return this.fetchAndCache(_x,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:Vt({per_page:100},e??{})})}ticketsContent(e){return this.fetchAndCache("/api/v4/tickets/content",`ticketsContent-${JSON.stringify(e)}`,"data",{cache:300,query:Vt({"ticket_ids[]":e},{per_page:100})})}signIn(e){return this.apiPost(wx,{body:e,requiredFields:["email","password"]})}signUp(e,t=!1){e=Vt({addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:t?Up.SHOP_GUEST:Up.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(kx,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(Sx,{body:t,requiredFields:["order_id","first_name","last_name","email"],parseAs:"text"})}getDates(e){return this.fetchAndCache("/api/v4/dates",`dates-${JSON.stringify(e)}`,"dates",{query:Vt({per_page:100},e),cache:60})}updatePassword(e){return this.apiPut("/api/v4/auth/password",{body:e,requiredFields:["current_password","password","password_confirmation"]})}passwordReset(e){return this.apiPost("/api/v4/auth/password",{body:e,requiredFields:["email"]})}setNewPassword(e,t){return this.apiPut("/api/v4/auth/password",{body:e,requiredFields:["password","password_confirmation"],params:{header:t}})}activateMembership(e){return this.apiPost(Ex,{body:e,requiredFields:["email"],parseAs:"text"})}checkout(e){return this.apiPost("/api/v4/orders",{body:e,requiredFields:["items","total"]})}#r=null;async createCart(e){const t=JSON.stringify({items:e.items??[],coupons:e.coupons??[]});if(this.#r?.key===t)return this.#r.result;const r=await this.apiPost("/api/v4/cart",{body:e,requiredFields:["items"]});return this.#r={key:t,result:r},r}order(e){return this.fetchAndCache("/api/v4/orders/{id}",`order-${e}`,"order",{path:{id:e}})}annualOrder(e){return this.fetchAndCache("/api/v4/annual/order",`annual-order-${e}`,"order",{query:{token:e}})}finalizePersonalizations(e,t){return this.apiPost("/api/v4/annual/personalization/finalize",{body:t,params:{query:{token:e}}})}uploadPersonalizationPhoto(e,t,r){const n=new FormData;return n.append("file",r),this.apiUpload("/api/v4/annual/personalizations/{id}/upload",{body:n,params:{path:{id:t},query:{token:e}}})}fetchAndCache(e,t,r,n){if(n??={},n.query??={},n.cache??=1e3,n.path??={},!this.#i())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),d(this.#e)[t];const i=n.query,s=e+JSON.stringify(i),a=!this.#t[s],o=this.#t[s]?.fetchedAt<Date.now()-n.cache*1e3;return(a||o)&&this.apiGet(e,i,n.path).then(l=>{l&&(d(this.#e)[t]=r===""?l:l[r])}),d(this.#e)[t]}get museums(){return this.fetchAndCache("/api/v4/museums","museums","museums",{query:{per_page:100}})}get exhibitions(){return this.fetchAndCache("/api/v4/exhibitions","exhibitions","exhibitions",{query:{per_page:100}})}getEvent(e){return this.fetchAndCache(`/api/v4/events/${e}`,`single_event_${e}`,"event")}getTicketCapacities(e,t){return this.apiPost("/api/v4/tickets/capacities",{body:{date:e,ticket_ids:t},requiredFields:["date","ticket_ids"]})}getCouponSaleByBarcode(e){return this.fetchAndCache(`/api/v4/coupon_sales/barcode/${e}`,`coupon_sale_barcode_${e}`,"coupon_sale",{cache:0})}getCoupons(){return this.fetchAndCache("/api/v4/coupons","coupons","coupons",{query:{online_available:!0,per_page:100}})}getEventDetailsOnDate(e,t){return this.fetchAndCache(`/api/v4/events/${e}/dates/${t}`,`/api/v4/events/${e}/dates/${t}`,"date")}get events(){return this.fetchAndCache("/api/v4/events","events","events",{query:{per_page:100}})}get upcomingEvents(){return this.fetchAndCache("/api/v4/events","events","events",{query:{by_bookable:!0,with_bookings_in_future:1,per_page:100}})}get tours(){return this.fetchAndCache("/api/v4/tours","tours","tours",{query:{per_page:100}})}get merchandises(){return this.fetchAndCache("/api/v4/merchandises","merchandises","merchandises",{query:{per_page:100}})}get customerSalutations(){return this.fetchAndCache("/api/v3/customer_salutations","customerSalutations","customer_salutations")}get countries(){return this.fetchAndCache("/api/v3/countries","countries","countries",{query:{per_page:100}})}get locales(){return this.fetchAndCache("/api/v4/locales","locales","locales_options")}get urls(){return d(this.#e).urls}get#n(){return{params:{query:{locale:this.locale},header:{"X-Shop-Url":this.shopDomain}}}}async apiPost(e,t){return this.apiCall(e,{method:"POST",...t})}async apiPut(e,t){return this.apiCall(e,{method:"PUT",...t})}async apiDELETE(e,t){return this.apiCall(e,{method:"DELETE",...t})}async apiUpload(e,t){this.#s();const{body:r,params:n={}}=t;return await this.client.POST(e,{body:r,params:Vt(this.#n,{params:n}).params,bodySerializer:i=>i})}async apiCall(e,t){this.#s();const{body:r,params:n={},requiredFields:i,parseAs:s}=t,a=rx(r,i);if(Object.keys(a).length>0)return{error:{errors:a}};const o=this.client[t.method];return await o(e,{body:r,params:Vt(this.#n,{params:n}).params,parseAs:s})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(t=>t.status==="fetching").length;)await ow(10)}async apiGet(e,t={},r){this.#s();const n=e+JSON.stringify(t);this.#t[n]={status:"fetching",fetchedAt:Date.now()};let i=this.#n;t&&(i=Vt(i,{params:{query:t}})),e&&(i=Vt(i,{params:{path:r}}));const s=await this.client.GET(e,i);return this.#t[n]={status:"completed",fetchedAt:Date.now()},s.data||s}#i=()=>this.apiUrl!==void 0&&this.shopDomain!==void 0&&this.locale!==void 0&&this.client!==void 0;#s=()=>{if(this.apiUrl===void 0)throw new Error("Public API URL is not set");if(this.shopDomain===void 0)throw new Error("Shop Domain (X-Shop-Url) is not set");if(this.locale===void 0)throw new Error("Locale is not set");if(this.client===void 0)throw new Error("client is not set");if(!this.#i())throw new Error("Fetch is not possible.")}},A=new Cx;function Ni(e){return function(t,r){if(t)t.addEventListener(e,n=>{n.stopPropagation(),n.detail.value=r});else throw new Error("(createSetDetails) Host is undefined, You are probably trying to use this in a non-web-component context.")}}var Ox=class gy{host;KEY;pollDuration;#e=ae(Me({value:void 0}));error=!1;constructor(t,r,n=1e3){this.host=t,this.KEY=r,this.pollDuration=n}static static(t){const r=new gy(null,null);return r.value=t,r}load(){eu(()=>(this.host.dispatchEvent(new CustomEvent(this.KEY,{detail:this,bubbles:!0})),this.value),this.pollDuration).then(()=>{},()=>{this.error=!0,console.warn("(createGetDetails) could not load data for:",this.KEY)})}get value(){return d(this.#e).value}set value(t){d(this.#e).value=t}};function Ri(e){return function(t,r={pollDuration:1e3}){if(t){const n=new Ox(t,e,r.pollDuration);return n.load(r.pollDuration),n}else throw new Error("(createGetDetails) Host is undefined, You are probably trying to use this in a non-web-component context.")}}var Dx={urls:{},navigateTo:e=>{window.location.assign(e)},forms:{},fields:{},quantityStepper:!0},Ix=class{defaultConfig=Vt(Dx,window.customOptions);override=this.defaultConfig;#e=ae(Me(this.defaultConfig));get options(){return d(this.#e)}set options(e){$(this.#e,e,!0)}constructor(){this.update()}update(){const e=Vt(this.defaultConfig,this.override);e.forms=Object.keys({...this.defaultConfig.forms,...this.override.forms}).reduce((t,r)=>(t[r]={...this.defaultConfig.forms[r],...this.override.forms[r]},t),{}),this.options=e}get config(){return this.options}define(e){return this.override=Vt(this.override,e),this.update(),this}default(e){return this.defaultConfig=Vt(this.defaultConfig,e),this.update(),this}},Xe=new Ix,Vp=class{#e=ae();get token(){return d(this.#e)}set token(e){$(this.#e,e,!0)}#t=ae();get ticketSaleId(){return d(this.#t)}set ticketSaleId(e){$(this.#t,e,!0)}get order(){if(this.token)return ml(A.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return ml(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return Xe.config.urls.annualTicketPersonalizationForm?Xe.config.urls.annualTicketPersonalizationForm(this.token,e.id):A.urls.annualTicketPersonalizationForm(this.token,e.id)}},jp="go-annual-ticket-personalization",Zp=Ni(jp),Px=Ri(jp),Mx=B("<li><a> </a></li>"),$x=B('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function Fx(e,t){ne(t,!0);let r=_(t,"token",7);const n=new Vp;Zp(t.$$host,n),ve(()=>{n.token=r()});let i=D(()=>n.order);var s={details:n,get token(){return r()},set token(c){r(c),b()}},a=re(),o=U(a),l=c=>{var f=re(),u=U(f);Ne(u,17,()=>d(i).ticket_sales,p=>p.id,(p,h)=>{var g=$x(),v=M(g),m=M(v,!0);I(v);var y=V(v,2),S=M(y,!0);I(y);var k=V(y,2),E=T=>{var O=Mx(),F=M(O),R=M(F,!0);I(F),I(O),J((Y,N)=>{me(F,"href",Y),H(R,N)},[()=>n.goToPersonalization(d(h)),()=>A.t("ticket.annual.personalization.list.personalize.add")]),x(T,O)};ue(k,T=>{d(h).status=="not_ready_to_send"&&T(E)}),I(g),J(T=>{me(g,"data-ticket-sale-id",d(h).id),H(m,d(h).title),H(S,T)},[()=>A.t("ticket.annual.personalization.detail.title",{count:d(h).personalizations.length})]),x(p,g)}),x(c,f)};return ue(o,c=>{d(i)&&c(l)}),x(e,a),ie(s)}customElements.define("go-annual-ticket-personalization",se(Fx,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));var Nx={salutation:{key:"salutation",apiKey:"customer_salutation_id",type:"select",label:"user.registration.form.customer_salutation_id",placeholder:"",description:"",autocomplete:"honorific-prefix",options:()=>A.customerSalutations.map(e=>({label:e.salutation,value:e.id}))},firstName:{key:"firstName",apiKey:"name",type:"text",label:"user.registration.form.name",placeholder:"",description:"",autocomplete:"given-name"},lastName:{key:"lastName",apiKey:"surname",type:"text",label:"user.registration.form.surname",placeholder:"",description:"",autocomplete:"family-name"},email:{key:"email",apiKey:"email",type:"email",label:"user.registration.form.email",placeholder:"",description:"",autocomplete:"email",validator:Qt().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:Qt().email("user.fieldErrors.emailValid")},password:{key:"password",apiKey:"password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"current-password"},currentPassword:{key:"current_password",apiKey:"current_password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"current-password"},newPassword:{key:"password",apiKey:"password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"new-password",validator:Qt().min(6,"user.fieldErrors.passwordTooShort")},confirmPassword:{key:"confirmPassword",apiKey:"password_confirmation",type:"password",label:"user.registration.form.confirmPassword",placeholder:"",description:"",autocomplete:"new-password"},addressee:{key:"addressee",apiKey:"addr_addressat",type:"text",label:"user.registration.form.adressat",placeholder:"",description:"",autocomplete:"name"},street:{key:"street",apiKey:"addr_street",type:"text",label:"user.registration.form.street",placeholder:"",description:"",autocomplete:"street-address"},postcode:{key:"postcode",apiKey:"addr_zip",type:"text",label:"user.registration.form.plz",placeholder:"",description:"",autocomplete:"postal-code"},city:{key:"city",apiKey:"addr_city",type:"text",label:"user.registration.form.city",placeholder:"",description:"",autocomplete:"address-level2"},country:{key:"country",apiKey:"addr_country_id",type:"select",label:"user.registration.form.country",placeholder:"",description:"",autocomplete:"country",options:()=>A.countries.map(e=>({label:e.name,value:e.id}))},language:{key:"language",apiKey:"language_id",type:"select",label:"user.registration.form.language",placeholder:"",description:"",autocomplete:"language",options:()=>(A.locales??[]).map(e=>({label:A.t(`languages.${e.locale}`),value:e.id}))},acceptTerms:{key:"acceptTerms",apiKey:"terms",type:"checkbox",label:"user.registration.form.accept",placeholder:"",description:"",autocomplete:"off"},startAt:{apiKey:"start_at",key:"startAt",type:"date",label:"ticket.annual.personalization.list.startAt.update",placeholder:"",description:"",autocomplete:"off",validator:Qt().date()},dateOfBirth:{key:"dateOfBirth",apiKey:"date_of_birth",type:"date",label:"user.registration.form.dateOfBirth",placeholder:"",description:"",autocomplete:"bday",validator:Qt().date()},token:{key:"token",apiKey:"id",type:"text",label:"cart.coupon.form.code",placeholder:"",description:"",autocomplete:"off"},photo:{key:"photo",apiKey:"file",type:"file",label:"ticket.annual.personalization.form.photo",placeholder:"",description:"",autocomplete:"off",validator:W1(File)},withdrawalFirstName:{key:"withdrawalFirstName",apiKey:"first_name",type:"text",label:"user.registration.form.name",placeholder:"",description:"",autocomplete:"given-name"},withdrawalLastName:{key:"withdrawalLastName",apiKey:"last_name",type:"text",label:"user.registration.form.surname",placeholder:"",description:"",autocomplete:"family-name"},orderNumber:{key:"orderNumber",apiKey:"order_id",type:"text",label:"withdrawal.form.orderNumber",placeholder:"",description:"",autocomplete:"off"},withdrawalNote:{key:"withdrawalNote",apiKey:"note",type:"textarea",label:"withdrawal.form.note",placeholder:"",description:"",autocomplete:"off"},paymentMode:{key:"paymentMode",apiKey:"payment_mode_id",type:"paymentMode",label:"cart.paymentMode.label",placeholder:"",description:"",autocomplete:"off",options:()=>(A.payment_modes?Object.values(A.payment_modes):[]).map(e=>({value:String(e.id),label:e.name}))}};function Rx(e,t){return{...e,errors:e.errors||[],value:e.value??Lx(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){zx(this)}}}function Lx(e){return e==="checkbox"?!1:e==="file"?null:""}function zx(e){if(e.errors=[],!e.validator){e.required&&(e.value===!1||e.value===""||e.value===null||e.value===void 0)&&(e.errors=["common.fieldErrors.required"]);return}const t=e.validator.safeParse(e.value);t.success?e.errors=[]:e.errors=t.error.format()._errors}var Pt=class il{static#e={};static defineForm(t){Xe.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){Xe.default({fields:t})}static{il.defineFields(Nx)}static setRequiredApiKeys(t,r){il.#e[t]=r}static getFormOptions(t){return Xe.config.forms[t]}static createField(t,r){const n=il.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return Rx(n,r)}static getFormFields(t){return qx(t)}static getFieldInit(t){return Xe.config.fields[t]}};function qx(e){const t=Xe.config.forms[e];if(!t)throw new Error(`(formFields) Form ${e} not found`);const r=t.fields;return r||(console.warn("(formFields) No fields defined for form",e),[])}function qu(e){return e?e.filter(t=>t.mounted&&(t.errors?.length||t.apiErrors?.length)).length:0}function Ux(e,t){ne(t,!0);let r=_(t,"token",7),n=_(t,"ticketSaleId",7),i=null;const s=new Vp;Zp(t.$$host,s),ve(()=>{s.token=r(),s.ticketSaleId=n()}),Pt.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function a(){if(!i)return;const v=s.ticketSale.personalizations.length,m=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),y=Zf(v,(O,F)=>{const R=m[F-1].details;return O.push(R),O},[]);if(y.forEach(O=>{O.fields.forEach(F=>{O.validateField(F)})}),!Zf(v,(O,F)=>y[F-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const O=y.map(async(R,Y)=>{const N=s.ticketSale.personalizations[Y].id,X=R.fields.find(le=>le.key==="photo")?.value;if(!(X instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const q=await A.uploadPersonalizationPhoto(r(),N,X);return q.error?{ok:!1,error:q.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),F=(await Promise.all(O)).find(R=>!R.ok);if(F){i.details.apiErrors=[F.error];return}}const S={personalization:{ticket_sale_id:s.ticketSaleId,start_at:i.details.formData.start_at,personalizations:y.map((O,F)=>{const R=vw(O.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[F].id,customer:R}})}},k=await A.finalizePersonalizations(r(),S);if(k.error){i.details.apiErrors=k.error.error?[k.error.error]:[];return}const E=Xe.config.forms.personalization?.beforeSubmit;E&&E(S);const T=Xe.config.urls.annualTicketPersonalizationFormSubmit?.(r());T&&Xe.config.navigateTo(T)}let o=null,l=null,c=null,f=0;function u(v){v.querySelectorAll("go-field").forEach(m=>m.replaceChildren())}function p(){return o?!0:(o=t.$$host.querySelector("go-personalization-form"),o?(l=o.cloneNode(!0),u(l),c=new Comment("go-personalization-form-anchor"),o.after(c),!0):(console.warn("[personalization] No <go-personalization-form> supplied"),!1))}function h(v){if(!p()||!o||!l||!c)return;const m=o.parentElement;if(!m)return;const y=Math.max(v,1),S=Array.from(m.querySelectorAll("go-personalization-form"));for(;S.length<y;){const E=l.cloneNode(!0);u(E),m.insertBefore(E,c),S.push(E)}for(;S.length>y;){const E=S.pop();E&&E!==o&&E.remove()}const k=s.ticketSale?.personalizations??[];S.forEach((E,T)=>{const O=k[T];O&&(E.dataset.personalizationId=String(O.id))}),f=y}En(()=>{p(),t.$$host.addEventListener("go-submit",a),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),ve(()=>{if(!s.ticketSale)return;const v=s.ticketSale?.personalizations.length??1;v!==f&&h(v)});var g={details:s,get token(){return r()},set token(v){r(v),b()},get ticketSaleId(){return n()},set ticketSaleId(v){n(v),b()}};return ie(g)}customElements.define("go-annual-ticket-personalization-form",se(Ux,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var Bx=class{formId;form;#e=ae(Me([]));#t=D(()=>qu(this.fields)==0);get isValid(){return d(this.#t)}set isValid(e){$(this.#t,e)}#r=ae();get successMessage(){return d(this.#r)}set successMessage(e){$(this.#r,e,!0)}get formData(){function e(r){return dw(r)||lw(r)?r:r==="true"||r==="false"?r==="true":!Number.isNaN(+r)&&r.trim()!==""?+r:r}const t=this.fields.filter(r=>r!==void 0).filter(r=>r.type!=="file").filter(r=>r.value!=="");return Object.fromEntries(t.map(r=>[r.apiKey,e(r.value)]))}fieldValue(e){return this.fields.find(t=>t.key===e)?.value}get apiErrors(){return d(this.#e)}set apiErrors(e){if($(this.#e,[],!0),this.fields.forEach(t=>t.apiErrors=[]),tu(e)){$(this.#e,e,!0);return}if(e.errors&&tu(e.errors)&&$(this.#e,e.errors,!0),cw(e.error)){$(this.#e,[e.error],!0);return}for(const[t,r]of Object.entries(e)){if(t==="full_messages"||t==="success"||t==="errors")continue;const n=this.fields.find(i=>i.apiKey===t);if(!n){console.error(`(set apiErrors) Field with API key ${t} not found`);continue}n.apiErrors=r}}validateForm(){this.fields.forEach(e=>this.validateField(e))}validateField(e){if(e.validate(),e.apiKey==="password_confirmation"){const t=this.fields.find(r=>r.apiKey==="password");(!t||t&&e.value!==t.value)&&e.errors.push("user.fieldErrors.passwordMatch")}else if(e.apiKey==="email_confirmation"){const t=this.fields.find(r=>r.apiKey==="email");(!t||t&&e.value!==t.value)&&e.errors.push("user.fieldErrors.emailMatch")}}get fields(){const e=this.form.closest("go-form");return Array.from(this.form.querySelectorAll("go-field")).filter(t=>t.closest("go-form")===e).map(t=>t.getField?.()).filter(t=>!!t)}toString(){return`Form: ${this.formId}, Fields: [${this.fields.map(e=>e.key).join(", ")}], Data: ${JSON.stringify(this.formData)}`}fill(e){const t=this.fields;Object.entries(e).forEach(([r,n])=>{const i=t.find(s=>s.apiKey===r);if(!i){console.warn(`(FormDetails.fill) Field with API key ${r} not found.`);return}if(i.type==="select"&&!i.options?.().find(s=>s.value===n))throw new Error(`(FormDetails.fill) Field ${r} has invalid value: ${n}`);if(i.type==="checkbox"&&![!0,!1].includes(n))throw new Error(`(FormDetails.fill) Field ${r} has invalid value: ${n}`);i.value=n})}constructor(e,t){this.formId=e,this.form=t}},Wp="go-form-details",Vx=Ni(Wp),Li=Ri(Wp);function Hr(e,t,r){const n=e.firstElementChild||void 0;if(e.children?.length===1&&n?.tagName.toLowerCase()===t)return n;const i=document.createElement(t);r&&Object.entries(r).forEach(([a,o])=>{typeof o=="boolean"?o&&i.setAttribute(a,""):i.setAttribute(a,o)});const s=document.createDocumentFragment();for(;e.firstChild;)s.appendChild(e.firstChild);return i.appendChild(s),e.replaceChildren(i),i}var jx=B("<go-all-fields></go-all-fields> <go-form-feedback><go-errors-feedback></go-errors-feedback> <go-success-feedback></go-success-feedback></go-form-feedback> <go-submit> </go-submit>",3);function Zx(e,t){ne(t,!0);let r=_(t,"formId",7),n=_(t,"custom",7);const i=new Bx(r(),t.$$host);Vx(t.$$host,i);async function s(f){f.preventDefault(),f.stopPropagation(),i.validateForm(),i?.form?.dispatchEvent(new Event("go-after-validation",f)),i.isValid&&(i.apiErrors={},i.successMessage=void 0,i?.form?.dispatchEvent(new Event("go-submit",f)),t.$$host.dispatchEvent(new Event("submit",{bubbles:!0,composed:!0})))}En(()=>{const f=Hr(t.$$host,"form",{novalidate:!0});f.addEventListener("submit",s),i.form=f});var a={details:i,get formId(){return r()},set formId(f){r(f),b()},get custom(){return n()},set custom(f){n(f),b()}},o=re(),l=U(o),c=f=>{var u=jx(),p=U(u),h=V(p,2),g=V(h,2),v=M(g,!0);I(g),J(m=>H(v,m),[()=>A.t(Pt.getFormOptions(r())?.submitLabel||"Submit")]),x(f,u)};return ue(l,f=>{n()||f(c)}),x(e,o),ie(a)}customElements.define("go-form",se(Zx,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var Wx=B("<go-form></go-form>",2);function Hx(e,t){ne(t,!0);let r=_(t,"custom",7,!1),n=_(t,"redirectUrl",7,"");Pt.defineForm({id:"passwordReset",submitLabel:"user.passwordReset.actions.requestPasswordReset",fields:[{key:"email",required:!0}]});async function i(o){const l=o.target.details,c=l.formData,f=await A.passwordReset(n()?{...c,redirect_url:n()}:c);f.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),l.successMessage=f.data.message,l.apiErrors=[]):l.apiErrors=f.error.errors}var s={get custom(){return r()},set custom(o=!1){r(o),b()},get redirectUrl(){return n()},set redirectUrl(o=""){n(o),b()}},a=Wx();return Tn(a,"formId","passwordReset"),J(()=>Tn(a,"custom",r())),As("submit",a,i),x(e,a),ie(s)}customElements.define("go-password-reset",se(Hx,{redirectUrl:{attribute:"redirect-url",type:"String"},custom:{}},[],[]));var Gx=B("<go-form></go-form>",2);function Kx(e,t){ne(t,!0);let r=_(t,"accessToken",7,""),n=_(t,"client",7,""),i=_(t,"uid",7,"");Pt.defineForm({id:"setPassword",submitLabel:"user.passwordReset.actions.resetPassword",fields:[{key:"newPassword",required:!0},{key:"confirmPassword",required:!0}]});async function s(l){const c=l.target.details,f=await A.setNewPassword(c.formData,{"access-token":r(),client:n(),uid:i()});f.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),c.successMessage=f.data.message,c.apiErrors=[]):c.apiErrors=f.error.errors}var a={get accessToken(){return r()},set accessToken(l=""){r(l),b()},get client(){return n()},set client(l=""){n(l),b()},get uid(){return i()},set uid(l=""){i(l),b()}},o=Gx();return Tn(o,"formId","setPassword"),As("submit",o,s),x(e,o),ie(a)}customElements.define("go-set-password",se(Kx,{accessToken:{attribute:"access-token",type:"String"},client:{attribute:"client",type:"String"},uid:{attribute:"uid",type:"String"}},[],[]));function Yx(e,t){ne(t,!0),Pt.defineForm({id:"signIn",submitLabel:"common.actions.login",fields:[{key:"email",required:!0},{key:"password",required:!0}]});let r=_(t,"custom",7,!1);async function n(i){const s=i.target.details,a=await A.signIn(s.formData);a.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error.errors}return Hr(t.$$host,"go-form",{"form-id":"signIn",custom:r()}),t.$$host.addEventListener("submit",n),ie({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-sign-in",se(Yx,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function Jx(e,t){ne(t,!0);let r=_(t,"custom",7,!1);Pt.defineForm({id:"signUp",submitLabel:"common.actions.register",fields:[{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"newPassword",required:!0},{key:"confirmPassword",required:!0},{key:"acceptTerms",required:!0}]});async function n(i){const s=i.target.details,a=await A.signUp(s.formData,!1);a.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error.errors}return Hr(t.$$host,"go-form",{"form-id":"signUp",custom:r()}),t.$$host.addEventListener("submit",n),ie({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-sign-up",se(Jx,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function Qx(e,t){if(typeof e=="number"&&Number.isFinite(e))return e;if(e&&typeof e=="object"){const r=Object.values(e).reduce((n,i)=>typeof i=="number"&&Number.isFinite(i)?n+i:n,0);if(r>0)return r}return t}function Xx(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function eT(e){return Qx(Xx(e),0)}function tT(e,t){const r=$i(),n=new Set(t.map(i=>i.attributes.coupon).filter(Boolean).map(i=>i.toUpperCase()));return e.coupons.forEach(i=>r.addCoupon({...i,applied:i.kind!=="actionToken"||n.has(i.code)})),t.forEach(i=>{const s=i.attributes,a=s.uuid,o=e.items.find(l=>l.uuid===a);if(!o){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:s});return}r.addItem(rT(o,s))}),r}function rT(e,t){const r=wp(e.product)?1:eT(t),n=e.product.price_cents,i=n===0?0:t.price_cents??n,s=i<n;return ot({...e.product,price_cents:i},{quantity:r,time:e.time,voucher:e.voucher,mantle:e.mantle,display:{discounted:s,reference_uuid:e.uuid,originalPrice:n}})}var nT=class{#e=ae();get displayCart(){return d(this.#e)}set displayCart(e){$(this.#e,e,!0)}#t=ae(!1);get preview(){return d(this.#t)}set preview(e){$(this.#t,e,!0)}get totalPriceCents(){return this.displayCart?.amountToPayCents??0}get subtotalPriceCents(){return A.cart?.totalPriceCents??0}get discountedAmountCents(){return Math.max(0,this.subtotalPriceCents-this.totalPriceCents)}get isDiscounted(){return this.discountedAmountCents>0}async calculateDisplayCart(){const e=A.cart;if(e)try{const{items:t,coupons:r}=e.orderData(),n=await A.createCart({items:t,coupons:r});if(n?.data){this.displayCart=tT(e,n.data.items??[]);return}console.error("(go-cart) Unable to fetch discounted cart data",n?.error),this.displayCart=e}catch(t){console.error("(go-cart) Unable to fetch discounted cart data",t),this.displayCart=e}}},Hp="go-cart-details",iT=Ni(Hp),zi=Ri(Hp),sT=B('<span class="go-cart-item-title" data-testid="cart-item-title"> </span>');function Gp(e,t){ne(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(a){r(a),b()}},i=sT(),s=M(i,!0);return I(i),J(()=>H(s,r().product.title)),x(e,i),ie(n)}se(Gp,{cartItem:{}},[],[],{mode:"open"});var aT=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span><span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),oT=B('<span class="go-cart-item-title" data-testid="cart-item-title"><span class="go-cart-item-title-event-title"> </span><span class="go-cart-item-title-ticket-title"> </span></span><!>',1);function Kp(e,t){ne(t,!0);let r=_(t,"cartItem",7);if(!Hs(r().product))throw new Error("Product is not an event ticket");const n=r().product;var i={get cartItem(){return r()},set cartItem(h){r(h),b()}},s=oT(),a=U(s),o=M(a),l=M(o,!0);I(o);var c=V(o),f=M(c,!0);I(c),I(a);var u=V(a),p=h=>{var g=aT(),v=U(g),m=M(v,!0);I(v);var y=V(v),S=M(y,!0);I(y),J((k,E)=>{H(m,k),H(S,E)},[()=>ei(r().time,{month:"numeric",day:"numeric"},A.locale),()=>$n(r().time)]),x(h,g)};return ue(u,h=>{r().time&&h(p)}),J(()=>{H(l,n.event_title),H(f,n.title)}),x(e,s),ie(i)}se(Kp,{cartItem:{}},[],[],{mode:"open"});var lT=B('<span class="go-cart-item-subtitle" data-testid="cart-item-subtitle"> </span>'),uT=B('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),cT=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),dT=B('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!> <!>',1);function Yp(e,t){ne(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(p){r(p),b()}},i=dT(),s=U(i),a=M(s,!0);I(s);var o=V(s,2),l=p=>{var h=lT(),g=M(h,!0);I(h),J(()=>H(g,r().product.sub_title)),x(p,h)},c=D(()=>uo(r().product)&&r().product.sub_title);ue(o,p=>{d(c)&&p(l)});var f=V(o,2),u=p=>{var h=cT(),g=U(h),v=M(g,!0);I(g);var m=V(g,2),y=S=>{var k=uT(),E=M(k,!0);I(k),J(T=>H(E,T),[()=>$n(r().time)]),x(S,k)};ue(m,S=>{r().product.type==="Ticket"&&r().product.subtype==="timeslot"&&S(y)}),J(S=>H(v,S),[()=>ei(r().time,{month:"numeric",day:"numeric"},A.locale)]),x(p,h)};return ue(f,p=>{r().time&&p(u)}),J(()=>H(a,r().product.title)),x(e,i),ie(n)}se(Yp,{cartItem:{}},[],[],{mode:"open"});var fT=B('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),hT=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),pT=B('<span class="go-cart-item-custom" data-testid="cart-item-custom"> </span>'),mT=B('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <span class="go-cart-item-participants" data-testid="cart-item-participants"> </span> <!> <!>',1);function Jp(e,t){ne(t,!0);let r=_(t,"cartItem",7);const n=D(()=>r().product),i=D(()=>{if(!r().time)return null;try{return{date:ei(r().time,{year:"numeric",month:"numeric",day:"numeric"},A.locale),time:$n(r().time)}}catch{return{date:r().time,time:""}}}),s=m=>m==null?"":typeof m=="object"?JSON.stringify(m):String(m),a=D(()=>Object.entries(d(n).customs??{}).filter(([,m])=>m!=null&&m!==""));var o={get cartItem(){return r()},set cartItem(m){r(m),b()}},l=mT(),c=U(l),f=M(c,!0);I(c);var u=V(c,2),p=M(u,!0);I(u);var h=V(u,2),g=m=>{var y=hT(),S=U(y),k=M(S,!0);I(S);var E=V(S,2),T=O=>{var F=fT(),R=M(F,!0);I(F),J(()=>H(R,d(i).time)),x(O,F)};ue(E,O=>{d(i).time&&O(T)}),J(()=>H(k,d(i).date)),x(m,y)};ue(h,m=>{d(i)&&m(g)});var v=V(h,2);return Ne(v,17,()=>d(a),([m,y])=>m,(m,y)=>{var S=D(()=>eb(d(y),2));let k=()=>d(S)[0],E=()=>d(S)[1];var T=pT(),O=M(T);I(T),J(F=>H(O,`${k()??""}: ${F??""}`),[()=>s(E())]),x(m,T)}),J(m=>{H(f,d(n).title),H(p,m)},[()=>A.t("cart.item.participants",{count:d(n).participants})]),x(e,l),ie(o)}se(Jp,{cartItem:{}},[],[],{mode:"open"});function Qp(e,{min:t,max:r}){const n=e<t?Math.max(t,1):e+1;return n>r?e:n}function vT(e,{min:t,floor:r=0}){return e<=t?r:e-1}function gT(e,{min:t,max:r,floor:n=0}){if(!Number.isFinite(e)||e<=0)return n;let i=Math.floor(e);return i<t&&(i=t),i>r&&(i=r),i}function yT(e,{min:t,max:r,floor:n=0}){return e<0||e>r?!1:e===n||e>=t}function Xp(e,t){return Qp(e,t)>e}function em(e,{floor:t=0}){return e>t}var bT=B('<div class="go-quantity-stepper" role="group"><button type="button" tabindex="-1"><span aria-hidden="true"> </span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>');function tm(e,t){const r=mt();ne(t,!0);let n=_(t,"value",7),i=_(t,"min",7),s=_(t,"max",7),a=_(t,"floor",7,0),o=_(t,"label",7),l=_(t,"decreaseLabel",7),c=_(t,"increaseLabel",7),f=_(t,"onDecrementBelowMin",7),u=_(t,"removeAriaLabel",7),p=_(t,"removeLabel",7,"✕"),h=_(t,"onChange",7);const g=D(()=>f()!=null),v=D(()=>Math.max(i(),1)),m=D(()=>d(g)?{min:d(v),max:s(),floor:d(v)}:{min:i(),max:s(),floor:a()}),y=D(()=>d(g)&&n()<=d(v));let S,k=ae(!1);const E=D(()=>!d(y)&&!em(n(),d(m))),T=D(()=>!Xp(n(),d(m)));function O(G){G!==n()&&h()(G)}function F(){d(y)?f()():R()}function R(){em(n(),d(m))&&O(vT(n(),d(m)))}function Y(){Xp(n(),d(m))&&O(Qp(n(),d(m)))}function N(){const G=parseInt(S.value,10);if(d(g)&&(!Number.isFinite(G)||G<=0)){$(k,!1),S.value=String(n()),f()();return}const Q=gT(G,d(m));$(k,!1),S.value=String(Q),O(Q)}function X(){const G=S.value.trim();$(k,!(/^\d+$/.test(G)&&yT(parseInt(G,10),d(m))))}function q(G){switch(G.key){case"ArrowUp":G.preventDefault(),Y();break;case"ArrowDown":G.preventDefault(),R();break;case"Home":G.preventDefault(),O(d(m).floor);break;case"End":G.preventDefault(),O(s());break;case"Enter":G.preventDefault(),N();break}}var le={get value(){return n()},set value(G){n(G),b()},get min(){return i()},set min(G){i(G),b()},get max(){return s()},set max(G){s(G),b()},get floor(){return a()},set floor(G=0){a(G),b()},get label(){return o()},set label(G){o(G),b()},get decreaseLabel(){return l()},set decreaseLabel(G){l(G),b()},get increaseLabel(){return c()},set increaseLabel(G){c(G),b()},get onDecrementBelowMin(){return f()},set onDecrementBelowMin(G){f(G),b()},get removeAriaLabel(){return u()},set removeAriaLabel(G){u(G),b()},get removeLabel(){return p()},set removeLabel(G="✕"){p(G),b()},get onChange(){return h()},set onChange(G){h(G),b()}},he=bT(),j=M(he);let oe;var ee=M(j),fe=M(ee,!0);I(ee),I(j);var ce=V(j,2);Ms(ce),Ql(ce,G=>S=G,()=>S);var de=V(ce,2);return I(he),J(()=>{me(he,"aria-label",o()),oe=St(j,1,"go-quantity-stepper-button go-quantity-stepper-decrement",null,oe,{"go-quantity-stepper-remove":d(y)}),me(j,"title",d(y)?u():l()),me(j,"aria-controls",r),me(j,"aria-disabled",d(E)),H(fe,d(y)?p():"−"),me(ce,"id",r),me(ce,"aria-label",o()),Vl(ce,n()),me(ce,"aria-valuenow",n()),me(ce,"aria-valuemin",d(m).floor),me(ce,"aria-valuemax",s()),me(ce,"aria-invalid",d(k)?"true":void 0),me(de,"title",c()),me(de,"aria-controls",r),me(de,"aria-disabled",d(T))}),pt("click",j,F),pt("input",ce,X),pt("change",ce,N),As("blur",ce,N),pt("keydown",ce,q),pt("click",de,Y),x(e,he),ie(le)}cr(["click","input","change","keydown"]),se(tm,{value:{},min:{},max:{},floor:{},label:{},decreaseLabel:{},increaseLabel:{},onDecrementBelowMin:{},removeAriaLabel:{},removeLabel:{},onChange:{}},[],[],{mode:"open"});function _T(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[vo(n)];if(t<e)return e>n?[vo(e)]:[];const i=Math.max(e,n),s=[vo(n)];for(let a=i;a<=t;a++)a!==n&&s.push(vo(a));return s}function vo(e){return{value:e,label:e.toString()}}var wT=B("<option> </option>"),kT=B('<select class="go-quantity-select"></select>');function go(e,t){ne(t,!0);let r=_(t,"value",7),n=_(t,"min",7),i=_(t,"max",7),s=_(t,"label",7),a=_(t,"floor",7,0),o=_(t,"deselectable",7,!0),l=_(t,"onDecrementBelowMin",7),c=_(t,"onChange",7);const f=D(()=>Xe.config.quantityStepper);var u={get value(){return r()},set value(m){r(m),b()},get min(){return n()},set min(m){n(m),b()},get max(){return i()},set max(m){i(m),b()},get label(){return s()},set label(m){s(m),b()},get floor(){return a()},set floor(m=0){a(m),b()},get deselectable(){return o()},set deselectable(m=!0){o(m),b()},get onDecrementBelowMin(){return l()},set onDecrementBelowMin(m){l(m),b()},get onChange(){return c()},set onChange(m){c(m),b()}},p=re(),h=U(p),g=m=>{{let y=D(()=>o()?0:n()),S=D(()=>A.t("quantity.decrease")),k=D(()=>A.t("quantity.increase")),E=D(()=>A.t("quantity.remove")),T=D(()=>A.t("quantity.remove.label"));tm(m,{get value(){return r()},get min(){return n()},get max(){return i()},get floor(){return d(y)},get label(){return s()},get decreaseLabel(){return d(S)},get increaseLabel(){return d(k)},get onDecrementBelowMin(){return l()},get removeAriaLabel(){return d(E)},get removeLabel(){return d(T)},get onChange(){return c()}})}},v=m=>{var y=kT();Ne(y,21,()=>_T(n(),i(),{floor:o()?a():n()}),S=>S.value,(S,k)=>{var E=wT(),T=M(E,!0);I(E);var O={};J(()=>{Ff(E,r()===d(k).value),H(T,d(k).label),O!==(O=d(k).value)&&(E.value=(E.__value=d(k).value)??"")}),x(S,E)}),I(y),J(()=>me(y,"aria-label",s())),pt("change",y,S=>c()(parseInt(S.target.value,10))),x(m,y)};return ue(h,m=>{d(f)?m(g):m(v,-1)}),x(e,p),ie(u)}cr(["change"]),se(go,{value:{},min:{},max:{},label:{},floor:{},deselectable:{},onDecrementBelowMin:{},onChange:{}},[],[],{mode:"open"});function rm(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ST(e){if(Array.isArray(e))return e}function ET(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}function xT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
76
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TT(e,t){return ST(e)||ET(e,t)||AT(e,t)||xT()}function AT(e,t){if(e){if(typeof e=="string")return rm(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rm(e,t):void 0}}var nm=Object.entries,im=Object.setPrototypeOf,CT=Object.isFrozen,OT=Object.getPrototypeOf,DT=Object.getOwnPropertyDescriptor,Mt=Object.freeze,hr=Object.seal,qi=Object.create,sm=typeof Reflect<"u"&&Reflect,Uu=sm.apply,Bu=sm.construct;Mt||(Mt=function(t){return t}),hr||(hr=function(t){return t}),Uu||(Uu=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];return t.apply(r,i)}),Bu||(Bu=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return new t(...n)});var Ui=ft(Array.prototype.forEach),IT=ft(Array.prototype.lastIndexOf),am=ft(Array.prototype.pop),Bi=ft(Array.prototype.push),PT=ft(Array.prototype.splice),$t=Array.isArray,Gs=ft(String.prototype.toLowerCase),Vu=ft(String.prototype.toString),om=ft(String.prototype.match),Vi=ft(String.prototype.replace),lm=ft(String.prototype.indexOf),MT=ft(String.prototype.trim),$T=ft(Number.prototype.toString),FT=ft(Boolean.prototype.toString),um=typeof BigInt>"u"?null:ft(BigInt.prototype.toString),cm=typeof Symbol>"u"?null:ft(Symbol.prototype.toString),rt=ft(Object.prototype.hasOwnProperty),Ks=ft(Object.prototype.toString),xt=ft(RegExp.prototype.test),Ys=NT(TypeError);function ft(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Uu(e,t,n)}}function NT(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Bu(e,r)}}function Ae(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Gs;if(im&&im(e,null),!$t(t))return e;let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const s=r(i);s!==i&&(CT(t)||(t[n]=s),i=s)}e[i]=!0}return e}function RT(e){for(let t=0;t<e.length;t++)rt(e,t)||(e[t]=null);return e}function At(e){const t=qi(null);for(const n of nm(e)){var r=TT(n,2);const i=r[0],s=r[1];rt(e,i)&&($t(s)?t[i]=RT(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=At(s):t[i]=s)}return t}function LT(e){switch(typeof e){case"string":return e;case"number":return $T(e);case"boolean":return FT(e);case"bigint":return um?um(e):"0";case"symbol":return cm?cm(e):"Symbol()";case"undefined":return Ks(e);case"function":case"object":{if(e===null)return Ks(e);const t=e,r=Gr(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:Ks(n)}return Ks(e)}default:return Ks(e)}}function Gr(e,t){for(;e!==null;){const n=DT(e,t);if(n){if(n.get)return ft(n.get);if(typeof n.value=="function")return ft(n.value)}e=OT(e)}function r(){return null}return r}function zT(e){try{return xt(e,""),!0}catch{return!1}}var dm=Mt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ju=Mt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Zu=Mt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),qT=Mt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Wu=Mt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),UT=Mt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fm=Mt(["#text"]),hm=Mt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Hu=Mt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),pm=Mt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),yo=Mt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),BT=hr(/{{[\w\W]*|^[\w\W]*}}/g),VT=hr(/<%[\w\W]*|^[\w\W]*%>/g),jT=hr(/\${[\w\W]*/g),ZT=hr(/^data-[\-\w.\u00B7-\uFFFF]+$/),WT=hr(/^aria-[\-\w]+$/),mm=hr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),HT=hr(/^(?:\w+script|data):/i),GT=hr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),KT=hr(/^html$/i),YT=hr(/^[a-z][.\w]*(-[.\w]+)+$/i),Kr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},JT=function(){return typeof window>"u"?null:window},QT=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},vm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function gm(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:JT();const t=ge=>gm(ge);if(t.version="3.4.7",t.removed=[],!e||!e.document||e.document.nodeType!==Kr.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const n=r,i=n.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,o=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,f=e.trustedTypes,u=o.prototype,p=Gr(u,"cloneNode"),h=Gr(u,"remove"),g=Gr(u,"nextSibling"),v=Gr(u,"childNodes"),m=Gr(u,"parentNode"),y=Gr(u,"shadowRoot"),S=Gr(u,"attributes"),k=a&&a.prototype?Gr(a.prototype,"nodeType"):null,E=a&&a.prototype?Gr(a.prototype,"nodeName"):null;if(typeof s=="function"){const ge=r.createElement("template");ge.content&&ge.content.ownerDocument&&(r=ge.content.ownerDocument)}let T,O="";const F=r,R=F.implementation,Y=F.createNodeIterator,N=F.createDocumentFragment,X=F.getElementsByTagName,q=n.importNode;let le=vm();t.isSupported=typeof nm=="function"&&typeof m=="function"&&R&&R.createHTMLDocument!==void 0;const he=BT,j=VT,oe=jT,ee=ZT,fe=WT,ce=HT,de=GT,G=YT;let Q=mm,P=null;const te=Ae({},[...dm,...ju,...Zu,...Wu,...fm]);let L=null;const be=Ae({},[...hm,...Hu,...pm,...yo]);let Z=Object.seal(qi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),w=null,_e=null;const we=Object.seal(qi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let De=!0,Le=!0,je=!1,bt=!0,st=!1,Nt=!0,_t=!1,Rt=!1,nr=!1,Ht=!1,mr=!1,Ir=!1,Pr=!0,yn=!1;const Mr="user-content-";let vr=!0,Xr=!1,en={},Tt=null;const Un=Ae({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let is=null;const ss=Ae({},["audio","video","img","source","image","track"]);let ma=null;const id=Ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),vi="http://www.w3.org/1998/Math/MathML",as="http://www.w3.org/2000/svg",gr="http://www.w3.org/1999/xhtml";let Bn=gr,sd=!1,ad=null;const _F=Ae({},[vi,as,gr],Vu);let od=Ae({},["mi","mo","mn","ms","mtext"]),ld=Ae({},["annotation-xml"]);const wF=Ae({},["title","style","font","a","script"]);let va=null;const kF=["application/xhtml+xml","text/html"],SF="text/html";let lt=null,os=null;const EF=r.createElement("form"),iy=function(C){return C instanceof RegExp||C instanceof Function},ud=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(os&&os===C)return;(!C||typeof C!="object")&&(C={}),C=At(C),va=kF.indexOf(C.PARSER_MEDIA_TYPE)===-1?SF:C.PARSER_MEDIA_TYPE,lt=va==="application/xhtml+xml"?Vu:Gs,P=rt(C,"ALLOWED_TAGS")&&$t(C.ALLOWED_TAGS)?Ae({},C.ALLOWED_TAGS,lt):te,L=rt(C,"ALLOWED_ATTR")&&$t(C.ALLOWED_ATTR)?Ae({},C.ALLOWED_ATTR,lt):be,ad=rt(C,"ALLOWED_NAMESPACES")&&$t(C.ALLOWED_NAMESPACES)?Ae({},C.ALLOWED_NAMESPACES,Vu):_F,ma=rt(C,"ADD_URI_SAFE_ATTR")&&$t(C.ADD_URI_SAFE_ATTR)?Ae(At(id),C.ADD_URI_SAFE_ATTR,lt):id,is=rt(C,"ADD_DATA_URI_TAGS")&&$t(C.ADD_DATA_URI_TAGS)?Ae(At(ss),C.ADD_DATA_URI_TAGS,lt):ss,Tt=rt(C,"FORBID_CONTENTS")&&$t(C.FORBID_CONTENTS)?Ae({},C.FORBID_CONTENTS,lt):Un,w=rt(C,"FORBID_TAGS")&&$t(C.FORBID_TAGS)?Ae({},C.FORBID_TAGS,lt):At({}),_e=rt(C,"FORBID_ATTR")&&$t(C.FORBID_ATTR)?Ae({},C.FORBID_ATTR,lt):At({}),en=rt(C,"USE_PROFILES")?C.USE_PROFILES&&typeof C.USE_PROFILES=="object"?At(C.USE_PROFILES):C.USE_PROFILES:!1,De=C.ALLOW_ARIA_ATTR!==!1,Le=C.ALLOW_DATA_ATTR!==!1,je=C.ALLOW_UNKNOWN_PROTOCOLS||!1,bt=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,st=C.SAFE_FOR_TEMPLATES||!1,Nt=C.SAFE_FOR_XML!==!1,_t=C.WHOLE_DOCUMENT||!1,Ht=C.RETURN_DOM||!1,mr=C.RETURN_DOM_FRAGMENT||!1,Ir=C.RETURN_TRUSTED_TYPE||!1,nr=C.FORCE_BODY||!1,Pr=C.SANITIZE_DOM!==!1,yn=C.SANITIZE_NAMED_PROPS||!1,vr=C.KEEP_CONTENT!==!1,Xr=C.IN_PLACE||!1,Q=zT(C.ALLOWED_URI_REGEXP)?C.ALLOWED_URI_REGEXP:mm,Bn=typeof C.NAMESPACE=="string"?C.NAMESPACE:gr,od=rt(C,"MATHML_TEXT_INTEGRATION_POINTS")&&C.MATHML_TEXT_INTEGRATION_POINTS&&typeof C.MATHML_TEXT_INTEGRATION_POINTS=="object"?At(C.MATHML_TEXT_INTEGRATION_POINTS):Ae({},["mi","mo","mn","ms","mtext"]),ld=rt(C,"HTML_INTEGRATION_POINTS")&&C.HTML_INTEGRATION_POINTS&&typeof C.HTML_INTEGRATION_POINTS=="object"?At(C.HTML_INTEGRATION_POINTS):Ae({},["annotation-xml"]);const W=rt(C,"CUSTOM_ELEMENT_HANDLING")&&C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING=="object"?At(C.CUSTOM_ELEMENT_HANDLING):qi(null);if(Z=qi(null),rt(W,"tagNameCheck")&&iy(W.tagNameCheck)&&(Z.tagNameCheck=W.tagNameCheck),rt(W,"attributeNameCheck")&&iy(W.attributeNameCheck)&&(Z.attributeNameCheck=W.attributeNameCheck),rt(W,"allowCustomizedBuiltInElements")&&typeof W.allowCustomizedBuiltInElements=="boolean"&&(Z.allowCustomizedBuiltInElements=W.allowCustomizedBuiltInElements),st&&(Le=!1),mr&&(Ht=!0),en&&(P=Ae({},fm),L=qi(null),en.html===!0&&(Ae(P,dm),Ae(L,hm)),en.svg===!0&&(Ae(P,ju),Ae(L,Hu),Ae(L,yo)),en.svgFilters===!0&&(Ae(P,Zu),Ae(L,Hu),Ae(L,yo)),en.mathMl===!0&&(Ae(P,Wu),Ae(L,pm),Ae(L,yo))),we.tagCheck=null,we.attributeCheck=null,rt(C,"ADD_TAGS")&&(typeof C.ADD_TAGS=="function"?we.tagCheck=C.ADD_TAGS:$t(C.ADD_TAGS)&&(P===te&&(P=At(P)),Ae(P,C.ADD_TAGS,lt))),rt(C,"ADD_ATTR")&&(typeof C.ADD_ATTR=="function"?we.attributeCheck=C.ADD_ATTR:$t(C.ADD_ATTR)&&(L===be&&(L=At(L)),Ae(L,C.ADD_ATTR,lt))),rt(C,"ADD_URI_SAFE_ATTR")&&$t(C.ADD_URI_SAFE_ATTR)&&Ae(ma,C.ADD_URI_SAFE_ATTR,lt),rt(C,"FORBID_CONTENTS")&&$t(C.FORBID_CONTENTS)&&(Tt===Un&&(Tt=At(Tt)),Ae(Tt,C.FORBID_CONTENTS,lt)),rt(C,"ADD_FORBID_CONTENTS")&&$t(C.ADD_FORBID_CONTENTS)&&(Tt===Un&&(Tt=At(Tt)),Ae(Tt,C.ADD_FORBID_CONTENTS,lt)),vr&&(P["#text"]=!0),_t&&Ae(P,["html","head","body"]),P.table&&(Ae(P,["tbody"]),delete w.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ys('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ys('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=C.TRUSTED_TYPES_POLICY,O=T.createHTML("")}else T===void 0&&(T=QT(f,i)),T!==null&&typeof O=="string"&&(O=T.createHTML(""));(le.uponSanitizeElement.length>0||le.uponSanitizeAttribute.length>0)&&P===te&&(P=At(P)),le.uponSanitizeAttribute.length>0&&L===be&&(L=At(L)),Mt&&Mt(C),os=C},sy=Ae({},[...ju,...Zu,...qT]),ay=Ae({},[...Wu,...UT]),xF=function(C){let W=m(C);(!W||!W.tagName)&&(W={namespaceURI:Bn,tagName:"template"});const pe=Gs(C.tagName),Ie=Gs(W.tagName);return ad[C.namespaceURI]?C.namespaceURI===as?W.namespaceURI===gr?pe==="svg":W.namespaceURI===vi?pe==="svg"&&(Ie==="annotation-xml"||od[Ie]):!!sy[pe]:C.namespaceURI===vi?W.namespaceURI===gr?pe==="math":W.namespaceURI===as?pe==="math"&&ld[Ie]:!!ay[pe]:C.namespaceURI===gr?W.namespaceURI===as&&!ld[Ie]||W.namespaceURI===vi&&!od[Ie]?!1:!ay[pe]&&(wF[pe]||!sy[pe]):!!(va==="application/xhtml+xml"&&ad[C.namespaceURI]):!1},$r=function(C){Bi(t.removed,{element:C});try{m(C).removeChild(C)}catch{h(C)}},gi=function(C,W){try{Bi(t.removed,{attribute:W.getAttributeNode(C),from:W})}catch{Bi(t.removed,{attribute:null,from:W})}if(W.removeAttribute(C),C==="is")if(Ht||mr)try{$r(W)}catch{}else try{W.setAttribute(C,"")}catch{}},oy=function(C){let W=null,pe=null;if(nr)C="<remove></remove>"+C;else{const tt=om(C,/^[\r\n\t ]+/);pe=tt&&tt[0]}va==="application/xhtml+xml"&&Bn===gr&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");const Ie=T?T.createHTML(C):C;if(Bn===gr)try{W=new c().parseFromString(Ie,va)}catch{}if(!W||!W.documentElement){W=R.createDocument(Bn,"template",null);try{W.documentElement.innerHTML=sd?O:Ie}catch{}}const ze=W.body||W.documentElement;return C&&pe&&ze.insertBefore(r.createTextNode(pe),ze.childNodes[0]||null),Bn===gr?X.call(W,_t?"html":"body")[0]:_t?W.documentElement:ze},ly=function(C){return Y.call(C.ownerDocument||C,C,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},uy=function(C){C.normalize();const W=Y.call(C.ownerDocument||C,C,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let pe=W.nextNode();for(;pe;){let Ie=pe.data;Ui([he,j,oe],ze=>{Ie=Vi(Ie,ze," ")}),pe.data=Ie,pe=W.nextNode()}},tl=function(C){const W=E?E(C):null;return typeof W!="string"||lt(W)!=="form"?!1:typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||C.attributes!==S(C)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function"||C.nodeType!==k(C)||C.childNodes!==v(C)},ga=function(C){if(!k||typeof C!="object"||C===null)return!1;try{return k(C)===Kr.documentFragment}catch{return!1}},rl=function(C){if(!k||typeof C!="object"||C===null)return!1;try{return typeof k(C)=="number"}catch{return!1}};function bn(ge,C,W){Ui(ge,pe=>{pe.call(t,C,W,os)})}const cy=function(C){let W=null;if(bn(le.beforeSanitizeElements,C,null),tl(C))return $r(C),!0;const pe=lt(C.nodeName);if(bn(le.uponSanitizeElement,C,{tagName:pe,allowedTags:P}),Nt&&C.hasChildNodes()&&!rl(C.firstElementChild)&&xt(/<[/\w!]/g,C.innerHTML)&&xt(/<[/\w!]/g,C.textContent)||Nt&&C.namespaceURI===gr&&pe==="style"&&rl(C.firstElementChild)||C.nodeType===Kr.progressingInstruction||Nt&&C.nodeType===Kr.comment&&xt(/<[/\w]/g,C.data))return $r(C),!0;if(w[pe]||!(we.tagCheck instanceof Function&&we.tagCheck(pe))&&!P[pe]){if(!w[pe]&&fy(pe)&&(Z.tagNameCheck instanceof RegExp&&xt(Z.tagNameCheck,pe)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(pe)))return!1;if(vr&&!Tt[pe]){const Ie=m(C),ze=v(C);if(ze&&Ie){const tt=ze.length;for(let Gt=tt-1;Gt>=0;--Gt){const Vn=p(ze[Gt],!0);Ie.insertBefore(Vn,g(C))}}}return $r(C),!0}return(k?k(C):C.nodeType)===Kr.element&&!xF(C)||(pe==="noscript"||pe==="noembed"||pe==="noframes")&&xt(/<\/no(script|embed|frames)/i,C.innerHTML)?($r(C),!0):(st&&C.nodeType===Kr.text&&(W=C.textContent,Ui([he,j,oe],Ie=>{W=Vi(W,Ie," ")}),C.textContent!==W&&(Bi(t.removed,{element:C.cloneNode()}),C.textContent=W)),bn(le.afterSanitizeElements,C,null),!1)},dy=function(C,W,pe){if(_e[W]||Pr&&(W==="id"||W==="name")&&(pe in r||pe in EF))return!1;const Ie=L[W]||we.attributeCheck instanceof Function&&we.attributeCheck(W,C);if(!(Le&&!_e[W]&&xt(ee,W))){if(!(De&&xt(fe,W))){if(!Ie||_e[W]){if(!(fy(C)&&(Z.tagNameCheck instanceof RegExp&&xt(Z.tagNameCheck,C)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(C))&&(Z.attributeNameCheck instanceof RegExp&&xt(Z.attributeNameCheck,W)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(W,C))||W==="is"&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&xt(Z.tagNameCheck,pe)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(pe))))return!1}else if(!ma[W]){if(!xt(Q,Vi(pe,de,""))){if(!((W==="src"||W==="xlink:href"||W==="href")&&C!=="script"&&lm(pe,"data:")===0&&is[C])){if(!(je&&!xt(ce,Vi(pe,de,"")))){if(pe)return!1}}}}}}return!0},TF=Ae({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),fy=function(C){return!TF[Gs(C)]&&xt(G,C)},hy=function(C){bn(le.beforeSanitizeAttributes,C,null);const W=C.attributes;if(!W||tl(C))return;const pe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0};let Ie=W.length;for(;Ie--;){const ze=W[Ie],tt=ze.name,Gt=ze.namespaceURI,Vn=ze.value,_n=lt(tt),cd=Vn;let wt=tt==="value"?cd:MT(cd);if(pe.attrName=_n,pe.attrValue=wt,pe.keepAttr=!0,pe.forceKeepAttr=void 0,bn(le.uponSanitizeAttribute,C,pe),wt=pe.attrValue,yn&&(_n==="id"||_n==="name")&&lm(wt,Mr)!==0&&(gi(tt,C),wt=Mr+wt),Nt&&xt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,wt)){gi(tt,C);continue}if(_n==="attributename"&&om(wt,"href")){gi(tt,C);continue}if(pe.forceKeepAttr)continue;if(!pe.keepAttr){gi(tt,C);continue}if(!bt&&xt(/\/>/i,wt)){gi(tt,C);continue}st&&Ui([he,j,oe],my=>{wt=Vi(wt,my," ")});const py=lt(C.nodeName);if(!dy(py,_n,wt)){gi(tt,C);continue}if(T&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Gt)switch(f.getAttributeType(py,_n)){case"TrustedHTML":wt=T.createHTML(wt);break;case"TrustedScriptURL":wt=T.createScriptURL(wt);break}if(wt!==cd)try{Gt?C.setAttributeNS(Gt,tt,wt):C.setAttribute(tt,wt),tl(C)?$r(C):am(t.removed)}catch{gi(tt,C)}}bn(le.afterSanitizeAttributes,C,null)},nl=function(C){let W=null;const pe=ly(C);for(bn(le.beforeSanitizeShadowDOM,C,null);W=pe.nextNode();)if(bn(le.uponSanitizeShadowNode,W,null),cy(W),hy(W),ga(W.content)&&nl(W.content),(k?k(W):W.nodeType)===Kr.element){const Ie=y?y(W):W.shadowRoot;ga(Ie)&&(ls(Ie),nl(Ie))}bn(le.afterSanitizeShadowDOM,C,null)},ls=function(C){const W=k?k(C):C.nodeType;if(W===Kr.element){const ze=y?y(C):C.shadowRoot;ga(ze)&&(ls(ze),nl(ze))}const pe=v?v(C):C.childNodes;if(!pe)return;const Ie=[];Ui(pe,ze=>{Bi(Ie,ze)});for(const ze of Ie)ls(ze);if(W===Kr.element){const ze=E?E(C):null;if(typeof ze=="string"&&lt(ze)==="template"){const tt=C.content;ga(tt)&&ls(tt)}}};return t.sanitize=function(ge){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=null,pe=null,Ie=null,ze=null;if(sd=!ge,sd&&(ge="<!-->"),typeof ge!="string"&&!rl(ge)&&(ge=LT(ge),typeof ge!="string"))throw Ys("dirty is not a string, aborting");if(!t.isSupported)return ge;if(Rt||ud(C),t.removed=[],typeof ge=="string"&&(Xr=!1),Xr){const Vn=E?E(ge):ge.nodeName;if(typeof Vn=="string"){const _n=lt(Vn);if(!P[_n]||w[_n])throw Ys("root node is forbidden and cannot be sanitized in-place")}if(tl(ge))throw Ys("root node is clobbered and cannot be sanitized in-place");ls(ge)}else if(rl(ge))W=oy("<!---->"),pe=W.ownerDocument.importNode(ge,!0),pe.nodeType===Kr.element&&pe.nodeName==="BODY"||pe.nodeName==="HTML"?W=pe:W.appendChild(pe),ls(pe);else{if(!Ht&&!st&&!_t&&ge.indexOf("<")===-1)return T&&Ir?T.createHTML(ge):ge;if(W=oy(ge),!W)return Ht?null:Ir?O:""}W&&nr&&$r(W.firstChild);const tt=ly(Xr?ge:W);for(;Ie=tt.nextNode();)cy(Ie),hy(Ie),ga(Ie.content)&&nl(Ie.content);if(Xr)return st&&uy(ge),ge;if(Ht){if(st&&uy(W),mr)for(ze=N.call(W.ownerDocument);W.firstChild;)ze.appendChild(W.firstChild);else ze=W;return(L.shadowroot||L.shadowrootmode)&&(ze=q.call(n,ze,!0)),ze}let Gt=_t?W.outerHTML:W.innerHTML;return _t&&P["!doctype"]&&W.ownerDocument&&W.ownerDocument.doctype&&W.ownerDocument.doctype.name&&xt(KT,W.ownerDocument.doctype.name)&&(Gt="<!DOCTYPE "+W.ownerDocument.doctype.name+`>
77
- `+Gt),st&&Ui([he,j,oe],Vn=>{Gt=Vi(Gt,Vn," ")}),T&&Ir?T.createHTML(Gt):Gt},t.setConfig=function(){ud(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Rt=!0},t.clearConfig=function(){os=null,Rt=!1},t.isValidAttribute=function(ge,C,W){return os||ud({}),dy(lt(ge),lt(C),W)},t.addHook=function(ge,C){typeof C=="function"&&Bi(le[ge],C)},t.removeHook=function(ge,C){if(C!==void 0){const W=IT(le[ge],C);return W===-1?void 0:PT(le[ge],W,1)[0]}return am(le[ge])},t.removeHooks=function(ge){le[ge]=[]},t.removeAllHooks=function(){le=vm()},t}var ym=gm(),XT=B('<span class="go-sub-ticket-description"></span>'),eA=B('<span class="go-sub-ticket-quantity"> </span>'),tA=B('<li><span class="go-sub-ticket-title"> </span> <!> <!></li>');function Gu(e,t){ne(t,!0);let r=_(t,"sub",7),n=_(t,"quantity",7),i=_(t,"max",23,()=>r().max_persons),s=_(t,"onChange",7),a=_(t,"preview",7,!1);const o=D(()=>r().min_persons===r().max_persons);var l={get sub(){return r()},set sub(y){r(y),b()},get quantity(){return n()},set quantity(y){n(y),b()},get max(){return i()},set max(y=r.max_persons){i(y),b()},get onChange(){return s()},set onChange(y){s(y),b()},get preview(){return a()},set preview(y=!1){a(y),b()}},c=tA(),f=M(c),u=M(f,!0);I(f);var p=V(f,2),h=y=>{var S=XT();Af(S,()=>ym.sanitize(r().description),!0),I(S),x(y,S)};ue(p,y=>{r().description&&y(h)});var g=V(p,2),v=y=>{var S=eA(),k=M(S,!0);I(S),J(()=>{me(S,"data-testid",`sub-ticket-${r().id??""}-quantity`),H(k,n())}),x(y,S)},m=y=>{{let S=D(()=>r().title||A.t("cart.content.table.edit"));go(y,{get value(){return n()},get min(){return r().min_persons},get max(){return i()},get label(){return d(S)},deselectable:!1,get onChange(){return s()}})}};return ue(g,y=>{a()||d(o)?y(v):y(m,-1)}),I(c),J(()=>{St(c,1,dr(["go-sub-ticket",d(o)&&"is-fixed",a()&&"is-preview",n()===0&&"is-empty"])),me(c,"data-testid",`sub-ticket-${r().id??""}`),H(u,r().title)}),x(e,c),ie(l)}se(Gu,{sub:{},quantity:{},max:{},onChange:{},preview:{}},[],[],{mode:"open"});function bm(e){const{product:t}=e;return Hs(t)?[t.event_title,e.time&&$n(e.time),t.title].filter(Boolean).join(" - "):t.title}var rA=B('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),nA=B('<span class="go-cart-item-price-discounted"> </span>'),iA=B('<span data-testid="cart-item-participant-count"> </span>'),sA=B('<span data-testid="cart-item-voucher-quantity"> </span>'),aA=B("<span> </span>"),oA=B('<li class="go-cart-item-remove"><button class="go-cart-remove"> </button></li>'),lA=B('<ul class="go-sub-tickets" role="list"></ul>'),uA=B('<article class="go-cart-item-content"><ul><li class="go-cart-item-title-container"><!></li> <li class="go-cart-item-price"><!></li> <li class="go-cart-item-count"><!></li> <!> <li class="go-cart-item-sum"> </li></ul></article> <!>',1);function _m(e,t){ne(t,!0);let r=_(t,"displayItem",7),n=_(t,"displayCart",7),i=_(t,"preview",7),s=ae(void 0),a=ae(Me({}));const o=D(()=>A.cart?.items.find(y=>y.uuid===(r().display?.reference_uuid??r().uuid))),l=D(()=>Vr(r().product)?r().product:null),c=$i();ve(()=>{A.cart?.items.map(y=>y.quantity),A.cart?.items.forEach(y=>y.mantle&&Object.values(y.mantle.composition)),Re(()=>{$(s,A.capacityManager.capacity(n(),r(),c),!0),$(a,d(o)?A.capacityManager.subTicketMaxes(A.cart,d(o),c):{},!0)})});function f(y){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}d(o).quantity=Math.max(0,d(o).quantity-r().quantity+y)}function u(){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}const y=Math.max(0,d(o).quantity-r().quantity);y===0?A.cart?.deleteItem(d(o)):d(o).quantity=y}function p(y,S){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}d(o).mantle&&(d(o).mantle.composition[y]=S)}var h={get displayItem(){return r()},set displayItem(y){r(y),b()},get displayCart(){return n()},set displayCart(y){n(y),b()},get preview(){return i()},set preview(y){i(y),b()}},g=re(),v=U(g),m=y=>{var S=uA(),k=U(S),E=M(k),T=M(E),O=M(T),F=Z=>{Yp(Z,{get cartItem(){return r()}})},R=Z=>{Kp(Z,{get cartItem(){return r()}})},Y=Z=>{Gp(Z,{get cartItem(){return r()}})},N=Z=>{Jp(Z,{get cartItem(){return r()}})};ue(O,Z=>{r().product.type==="Ticket"?Z(F):r().product.type==="Event"?Z(R,1):r().product.type==="Coupon"?Z(Y,2):r().product.type==="Tour"&&Z(N,3)}),I(T);var X=V(T,2),q=M(X),le=Z=>{var w=rA(),_e=U(w),we=M(_e,!0);I(_e);var De=V(_e,2),Le=M(De,!0);I(De),J((je,bt)=>{H(we,je),H(Le,bt)},[()=>yt(r().display.originalPrice),()=>yt(r().final_price_cents)]),x(Z,w)},he=Z=>{var w=nA(),_e=M(w,!0);I(w),J(we=>H(_e,we),[()=>yt(r().final_price_cents)]),x(Z,w)};ue(q,Z=>{r().display?.discounted?Z(le):Z(he,-1)}),I(X);var j=V(X,2),oe=M(j),ee=Z=>{var w=iA(),_e=M(w,!0);I(w),J(()=>H(_e,r().product.participants)),x(Z,w)},fe=Z=>{var w=sA(),_e=M(w,!0);I(w),J(()=>H(_e,r().quantity)),x(Z,w)},ce=Z=>{var w=aA(),_e=M(w,!0);I(w),J(()=>H(_e,r().quantity)),x(Z,w)},de=Z=>{{let w=D(()=>r().quantity??0),_e=D(()=>bm(r()));go(Z,{get value(){return d(w)},get min(){return d(s).min},get max(){return d(s).max},get label(){return d(_e)},floor:1,onChange:f,onDecrementBelowMin:u})}};ue(oe,Z=>{r().product.type==="Tour"?Z(ee):r().voucher?.code?Z(fe,1):i()?Z(ce,2):Z(de,-1)}),I(j);var G=V(j,2),Q=Z=>{var w=oA(),_e=M(w),we=M(_e,!0);I(_e),I(w),J((De,Le)=>{me(_e,"aria-label",De),H(we,Le)},[()=>A.t("cart.item.aria.removeItem"),()=>A.t("cart.item.remove")]),pt("click",_e,u),x(Z,w)};ue(G,Z=>{i()||Z(Q)});var P=V(G,2),te=M(P,!0);I(P),I(E),I(k);var L=V(k,2),be=Z=>{var w=lA();Ne(w,21,()=>Vs(d(l)),_e=>_e.id,(_e,we)=>{{let De=D(()=>r().mantle?.composition?.[d(we).id]??0);Gu(_e,{get sub(){return d(we)},get preview(){return i()},get quantity(){return d(De)},get max(){return d(a)[d(we).id]},onChange:Le=>p(d(we).id,Le)})}}),I(w),J(()=>me(w,"aria-label",d(l).title)),x(Z,w)};ue(L,Z=>{d(l)&&Z(be)}),J(Z=>H(te,Z),[()=>yt(r().total_price_cents)]),x(y,S)};return ue(v,y=>{d(s)&&y(m)}),x(e,g),ie(h)}cr(["click"]),se(_m,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var cA=B('<li class="go-cart-header-remove"></li>'),dA=B('<li class="go-cart-item"><!></li>'),fA=B('<ol data-testid="cart-items"><li class="go-cart-header"><ul><li class="go-cart-header-title"> </li> <li class="go-cart-header-price"> </li> <li class="go-cart-header-count"> </li> <!> <li class="go-cart-header-sum"> </li></ul></li> <!></ol>');function hA(e,t){ne(t,!0);const r=zi(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=fA(),c=M(l),f=M(c),u=M(f),p=M(u,!0);I(u);var h=V(u,2),g=M(h,!0);I(h);var v=V(h,2),m=M(v,!0);I(v);var y=V(v,2),S=O=>{var F=cA();x(O,F)};ue(y,O=>{d(n).preview||O(S)});var k=V(y,2),E=M(k,!0);I(k),I(f),I(c);var T=V(c,2);Ne(T,17,()=>d(n).displayCart.items,O=>O.uuid,(O,F)=>{var R=dA();_m(M(R),{get displayItem(){return d(F)},get displayCart(){return d(n).displayCart},get preview(){return d(n).preview}}),I(R),x(O,R)}),I(l),J((O,F,R,Y)=>{H(p,O),H(g,F),H(m,R),H(E,Y)},[()=>A.t("cart.content.table.desc"),()=>A.t("cart.content.table.price"),()=>A.t("cart.content.table.quantity"),()=>A.t("cart.content.table.total")]),x(o,l)};ue(s,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.items.length&&o(a)}),x(e,i),ie()}customElements.define("go-cart-items",se(hA,{},[],[]));var pA=B('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),mA=B('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),vA=B('<ol data-testid="cart-coupons"></ol>');function gA(e,t){ne(t,!0);const r=zi(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=vA();Ne(l,21,()=>d(n).displayCart.coupons,c=>c.code,(c,f)=>{var u=mA();let p;var h=M(u),g=M(h),v=M(g),m=M(v,!0);I(v);var y=V(v,2),S=k=>{var E=pA(),T=M(E);I(E),J(O=>me(T,"aria-label",O),[()=>A.t("cart.coupons.remove")]),pt("click",T,()=>A.cart?.removeCoupon(d(f).code)),x(k,E)};ue(y,k=>{d(n).preview||k(S)}),I(g),I(h),I(u),J(()=>{p=St(u,1,"go-cart-coupon",null,p,{"go-cart-coupon-inactive":!d(f).applied}),H(m,d(f).code)}),x(c,u)}),I(l),x(o,l)};ue(s,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.coupons.length>0&&o(a)}),x(e,i),ie()}cr(["click"]),customElements.define("go-cart-coupons",se(gA,{},[],[]));var yA=B('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function bA(e,t){ne(t,!0);const r=zi(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=yA(),c=M(l,!0);I(l),J(f=>H(c,f),[()=>yt(d(n).totalPriceCents)]),x(o,l)};ue(s,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.items.length&&o(a)}),x(e,i),ie()}customElements.define("go-cart-total-amount",se(bA,{},[],[]));function _A(e,t){ne(t,!0);const r=_(t,"preview",7,!1),n=new nT;iT(t.$$host,n),ve(()=>{n.preview=r()}),ve(()=>{A.cart&&(A.cart.items.map(s=>s.uuid+":"+s.quantity+":"+s.time),A.cart.coupons.map(s=>s.code).join("|"),A.cart.items.forEach(s=>s.mantle&&Object.values(s.mantle.composition)),Re(()=>n.calculateDisplayCart()))});async function i(){const s=t.$$host.querySelectorAll("go-coupon-redemption");let a=!0;for(const o of s){const l=await o.flush?.();l&&!l.success&&(a=!1)}return a}return t.$$host.addEventListener("click",async s=>{const a=s.target.closest("go-submit");if(!a)return;const o=a.closest("go-form");if(o&&t.$$host.contains(o))return;const l=await i();l&&t.$$host.dispatchEvent(new CustomEvent("go-submit",{detail:{ok:l},bubbles:!0,composed:!0}))}),ie({get preview(){return r()},set preview(s=!1){r(s),b()}})}customElements.define("go-cart",se(_A,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var wA=B('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function kA(e,t){ne(t,!0);const r=zi(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=wA(),c=M(l,!0);I(l),J(f=>H(c,f),[()=>yt(d(n).subtotalPriceCents)]),x(o,l)};ue(s,o=>{d(n)&&A.cart?.items.length&&o(a)}),x(e,i),ie()}customElements.define("go-cart-subtotal-amount",se(kA,{},[],[]));var SA=B('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function EA(e,t){ne(t,!0);const r=zi(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=SA(),c=V(M(l),1,!0);I(l),J(f=>H(c,f),[()=>yt(d(n).discountedAmountCents)]),x(o,l)};ue(s,o=>{d(n)&&d(n).discountedAmountCents>0&&o(a)}),x(e,i),ie()}customElements.define("go-cart-discounted-amount",se(EA,{},[],[]));function xA(e,t){ne(t,!0),Hr(t.$$host,"go-if",{when:"data.cart.items.length === 0"}),ie()}customElements.define("go-cart-empty",se(xA,{},[],[]));function TA(e,t){ne(t,!0);let r=D(()=>A.cart?.items.length);Ot();var n=Bt();J(()=>H(n,d(r))),x(e,n),ie()}customElements.define("go-cart-counter",se(TA,{},[],[]));function AA(e){const t=document.createElement("form");t.method="post",t.action=e.url;for(const[r,n]of Object.entries(e.params)){const i=document.createElement("input");i.type="hidden",i.name=r,i.value=String(n),t.appendChild(i)}document.body.appendChild(t),t.submit()}async function wm(e,t){const r=A.cart;if(!r)return;const n=e.details.fieldValue("paymentMode");r.paymentModeId=n==null?void 0:String(n);const i=await A.checkout(r.orderData());if(i.error){e.details.apiErrors=i.error;return}const s=Xe.config.forms[t]?.beforeSubmit;s&&await s(e.details.formData);const a=i.data.meta,o=Xe.config.navigateTo;a.status==="success"?o?.(A.urls.checkoutSuccess(i.data.order.token)):a.status==="fail"?o?.(A.urls.checkoutFailure("")):a.payment_url?o?.(a.payment_url):a.payment_data?AA(a.payment_data):o?.(A.urls.checkoutFailure(""))}function km(e,t){Pt.defineForm({id:"checkoutGuest",submitLabel:"cart.detail.actions.checkout",fields:[{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"acceptTerms",required:!0},{key:"paymentMode",required:!0}]}),Hr(e,"go-form",{"form-id":"checkoutGuest",custom:t}),e.addEventListener("submit",async r=>{const n=r.target;if(!A.cart)return;const i=await A.signUp(n.details.formData,!0);if(i.error){n.details.apiErrors=i.error.errors;return}await wm(n,"checkoutGuest")})}function CA(e,t){Pt.defineForm({id:"checkoutUser",submitLabel:"cart.detail.actions.checkout",fields:[{key:"acceptTerms",required:!0},{key:"paymentMode",required:!0}]}),Hr(e,"go-form",{"form-id":"checkoutUser",custom:t}),e.addEventListener("submit",async r=>{const n=r.target;await wm(n,"checkoutUser")})}function OA(e,t){ne(t,!0);let r=_(t,"custom",7,!1);return km(t.$$host,r()),ie({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-form",se(OA,{custom:{}},[],[]));function DA(e,t){ne(t,!0);let r=_(t,"custom",7,!1);return km(t.$$host,r()),ie({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-guest",se(DA,{custom:{}},[],[]));function IA(e,t){ne(t,!0);let r=_(t,"custom",7,!1);return CA(t.$$host,r()),ie({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-user",se(IA,{custom:{}},[],[]));var PA="TokenActions::ApplyOrderDiscount";async function MA(e){if(!A.cart)throw new Error("(go-coupon-redemption): cart not found");const t=A.cart,r=await A.asyncFetch(()=>A.getCouponSaleByBarcode(e));return r?.is_valid?r.value_action===PA?(t.addCoupon({code:e,kind:"actionToken"}),{success:!0}):r.is_voucher_for?FA(e,r):r.value_cents&&r.value_cents>0?$A(e,r.value_cents):Ku([A.t("cart.coupon.form.errors.notValid")]):Ku([A.t("cart.coupon.form.errors.notValid")])}function $A(e,t){return A.cart.addCoupon({code:e,kind:"valueVoucher",valueCents:t}),{success:!0}}async function FA(e,t){const r=e.toUpperCase();if(A.cart.coupons.some(a=>a.code===r))return{success:!0};const n=await A.asyncFetch(()=>A.tickets({"by_ticket_ids[]":[t.is_voucher_for]})),i=Array.isArray(n)?n.find(a=>a.id===t.is_voucher_for):void 0;if(!i)return Ku([A.t("cart.coupon.form.errors.error")]);const s={...i,price_cents:0};return A.cart.addItem(ot(js(s),{quantity:1,voucher:{code:r}})),A.cart.addCoupon({code:r,kind:"serviceVoucher"}),{success:!0}}function Ku(e){return{success:!1,errors:e}}var NA=B("<go-form></go-form>",2);function RA(e,t){ne(t,!0),Pt.defineForm({id:"couponRedemption",submitLabel:"cart.coupon.form.submit",fields:[{key:"token",required:!0}]});async function r(o){const l=o.details.fields.find(u=>u.key==="token"),c=(o.details.fieldValue("token")??"").trim().toUpperCase();if(!c)return{success:!0};const f=await MA(c);return f.success?(o.details.apiErrors=[],l&&(l.value=""),o.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),f):(o.details.apiErrors=f.errors,f)}async function n(o){await r(o.target)}async function i(){const o=t.$$host.querySelector("go-form");return o?.details?r(o):{success:!0}}var s={flush:i},a=NA();return Tn(a,"formId","couponRedemption"),As("submit",a,n),x(e,a),ie(s)}customElements.define("go-coupon-redemption",se(RA,{},[],["flush"])),xb();var LA=class{#e=ae();get campaign(){return d(this.#e)}set campaign(e){$(this.#e,e,!0)}#t=ae();get amount(){return d(this.#t)}set amount(e){$(this.#t,e,!0)}selectCampaign=e=>{this.campaign=e,document.getElementsByClassName("donation-actions")[0]?.scrollIntoView()};addDonationToCart=()=>{if(this.amount===void 0||this.campaign===void 0)return;const e={value:this.amount,campaign_id:this.campaign.id};let t=JSON.parse(localStorage.getItem("201600627v4donations")||"[]");qr(t.filter(r=>r.campaign_id=e.campaign_id),r=>r.value)+e.value>this.campaign.guest_limit&&this.campaign.guest_limit>0&&(!A.currentUser?.isAuthenticated||A.currentUser.isGuest)?this.skipDonation():(t.push(e),localStorage.setItem("201600627v4donations",JSON.stringify(t)),localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",A.urls.cart()),window.location.replace(A.urls.cart()))};skipDonation=()=>{localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",A.urls.cart()),window.location.replace(A.urls.cart())}},Ct=new LA,zA=B('<img alt="logo"/>'),qA=B('<div role="button" tabindex="0"><div class="donation-image"><!></div> <div class="donation-info"><p class="donation-info-title"> </p> <p class="donation-info-description"> </p></div></div>');function Sm(e,t){ne(t,!0);let r=_(t,"campaign",7);const n=D(()=>r().translations);var i={get campaign(){return r()},set campaign(v){r(v),b()}},s=qA();let a;var o=M(s),l=M(o),c=v=>{var m=zA();J(y=>me(m,"src",y),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),x(v,m)};ue(l,v=>{r().picture.thumbnail&&v(c)}),I(o);var f=V(o,2),u=M(f),p=M(u,!0);I(u);var h=V(u,2),g=M(h,!0);return I(h),I(f),I(s),J(()=>{a=St(s,1,"go-donation-campaign",null,a,{selected:Ct.campaign?.id===r()?.id}),H(p,d(n)["donations.headline"]),H(g,d(n)["donations.shop.info"])}),pt("click",s,()=>Ct.selectCampaign(r())),pt("keydown",s,v=>{v.key==="Enter"&&Ct.selectCampaign(r())}),x(e,s),ie(i)}cr(["click","keydown"]),se(Sm,{campaign:{}},[],[],{mode:"open"});var UA=B("<button> </button>"),BA=B('<form id="donationForm" action="" novalidate=""><div class="donation-custom form-group"><label for="donation-custom-amount"> </label> <input class="form-control" id="donation-custom-amount" type="number" min="1"/></div></form>'),VA=B('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function Em(e,t){ne(t,!0);const r=Ct.campaign?.guest_limit?Ct.campaign.guest_limit/100:void 0;let n=ae(void 0);function i(p){Ct.amount=p,$(n,null)}function s(p){const h=document.getElementById("donationForm");h.checkValidity()?Ct.amount=p.target.valueAsNumber*100:(Ct.amount=void 0,h.reportValidity())}var a=VA(),o=M(a),l=M(o,!0);I(o);var c=V(o,2);Ne(c,20,()=>Ct.campaign?.options,p=>p,(p,h)=>{var g=UA();let v;var m=M(g,!0);I(g),J(y=>{v=St(g,1,"btn btn-default",null,v,{selected:Ct.amount===h}),H(m,y)},[()=>yt(h)]),pt("click",g,()=>i(h)),x(p,g)}),I(c);var f=V(c,2),u=p=>{var h=BA(),g=M(h),v=M(g),m=M(v,!0);I(v);var y=V(v,2);Ms(y),I(g),I(h),J((S,k)=>{H(m,S),me(y,"max",r),me(y,"placeholder",k),Vl(y,d(n))},[()=>A.t("donations.selection.custom.label"),()=>A.t("donations.selection.custom.input.placeholder")]),pt("input",y,s),x(p,h)};ue(f,p=>{Ct.campaign?.free_donations&&p(u)}),I(a),J(p=>H(l,p),[()=>A.t("donations.selection.title")]),x(e,a),ie()}cr(["click","input"]),se(Em,{},[],[],{mode:"open"});var jA=B('<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>');function ZA(e,t){ne(t,!1),En(()=>{A.donations?.campaigns?.length==1&&Ct.selectCampaign(A.donations?.campaigns[0])}),Xl();var r=re(),n=U(r),i=s=>{var a=jA(),o=M(a);Ne(o,1,()=>A?.donations?.campaigns,v=>v.id,(v,m)=>{Sm(v,{get campaign(){return d(m)}})});var l=V(o,2),c=v=>{Em(v,{})};ue(l,v=>{Ct.campaign&&v(c)});var f=V(l,2),u=M(f),p=M(u,!0);I(u);var h=V(u,2),g=M(h,!0);I(h),I(f),I(a),J((v,m)=>{H(p,v),h.disabled=!Ct.amount,H(g,m)},[()=>A.t("donations.actions.continueWithoutDonation"),()=>A.t("donations.actions.addToCart")]),pt("click",u,function(...v){Ct.skipDonation?.apply(this,v)}),pt("click",h,function(...v){Ct.addDonationToCart?.apply(this,v)}),x(s,a)};ue(n,s=>{A.donations&&A.donations.campaigns&&s(i)}),x(e,r),ie()}cr(["click"]),customElements.define("go-donations",se(ZA,{},[],[]));function WA(e){return typeof e=="function"}function Js(e){return e!==null&&typeof e=="object"}var HA=["string","number","bigint","boolean"];function Yu(e){return e==null||HA.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Yu(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}var bo=Symbol("box"),xm=Symbol("is-writable");function z(e,t){const r=D(e);return t?{[bo]:!0,[xm]:!0,get current(){return d(r)},set current(n){t(n)}}:{[bo]:!0,get current(){return e()}}}function Tm(e){return Js(e)&&bo in e}function GA(e){return Tm(e)?e:WA(e)?z(e):Er(e)}function Er(e){let t=ae(Me(e));return{[bo]:!0,[xm]:!0,get current(){return d(t)},set current(r){$(t,r,!0)}}}function Am(...e){return function(t){for(const r of e)if(r){if(t.defaultPrevented)return;typeof r=="function"?r.call(this,t):r.current?.call(this,t)}}}var Cm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,KA=/\n/g,YA=/^\s*/,JA=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,QA=/^:\s*/,XA=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,eC=/^[;\s]*/,tC=/^\s+|\s+$/g,rC=`
78
- `,Om="/",Dm="*",ni="",nC="comment",iC="declaration";function sC(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(g){var v=g.match(KA);v&&(r+=v.length);var m=g.lastIndexOf(rC);n=~m?g.length-m:n+g.length}function s(){var g={line:r,column:n};return function(v){return v.position=new a(g),c(),v}}function a(g){this.start=g,this.end={line:r,column:n},this.source=t.source}a.prototype.content=e;function o(g){var v=new Error(t.source+":"+r+":"+n+": "+g);if(v.reason=g,v.filename=t.source,v.line=r,v.column=n,v.source=e,!t.silent)throw v}function l(g){var v=g.exec(e);if(v){var m=v[0];return i(m),e=e.slice(m.length),v}}function c(){l(YA)}function f(g){var v;for(g=g||[];v=u();)v!==!1&&g.push(v);return g}function u(){var g=s();if(!(Om!=e.charAt(0)||Dm!=e.charAt(1))){for(var v=2;ni!=e.charAt(v)&&(Dm!=e.charAt(v)||Om!=e.charAt(v+1));)++v;if(v+=2,ni===e.charAt(v-1))return o("End of comment missing");var m=e.slice(2,v-2);return n+=2,i(m),e=e.slice(v),n+=2,g({type:nC,comment:m})}}function p(){var g=s(),v=l(JA);if(v){if(u(),!l(QA))return o("property missing ':'");var m=l(XA),y=g({type:iC,property:Im(v[0].replace(Cm,ni)),value:m?Im(m[0].replace(Cm,ni)):ni});return l(eC),y}}function h(){var g=[];f(g);for(var v;v=p();)v!==!1&&(g.push(v),f(g));return g}return c(),h()}function Im(e){return e?e.replace(tC,ni):ni}function aC(e,t){let r=null;if(!e||typeof e!="string")return r;const n=sC(e),i=typeof t=="function";return n.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:o}=s;i?t(a,o,s):o&&(r=r||{},r[a]=o)}),r}var oC=/\d/,lC=["-","_","/","."];function uC(e=""){if(!oC.test(e))return e!==e.toLowerCase()}function cC(e){const t=[];let r="",n,i;for(const s of e){const a=lC.includes(s);if(a===!0){t.push(r),r="",n=void 0;continue}const o=uC(s);if(i===!1){if(n===!1&&o===!0){t.push(r),r=s,n=o;continue}if(n===!0&&o===!1&&r.length>1){const l=r.at(-1);t.push(r.slice(0,Math.max(0,r.length-1))),r=l+s,n=o;continue}}r+=s,n=o,i=a}return t.push(r),t}function Pm(e){return e?cC(e).map(t=>fC(t)).join(""):""}function dC(e){return hC(Pm(e||""))}function fC(e){return e?e[0].toUpperCase()+e.slice(1):""}function hC(e){return e?e[0].toLowerCase()+e.slice(1):""}function Qs(e){if(!e)return{};const t={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){t[Pm(n)]=i;return}if(n.startsWith("--")){t[n]=i;return}t[dC(n)]=i}return aC(e,r),t}function Xs(...e){return(...t)=>{for(const r of e)typeof r=="function"&&r(...t)}}function pC(e,t){const r=RegExp(e,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,t):n}}var mC=pC(/[A-Z]/,e=>`-${e.toLowerCase()}`);function vC(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${mC(t)}: ${e[t]};`).join(`
79
- `)}function ea(e={}){return vC(e).replace(`
80
- `," ")}var gC=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],yC=new Set(gC);function bC(e){return yC.has(e)}function Ke(...e){const t={...e[0]};for(let r=1;r<e.length;r++){const n=e[r];if(n){for(const i of Object.keys(n)){const s=t[i],a=n[i],o=typeof s=="function",l=typeof a=="function";if(o&&bC(i))t[i]=Am(s,a);else if(o&&l)t[i]=Xs(s,a);else if(i==="class"){const c=Yu(s),f=Yu(a);c&&f?t[i]=qa(s,a):c?t[i]=qa(s):f&&(t[i]=qa(a))}else if(i==="style"){const c=typeof s=="object",f=typeof a=="object",u=typeof s=="string",p=typeof a=="string";if(c&&f)t[i]={...s,...a};else if(c&&p){const h=Qs(a);t[i]={...s,...h}}else if(u&&f)t[i]={...Qs(s),...a};else if(u&&p){const h=Qs(s),g=Qs(a);t[i]={...h,...g}}else c?t[i]=s:f?t[i]=a:u?t[i]=s:p&&(t[i]=a)}else t[i]=a!==void 0?a:s}for(const i of Object.getOwnPropertySymbols(n)){const s=t[i],a=n[i];t[i]=a!==void 0?a:s}}}return typeof t.style=="object"&&(t.style=ea(t.style).replaceAll(`
81
- `," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Mm={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"},_C=ea(Mm),$m=typeof window<"u"?window:void 0,bN=typeof window<"u"?window.document:void 0,_N=typeof window<"u"?window.navigator:void 0,wN=typeof window<"u"?window.location:void 0;function wC(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var kC=class extends Map{#e=new Map;#t=ae(0);#r=ae(0);#n=nn||-1;constructor(e){if(super(),e){for(var[t,r]of e)super.set(t,r);this.#r.v=super.size}}#i(e){return nn===this.#n?ae(e):Sn(e)}has(e){var t=this.#e,r=t.get(e);if(r===void 0)if(super.has(e))r=this.#i(0),t.set(e,r);else return d(this.#t),!1;return d(r),!0}forEach(e,t){this.#s(),super.forEach(e,t)}get(e){var t=this.#e,r=t.get(e);if(r===void 0)if(super.has(e))r=this.#i(0),t.set(e,r);else{d(this.#t);return}return d(r),super.get(e)}set(e,t){var r=this.#e,n=r.get(e),i=super.get(e),s=super.set(e,t),a=this.#t;if(n===void 0)n=this.#i(0),r.set(e,n),$(this.#r,super.size),Lr(a);else if(i!==t){Lr(n);var o=a.reactions===null?null:new Set(a.reactions);(o===null||!n.reactions?.every(l=>o.has(l)))&&Lr(a)}return s}delete(e){var t=this.#e,r=t.get(e),n=super.delete(e);return r!==void 0&&(t.delete(e),$(r,-1)),n&&($(this.#r,super.size),Lr(this.#t)),n}clear(){if(super.size!==0){super.clear();var e=this.#e;$(this.#r,0);for(var t of e.values())$(t,-1);Lr(this.#t),e.clear()}}#s(){d(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var t of super.keys())if(!e.has(t)){var r=this.#i(0);e.set(t,r)}}for([,r]of this.#e)d(r)}keys(){return d(this.#t),super.keys()}values(){return this.#s(),super.values()}entries(){return this.#s(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return d(this.#r),super.size}},SC=class{#e;#t;constructor(e={}){const{window:t=$m,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=Sl(n=>{const i=gt(t,"focusin",n),s=gt(t,"focusout",n);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?wC(this.#e):null}},kN=new SC;function EC(e){return typeof e=="function"}var Ft=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return Ib(this.#t)}get(){const e=Id(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=Id(this.#t);return t===void 0?e:t}set(e){return Db(this.#t,e)}};function xC(e,t){switch(e){case"post":ve(t);break;case"pre":Il(t);break}}function Ju(e,t,r,n={}){const{lazy:i=!1}=n;let s=!i,a=Array.isArray(e)?[]:void 0;xC(t,()=>{const o=Array.isArray(e)?e.map(c=>c()):e();if(!s){s=!0,a=o;return}const l=Re(()=>r(o,a));return a=o,l})}function Fm(e,t,r){const n=ks(()=>{let i=!1;Ju(e,t,(s,a)=>{if(i){n();return}const o=r(s,a);return i=!0,o},{lazy:!0})});ve(()=>n)}function nt(e,t,r){Ju(e,"post",t,r)}function TC(e,t,r){Ju(e,"pre",t,r)}nt.pre=TC;function AC(e,t){Fm(e,"post",t)}function CC(e,t){Fm(e,"pre",t)}AC.pre=CC;function Nm(e){return EC(e)?e():e}var OC=class{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=D(()=>(d(this.#a)?.(),this.getSize().width));#o=D(()=>(d(this.#a)?.(),this.getSize().height));#a=D(()=>{const e=Nm(this.#n);if(e)return Sl(t=>{if(!this.#i)return;const r=new this.#i.ResizeObserver(n=>{this.#t=!0;for(const i of n){const s=this.#r.box==="content-box"?i.contentBoxSize:i.borderBoxSize,a=Array.isArray(s)?s:[s];this.#e.width=a.reduce((o,l)=>Math.max(o,l.inlineSize),0),this.#e.height=a.reduce((o,l)=>Math.max(o,l.blockSize),0)}t()});return r.observe(e),()=>{this.#t=!1,r.disconnect()}})});constructor(e,t={box:"border-box"}){this.#i=t.window??$m,this.#r=t,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=Nm(this.#n);if(!e||!this.#i)return;const t=e.offsetWidth,r=e.offsetHeight;if(this.#r.box==="border-box")return{width:t,height:r};const n=this.#i.getComputedStyle(e),i=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),s=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),a=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),o=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth);return{width:t-i-a,height:r-s-o}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return d(this.#a)?.(),this.getSize()}get width(){return d(this.#s)}get height(){return d(this.#o)}};function DC(e,t){let r,n=null;return(...i)=>new Promise(s=>{n&&n(void 0),n=s,clearTimeout(r),r=setTimeout(async()=>{const a=await e(...i);n&&(n(a),n=null)},t)})}function IC(e,t){let r=0,n=null;return(...i)=>{const s=Date.now();return r&&s-r<t?n??Promise.resolve(void 0):(r=s,n=e(...i),n)}}function Rm(e,t,r={},n){const{lazy:i=!1,once:s=!1,initialValue:a,debounce:o,throttle:l}=r;let c=ae(Me(a)),f=ae(!1),u=ae(void 0),p=ae(Me([]));const h=()=>{d(p).forEach(k=>k()),$(p,[],!0)},g=k=>{$(p,[...d(p),k],!0)},v=async(k,E,T=!1)=>{try{$(f,!0),$(u,void 0),h();const O=new AbortController;g(()=>O.abort());const F=await t(k,E,{data:d(c),refetching:T,onCleanup:g,signal:O.signal});return $(c,F,!0),F}catch(O){O instanceof DOMException&&O.name==="AbortError"||$(u,O,!0);return}finally{$(f,!1)}},m=o?DC(v,o):l?IC(v,l):v,y=Array.isArray(e)?e:[e];let S;return n((k,E)=>{s&&S||(S=k,m(Array.isArray(e)?k:k[0],Array.isArray(e)?E:E?.[0]))},{lazy:i}),{get current(){return d(c)},get loading(){return d(f)},get error(){return d(u)},mutate:k=>{$(c,k,!0)},refetch:k=>{const E=y.map(T=>T());return m(Array.isArray(e)?E:E[0],Array.isArray(e)?E:E[0],k??!0)}}}function PC(e,t,r){return Rm(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e];nt(()=>s.map(o=>o()),(o,l)=>{n(o,l??[])},i)})}function MC(e,t,r){return Rm(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e],a=()=>s.map(o=>o());nt.pre(a,(o,l)=>{n(o,l??[])},i)})}PC.pre=MC;function ii(e){ve(()=>()=>{e()})}function $C(e,t){return setTimeout(t,e)}function ta(e){gf().then(e)}var FC=1,NC=9,RC=11;function Qu(e){return Js(e)&&e.nodeType===FC&&typeof e.nodeName=="string"}function Lm(e){return Js(e)&&e.nodeType===NC}function LC(e){return Js(e)&&e.constructor?.name==="VisualViewport"}function zC(e){return Js(e)&&e.nodeType!==void 0}function zm(e){return zC(e)&&e.nodeType===RC&&"host"in e}function qC(e,t){if(!e||!t||!Qu(e)||!Qu(t))return!1;const r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&zm(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function _o(e){return Lm(e)?e:LC(e)?e.document:e?.ownerDocument??document}function qm(e){return zm(e)?qm(e.host):Lm(e)?e.defaultView??window:Qu(e)?e.ownerDocument?.defaultView??window:window}function UC(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var ji=class{element;#e=D(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return d(this.#e)}set root(e){$(this.#e,e)}constructor(e){typeof e=="function"?this.element=z(e):this.element=e}getDocument=()=>_o(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>UC(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function et(e,t){return{[A_()]:r=>Tm(e)?(e.current=r,Re(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e.current=null,t?.(null))}):(e(r),Re(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e(null),t?.(null))})}}function xr(e){return e?"true":"false"}function Xu(e){return e?"true":void 0}function Ve(e){return e?"":void 0}function Um(e){return e?"open":"closed"}function BC(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}var VC=class{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(t=>[t,this.getAttr(t)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function wo(e){const t=new VC(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var ec="ArrowDown",Bm="ArrowLeft",Vm="ArrowRight",tc="ArrowUp",jC="Backspace",ZC="Enter",SN="Escape",EN=" ",xN="Tab",TN="a",AN="P",CN="A",ON="p",ln=typeof document<"u",jm=WC();function WC(){return ln&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Tr(e){return e instanceof HTMLElement}function si(e){return e instanceof Element}function HC(e){return e instanceof Element||e instanceof SVGElement}function ko(e){return!Number.isNaN(Number(e))&&!Number.isNaN(Number.parseFloat(e))}function Nn(e){return e===null}function So(e){return e.pointerType==="touch"}function GC(e){return e!==null}var KC=class{#e;#t=null;#r=null;#n=0;constructor(e){this.#e=e,ii(()=>this.#i())}#i(){this.#t!==null&&(window.cancelAnimationFrame(this.#t),this.#t=null),this.#r?.disconnect(),this.#r=null,this.#n++}run(e){this.#i();const t=this.#e.ref.current;if(!t)return;if(typeof t.getAnimations!="function"){this.#s(e);return}const r=this.#n,n=()=>{r===this.#n&&this.#s(e)},i=()=>{if(r!==this.#n)return;const a=t.getAnimations();if(a.length===0){n();return}Promise.all(a.map(o=>o.finished)).then(()=>{n()}).catch(()=>{if(r===this.#n){if(t.getAnimations().some(o=>o.pending||o.playState!=="finished")){i();return}n()}})},s=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,i()})};if(!this.#e.afterTick.current){s();return}this.#t=window.requestAnimationFrame(()=>{this.#t=null;const a="data-starting-style";if(!t.hasAttribute(a)){s();return}this.#r=new MutationObserver(()=>{r===this.#n&&(t.hasAttribute(a)||(this.#r?.disconnect(),this.#r=null,s()))}),this.#r.observe(t,{attributes:!0,attributeFilter:[a]})})}#s(e){const t=()=>{e()};this.#e.afterTick?ta(t):t()}},Zm=class{#e;#t;#r;#n=ae(!1);#i=ae(void 0);#s=!1;#o=null;constructor(e){this.#e=e,$(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new KC({ref:this.#e.ref,afterTick:this.#e.open}),ii(()=>this.#a()),nt(()=>this.#e.open.current,t=>{if(!this.#s){this.#s=!0;return}if(this.#a(),!t&&this.#e.shouldSkipExitAnimation?.()){$(this.#n,!1),$(this.#i,void 0),this.#e.onComplete?.();return}if(t&&$(this.#n,!0),$(this.#i,t?"starting":"ending",!0),t&&(this.#o=window.requestAnimationFrame(()=>{this.#o=null,this.#e.open.current&&$(this.#i,void 0)})),!this.#t){t||$(this.#n,!1),$(this.#i,void 0),this.#e.onComplete?.();return}this.#r.run(()=>{t===this.#e.open.current&&(this.#e.open.current||$(this.#n,!1),$(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return d(this.#n)}get transitionStatus(){return d(this.#i)}#a(){this.#o!==null&&(window.cancelAnimationFrame(this.#o),this.#o=null)}};function xe(){}function Pe(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var YC=new Ft("BitsConfig");function JC(){const e=new QC(null,{});return YC.getOr(e).opts}var QC=class{opts;constructor(e,t){const r=XC(e,t);this.opts={defaultPortalTo:r(n=>n.defaultPortalTo),defaultLocale:r(n=>n.defaultLocale)}}};function XC(e,t){return r=>z(()=>{const n=r(t)?.current;if(n!==void 0)return n;if(e!==null)return r(e.opts)?.current})}function Wm(e,t){return r=>{const n=JC();return z(()=>{const i=r();if(i!==void 0)return i;const s=e(n).current;return s!==void 0?s:t})}}var Hm=Wm(e=>e.defaultLocale,"en"),DN=Wm(e=>e.defaultPortalTo,"body"),eO=class{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){const r=this.createEvent(t);return e.dispatchEvent(r),r}listen(e,t,r){const n=i=>{t(i)};return gt(e,this.eventName,n,r)}};function Gm(e,t=500){let r=null;const n=(...i)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{e(...i)},t)};return n.destroy=()=>{r!==null&&(clearTimeout(r),r=null)},n}function Km(e,t){return e===t||e.contains(t)}function Ym(e){return e?.ownerDocument??document}function tO(e,t){const{clientX:r,clientY:n}=e,i=t.getBoundingClientRect();return r<i.left||r>i.right||n<i.top||n>i.bottom}var Jm=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Eo=Jm.join(","),Qm=typeof Element>"u",ai=Qm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,xo=!Qm&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},To=function(t,r){var n;r===void 0&&(r=!0);var i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert");return i===""||i==="true"||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):To(t.parentNode))},rO=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Xm=function(t,r,n){if(To(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Eo));return r&&ai.call(t,Eo)&&i.unshift(t),i=i.filter(n),i},Ao=function(t,r,n){for(var i=[],s=Array.from(t);s.length;){var a=s.shift();if(!To(a,!1))if(a.tagName==="SLOT"){var o=a.assignedElements(),l=Ao(o.length?o:a.children,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:a,candidates:l})}else{ai.call(a,Eo)&&n.filter(a)&&(r||!t.includes(a))&&i.push(a);var c=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),f=!To(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&f){var u=Ao(c===!0?a.children:c.children,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:a,candidates:u})}else s.unshift.apply(s,a.children)}}return i},ev=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},tv=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||rO(t))&&!ev(t)?0:t.tabIndex},nO=function(t,r){var n=tv(t);return n<0&&r&&!ev(t)?0:n},iO=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},rv=function(t){return t.tagName==="INPUT"},sO=function(t){return rv(t)&&t.type==="hidden"},aO=function(t){return t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"})},oO=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},lO=function(t){if(!t.name)return!0;var r=t.form||xo(t),n=function(o){return r.querySelectorAll('input[type="radio"][name="'+o+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var s=oO(i,t.form);return!s||s===t},uO=function(t){return rv(t)&&t.type==="radio"},cO=function(t){return uO(t)&&!lO(t)},dO=function(t){var r,n=t&&xo(t),i=(r=n)===null||r===void 0?void 0:r.host,s=!1;if(n&&n!==t){var a,o,l;for(s=!!((a=i)!==null&&a!==void 0&&(o=a.ownerDocument)!==null&&o!==void 0&&o.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&i;){var c,f,u;n=xo(i),i=(c=n)===null||c===void 0?void 0:c.host,s=!!((f=i)!==null&&f!==void 0&&(u=f.ownerDocument)!==null&&u!==void 0&&u.contains(i))}}return s},nv=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},fO=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(t).visibility==="hidden")return!0;var s=ai.call(t,"details>summary:first-of-type")?t.parentElement:t;if(ai.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var a=t;t;){var o=t.parentElement,l=xo(t);if(o&&!o.shadowRoot&&i(o)===!0)return nv(t);t.assignedSlot?t=t.assignedSlot:!o&&l!==t.ownerDocument?t=l.host:t=o}t=a}if(dO(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return nv(t);return!1},hO=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return ai.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},Co=function(t,r){return!(r.disabled||sO(r)||fO(r,t)||aO(r)||hO(r))},rc=function(t,r){return!(cO(r)||tv(r)<0||!Co(t,r))},pO=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},iv=function(t){var r=[],n=[];return t.forEach(function(i,s){var a=!!i.scopeParent,o=a?i.scopeParent:i,l=nO(o,a),c=a?iv(i.candidates):o;l===0?a?r.push.apply(r,c):r.push(o):n.push({documentOrder:s,tabIndex:l,item:i,isScope:a,content:c})}),n.sort(iO).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(r)},mO=function(t,r){r=r||{};var n;return r.getShadowRoot?n=Ao([t],r.includeContainer,{filter:rc.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:pO}):n=Xm(t,r.includeContainer,rc.bind(null,r)),iv(n)},vO=function(t,r){r=r||{};var n;return r.getShadowRoot?n=Ao([t],r.includeContainer,{filter:Co.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=Xm(t,r.includeContainer,Co.bind(null,r)),n},gO=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return ai.call(t,Eo)===!1?!1:rc(r,t)},yO=Jm.concat("iframe:not([inert]):not([inert] *)").join(","),bO=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return ai.call(t,yO)===!1?!1:Co(r,t)};function _O(e,t){if(t<=0)return[];const r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}function nc(e,t){return e>=0&&e<t.length}var wO="data-context-menu-trigger",kO="data-context-menu-content",IN=new Ft("Menu.Root"),PN=new Ft("Menu.Root | Menu.Sub"),MN=new Ft("Menu.Content"),$N=new Ft("Menu.Group | Menu.RadioGroup"),FN=new Ft("Menu.RadioGroup"),NN=new Ft("Menu.CheckboxGroup"),RN=new eO("bitsmenuopen",{bubbles:!1,cancelable:!0}),LN=wo({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});globalThis.bitsDismissableLayers??=new Map;var SO=class yy{static create(t){return new yy(t)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#s=void 0;#o;#a=xe;constructor(t){this.opts=t,this.#t=t.interactOutsideBehavior,this.#e=t.onInteractOutside,this.#o=t.onFocusOutside,ve(()=>{this.#s=Ym(this.opts.ref.current)});let r=xe;const n=()=>{this.#v(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),r()};nt([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return $C(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#u())}),n}),ii(()=>{this.#v.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#a(),r()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&ta(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#o.current?.(t)})};#u(){return Xs(gt(this.#s,"pointerdown",Xs(this.#h,this.#f),{capture:!0}),gt(this.#s,"pointerdown",Xs(this.#p,this.#d)),gt(this.#s,"focusin",this.#l))}#c=t=>{let r=t;r.defaultPrevented&&(r=sv(t)),this.#e.current(t)};#d=Gm(t=>{if(!this.opts.ref.current){this.#a();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||TO(t,this.opts.ref.current);if(!this.#n||this.#y()||!r){this.#a();return}let n=t;if(n.defaultPrevented&&(n=sv(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#a();return}t.pointerType==="touch"?(this.#a(),this.#a=gt(this.#s,"click",this.#c,{once:!0})):this.#e.current(n)},10);#h=t=>{this.#r[t.type]=!0};#p=t=>{this.#r[t.type]=!1};#f=()=>{this.opts.ref.current&&(this.#n=xO(this.opts.ref.current))};#m=t=>this.opts.ref.current?Km(this.opts.ref.current,t):!1;#v=Gm(()=>{for(const t in this.#r)this.#r[t]=!1;this.#n=!1},20);#y(){return Object.values(this.#r).some(Boolean)}#w=()=>{this.#i=!0};#_=()=>{this.#i=!1};props={onfocuscapture:this.#w,onblurcapture:this.#_}};function EO(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:r}])=>r==="close"||r==="ignore")}function xO(e){const t=[...globalThis.bitsDismissableLayers],r=EO(t);if(r)return r[0].opts.ref.current===e;const[n]=t[0];return n.opts.ref.current===e}function TO(e,t){const r=e.target;if(!HC(r))return!1;const n=!!r.closest(`[${wO}]`),i=!!t.closest(`[${kO}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:Ym(r).documentElement.contains(r)&&!Km(t,r)&&tO(e,t)}function sv(e){const t=e.currentTarget,r=e.target;let n;e instanceof PointerEvent?n=new PointerEvent(e.type,e):n=new PointerEvent("pointerdown",e);let i=!1;return new Proxy(n,{get:(s,a)=>a==="currentTarget"?t:a==="target"?r:a==="preventDefault"?()=>{i=!0,typeof s.preventDefault=="function"&&s.preventDefault()}:a==="defaultPrevented"?i:a in s?s[a]:e[a]})}function av(e,t){ne(t,!0);let r=_(t,"interactOutsideBehavior",7,"close"),n=_(t,"onInteractOutside",7,xe),i=_(t,"onFocusOutside",7,xe),s=_(t,"id",7),a=_(t,"children",7),o=_(t,"enabled",7),l=_(t,"isValidEvent",7,()=>!1),c=_(t,"ref",7);const f=SO.create({id:z(()=>s()),interactOutsideBehavior:z(()=>r()),onInteractOutside:z(()=>n()),enabled:z(()=>o()),onFocusOutside:z(()=>i()),isValidEvent:z(()=>l()),ref:c()});var u={get interactOutsideBehavior(){return r()},set interactOutsideBehavior(g="close"){r(g),b()},get onInteractOutside(){return n()},set onInteractOutside(g=xe){n(g),b()},get onFocusOutside(){return i()},set onFocusOutside(g=xe){i(g),b()},get id(){return s()},set id(g){s(g),b()},get children(){return a()},set children(g){a(g),b()},get enabled(){return o()},set enabled(g){o(g),b()},get isValidEvent(){return l()},set isValidEvent(g=()=>!1){l(g),b()},get ref(){return c()},set ref(g){c(g),b()}},p=re(),h=U(p);return Se(h,()=>a()??qe,()=>({props:f.props})),x(e,p),ie(u)}se(av,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;var AO=class by{static create(t){return new by(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new ji(this.opts.ref);let r=xe;nt(()=>t.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>gt(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=t=>{if(t.key!=="Escape"||!CO(this))return;const r=new KeyboardEvent(t.type,t);t.preventDefault();const n=this.opts.escapeKeydownBehavior.current;n!=="close"&&n!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(r)}};function CO(e){const t=[...globalThis.bitsEscapeLayers],r=t.findLast(([i,{current:s}])=>s==="close"||s==="ignore");if(r)return r[0]===e;const[n]=t[0];return n===e}function ov(e,t){ne(t,!0);let r=_(t,"escapeKeydownBehavior",7,"close"),n=_(t,"onEscapeKeydown",7,xe),i=_(t,"children",7),s=_(t,"enabled",7),a=_(t,"ref",7);AO.create({escapeKeydownBehavior:z(()=>r()),onEscapeKeydown:z(()=>n()),enabled:z(()=>s()),ref:a()});var o={get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(f="close"){r(f),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(f=xe){n(f),b()},get children(){return i()},set children(f){i(f),b()},get enabled(){return s()},set enabled(f){s(f),b()},get ref(){return a()},set ref(f){a(f),b()}},l=re(),c=U(l);return Se(c,()=>i()??qe),x(e,l),ie(o)}se(ov,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});var OO=class _y{static instance;#e=Er([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new _y),this.instance}register(t){const r=this.getActive();r&&r!==t&&r.pause();const n=document.activeElement;n&&n!==document.body&&this.#r.set(t,n),this.#e.current=this.#e.current.filter(i=>i!==t),this.#e.current.unshift(t)}unregister(t){this.#e.current=this.#e.current.filter(n=>n!==t);const r=this.getActive();r&&r.resume()}getActive(){return this.#e.current[0]}setFocusMemory(t,r){this.#t.set(t,r)}getFocusMemory(t){return this.#t.get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,r){this.#r.set(t,r)}getPreFocusMemory(t){return this.#r.get(t)}clearPreFocusMemory(t){this.#r.delete(t)}},DO=class wy{#e=!1;#t=null;#r=OO.getInstance();#n=[];#i;constructor(t){this.#i=t}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#s(){for(const t of this.#n)t();this.#n=[]}mount(t){this.#t&&this.unmount(),this.#t=t,this.#r.register(this),this.#l(),this.#o()}unmount(){this.#t&&(this.#s(),this.#a(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#t=null)}#o(){if(!this.#t)return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;const r=this.#c();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#t.focus()})}#a(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(t),!t.defaultPrevented){const r=this.#r.getPreFocusMemory(this);if(r&&document.contains(r))try{r.focus()}catch{document.body.focus()}}}#l(){if(!this.#t||!this.#i.trap.current)return;const t=this.#t,r=t.ownerDocument,n=a=>{if(this.#e||!this.#r.isActiveScope(this))return;const o=a.target;if(o)if(t.contains(o))this.#r.setFocusMemory(this,o);else{const l=this.#r.getFocusMemory(this);if(l&&t.contains(l)&&bO(l))a.preventDefault(),l.focus();else{const c=this.#c(),f=this.#d()[0];(c||f||t).focus()}}},i=a=>{if(!this.#i.loop||this.#e||a.key!=="Tab"||!this.#r.isActiveScope(this))return;const o=this.#u();if(o.length===0)return;const l=o[0],c=o[o.length-1];!a.shiftKey&&r.activeElement===c?(a.preventDefault(),l.focus()):a.shiftKey&&r.activeElement===l&&(a.preventDefault(),c.focus())};this.#n.push(gt(r,"focusin",n,{capture:!0}),gt(t,"keydown",i));const s=new MutationObserver(()=>{const a=this.#r.getFocusMemory(this);if(a&&!t.contains(a)){const o=this.#c(),l=this.#d()[0],c=o||l;c?(c.focus(),this.#r.setFocusMemory(this,c)):t.focus()}});s.observe(t,{childList:!0,subtree:!0}),this.#n.push(()=>s.disconnect())}#u(){return this.#t?mO(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#c(){return this.#u()[0]||null}#d(){return this.#t?vO(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let r=null;return nt([()=>t.ref.current,()=>t.enabled.current],([n,i])=>{n&&i?(r||(r=new wy(t)),r.mount(n)):r&&(r.unmount(),r=null)}),ii(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}};function lv(e,t){ne(t,!0);let r=_(t,"enabled",7,!1),n=_(t,"trapFocus",7,!1),i=_(t,"loop",7,!1),s=_(t,"onCloseAutoFocus",7,xe),a=_(t,"onOpenAutoFocus",7,xe),o=_(t,"focusScope",7),l=_(t,"ref",7);const c=DO.use({enabled:z(()=>r()),trap:z(()=>n()),loop:i(),onCloseAutoFocus:z(()=>s()),onOpenAutoFocus:z(()=>a()),ref:l()});var f={get enabled(){return r()},set enabled(h=!1){r(h),b()},get trapFocus(){return n()},set trapFocus(h=!1){n(h),b()},get loop(){return i()},set loop(h=!1){i(h),b()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(h=xe){s(h),b()},get onOpenAutoFocus(){return a()},set onOpenAutoFocus(h=xe){a(h),b()},get focusScope(){return o()},set focusScope(h){o(h),b()},get ref(){return l()},set ref(h){l(h),b()}},u=re(),p=U(u);return Se(p,()=>o()??qe,()=>({props:c.props})),x(e,u),ie(f)}se(lv,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"});var uv=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var IO=class ky{static create(t){return new ky(t)}opts;domContext;#e=xe;#t=!1;#r=uv;#n=uv;constructor(t){this.opts=t,this.domContext=new ji(t.ref);let r=xe;nt(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([n,i,s])=>(this.#t=n,this.#r=i,this.#n=s,n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#i()),()=>{this.#t=!1,r(),this.#a(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return Xs(gt(this.domContext.getDocument(),"pointerdown",this.#o),gt(this.domContext.getDocument(),"pointerup",Am(this.#a,this.#s)))}#s=t=>{this.#n(t)};#o=t=>{const r=this.opts.ref.current,n=t.target;!Tr(r)||!Tr(n)||!this.#t||!MO(this)||!qC(r,n)||(this.#r(t),!t.defaultPrevented&&(this.#e=PO(r,this.domContext.getDocument().body)))};#a=()=>{this.#e(),this.#e=xe}},cv=e=>e.style.userSelect||e.style.webkitUserSelect;function PO(e,t){const r=cv(t),n=cv(e);return Oo(t,"none"),Oo(e,"text"),()=>{Oo(t,r),Oo(e,n)}}function Oo(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function MO(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function dv(e,t){ne(t,!0);let r=_(t,"preventOverflowTextSelection",7,!0),n=_(t,"onPointerDown",7,xe),i=_(t,"onPointerUp",7,xe),s=_(t,"id",7),a=_(t,"children",7),o=_(t,"enabled",7),l=_(t,"ref",7);IO.create({id:z(()=>s()),onPointerDown:z(()=>n()),onPointerUp:z(()=>i()),enabled:z(()=>o()&&r()),ref:l()});var c={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(p=!0){r(p),b()},get onPointerDown(){return n()},set onPointerDown(p=xe){n(p),b()},get onPointerUp(){return i()},set onPointerUp(p=xe){i(p),b()},get id(){return s()},set id(p){s(p),b()},get children(){return a()},set children(p){a(p),b()},get enabled(){return o()},set enabled(p){o(p),b()},get ref(){return l()},set ref(p){l(p),b()}},f=re(),u=U(f);return Se(u,()=>a()??qe),x(e,f),ie(c)}se(dv,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsIdCounter??={current:0};function Rn(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var $O=class{#e;#t=0;#r=ae();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),$(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,d(this.#r)===void 0&&(this.#n=ks(()=>{$(this.#r,this.#e(...e),!0)})),ve(()=>()=>{this.#i()}),d(this.#r)}},Do=new kC,Io=ae(null),ic=null,ra=null,na=!1,fv=z(()=>{for(const e of Do.values())if(e)return!0;return!1}),sc=null,FO=new $O(()=>{function e(){document.body.setAttribute("style",d(Io)??""),document.body.style.removeProperty("--scrollbar-width"),jm&&ic?.(),$(Io,null)}function t(){ra!==null&&(window.clearTimeout(ra),ra=null)}function r(i,s){t(),na=!0,sc=Date.now();const a=sc,o=()=>{ra=null,sc===a&&(hv(Do)?na=!1:(na=!1,s()))},l=i===null?24:i;ra=window.setTimeout(o,l)}function n(){d(Io)===null&&Do.size===0&&!na&&$(Io,document.body.getAttribute("style"),!0)}return nt(()=>fv.current,()=>{if(!fv.current)return;n(),na=!1;const i=getComputedStyle(document.documentElement),s=getComputedStyle(document.body),a=i.scrollbarGutter?.includes("stable")||s.scrollbarGutter?.includes("stable"),o=window.innerWidth-document.documentElement.clientWidth,l={padding:Number.parseInt(s.paddingRight??"0",10)+o,margin:Number.parseInt(s.marginRight??"0",10)};o>0&&!a&&(document.body.style.paddingRight=`${l.padding}px`,document.body.style.marginRight=`${l.margin}px`,document.body.style.setProperty("--scrollbar-width",`${o}px`)),document.body.style.overflow="hidden",jm&&(ic=gt(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),ta(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),ii(()=>()=>{ic?.()}),{get lockMap(){return Do},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}}),NO=class{#e=Rn();#t;#r=()=>null;#n;locked;constructor(e,t=()=>null){this.#t=e,this.#r=t,this.#n=FO.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=z(()=>this.#n.lockMap.get(this.#e)??!1,r=>this.#n.lockMap.set(this.#e,r)),ii(()=>{if(this.#n.lockMap.delete(this.#e),hv(this.#n.lockMap))return;const r=this.#r();this.#n.scheduleCleanupIfNoNewLocks(r,()=>{this.#n.resetBodyStyle()})}))}};function hv(e){for(const[t,r]of e)if(r)return!0;return!1}function ac(e,t){ne(t,!0);let r=_(t,"preventScroll",7,!0),n=_(t,"restoreScrollDelay",7,null);return r()&&new NO(r(),()=>n()),ie({get preventScroll(){return r()},set preventScroll(i=!0){r(i),b()},get restoreScrollDelay(){return n()},set restoreScrollDelay(i=null){n(i),b()}})}se(ac,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function RO(e){if(!ln||!e)return null;let t=e.querySelector("[data-bits-announcer]");const r=i=>{const s=e.createElement("div");return s.role="log",s.ariaLive=i,s.setAttribute("aria-relevant","additions"),s};if(!Tr(t)){const i=e.createElement("div");i.style.cssText=_C,i.setAttribute("data-bits-announcer",""),i.appendChild(r("assertive")),i.appendChild(r("polite")),t=i,e.body.insertBefore(t,e.body.firstChild)}return{getLog:i=>{if(!Tr(t))return null;const s=t.querySelector(`[aria-live="${i}"]`);return Tr(s)?s:null}}}function Po(e){const t=RO(e);function r(n,i="assertive",s=7500){if(!t||!ln||!e)return;const a=t.getLog(i),o=e.createElement("div");return typeof n=="number"?n=n.toString():n===null?n="Empty":n=n.trim(),o.innerText=n,i==="assertive"?a?.replaceChildren(o):a?.appendChild(o),setTimeout(()=>{o.remove()},s)}return{announce:r}}var LO={defaultValue:void 0,granularity:"day"};function pv(e){const{defaultValue:t,granularity:r,minValue:n,maxValue:i}={...LO,...e};if(Array.isArray(t)&&t.length)return t[t.length-1];if(t&&!Array.isArray(t))return t;{let s=new Date;n&&s<n.toDate(Xt())?s=n.toDate(Xt()):i&&s>i.toDate(Xt())&&(s=i.toDate(Xt()));const a=s.getFullYear(),o=s.getMonth()+1,l=s.getDate();return["hour","minute","second"].includes(r??"day")?new Mi(a,o,l,0,0,0):new Bs(a,o,l)}}function mv(e,t){let r;return t instanceof Mn?r=pp(e):t instanceof Mi?r=hp(e):r=lo(e),r.calendar!==t.calendar?er(r,t.calendar):r}function Zt(e,t=Xt()){return e instanceof Mn?e.toDate():e.toDate(t)}function zO(e){if(e instanceof Bs)return"date";if(e instanceof Mi)return"datetime";if(e instanceof Mn)return"zoneddatetime";throw new Error("Unknown date type")}function qO(e,t){switch(t){case"date":return lo(e);case"datetime":return hp(e);case"zoneddatetime":return pp(e);default:throw new Error(`Unknown date type: ${t}`)}}function UO(e){return e instanceof Mi}function oc(e){return e instanceof Mn}function Mo(e){return UO(e)||oc(e)}function ia(e){if(e instanceof Date){const t=e.getFullYear(),r=e.getMonth()+1;return new Date(t,r,0).getDate()}else return e.set({day:100}).day}function oi(e,t){return e.compare(t)<0}function BO(e,t){return e.compare(t)>0}function vv(e,t,r){const n=Kh(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function gv(e,t,r){const n=Kh(e,r),i=t===0?6:t-1;return n===i?e:n>i?e.add({days:7-n+i}):e.add({days:i-n})}var $o=["day","month","year"],Fo=["hour","minute","second","dayPeriod"],yv=["literal","timeZoneName"],sa=[...$o,...Fo],bv=[...sa,...yv],VO=[...Fo,...yv],zN=bv.filter(e=>e!=="literal"),qN=VO.filter(e=>e!=="literal"),jO=["ach","af","am","an","ar","ast","az","be","bg","bn","br","bs","ca","cak","ckb","cs","cy","da","de","dsb","el","en","eo","es","et","eu","fa","ff","fi","fr","fy","ga","gd","gl","he","hr","hsb","hu","ia","id","it","ja","ka","kk","kn","ko","lb","lo","lt","lv","meh","ml","ms","nl","nn","no","oc","pl","pt","rm","ro","ru","sc","scn","sk","sl","sr","sv","szl","tg","th","tr","uk","zh-CN","zh-TW"],ZO=["year","month","day"],lc={ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:" 年 ",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}};function WO(e){if(_v(e))return lc[e];{const t=YO(e);return _v(t)?lc[t]:lc.en}}function uc(e,t,r){return HO(e)?WO(r)[e]:KO(e)?t:GO(e)?"––":""}function _v(e){return jO.includes(e)}function HO(e){return ZO.includes(e)}function GO(e){return e==="hour"||e==="minute"||e==="second"}function KO(e){return e==="era"||e==="dayPeriod"}function YO(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function cc(e){const t=["hour","minute","second"],r=sa.map(n=>n==="dayPeriod"?[n,"AM"]:[n,null]).filter(([n])=>n==="literal"||n===null?!1:e==="day"?!t.includes(n):!0);return Object.fromEntries(r)}function JO(e){const{segmentValues:t,formatter:r,locale:n,dateRef:i}=e,s=Object.keys(t).reduce((o,l)=>{if(!kv(l))return o;if("hour"in t&&l==="dayPeriod"){const c=t[l];Nn(c)?o[l]=uc(l,"AM",n):o[l]=c}else o[l]=a(l);return o},{});function a(o){if("hour"in t){const l=t[o],c=typeof l=="string"&&l?.startsWith("0"),f=l!==null?Number.parseInt(l):null;if(l==="0"&&o!=="year")return"0";if(!Nn(l)&&!Nn(f)){const u=r.part(i.set({[o]:l}),o,{hourCycle:e.hourCycle===24?"h23":void 0}),p=e.hourCycle===12||e.hourCycle===void 0&&Ev(n)===12;if(o==="hour"&&p){if(f>12){const h=f-12;return h===0?"12":h<10?`0${h}`:`${h}`}return f===0?"12":f<10?`0${f}`:`${f}`}return o==="year"?`${l}`:c&&u.length===1?`0${u}`:u}else return uc(o,"",n)}else{if(No(o)){const l=t[o],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(Nn(l))return uc(o,"",n);{const f=r.part(i.set({[o]:l}),o);return o==="year"?`${l}`:c&&f.length===1?`0${f}`:f}}return""}}return s}function QO(e){const{granularity:t,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:a}=e;return n.toParts(r,eD(t,a)).map(o=>["literal","dayPeriod","timeZoneName",null].includes(o.type)||!kv(o.type)?{part:o.type,value:o.value}:{part:o.type,value:i[o.type]}).filter(o=>!(Nn(o.part)||Nn(o.value)||o.part==="timeZoneName"&&(!oc(r)||s)))}function XO(e){const t=JO(e);return{obj:t,arr:QO({contentObj:t,...e})}}function eD(e,t){const r={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short",hourCycle:t===24?"h23":void 0,hour12:t===24?!1:void 0};return e==="day"&&(delete r.second,delete r.hour,delete r.minute,delete r.timeZoneName),e==="hour"&&delete r.minute,e==="minute"&&delete r.second,r}function wv(){return sa.reduce((e,t)=>(e[t]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},e),{})}function No(e){return $o.includes(e)}function kv(e){return sa.includes(e)}function tD(e){return bv.includes(e)}function Sv(e){return!ln||!e?[]:Ro(e).map(t=>t.dataset.segment).filter(t=>sa.includes(t))}function rD(e){const{segmentObj:t,fieldNode:r,dateRef:n}=e,i=Sv(r);let s=n;for(const a of i)if("hour"in t){const o=t[a];if(Nn(o))continue;s=s.set({[a]:t[a]})}else if(No(a)){const o=t[a];if(Nn(o))continue;s=s.set({[a]:t[a]})}return s}function nD(e,t){const r=Sv(t);for(const n of r)if("hour"in e){if(e[n]===null)return!1}else if(No(n)&&e[n]===null)return!1;return!0}function iD(e){return typeof e!="object"||e===null?!1:Object.entries(e).every(([t,r])=>(Fo.includes(t)||$o.includes(t))&&(t==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function sD(e,t){return t||(Mo(e)?"minute":"day")}function dc(e){return!!(["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Backspace"," "].includes(e)||ko(e))}function aD(e,t){if(!ln)return!1;const r=Ro(t);return r.length?r[0].id===e:!1}function oD(e){const{id:t,formatter:r,value:n,doc:i}=e;if(!ln)return;const s=r.selectedDate(n),a=i.getElementById(t);if(a)a.innerText=`Selected Date: ${s}`;else{const o=i.createElement("div");o.style.cssText=ea({display:"none"}),o.id=t,o.innerText=`Selected Date: ${s}`,i.body.appendChild(o)}}function lD(e,t){if(!ln)return;const r=t.getElementById(e);r&&t.body.removeChild(r)}function Ev(e){return new Intl.DateTimeFormat(e,{hour:"numeric"}).formatToParts(new Date("2023-01-01T13:00:00")).find(t=>t.type==="hour")?.value==="1"?12:24}function aa(e,t){const r=e.currentTarget;if(!Tr(r))return;const{prev:n,next:i}=fc(r,t);if(e.key==="ArrowLeft"){if(!n)return;n.focus()}else if(e.key==="ArrowRight"){if(!i)return;i.focus()}}function uD(e,t){const r=t.indexOf(e);return r===t.length-1||r===-1?null:t[r+1]}function cD(e,t){const r=t.indexOf(e);return r===0||r===-1?null:t[r-1]}function fc(e,t){const r=Ro(t);return r.length?{next:uD(e,r),prev:cD(e,r)}:{next:null,prev:null}}function xv(e,t){const r=e.currentTarget;if(!Tr(r))return;const{next:n}=fc(r,t);n&&n.focus()}function Tv(e,t){const r=e.currentTarget;if(!Tr(r))return;const{prev:n}=fc(r,t);n&&n.focus()}function oa(e){return e==="ArrowRight"||e==="ArrowLeft"}function Ro(e){return e?Array.from(e.querySelectorAll("[data-segment]")).filter(t=>{if(!Tr(t))return!1;const r=t.dataset.segment;return r==="trigger"?!0:!(!tD(r)||r==="literal")}):[]}function dD(e){return Ro(e)[0]}var fD={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function Av(e){let t=e.initialLocale;function r(h){t=h}function n(){return t}function i(h,g){return new kr(t,g).format(h)}function s(h,g=!0){return Mo(h)&&g?i(Zt(h),{dateStyle:"long",timeStyle:"long"}):i(Zt(h),{dateStyle:"long"})}function a(h){return typeof e.monthFormat.current!="function"&&typeof e.yearFormat.current!="function"?new kr(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(h):`${typeof e.monthFormat.current=="function"?e.monthFormat.current(h.getMonth()+1):new kr(t,{month:e.monthFormat.current}).format(h)} ${typeof e.yearFormat.current=="function"?e.yearFormat.current(h.getFullYear()):new kr(t,{year:e.yearFormat.current}).format(h)}`}function o(h){return new kr(t,{month:"long"}).format(h)}function l(h){return new kr(t,{year:"numeric"}).format(h)}function c(h,g){return oc(h)?new kr(t,{...g,timeZone:h.timeZone}).formatToParts(Zt(h)):new kr(t,g).formatToParts(Zt(h))}function f(h,g="narrow"){return new kr(t,{weekday:g}).format(h)}function u(h,g=void 0){return new kr(t,{hour:"numeric",minute:"numeric",hourCycle:g===24?"h23":void 0}).formatToParts(h).find(v=>v.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function p(h,g,v={}){const m=c(h,{...fD,...v}).find(y=>y.type===g);return m?m.value:""}return{setLocale:r,getLocale:n,fullMonth:o,fullYear:l,fullMonthAndYear:a,toParts:c,custom:i,part:p,dayPeriod:u,selectedDate:s,dayOfWeek:f}}function hD(e){return!(!Tr(e)||!e.hasAttribute("data-bits-day"))}function Cv(e,t){const r=[];let n=e.add({days:1});const i=t;for(;n.compare(i)<0;)r.push(n),n=n.add({days:1});return r}function hc(e){const{dateObj:t,weekStartsOn:r,fixedWeeks:n,locale:i}=e,s=ia(t),a=Array.from({length:s},(v,m)=>t.set({day:m+1})),o=_u(t),l=rE(t),c=r!==void 0?vv(o,r,"en-US"):vv(o,0,i),f=r!==void 0?gv(l,r,"en-US"):gv(l,0,i),u=Cv(c.subtract({days:1}),o),p=Cv(l,f.add({days:1})),h=u.length+a.length+p.length;if(n&&h<42){const v=42-h;let m=p[p.length-1];m||(m=t.add({months:1}).set({day:1}));let y=v;p.length===0&&(y=v-1,p.push(m));const S=Array.from({length:y},(k,E)=>{const T=E+1;return m.add({days:T})});p.push(...S)}const g=u.concat(a,p);return{value:t,dates:g,weeks:_O(g,7)}}function la(e){const{numberOfMonths:t,dateObj:r,...n}=e,i=[];if(!t||t===1)return i.push(hc({...n,dateObj:r})),i;i.push(hc({...n,dateObj:r}));for(let s=1;s<t;s++){const a=r.add({months:s});i.push(hc({...n,dateObj:a}))}return i}function pc(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(t=>Tr(t)):[]}function Ov(e,t){const r=e.getAttribute("data-value");r&&(t.current=mv(r,t.current))}function pD({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:a,numberOfMonths:o}){const l=pc(n);if(!l.length)return;const c=l.indexOf(e)+t;if(nc(c,l)){const f=l[c];return Ov(f,r),f.focus()}if(c<0){if(i)return;const f=a[0]?.value;if(!f)return;r.current=f.subtract({months:o}),ta(()=>{const u=pc(n);if(!u.length)return;const p=u.length-Math.abs(c);if(nc(p,u)){const h=u[p];return Ov(h,r),h.focus()}})}if(c>=l.length){if(s)return;const f=a[0]?.value;if(!f)return;r.current=f.add({months:o}),ta(()=>{const u=pc(n);if(!u.length)return;const p=c-l.length;if(nc(p,u))return u[p].focus()})}}var Dv=[ec,tc,Bm,Vm],Iv=[ZC," "];function mD({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!hD(i)||!Dv.includes(e.key)&&!Iv.includes(e.key))return;e.preventDefault();const s={[ec]:7,[tc]:-7,[Bm]:-1,[Vm]:1};if(Dv.includes(e.key)){const a=s[e.key];a!==void 0&&r(i,a)}if(Iv.includes(e.key)){const a=i.getAttribute("data-value");if(!a)return;t(e,mv(a,n))}}function vD({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:a,setPlaceholder:o}){const l=e[0]?.value;if(l)if(n)o(l.add({months:r}));else{const c=l.add({months:1}),f=la({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:a,numberOfMonths:r});o(c),t(f)}}function gD({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:a,setPlaceholder:o}){const l=e[0]?.value;if(l)if(n)o(l.subtract({months:r}));else{const c=l.subtract({months:1}),f=la({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:a,numberOfMonths:r});o(c),t(f)}}function yD({months:e,formatter:t,weekdayFormat:r}){if(!e.length)return[];const n=e[0].weeks[0];return n?n.map(i=>t.dayOfWeek(Zt(i),r)):[]}function bD(e){ve(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;Re(()=>{const s=e.placeholder.current;if(!s)return;const a={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(la({...a,dateObj:s}))})})}function _D({calendarNode:e,label:t,accessibleHeadingId:r}){const n=_o(e),i=n.createElement("div");i.style.cssText=ea({border:"0px",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"});const s=n.createElement("div");return s.textContent=t,s.id=r,s.role="heading",s.ariaLevel="2",e.insertBefore(i,e.firstChild),i.appendChild(s),()=>{const a=n.getElementById(r);a&&(i.parentElement?.removeChild(i),a.remove())}}function wD({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:a}){ve(()=>{e.current,Re(()=>{t().some(o=>yu(o,e.current))||a(la({weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current,dateObj:e.current}))})})}function kD({maxValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[t.length-1]?.value;return n?BO(n.add({months:1}).set({day:1}),e):!1}function SD({minValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[0]?.value;return n?oi(n.subtract({months:1}).set({day:35}),e):!1}function ED({months:e,locale:t,formatter:r}){if(!e.length)return"";if(t!==r.getLocale()&&r.setLocale(t),e.length===1){const c=Zt(e[0].value);return`${r.fullMonthAndYear(c)}`}const n=Zt(e[0].value),i=Zt(e[e.length-1].value),s=r.fullMonth(n),a=r.fullMonth(i),o=r.fullYear(n),l=r.fullYear(i);return o===l?`${s} - ${a} ${l}`:`${s} ${o} - ${a} ${l}`}function xD({fullCalendarLabel:e,id:t,isInvalid:r,disabled:n,readonly:i}){return{id:t,role:"application","aria-label":e,"data-invalid":Ve(r),"data-disabled":Ve(n),"data-readonly":Ve(i)}}function TD(e){const t=_o(e.target).querySelector("[data-bits-day][data-focused]");t&&(e.preventDefault(),t?.focus())}function AD(e){if(!ln)return;const t=Array.from(e.querySelectorAll("[data-bits-day]:not([aria-disabled=true])"));if(t.length===0)return;const r=t[0],n=r?.getAttribute("data-value"),i=r?.getAttribute("data-type");if(!(!n||!i))return qO(n,i)}function CD({ref:e,placeholder:t,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:s}){function a(o){return!!(s.current(o)||n.current&&oi(o,n.current)||i.current&&oi(i.current,o))}nt(()=>e.current,()=>{e.current&&t.current&&Dn(t.current,r)&&a(r)&&(t.current=AD(e.current)??r)})}function OD(e,t){return!e||!t?e:Mo(e)&&Mo(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}var DD=wo({component:"calendar",parts:["root","grid","cell","next-button","prev-button","day","grid-body","grid-head","grid-row","head-cell","header","heading","month-select","year-select"]});function ID(e){const t=new Date().getFullYear(),r=Math.max(e.placeholderYear,t);let n,i;if(e.minValue)n=e.minValue.year;else{const a=r-100;n=e.placeholderYear<a?e.placeholderYear-10:a}e.maxValue?i=e.maxValue.year:i=r+10,n>i&&(n=i);const s=i-n+1;return Array.from({length:s},(a,o)=>n+o)}var Ar=new Ft("Calendar.Root | RangeCalender.Root"),Pv=class Sy{static create(t){return Ar.set(new Sy(t))}opts;#e=D(()=>this.months.map(t=>t.value));get visibleMonths(){return d(this.#e)}set visibleMonths(t){$(this.#e,t)}formatter;accessibleHeadingId=Rn();domContext;attachment;#t=ae(Me([]));get months(){return d(this.#t)}set months(t){$(this.#t,t,!0)}announcer;constructor(t){this.opts=t,this.attachment=et(this.opts.ref),this.domContext=new ji(t.ref),this.announcer=Po(null),this.formatter=Av({initialLocale:this.opts.locale.current,monthFormat:this.opts.monthFormat,yearFormat:this.opts.yearFormat}),this.setMonths=this.setMonths.bind(this),this.nextPage=this.nextPage.bind(this),this.prevPage=this.prevPage.bind(this),this.prevYear=this.prevYear.bind(this),this.nextYear=this.nextYear.bind(this),this.setYear=this.setYear.bind(this),this.setMonth=this.setMonth.bind(this),this.isOutsideVisibleMonths=this.isOutsideVisibleMonths.bind(this),this.isDateDisabled=this.isDateDisabled.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.shiftFocus=this.shiftFocus.bind(this),this.handleCellClick=this.handleCellClick.bind(this),this.handleMultipleUpdate=this.handleMultipleUpdate.bind(this),this.handleSingleUpdate=this.handleSingleUpdate.bind(this),this.onkeydown=this.onkeydown.bind(this),this.getBitsAttr=this.getBitsAttr.bind(this),En(()=>{this.announcer=Po(this.domContext.getDocument())}),this.months=la({dateObj:this.opts.placeholder.current,weekStartsOn:this.opts.weekStartsOn.current,locale:this.opts.locale.current,fixedWeeks:this.opts.fixedWeeks.current,numberOfMonths:this.opts.numberOfMonths.current}),this.#s(),this.#o(),this.#a(),wD({placeholder:this.opts.placeholder,getVisibleMonths:()=>this.visibleMonths,weekStartsOn:this.opts.weekStartsOn,locale:this.opts.locale,fixedWeeks:this.opts.fixedWeeks,numberOfMonths:this.opts.numberOfMonths,setMonths:r=>this.months=r}),bD({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),nt(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),nt(()=>this.opts.value.current,()=>{const r=this.opts.value.current;if(Array.isArray(r)&&r.length){const n=r[r.length-1];n&&this.opts.placeholder.current!==n&&(this.opts.placeholder.current=n)}else!Array.isArray(r)&&r&&this.opts.placeholder.current!==r&&(this.opts.placeholder.current=r)}),CD({placeholder:t.placeholder,defaultPlaceholder:t.defaultPlaceholder,isDateDisabled:t.isDateDisabled,maxValue:t.maxValue,minValue:t.minValue,ref:t.ref})}setMonths(t){this.months=t}#r=D(()=>yD({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return d(this.#r)}set weekdays(t){$(this.#r,t)}#n=D(()=>Re(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return d(this.#n)}set initialPlaceholderYear(t){$(this.#n,t)}#i=D(()=>ID({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return d(this.#i)}set defaultYears(t){$(this.#i,t)}#s(){ve(()=>{if(Re(()=>this.opts.initialFocus.current)){const t=this.opts.ref.current?.querySelector("[data-focused]");t&&t.focus()}})}#o(){ve(()=>{if(this.opts.ref.current)return _D({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#a(){Il(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){vD({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){gD({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}nextYear(){this.opts.placeholder.current=this.opts.placeholder.current.add({years:1})}prevYear(){this.opts.placeholder.current=this.opts.placeholder.current.subtract({years:1})}setYear(t){this.opts.placeholder.current=this.opts.placeholder.current.set({year:t})}setMonth(t){this.opts.placeholder.current=this.opts.placeholder.current.set({month:t})}#l=D(()=>kD({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return d(this.#l)}set isNextButtonDisabled(t){$(this.#l,t)}#u=D(()=>SD({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return d(this.#u)}set isPrevButtonDisabled(t){$(this.#u,t)}#c=D(()=>{const t=this.opts.value.current,r=this.opts.isDateDisabled.current,n=this.opts.isDateUnavailable.current;if(Array.isArray(t)){if(!t.length)return!1;for(const i of t)if(r(i)||n(i))return!0}else{if(!t)return!1;if(r(t)||n(t))return!0}return!1});get isInvalid(){return d(this.#c)}set isInvalid(t){$(this.#c,t)}#d=D(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,ED({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return d(this.#d)}set headingValue(t){$(this.#d,t)}#h=D(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return d(this.#h)}set fullCalendarLabel(t){$(this.#h,t)}isOutsideVisibleMonths(t){return!this.visibleMonths.some(r=>yu(t,r))}isDateDisabled(t){if(this.opts.isDateDisabled.current(t)||this.opts.disabled.current)return!0;const r=this.opts.minValue.current,n=this.opts.maxValue.current;return!!(r&&oi(t,r)||n&&oi(n,t))}isDateSelected(t){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>Dn(n,t)):r?Dn(r,t):!1}shiftFocus(t,r){return pD({node:t,add:r,placeholder:this.opts.placeholder,calendarNode:this.opts.ref.current,isPrevButtonDisabled:this.isPrevButtonDisabled,isNextButtonDisabled:this.isNextButtonDisabled,months:this.months,numberOfMonths:this.opts.numberOfMonths.current})}#p(t){if(this.opts.type.current!=="multiple"||!this.opts.maxDays.current)return!0;const r=t.length;return!(this.opts.maxDays.current&&r>this.opts.maxDays.current)}handleCellClick(t,r){if(this.opts.readonly.current||this.opts.isDateDisabled.current?.(r)||this.opts.isDateUnavailable.current?.(r))return;const n=this.opts.value.current;if(this.opts.type.current==="multiple")(Array.isArray(n)||n===void 0)&&(this.opts.value.current=this.handleMultipleUpdate(n,r));else if(!Array.isArray(n)){const i=this.handleSingleUpdate(n,r);i?this.announcer.announce(`Selected Date: ${this.formatter.selectedDate(i,!1)}`,"polite"):this.announcer.announce("Selected date is now empty.","polite",5e3),this.opts.value.current=OD(i,n),i!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(t,r){if(!t){const s=[r];return this.#p(s)?s:[r]}if(!Array.isArray(t))return;const n=t.findIndex(s=>Dn(s,r)),i=this.opts.preventDeselect.current;if(n===-1){const s=[...t,r];return this.#p(s)?s:[r]}else{if(i)return t;{const s=t.filter(a=>!Dn(a,r));if(!s.length){this.opts.placeholder.current=r;return}return s}}}handleSingleUpdate(t,r){if(Array.isArray(t),!t)return r;if(!this.opts.preventDeselect.current&&Dn(t,r)){this.opts.placeholder.current=r;return}return r}onkeydown(t){mD({event:t,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#f=D(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return d(this.#f)}set snippetProps(t){$(this.#f,t)}getBitsAttr=t=>DD.getAttr(t);#m=D(()=>({...xD({fullCalendarLabel:this.fullCalendarLabel,id:this.opts.id.current,isInvalid:this.isInvalid,disabled:this.opts.disabled.current,readonly:this.opts.readonly.current}),[this.getBitsAttr("root")]:"",onkeydown:this.onkeydown,...this.attachment}));get props(){return d(this.#m)}set props(t){$(this.#m,t)}},PD=class Ey{static create(t){return new Ey(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Xu(!0),"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("heading")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},Mv=new Ft("Calendar.Cell | RangeCalendar.Cell"),MD=class xy{static create(t){return Mv.set(new xy(t,Ar.get()))}opts;root;#e=D(()=>Zt(this.opts.date.current));get cellDate(){return d(this.#e)}set cellDate(t){$(this.#e,t)}#t=D(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return d(this.#t)}set isUnavailable(t){$(this.#t,t)}#r=D(()=>Q1(this.opts.date.current,Xt()));get isDateToday(){return d(this.#r)}set isDateToday(t){$(this.#r,t)}#n=D(()=>!yu(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return d(this.#n)}set isOutsideMonth(t){$(this.#n,t)}#i=D(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return d(this.#i)}set isOutsideVisibleMonths(t){$(this.#i,t)}#s=D(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return d(this.#s)}set isDisabled(t){$(this.#s,t)}#o=D(()=>Dn(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return d(this.#o)}set isFocusedDate(t){$(this.#o,t)}#a=D(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return d(this.#a)}set isSelectedDate(t){$(this.#a,t)}#l=D(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return d(this.#l)}set labelText(t){$(this.#l,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#u=D(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return d(this.#u)}set snippetProps(t){$(this.#u,t)}#c=D(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return d(this.#c)}set ariaDisabled(t){$(this.#c,t)}#d=D(()=>({"data-unavailable":Ve(this.isUnavailable),"data-today":this.isDateToday?"":void 0,"data-outside-month":this.isOutsideMonth?"":void 0,"data-outside-visible-months":this.isOutsideVisibleMonths?"":void 0,"data-focused":this.isFocusedDate?"":void 0,"data-selected":Ve(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":zO(this.opts.date.current),"data-disabled":Ve(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return d(this.#d)}set sharedDataAttrs(t){$(this.#d,t)}#h=D(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":xr(this.isSelectedDate),"aria-disabled":xr(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return d(this.#h)}set props(t){$(this.#h,t)}},$D=class Ty{static create(t){return new Ty(t,Mv.get())}opts;cell;attachment;constructor(t,r){this.opts=t,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=et(this.opts.ref)}#e=D(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1);onclick(t){this.cell.isDisabled||this.cell.root.handleCellClick(t,this.cell.opts.date.current)}#t=D(()=>({disabled:this.cell.isDisabled,unavailable:this.cell.isUnavailable,selected:this.cell.isSelectedDate,day:`${this.cell.opts.date.current.day}`}));get snippetProps(){return d(this.#t)}set snippetProps(t){$(this.#t,t)}#r=D(()=>({id:this.opts.id.current,role:"button","aria-label":this.cell.labelText,"aria-disabled":xr(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:d(this.#e),[this.cell.root.getBitsAttr("day")]:"","data-bits-day":"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#r)}set props(t){$(this.#r,t)}},FD=class Ay{static create(t){return new Ay(t,Ar.get())}opts;root;#e=D(()=>this.root.isNextButtonDisabled);get isDisabled(){return d(this.#e)}set isDisabled(t){$(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(this.opts.ref)}onclick(t){this.isDisabled||this.root.nextPage()}#t=D(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Next","aria-disabled":xr(this.isDisabled),"data-disabled":Ve(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("next-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#t)}set props(t){$(this.#t,t)}},ND=class Cy{static create(t){return new Cy(t,Ar.get())}opts;root;#e=D(()=>this.root.isPrevButtonDisabled);get isDisabled(){return d(this.#e)}set isDisabled(t){$(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(this.opts.ref)}onclick(t){this.isDisabled||this.root.prevPage()}#t=D(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Previous","aria-disabled":xr(this.isDisabled),"data-disabled":Ve(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("prev-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#t)}set props(t){$(this.#t,t)}},RD=class Oy{static create(t){return new Oy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,tabindex:-1,role:"grid","aria-readonly":xr(this.root.opts.readonly.current),"aria-disabled":xr(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),"data-disabled":Ve(this.root.opts.disabled.current),[this.root.getBitsAttr("grid")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},LD=class Dy{static create(t){return new Dy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-body")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},zD=class Iy{static create(t){return new Iy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-head")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},qD=class Py{static create(t){return new Py(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-row")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},UD=class My{static create(t){return new My(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("head-cell")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},BD=class $y{static create(t){return new $y(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("header")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},VD=new Set(["$$slots","$$events","$$legacy","$$host","child","children","id","ref","value","onValueChange","placeholder","onPlaceholderChange","weekdayFormat","weekStartsOn","pagedNavigation","isDateDisabled","isDateUnavailable","fixedWeeks","numberOfMonths","locale","calendarLabel","disabled","readonly","minValue","maxValue","preventDeselect","type","disableDaysOutsideMonth","initialFocus","maxDays","monthFormat","yearFormat"]),jD=B("<div><!></div>");function $v(e,t){ne(t,!0);let r=_(t,"child",7),n=_(t,"children",7),i=_(t,"id",23,Rn),s=_(t,"ref",15,null),a=_(t,"value",15),o=_(t,"onValueChange",7,xe),l=_(t,"placeholder",15),c=_(t,"onPlaceholderChange",7,xe),f=_(t,"weekdayFormat",7,"narrow"),u=_(t,"weekStartsOn",7),p=_(t,"pagedNavigation",7,!1),h=_(t,"isDateDisabled",7,()=>!1),g=_(t,"isDateUnavailable",7,()=>!1),v=_(t,"fixedWeeks",7,!1),m=_(t,"numberOfMonths",7,1),y=_(t,"locale",7),S=_(t,"calendarLabel",7,"Event"),k=_(t,"disabled",7,!1),E=_(t,"readonly",7,!1),T=_(t,"minValue",7,void 0),O=_(t,"maxValue",7,void 0),F=_(t,"preventDeselect",7,!1),R=_(t,"type",7),Y=_(t,"disableDaysOutsideMonth",7,!0),N=_(t,"initialFocus",7,!1),X=_(t,"maxDays",7),q=_(t,"monthFormat",7,"long"),le=_(t,"yearFormat",7,"numeric"),he=He(t,VD);const j=pv({defaultValue:a(),minValue:T(),maxValue:O()});function oe(){l()===void 0&&l(j)}oe(),nt.pre(()=>l(),()=>{oe()});function ee(){a()===void 0&&a(R()==="single"?void 0:[])}ee(),nt.pre(()=>a(),()=>{ee()});const fe=Pv.create({id:z(()=>i()),ref:z(()=>s(),L=>s(L)),weekdayFormat:z(()=>f()),weekStartsOn:z(()=>u()),pagedNavigation:z(()=>p()),isDateDisabled:z(()=>h()),isDateUnavailable:z(()=>g()),fixedWeeks:z(()=>v()),numberOfMonths:z(()=>m()),locale:Hm(()=>y()),calendarLabel:z(()=>S()),readonly:z(()=>E()),disabled:z(()=>k()),minValue:z(()=>T()),maxValue:z(()=>O()),disableDaysOutsideMonth:z(()=>Y()),initialFocus:z(()=>N()),maxDays:z(()=>X()),placeholder:z(()=>l(),L=>{l(L),c()(L)}),preventDeselect:z(()=>F()),value:z(()=>a(),L=>{a(L),o()(L)}),type:z(()=>R()),monthFormat:z(()=>q()),yearFormat:z(()=>le()),defaultPlaceholder:j}),ce=D(()=>Ke(he,fe.props));var de={get child(){return r()},set child(L){r(L),b()},get children(){return n()},set children(L){n(L),b()},get id(){return i()},set id(L=Rn()){i(L),b()},get ref(){return s()},set ref(L=null){s(L),b()},get value(){return a()},set value(L){a(L),b()},get onValueChange(){return o()},set onValueChange(L=xe){o(L),b()},get placeholder(){return l()},set placeholder(L){l(L),b()},get onPlaceholderChange(){return c()},set onPlaceholderChange(L=xe){c(L),b()},get weekdayFormat(){return f()},set weekdayFormat(L="narrow"){f(L),b()},get weekStartsOn(){return u()},set weekStartsOn(L){u(L),b()},get pagedNavigation(){return p()},set pagedNavigation(L=!1){p(L),b()},get isDateDisabled(){return h()},set isDateDisabled(L=()=>!1){h(L),b()},get isDateUnavailable(){return g()},set isDateUnavailable(L=()=>!1){g(L),b()},get fixedWeeks(){return v()},set fixedWeeks(L=!1){v(L),b()},get numberOfMonths(){return m()},set numberOfMonths(L=1){m(L),b()},get locale(){return y()},set locale(L){y(L),b()},get calendarLabel(){return S()},set calendarLabel(L="Event"){S(L),b()},get disabled(){return k()},set disabled(L=!1){k(L),b()},get readonly(){return E()},set readonly(L=!1){E(L),b()},get minValue(){return T()},set minValue(L=void 0){T(L),b()},get maxValue(){return O()},set maxValue(L=void 0){O(L),b()},get preventDeselect(){return F()},set preventDeselect(L=!1){F(L),b()},get type(){return R()},set type(L){R(L),b()},get disableDaysOutsideMonth(){return Y()},set disableDaysOutsideMonth(L=!0){Y(L),b()},get initialFocus(){return N()},set initialFocus(L=!1){N(L),b()},get maxDays(){return X()},set maxDays(L){X(L),b()},get monthFormat(){return q()},set monthFormat(L="long"){q(L),b()},get yearFormat(){return le()},set yearFormat(L="numeric"){le(L),b()}},G=re(),Q=U(G),P=L=>{var be=re(),Z=U(be);{let w=D(()=>({props:d(ce),...fe.snippetProps}));Se(Z,r,()=>d(w))}x(L,be)},te=L=>{var be=jD();Ue(be,()=>({...d(ce)}));var Z=M(be);Se(Z,()=>n()??qe,()=>fe.snippetProps),I(be),x(L,be)};return ue(Q,L=>{r()?L(P):L(te,-1)}),x(e,G),ie(de)}se($v,{child:{},children:{},id:{},ref:{},value:{},onValueChange:{},placeholder:{},onPlaceholderChange:{},weekdayFormat:{},weekStartsOn:{},pagedNavigation:{},isDateDisabled:{},isDateUnavailable:{},fixedWeeks:{},numberOfMonths:{},locale:{},calendarLabel:{},disabled:{},readonly:{},minValue:{},maxValue:{},preventDeselect:{},type:{},disableDaysOutsideMonth:{},initialFocus:{},maxDays:{},monthFormat:{},yearFormat:{}},[],[],{mode:"open"});var ZD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),WD=B("<div><!></div>");function mc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,ZD);const l=$D.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);{let S=D(()=>({props:d(c),...l.snippetProps}));Se(y,i,()=>d(S))}x(v,m)},g=v=>{var m=WD();Ue(m,()=>({...d(c)}));var y=M(m),S=E=>{var T=re(),O=U(T);Se(O,()=>n()??qe,()=>l.snippetProps),x(E,T)},k=E=>{var T=Bt();J(()=>H(T,l.cell.opts.date.current.day)),x(E,T)};ue(y,E=>{n()?E(S):E(k,-1)}),I(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),ie(f)}se(mc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var HD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),GD=B("<table><!></table>");function vc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,HD);const l=RD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=GD();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),ie(f)}se(vc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var KD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),YD=B("<tbody><!></tbody>");function gc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,KD);const l=LD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=YD();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),ie(f)}se(gc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var JD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]),QD=B("<td><!></td>");function yc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=_(t,"date",7),l=_(t,"month",7),c=He(t,JD);const f=MD.create({id:z(()=>a()),ref:z(()=>s(),y=>s(y)),date:z(()=>o()),month:z(()=>l())}),u=D(()=>Ke(c,f.props));var p={get children(){return n()},set children(y){n(y),b()},get child(){return i()},set child(y){i(y),b()},get ref(){return s()},set ref(y=null){s(y),b()},get id(){return a()},set id(y=Pe(r)){a(y),b()},get date(){return o()},set date(y){o(y),b()},get month(){return l()},set month(y){l(y),b()}},h=re(),g=U(h),v=y=>{var S=re(),k=U(S);{let E=D(()=>({props:d(u),...f.snippetProps}));Se(k,i,()=>d(E))}x(y,S)},m=y=>{var S=QD();Ue(S,()=>({...d(u)}));var k=M(S);Se(k,()=>n()??qe,()=>f.snippetProps),I(S),x(y,S)};return ue(g,y=>{i()?y(v):y(m,-1)}),x(e,h),ie(p)}se(yc,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var XD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),eI=B("<thead><!></thead>");function bc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,XD);const l=zD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=eI();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),ie(f)}se(bc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var tI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),rI=B("<th><!></th>");function _c(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,tI);const l=UD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=rI();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),ie(f)}se(_c,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var nI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),iI=B("<tr><!></tr>");function ua(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,nI);const l=qD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=iI();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),ie(f)}se(ua,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var sI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),aI=B("<header><!></header>");function wc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,sI);const l=BD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=aI();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),ie(f)}se(wc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var oI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),lI=B("<div><!></div>");function kc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,oI);const l=PD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c),headingValue:l.root.headingValue})),x(v,m)},g=v=>{var m=lI();Ue(m,()=>({...d(c)}));var y=M(m),S=E=>{var T=re(),O=U(T);Se(O,()=>n()??qe,()=>({headingValue:l.root.headingValue})),x(E,T)},k=E=>{var T=Bt();J(()=>H(T,l.root.headingValue)),x(E,T)};ue(y,E=>{n()?E(S):E(k,-1)}),I(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),ie(f)}se(kc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var uI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),cI=B("<button><!></button>");function Sc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Pe(r)),a=_(t,"ref",15,null),o=_(t,"tabindex",7,0),l=He(t,uI);const c=FD.create({id:z(()=>s()),ref:z(()=>a(),m=>a(m))}),f=D(()=>Ke(l,c.props,{tabindex:o()}));var u={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get id(){return s()},set id(m=Pe(r)){s(m),b()},get ref(){return a()},set ref(m=null){a(m),b()},get tabindex(){return o()},set tabindex(m=0){o(m),b()}},p=re(),h=U(p),g=m=>{var y=re(),S=U(y);Se(S,i,()=>({props:d(f)})),x(m,y)},v=m=>{var y=cI();Ue(y,()=>({...d(f)}));var S=M(y);Se(S,()=>n()??qe),I(y),x(m,y)};return ue(h,m=>{i()?m(g):m(v,-1)}),x(e,p),ie(u)}se(Sc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var dI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),fI=B("<button><!></button>");function Ec(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Pe(r)),a=_(t,"ref",15,null),o=_(t,"tabindex",7,0),l=He(t,dI);const c=ND.create({id:z(()=>s()),ref:z(()=>a(),m=>a(m))}),f=D(()=>Ke(l,c.props,{tabindex:o()}));var u={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get id(){return s()},set id(m=Pe(r)){s(m),b()},get ref(){return a()},set ref(m=null){a(m),b()},get tabindex(){return o()},set tabindex(m=0){o(m),b()}},p=re(),h=U(p),g=m=>{var y=re(),S=U(y);Se(S,i,()=>({props:d(f)})),x(m,y)},v=m=>{var y=fI();Ue(y,()=>({...d(f)}));var S=M(y);Se(S,()=>n()??qe),I(y),x(m,y)};return ue(h,m=>{i()?m(g):m(v,-1)}),x(e,p),ie(u)}se(Ec,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var hI=new Set(["$$slots","$$events","$$legacy","$$host","value"]),Fv=B("<input/>");function Nv(e,t){ne(t,!0);let r=_(t,"value",15),n=He(t,hI);const i=D(()=>Ke(n,{"aria-hidden":"true",tabindex:-1,style:{...Mm,position:"absolute",top:"0",left:"0"}}));var s={get value(){return r()},set value(f){r(f),b()}},a=re(),o=U(a),l=f=>{var u=Fv();Ue(u,()=>({...d(i),value:r()}),void 0,void 0,void 0,void 0,!0),x(f,u)},c=f=>{var u=Fv();Ue(u,()=>({...d(i)}),void 0,void 0,void 0,void 0,!0),Va(u,r),x(f,u)};return ue(o,f=>{d(i).type==="checkbox"?f(l):f(c,-1)}),x(e,a),ie(s)}se(Nv,{value:{}},[],[],{mode:"open"});var pI=["top","right","bottom","left"],Ln=Math.min,tr=Math.max,Lo=Math.round,zo=Math.floor,Yr=e=>({x:e,y:e}),mI={left:"right",right:"left",bottom:"top",top:"bottom"};function xc(e,t,r){return tr(e,Ln(t,r))}function un(e,t){return typeof e=="function"?e(t):e}function cn(e){return e.split("-")[0]}function Zi(e){return e.split("-")[1]}function Tc(e){return e==="x"?"y":"x"}function Ac(e){return e==="y"?"height":"width"}function Jr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Cc(e){return Tc(Jr(e))}function vI(e,t,r){r===void 0&&(r=!1);const n=Zi(e),i=Cc(e),s=Ac(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=qo(a)),[a,qo(a)]}function gI(e){const t=qo(e);return[Oc(e),t,Oc(t)]}function Oc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Rv=["left","right"],Lv=["right","left"],yI=["top","bottom"],bI=["bottom","top"];function _I(e,t,r){switch(e){case"top":case"bottom":return r?t?Lv:Rv:t?Rv:Lv;case"left":case"right":return t?yI:bI;default:return[]}}function wI(e,t,r,n){const i=Zi(e);let s=_I(cn(e),r==="start",n);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(Oc)))),s}function qo(e){const t=cn(e);return mI[t]+e.slice(t.length)}function kI(e){return{top:0,right:0,bottom:0,left:0,...e}}function zv(e){return typeof e!="number"?kI(e):{top:e,right:e,bottom:e,left:e}}function Uo(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function qv(e,t,r){let{reference:n,floating:i}=e;const s=Jr(t),a=Cc(t),o=Ac(a),l=cn(t),c=s==="y",f=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,p=n[o]/2-i[o]/2;let h;switch(l){case"top":h={x:f,y:n.y-i.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-i.width,y:u};break;default:h={x:n.x,y:n.y}}switch(Zi(t)){case"start":h[a]-=p*(r&&c?-1:1);break;case"end":h[a]+=p*(r&&c?-1:1);break}return h}async function SI(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=un(t,e),g=zv(h),v=o[p?u==="floating"?"reference":"floating":u],m=Uo(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(v)))==null||r?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:c,rootBoundary:f,strategy:l})),y=u==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),k=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},E=Uo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:S,strategy:l}):y);return{top:(m.top-E.top+g.top)/k.y,bottom:(E.bottom-m.bottom+g.bottom)/k.y,left:(m.left-E.left+g.left)/k.x,right:(E.right-m.right+g.right)/k.x}}var EI=50,xI=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:a}=r,o=a.detectOverflow?a:{...a,detectOverflow:SI},l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:u}=qv(c,n,l),p=n,h=0;const g={};for(let v=0;v<s.length;v++){const m=s[v];if(!m)continue;const{name:y,fn:S}=m,{x:k,y:E,data:T,reset:O}=await S({x:f,y:u,initialPlacement:n,placement:p,strategy:i,middlewareData:g,rects:c,platform:o,elements:{reference:e,floating:t}});f=k??f,u=E??u,g[y]={...g[y],...T},O&&h<EI&&(h++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(c=O.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:f,y:u}=qv(c,p,l)),v=-1)}return{x:f,y:u,placement:p,strategy:i,middlewareData:g}},TI=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:s,platform:a,elements:o,middlewareData:l}=t,{element:c,padding:f=0}=un(e,t)||{};if(c==null)return{};const u=zv(f),p={x:r,y:n},h=Cc(i),g=Ac(h),v=await a.getDimensions(c),m=h==="y",y=m?"top":"left",S=m?"bottom":"right",k=m?"clientHeight":"clientWidth",E=s.reference[g]+s.reference[h]-p[h]-s.floating[g],T=p[h]-s.reference[h],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let F=O?O[k]:0;(!F||!await(a.isElement==null?void 0:a.isElement(O)))&&(F=o.floating[k]||s.floating[g]);const R=E/2-T/2,Y=F/2-v[g]/2-1,N=Ln(u[y],Y),X=Ln(u[S],Y),q=N,le=F-v[g]-X,he=F/2-v[g]/2+R,j=xc(q,he,le),oe=!l.arrow&&Zi(i)!=null&&he!==j&&s.reference[g]/2-(he<q?N:X)-v[g]/2<0,ee=oe?he<q?he-q:he-le:0;return{[h]:p[h]+ee,data:{[h]:j,centerOffset:he-j-ee,...oe&&{alignmentOffset:ee}},reset:oe}}}),AI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:s,rects:a,initialPlacement:o,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...m}=un(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=cn(i),S=Jr(o),k=cn(o)===o,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=p||(k||!v?[qo(o)]:gI(o)),O=g!=="none";!p&&O&&T.push(...wI(o,v,g,E));const F=[o,...T],R=await l.detectOverflow(t,m),Y=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&Y.push(R[y]),u){const he=vI(i,a,E);Y.push(R[he[0]],R[he[1]])}if(N=[...N,{placement:i,overflows:Y}],!Y.every(he=>he<=0)){var X,q;const he=(((X=s.flip)==null?void 0:X.index)||0)+1,j=F[he];if(j&&(!(u==="alignment"&&S!==Jr(j))||N.every(ee=>Jr(ee.placement)===S?ee.overflows[0]>0:!0)))return{data:{index:he,overflows:N},reset:{placement:j}};let oe=(q=N.filter(ee=>ee.overflows[0]<=0).sort((ee,fe)=>ee.overflows[1]-fe.overflows[1])[0])==null?void 0:q.placement;if(!oe)switch(h){case"bestFit":{var le;const ee=(le=N.filter(fe=>{if(O){const ce=Jr(fe.placement);return ce===S||ce==="y"}return!0}).map(fe=>[fe.placement,fe.overflows.filter(ce=>ce>0).reduce((ce,de)=>ce+de,0)]).sort((fe,ce)=>fe[1]-ce[1])[0])==null?void 0:le[0];ee&&(oe=ee);break}case"initialPlacement":oe=o;break}if(i!==oe)return{reset:{placement:oe}}}return{}}}};function Uv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bv(e){return pI.some(t=>e[t]>=0)}var CI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...s}=un(e,t);switch(i){case"referenceHidden":{const a=Uv(await n.detectOverflow(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Bv(a)}}}case"escaped":{const a=Uv(await n.detectOverflow(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:a,escaped:Bv(a)}}}default:return{}}}}},Vv=new Set(["left","top"]);async function OI(e,t){const{placement:r,platform:n,elements:i}=e,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=cn(r),o=Zi(r),l=Jr(r)==="y",c=Vv.has(a)?-1:1,f=s&&l?-1:1,u=un(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return o&&typeof g=="number"&&(h=o==="end"?g*-1:g),l?{x:h*f,y:p*c}:{x:p*c,y:h*f}}var DI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:s,placement:a,middlewareData:o}=t,l=await OI(t,e);return a===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:a}}}}},II=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:s}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:y=>{let{x:S,y:k}=y;return{x:S,y:k}}},...c}=un(e,t),f={x:r,y:n},u=await s.detectOverflow(t,c),p=Jr(cn(i)),h=Tc(p);let g=f[h],v=f[p];if(a){const y=h==="y"?"top":"left",S=h==="y"?"bottom":"right",k=g+u[y],E=g-u[S];g=xc(k,g,E)}if(o){const y=p==="y"?"top":"left",S=p==="y"?"bottom":"right",k=v+u[y],E=v-u[S];v=xc(k,v,E)}const m=l.fn({...t,[h]:g,[p]:v});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[h]:a,[p]:o}}}}}},PI=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=un(e,t),f={x:r,y:n},u=Jr(i),p=Tc(u);let h=f[p],g=f[u];const v=un(o,t),m=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const k=p==="y"?"height":"width",E=s.reference[p]-s.floating[k]+m.mainAxis,T=s.reference[p]+s.reference[k]-m.mainAxis;h<E?h=E:h>T&&(h=T)}if(c){var y,S;const k=p==="y"?"width":"height",E=Vv.has(cn(i)),T=s.reference[u]-s.floating[k]+(E&&((y=a.offset)==null?void 0:y[u])||0)+(E?0:m.crossAxis),O=s.reference[u]+s.reference[k]+(E?0:((S=a.offset)==null?void 0:S[u])||0)-(E?m.crossAxis:0);g<T?g=T:g>O&&(g=O)}return{[p]:h,[u]:g}}}},MI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:s,platform:a,elements:o}=t,{apply:l=()=>{},...c}=un(e,t),f=await a.detectOverflow(t,c),u=cn(i),p=Zi(i),h=Jr(i)==="y",{width:g,height:v}=s.floating;let m,y;u==="top"||u==="bottom"?(m=u,y=p===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(y=u,m=p==="end"?"top":"bottom");const S=v-f.top-f.bottom,k=g-f.left-f.right,E=Ln(v-f[m],S),T=Ln(g-f[y],k),O=!t.middlewareData.shift;let F=E,R=T;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=k),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(F=S),O&&!p){const N=tr(f.left,0),X=tr(f.right,0),q=tr(f.top,0),le=tr(f.bottom,0);h?R=g-2*(N!==0||X!==0?N+X:tr(f.left,f.right)):F=v-2*(q!==0||le!==0?q+le:tr(f.top,f.bottom))}await l({...t,availableWidth:R,availableHeight:F});const Y=await a.getDimensions(o.floating);return g!==Y.width||v!==Y.height?{reset:{rects:!0}}:{}}}};function Bo(){return typeof window<"u"}function Wi(e){return jv(e)?(e.nodeName||"").toLowerCase():"#document"}function rr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qr(e){var t;return(t=(jv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function jv(e){return Bo()?e instanceof Node||e instanceof rr(e).Node:!1}function Cr(e){return Bo()?e instanceof Element||e instanceof rr(e).Element:!1}function dn(e){return Bo()?e instanceof HTMLElement||e instanceof rr(e).HTMLElement:!1}function Zv(e){return!Bo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rr(e).ShadowRoot}function ca(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Or(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function $I(e){return/^(table|td|th)$/.test(Wi(e))}function Vo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var FI=/transform|translate|scale|rotate|perspective|filter/,NI=/paint|layout|strict|content/,li=e=>!!e&&e!=="none",Dc;function Ic(e){const t=Cr(e)?Or(e):e;return li(t.transform)||li(t.translate)||li(t.scale)||li(t.rotate)||li(t.perspective)||!Pc()&&(li(t.backdropFilter)||li(t.filter))||FI.test(t.willChange||"")||NI.test(t.contain||"")}function RI(e){let t=zn(e);for(;dn(t)&&!Hi(t);){if(Ic(t))return t;if(Vo(t))return null;t=zn(t)}return null}function Pc(){return Dc==null&&(Dc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Dc}function Hi(e){return/^(html|body|#document)$/.test(Wi(e))}function Or(e){return rr(e).getComputedStyle(e)}function jo(e){return Cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zn(e){if(Wi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zv(e)&&e.host||Qr(e);return Zv(t)?t.host:t}function Wv(e){const t=zn(e);return Hi(t)?e.ownerDocument?e.ownerDocument.body:e.body:dn(t)&&ca(t)?t:Wv(t)}function da(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Wv(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),a=rr(i);if(s){const o=Mc(a);return t.concat(a,a.visualViewport||[],ca(i)?i:[],o&&r?da(o):[])}else return t.concat(i,da(i,[],r))}function Mc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Hv(e){const t=Or(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=dn(e),s=i?e.offsetWidth:r,a=i?e.offsetHeight:n,o=Lo(r)!==s||Lo(n)!==a;return o&&(r=s,n=a),{width:r,height:n,$:o}}function $c(e){return Cr(e)?e:e.contextElement}function Gi(e){const t=$c(e);if(!dn(t))return Yr(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:s}=Hv(t);let a=(s?Lo(r.width):r.width)/n,o=(s?Lo(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}var LI=Yr(0);function Gv(e){const t=rr(e);return!Pc()||!t.visualViewport?LI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function zI(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==rr(e)?!1:t}function ui(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=$c(e);let a=Yr(1);t&&(n?Cr(n)&&(a=Gi(n)):a=Gi(e));const o=zI(s,r,n)?Gv(s):Yr(0);let l=(i.left+o.x)/a.x,c=(i.top+o.y)/a.y,f=i.width/a.x,u=i.height/a.y;if(s){const p=rr(s),h=n&&Cr(n)?rr(n):n;let g=p,v=Mc(g);for(;v&&n&&h!==g;){const m=Gi(v),y=v.getBoundingClientRect(),S=Or(v),k=y.left+(v.clientLeft+parseFloat(S.paddingLeft))*m.x,E=y.top+(v.clientTop+parseFloat(S.paddingTop))*m.y;l*=m.x,c*=m.y,f*=m.x,u*=m.y,l+=k,c+=E,g=rr(v),v=Mc(g)}}return Uo({width:f,height:u,x:l,y:c})}function Zo(e,t){const r=jo(e).scrollLeft;return t?t.left+r:ui(Qr(e)).left+r}function Kv(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Zo(e,r),y:r.top+t.scrollTop}}function qI(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const s=i==="fixed",a=Qr(n),o=t?Vo(t.floating):!1;if(n===a||o&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Yr(1);const f=Yr(0),u=dn(n);if((u||!u&&!s)&&((Wi(n)!=="body"||ca(a))&&(l=jo(n)),u)){const h=ui(n);c=Gi(n),f.x=h.x+n.clientLeft,f.y=h.y+n.clientTop}const p=a&&!u&&!s?Kv(a,l):Yr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+f.x+p.x,y:r.y*c.y-l.scrollTop*c.y+f.y+p.y}}function UI(e){return Array.from(e.getClientRects())}function BI(e){const t=Qr(e),r=jo(e),n=e.ownerDocument.body,i=tr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=tr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Zo(e);const o=-r.scrollTop;return Or(n).direction==="rtl"&&(a+=tr(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:a,y:o}}var Yv=25;function VI(e,t){const r=rr(e),n=Qr(e),i=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;const f=Pc();(!f||f&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}const c=Zo(n);if(c<=0){const f=n.ownerDocument,u=f.body,p=getComputedStyle(u),h=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(n.clientWidth-u.clientWidth-h);g<=Yv&&(s-=g)}else c<=Yv&&(s+=c);return{width:s,height:a,x:o,y:l}}function jI(e,t){const r=ui(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=dn(e)?Gi(e):Yr(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:i*s.x,y:n*s.y}}function Jv(e,t,r){let n;if(t==="viewport")n=VI(e,r);else if(t==="document")n=BI(Qr(e));else if(Cr(t))n=jI(t,r);else{const i=Gv(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Uo(n)}function Qv(e,t){const r=zn(e);return r===t||!Cr(r)||Hi(r)?!1:Or(r).position==="fixed"||Qv(r,t)}function ZI(e,t){const r=t.get(e);if(r)return r;let n=da(e,[],!1).filter(o=>Cr(o)&&Wi(o)!=="body"),i=null;const s=Or(e).position==="fixed";let a=s?zn(e):e;for(;Cr(a)&&!Hi(a);){const o=Or(a),l=Ic(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||ca(a)&&!l&&Qv(e,a))?n=n.filter(c=>c!==a):i=o,a=zn(a)}return t.set(e,n),n}function WI(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Vo(t)?[]:ZI(t,this._c):[].concat(r),n],a=Jv(t,s[0],i);let o=a.top,l=a.right,c=a.bottom,f=a.left;for(let u=1;u<s.length;u++){const p=Jv(t,s[u],i);o=tr(p.top,o),l=Ln(p.right,l),c=Ln(p.bottom,c),f=tr(p.left,f)}return{width:l-f,height:c-o,x:f,y:o}}function HI(e){const{width:t,height:r}=Hv(e);return{width:t,height:r}}function GI(e,t,r){const n=dn(t),i=Qr(t),s=r==="fixed",a=ui(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const l=Yr(0);function c(){l.x=Zo(i)}if(n||!n&&!s)if((Wi(t)!=="body"||ca(i))&&(o=jo(t)),n){const u=ui(t,!0,s,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else i&&c();s&&!n&&i&&c();const f=i&&!n&&!s?Kv(i,o):Yr(0);return{x:a.left+o.scrollLeft-l.x-f.x,y:a.top+o.scrollTop-l.y-f.y,width:a.width,height:a.height}}function Fc(e){return Or(e).position==="static"}function Xv(e,t){if(!dn(e)||Or(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Qr(e)===r&&(r=r.ownerDocument.body),r}function eg(e,t){const r=rr(e);if(Vo(e))return r;if(!dn(e)){let i=zn(e);for(;i&&!Hi(i);){if(Cr(i)&&!Fc(i))return i;i=zn(i)}return r}let n=Xv(e,t);for(;n&&$I(n)&&Fc(n);)n=Xv(n,t);return n&&Hi(n)&&Fc(n)&&!Ic(n)?r:n||RI(e)||r}var KI=async function(e){const t=this.getOffsetParent||eg,r=this.getDimensions,n=await r(e.floating);return{reference:GI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function YI(e){return Or(e).direction==="rtl"}var JI={convertOffsetParentRelativeRectToViewportRelativeRect:qI,getDocumentElement:Qr,getClippingRect:WI,getOffsetParent:eg,getElementRects:KI,getClientRects:UI,getDimensions:HI,getScale:Gi,isElement:Cr,isRTL:YI};function tg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function QI(e,t){let r=null,n;const i=Qr(e);function s(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:f,top:u,width:p,height:h}=c;if(o||t(),!p||!h)return;const g=zo(u),v=zo(i.clientWidth-(f+p)),m=zo(i.clientHeight-(u+h)),y=zo(f),S={rootMargin:-g+"px "+-v+"px "+-m+"px "+-y+"px",threshold:tr(0,Ln(1,l))||1};let k=!0;function E(T){const O=T[0].intersectionRatio;if(O!==l){if(!k)return a();O?a(!1,O):n=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!tg(c,e.getBoundingClientRect())&&a(),k=!1}try{r=new IntersectionObserver(E,{...S,root:i.ownerDocument})}catch{r=new IntersectionObserver(E,S)}r.observe(e)}return a(!0),s}function XI(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=$c(e),f=i||s?[...c?da(c):[],...t?da(t):[]]:[];f.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const u=c&&o?QI(c,r):null;let p=-1,h=null;a&&(h=new ResizeObserver(y=>{let[S]=y;S&&S.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var k;(k=h)==null||k.observe(t)})),r()}),c&&!l&&h.observe(c),t&&h.observe(t));let g,v=l?ui(e):null;l&&m();function m(){const y=ui(e);v&&!tg(v,y)&&r(),v=y,g=requestAnimationFrame(m)}return r(),()=>{var y;f.forEach(S=>{i&&S.removeEventListener("scroll",r),s&&S.removeEventListener("resize",r)}),u?.(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(g)}}var eP=DI,tP=II,rP=AI,nP=MI,iP=CI,sP=TI,aP=PI,oP=(e,t,r)=>{const n=new Map,i={platform:JI,...r},s={...i.platform,_c:n};return xI(e,t,{...i,platform:s})};function ci(e){return typeof e=="function"?e():e}function rg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ng(e,t){const r=rg(e);return Math.round(t*r)/r}function ig(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function lP(e){const t=e.whileElementsMounted,r=D(()=>ci(e.open)??!0),n=D(()=>ci(e.middleware)),i=D(()=>ci(e.transform)??!0),s=D(()=>ci(e.placement)??"bottom"),a=D(()=>ci(e.strategy)??"absolute"),o=D(()=>ci(e.sideOffset)??0),l=D(()=>ci(e.alignOffset)??0),c=e.reference;let f=ae(0),u=ae(0);const p=Er(null);let h=ae(Me(d(a))),g=ae(Me(d(s))),v=ae(Me({})),m=ae(!1),y=!1,S=0;const k=D(()=>{const N=p.current?ng(p.current,d(f)):d(f),X=p.current?ng(p.current,d(u)):d(u);return d(i)?{position:d(h),left:"0",top:"0",transform:`translate(${N}px, ${X}px)`,...p.current&&rg(p.current)>=1.5&&{willChange:"transform"}}:{position:d(h),left:`${N}px`,top:`${X}px`}});let E;function T(){if(c.current===null||p.current===null)return;const N=c.current,X=p.current,q=++S;oP(N,X,{middleware:d(n),placement:d(s),strategy:d(a)}).then(le=>{if(q===S&&!(c.current!==N||p.current!==X)){if(uP(N)){$(v,{...d(v),hide:{...d(v).hide,referenceHidden:!0}},!0);return}if(!d(r)&&d(f)!==0&&d(u)!==0){const he=Math.max(Math.abs(d(o)),Math.abs(d(l)),15);if(le.x<=he&&le.y<=he)return}$(f,le.x,!0),$(u,le.y,!0),$(h,le.strategy,!0),$(g,le.placement,!0),$(v,le.middlewareData,!0),$(m,!0)}})}function O(){typeof E=="function"&&(E(),E=void 0),S++}function F(){if(O(),t===void 0){T();return}d(r)&&(c.current===null||p.current===null||(E=t(c.current,p.current,T)))}function R(){!d(r)&&p.current===null&&$(m,!1)}function Y(){return[d(n),d(s),d(a),d(o),d(l),d(r)]}return ve(()=>{t===void 0&&d(r)&&T()}),ve(F),ve(()=>{if(t!==void 0){if(Y(),!d(r)){y=!1;return}if(!d(m)){y=!1;return}if(!y){y=!0;return}T()}}),ve(R),ve(()=>O),{floating:p,reference:c,get strategy(){return d(h)},get placement(){return d(g)},get middlewareData(){return d(v)},get isPositioned(){return d(m)},get floatingStyles(){return d(k)},get update(){return T}}}function uP(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var cP={top:"bottom",right:"left",bottom:"top",left:"right"},Nc=new Ft("Floating.Root"),sg=new Ft("Floating.Content"),Rc=new Ft("Floating.Root"),dP=class md{static create(t=!1){return t?Rc.set(new md):Nc.set(new md)}anchorNode=Er(null);customAnchorNode=Er(null);triggerNode=Er(null);constructor(){ve(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},fP=class vd{static create(t,r=!1){return r?sg.set(new vd(t,Rc.get())):sg.set(new vd(t,Nc.get()))}opts;root;contentRef=Er(null);wrapperRef=Er(null);arrowRef=Er(null);contentAttachment=et(this.contentRef);wrapperAttachment=et(this.wrapperRef);arrowAttachment=et(this.arrowRef);arrowId=Er(Rn());#e=D(()=>{if(typeof this.opts.style=="string")return Qs(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new OC(()=>this.arrowRef.current??void 0);#n=D(()=>this.#r?.width??0);#i=D(()=>this.#r?.height??0);#s=D(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#o=D(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#a=D(()=>d(this.#o).length>0);get hasExplicitBoundaries(){return d(this.#a)}set hasExplicitBoundaries(t){$(this.#a,t)}#l=D(()=>({padding:this.opts.collisionPadding.current,boundary:d(this.#o).filter(GC),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return d(this.#l)}set detectOverflowOptions(t){$(this.#l,t)}#u=ae(void 0);#c=ae(void 0);#d=ae(void 0);#h=ae(void 0);#p=D(()=>[eP({mainAxis:this.opts.sideOffset.current+d(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&tP({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?aP():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&rP({...this.detectOverflowOptions}),nP({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:n})=>{const{width:i,height:s}=t.reference;$(this.#u,r,!0),$(this.#c,n,!0),$(this.#d,i,!0),$(this.#h,s,!0)}}),this.arrowRef.current&&sP({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),pP({arrowWidth:d(this.#n),arrowHeight:d(this.#i)}),this.opts.hideWhenDetached.current&&iP({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return d(this.#p)}set middleware(t){$(this.#p,t)}floating;#f=D(()=>mP(this.floating.placement));get placedSide(){return d(this.#f)}set placedSide(t){$(this.#f,t)}#m=D(()=>vP(this.floating.placement));get placedAlign(){return d(this.#m)}set placedAlign(t){$(this.#m,t)}#v=D(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return d(this.#v)}set arrowX(t){$(this.#v,t)}#y=D(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return d(this.#y)}set arrowY(t){$(this.#y,t)}#w=D(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return d(this.#w)}set cannotCenterArrow(t){$(this.#w,t)}#_=ae();get contentZIndex(){return d(this.#_)}set contentZIndex(t){$(this.#_,t,!0)}#g=D(()=>cP[this.placedSide]);get arrowBaseSide(){return d(this.#g)}set arrowBaseSide(t){$(this.#g,t)}#k=D(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${d(this.#u)}px`,"--bits-floating-available-height":`${d(this.#c)}px`,"--bits-floating-anchor-width":`${d(this.#d)}px`,"--bits-floating-anchor-height":`${d(this.#h)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...d(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return d(this.#k)}set wrapperProps(t){$(this.#k,t)}#b=D(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:ea({...d(this.#e)}),...this.contentAttachment}));get props(){return d(this.#b)}set props(t){$(this.#b,t)}#S=D(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return d(this.#S)}set arrowStyle(t){$(this.#S,t)}constructor(t,r){this.opts=t,this.root=r,this.#t=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),nt(()=>t.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=lP({strategy:()=>this.opts.strategy.current,placement:()=>d(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>XI(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),ve(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),nt(()=>this.contentRef.current,n=>{if(!n||!this.opts.enabled.current)return;const i=qm(n),s=i.requestAnimationFrame(()=>{if(this.contentRef.current!==n||!this.opts.enabled.current)return;const a=i.getComputedStyle(n).zIndex;a!==this.contentZIndex&&(this.contentZIndex=a)});return()=>{i.cancelAnimationFrame(s)}}),ve(()=>{this.floating.floating.current=this.wrapperRef.current})}},hP=class gd{static create(t,r=!1){return r?new gd(t,Rc.get()):new gd(t,Nc.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=GA(t.virtualEl.current):r.triggerNode=t.ref}};function pP(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,o=s?0:e.arrowHeight,[l,c]=Lc(r),f={start:"0%",center:"50%",end:"100%"}[c],u=(i.arrow?.x??0)+a/2,p=(i.arrow?.y??0)+o/2;let h="",g="";return l==="bottom"?(h=s?f:`${u}px`,g=`${-o}px`):l==="top"?(h=s?f:`${u}px`,g=`${n.floating.height+o}px`):l==="right"?(h=`${-o}px`,g=s?f:`${p}px`):l==="left"&&(h=`${n.floating.width+o}px`,g=s?f:`${p}px`),{data:{x:h,y:g}}}}}function Lc(e){const[t,r="center"]=e.split("-");return[t,r]}function mP(e){return Lc(e)[0]}function vP(e){return Lc(e)[1]}function ag(e,t){ne(t,!0);let r=_(t,"children",7),n=_(t,"tooltip",7,!1);dP.create(n());var i={get children(){return r()},set children(o){r(o),b()},get tooltip(){return n()},set tooltip(o=!1){n(o),b()}},s=re(),a=U(s);return Se(a,()=>r()??qe),x(e,s),ie(i)}se(ag,{children:{},tooltip:{}},[],[],{mode:"open"});function og(e,t){ne(t,!0);let r=_(t,"id",7),n=_(t,"children",7),i=_(t,"virtualEl",7),s=_(t,"ref",7),a=_(t,"tooltip",7,!1);hP.create({id:z(()=>r()),virtualEl:z(()=>i()),ref:s()},a());var o={get id(){return r()},set id(f){r(f),b()},get children(){return n()},set children(f){n(f),b()},get virtualEl(){return i()},set virtualEl(f){i(f),b()},get ref(){return s()},set ref(f){s(f),b()},get tooltip(){return a()},set tooltip(f=!1){a(f),b()}},l=re(),c=U(l);return Se(c,()=>n()??qe),x(e,l),ie(o)}se(og,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function lg(e,t){ne(t,!0);let r=_(t,"content",7),n=_(t,"side",7,"bottom"),i=_(t,"sideOffset",7,0),s=_(t,"align",7,"center"),a=_(t,"alignOffset",7,0),o=_(t,"id",7),l=_(t,"arrowPadding",7,0),c=_(t,"avoidCollisions",7,!0),f=_(t,"collisionBoundary",23,()=>[]),u=_(t,"collisionPadding",7,0),p=_(t,"hideWhenDetached",7,!1),h=_(t,"onPlaced",7,()=>{}),g=_(t,"sticky",7,"partial"),v=_(t,"updatePositionStrategy",7,"optimized"),m=_(t,"strategy",7,"fixed"),y=_(t,"dir",7,"ltr"),S=_(t,"style",23,()=>({})),k=_(t,"wrapperId",23,Rn),E=_(t,"customAnchor",7,null),T=_(t,"enabled",7),O=_(t,"tooltip",7,!1);const F=fP.create({side:z(()=>n()),sideOffset:z(()=>i()),align:z(()=>s()),alignOffset:z(()=>a()),id:z(()=>o()),arrowPadding:z(()=>l()),avoidCollisions:z(()=>c()),collisionBoundary:z(()=>f()),collisionPadding:z(()=>u()),hideWhenDetached:z(()=>p()),onPlaced:z(()=>h()),sticky:z(()=>g()),updatePositionStrategy:z(()=>v()),strategy:z(()=>m()),dir:z(()=>y()),style:z(()=>S()),enabled:z(()=>T()),wrapperId:z(()=>k()),customAnchor:z(()=>E())},O()),R=D(()=>Ke(F.wrapperProps,{style:{pointerEvents:"auto"}}));var Y={get content(){return r()},set content(q){r(q),b()},get side(){return n()},set side(q="bottom"){n(q),b()},get sideOffset(){return i()},set sideOffset(q=0){i(q),b()},get align(){return s()},set align(q="center"){s(q),b()},get alignOffset(){return a()},set alignOffset(q=0){a(q),b()},get id(){return o()},set id(q){o(q),b()},get arrowPadding(){return l()},set arrowPadding(q=0){l(q),b()},get avoidCollisions(){return c()},set avoidCollisions(q=!0){c(q),b()},get collisionBoundary(){return f()},set collisionBoundary(q=[]){f(q),b()},get collisionPadding(){return u()},set collisionPadding(q=0){u(q),b()},get hideWhenDetached(){return p()},set hideWhenDetached(q=!1){p(q),b()},get onPlaced(){return h()},set onPlaced(q=()=>{}){h(q),b()},get sticky(){return g()},set sticky(q="partial"){g(q),b()},get updatePositionStrategy(){return v()},set updatePositionStrategy(q="optimized"){v(q),b()},get strategy(){return m()},set strategy(q="fixed"){m(q),b()},get dir(){return y()},set dir(q="ltr"){y(q),b()},get style(){return S()},set style(q={}){S(q),b()},get wrapperId(){return k()},set wrapperId(q=Rn()){k(q),b()},get customAnchor(){return E()},set customAnchor(q=null){E(q),b()},get enabled(){return T()},set enabled(q){T(q),b()},get tooltip(){return O()},set tooltip(q=!1){O(q),b()}},N=re(),X=U(N);return Se(X,()=>r()??qe,()=>({props:F.props,wrapperProps:d(R)})),x(e,N),ie(Y)}se(lg,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function ug(e,t){ne(t,!0);let r=_(t,"content",7),n=_(t,"onPlaced",7);En(()=>{n()?.()});var i={get content(){return r()},set content(o){r(o),b()},get onPlaced(){return n()},set onPlaced(o){n(o),b()}},s=re(),a=U(s);return Se(a,()=>r()??qe,()=>({props:{},wrapperProps:{}})),x(e,s),ie(i)}se(ug,{content:{},onPlaced:{}},[],[],{mode:"open"});var gP=new Set(["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);function cg(e,t){ne(t,!0);let r=_(t,"content",7),n=_(t,"isStatic",7,!1),i=_(t,"onPlaced",7),s=He(t,gP);var a={get content(){return r()},set content(u){r(u),b()},get isStatic(){return n()},set isStatic(u=!1){n(u),b()},get onPlaced(){return i()},set onPlaced(u){i(u),b()}},o=re(),l=U(o),c=u=>{ug(u,{get content(){return r()},get onPlaced(){return i()}})},f=u=>{lg(u,An({get content(){return r()},get onPlaced(){return i()}},()=>s))};return ue(l,u=>{n()?u(c):u(f,-1)}),x(e,o),ie(a)}se(cg,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var yP=new Set(["$$slots","$$events","$$legacy","$$host","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]),bP=B("<!> <!>",1);function zc(e,t){ne(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),s=_(t,"preventOverflowTextSelection",7),a=_(t,"id",7),o=_(t,"onPointerDown",7),l=_(t,"onPointerUp",7),c=_(t,"side",7),f=_(t,"sideOffset",7),u=_(t,"align",7),p=_(t,"alignOffset",7),h=_(t,"arrowPadding",7),g=_(t,"avoidCollisions",7),v=_(t,"collisionBoundary",7),m=_(t,"collisionPadding",7),y=_(t,"sticky",7),S=_(t,"hideWhenDetached",7),k=_(t,"updatePositionStrategy",7),E=_(t,"strategy",7),T=_(t,"dir",7),O=_(t,"preventScroll",7),F=_(t,"wrapperId",7),R=_(t,"style",7),Y=_(t,"onPlaced",7),N=_(t,"onInteractOutside",7),X=_(t,"onCloseAutoFocus",7),q=_(t,"onOpenAutoFocus",7),le=_(t,"onFocusOutside",7),he=_(t,"interactOutsideBehavior",7,"close"),j=_(t,"loop",7),oe=_(t,"trapFocus",7,!0),ee=_(t,"isValidEvent",7,()=>!1),fe=_(t,"customAnchor",7,null),ce=_(t,"isStatic",7,!1),de=_(t,"enabled",7),G=_(t,"ref",7),Q=_(t,"tooltip",7,!1),P=_(t,"contentPointerEvents",7,"auto"),te=He(t,yP);const L=D(()=>O()??!0),be=D(()=>E()??(d(L)?"fixed":"absolute"));var Z={get popper(){return r()},set popper(w){r(w),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(w){n(w),b()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(w){i(w),b()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(w){s(w),b()},get id(){return a()},set id(w){a(w),b()},get onPointerDown(){return o()},set onPointerDown(w){o(w),b()},get onPointerUp(){return l()},set onPointerUp(w){l(w),b()},get side(){return c()},set side(w){c(w),b()},get sideOffset(){return f()},set sideOffset(w){f(w),b()},get align(){return u()},set align(w){u(w),b()},get alignOffset(){return p()},set alignOffset(w){p(w),b()},get arrowPadding(){return h()},set arrowPadding(w){h(w),b()},get avoidCollisions(){return g()},set avoidCollisions(w){g(w),b()},get collisionBoundary(){return v()},set collisionBoundary(w){v(w),b()},get collisionPadding(){return m()},set collisionPadding(w){m(w),b()},get sticky(){return y()},set sticky(w){y(w),b()},get hideWhenDetached(){return S()},set hideWhenDetached(w){S(w),b()},get updatePositionStrategy(){return k()},set updatePositionStrategy(w){k(w),b()},get strategy(){return E()},set strategy(w){E(w),b()},get dir(){return T()},set dir(w){T(w),b()},get preventScroll(){return O()},set preventScroll(w){O(w),b()},get wrapperId(){return F()},set wrapperId(w){F(w),b()},get style(){return R()},set style(w){R(w),b()},get onPlaced(){return Y()},set onPlaced(w){Y(w),b()},get onInteractOutside(){return N()},set onInteractOutside(w){N(w),b()},get onCloseAutoFocus(){return X()},set onCloseAutoFocus(w){X(w),b()},get onOpenAutoFocus(){return q()},set onOpenAutoFocus(w){q(w),b()},get onFocusOutside(){return le()},set onFocusOutside(w){le(w),b()},get interactOutsideBehavior(){return he()},set interactOutsideBehavior(w="close"){he(w),b()},get loop(){return j()},set loop(w){j(w),b()},get trapFocus(){return oe()},set trapFocus(w=!0){oe(w),b()},get isValidEvent(){return ee()},set isValidEvent(w=()=>!1){ee(w),b()},get customAnchor(){return fe()},set customAnchor(w=null){fe(w),b()},get isStatic(){return ce()},set isStatic(w=!1){ce(w),b()},get enabled(){return de()},set enabled(w){de(w),b()},get ref(){return G()},set ref(w){G(w),b()},get tooltip(){return Q()},set tooltip(w=!1){Q(w),b()},get contentPointerEvents(){return P()},set contentPointerEvents(w="auto"){P(w),b()}};return cg(e,{get isStatic(){return ce()},get id(){return a()},get side(){return c()},get sideOffset(){return f()},get align(){return u()},get alignOffset(){return p()},get arrowPadding(){return h()},get avoidCollisions(){return g()},get collisionBoundary(){return v()},get collisionPadding(){return m()},get sticky(){return y()},get hideWhenDetached(){return S()},get updatePositionStrategy(){return k()},get strategy(){return d(be)},get dir(){return T()},get wrapperId(){return F()},get style(){return R()},get onPlaced(){return Y()},get customAnchor(){return fe()},get enabled(){return de()},get tooltip(){return Q()},content:(_e,we)=>{let De=()=>we?.().props,Le=()=>we?.().wrapperProps;var je=bP(),bt=U(je),st=Rt=>{ac(Rt,{get preventScroll(){return d(L)}})},Nt=Rt=>{ac(Rt,{get preventScroll(){return d(L)}})};ue(bt,Rt=>{t.forceMount&&de()?Rt(st):t.forceMount||Rt(Nt,1)});var _t=V(bt,2);lv(_t,{get onOpenAutoFocus(){return q()},get onCloseAutoFocus(){return X()},get loop(){return j()},get enabled(){return de()},get trapFocus(){return oe()},get forceMount(){return t.forceMount},get ref(){return G()},focusScope:(nr,Ht)=>{let mr=()=>Ht?.().props;ov(nr,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return de()},get ref(){return G()},children:(Ir,Pr)=>{av(Ir,{get id(){return a()},get onInteractOutside(){return N()},get onFocusOutside(){return le()},get interactOutsideBehavior(){return he()},get isValidEvent(){return ee()},get enabled(){return de()},get ref(){return G()},children:(Mr,vr)=>{let Xr=()=>vr?.().props;dv(Mr,{get id(){return a()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return o()},get onPointerUp(){return l()},get enabled(){return de()},get ref(){return G()},children:(en,Tt)=>{var Un=re(),is=U(Un);{let ss=D(()=>({props:Ke(te,De(),Xr(),mr(),{style:{pointerEvents:P()}}),wrapperProps:Le()}));Se(is,()=>r()??qe,()=>d(ss))}x(en,Un)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),x(_e,je)},$$slots:{content:!0}}),ie(Z)}se(zc,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{},ref:{},tooltip:{},contentPointerEvents:{}},[],[],{mode:"open"});var _P=new Set(["$$slots","$$events","$$legacy","$$host","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);function dg(e,t){ne(t,!0);let r=_(t,"popper",7),n=_(t,"open",7),i=_(t,"onEscapeKeydown",7),s=_(t,"escapeKeydownBehavior",7),a=_(t,"preventOverflowTextSelection",7),o=_(t,"id",7),l=_(t,"onPointerDown",7),c=_(t,"onPointerUp",7),f=_(t,"side",7),u=_(t,"sideOffset",7),p=_(t,"align",7),h=_(t,"alignOffset",7),g=_(t,"arrowPadding",7),v=_(t,"avoidCollisions",7),m=_(t,"collisionBoundary",7),y=_(t,"collisionPadding",7),S=_(t,"sticky",7),k=_(t,"hideWhenDetached",7),E=_(t,"updatePositionStrategy",7),T=_(t,"strategy",7),O=_(t,"dir",7),F=_(t,"preventScroll",7),R=_(t,"wrapperId",7),Y=_(t,"style",7),N=_(t,"onPlaced",7),X=_(t,"onInteractOutside",7),q=_(t,"onCloseAutoFocus",7),le=_(t,"onOpenAutoFocus",7),he=_(t,"onFocusOutside",7),j=_(t,"interactOutsideBehavior",7,"close"),oe=_(t,"loop",7),ee=_(t,"trapFocus",7,!0),fe=_(t,"isValidEvent",7,()=>!1),ce=_(t,"customAnchor",7,null),de=_(t,"isStatic",7,!1),G=_(t,"ref",7),Q=_(t,"shouldRender",7),P=He(t,_P);var te={get popper(){return r()},set popper(w){r(w),b()},get open(){return n()},set open(w){n(w),b()},get onEscapeKeydown(){return i()},set onEscapeKeydown(w){i(w),b()},get escapeKeydownBehavior(){return s()},set escapeKeydownBehavior(w){s(w),b()},get preventOverflowTextSelection(){return a()},set preventOverflowTextSelection(w){a(w),b()},get id(){return o()},set id(w){o(w),b()},get onPointerDown(){return l()},set onPointerDown(w){l(w),b()},get onPointerUp(){return c()},set onPointerUp(w){c(w),b()},get side(){return f()},set side(w){f(w),b()},get sideOffset(){return u()},set sideOffset(w){u(w),b()},get align(){return p()},set align(w){p(w),b()},get alignOffset(){return h()},set alignOffset(w){h(w),b()},get arrowPadding(){return g()},set arrowPadding(w){g(w),b()},get avoidCollisions(){return v()},set avoidCollisions(w){v(w),b()},get collisionBoundary(){return m()},set collisionBoundary(w){m(w),b()},get collisionPadding(){return y()},set collisionPadding(w){y(w),b()},get sticky(){return S()},set sticky(w){S(w),b()},get hideWhenDetached(){return k()},set hideWhenDetached(w){k(w),b()},get updatePositionStrategy(){return E()},set updatePositionStrategy(w){E(w),b()},get strategy(){return T()},set strategy(w){T(w),b()},get dir(){return O()},set dir(w){O(w),b()},get preventScroll(){return F()},set preventScroll(w){F(w),b()},get wrapperId(){return R()},set wrapperId(w){R(w),b()},get style(){return Y()},set style(w){Y(w),b()},get onPlaced(){return N()},set onPlaced(w){N(w),b()},get onInteractOutside(){return X()},set onInteractOutside(w){X(w),b()},get onCloseAutoFocus(){return q()},set onCloseAutoFocus(w){q(w),b()},get onOpenAutoFocus(){return le()},set onOpenAutoFocus(w){le(w),b()},get onFocusOutside(){return he()},set onFocusOutside(w){he(w),b()},get interactOutsideBehavior(){return j()},set interactOutsideBehavior(w="close"){j(w),b()},get loop(){return oe()},set loop(w){oe(w),b()},get trapFocus(){return ee()},set trapFocus(w=!0){ee(w),b()},get isValidEvent(){return fe()},set isValidEvent(w=()=>!1){fe(w),b()},get customAnchor(){return ce()},set customAnchor(w=null){ce(w),b()},get isStatic(){return de()},set isStatic(w=!1){de(w),b()},get ref(){return G()},set ref(w){G(w),b()},get shouldRender(){return Q()},set shouldRender(w){Q(w),b()}},L=re(),be=U(L),Z=w=>{zc(w,An({get popper(){return r()},get onEscapeKeydown(){return i()},get escapeKeydownBehavior(){return s()},get preventOverflowTextSelection(){return a()},get id(){return o()},get onPointerDown(){return l()},get onPointerUp(){return c()},get side(){return f()},get sideOffset(){return u()},get align(){return p()},get alignOffset(){return h()},get arrowPadding(){return g()},get avoidCollisions(){return v()},get collisionBoundary(){return m()},get collisionPadding(){return y()},get sticky(){return S()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return E()},get strategy(){return T()},get dir(){return O()},get preventScroll(){return F()},get wrapperId(){return R()},get style(){return Y()},get onPlaced(){return N()},get customAnchor(){return ce()},get isStatic(){return de()},get enabled(){return n()},get onInteractOutside(){return X()},get onCloseAutoFocus(){return q()},get onOpenAutoFocus(){return le()},get interactOutsideBehavior(){return j()},get loop(){return oe()},get trapFocus(){return ee()},get isValidEvent(){return fe()},get onFocusOutside(){return he()},forceMount:!1,get ref(){return G()}},()=>P))};return ue(be,w=>{Q()&&w(Z)}),x(e,L),ie(te)}se(dg,{popper:{},open:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},ref:{},shouldRender:{}},[],[],{mode:"open"});var wP=new Set(["$$slots","$$events","$$legacy","$$host","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);function fg(e,t){ne(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),s=_(t,"preventOverflowTextSelection",7),a=_(t,"id",7),o=_(t,"onPointerDown",7),l=_(t,"onPointerUp",7),c=_(t,"side",7),f=_(t,"sideOffset",7),u=_(t,"align",7),p=_(t,"alignOffset",7),h=_(t,"arrowPadding",7),g=_(t,"avoidCollisions",7),v=_(t,"collisionBoundary",7),m=_(t,"collisionPadding",7),y=_(t,"sticky",7),S=_(t,"hideWhenDetached",7),k=_(t,"updatePositionStrategy",7),E=_(t,"strategy",7),T=_(t,"dir",7),O=_(t,"preventScroll",7),F=_(t,"wrapperId",7),R=_(t,"style",7),Y=_(t,"onPlaced",7),N=_(t,"onInteractOutside",7),X=_(t,"onCloseAutoFocus",7),q=_(t,"onOpenAutoFocus",7),le=_(t,"onFocusOutside",7),he=_(t,"interactOutsideBehavior",7,"close"),j=_(t,"loop",7),oe=_(t,"trapFocus",7,!0),ee=_(t,"isValidEvent",7,()=>!1),fe=_(t,"customAnchor",7,null),ce=_(t,"isStatic",7,!1),de=_(t,"enabled",7),G=He(t,wP);var Q={get popper(){return r()},set popper(P){r(P),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(P){n(P),b()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(P){i(P),b()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(P){s(P),b()},get id(){return a()},set id(P){a(P),b()},get onPointerDown(){return o()},set onPointerDown(P){o(P),b()},get onPointerUp(){return l()},set onPointerUp(P){l(P),b()},get side(){return c()},set side(P){c(P),b()},get sideOffset(){return f()},set sideOffset(P){f(P),b()},get align(){return u()},set align(P){u(P),b()},get alignOffset(){return p()},set alignOffset(P){p(P),b()},get arrowPadding(){return h()},set arrowPadding(P){h(P),b()},get avoidCollisions(){return g()},set avoidCollisions(P){g(P),b()},get collisionBoundary(){return v()},set collisionBoundary(P){v(P),b()},get collisionPadding(){return m()},set collisionPadding(P){m(P),b()},get sticky(){return y()},set sticky(P){y(P),b()},get hideWhenDetached(){return S()},set hideWhenDetached(P){S(P),b()},get updatePositionStrategy(){return k()},set updatePositionStrategy(P){k(P),b()},get strategy(){return E()},set strategy(P){E(P),b()},get dir(){return T()},set dir(P){T(P),b()},get preventScroll(){return O()},set preventScroll(P){O(P),b()},get wrapperId(){return F()},set wrapperId(P){F(P),b()},get style(){return R()},set style(P){R(P),b()},get onPlaced(){return Y()},set onPlaced(P){Y(P),b()},get onInteractOutside(){return N()},set onInteractOutside(P){N(P),b()},get onCloseAutoFocus(){return X()},set onCloseAutoFocus(P){X(P),b()},get onOpenAutoFocus(){return q()},set onOpenAutoFocus(P){q(P),b()},get onFocusOutside(){return le()},set onFocusOutside(P){le(P),b()},get interactOutsideBehavior(){return he()},set interactOutsideBehavior(P="close"){he(P),b()},get loop(){return j()},set loop(P){j(P),b()},get trapFocus(){return oe()},set trapFocus(P=!0){oe(P),b()},get isValidEvent(){return ee()},set isValidEvent(P=()=>!1){ee(P),b()},get customAnchor(){return fe()},set customAnchor(P=null){fe(P),b()},get isStatic(){return ce()},set isStatic(P=!1){ce(P),b()},get enabled(){return de()},set enabled(P){de(P),b()}};return zc(e,An({get popper(){return r()},get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get preventOverflowTextSelection(){return s()},get id(){return a()},get onPointerDown(){return o()},get onPointerUp(){return l()},get side(){return c()},get sideOffset(){return f()},get align(){return u()},get alignOffset(){return p()},get arrowPadding(){return h()},get avoidCollisions(){return g()},get collisionBoundary(){return v()},get collisionPadding(){return m()},get sticky(){return y()},get hideWhenDetached(){return S()},get updatePositionStrategy(){return k()},get strategy(){return E()},get dir(){return T()},get preventScroll(){return O()},get wrapperId(){return F()},get style(){return R()},get onPlaced(){return Y()},get customAnchor(){return fe()},get isStatic(){return ce()},get enabled(){return de()},get onInteractOutside(){return N()},get onCloseAutoFocus(){return X()},get onOpenAutoFocus(){return q()},get interactOutsideBehavior(){return he()},get loop(){return j()},get trapFocus(){return oe()},get isValidEvent(){return ee()},get onFocusOutside(){return le()}},()=>G,{forceMount:!0})),ie(Q)}se(fg,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{}},[],[],{mode:"open"});var Wo=wo({component:"date-field",parts:["input","label","segment"]}),Ki={day:{min:1,max:e=>{const t=e.segmentValues.month,r=e.value.current??e.placeholder.current;return ia(t?r.set({month:Number.parseInt(t)}):r)},cycle:1,padZero:!0},month:{min:1,max:12,cycle:1,padZero:!0,getAnnouncement:(e,t)=>t.placeholder.current?`${e} - ${t.formatter.fullMonth(Zt(t.placeholder.current.set({month:e})))}`:""},year:{min:1,max:9999,cycle:1,padZero:!1},hour:{min:e=>e.hourCycle.current===12?1:0,max:e=>e.hourCycle.current===24?23:e.hourCycle.current===12||Ev(e.locale.current)===12?12:23,cycle:1,canBeZero:!0,padZero:!0},minute:{min:0,max:59,cycle:1,canBeZero:!0,padZero:!0},second:{min:0,max:59,cycle:1,canBeZero:!0,padZero:!0}},qn=new Ft("DateField.Root"),kP=class Fy{static create(t,r){return qn.set(new Fy(t,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Rn();formatter;initialSegments;#e=ae();get segmentValues(){return d(this.#e)}set segmentValues(t){$(this.#e,t,!0)}announcer;#t=D(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return d(this.#t)}set readonlySegmentsSet(t){$(this.#t,t)}segmentStates=wv();#r=ae(null);#n=ae(null);#i=ae(null);get descriptionNode(){return d(this.#i)}set descriptionNode(t){$(this.#i,t,!0)}#s=ae(null);get validationNode(){return d(this.#s)}set validationNode(t){$(this.#s,t,!0)}states=wv();#o=ae(null);get dayPeriodNode(){return d(this.#o)}set dayPeriodNode(t){$(this.#o,t,!0)}rangeRoot=void 0;#a=ae("");get name(){return d(this.#a)}set name(t){$(this.#a,t,!0)}domContext=new ji(()=>null);constructor(t,r){this.rangeRoot=r,this.value=t.value,this.placeholder=r?r.opts.placeholder:t.placeholder,this.validate=r?Er(void 0):t.validate,this.minValue=r?r.opts.minValue:t.minValue,this.maxValue=r?r.opts.maxValue:t.maxValue,this.disabled=r?r.opts.disabled:t.disabled,this.readonly=r?r.opts.readonly:t.readonly,this.granularity=r?r.opts.granularity:t.granularity,this.readonlySegments=r?r.opts.readonlySegments:t.readonlySegments,this.hourCycle=r?r.opts.hourCycle:t.hourCycle,this.locale=r?r.opts.locale:t.locale,this.hideTimeZone=r?r.opts.hideTimeZone:t.hideTimeZone,this.required=r?r.opts.required:t.required,this.onInvalid=r?r.opts.onInvalid:t.onInvalid,this.errorMessageId=r?r.opts.errorMessageId:t.errorMessageId,this.isInvalidProp=t.isInvalidProp,this.formatter=Av({initialLocale:this.locale.current,monthFormat:z(()=>"long"),yearFormat:z(()=>"numeric")}),this.initialSegments=cc(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=Po(null),this.getFieldNode=this.getFieldNode.bind(this),this.updateSegment=this.updateSegment.bind(this),this.handleSegmentClick=this.handleSegmentClick.bind(this),this.getBaseSegmentAttrs=this.getBaseSegmentAttrs.bind(this),ve(()=>{Re(()=>{this.initialSegments=cc(this.inferredGranularity)})}),En(()=>{this.announcer=Po(this.domContext.getDocument())}),ii(()=>{r||lD(this.descriptionId,this.domContext.getDocument())}),ve(()=>{r||this.formatter.getLocale()!==this.locale.current&&this.formatter.setLocale(this.locale.current)}),ve(()=>{if(r)return;this.value.current&&oD({id:Re(()=>this.descriptionId),formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()});const n=Re(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&Re(()=>{this.value.current&&(this.placeholder.current=this.value.current)})}),this.value.current&&this.syncSegmentValues(this.value.current),ve(()=>{this.locale.current,this.value.current&&this.syncSegmentValues(this.value.current),this.#l()}),ve(()=>{this.value.current===void 0&&(this.segmentValues=cc(this.inferredGranularity))}),nt(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(t){this.name=t}setFieldNode(t){$(this.#r,t,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:d(this.#r)}setLabelNode(t){$(this.#n,t,!0)}getLabelNode(){return this.rangeRoot?this.rangeRoot.labelNode:d(this.#n)}#l(){this.states.day.updating=null,this.states.month.updating=null,this.states.year.updating=null,this.states.hour.updating=null,this.states.minute.updating=null,this.states.dayPeriod.updating=null}setValue(t){this.value.current=t}syncSegmentValues(t){const r=$o.map(n=>{const i=t[n];if(n==="month"){if(this.states.month.updating)return[n,this.states.month.updating];if(i<10)return[n,`0${i}`]}if(n==="day"){if(this.states.day.updating)return[n,this.states.day.updating];if(i<10)return[n,`0${i}`]}if(n==="year"){if(this.states.year.updating)return[n,this.states.year.updating];const s=4-`${i}`.length;if(s>0)return[n,`${"0".repeat(s)}${i}`]}return[n,`${i}`]});if("hour"in t){const n=Fo.map(s=>{if(s==="dayPeriod")return this.states.dayPeriod.updating?[s,this.states.dayPeriod.updating]:[s,this.formatter.dayPeriod(Zt(t))];if(s==="hour"){if(this.states.hour.updating)return[s,this.states.hour.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`];if(t[s]===0&&this.dayPeriodNode)return[s,"12"]}else if(s==="minute"){if(this.states.minute.updating)return[s,this.states.minute.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`]}else if(s==="second"){if(this.states.second.updating)return[s,this.states.second.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`]}return[s,`${t[s]}`]}),i=[...r,...n];this.segmentValues=Object.fromEntries(i),this.#l();return}this.segmentValues=Object.fromEntries(r)}#u=D(()=>{const t=this.value.current;if(!t)return!1;const r=this.validate.current?.(t);if(r)return{reason:"custom",message:r};const n=this.minValue.current;if(n&&oi(t,n))return{reason:"min"};const i=this.maxValue.current;return i&&oi(i,t)?{reason:"max"}:!1});get validationStatus(){return d(this.#u)}set validationStatus(t){$(this.#u,t)}#c=D(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return d(this.#c)}set isInvalid(t){$(this.#c,t)}#d=D(()=>{const t=this.granularity.current;return t||sD(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return d(this.#d)}set inferredGranularity(t){$(this.#d,t)}#h=D(()=>this.value.current!==void 0?this.value.current:this.placeholder.current);get dateRef(){return d(this.#h)}set dateRef(t){$(this.#h,t)}#p=D(()=>XO({segmentValues:this.segmentValues,formatter:this.formatter,locale:this.locale.current,granularity:this.inferredGranularity,dateRef:this.dateRef,hideTimeZone:this.hideTimeZone.current,hourCycle:this.hourCycle.current}));get allSegmentContent(){return d(this.#p)}set allSegmentContent(t){$(this.#p,t)}#f=D(()=>this.allSegmentContent.arr);get segmentContents(){return d(this.#f)}set segmentContents(t){$(this.#f,t)}sharedSegmentAttrs={role:"spinbutton",contenteditable:"true",tabindex:0,spellcheck:!1,inputmode:"numeric",autocorrect:"off",enterkeyhint:"next",style:{caretColor:"transparent"},onbeforeinput:t=>{(!t.data||t.data.length<=1)&&t.preventDefault()}};#m(t){return`${t} ${this.getLabelNode()?.id??""}`}updateSegment(t,r){const n=this.disabled.current,i=this.readonly.current,s=this.readonlySegmentsSet;if(n||i||s.has(t))return;const a=this.segmentValues;let o=a;const l=this.placeholder.current;if(iD(a)){const c=a[t],f=r;if(t==="month"){const u=f(c);if(this.states.month.updating=u,u!==null&&a.day!==null){const p=ia(Zt(l.set({month:Number.parseInt(u)})));Number.parseInt(a.day)>p&&(a.day=`${p}`)}o={...a,[t]:u}}else if(t==="dayPeriod"){const u=f(c);this.states.dayPeriod.updating=u;const p=this.value.current;if(p&&"hour"in p){const h=p.hour;u==="AM"?h>=12&&(a.hour=`${h-12}`):u==="PM"&&h<12&&(a.hour=`${h+12}`)}o={...a,[t]:u}}else if(t==="hour"){const u=f(c);if(this.states.hour.updating=u,u!==null&&a.dayPeriod!==null){const p=this.formatter.dayPeriod(Zt(l.set({hour:Number.parseInt(u)})),this.hourCycle.current);(p==="AM"||p==="PM")&&(a.dayPeriod=p)}o={...a,[t]:u}}else if(t==="minute"){const u=f(c);this.states.minute.updating=u,o={...a,[t]:u}}else if(t==="second"){const u=f(c);this.states.second.updating=u,o={...a,[t]:u}}else if(t==="year"){const u=f(c);this.states.year.updating=u,o={...a,[t]:u}}else if(t==="day"){const u=f(c);this.states.day.updating=u,o={...a,[t]:u}}else{const u=f(c);o={...a,[t]:u}}}else if(No(t)){const c=a[t],f=r,u=f(c);if(t==="month"&&u!==null&&a.day!==null){this.states.month.updating=u;const p=ia(Zt(l.set({month:Number.parseInt(u)})));Number.parseInt(a.day)>p&&(a.day=`${p}`),o={...a,[t]:u}}else if(t==="year"){const p=f(c);this.states.year.updating=p,o={...a,[t]:p}}else if(t==="day"){const p=f(c);this.states.day.updating=p,o={...a,[t]:p}}else o={...a,[t]:u}}this.segmentValues=o,nD(o,d(this.#r))?this.setValue(rD({segmentObj:o,fieldNode:d(this.#r),dateRef:this.placeholder.current})):(this.setValue(void 0),this.segmentValues=o)}handleSegmentClick(t){this.disabled.current&&t.preventDefault()}getBaseSegmentAttrs(t,r){const n=this.readonlySegmentsSet.has(t),i={"aria-invalid":Xu(this.isInvalid),"aria-disabled":xr(this.disabled.current),"aria-readonly":xr(this.readonly.current||n),"data-invalid":Ve(this.isInvalid),"data-disabled":Ve(this.disabled.current),"data-readonly":Ve(this.readonly.current||n),"data-segment":`${t}`,[Wo.segment]:""};if(t==="literal")return i;const s=this.descriptionNode?.id,a=aD(r,d(this.#r))&&s,o=this.errorMessageId?.current,l=a?`${s} ${this.isInvalid&&o?o:""}`:void 0,c=!(this.readonly.current||n||this.disabled.current);return{...i,"aria-labelledby":this.#m(r),contenteditable:c?"true":void 0,"aria-describedby":l,tabindex:this.disabled.current?void 0:0}}},SP=class Ny{static create(t){return new Ny(t,qn.get())}opts;root;domContext;attachment;constructor(t,r){this.opts=t,this.root=r,this.domContext=new ji(t.ref),this.root.domContext=this.domContext,this.attachment=et(t.ref,n=>this.root.setFieldNode(n)),nt(()=>this.opts.name.current,n=>{this.root.setName(n)})}#e=D(()=>{if(ln&&this.domContext.getElementById(this.root.descriptionId))return this.root.descriptionId});#t=D(()=>({id:this.opts.id.current,role:"group","aria-labelledby":this.root.getLabelNode()?.id??void 0,"aria-describedby":d(this.#e),"aria-disabled":xr(this.root.disabled.current),"data-invalid":this.root.isInvalid?"":void 0,"data-disabled":Ve(this.root.disabled.current),[Wo.input]:"",...this.attachment}));get props(){return d(this.#t)}set props(t){$(this.#t,t)}},EP=class Ry{static create(){return new Ry(qn.get())}root;#e=D(()=>this.root.name!=="");get shouldRender(){return d(this.#e)}set shouldRender(t){$(this.#e,t)}#t=D(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return d(this.#t)}set isoValue(t){$(this.#t,t)}constructor(t){this.root=t}#r=D(()=>({name:this.root.name,value:this.isoValue,required:this.root.required.current}));get props(){return d(this.#r)}set props(t){$(this.#r,t)}},xP=class Ly{static create(t){return new Ly(t,qn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(t.ref,n=>this.root.setLabelNode(n))}onclick(t){if(this.root.disabled.current)return;const r=dD(this.root.getFieldNode());r&&r.focus()}#e=D(()=>({id:this.opts.id.current,"data-invalid":Ve(this.root.isInvalid),"data-disabled":Ve(this.root.disabled.current),[Wo.label]:"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},Yi=class{opts;root;announcer;part;config;attachment;constructor(e,t,r,n){this.opts=e,this.root=t,this.part=r,this.config=n,this.announcer=t.announcer,this.onkeydown=this.onkeydown.bind(this),this.onfocusout=this.onfocusout.bind(this),this.attachment=et(e.ref)}#e(){return typeof this.config.max=="function"?this.config.max(this.root):this.config.max}#t(){return typeof this.config.min=="function"?this.config.min(this.root):this.config.min}#r(e){return this.config.getAnnouncement?this.config.getAnnouncement(e,this.root):e}#n(e,t=!0){const r=String(e);return t&&this.config.padZero&&r.length===1?`0${e}`:r}onkeydown(e){const t=this.root.value.current??this.root.placeholder.current;if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&!((this.part==="hour"||this.part==="minute"||this.part==="second")&&!(this.part in t))&&(e.key!=="Tab"&&e.preventDefault(),!!dc(e.key))){if(qc(e.key)){this.#i(t);return}if(Uc(e.key)){this.#s(t);return}if(ko(e.key)){this.#o(e);return}if(Bc(e.key)){this.#a(e);return}oa(e.key)&&aa(e,this.root.getFieldNode())}}#i(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#s(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,-this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#o(e){const t=Number.parseInt(e.key);let r=!1;const n=this.#e(),i=Math.floor(n/10),s=t===0,a=this.part;this.root.updateSegment(this.part,o=>{if(a in this.root.states&&this.root.states[a].hasLeftFocus&&(o=null,this.root.states[a].hasLeftFocus=!1),o===null)return s?(a in this.root.states&&(this.root.states[a].lastKeyZero=!0),this.announcer.announce("0"),"0"):(a in this.root.states&&(this.root.states[a].lastKeyZero||t>i)&&(r=!0),a in this.root.states&&(this.root.states[a].lastKeyZero=!1),r&&String(t).length===1?(this.announcer.announce(t),`0${t}`):`${t}`);if(a in this.root.states&&this.root.states[a].lastKeyZero)return t!==0?(r=!0,this.root.states[a].lastKeyZero=!1,`0${t}`):this.part==="hour"&&t===0&&this.root.hourCycle.current===24?(r=!0,this.root.states[a].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&t===0?(r=!0,this.root.states[a].lastKeyZero=!1,"00"):o;const l=Number.parseInt(o+t.toString());return l>n?(r=!0,`0${t}`):(r=!0,`${l}`)}),r&&xv(e,this.root.getFieldNode())}#a(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1);let r=!1;this.root.updateSegment(this.part,n=>{if(n===null)return r=!0,this.announcer.announce(null),null;if(n.length===2&&n.startsWith("0"))return this.announcer.announce(null),null;const i=n.toString();if(i.length===1)return this.announcer.announce(null),null;const s=Number.parseInt(i.slice(0,-1));return this.announcer.announce(this.#r(s)),`${s}`}),r&&Tv(e,this.root.getFieldNode())}onfocusout(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!0),this.config.padZero&&this.root.updateSegment(this.part,r=>r&&r.length===1?`0${r}`:r)}getSegmentProps(){const e=this.root.segmentValues,t=this.root.placeholder.current,r=e[this.part]===null;let n=t;e[this.part]&&(n=t.set({[this.part]:Number.parseInt(e[this.part])}));const i=n[this.part],s=this.#t(),a=this.#e();let o=r?"Empty":`${i}`;return this.part==="hour"&&"dayPeriod"in e&&e.dayPeriod&&(o=r?"Empty":`${i} ${e.dayPeriod}`),{"aria-label":`${this.part}, `,"aria-valuemin":s,"aria-valuemax":a,"aria-valuenow":i,"aria-valuetext":o}}#l=D(()=>({...this.root.sharedSegmentAttrs,id:this.opts.id.current,...this.getSegmentProps(),onkeydown:this.onkeydown,onfocusout:this.onfocusout,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs(this.part,this.opts.id.current),...this.attachment}));get props(){return d(this.#l)}set props(e){$(this.#l,e)}},TP=class extends Yi{#e=[];#t=0;constructor(e,t){super(e,t,"year",Ki.year)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!=="Tab"&&e.preventDefault(),!!dc(e.key))){if(qc(e.key)){this.#r(),super.onkeydown(e);return}if(Uc(e.key)){this.#r(),super.onkeydown(e);return}if(ko(e.key)){this.#i(e);return}if(Bc(e.key)){this.#s(e);return}oa(e.key)&&aa(e,this.root.getFieldNode())}}#r(){this.#t=0}#n(){this.#t++}#i(e){this.#e.push(e.key);let t=!1;const r=Number.parseInt(e.key);this.root.updateSegment("year",n=>{if(this.root.states.year.hasLeftFocus&&(n=null,this.root.states.year.hasLeftFocus=!1),n===null)return this.announcer.announce(r),`000${r}`;const i=n.toString()+r.toString(),s=Number.parseInt(i);if(String(s).length<4)return this.#t>0&&this.#e.length<=this.#t&&i.length<=4?(this.announcer.announce(s),i):(this.announcer.announce(s),hg(s));this.announcer.announce(s),t=!0;const a=`${s}`;return a.length>4?a.slice(0,4):a}),(this.#e.length===4||this.#e.length===this.#t)&&(t=!0),t&&xv(e,this.root.getFieldNode())}#s(e){this.#e=[],this.#n();let t=!1;this.root.updateSegment("year",r=>{if(this.root.states.year.hasLeftFocus=!1,r===null)return t=!0,this.announcer.announce(null),null;const n=r.toString();if(n.length===1)return this.announcer.announce(null),null;const i=n.slice(0,-1);return this.announcer.announce(i),`${i}`}),t&&Tv(e,this.root.getFieldNode())}onfocusout(e){this.root.states.year.hasLeftFocus=!0,this.#e=[],this.#r(),this.root.updateSegment("year",t=>t&&t.length!==4?hg(Number.parseInt(t)):t)}},AP=class extends Yi{constructor(e,t){super(e,t,"day",Ki.day)}},CP=class extends Yi{constructor(e,t){super(e,t,"month",Ki.month)}},OP=class extends Yi{constructor(e,t){super(e,t,"hour",Ki.hour)}onkeydown(e){if(ko(e.key)){const t=this.root.updateSegment.bind(this.root);this.root.updateSegment=(r,n)=>{const i=t(r,n);return r==="hour"&&"hour"in this.root.segmentValues&&this.root.segmentValues.hour==="0"&&this.root.dayPeriodNode&&this.root.hourCycle.current!==24&&(this.root.segmentValues.hour="12"),i}}super.onkeydown(e),this.root.updateSegment=this.root.updateSegment.bind(this.root)}},DP=class extends Yi{constructor(e,t){super(e,t,"minute",Ki.minute)}},IP=class extends Yi{constructor(e,t){super(e,t,"second",Ki.second)}},PP=class zy{static create(t){return new zy(t,qn.get())}opts;root;attachment;#e;constructor(t,r){this.opts=t,this.root=r,this.#e=this.root.announcer,this.onkeydown=this.onkeydown.bind(this),this.attachment=et(t.ref,n=>this.root.dayPeriodNode=n)}onkeydown(t){if(!(t.ctrlKey||t.metaKey||this.root.disabled.current)&&(t.key!=="Tab"&&t.preventDefault(),!!NP(t.key))){if(qc(t.key)||Uc(t.key)){this.root.updateSegment("dayPeriod",r=>{if(r==="AM")return this.#e.announce("PM"),"PM";const n="AM";return this.#e.announce(n),n});return}Bc(t.key)&&(this.root.states.dayPeriod.hasLeftFocus=!1,this.root.updateSegment("dayPeriod",()=>(this.#e.announce("AM"),"AM"))),t.key==="A"||t.key,this.root.updateSegment("dayPeriod",()=>{const r=t.key==="A"||t.key==="a"?"AM":"PM";return this.#e.announce(r),r}),oa(t.key)&&aa(t,this.root.getFieldNode())}}#t=D(()=>{const t=this.root.segmentValues;if(!("dayPeriod"in t))return;const r=0,n=12,i=t.dayPeriod==="AM"?0:12,s=t.dayPeriod??"AM";return{...this.root.sharedSegmentAttrs,id:this.opts.id.current,inputmode:"text","aria-label":"AM/PM","aria-valuemin":r,"aria-valuemax":n,"aria-valuenow":i,"aria-valuetext":s,onkeydown:this.onkeydown,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs("dayPeriod",this.opts.id.current),...this.attachment}});get props(){return d(this.#t)}set props(t){$(this.#t,t)}},MP=class qy{static create(t){return new qy(t,qn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(t.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Xu(!0),...this.root.getBaseSegmentAttrs("literal",this.opts.id.current),...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},$P=class Uy{static create(t){return new Uy(t,qn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=et(t.ref)}onkeydown(t){t.key!=="Tab"&&t.preventDefault(),!this.root.disabled.current&&oa(t.key)&&aa(t,this.root.getFieldNode())}#e=D(()=>({role:"textbox",id:this.opts.id.current,"aria-label":"timezone, ",style:{caretColor:"transparent"},onkeydown:this.onkeydown,...this.root.getBaseSegmentAttrs("timeZoneName",this.opts.id.current),"data-readonly":Ve(!0),...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},FP=class{static create(e,t){const r=qn.get();switch(e){case"day":return new AP(t,r);case"month":return new CP(t,r);case"year":return new TP(t,r);case"hour":return new OP(t,r);case"minute":return new DP(t,r);case"second":return new IP(t,r);case"dayPeriod":return new PP(t,r);case"literal":return new MP(t,r);case"timeZoneName":return new $P(t,r)}}};function NP(e){return dc(e)||e==="A"||e==="P"||e==="a"||e==="p"}function qc(e){return e===tc}function Uc(e){return e===ec}function Bc(e){return e===jC}function hg(e){const t=4-String(e).length;return`${"0".repeat(t)}${e}`}function pg(e,t){ne(t,!1);const r=EP.create();Xl();var n=re(),i=U(n),s=a=>{Nv(a,An(()=>r.props))};ue(i,a=>{r.shouldRender&&a(s)}),x(e,n),ie()}se(pg,{},[],[],{mode:"open"});var RP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]),LP=B("<div><!></div>"),zP=B("<!> <!>",1);function mg(e,t){const r=mt();ne(t,!0);let n=_(t,"id",23,()=>Pe(r)),i=_(t,"ref",15,null),s=_(t,"name",7,""),a=_(t,"children",7),o=_(t,"child",7),l=He(t,RP);const c=SP.create({id:z(()=>n()),ref:z(()=>i(),m=>i(m)),name:z(()=>s())}),f=D(()=>Ke(l,c.props));var u={get id(){return n()},set id(m=Pe(r)){n(m),b()},get ref(){return i()},set ref(m=null){i(m),b()},get name(){return s()},set name(m=""){s(m),b()},get children(){return a()},set children(m){a(m),b()},get child(){return o()},set child(m){o(m),b()}},p=zP(),h=U(p),g=m=>{var y=re(),S=U(y);Se(S,o,()=>({props:d(f),segments:c.root.segmentContents})),x(m,y)},v=m=>{var y=LP();Ue(y,()=>({...d(f)}));var S=M(y);Se(S,()=>a()??qe,()=>({segments:c.root.segmentContents})),I(y),x(m,y)};return ue(h,m=>{o()?m(g):m(v,-1)}),pg(V(h,2),{}),x(e,p),ie(u)}se(mg,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var qP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]),UP=B("<div><!></div>");function vg(e,t){const r=mt();ne(t,!0);let n=_(t,"id",23,()=>Pe(r)),i=_(t,"ref",15,null),s=_(t,"children",7),a=_(t,"child",7),o=He(t,qP);const l=xP.create({id:z(()=>n()),ref:z(()=>i(),v=>i(v))}),c=D(()=>Ke(o,l.props));var f={get id(){return n()},set id(v=Pe(r)){n(v),b()},get ref(){return i()},set ref(v=null){i(v),b()},get children(){return s()},set children(v){s(v),b()},get child(){return a()},set child(v){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,a,()=>({props:d(c)})),x(v,m)},g=v=>{var m=UP();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>s()??qe),I(m),x(v,m)};return ue(p,v=>{a()?v(h):v(g,-1)}),x(e,u),ie(f)}se(vg,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var BP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]),VP=B("<span><!></span>");function gg(e,t){const r=mt();ne(t,!0);let n=_(t,"id",23,()=>Pe(r)),i=_(t,"ref",15,null),s=_(t,"children",7),a=_(t,"child",7),o=_(t,"part",7),l=He(t,BP);const c=FP.create(o(),{id:z(()=>n()),ref:z(()=>i(),m=>i(m))}),f=D(()=>Ke(l,c.props));var u={get id(){return n()},set id(m=Pe(r)){n(m),b()},get ref(){return i()},set ref(m=null){i(m),b()},get children(){return s()},set children(m){s(m),b()},get child(){return a()},set child(m){a(m),b()},get part(){return o()},set part(m){o(m),b()}},p=re(),h=U(p),g=m=>{var y=re(),S=U(y);Se(S,a,()=>({props:d(f)})),x(m,y)},v=m=>{var y=VP();Ue(y,()=>({...d(f)}));var S=M(y);Se(S,()=>s()??qe),I(y),x(m,y)};return ue(h,m=>{a()?m(g):m(v,-1)}),x(e,p),ie(u)}se(gg,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});var yg=new Ft("DatePicker.Root"),jP=class By{static create(t){return yg.set(new By(t))}opts;constructor(t){this.opts=t}};function Vc(e,t){const[r,n]=e;let i=!1;const s=t.length;for(let a=0,o=s-1;a<s;o=a++){const[l,c]=t[a]??[0,0],[f,u]=t[o]??[0,0];c>=n!=u>=n&&r<=(f-l)*(n-c)/(u-c)+l&&(i=!i)}return i}function jc(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function bg(e,t){const r=e.left+e.width/2,n=e.top+e.height/2,i=t.left+t.width/2,s=t.top+t.height/2,a=i-r,o=s-n;return Math.abs(a)>Math.abs(o)?a>0?"right":"left":o>0?"bottom":"top"}var ZP=class{#e;#t;#r;#n=null;#i=null;#s=[];#o=null;#a=null;#l=null;#u(){this.#a!==null&&(cancelAnimationFrame(this.#a),this.#a=null)}#c(){this.#u(),this.#a=requestAnimationFrame(()=>{this.#a=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())})}#d(){this.#l!==null&&(clearTimeout(this.#l),this.#l=null)}#h(){this.#r!==null&&(this.#d(),this.#l=window.setTimeout(()=>{this.#l=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())},this.#r))}constructor(e){this.#e=e,this.#t=e.buffer??1;const t=e.transitIntentTimeout;this.#r=typeof t=="number"&&t>0?t:null,nt([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#o=null,this.#f();return}this.#o&&this.#o!==r&&this.#f(),this.#o=r;const s=_o(r),a=u=>{this.#p([u.clientX,u.clientY],r,n)},o=u=>{const p=u.relatedTarget;if(si(p)&&n.contains(p))return;const h=this.#e.ignoredTargets?.()??[];si(p)&&h.some(g=>g===p||g.contains(p))||(this.#s=si(p)&&h.length>0?h.filter(g=>p.contains(g)):[],this.#n=[u.clientX,u.clientY],this.#i="content",this.#c())},l=()=>{this.#f()},c=()=>{this.#f()},f=u=>{const p=u.relatedTarget;si(p)&&r.contains(p)||(this.#n=[u.clientX,u.clientY],this.#i="trigger",this.#c())};return[gt(s,"pointermove",a),gt(r,"pointerleave",o),gt(r,"pointerenter",l),gt(n,"pointerenter",c),gt(n,"pointerleave",f)].reduce((u,p)=>()=>{u(),p()},()=>{})})}#p(e,t,r){if(!this.#n||!this.#i)return;this.#u(),this.#h();const n=t.getBoundingClientRect(),i=r.getBoundingClientRect();if(this.#i==="content"&&jc(e,i)){this.#f();return}if(this.#i==="trigger"&&jc(e,n)){this.#f();return}if(this.#i==="content"&&this.#s.length>0)for(const l of this.#s){const c=l.getBoundingClientRect();if(jc(e,c))return;const f=bg(n,c),u=this.#m(n,c,f);if(u&&Vc(e,u))return}const s=bg(n,i),a=this.#m(n,i,s);if(a&&Vc(e,a))return;const o=this.#i==="content"?i:n;Vc(e,this.#v(this.#n,o,s,this.#i))||(this.#f(),this.#e.onPointerExit())}#f(){this.#n=null,this.#i=null,this.#s=[],this.#u(),this.#d()}#m(e,t,r){const n=this.#t;switch(r){case"top":return[[Math.min(e.left,t.left)-n,e.top],[Math.min(e.left,t.left)-n,t.bottom],[Math.max(e.right,t.right)+n,t.bottom],[Math.max(e.right,t.right)+n,e.top]];case"bottom":return[[Math.min(e.left,t.left)-n,e.bottom],[Math.min(e.left,t.left)-n,t.top],[Math.max(e.right,t.right)+n,t.top],[Math.max(e.right,t.right)+n,e.bottom]];case"left":return[[e.left,Math.min(e.top,t.top)-n],[t.right,Math.min(e.top,t.top)-n],[t.right,Math.max(e.bottom,t.bottom)+n],[e.left,Math.max(e.bottom,t.bottom)+n]];case"right":return[[e.right,Math.min(e.top,t.top)-n],[t.left,Math.min(e.top,t.top)-n],[t.left,Math.max(e.bottom,t.bottom)+n],[e.right,Math.max(e.bottom,t.bottom)+n]]}}#v(e,t,r,n){const i=this.#t*4,[s,a]=e;switch(n==="trigger"?this.#y(r):r){case"top":return[[s-i,a+i],[s+i,a+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case"bottom":return[[s-i,a-i],[s+i,a-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case"left":return[[s+i,a-i],[s+i,a+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case"right":return[[s-i,a-i],[s-i,a+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}#y(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}},Zc=wo({component:"popover",parts:["root","trigger","content","close","overlay"]}),Wc=new Ft("Popover.Root"),WP=class Vy{static create(t){return Wc.set(new Vy(t))}opts;#e=ae(null);get contentNode(){return d(this.#e)}set contentNode(t){$(this.#e,t,!0)}contentPresence;#t=ae(null);get triggerNode(){return d(this.#t)}set triggerNode(t){$(this.#t,t,!0)}#r=ae(null);get overlayNode(){return d(this.#r)}set overlayNode(t){$(this.#r,t,!0)}overlayPresence;#n=ae(!1);get openedViaHover(){return d(this.#n)}set openedViaHover(t){$(this.#n,t,!0)}#i=ae(!1);get hasInteractedWithContent(){return d(this.#i)}set hasInteractedWithContent(t){$(this.#i,t,!0)}#s=ae(!1);get hoverCooldown(){return d(this.#s)}set hoverCooldown(t){$(this.#s,t,!0)}#o=ae(0);get closeDelay(){return d(this.#o)}set closeDelay(t){$(this.#o,t,!0)}#a=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new Zm({ref:z(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new Zm({ref:z(()=>this.overlayNode),open:this.opts.open}),nt(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#u())})}setDomContext(t){this.#l=t}#u(){this.#a!==null&&this.#l&&(this.#l.clearTimeout(this.#a),this.#a=null)}toggleOpen(){this.#u(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#u(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#u(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#u(),this.closeDelay<=0?this.opts.open.current=!1:this.#l&&(this.#a=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#a=null},this.closeDelay))))}cancelDelayedClose(){this.#u()}markInteraction(){this.hasInteractedWithContent=!0,this.#u()}},HP=class jy{static create(t){return new jy(t,Wc.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=ae(!1);constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new ji(t.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),nt(()=>this.opts.closeDelay.current,n=>{this.root.closeDelay=n})}#n(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#i(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#s(){this.#n(),this.#i()}onpointerenter(t){if(this.opts.disabled.current||!this.opts.openOnHover.current||So(t)||($(this.#r,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const r=this.opts.openDelay.current;r<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},r)}onpointerleave(t){this.opts.disabled.current||this.opts.openOnHover.current&&(So(t)||($(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#s(),d(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}d(this.#r)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(t){this.opts.disabled.current||(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.#s(),this.root.toggleOpen())}#o(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#a=D(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":xr(this.root.opts.open.current),"data-state":Um(this.root.opts.open.current),"aria-controls":this.#o(),[Zc.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return d(this.#a)}set props(t){$(this.#a,t)}},GP=class Zy{static create(t){return new Zy(t,Wc.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref,n=>this.root.contentNode=n),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new ZP({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(t){this.root.markInteraction()}onfocusin(t){const r=t.target;si(r)&&gO(r)&&this.root.markInteraction()}onpointerenter(t){So(t)||this.root.cancelDelayedClose()}onpointerleave(t){So(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!si(t.target))return;const r=t.target.closest(Zc.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(si(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(t.target))return}else if(typeof this.opts.customAnchor.current=="string"){const n=document.querySelector(this.opts.customAnchor.current);if(n&&n.contains(t.target))return}}this.root.handleClose()}};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=D(()=>({open:this.root.opts.open.current}));get snippetProps(){return d(this.#e)}set snippetProps(t){$(this.#e,t)}#t=D(()=>({id:this.opts.id.current,tabindex:-1,"data-state":Um(this.root.opts.open.current),...BC(this.root.contentPresence.transitionStatus),[Zc.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return d(this.#t)}set props(t){$(this.#t,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}};function _g(e,t){ne(t,!0);let r=_(t,"open",15,!1),n=_(t,"onOpenChange",7,xe),i=_(t,"onOpenChangeComplete",7,xe),s=_(t,"value",15),a=_(t,"onValueChange",7,xe),o=_(t,"placeholder",15),l=_(t,"onPlaceholderChange",7,xe),c=_(t,"isDateUnavailable",7,()=>!1),f=_(t,"validate",7,xe),u=_(t,"onInvalid",7,xe),p=_(t,"minValue",7),h=_(t,"maxValue",7),g=_(t,"disabled",7,!1),v=_(t,"readonly",7,!1),m=_(t,"granularity",7),y=_(t,"readonlySegments",23,()=>[]),S=_(t,"hourCycle",7),k=_(t,"locale",7),E=_(t,"hideTimeZone",7,!1),T=_(t,"required",7,!1),O=_(t,"calendarLabel",7,"Event"),F=_(t,"disableDaysOutsideMonth",7,!0),R=_(t,"preventDeselect",7,!1),Y=_(t,"pagedNavigation",7,!1),N=_(t,"weekStartsOn",7),X=_(t,"weekdayFormat",7,"narrow"),q=_(t,"isDateDisabled",7,()=>!1),le=_(t,"fixedWeeks",7,!1),he=_(t,"numberOfMonths",7,1),j=_(t,"closeOnDateSelect",7,!0),oe=_(t,"initialFocus",7,!1),ee=_(t,"errorMessageId",7),fe=_(t,"children",7),ce=_(t,"monthFormat",7,"long"),de=_(t,"yearFormat",7,"numeric");const G=pv({granularity:m(),defaultValue:s(),minValue:p(),maxValue:h()});function Q(){o()===void 0&&o(G)}Q(),nt.pre(()=>o(),()=>{Q()});function P(){j()&&r(!1)}const te=jP.create({open:z(()=>r(),w=>{r(w),n()(w)}),value:z(()=>s(),w=>{s(w),a()(w)}),placeholder:z(()=>o(),w=>{o(w),l()(w)}),isDateUnavailable:z(()=>c()),minValue:z(()=>p()),maxValue:z(()=>h()),disabled:z(()=>g()),readonly:z(()=>v()),granularity:z(()=>m()),readonlySegments:z(()=>y()),hourCycle:z(()=>S()),locale:Hm(()=>k()),hideTimeZone:z(()=>E()),required:z(()=>T()),calendarLabel:z(()=>O()),disableDaysOutsideMonth:z(()=>F()),preventDeselect:z(()=>R()),pagedNavigation:z(()=>Y()),weekStartsOn:z(()=>N()),weekdayFormat:z(()=>X()),isDateDisabled:z(()=>q()),fixedWeeks:z(()=>le()),numberOfMonths:z(()=>he()),initialFocus:z(()=>oe()),onDateSelect:z(()=>P),defaultPlaceholder:G,monthFormat:z(()=>ce()),yearFormat:z(()=>de())});WP.create({open:te.opts.open,onOpenChangeComplete:z(()=>i())}),kP.create({value:te.opts.value,disabled:te.opts.disabled,readonly:te.opts.readonly,readonlySegments:te.opts.readonlySegments,validate:z(()=>f()),onInvalid:z(()=>u()),minValue:te.opts.minValue,maxValue:te.opts.maxValue,granularity:te.opts.granularity,hideTimeZone:te.opts.hideTimeZone,hourCycle:te.opts.hourCycle,locale:te.opts.locale,required:te.opts.required,placeholder:te.opts.placeholder,errorMessageId:z(()=>ee()),isInvalidProp:z(()=>{})});var L={get open(){return r()},set open(w=!1){r(w),b()},get onOpenChange(){return n()},set onOpenChange(w=xe){n(w),b()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(w=xe){i(w),b()},get value(){return s()},set value(w){s(w),b()},get onValueChange(){return a()},set onValueChange(w=xe){a(w),b()},get placeholder(){return o()},set placeholder(w){o(w),b()},get onPlaceholderChange(){return l()},set onPlaceholderChange(w=xe){l(w),b()},get isDateUnavailable(){return c()},set isDateUnavailable(w=()=>!1){c(w),b()},get validate(){return f()},set validate(w=xe){f(w),b()},get onInvalid(){return u()},set onInvalid(w=xe){u(w),b()},get minValue(){return p()},set minValue(w){p(w),b()},get maxValue(){return h()},set maxValue(w){h(w),b()},get disabled(){return g()},set disabled(w=!1){g(w),b()},get readonly(){return v()},set readonly(w=!1){v(w),b()},get granularity(){return m()},set granularity(w){m(w),b()},get readonlySegments(){return y()},set readonlySegments(w=[]){y(w),b()},get hourCycle(){return S()},set hourCycle(w){S(w),b()},get locale(){return k()},set locale(w){k(w),b()},get hideTimeZone(){return E()},set hideTimeZone(w=!1){E(w),b()},get required(){return T()},set required(w=!1){T(w),b()},get calendarLabel(){return O()},set calendarLabel(w="Event"){O(w),b()},get disableDaysOutsideMonth(){return F()},set disableDaysOutsideMonth(w=!0){F(w),b()},get preventDeselect(){return R()},set preventDeselect(w=!1){R(w),b()},get pagedNavigation(){return Y()},set pagedNavigation(w=!1){Y(w),b()},get weekStartsOn(){return N()},set weekStartsOn(w){N(w),b()},get weekdayFormat(){return X()},set weekdayFormat(w="narrow"){X(w),b()},get isDateDisabled(){return q()},set isDateDisabled(w=()=>!1){q(w),b()},get fixedWeeks(){return le()},set fixedWeeks(w=!1){le(w),b()},get numberOfMonths(){return he()},set numberOfMonths(w=1){he(w),b()},get closeOnDateSelect(){return j()},set closeOnDateSelect(w=!0){j(w),b()},get initialFocus(){return oe()},set initialFocus(w=!1){oe(w),b()},get errorMessageId(){return ee()},set errorMessageId(w){ee(w),b()},get children(){return fe()},set children(w){fe(w),b()},get monthFormat(){return ce()},set monthFormat(w="long"){ce(w),b()},get yearFormat(){return de()},set yearFormat(w="numeric"){de(w),b()}},be=re(),Z=U(be);return $e(Z,()=>ag,(w,_e)=>{_e(w,{children:(we,De)=>{var Le=re(),je=U(Le);Se(je,()=>fe()??qe),x(we,Le)},$$slots:{default:!0}})}),x(e,be),ie(L)}se(_g,{open:{},onOpenChange:{},onOpenChangeComplete:{},value:{},onValueChange:{},placeholder:{},onPlaceholderChange:{},isDateUnavailable:{},validate:{},onInvalid:{},minValue:{},maxValue:{},disabled:{},readonly:{},granularity:{},readonlySegments:{},hourCycle:{},locale:{},hideTimeZone:{},required:{},calendarLabel:{},disableDaysOutsideMonth:{},preventDeselect:{},pagedNavigation:{},weekStartsOn:{},weekdayFormat:{},isDateDisabled:{},fixedWeeks:{},numberOfMonths:{},closeOnDateSelect:{},initialFocus:{},errorMessageId:{},children:{},monthFormat:{},yearFormat:{}},[],[],{mode:"open"});var KP=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]),YP=B("<div><!></div>");function wg(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Pe(r)),a=_(t,"ref",15,null),o=He(t,KP);const l=yg.get(),c=Pv.create({id:z(()=>s()),ref:z(()=>a(),m=>a(m)),calendarLabel:l.opts.calendarLabel,fixedWeeks:l.opts.fixedWeeks,isDateDisabled:l.opts.isDateDisabled,isDateUnavailable:l.opts.isDateUnavailable,locale:l.opts.locale,numberOfMonths:l.opts.numberOfMonths,pagedNavigation:l.opts.pagedNavigation,preventDeselect:l.opts.preventDeselect,readonly:l.opts.readonly,type:z(()=>"single"),weekStartsOn:l.opts.weekStartsOn,weekdayFormat:l.opts.weekdayFormat,disabled:l.opts.disabled,disableDaysOutsideMonth:l.opts.disableDaysOutsideMonth,maxValue:l.opts.maxValue,minValue:l.opts.minValue,placeholder:l.opts.placeholder,value:l.opts.value,onDateSelect:l.opts.onDateSelect,initialFocus:l.opts.initialFocus,defaultPlaceholder:l.opts.defaultPlaceholder,maxDays:z(()=>{}),monthFormat:l.opts.monthFormat,yearFormat:l.opts.yearFormat}),f=D(()=>Ke(o,c.props));var u={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get id(){return s()},set id(m=Pe(r)){s(m),b()},get ref(){return a()},set ref(m=null){a(m),b()}},p=re(),h=U(p),g=m=>{var y=re(),S=U(y);{let k=D(()=>({props:d(f),...c.snippetProps}));Se(S,i,()=>d(k))}x(m,y)},v=m=>{var y=YP();Ue(y,()=>({...d(f)}));var S=M(y);Se(S,()=>n()??qe,()=>c.snippetProps),I(y),x(m,y)};return ue(h,m=>{i()?m(g):m(v,-1)}),x(e,p),ie(u)}se(wg,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var JP=new Set(["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]),kg=B("<div><div><!></div></div>");function Sg(e,t){const r=mt();ne(t,!0);let n=_(t,"child",7),i=_(t,"children",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=_(t,"forceMount",7,!1),l=_(t,"onOpenAutoFocus",7,xe),c=_(t,"onCloseAutoFocus",7,xe),f=_(t,"onEscapeKeydown",7,xe),u=_(t,"onInteractOutside",7,xe),p=_(t,"trapFocus",7,!0),h=_(t,"preventScroll",7,!1),g=_(t,"customAnchor",7,null),v=_(t,"style",7),m=He(t,JP);const y=GP.create({id:z(()=>a()),ref:z(()=>s(),N=>s(N)),onInteractOutside:z(()=>u()),onEscapeKeydown:z(()=>f()),customAnchor:z(()=>g())}),S=D(()=>Ke(m,y.props)),k=D(()=>p()&&y.shouldTrapFocus);function E(N){y.shouldTrapFocus||N.preventDefault(),l()(N)}var T={get child(){return n()},set child(N){n(N),b()},get children(){return i()},set children(N){i(N),b()},get ref(){return s()},set ref(N=null){s(N),b()},get id(){return a()},set id(N=Pe(r)){a(N),b()},get forceMount(){return o()},set forceMount(N=!1){o(N),b()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(N=xe){l(N),b()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(N=xe){c(N),b()},get onEscapeKeydown(){return f()},set onEscapeKeydown(N=xe){f(N),b()},get onInteractOutside(){return u()},set onInteractOutside(N=xe){u(N),b()},get trapFocus(){return p()},set trapFocus(N=!0){p(N),b()},get preventScroll(){return h()},set preventScroll(N=!1){h(N),b()},get customAnchor(){return g()},set customAnchor(N=null){g(N),b()},get style(){return v()},set style(N){v(N),b()}},O=re(),F=U(O),R=N=>{fg(N,An(()=>d(S),()=>y.popperProps,{get ref(){return y.opts.ref},get enabled(){return y.root.opts.open.current},get id(){return a()},get trapFocus(){return d(k)},get preventScroll(){return h()},loop:!0,forceMount:!0,get customAnchor(){return g()},onOpenAutoFocus:E,get onCloseAutoFocus(){return c()},get shouldRender(){return y.shouldRender},popper:(q,le)=>{let he=()=>le?.().props,j=()=>le?.().wrapperProps;const oe=D(()=>Ke(he(),{style:ig("popover")},{style:v()}));var ee=re(),fe=U(ee),ce=G=>{var Q=re(),P=U(Q);{let te=D(()=>({props:d(oe),wrapperProps:j(),...y.snippetProps}));Se(P,n,()=>d(te))}x(G,Q)},de=G=>{var Q=kg();Ue(Q,()=>({...j()}));var P=M(Q);Ue(P,()=>({...d(oe)}));var te=M(P);Se(te,()=>i()??qe),I(P),I(Q),x(G,Q)};ue(fe,G=>{n()?G(ce):G(de,-1)}),x(q,ee)},$$slots:{popper:!0}}))},Y=N=>{dg(N,An(()=>d(S),()=>y.popperProps,{get ref(){return y.opts.ref},get open(){return y.root.opts.open.current},get id(){return a()},get trapFocus(){return d(k)},get preventScroll(){return h()},loop:!0,forceMount:!1,get customAnchor(){return g()},onOpenAutoFocus:E,get onCloseAutoFocus(){return c()},get shouldRender(){return y.shouldRender},popper:(q,le)=>{let he=()=>le?.().props,j=()=>le?.().wrapperProps;const oe=D(()=>Ke(he(),{style:ig("popover")},{style:v()}));var ee=re(),fe=U(ee),ce=G=>{var Q=re(),P=U(Q);{let te=D(()=>({props:d(oe),wrapperProps:j(),...y.snippetProps}));Se(P,n,()=>d(te))}x(G,Q)},de=G=>{var Q=kg();Ue(Q,()=>({...j()}));var P=M(Q);Ue(P,()=>({...d(oe)}));var te=M(P);Se(te,()=>i()??qe),I(P),I(Q),x(G,Q)};ue(fe,G=>{n()?G(ce):G(de,-1)}),x(q,ee)},$$slots:{popper:!0}}))};return ue(F,N=>{o()?N(R):o()||N(Y,1)}),x(e,O),ie(T)}se(Sg,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:"open"});var QP=new Set(["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);function Eg(e,t){ne(t,!0);let r=_(t,"ref",15,null),n=_(t,"onOpenAutoFocus",7),i=He(t,QP);const s=D(()=>Ke({onOpenAutoFocus:n()},{onOpenAutoFocus:TD}));var a={get ref(){return r()},set ref(o=null){r(o),b()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(o){n(o),b()}};return Sg(e,An(()=>d(s),()=>i,{get ref(){return r()},set ref(o){r(o)}})),ie(a)}se(Eg,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var XP=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),eM=B("<button><!></button>");function xg(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Pe(r)),a=_(t,"ref",15,null),o=_(t,"type",7,"button"),l=_(t,"disabled",7,!1),c=_(t,"openOnHover",7,!1),f=_(t,"openDelay",7,700),u=_(t,"closeDelay",7,300),p=He(t,XP);const h=HP.create({id:z(()=>s()),ref:z(()=>a(),m=>a(m)),disabled:z(()=>!!l()),openOnHover:z(()=>c()),openDelay:z(()=>f()),closeDelay:z(()=>u())}),g=D(()=>Ke(p,h.props,{type:o()}));var v={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get id(){return s()},set id(m=Pe(r)){s(m),b()},get ref(){return a()},set ref(m=null){a(m),b()},get type(){return o()},set type(m="button"){o(m),b()},get disabled(){return l()},set disabled(m=!1){l(m),b()},get openOnHover(){return c()},set openOnHover(m=!1){c(m),b()},get openDelay(){return f()},set openDelay(m=700){f(m),b()},get closeDelay(){return u()},set closeDelay(m=300){u(m),b()}};return og(e,{get id(){return s()},get ref(){return h.opts.ref},children:(m,y)=>{var S=re(),k=U(S),E=O=>{var F=re(),R=U(F);Se(R,i,()=>({props:d(g)})),x(O,F)},T=O=>{var F=eM();Ue(F,()=>({...d(g)}));var R=M(F);Se(R,()=>n()??qe),I(F),x(O,F)};ue(k,O=>{i()?O(E):O(T,-1)}),x(m,S)},$$slots:{default:!0}}),ie(v)}se(xg,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});var tM=new Set(["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function Tg(e,t){ne(t,!0);let r=_(t,"ref",15,null),n=_(t,"onkeydown",7),i=He(t,tM);function s(l){if(oa(l.key)){const c=l.currentTarget.closest(Wo.selector("input"));if(!c)return;aa(l,c)}}const a=D(()=>Ke({onkeydown:n()},{onkeydown:s}));var o={get ref(){return r()},set ref(l=null){r(l),b()},get onkeydown(){return n()},set onkeydown(l){n(l),b()}};return xg(e,An(()=>i,{"data-segment":"trigger"},()=>d(a),{get ref(){return r()},set ref(l){r(l)}})),ie(o)}se(Tg,{ref:{},onkeydown:{}},[],[],{mode:"open"});var Hc=B("<!> <!>",1),Ag=B("<!> <!> <!>",1);function Cg(e,t){ne(t,!0);let r=_(t,"dateString",15),n=_(t,"labelClass",7),i=_(t,"inputClass",7),s=_(t,"labelText",7),a=ae(Me(Pi(Xt())));const o="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);ve(()=>{r(d(a).toString())});var l={get dateString(){return r()},set dateString(u){r(u),b()},get labelClass(){return n()},set labelClass(u){n(u),b()},get inputClass(){return i()},set inputClass(u){i(u),b()},get labelText(){return s()},set labelText(u){s(u),b()}},c=re(),f=U(c);{let u=D(()=>A.locale||"de");$e(f,()=>_g,(p,h)=>{h(p,{get locale(){return d(u)},weekStartsOn:1,isDateDisabled:g=>g.compare(Pi(Xt()))<0,get value(){return d(a)},set value(g){$(a,g,!0)},children:(g,v)=>{var m=Ag(),y=U(m);$e(y,()=>vg,(E,T)=>{T(E,{get id(){return o},get class(){return`go-datepicker-label ${n()??""}`},children:(O,F)=>{var R=re(),Y=U(R),N=X=>{var q=re(),le=U(q);Se(le,s),x(X,q)};ue(Y,X=>{s()&&X(N)}),x(O,R)},$$slots:{default:!0}})});var S=V(y,2);{const E=(T,O)=>{let F=()=>O?.().segments;var R=Hc(),Y=U(R);Ne(Y,17,F,sn,(X,q)=>{let le=()=>d(q).part,he=()=>d(q).value;var j=re(),oe=U(j);$e(oe,()=>gg,(ee,fe)=>{fe(ee,{get part(){return le()},children:(ce,de)=>{Ot();var G=Bt();J(()=>H(G,he())),x(ce,G)},$$slots:{default:!0}})}),x(X,j)});var N=V(Y,2);$e(N,()=>Tg,(X,q)=>{q(X,{get"aria-labelledby"(){return o},class:"go-calendar-button"})}),x(T,R)};$e(S,()=>mg,(T,O)=>{O(T,{get class(){return`go-datepicker-input ${i()??""}`},children:E,$$slots:{default:!0}})})}var k=V(S,2);$e(k,()=>Eg,(E,T)=>{T(E,{children:(O,F)=>{var R=re(),Y=U(R);{const N=(X,q)=>{let le=()=>q?.().months,he=()=>q?.().weekdays;var j=Hc(),oe=U(j);$e(oe,()=>wc,(fe,ce)=>{ce(fe,{children:(de,G)=>{var Q=Ag(),P=U(Q);$e(P,()=>Ec,(be,Z)=>{Z(be,{class:"go-datepicker-previous"})});var te=V(P,2);$e(te,()=>kc,(be,Z)=>{Z(be,{class:"go-datepicker-selected-month"})});var L=V(te,2);$e(L,()=>Sc,(be,Z)=>{Z(be,{class:"go-datepicker-next"})}),x(de,Q)},$$slots:{default:!0}})});var ee=V(oe,2);Ne(ee,16,le,fe=>fe,(fe,ce)=>{var de=re(),G=U(de);$e(G,()=>vc,(Q,P)=>{P(Q,{children:(te,L)=>{var be=Hc(),Z=U(be);$e(Z,()=>bc,(_e,we)=>{we(_e,{children:(De,Le)=>{var je=re(),bt=U(je);$e(bt,()=>ua,(st,Nt)=>{Nt(st,{children:(_t,Rt)=>{var nr=re(),Ht=U(nr);Ne(Ht,17,he,sn,(mr,Ir)=>{var Pr=re(),yn=U(Pr);$e(yn,()=>_c,(Mr,vr)=>{vr(Mr,{children:(Xr,en)=>{Ot();var Tt=Bt();J(()=>H(Tt,d(Ir))),x(Xr,Tt)},$$slots:{default:!0}})}),x(mr,Pr)}),x(_t,nr)},$$slots:{default:!0}})}),x(De,je)},$$slots:{default:!0}})});var w=V(Z,2);$e(w,()=>gc,(_e,we)=>{we(_e,{children:(De,Le)=>{var je=re(),bt=U(je);Ne(bt,16,()=>ce.weeks,st=>st,(st,Nt)=>{var _t=re(),Rt=U(_t);$e(Rt,()=>ua,(nr,Ht)=>{Ht(nr,{children:(mr,Ir)=>{var Pr=re(),yn=U(Pr);Ne(yn,16,()=>Nt,Mr=>Mr,(Mr,vr,Xr,en)=>{var Tt=re(),Un=U(Tt);$e(Un,()=>yc,(is,ss)=>{ss(is,{get date(){return vr},get month(){return ce.value},children:(ma,id)=>{var vi=re(),as=U(vi);$e(as,()=>mc,(gr,Bn)=>{Bn(gr,{})}),x(ma,vi)},$$slots:{default:!0}})}),x(Mr,Tt)}),x(mr,Pr)},$$slots:{default:!0}})}),x(st,_t)}),x(De,je)},$$slots:{default:!0}})}),x(te,be)},$$slots:{default:!0}})}),x(fe,de)}),x(X,j)};$e(Y,()=>wg,(X,q)=>{q(X,{children:N,$$slots:{default:!0}})})}x(O,R)},$$slots:{default:!0}})}),x(g,m)},$$slots:{default:!0}})})}return x(e,c),ie(l)}se(Cg,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var rM=new Set(["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]),nM=B('<span class="go-field-star" aria-hidden="true">*</span>'),iM=B(" <!>",1),sM=B("<label><!></label> <input/>",1),aM=B("<label><!></label> <textarea></textarea>",1),oM=B('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),lM=B("<label><!></label> <input/> <!>",1),uM=B('<label><input/> <span class="go-checkbox-label"><!></span></label>'),cM=B('<img src="" alt=""/> <option> </option>',1),dM=B('<option disabled="" hidden="" selected=""> </option> <!>',1),fM=B("<!>",1),hM=B("<label><!></label> <select><!></select>",1),pM=B('<img style="width: 60px" aria-hidden="true"/>'),mM=B('<span class="go-payment-mode-icons"></span>'),vM=B('<span class="go-payment-mode-name"> </span>'),gM=B('<label><input type="radio"/> <!></label>'),yM=B('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),bM=B("<label> <input/></label>"),_M=B("<fieldset><legend><!></legend> <!></fieldset>");function Og(e,t){ne(t,!0);const r=j=>{Ot();var oe=iM(),ee=U(oe),fe=V(ee),ce=de=>{var G=nM();x(de,G)};ue(fe,de=>{u().required&&de(ce)}),J(()=>H(ee,`${d(R)??""} `)),x(j,oe)},n=j=>{var oe=sM(),ee=U(oe);r(M(ee)),I(ee);var fe=V(ee,2);Ue(fe,()=>({...d(F),...m,class:g(),placeholder:u().placeholder,type:u().type,name:u().key}),void 0,void 0,void 0,void 0,!0),J(()=>{St(ee,1,dr(h())),me(ee,"for",d(T))}),Va(fe,()=>u().value,ce=>u(u().value=ce,!0)),x(j,oe)},i=j=>{var oe=aM(),ee=U(oe);r(M(ee)),I(ee);var fe=V(ee,2);t_(fe),Ue(fe,()=>({...d(F),...m,class:g(),placeholder:u().placeholder,name:u().key})),J(()=>{St(ee,1,dr(h())),me(ee,"for",d(T))}),Va(fe,()=>u().value,ce=>u(u().value=ce,!0)),x(j,oe)},s=j=>{var oe=lM(),ee=U(oe);r(M(ee)),I(ee);var fe=V(ee,2),ce=Q=>{const P=Q.currentTarget.files;u(u().value=P&&P[0]?P[0]:null,!0),d(S)?d(S).validateField(u()):u().validate()};Ue(fe,()=>({...d(F),...m,class:g(),type:"file",accept:"image/*",name:u().key,onchange:ce}),void 0,void 0,void 0,void 0,!0);var de=V(fe,2),G=Q=>{var P=oM(),te=M(P),L=V(te,2),be=M(L,!0);I(L),I(P),J(Z=>{me(P,"data-field-preview",u().key),me(te,"src",d(N)),me(te,"alt",Z),H(be,u().value.name)},[()=>A.t("forms.file.preview_alt")||"User uploaded photo"]),x(Q,P)};ue(de,Q=>{d(N)&&u().value instanceof File&&Q(G)}),J(()=>{St(ee,1,dr(h())),me(ee,"for",d(T))}),x(j,oe)},a=j=>{var oe=uM(),ee=M(oe);Ue(ee,()=>({...d(F),...m,name:u().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var fe=V(ee,2);r(M(fe)),I(fe),I(oe),J(()=>{St(oe,1,dr(h())),me(oe,"for",d(T))}),H_(ee,()=>u().value===!0,ce=>{u(u().value=ce,!0)}),x(j,oe)},o=j=>{var oe=hM(),ee=U(oe);r(M(ee)),I(ee);var fe=V(ee,2);Ue(fe,()=>({...d(F),...m,name:u().key,class:g()})),Z_(fe,()=>{var ce=M(fe),de=fM(),G=U(de),Q=P=>{var te=dM(),L=U(te),be=M(L,!0);I(L),L.value=L.__value="";var Z=V(L,2);Ne(Z,17,()=>u().options(),w=>w.value,(w,_e)=>{var we=cM(),De=V(U(we),2),Le=M(De,!0);I(De);var je={};J(()=>{H(Le,d(_e).label),je!==(je=d(_e).value)&&(De.value=(De.__value=d(_e).value)??"")}),x(w,we)}),J(w=>H(be,w),[()=>A.t("common.choose")]),x(P,te)};ue(G,P=>{u().options&&P(Q)}),x(ce,de)}),J(()=>{St(ee,1,dr(h())),me(ee,"for",d(T))}),N_(fe,()=>u().value,ce=>u(u().value=ce,!0)),x(j,oe)},l=j=>{Cg(j,{get labelClass(){return h()},get inputClass(){return g()},get labelText(){return r},get dateString(){return u().value},set dateString(oe){u(u().value=oe,!0)}})},c=j=>{const oe=D(()=>A.payment_modes?Object.values(A.payment_modes):[]);var ee=yM(),fe=M(ee);r(M(fe)),I(fe);var ce=V(fe,2);Ne(ce,17,()=>d(oe),de=>de.id,(de,G)=>{var Q=gM(),P=M(Q);Ms(P);var te=V(P,2),L=Z=>{var w=mM();Ne(w,20,()=>d(G).icons,_e=>_e,(_e,we)=>{const De=D(()=>Y+we+".svg");var Le=pM();J(()=>{St(Le,1,dr(we)),me(Le,"src",d(De)),me(Le,"alt",we+" icon")}),x(_e,Le)}),I(w),x(Z,w)},be=Z=>{var w=vM(),_e=M(w,!0);I(w),J(()=>H(_e,d(G).name)),x(Z,w)};ue(te,Z=>{d(G).icons.length>0?Z(L):Z(be,-1)}),I(Q),J((Z,w,_e)=>{me(P,"name",u().key),Vl(P,Z),U_(P,w),me(P,"hidden",d(oe).length===1),me(P,"aria-label",_e)},[()=>String(d(G).id),()=>u().value===String(d(G).id),()=>A.t(`cart.paymentMode.ariaLabel.${d(G).name.toLowerCase()}`)]),pt("change",P,()=>{u(u().value=String(d(G).id),!0)}),x(de,Q)}),I(ee),J(()=>{me(ee,"aria-required",u().required),me(ee,"aria-invalid",u().errors.length>0)}),x(j,ee)},f=j=>{var oe=_M(),ee=M(oe);r(M(ee)),I(ee);var fe=V(ee,2),ce=de=>{var G=re(),Q=U(G);Ne(Q,17,()=>u().options(),P=>P.value,(P,te)=>{var L=bM(),be=M(L),Z=V(be);Ue(Z,()=>({...d(F),...m,class:g(),type:"radio"}),void 0,void 0,void 0,void 0,!0),I(L),J(()=>{St(L,1,dr(h())),me(L,"for",d(T)+d(te).value),H(be,`${d(te).label??""} `)}),Va(Z,()=>u().value,w=>u(u().value=w,!0)),x(P,L)}),x(de,G)};ue(fe,de=>{u().options&&de(ce)}),I(oe),x(j,oe)};let u=_(t,"field",15),p=_(t,"describedByIds",7),h=_(t,"labelClass",7),g=_(t,"inputClass",7),v=_(t,"host",7),m=He(t,rM);const y=Li(v()),S=D(()=>y.value),k={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:a,select:o,radio:f,date:l,file:s,textarea:i,paymentMode:c},E=D(()=>k[u().type]);let T=D(()=>t.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function O(){u().type!=="checkbox"&&u().value&&(d(S)?d(S).validateField(u()):u().validate())}const F=D(()=>({id:d(T),"aria-describedby":p(),"aria-required":u().required,"aria-invalid":u().errors.length>0,autocomplete:u().autocomplete,onblur:O}));let R=D(()=>A.t(u().label)||u().label);const Y="https://cdn.shop.platform.gomus.de/";ve(()=>{if(u().type!=="paymentMode")return;const j=A.payment_modes?Object.values(A.payment_modes):[];j.length===1&&u().value===""&&u(u().value=String(j[0].id),!0)});let N=ae(null);ve(()=>{const j=u().value;if(j instanceof File&&j.type.startsWith("image/")){const oe=URL.createObjectURL(j);return $(N,oe,!0),()=>{URL.revokeObjectURL(oe),$(N,null)}}$(N,null)});var X={get field(){return u()},set field(j){u(j),b()},get describedByIds(){return p()},set describedByIds(j){p(j),b()},get labelClass(){return h()},set labelClass(j){h(j),b()},get inputClass(){return g()},set inputClass(j){g(j),b()},get host(){return v()},set host(j){v(j),b()}},q=re(),le=U(q),he=j=>{var oe=re(),ee=U(oe);Se(ee,()=>d(E)),x(j,oe)};return ue(le,j=>{d(E)&&j(he)}),x(e,q),ie(X)}cr(["change"]),se(Og,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var wM=B("<span> </span>"),kM=B("<li> </li>"),SM=B('<ul class="go-field-errors"></ul>'),EM=B("<!> <!> <!>",1);function xM(e,t){ne(t,!0);let r=_(t,"key",7),n=_(t,"required",7,!1),i=_(t,"labelClass",7),s=_(t,"inputClass",7),a=ae(Me(Pt.createField(r(),n())));const o=Li(t.$$host),l=D(()=>o.value),c=()=>d(a);let f=D(()=>d(a)?[...d(a).errors,...d(a).apiErrors].map(F=>A.t(F)):[]),u=D(()=>d(a)?.description),p=D(()=>d(f).length>0),h=D(()=>`go-description-${r()}-${Math.floor(Math.random()*100)}`),g=D(()=>`go-errors-${r()}-${Math.floor(Math.random()*100)}`),v=D(()=>[d(u)&&d(h),d(p)&&d(g)].filter(Boolean).join(" ")||void 0);ve(()=>{t.$$host.classList.toggle("go-field",!0),t.$$host.classList.toggle("is-invalid",d(f).length>0)}),t.$$host.dataset.testid=r(),ve(()=>{d(a)&&(d(a).mounted=!0,d(a).value,Re(()=>{d(a)?.errors.length&&d(l).validateField(d(a))}))});var m={getField:c,get key(){return r()},set key(F){r(F),b()},get required(){return n()},set required(F=!1){n(F),b()},get labelClass(){return i()},set labelClass(F){i(F),b()},get inputClass(){return s()},set inputClass(F){s(F),b()}},y=EM(),S=U(y);Og(S,{get describedByIds(){return d(v)},get labelClass(){return i()},get inputClass(){return s()},host:t.$$host,get field(){return d(a)},set field(F){$(a,F,!0)}});var k=V(S,2),E=F=>{var R=wM(),Y=M(R,!0);I(R),J(()=>{me(R,"id",d(h)),H(Y,d(a).description)}),x(F,R)};ue(k,F=>{d(u)&&F(E)});var T=V(k,2),O=F=>{var R=SM();Ne(R,21,()=>d(f),sn,(Y,N)=>{var X=kM(),q=M(X,!0);I(X),J(()=>H(q,d(N))),x(Y,X)}),I(R),J(()=>me(R,"id",d(g))),x(F,R)};return ue(T,F=>{d(p)&&F(O)}),x(e,y),ie(m)}customElements.define("go-field",se(xM,{key:{attribute:"key",reflect:!0,type:"String"},required:{attribute:"required",reflect:!0,type:"Boolean"},labelClass:{attribute:"label-class",reflect:!0,type:"String"},inputClass:{attribute:"input-class",reflect:!0,type:"String"}},[],["getField"]));var TM=B("<go-field></go-field>",2);function AM(e,t){ne(t,!0);let r=Li(t.$$host),n=D(()=>r.value),i=D(()=>d(n)?Pt.getFormFields(d(n)?.formId):[]);var s=re(),a=U(s);Ne(a,17,()=>d(i),o=>o.key,(o,l)=>{var c=TM();J(()=>Tn(c,"key",d(l).key)),J(()=>Tn(c,"required",d(l).required)),x(o,c)}),x(e,s),ie()}customElements.define("go-all-fields",se(AM,{},[],[]));var CM=B('<p aria-hidden="true"> </p>'),OM=B("<li> </li>"),DM=B('<ul class="go-error-feedback-api-errors"></ul>'),IM=B('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function PM(e,t){ne(t,!0);const r=Li(t.$$host),n=D(()=>r.value);ve(()=>{d(n)?.form?.addEventListener("go-after-validation",()=>{$(a,qu(d(n)?.fields),!0)})});let i=ae(0);setInterval(()=>{$(i,qu(d(n)?.fields)||0,!0)},100);let s=D(()=>d(i)+(d(n)?.apiErrors?.length||0)),a=ae(-1);ve(()=>{t.$$host.classList.toggle("is-invalid",d(s)>0),t.$$host.classList.toggle("go-feedback",!0),t.$$host.setAttribute("data-num-errors",d(s).toString())});var o=IM(),l=M(o),c=M(l),f=m=>{var y=Bt();J(S=>H(y,S),[()=>A.t("forms.errorSummary",{count:d(a)})]),x(m,y)};ue(c,m=>{d(a)>0&&m(f)}),I(l);var u=V(l,2),p=m=>{var y=CM(),S=M(y,!0);I(y),J(k=>H(S,k),[()=>A.t("forms.errorSummary",{count:d(i)})]),x(m,y)};ue(u,m=>{d(i)>0&&m(p)});var h=V(u,2),g=m=>{var y=DM();Ne(y,21,()=>d(n)?.apiErrors,sn,(S,k)=>{var E=OM(),T=M(E,!0);I(E),J(()=>H(T,d(k))),x(S,E)}),I(y),x(m,y)},v=D(()=>d(n)&&tu(d(n).apiErrors)&&d(n).apiErrors.length>0);ue(h,m=>{d(v)&&m(g)}),I(o),x(e,o),ie()}customElements.define("go-errors-feedback",se(PM,{},[],[]));var MM=B('<div class="go-form-feedback"><!></div>');function $M(e,t){var r=MM(),n=M(r);I_(n,t,"default",{},null),I(r),x(e,r)}customElements.define("go-form-feedback",se($M,{},["default"],[]));function FM(e,t){ne(t,!0);let r=_(t,"buttonClass",7,"");return En(()=>{Hr(t.$$host,"button",{type:"submit",class:r()})}),ie({get buttonClass(){return r()},set buttonClass(n=""){r(n),b()}})}customElements.define("go-submit",se(FM,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var NM=B('<div aria-live="assertive"> </div>');function RM(e,t){ne(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=NM();let c;var f=M(l,!0);I(l),J(()=>{c=St(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":d(n).successMessage}),H(f,d(n)?.successMessage)}),x(o,l)};ue(s,o=>{d(n)?.successMessage&&o(a)}),x(e,i),ie()}customElements.define("go-success-feedback",se(RM,{},[],[]));var pr="INUMBER",Ji="IOP1",Qi="IOP2",Xi="IOP3",fn="IVAR",di="IVARNAME",es="IFUNCALL",Ho="IFUNDEF",Wt="IEXPR",Gc="IEXPREVAL",fi="IMEMBER",Go="IENDSTATEMENT",ts="IARRAY";function Fe(e,t){this.type=e,this.value=t??0}Fe.prototype.toString=function(){switch(this.type){case pr:case Ji:case Qi:case Xi:case fn:case di:case Go:return this.value;case es:return"CALL "+this.value;case Ho:return"DEF "+this.value;case ts:return"ARRAY "+this.value;case fi:return"."+this.value;default:return"Invalid Instruction"}};function Ko(e){return new Fe(Ji,e)}function hn(e){return new Fe(Qi,e)}function Dg(e){return new Fe(Xi,e)}function Kc(e,t,r,n,i){for(var s=[],a=[],o,l,c,f,u=0;u<e.length;u++){var p=e[u],h=p.type;if(h===pr||h===di)Array.isArray(p.value)?s.push.apply(s,Kc(p.value.map(function(g){return new Fe(pr,g)}).concat(new Fe(ts,p.value.length)),t,r,n,i)):s.push(p);else if(h===fn&&i.hasOwnProperty(p.value))p=new Fe(pr,i[p.value]),s.push(p);else if(h===Qi&&s.length>1)l=s.pop(),o=s.pop(),f=r[p.value],p=new Fe(pr,f(o.value,l.value)),s.push(p);else if(h===Xi&&s.length>2)c=s.pop(),l=s.pop(),o=s.pop(),p.value==="?"?s.push(o.value?l.value:c.value):(f=n[p.value],p=new Fe(pr,f(o.value,l.value,c.value)),s.push(p));else if(h===Ji&&s.length>0)o=s.pop(),f=t[p.value],p=new Fe(pr,f(o.value)),s.push(p);else if(h===Wt){for(;s.length>0;)a.push(s.shift());a.push(new Fe(Wt,Kc(p.value,t,r,n,i)))}else if(h===fi&&s.length>0)o=s.pop(),s.push(new Fe(pr,o.value[p.value]));else{for(;s.length>0;)a.push(s.shift());a.push(p)}}for(;s.length>0;)a.push(s.shift());return a}function Ig(e,t,r){for(var n=[],i=0;i<e.length;i++){var s=e[i],a=s.type;if(a===fn&&s.value===t)for(var o=0;o<r.tokens.length;o++){var l=r.tokens[o],c;l.type===Ji?c=Ko(l.value):l.type===Qi?c=hn(l.value):l.type===Xi?c=Dg(l.value):c=new Fe(l.type,l.value),n.push(c)}else a===Wt?n.push(new Fe(Wt,Ig(s.value,t,r))):n.push(s)}return n}function hi(e,t,r){var n=[],i,s,a,o,l,c;if(Yc(e))return pn(e,r);for(var f=e.length,u=0;u<f;u++){var p=e[u],h=p.type;if(h===pr||h===di)n.push(p.value);else if(h===Qi)s=n.pop(),i=n.pop(),p.value==="and"?n.push(i?!!hi(s,t,r):!1):p.value==="or"?n.push(i?!0:!!hi(s,t,r)):p.value==="="?(o=t.binaryOps[p.value],n.push(o(i,hi(s,t,r),r))):(o=t.binaryOps[p.value],n.push(o(pn(i,r),pn(s,r))));else if(h===Xi)a=n.pop(),s=n.pop(),i=n.pop(),p.value==="?"?n.push(hi(i?s:a,t,r)):(o=t.ternaryOps[p.value],n.push(o(pn(i,r),pn(s,r),pn(a,r))));else if(h===fn)if(p.value in t.functions)n.push(t.functions[p.value]);else if(p.value in t.unaryOps&&t.parser.isOperatorEnabled(p.value))n.push(t.unaryOps[p.value]);else{var g=r[p.value];if(g!==void 0)n.push(g);else throw new Error("undefined variable: "+p.value)}else if(h===Ji)i=n.pop(),o=t.unaryOps[p.value],n.push(o(pn(i,r)));else if(h===es){for(c=p.value,l=[];c-- >0;)l.unshift(pn(n.pop(),r));if(o=n.pop(),o.apply&&o.call)n.push(o.apply(void 0,l));else throw new Error(o+" is not a function")}else if(h===Ho)n.push((function(){for(var v=n.pop(),m=[],y=p.value;y-- >0;)m.unshift(n.pop());var S=n.pop(),k=function(){for(var E=Object.assign({},r),T=0,O=m.length;T<O;T++)E[m[T]]=arguments[T];return hi(v,t,E)};return Object.defineProperty(k,"name",{value:S,writable:!1}),r[S]=k,k})());else if(h===Wt)n.push(LM(p,t));else if(h===Gc)n.push(p);else if(h===fi)i=n.pop(),n.push(i[p.value]);else if(h===Go)n.pop();else if(h===ts){for(c=p.value,l=[];c-- >0;)l.unshift(n.pop());n.push(l)}else throw new Error("invalid Expression")}if(n.length>1)throw new Error("invalid Expression (parity)");return n[0]===0?0:pn(n[0],r)}function LM(e,t,r){return Yc(e)?e:{type:Gc,value:function(n){return hi(e.value,t,n)}}}function Yc(e){return e&&e.type===Gc}function pn(e,t){return Yc(e)?e.value(t):e}function Jc(e,t){for(var r=[],n,i,s,a,o,l,c=0;c<e.length;c++){var f=e[c],u=f.type;if(u===pr)typeof f.value=="number"&&f.value<0?r.push("("+f.value+")"):Array.isArray(f.value)?r.push("["+f.value.map(Pg).join(", ")+"]"):r.push(Pg(f.value));else if(u===Qi)i=r.pop(),n=r.pop(),a=f.value,t?a==="^"?r.push("Math.pow("+n+", "+i+")"):a==="and"?r.push("(!!"+n+" && !!"+i+")"):a==="or"?r.push("(!!"+n+" || !!"+i+")"):a==="||"?r.push("(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }(("+n+"),("+i+")))"):a==="=="?r.push("("+n+" === "+i+")"):a==="!="?r.push("("+n+" !== "+i+")"):a==="["?r.push(n+"[("+i+") | 0]"):r.push("("+n+" "+a+" "+i+")"):a==="["?r.push(n+"["+i+"]"):r.push("("+n+" "+a+" "+i+")");else if(u===Xi)if(s=r.pop(),i=r.pop(),n=r.pop(),a=f.value,a==="?")r.push("("+n+" ? "+i+" : "+s+")");else throw new Error("invalid Expression");else if(u===fn||u===di)r.push(f.value);else if(u===Ji)n=r.pop(),a=f.value,a==="-"||a==="+"?r.push("("+a+n+")"):t?a==="not"?r.push("(!"+n+")"):a==="!"?r.push("fac("+n+")"):r.push(a+"("+n+")"):a==="!"?r.push("("+n+"!)"):r.push("("+a+" "+n+")");else if(u===es){for(l=f.value,o=[];l-- >0;)o.unshift(r.pop());a=r.pop(),r.push(a+"("+o.join(", ")+")")}else if(u===Ho){for(i=r.pop(),l=f.value,o=[];l-- >0;)o.unshift(r.pop());n=r.pop(),t?r.push("("+n+" = function("+o.join(", ")+") { return "+i+" })"):r.push("("+n+"("+o.join(", ")+") = "+i+")")}else if(u===fi)n=r.pop(),r.push(n+"."+f.value);else if(u===ts){for(l=f.value,o=[];l-- >0;)o.unshift(r.pop());r.push("["+o.join(", ")+"]")}else if(u===Wt)r.push("("+Jc(f.value,t)+")");else if(u!==Go)throw new Error("invalid Expression")}return r.length>1&&(t?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function Pg(e){return typeof e=="string"?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}function rs(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}function Qc(e,t,r){r=r||{};for(var n=!!r.withMembers,i=null,s=0;s<e.length;s++){var a=e[s];a.type===fn||a.type===di?!n&&!rs(t,a.value)?t.push(a.value):(i!==null&&(rs(t,i)||t.push(i)),i=a.value):a.type===fi&&n&&i!==null?i+="."+a.value:a.type===Wt?Qc(a.value,t,r):i!==null&&(rs(t,i)||t.push(i),i=null)}i!==null&&!rs(t,i)&&t.push(i)}function Dr(e,t){this.tokens=e,this.parser=t,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.functions=t.functions}Dr.prototype.simplify=function(e){return e=e||{},new Dr(Kc(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,e),this.parser)},Dr.prototype.substitute=function(e,t){return t instanceof Dr||(t=this.parser.parse(String(t))),new Dr(Ig(this.tokens,e,t),this.parser)},Dr.prototype.evaluate=function(e){return e=e||{},hi(this.tokens,this,e)},Dr.prototype.toString=function(){return Jc(this.tokens,!1)},Dr.prototype.symbols=function(e){e=e||{};var t=[];return Qc(this.tokens,t,e),t},Dr.prototype.variables=function(e){e=e||{};var t=[];Qc(this.tokens,t,e);var r=this.functions;return t.filter(function(n){return!(n in r)})},Dr.prototype.toJSFunction=function(e,t){var r=this,n=new Function(e,"with(this.functions) with (this.ternaryOps) with (this.binaryOps) with (this.unaryOps) { return "+Jc(this.simplify(t).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var fa="TEOF",Ge="TOP",Yo="TNUMBER",Mg="TSTRING",mn="TPAREN",ns="TBRACKET",Jo="TCOMMA",Xc="TNAME",ed="TSEMICOLON";function $g(e,t,r){this.type=e,this.value=t,this.index=r}$g.prototype.toString=function(){return this.type+": "+this.value};function it(e,t){this.pos=0,this.current=null,this.unaryOps=e.unaryOps,this.binaryOps=e.binaryOps,this.ternaryOps=e.ternaryOps,this.consts=e.consts,this.expression=t,this.savedPosition=0,this.savedCurrent=null,this.options=e.options,this.parser=e}it.prototype.newToken=function(e,t,r){return new $g(e,t,r??this.pos)},it.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},it.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},it.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(fa,"EOF");if(this.isWhitespace()||this.isComment())return this.next();if(this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isBracket()||this.isComma()||this.isSemicolon()||this.isNamedOp()||this.isConst()||this.isName())return this.current;this.parseError('Unknown character "'+this.expression.charAt(this.pos)+'"')},it.prototype.isString=function(){var e=!1,t=this.pos,r=this.expression.charAt(t);if(r==="'"||r==='"')for(var n=this.expression.indexOf(r,t+1);n>=0&&this.pos<this.expression.length;){if(this.pos=n+1,this.expression.charAt(n-1)!=="\\"){var i=this.expression.substring(t+1,n);this.current=this.newToken(Mg,this.unescape(i),t),e=!0;break}n=this.expression.indexOf(r,n+1)}return e},it.prototype.isParen=function(){var e=this.expression.charAt(this.pos);return e==="("||e===")"?(this.current=this.newToken(mn,e),this.pos++,!0):!1},it.prototype.isBracket=function(){var e=this.expression.charAt(this.pos);return(e==="["||e==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(ns,e),this.pos++,!0):!1},it.prototype.isComma=function(){return this.expression.charAt(this.pos)===","?(this.current=this.newToken(Jo,","),this.pos++,!0):!1},it.prototype.isSemicolon=function(){return this.expression.charAt(this.pos)===";"?(this.current=this.newToken(ed,";"),this.pos++,!0):!1},it.prototype.isConst=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||r!=="_"&&r!=="."&&(r<"0"||r>"9")))break}if(t>e){var n=this.expression.substring(e,t);if(n in this.consts)return this.current=this.newToken(Yo,this.consts[n]),this.pos+=n.length,!0}return!1},it.prototype.isNamedOp=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||r!=="_"&&(r<"0"||r>"9")))break}if(t>e){var n=this.expression.substring(e,t);if(this.isOperatorEnabled(n)&&(n in this.binaryOps||n in this.unaryOps||n in this.ternaryOps))return this.current=this.newToken(Ge,n),this.pos+=n.length,!0}return!1},it.prototype.isName=function(){for(var e=this.pos,t=e,r=!1;t<this.expression.length;t++){var n=this.expression.charAt(t);if(n.toUpperCase()===n.toLowerCase()){if(t===this.pos&&(n==="$"||n==="_")){n==="_"&&(r=!0);continue}else if(t===this.pos||!r||n!=="_"&&(n<"0"||n>"9"))break}else r=!0}if(r){var i=this.expression.substring(e,t);return this.current=this.newToken(Xc,i),this.pos+=i.length,!0}return!1},it.prototype.isWhitespace=function(){for(var e=!1,t=this.expression.charAt(this.pos);(t===" "||t===" "||t===`
82
- `||t==="\r")&&(e=!0,this.pos++,!(this.pos>=this.expression.length));)t=this.expression.charAt(this.pos);return e};var zM=/^[0-9a-f]{4}$/i;it.prototype.unescape=function(e){var t=e.indexOf("\\");if(t<0)return e;for(var r=e.substring(0,t);t>=0;){var n=e.charAt(++t);switch(n){case"'":r+="'";break;case'"':r+='"';break;case"\\":r+="\\";break;case"/":r+="/";break;case"b":r+="\b";break;case"f":r+="\f";break;case"n":r+=`
83
- `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"u":var i=e.substring(t+1,t+5);zM.test(i)||this.parseError("Illegal escape sequence: \\u"+i),r+=String.fromCharCode(parseInt(i,16)),t+=4;break;default:throw this.parseError('Illegal escape sequence: "\\'+n+'"')}++t;var s=e.indexOf("\\",t);r+=e.substring(t,s<0?e.length:s),t=s}return r},it.prototype.isComment=function(){return this.expression.charAt(this.pos)==="/"&&this.expression.charAt(this.pos+1)==="*"?(this.pos=this.expression.indexOf("*/",this.pos)+2,this.pos===1&&(this.pos=this.expression.length),!0):!1},it.prototype.isRadixInteger=function(){var e=this.pos;if(e>=this.expression.length-2||this.expression.charAt(e)!=="0")return!1;++e;var t,r;if(this.expression.charAt(e)==="x")t=16,r=/^[0-9a-f]$/i,++e;else if(this.expression.charAt(e)==="b")t=2,r=/^[01]$/i,++e;else return!1;for(var n=!1,i=e;e<this.expression.length;){var s=this.expression.charAt(e);if(r.test(s))e++,n=!0;else break}return n&&(this.current=this.newToken(Yo,parseInt(this.expression.substring(i,e),t)),this.pos=e),n},it.prototype.isNumber=function(){for(var e=!1,t=this.pos,r=t,n=t,i=!1,s=!1,a;t<this.expression.length&&(a=this.expression.charAt(t),a>="0"&&a<="9"||!i&&a===".");)a==="."?i=!0:s=!0,t++,e=s;if(e&&(n=t),a==="e"||a==="E"){t++;for(var o=!0,l=!1;t<this.expression.length;){if(a=this.expression.charAt(t),o&&(a==="+"||a==="-"))o=!1;else if(a>="0"&&a<="9")l=!0,o=!1;else break;t++}l||(t=n)}return e?(this.current=this.newToken(Yo,parseFloat(this.expression.substring(r,t))),this.pos=t):this.pos=n,e},it.prototype.isOperator=function(){var e=this.pos,t=this.expression.charAt(this.pos);if(t==="+"||t==="-"||t==="*"||t==="/"||t==="%"||t==="^"||t==="?"||t===":"||t===".")this.current=this.newToken(Ge,t);else if(t==="∙"||t==="•")this.current=this.newToken(Ge,"*");else if(t===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ge,">="),this.pos++):this.current=this.newToken(Ge,">");else if(t==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ge,"<="),this.pos++):this.current=this.newToken(Ge,"<");else if(t==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(Ge,"||"),this.pos++;else return!1;else if(t==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ge,"=="),this.pos++):this.current=this.newToken(Ge,t);else if(t==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ge,"!="),this.pos++):this.current=this.newToken(Ge,t);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=e,!1)},it.prototype.isOperatorEnabled=function(e){return this.parser.isOperatorEnabled(e)},it.prototype.getCoordinates=function(){var e=0,t,r=-1;do e++,t=this.pos-r,r=this.expression.indexOf(`
84
- `,r+1);while(r>=0&&r<this.pos);return{line:e,column:t}},it.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)};function Ye(e,t,r){this.parser=e,this.tokens=t,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=r.allowMemberAccess!==!1}Ye.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},Ye.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?rs(t,e.value):typeof t=="function"?t(e):e.value===t},Ye.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},Ye.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},Ye.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},Ye.prototype.expect=function(e,t){if(!this.accept(e,t)){var r=this.tokens.getCoordinates();throw new Error("parse error ["+r.line+":"+r.column+"]: Expected "+(t||e))}},Ye.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.accept(Xc)||this.accept(Ge,r))e.push(new Fe(fn,this.current.value));else if(this.accept(Yo))e.push(new Fe(pr,this.current.value));else if(this.accept(Mg))e.push(new Fe(pr,this.current.value));else if(this.accept(mn,"("))this.parseExpression(e),this.expect(mn,")");else if(this.accept(ns,"["))if(this.accept(ns,"]"))e.push(new Fe(ts,0));else{var n=this.parseArrayList(e);e.push(new Fe(ts,n))}else throw new Error("unexpected "+this.nextToken)},Ye.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},Ye.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},Ye.prototype.parseUntilEndStatement=function(e,t){return this.accept(ed)?(this.nextToken&&this.nextToken.type!==fa&&!(this.nextToken.type===mn&&this.nextToken.value===")")&&t.push(new Fe(Go)),this.nextToken.type!==fa&&this.parseExpression(t),e.push(new Fe(Wt,t)),!0):!1},Ye.prototype.parseArrayList=function(e){for(var t=0;!this.accept(ns,"]");)for(this.parseExpression(e),++t;this.accept(Jo);)this.parseExpression(e),++t;return t},Ye.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(Ge,"=");){var t=e.pop(),r=[],n=e.length-1;if(t.type===es){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=t.value+1;i<s;i++){var a=n-i;e[a].type===fn&&(e[a]=new Fe(di,e[a].value))}this.parseVariableAssignmentExpression(r),e.push(new Fe(Wt,r)),e.push(new Fe(Ho,t.value));continue}if(t.type!==fn&&t.type!==fi)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),e.push(new Fe(di,t.value)),e.push(new Fe(Wt,r)),e.push(hn("="))}},Ye.prototype.parseConditionalExpression=function(e){for(this.parseOrExpression(e);this.accept(Ge,"?");){var t=[],r=[];this.parseConditionalExpression(t),this.expect(Ge,":"),this.parseConditionalExpression(r),e.push(new Fe(Wt,t)),e.push(new Fe(Wt,r)),e.push(Dg("?"))}},Ye.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(Ge,"or");){var t=[];this.parseAndExpression(t),e.push(new Fe(Wt,t)),e.push(hn("or"))}},Ye.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(Ge,"and");){var t=[];this.parseComparison(t),e.push(new Fe(Wt,t)),e.push(hn("and"))}};var qM=["==","!=","<","<=",">=",">","in"];Ye.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(Ge,qM);){var t=this.current;this.parseAddSub(e),e.push(hn(t.value))}};var UM=["+","-","||"];Ye.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(Ge,UM);){var t=this.current;this.parseTerm(e),e.push(hn(t.value))}};var BM=["*","/","%"];Ye.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(Ge,BM);){var t=this.current;this.parseFactor(e),e.push(hn(t.value))}},Ye.prototype.parseFactor=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.save(),this.accept(Ge,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===mn&&this.nextToken.value==="("){this.restore(),this.parseExponential(e);return}else if(this.nextToken.type===ed||this.nextToken.type===Jo||this.nextToken.type===fa||this.nextToken.type===mn&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var n=this.current;this.parseFactor(e),e.push(Ko(n.value))}else this.parseExponential(e)},Ye.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(Ge,"^");)this.parseFactor(e),e.push(hn("^"))},Ye.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(Ge,"!");)e.push(Ko("!"))},Ye.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function r(s){return s.value in t}if(this.accept(Ge,r)){var n=this.current;this.parseAtom(e),e.push(Ko(n.value))}else for(this.parseMemberExpression(e);this.accept(mn,"(");)if(this.accept(mn,")"))e.push(new Fe(es,0));else{var i=this.parseArgumentList(e);e.push(new Fe(es,i))}},Ye.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(mn,")");)for(this.parseExpression(e),++t;this.accept(Jo);)this.parseExpression(e),++t;return t},Ye.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(Ge,".")||this.accept(ns,"[");){var t=this.current;if(t.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(Xc),e.push(new Fe(fi,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(ns,"]"),e.push(hn("["))}else throw new Error("unexpected symbol: "+t.value)}};function VM(e,t){return Number(e)+Number(t)}function jM(e,t){return e-t}function ZM(e,t){return e*t}function WM(e,t){return e/t}function HM(e,t){return e%t}function GM(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function KM(e,t){return e===t}function YM(e,t){return e!==t}function JM(e,t){return e>t}function QM(e,t){return e<t}function XM(e,t){return e>=t}function e$(e,t){return e<=t}function t$(e,t){return!!(e&&t)}function r$(e,t){return!!(e||t)}function n$(e,t){return rs(t,e)}function i$(e){return(Math.exp(e)-Math.exp(-e))/2}function s$(e){return(Math.exp(e)+Math.exp(-e))/2}function a$(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function o$(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function l$(e){return Math.log(e+Math.sqrt(e*e-1))}function u$(e){return Math.log((1+e)/(1-e))/2}function Fg(e){return Math.log(e)*Math.LOG10E}function c$(e){return-e}function d$(e){return!e}function f$(e){return e<0?Math.ceil(e):Math.floor(e)}function h$(e){return Math.random()*(e||1)}function Ng(e){return rd(e+1)}function p$(e){return isFinite(e)&&e===Math.round(e)}var m$=4.7421875,td=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function rd(e){var t,r;if(p$(e)){if(e<=0)return isFinite(e)?1/0:NaN;if(e>171)return 1/0;for(var n=e-2,i=e-1;n>1;)i*=n,n--;return i===0&&(i=1),i}if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*rd(1-e));if(e>=171.35)return 1/0;if(e>85){var s=e*e,a=s*e,o=a*e,l=o*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*s)-139/(51840*a)-571/(2488320*o)+163879/(209018880*l)+5246819/(75246796800*l*e))}--e,r=td[0];for(var c=1;c<td.length;++c)r+=td[c]/(e+c);return t=e+m$+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function v$(e){return Array.isArray(e)?e.length:String(e).length}function Rg(){for(var e=0,t=0,r=0;r<arguments.length;r++){var n=Math.abs(arguments[r]),i;t<n?(i=t/n,e=e*i*i+1,t=n):n>0?(i=n/t,e+=i*i):e+=n}return t===1/0?1/0:t*Math.sqrt(e)}function Lg(e,t,r){return e?t:r}function g$(e,t){return typeof t>"u"||+t==0?Math.round(e):(e=+e,t=-+t,isNaN(e)||!(typeof t=="number"&&t%1===0)?NaN:(e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=e.toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}function y$(e,t,r){return r&&(r[e]=t),t}function b$(e,t){return e[t|0]}function _$(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function w$(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function k$(e,t){if(typeof e!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(t))throw new Error("Second argument to map is not an array");return t.map(function(r,n){return e(r,n)})}function S$(e,t,r){if(typeof e!="function")throw new Error("First argument to fold is not a function");if(!Array.isArray(r))throw new Error("Second argument to fold is not an array");return r.reduce(function(n,i,s){return e(n,i,s)},t)}function E$(e,t){if(typeof e!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(t))throw new Error("Second argument to filter is not an array");return t.filter(function(r,n){return e(r,n)})}function x$(e,t){if(!(Array.isArray(t)||typeof t=="string"))throw new Error("Second argument to indexOf is not a string or array");return t.indexOf(e)}function T$(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function A$(e){return(e>0)-(e<0)||+e}var zg=1/3;function C$(e){return e<0?-Math.pow(-e,zg):Math.pow(e,zg)}function O$(e){return Math.exp(e)-1}function D$(e){return Math.log(1+e)}function I$(e){return Math.log(e)/Math.LN2}function pi(e){this.options=e||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||i$,cosh:Math.cosh||s$,tanh:Math.tanh||a$,asinh:Math.asinh||o$,acosh:Math.acosh||l$,atanh:Math.atanh||u$,sqrt:Math.sqrt,cbrt:Math.cbrt||C$,log:Math.log,log2:Math.log2||I$,ln:Math.log,lg:Math.log10||Fg,log10:Math.log10||Fg,expm1:Math.expm1||O$,log1p:Math.log1p||D$,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||f$,"-":c$,"+":Number,exp:Math.exp,not:d$,length:v$,"!":Ng,sign:Math.sign||A$},this.binaryOps={"+":VM,"-":jM,"*":ZM,"/":WM,"%":HM,"^":Math.pow,"||":GM,"==":KM,"!=":YM,">":JM,"<":QM,">=":XM,"<=":e$,and:t$,or:r$,in:n$,"=":y$,"[":b$},this.ternaryOps={"?":Lg},this.functions={random:h$,fac:Ng,min:w$,max:_$,hypot:Math.hypot||Rg,pyt:Math.hypot||Rg,pow:Math.pow,atan2:Math.atan2,if:Lg,gamma:rd,roundTo:g$,map:k$,fold:S$,filter:E$,indexOf:x$,join:T$},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}pi.prototype.parse=function(e){var t=[],r=new Ye(this,new it(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(fa,"EOF"),new Dr(t,this)},pi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var qg=new pi;pi.parse=function(e){return qg.parse(e)},pi.evaluate=function(e,t){return qg.parse(e).evaluate(t)};var Ug={"+":"add","-":"subtract","*":"multiply","/":"divide","%":"remainder","^":"power","!":"factorial","<":"comparison",">":"comparison","<=":"comparison",">=":"comparison","==":"comparison","!=":"comparison","||":"concatenate",and:"logical",or:"logical",not:"logical","?":"conditional",":":"conditional","=":"assignment","[":"array","()=":"fndef"};function P$(e){return Ug.hasOwnProperty(e)?Ug[e]:e}pi.prototype.isOperatorEnabled=function(e){var t=P$(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var M$=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,$$=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,F$=/(__optional\("[^"]+"\))\.length\b/g,N$=new pi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),Bg=new Map;function R$(e){return e.replace(M$,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace($$,(t,r)=>`__length(${r})`).replace(F$,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function L$(e){const t=Bg.get(e);if(t)return t;const r=N$.parse(R$(e));return Bg.set(e,r),r}function z$(e,t){if(e==null||typeof e!="string")return e;const r={data:t,undefined:void 0,null:null};r.__optional=n=>n.split(".").reduce((i,s)=>{if(i!=null)return i[s]},r),r.__length=n=>{if(n!=null){if(typeof n=="string"||Array.isArray(n))return n.length;if(typeof n=="object"&&"length"in n){const i=n.length;return typeof i=="number"?i:void 0}}};try{const n=L$(e);for(const i of n.symbols()){if(r[i]!==void 0)continue;const s=globalThis[i];typeof s=="function"&&(r[i]=s)}return n.evaluate(r)}catch(n){console.error(`Error while evaluating when (${e}) in go-if: ${n.message}`)}}var Vg=["ticket:timeslot","ticket:day","ticket:annual","event:admission","event:admission:day","event:admission:timeslot","event:price","events:admission","events:admission:day","events:admission:timeslot","events:price","coupon"],q$=7200*1e3;async function vn(e,t){if(!e.withContent)return;const r=t.map(n=>n.id).filter(n=>typeof n=="number");if(r.length)try{const n=await A.asyncFetch(()=>A.ticketsContent(r))??[],i=new Map(n.map(s=>[s.id,s.content]));for(const s of t){if(typeof s.id!="number")continue;const a=i.get(s.id);a&&(s.content=a)}}catch{}}function Qo(e,t){A.capacityManager.addQuotas(t),e.timeslotTicketIds=[...e.timeslotTicketIds,...Object.values(t).flatMap(r=>r.ticket_ids)]}function Xo(e,t,r){const n=Date.parse(r);return e.filter(i=>{const s=i.start_time.slice(0,10),a=Date.parse(i.start_time);return s===t&&a>=n&&a<=n+q$&&(i.seats?.available??0)>0})}async function el(e){if(!e?.selectedDate)return;const{quotas:t}=await A.asyncFetch(()=>A.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),"by_ticket_types[]":["time_slot"],"by_museum_ids[]":e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds}));Qo(e,t)}var U$={name:"ticket:timeslot",calendarEndpoint:"tickets",apiToken:"time_slot",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.selectedDate)return;const{quotas:t}=await A.asyncFetch(()=>A.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds}));Qo(e,t)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTimeslot)return;const{tickets:r,quotas:n}=await A.asyncFetch(()=>A.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));A.capacityManager.addQuotas(n);const i=Zs(Ws(r,t.selectedTime),t.selectedTime);await vn(e,i);for(const s of i)e.preCart.addItem(ot(s,{time:t.selectedTime}))}},B$={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate)return;const{tickets:r,quotas:n}=await A.asyncFetch(()=>A.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),"by_ticket_types[]":["normal"],"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));A.capacityManager.addQuotas(n);const i=$u(r);await vn(e,i);for(const s of i)e.preCart.addItem(ot(s,{time:s.selectedTime}))}},V$={name:"ticket:annual",calendarEndpoint:null,apiToken:"annual",requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t)return;const r=await A.asyncFetch(()=>A.tickets({by_bookable:!0,"by_ticket_types[]":["annual"],"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds})),n=Object.values(r).map(i=>js(i));await vn(e,n);for(const i of n)e.preCart.addItem(ot(i))}},j$={name:"event:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.eventIds?.length||!e.selectedDate)return;const t=await A.asyncFetch(()=>A.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await A.asyncFetch(()=>A.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_bookable:!0,valid_at:e.selectedDate.toString()}));Qo(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await A.asyncFetch(()=>A.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await A.asyncFetch(()=>A.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_bookable:!0,valid_at:t.selectedDate.toString()}));A.capacityManager.addQuotas(i);const s=Zs(Ws(n,t.selectedTime),t.selectedTime);await vn(e,s);for(const a of s)e.preCart.addItem(ot(a,{time:t.selectedTime}))}},Z$={name:"event:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await A.asyncFetch(()=>A.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await A.asyncFetch(()=>A.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:t.selectedDate.toString()}));A.capacityManager.addQuotas(i);const s=$u(n);await vn(e,s);for(const a of s)e.preCart.addItem(ot(a,{time:a.selectedTime}))}},W$={name:"event:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.eventIds?.length||!e.selectedDate)return;const t=await A.asyncFetch(()=>A.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await A.asyncFetch(()=>A.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:e.selectedDate.toString()}));Qo(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate||!t.selectedTimeslot)return;const r=await A.asyncFetch(()=>A.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await A.asyncFetch(()=>A.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:t.selectedDate.toString()}));A.capacityManager.addQuotas(i);const s=Zs(Ws(n,t.selectedTime),t.selectedTime);await vn(e,s);for(const a of s)e.preCart.addItem(ot(a,{time:t.selectedTime}))}},H$={name:"event:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"segment",field:"dateId"}],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.eventIds?.length,loadTimeslots:async()=>{},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||e.dateId===void 0)return;const r=await A.asyncFetch(()=>A.getEventDetailsOnDate(t.eventIds[0],e.dateId));if(r.prices?.length){for(const n of r.prices){const i=Nu(n,r.id,{event_title:r.event_title});e.preCart.addItem(ot(i,{time:r.start_time}))}r.seats&&A.capacityManager.addSeats(r.id,r.seats)}}},G$={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>el(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Xo(await A.asyncFetch(()=>A.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await A.asyncFetch(()=>A.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:a}=await A.asyncFetch(()=>A.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_bookable:!0,valid_at:n.start_time.slice(0,10)}));A.capacityManager.addQuotas(a);const o=Zs(Ws(s,n.start_time),n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(ot(l,{time:n.start_time}))}}},K$={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>el(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Xo(await A.asyncFetch(()=>A.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await A.asyncFetch(()=>A.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:a}=await A.asyncFetch(()=>A.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:n.start_time.slice(0,10)}));A.capacityManager.addQuotas(a);const o=$u(s,n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(ot(l,{time:l.selectedTime}))}}},Y$={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>el(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Xo(await A.asyncFetch(()=>A.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await A.asyncFetch(()=>A.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:a}=await A.asyncFetch(()=>A.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:n.start_time.slice(0,10)}));A.capacityManager.addQuotas(a);const o=Zs(Ws(s,n.start_time),n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(ot(l,{time:n.start_time}))}}},J$={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>el(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Xo(await A.asyncFetch(()=>A.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime),n=e.query;for(const i of r){if(!i.prices?.length)continue;const s=n?i.prices.filter(a=>a.title?.includes(n)):i.prices;for(const a of s){const o=Nu(a,i.id,{event_title:i.event_title});e.preCart.addItem(ot(o,{time:i.start_time}))}i.seats&&A.capacityManager.addSeats(i.id,i.seats)}}},Q$={name:"coupon",calendarEndpoint:null,requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,loadTimeslots:async()=>{},async loadProducts(e){const t=await A.asyncFetch(()=>A.getCoupons());for(const r of t??[])e.preCart.addItem(ot(Ep(r)))}},X$={"ticket:timeslot":U$,"ticket:day":B$,"ticket:annual":V$,"event:admission":j$,"event:admission:day":Z$,"event:admission:timeslot":W$,"event:price":H$,"events:admission":G$,"events:admission:day":K$,"events:admission:timeslot":Y$,"events:price":J$,coupon:Q$};function mi(e){const t=X$[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${Vg.join(", ")}`),t}var jg=Vg,e2=0,t2=class{uid=e2++;#e=ae();get filters(){return d(this.#e)}set filters(e){$(this.#e,e,!0)}#t=ae();get eventIds(){return d(this.#t)}set eventIds(e){$(this.#t,e,!0)}#r=ae();get museumIds(){return d(this.#r)}set museumIds(e){$(this.#r,e,!0)}#n=ae();get exhibitionIds(){return d(this.#n)}set exhibitionIds(e){$(this.#n,e,!0)}#i=ae();get ticketIds(){return d(this.#i)}set ticketIds(e){$(this.#i,e,!0)}#s=ae();get ticketGroupIds(){return d(this.#s)}set ticketGroupIds(e){$(this.#s,e,!0)}#o=ae();get selectedDate(){return d(this.#o)}set selectedDate(e){$(this.#o,e,!0)}#a=ae();get selectedTimeslot(){return d(this.#a)}set selectedTimeslot(e){$(this.#a,e,!0)}timeslotTicketIds=[];#l=D(()=>this.selectedTimeslot);get selectedTime(){return d(this.#l)}set selectedTime(e){$(this.#l,e)}#u=ae(Me([]));get ticketSegments(){return d(this.#u)}set ticketSegments(e){$(this.#u,e,!0)}#c=D(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return d(this.#c)}set preCarts(e){$(this.#c,e)}#d=ae();get timeslotDetails(){return d(this.#d)}set timeslotDetails(e){$(this.#d,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>mi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>mi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>mi(e).isTicketsVisible(this))}},Zg="go-ticket-selection",r2=Ni(Zg),gn=Ri(Zg);function n2(e,t){ne(t,!0);let r=_(t,"when",7),n=_(t,"then",7,"show");const i=gn(t.$$host),s=D(()=>i.value),a=Px(t.$$host),o=D(()=>a.value),l=Li(t.$$host),c=D(()=>l.value),f=zi(t.$$host),u=D(()=>f.value),p=A.auth;let h=D(()=>({ticketSelection:d(s),personalizationDetails:d(o),formData:d(c)?.formData,cart:A.cart,cartView:d(u),auth:{isAuthenticated:p.isAuthenticated(),isLoggedIn:p.isLoggedIn(),isGuest:p.isGuest()}}));const g=k=>{$(h,k)},v=()=>d(h);let m=D(()=>z$(r(),d(h))),y=null;ve(()=>{const k=t.$$host;if(d(m)&&n()==="show")y&&(k.appendChild(y),y=null);else if(!y&&k.childNodes.length>0)for(y=document.createDocumentFragment();k.firstChild;)y.appendChild(k.firstChild)});var S={_setData:g,_getData:v,get when(){return r()},set when(k){r(k),b()},get then(){return n()},set then(k="show"){n(k),b()}};return ie(S)}customElements.define("go-if",se(n2,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function Wg(e,t){ne(t,!0);let r=_(t,"apiUrl",7),n=_(t,"shopDomain",7),i=_(t,"locale",7);return i(i()||localStorage.getItem("lang")||"en"),ve(()=>{(n()!==A.shopDomain||r()!==A.apiUrl||i()!==A.locale)&&(A.load(r(),n(),i()),console.warn("shop loaded due to prop change"))}),ie({get apiUrl(){return r()},set apiUrl(s){r(s),b()},get shopDomain(){return n()},set shopDomain(s){n(s),b()},get locale(){return i()},set locale(s){i(s),b()}})}customElements.define("gomus-init",se(Wg,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function i2(e,t){ne(t,!0);let r=_(t,"apiDomain",7),n=_(t,"shopDomain",7),i=_(t,"locale",7),s=`https://${r()}`;var a={get apiDomain(){return r()},set apiDomain(o){r(o),b()},get shopDomain(){return n()},set shopDomain(o){n(o),b()},get locale(){return i()},set locale(o){i(o),b()}};return Wg(e,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),ie(a)}customElements.define("go-init",se(i2,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function s2(e,t){ne(t,!0);const r=_(t,"to",7),n=D(()=>Xe.config.urls[r()]),i=Hr(t.$$host,"a");return ve(()=>{if(!d(n)){console.warn(`[go-link] No URL found for route "${r()}".`),i.removeAttribute("href");return}i.setAttribute("href",d(n)())}),i.addEventListener("click",s=>{if(s.preventDefault(),!Xe.config.urls[r()]){console.warn(`[go-link] No URL found for route "${r()}". You can define it with go.config.urls.${r()} = () => 'https://example.com/my-route'`);return}Xe.config.navigateTo(Xe.config.urls[r()]())}),ie({get to(){return r()},set to(s){r(s),b()}})}customElements.define("go-link",se(s2,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));function a2(e,t){ne(t,!0);let r=_(t,"custom",7,!1);Pt.defineForm({id:"membershipActivation",submitLabel:"membership.activation.actions.submit",fields:[{key:"email",required:!0}]});async function n(i){const s=i.target.details;(await A.activateMembership(s.formData)).response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=[A.t("membership.activation.form.errors.requestFailed")]}return Hr(t.$$host,"go-form",{"form-id":"membershipActivation",custom:r()}),t.$$host.addEventListener("submit",n),ie({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-membership-activation",se(a2,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));var o2=class{#e=ae();get token(){return d(this.#e)}set token(e){$(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return ml(A.order(this.token))}downloadLink(e,t){if(this.order?.is_valid)switch(e.type){case"Event":return`${A.apiUrl}/api/v4/orders/${this.order.id}/events/${e.attributes.id}.pdf?locale=${A.locale}&token=${this.token}`;case"Ticket":return e.attributes.ticket_type==="annual"&&!e.attributes.is_voucher?Xe.config.urls.annualTicketPersonalizationList?.()?Xe.config.urls.annualTicketPersonalizationList(this.token):A.urls?.annualTicketPersonalizationList(this.token):`${A.apiUrl}/api/v4/orders/${this.order.id}/tickets/${e.attributes.id}.pdf?locale=${A.locale}&token=${this.token}&barcode_id=${t}`;default:break}}},Hg="go-order-details",l2=Ni(Hg),Gg=Ri(Hg);function u2(e,t){ne(t,!0);let r=_(t,"token",7);const n=new o2(r());l2(t.$$host,n),ve(()=>{n.token=r(),Re(()=>{A.cart.clearItems(),A.auth.isGuest()&&A.auth.signOut()})});var i={orderDetails:n,get token(){return r()},set token(s){r(s),b()}};return ie(i)}customElements.define("go-order",se(u2,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var c2=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),d2=B('<br/> <span class="go-order-item-quantities"> </span>',1),f2=B('<a aria-label="iCal link"> </a>'),h2=B('<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>');function Kg(e,t){ne(t,!0);let r=_(t,"item",7),n=_(t,"orderDetails",7);var i={get item(){return r()},set item(T){r(T),b()},get orderDetails(){return n()},set orderDetails(T){n(T),b()}},s=h2(),a=M(s),o=M(a),l=V(M(o),2),c=M(l),f=M(c,!0);I(c);var u=V(c,2),p=T=>{var O=c2(),F=U(O),R=M(F,!0);I(F);var Y=V(F,2),N=M(Y,!0);I(Y),J((X,q)=>{H(R,X),H(N,q)},[()=>ei(r().attributes.start_time,{month:"numeric",day:"numeric"},A.locale),()=>$n(r().attributes.start_time)]),x(T,O)};ue(u,T=>{r().attributes.start_time&&T(p)});var h=V(u,2);Ne(h,17,()=>r().attributes.quantities,T=>T.id,(T,O)=>{var F=d2(),R=V(U(F),2),Y=M(R);I(R),J(()=>H(Y,`${d(O).quantity??""} x ${d(O).title??""}`)),x(T,F)});var g=V(h,2),v=M(g,!0);I(g),I(l);var m=V(l,2),y=M(m,!0);I(m);var S=V(m,4),k=M(S),E=T=>{var O=f2(),F=M(O,!0);I(O),J(R=>{me(O,"href",A.apiUrl+r().attributes.ical_url),H(F,R)},[()=>A.t("common.calendar")]),x(T,O)};return ue(k,T=>{r().attributes.ical_url&&T(E)}),I(S),I(o),I(a),I(s),J((T,O,F)=>{H(f,r().attributes.title),me(g,"href",T),H(v,O),H(y,F)},[()=>n().downloadLink(r()),()=>A.t("common.download"),()=>yt(r().price_cents)]),x(e,s),ie(i)}se(Kg,{item:{},orderDetails:{}},[],[],{mode:"open"});var Yg=B('<span class="go-order-item-subtitle" data-testid="order-item-subtitle"> </span>'),p2=B('<br/> <span class="go-order-item-quantities" data-testid="order-sub-ticket"> </span>',1),m2=B('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),v2=B('<span class="go-cart-item-date"> </span>'),g2=B('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),y2=B('<br/> <a class="go-ticket-personalization"> </a>',1),b2=B('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),_2=B('<a aria-label="iCal link"> </a>'),w2=B('<li><article><ul><li class="go-order-breakdown-count"></li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"><!></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>'),k2=B('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),S2=B('<a class="go-ticket-personalization"> </a>'),E2=B('<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>');function Jg(e,t){ne(t,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${A.locale}.svg`;let n=_(t,"item",7),i=_(t,"orderDetails",7);const s=D(()=>(n().attributes.sub_ticket_sales??[]).filter(u=>u.quantity>0));var a={get item(){return n()},set item(u){n(u),b()},get orderDetails(){return i()},set orderDetails(u){i(u),b()}},o=re(),l=U(o),c=u=>{var p=re(),h=U(p);Ne(h,17,()=>({length:n().attributes.quantity}),sn,(g,v,m)=>{var y=w2(),S=M(y),k=M(S),E=M(k);E.textContent="1";var T=V(E,2),O=M(T),F=M(O,!0);I(O);var R=V(O,2),Y=Q=>{var P=Yg(),te=M(P,!0);I(P),J(()=>H(te,n().attributes.sub_title)),x(Q,P)};ue(R,Q=>{n().attributes.sub_title&&Q(Y)});var N=V(R,2);Ne(N,17,()=>d(s),Q=>Q.id,(Q,P)=>{var te=p2(),L=V(U(te),2),be=M(L);I(L),J(()=>H(be,`${d(P).quantity??""} x ${d(P).title??""}`)),x(Q,te)});var X=V(N,2),q=Q=>{const P=D(()=>n().attributes.barcodes[m]?.id);var te=g2(),L=U(te),be=we=>{var De=m2(),Le=U(De),je=M(Le,!0);I(Le);var bt=V(Le,2),st=M(bt,!0);I(bt),J((Nt,_t)=>{H(je,Nt),H(st,_t)},[()=>ei(n().attributes.start_time,{month:"numeric",day:"numeric"},A.locale),()=>$n(n().attributes.start_time)]),x(we,De)},Z=we=>{var De=v2(),Le=M(De,!0);I(De),J(je=>H(Le,je),[()=>ei(n().attributes.start_time,{month:"numeric",day:"numeric"},A.locale)]),x(we,De)};ue(L,we=>{n().attributes.ticket_type==="time_slot"?we(be):n().attributes.ticket_type==="normal"&&we(Z,1)});var w=V(L,4),_e=M(w,!0);I(w),J((we,De)=>{me(w,"href",we),H(_e,De)},[()=>i().downloadLink(n(),d(P)),()=>A.t("common.download")]),x(Q,te)},le=Q=>{var P=y2(),te=V(U(P),2),L=M(te,!0);I(te),J((be,Z)=>{me(te,"href",be),H(L,Z)},[()=>i().downloadLink(n()),()=>A.t("common.personalize")]),x(Q,P)};ue(X,Q=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?Q(q):Q(le,-1)}),I(T);var he=V(T,2),j=M(he,!0);I(he);var oe=V(he,2),ee=M(oe),fe=Q=>{var P=b2(),te=M(P);I(P),J(()=>{me(P,"href",A.apiUrl+n().attributes.barcodes[m]?.passbook_url),me(te,"src",r)}),x(Q,P)};ue(ee,Q=>{n().attributes.barcodes[m]&&n().attributes.barcodes[m]?.passbook_url&&Q(fe)}),I(oe);var ce=V(oe,2),de=M(ce),G=Q=>{var P=_2(),te=M(P,!0);I(P),J(L=>{me(P,"href",A.apiUrl+n().attributes.ical_url),H(te,L)},[()=>A.t("common.calendar")]),x(Q,P)};ue(de,Q=>{n().attributes.ical_url&&Q(G)}),I(ce),I(k),I(S),I(y),J(Q=>{H(F,n().attributes.title),H(j,Q)},[()=>yt(n().price_cents)]),x(g,y)}),x(u,p)},f=u=>{var p=E2(),h=M(p),g=M(h),v=M(g),m=M(v,!0);I(v);var y=V(v,2),S=M(y),k=M(S,!0);I(S);var E=V(S,2),T=X=>{var q=Yg(),le=M(q,!0);I(q),J(()=>H(le,n().attributes.sub_title)),x(X,q)};ue(E,X=>{n().attributes.sub_title&&X(T)});var O=V(E,2),F=X=>{var q=k2(),le=M(q,!0);I(q),J((he,j)=>{me(q,"href",he),H(le,j)},[()=>i().downloadLink(n()),()=>A.t("common.download")]),x(X,q)},R=X=>{var q=S2(),le=M(q,!0);I(q),J((he,j)=>{me(q,"href",he),H(le,j)},[()=>i().downloadLink(n()),()=>A.t("common.personalize")]),x(X,q)};ue(O,X=>{n().attributes.is_voucher?X(F):X(R,-1)}),I(y);var Y=V(y,2),N=M(Y,!0);I(Y),Ot(2),I(g),I(h),I(p),J(X=>{H(m,n().attributes.quantity),H(k,n().attributes.title),H(N,X)},[()=>yt(n().price_cents)]),x(u,p)};return ue(l,u=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?u(c):u(f,-1)}),x(e,o),ie(a)}se(Jg,{item:{},orderDetails:{}},[],[],{mode:"open"});var x2=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),T2=B('<br/> <span class="go-order-item-quantities"> </span>',1),A2=B('<a aria-label="iCal link"> </a>'),C2=B('<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <span class="go-order-item-participants" data-testid="order-item-participants"> </span> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>');function Qg(e,t){ne(t,!0);let r=_(t,"item",7);const n=D(()=>(r().attributes.prices??[]).filter(T=>T.title&&T.quantity!=null));var i={get item(){return r()},set item(T){r(T),b()}},s=C2(),a=M(s),o=M(a),l=V(M(o),2),c=M(l),f=M(c,!0);I(c);var u=V(c,2),p=M(u,!0);I(u);var h=V(u,2),g=T=>{var O=x2(),F=U(O),R=M(F,!0);I(F);var Y=V(F,2),N=M(Y,!0);I(Y),J((X,q)=>{H(R,X),H(N,q)},[()=>ei(r().attributes.start_time,{month:"numeric",day:"numeric"},A.locale),()=>$n(r().attributes.start_time)]),x(T,O)};ue(h,T=>{r().attributes.start_time&&T(g)});var v=V(h,2);Ne(v,17,()=>d(n),T=>T.title,(T,O)=>{var F=T2(),R=V(U(F),2),Y=M(R);I(R),J(()=>H(Y,`${d(O).quantity??""} x ${d(O).title??""}`)),x(T,F)}),I(l);var m=V(l,2),y=M(m,!0);I(m);var S=V(m,4),k=M(S),E=T=>{var O=A2(),F=M(O,!0);I(O),J(R=>{me(O,"href",A.apiUrl+r().attributes.ical_url),H(F,R)},[()=>A.t("common.calendar")]),x(T,O)};return ue(k,T=>{r().attributes.ical_url&&T(E)}),I(S),I(o),I(a),I(s),J((T,O)=>{H(f,r().attributes.title),H(p,T),H(y,O)},[()=>A.t("cart.item.participants",{count:r().attributes.participants}),()=>yt(r().price_cents)]),x(e,s),ie(i)}se(Qg,{item:{}},[],[],{mode:"open"});var O2=B('<ol><li class="data-go-order-breakdown-header"><ul><li class="go-order-breakdown-header-count"> </li> <li class="go-order-breakdown-header-product"> </li> <li class="go-order-breakdown-header-price"> </li> <li class="go-order-breakdown-header-passbook"></li></ul></li> <!> <li class="go-order-breakdown-footer"><ul><li class="go-cart-footer-title"></li> <li class="go-cart-footer-count"></li> <li class="go-cart-footer-price"> </li> <li class="go-cart-footer-passbook"></li></ul></li></ol>');function D2(e,t){ne(t,!0);const r=Gg(t.$$host),n=D(()=>r.value);let i=D(()=>d(n)?.order);var s=re(),a=U(s),o=l=>{var c=O2(),f=M(c),u=M(f),p=M(u),h=M(p,!0);I(p);var g=V(p,2),v=M(g,!0);I(g);var m=V(g,2),y=M(m,!0);I(m),Ot(2),I(u),I(f);var S=V(f,2);Ne(S,17,()=>d(i).items,F=>F.id,(F,R)=>{var Y=re(),N=U(Y),X=he=>{Jg(he,{get item(){return d(R)},get orderDetails(){return d(n)}})},q=he=>{Kg(he,{get item(){return d(R)},get orderDetails(){return d(n)}})},le=he=>{Qg(he,{get item(){return d(R)}})};ue(N,he=>{d(R).type==="Ticket"?he(X):d(R).type==="Event"?he(q,1):d(R).type==="Tour"&&he(le,2)}),x(F,Y)});var k=V(S,2),E=M(k),T=V(M(E),4),O=M(T,!0);I(T),Ot(2),I(E),I(k),I(c),J((F,R,Y,N)=>{H(h,F),H(v,R),H(y,Y),H(O,N)},[()=>A.t("common.table.count"),()=>A.t("common.table.product"),()=>A.t("common.table.price"),()=>A.t("common.table.total",{value:yt(d(i).total_price_cents)})]),x(l,c)};ue(a,l=>{d(i)&&d(n)&&l(o)}),x(e,s),ie()}customElements.define("go-order-breakdown",se(D2,{},[],[]));function I2(e,t){ne(t,!0);const r=Gg(t.$$host),n=D(()=>r.value);let i=D(()=>d(n)?.order);Ot();var s=Bt();J(()=>H(s,d(i)?.id)),x(e,s),ie()}customElements.define("go-order-invoice-id",se(I2,{},[],[]));var P2=B("<go-form></go-form>",2);function M2(e,t){ne(t,!1),Pt.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const s=i.target.details,a=await A.updatePassword(s.formData);a.data?(s.successMessage=A.t("user.passwordSuccess.desc.title"),s.apiErrors=[]):s.apiErrors=a.error?.errors||a.error||a.errors}Xl();var n=P2();Tn(n,"formId","passwordResetForm"),As("submit",n,r),x(e,n),ie()}customElements.define("go-profile-password",se(M2,{},[],[]));var $2=B("<go-form></go-form>",2);function F2(e,t){ne(t,!0),Pt.defineForm({id:"accountDetailsForm",fields:[{key:"salutation",required:!1},{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"language",required:!0}]});let r=ae(void 0);const n=D(()=>A.getCustomer()),i=D(()=>d(n)&&"data"in d(n)?d(n).data:void 0);En(async()=>{await A.waitForAllFetches(),await eu(()=>d(r).details),await eu(()=>d(i)),d(r).details.fill(d(i))});var s=$2();Tn(s,"formId","accountDetailsForm"),Ql(s,a=>$(r,a),()=>d(r)),x(e,s),ie()}customElements.define("go-profile-details",se(F2,{},[],[]));var N2=B('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function R2(e,t){ne(t,!0);const r=D(()=>A.getCustomer()),n=D(()=>d(r)&&"data"in d(r)?d(r).data:void 0);var i=re(),s=U(i),a=l=>{var c=N2(),f=U(c),u=M(f);I(f);var p=V(f,2),h=M(p,!0);I(p),J(()=>{H(u,`${d(n).name??""}
85
- ${d(n).surname??""}`),H(h,d(n).email)}),x(l,c)},o=l=>{var c=Bt();J(f=>H(c,f),[()=>A.t("user.login.desc.text")]),x(l,c)};ue(s,l=>{d(n)?l(a):l(o,-1)}),x(e,i),ie()}customElements.define("go-profile-overview",se(R2,{},[],[]));function L2(e,t){ne(t,!0);function r(h){if(!h)return;const g=[];for(const v of h.split(",")){const m=v.trim();m&&(jg.includes(m)?g.push(m):console.warn(`[go-ticket-selection] Unknown filter "${m}". Valid filters: ${jg.join(", ")}`))}return g.length?g:void 0}let n=_(t,"filters",7),i=_(t,"eventIds",7),s=_(t,"museumIds",7),a=_(t,"exhibitionIds",7),o=_(t,"selectedDate",7),l=_(t,"selectedTimeslot",7),c=_(t,"ticketIds",7),f=_(t,"ticketGroupIds",7);const u=new t2;ve(()=>{t.$$host.hasAttribute("mode")&&console.warn('[go-ticket-selection] `mode` attribute is deprecated and ignored. Use `filters` instead, e.g. filters="ticket:timeslot".')}),ve(()=>{u.filters=r(n()),u.eventIds=on(i()),u.museumIds=on(s()),u.exhibitionIds=on(a()),u.ticketIds=on(c()),u.ticketGroupIds=on(f()),u.selectedTimeslot=l(),o()&&(u.selectedDate=lo(o()))}),ve(()=>{u.selectedDate&&Re(()=>{o(u.selectedDate.toString())})}),ve(()=>{u.selectedTimeslot,Re(()=>{l(u.selectedTimeslot)})}),r2(t.$$host,u);var p={details:u,get filters(){return n()},set filters(h){n(h),b()},get eventIds(){return i()},set eventIds(h){i(h),b()},get museumIds(){return s()},set museumIds(h){s(h),b()},get exhibitionIds(){return a()},set exhibitionIds(h){a(h),b()},get selectedDate(){return o()},set selectedDate(h){o(h),b()},get selectedTimeslot(){return l()},set selectedTimeslot(h){l(h),b()},get ticketIds(){return c()},set ticketIds(h){c(h),b()},get ticketGroupIds(){return f()},set ticketGroupIds(h){f(h),b()}};return ie(p)}customElements.define("go-ticket-selection",se(L2,{filters:{attribute:"filters",reflect:!0,type:"String"},eventIds:{attribute:"event-ids",reflect:!0,type:"String"},ticketIds:{attribute:"ticket-ids",reflect:!0,type:"String"},ticketGroupIds:{attribute:"ticket-group-ids",reflect:!0,type:"String"},museumIds:{attribute:"museum-ids",reflect:!0,type:"String"},exhibitionIds:{attribute:"exhibition-ids",reflect:!0,type:"String"},selectedDate:{attribute:"selected-date",reflect:!0,type:"String"},selectedTimeslot:{attribute:"selected-timeslot",reflect:!0,type:"String"}},[],["details"]));function z2(e,t){ne(t,!0);const r=gn(t.$$host),n=D(()=>r.value);ve(()=>{t.$$host.style.display=d(n)?.isTicketsVisible?"block":"none",t.$$host.classList.toggle("is-hidden",!d(n)?.isTicketsVisible),t.$$host.classList.toggle("is-visible",d(n)?.isTicketsVisible)}),ie()}customElements.define("go-tickets",se(z2,{},[],[]));function q2(e,t){ne(t,!0);const r=gn(t.$$host),n=D(()=>r.value),i=D(()=>qr(d(n)?.preCarts||[],a=>a.items.length)),s=D(()=>!d(n)?.isTicketsVisible||d(n)?.isTicketsVisible&&d(i)===0);ve(()=>{t.$$host.style.display=d(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!d(s)),t.$$host.classList.toggle("is-visible",d(s))}),ie()}customElements.define("go-tickets-empty",se(q2,{},[],[]));function U2(e,t){ne(t,!0);const r=gn(t.$$host),n=D(()=>r.value);let i=D(()=>qr(d(n)?.preCarts||[],a=>a.totalPriceCents));Ot();var s=Bt();J(a=>H(s,a),[()=>yt(d(i))]),x(e,s),ie()}customElements.define("go-tickets-sum",se(U2,{},[],[]));var B2=class{#e;get ticketSelectionDetails(){return d(this.#e)}set ticketSelectionDetails(e){$(this.#e,e)}#t=ae(Me($i()));get preCart(){return d(this.#t)}set preCart(e){$(this.#t,e,!0)}#r=ae();get filters(){return d(this.#r)}set filters(e){$(this.#r,e,!0)}#n=ae();get dateId(){return d(this.#n)}set dateId(e){$(this.#n,e,!0)}#i=ae();get limit(){return d(this.#i)}set limit(e){$(this.#i,e,!0)}#s=ae();get query(){return d(this.#s)}set query(e){$(this.#s,e,!0)}#o=ae(Me([]));get ticketGroupIds(){return d(this.#o)}set ticketGroupIds(e){$(this.#o,e,!0)}#a=ae(Me([]));get languageIds(){return d(this.#a)}set languageIds(e){$(this.#a,e,!0)}#l=ae(Me([]));get catchWordIds(){return d(this.#l)}set catchWordIds(e){$(this.#l,e,!0)}#u=ae(Me([]));get museumIds(){return d(this.#u)}set museumIds(e){$(this.#u,e,!0)}#c=ae(!1);get withContent(){return d(this.#c)}set withContent(e){$(this.#c,e,!0)}constructor(e,t){this.filters=e===void 0?void 0:Array.isArray(e)?e:[e],this.#e=D(()=>t.value)}get effectiveFilters(){return this.filters?.length?this.filters:this.ticketSelectionDetails?.filters??[]}clear(){this.preCart=$i([])}toString(){return JSON.stringify({filters:this.effectiveFilters,preCart:this.preCart.toString()})}async loadTickets(){this.preCart=$i();const e=this.effectiveFilters.filter(t=>t!=="custom");await Promise.all(e.map(t=>mi(t).loadProducts(this)))}},Xg="go-ticket-segment",V2=Ni(Xg),nd=Ri(Xg);function j2(e,t){ne(t,!0);const r=_(t,"filters",7),n=_(t,"dateId",7),i=_(t,"query",7),s=_(t,"limit",7),a=_(t,"ticketGroupIds",7),o=_(t,"languageIds",7),l=_(t,"catchWordIds",7),c=_(t,"museumIds",7),f=_(t,"withContent",7);function u(y){if(!y)return;const S=y.split(",").map(k=>k.trim()).filter(Boolean);return S.length?S:void 0}const p=gn(t.$$host),h=p.value,g=new B2(u(r()),p);V2(t.$$host,g),ve(()=>{g.filters=u(r()),g.dateId=n(),g.query=i(),g.limit=s(),g.ticketGroupIds=on(a()),g.languageIds=on(o()),g.catchWordIds=on(l()),g.museumIds=on(c()),g.withContent=!!f()}),ve(()=>{g.dateId,g.filters,g.ticketGroupIds,g.museumIds,g.languageIds,g.catchWordIds,g.query,g.limit,g.withContent,h?.filters,h?.selectedTimeslot,h?.selectedTime,h?.selectedDate,h?.museumIds,Re(()=>{g.loadTickets()})}),ve(()=>{h&&Re(()=>h?.addTicketSegment(g))});const v=D(()=>g.preCart.items.length);ve(()=>{t.$$host.classList.toggle("is-empty",d(v)===0)});var m={details:g,get filters(){return r()},set filters(y){r(y),b()},get dateId(){return n()},set dateId(y){n(y),b()},get query(){return i()},set query(y){i(y),b()},get limit(){return s()},set limit(y){s(y),b()},get ticketGroupIds(){return a()},set ticketGroupIds(y){a(y),b()},get languageIds(){return o()},set languageIds(y){o(y),b()},get catchWordIds(){return l()},set catchWordIds(y){l(y),b()},get museumIds(){return c()},set museumIds(y){c(y),b()},get withContent(){return f()},set withContent(y){f(y),b()}};return ie(m)}customElements.define("go-ticket-segment",se(j2,{catchWordIds:{attribute:"catch-word-ids",reflect:!0,type:"String"},dateId:{attribute:"date-id",reflect:!0,type:"Number"},filters:{attribute:"filters",reflect:!0,type:"String"},languageIds:{attribute:"language-ids",reflect:!0,type:"String"},limit:{attribute:"limit",reflect:!0,type:"Number"},query:{attribute:"query",reflect:!0,type:"String"},ticketGroupIds:{attribute:"ticket-group-ids",reflect:!0,type:"String"},museumIds:{attribute:"museum-ids",reflect:!0,type:"String"},withContent:{attribute:"with-content",reflect:!0,type:"Boolean"}},[],["details"]));function Z2(e,t){ne(t,!0);const r=gn(t.$$host).value,n=nd(t.$$host).value,i=D(()=>n?.preCart.items.length),s=D(()=>!r?.isTicketsVisible||r?.isTicketsVisible&&d(i)===0);ve(()=>{t.$$host.style.display=d(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!d(s)),t.$$host.classList.toggle("is-visible",d(s))}),ie()}customElements.define("go-ticket-segment-empty",se(Z2,{},[],[]));var W2=B('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),H2=B('<span class="go-tickets-item-subtitle" data-testid="ticket-subtitle"> </span>'),G2=B('<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>'),K2=B('<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>'),Y2=B('<ul class="go-sub-tickets" role="list"></ul>'),J2=B('<li><article><ul><li class="go-tickets-item-title"><!> <!></li> <!> <li class="go-tickets-item-description" data-go-tickets-description=""></li> <!> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><!></li></ul></article> <!></li>');function ey(e,t){const r=mt();ne(t,!0);const n=k=>{var E=W2(),T=U(E),O=M(T);I(T);var F=V(T,2),R=M(F,!0);I(F),J(Y=>{H(O,`${s().product.event_title??""} - ${Y??""}`),H(R,s().product.title)},[()=>$n(s().time)]),x(k,E)},i=k=>{Ot();var E=Bt();J(()=>H(E,s().product.title)),x(k,E)};let s=_(t,"item",7),a=_(t,"details",7),o=ae(void 0),l=ae(Me({}));const c=D(()=>Vr(s().product)?s().product:null);let f=ae(!1);const u=D(()=>s().product?.content?.reduction_reason),p=`go-ticket-info-${r}`;ve(()=>{a().preCart.items.map(k=>k.quantity),a().preCart.items.forEach(k=>k.mantle&&Object.values(k.mantle.composition)),A.cart?.items.map(k=>k.quantity),A.cart?.items.forEach(k=>k.mantle&&Object.values(k.mantle.composition)),Re(()=>{$(o,A.capacityManager.capacity(A.cart,s(),a().preCart),!0),$(l,A.capacityManager.subTicketMaxes(A.cart,s(),a().preCart),!0)})});function h(k,E){s().mantle&&(s().mantle.composition[k]=E)}let g=i;Hs(s().product)&&(g=n);var v={get item(){return s()},set item(k){s(k),b()},get details(){return a()},set details(k){a(k),b()}},m=re(),y=U(m),S=k=>{var E=J2(),T=M(E),O=M(T),F=M(O),R=M(F);g(R);var Y=V(R,2),N=Q=>{var P=H2(),te=M(P,!0);I(P),J(()=>H(te,s().product.sub_title)),x(Q,P)};ue(Y,Q=>{s().product.sub_title&&Q(N)}),I(F);var X=V(F,2),q=Q=>{var P=G2(),te=M(P);I(P),J(L=>{St(te,1,dr(["go-ticket-info-icon",d(f)&&"is-active"])),me(te,"aria-expanded",d(f)),me(te,"aria-controls",p),me(te,"aria-label",L)},[()=>A.t("ticket.list.additionalInfo")]),pt("click",te,()=>$(f,!d(f))),x(Q,P)};ue(X,Q=>{d(u)&&Q(q)});var le=V(X,2);Af(le,()=>ym.sanitize(s().product.description),!0),I(le);var he=V(le,2),j=Q=>{var P=K2(),te=M(P,!0);I(P),J(L=>{me(P,"id",p),me(P,"hidden",!d(f)),H(te,L)},[()=>A.t(d(u))]),x(Q,P)};ue(he,Q=>{d(u)&&Q(j)});var oe=V(he,2),ee=M(oe,!0);I(oe);var fe=V(oe,2),ce=M(fe);{let Q=D(()=>bm(s()));go(ce,{get value(){return s().quantity},get min(){return d(o).min},get max(){return d(o).max},get label(){return d(Q)},onChange:P=>s().quantity=P})}I(fe),I(O),I(T);var de=V(T,2),G=Q=>{var P=Y2();Ne(P,21,()=>Vs(d(c)),te=>te.id,(te,L)=>{{let be=D(()=>s().mantle?.composition?.[d(L).id]??0);Gu(te,{get sub(){return d(L)},get quantity(){return d(be)},get max(){return d(l)[d(L).id]},onChange:Z=>h(d(L).id,Z)})}}),I(P),J(()=>me(P,"aria-label",d(c).title)),x(Q,P)};ue(de,Q=>{d(c)&&s().quantity>0&&Q(G)}),I(E),J(()=>{St(T,1,dr(["go-tickets-item",d(o).bookedOut&&"is-booked-out"])),me(T,"data-testid",s().uuid),H(ee,s().price_formatted)}),x(k,E)};return ue(y,k=>{d(o)&&!d(o).unavailable&&k(S)}),x(e,m),ie(v)}cr(["click"]),se(ey,{item:{},details:{}},[],[],{mode:"open"});var Q2=B('<ol class="go-tickets" data-testid="tickets"><li class="go-tickets-header" data-go-tickets-header="" data-testid="tickets-header"><ul><li class="go-tickets-header-title" data-go-tickets-title=""> </li> <li class="go-tickets-header-description" data-go-tickets-description=""> </li> <li class="go-tickets-header-price" data-go-tickets-price=""> </li> <li class="go-tickets-header-quality" data-go-tickets-quality=""> </li></ul></li> <!></ol>');function X2(e,t){ne(t,!0);const r=nd(t.$$host),n=D(()=>r.value),i=D(()=>d(n)?.preCart?.items.length&&d(n)?.preCart?.items.length>0);var s=re(),a=U(s),o=l=>{var c=Q2(),f=M(c),u=M(f),p=M(u),h=M(p,!0);I(p);var g=V(p,2),v=M(g,!0);I(g);var m=V(g,2),y=M(m,!0);I(m);var S=V(m,2),k=M(S,!0);I(S),I(u),I(f);var E=V(f,2);Ne(E,17,()=>d(n).preCart.items,T=>T.uuid,(T,O)=>{ey(T,{get item(){return d(O)},get details(){return d(n)}})}),I(c),J((T,O,F,R)=>{H(h,T),H(v,O),H(y,F),H(k,R)},[()=>A.t("product.detail.table.title"),()=>A.t("product.detail.table.desc"),()=>A.t("product.detail.table.price"),()=>A.t("product.detail.table.quantity")]),x(l,c)};ue(a,l=>{d(i)&&d(n)&&l(o)}),x(e,s),ie()}customElements.define("go-ticket-segment-body",se(X2,{},[],[]));function eF(e,t){ne(t,!0);const r=nd(t.$$host),n=D(()=>r.value);Ot();var i=Bt();J(()=>H(i,d(n)?.preCart.totalFormatted)),x(e,i),ie()}customElements.define("go-ticket-segment-sum",se(eF,{},[],[]));var tF=class{#e;get tsd(){return d(this.#e)}set tsd(e){$(this.#e,e)}#t=ae(Me([]));get timeslots(){return d(this.#t)}set timeslots(e){$(this.#t,e,!0)}constructor(e){e&&(this.#e=D(()=>e.value),this.tsd&&(this.tsd.timeslotDetails=this))}get boockedOutCount(){return this.timeslots.filter(e=>e.capacity==0).length}recalculateCapacities(){const e=this.tsd?.selectedDate;if(!e){this.timeslots=[];return}const t=A.capacityManager.quotaManager;t.clearPrecart();for(const r of A.cart?.items??[]){const n=r.product;uo(n)&&t.setPrecartItemQuantity(n.id,r.quantity??0)}this.timeslots=t.timeslotsOn(e,this.tsd?.timeslotTicketIds).map(r=>({...r,startAt:r.timeSlot,timeFormatted:r.timeSlot.substring(11,16),available:r.capacity>0}))}},rF=B('<li><label> <input type="radio" name="timeslot"/></label></li>'),nF=B('<ul data-testid="timeslots"></ul>');function iF(e,t){ne(t,!0);const r=[],n=new tF(gn(t.$$host));ve(()=>{const f=n.tsd;if(!f)return;const u=f.filters,p=f.selectedDate;Re(async()=>{f.timeslotTicketIds=[],u?.length&&p&&await Promise.all(u.map(h=>mi(h).loadTimeslots(f))),n.recalculateCapacities()})}),ve(()=>{A.cart?.items.map(f=>f.quantity),Re(()=>n.recalculateCapacities())});const i=(f,u)=>{!f||!("dispatchEvent"in f)||f.dispatchEvent(new CustomEvent("go-timeslot-select",{detail:{selected:u},bubbles:!0,composed:!0}))},s=f=>{i(f.target,n.tsd?.selectedTimeslot)};ve(()=>{const f=n.tsd;if(!f)return;const u=n.timeslots;if(u.length!==1)return;const p=u[0];p.available&&f.selectedTimeslot!==p.startAt&&(f.selectedTimeslot=p.startAt,i(t.$$host,p.startAt))});var a={details:n},o=re(),l=U(o),c=f=>{var u=nF();Ne(u,20,()=>n.timeslots,p=>p,(p,h)=>{const g=D(()=>h.totalCapacity===0),v=D(()=>!d(g)&&h.capacity===0),m=D(()=>d(g)||d(v)||!h.available),y=D(()=>n.tsd?.selectedTimeslot===h.startAt);var S=rF(),k=M(S),E=M(k),T=V(E);Ms(T);var O;I(k),I(S),J(()=>{St(S,1,dr({"go-timeslot":!0,"is-unavailable":d(g),"is-sold-out":d(v),"is-disabled":d(m),"is-selected":d(y)})),H(E,`${h.timeFormatted??""} `),T.disabled=d(m),me(T,"aria-disabled",d(m)),O!==(O=h.startAt)&&(T.value=(T.__value=h.startAt)??"")}),pt("change",T,s),W_(r,[],T,()=>(h.startAt,n.tsd.selectedTimeslot),F=>n.tsd.selectedTimeslot=F),x(p,S)}),I(u),x(f,u)};return ue(l,f=>{n.tsd?.isTimeslotsVisible&&f(c)}),x(e,o),ie(a)}cr(["change"]),customElements.define("go-timeslots",se(iF,{},[],["details"]));function sF(e){return typeof e=="string"?`'${e}'`:e==null?String(e):fw(e)?"a Promise — the callback must be synchronous":`a ${typeof e}`}var aF=class{#e=ae();get details(){return d(this.#e)}set details(e){$(this.#e,e,!0)}#t=ae(Me(Pi(Xt())));get startAt(){return d(this.#t)}set startAt(e){$(this.#t,e,!0)}#r=ae(void 0);get selected(){return d(this.#r)}set selected(e){$(this.#r,e,!0)}#n=ae();get availabilityOverride(){return d(this.#n)}set availabilityOverride(e){$(this.#n,e,!0)}#i=[];get endpoint(){return(this.details?.filters?.map(e=>mi(e).calendarEndpoint).filter(Boolean)??[])[0]??null}get dates(){if(this.details)switch(this.endpoint){case"tickets":return this.ticketsDates();case"events":return this.eventsDates();default:return}}defaultAvailability(e){switch(this.dates?.[e.toString()]){case"unavailable":return"unavailable";case"fully_booked":return"sold_out";default:return"available"}}availability(e){const t=this.defaultAvailability(e),r=this.#s();if(!r)return t;let n;try{n=r(e.toString(),t)}catch(i){return this.#o("threw",`[go-calendar] the availability-override callback threw (${String(i)}) — using the gomus default instead.`),t}return n==="pass_through"?t:n==="available"||n==="sold_out"||n==="unavailable"?n:(this.#o("returned",`[go-calendar] the availability-override callback must return 'available', 'sold_out', 'unavailable' or 'pass_through', got ${sF(n)} — using the gomus default instead.`),t)}#s(){const e=this.availabilityOverride;if(typeof e=="function")return e;if(!e)return;const t=globalThis[e];if(typeof t=="function")return t;this.#o(`unresolved:${e}`,`[go-calendar] availability-override="${e}" does not resolve to a function on window — using the gomus defaults.`,console.warn)}#o(e,t,r=console.error){this.#i.includes(e)||(this.#i.push(e),r(t))}isDateDisabled(e){return e.compare(Pi(Xt()))<0||this.availability(e)==="unavailable"}isDateUnavailable(e){return this.availability(e)==="sold_out"}get apiFilters(){return this.details?.filters?.map(e=>mi(e).apiToken).filter(Boolean)}params(e){return this.details?{by_bookable:!0,"by_ticket_types[]":this.apiFilters,"by_ticket_ids[]":this.details.ticketIds,"by_ticket_group_ids[]":this.details.ticketGroupIds,"by_museum_ids[]":this.details.museumIds,"by_exhibition_ids[]":this.details.exhibitionIds,"by_event_ids[]":this.details.eventIds,depth:"availability_status",start_at:e.toString(),end_at:e.add({months:1}).toString()}:{}}fetchPeriod(){const e=this.startAt.set({day:1});return[e.subtract({months:1}),e,e.add({months:1}),e.add({months:2})]}#a(e){return this.fetchPeriod().reduce((t,r)=>Object.assign(t,e(this.params(r))),{})}eventsDates(){return this.#a(e=>A.calendar(e))}ticketsDates(){return this.#a(e=>A.ticketsCalendar(e))}},oF=B("<!> <!> <!>",1),lF=B("<div> </div>"),ty=B("<!> <!>",1),uF=B('<div data-calendar-wrapper=""><!></div>');function ry(e,t){ne(t,!0);let r=_(t,"calendarClass",7),n=ae(void 0);const i=r();ve(()=>{d(n)?.dispatchEvent(new CustomEvent("go-date-select",{detail:{selected:r().selected},bubbles:!0}))});var s={details:i,get calendarClass(){return r()},set calendarClass(l){r(l),b()}},a=uF(),o=M(a);{const l=(c,f)=>{let u=()=>f?.().months,p=()=>f?.().weekdays;var h=ty(),g=U(h);$e(g,()=>wc,(m,y)=>{y(m,{children:(S,k)=>{var E=oF(),T=U(E);$e(T,()=>Ec,(R,Y)=>{Y(R,{class:"go-calendar-prev-button",children:(N,X)=>{Ot();var q=Bt("Prev");x(N,q)},$$slots:{default:!0}})});var O=V(T,2);$e(O,()=>kc,(R,Y)=>{Y(R,{class:"go-calendar-heading"})});var F=V(O,2);$e(F,()=>Sc,(R,Y)=>{Y(R,{class:"go-calendar-next-button",children:(N,X)=>{Ot();var q=Bt("Next");x(N,q)},$$slots:{default:!0}})}),x(S,E)},$$slots:{default:!0}})});var v=V(g,2);Ne(v,17,u,sn,(m,y)=>{var S=re(),k=U(S);$e(k,()=>vc,(E,T)=>{T(E,{class:"go-calendar-grid",children:(O,F)=>{var R=ty(),Y=U(R);$e(Y,()=>bc,(X,q)=>{q(X,{class:"go-calendar-grid-head",children:(le,he)=>{var j=re(),oe=U(j);$e(oe,()=>ua,(ee,fe)=>{fe(ee,{class:"go-calendar-grid-row",children:(ce,de)=>{var G=re(),Q=U(G);Ne(Q,17,p,sn,(P,te,L,be)=>{var Z=re(),w=U(Z);$e(w,()=>_c,(_e,we)=>{we(_e,{children:(De,Le)=>{var je=lF(),bt=M(je,!0);I(je),J(st=>H(bt,st),[()=>d(te).slice(0,2)]),x(De,je)},$$slots:{default:!0}})}),x(P,Z)}),x(ce,G)},$$slots:{default:!0}})}),x(le,j)},$$slots:{default:!0}})});var N=V(Y,2);$e(N,()=>gc,(X,q)=>{q(X,{class:"go-calendar-grid-body",children:(le,he)=>{var j=re(),oe=U(j);Ne(oe,17,()=>d(y).weeks,sn,(ee,fe,ce,de)=>{var G=re(),Q=U(G);$e(Q,()=>ua,(P,te)=>{te(P,{class:"go-calendar-grid-row",children:(L,be)=>{var Z=re(),w=U(Z);Ne(w,17,()=>d(fe),sn,(_e,we,De,Le)=>{var je=re(),bt=U(je);$e(bt,()=>yc,(st,Nt)=>{Nt(st,{get date(){return d(we)},get month(){return d(y).value},class:"go-calendar-cell",children:(_t,Rt)=>{var nr=re(),Ht=U(nr);{let mr=D(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(d(we)),"is-disabled":r().isDateDisabled(d(we)),"is-selected":r().selected?.compare(d(we))===0}));$e(Ht,()=>mc,(Ir,Pr)=>{Pr(Ir,{get class(){return d(mr)},children:(yn,Mr)=>{Ot();var vr=Bt();J(()=>H(vr,d(we).day)),x(yn,vr)},$$slots:{default:!0}})})}x(_t,nr)},$$slots:{default:!0}})}),x(_e,je)}),x(L,Z)},$$slots:{default:!0}})}),x(ee,G)}),x(le,j)},$$slots:{default:!0}})}),x(O,R)},$$slots:{default:!0}})}),x(m,S)}),x(c,h)};$e(o,()=>$v,(c,f)=>{f(c,{weekdayFormat:"long",fixedWeeks:!0,preventDeselect:!0,type:"single",get locale(){return A.locale},isDateDisabled:u=>r().isDateDisabled(u),isDateUnavailable:u=>r().isDateUnavailable(u),disableDaysOutsideMonth:!1,class:"go-calendar-root",get value(){return r().selected},set value(u){r().selected=u},get placeholder(){return r().startAt},set placeholder(u){r().startAt=u},children:l,$$slots:{default:!0}})})}return I(a),Ql(a,l=>$(n,l),()=>d(n)),x(e,a),ie(s)}se(ry,{calendarClass:{}},[],["details"],{mode:"open"});function cF(e,t){ne(t,!0);let r=_(t,"availabilityOverride",7);const n=new aF,i=n,s=gn(t.$$host),a=D(()=>s.value);ve(()=>{n.details=d(a),n.availabilityOverride=r()}),t.$$host.addEventListener("go-date-select",u=>{d(a)&&(d(a).selectedDate=u.detail.selected,d(a).selectedTimeslot=void 0)});var o={details:i,get availabilityOverride(){return r()},set availabilityOverride(u){r(u),b()}},l=re(),c=U(l),f=u=>{ry(u,{get calendarClass(){return n}})};return ue(c,u=>{d(a)?.isCalendarVisible&&u(f)}),x(e,l),ie(o)}customElements.define("go-calendar",se(cF,{availabilityOverride:{attribute:"availability-override",type:"String"}},[],["details"]));var dF=class{#e;get ticketSelectionDetails(){return d(this.#e)}set ticketSelectionDetails(e){$(this.#e,e)}constructor(e){e&&(this.#e=D(()=>e.value))}addToCart(){if(!A.cart){console.error("cart not found");return}if(!this.ticketSelectionDetails){console.error("ticket selection details not found");return}const e=this.ticketSelectionDetails.preCarts,t=e.flatMap(r=>r.nonEmptyItems.map(n=>{const i=n.product.ticket_type!="annual"?n.time:void 0;return ot(n.product,{quantity:n.quantity,time:i,mantle:n.mantle&&{composition:{...n.mantle.composition}}})}));A.cart.addItems(t),e.forEach(r=>r.items.forEach(n=>n.quantity=0)),Xe.config.urls.cart&&Xe.config.navigateTo(Xe.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(e=>e.items.some(t=>t.quantity>0)):!1}},fF=B('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function hF(e,t){ne(t,!0);const r=new dF(gn(t.$$host));var n={details:r},i=fF(),s=M(i,!0);return I(i),J((a,o,l)=>{i.disabled=a,me(i,"data-x",o),H(s,l)},[()=>!r.anyTicketsSelected(),()=>!r.anyTicketsSelected(),()=>A.t("common.actions.cart")]),pt("click",i,()=>r.addToCart()),x(e,i),ie(n)}cr(["click"]),customElements.define("go-add-to-cart-button",se(hF,{},[],["details"]));function pF(e,t){ne(t,!0);let r=_(t,"custom",7,!1);Pt.defineForm({id:"withdrawal",submitLabel:"withdrawal.actions.submit",fields:[{key:"withdrawalFirstName",required:!0},{key:"withdrawalLastName",required:!0},{key:"email",required:!0},{key:"orderNumber",required:!0},{key:"withdrawalNote",required:!1}]});async function n(i){const s=i.target.details,a=await A.withdrawal(s.formData);a.response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error?.errors??[A.t("withdrawal.form.errors.requestFailed")]}return Hr(t.$$host,"go-form",{"form-id":"withdrawal",custom:r()}),t.$$host.addEventListener("submit",n),ie({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-withdrawal-form",se(pF,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));var mF=["id","time","participants","languageId","totalPriceCents","title"];function vF(e){for(const t of mF)if(e[t]==null||e[t]==="")throw new Error(`(go.cart.addTour) '${t}' is required`);if(!(e.participants>0))throw new Error("(go.cart.addTour) 'participants' must be a positive number");if(e.quantities){const t=qr(Object.values(e.quantities));if(t!==e.participants)throw new Error(`(go.cart.addTour) 'quantities' must sum to 'participants' (${t} !== ${e.participants})`)}}async function gF(e){if(vF(e),!A.cart)throw new Error("(go.cart.addTour) shop not initialized — call go.init first");const{time:t,...r}=e,n=ot(kp(r),{quantity:1,time:t});return A.cart.addItem(n),n.uuid}var ha=null;async function pa(){if(ha)return ha;if(!A.client)throw new Error("[go] Shop not initialized — call go.init({ shop, api, locale }) first.")}var yF=e=>e.split(".").reduce((t,r)=>t?.[r],ny);async function bF(e){const t=e.go;let r=t&&t._queue||[];t&&t._queue&&!t.cart&&console.warn("(go) the pasted go snippet predates go.cart — cart calls cannot be queued before load. Update the snippet or gate on window.go.loaded.");for(const n of r)if(n.method!=="load")try{const i=yF(n.method);if(typeof i!="function")throw new Error(`(go) unknown command: ${n.method}`);await i(n.options)}catch(i){console.error(i)}e.go=ny,t&&(t._queue=null)}var ny={loaded:!0,config:e=>{Xe.define(e)},init:async e=>{try{ha=A.load("https://"+e.api,e.shop,e.locale),await ha}catch(t){throw ha=null,t}},api:{getCustomer:async()=>(await pa(),A.asyncFetch(()=>A.getCustomer())),getOrders:async e=>(await pa(),A.asyncFetch(()=>A.getOrders(e))),getCustomerAddresses:async()=>(await pa(),A.asyncFetch(()=>A.getCustomerAddresses())),getCustomerMemberships:async()=>(await pa(),A.asyncFetch(()=>A.getCustomerMemberships()))},cart:{addTour:async e=>(await pa(),gF(e))}};(async()=>await bF(window))()})();
75
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const o=a[1];if(t===a[0]){s(a);continue}if(e.external){const l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){s(a);continue}}if(e.metadataRegistry.get(a[0])?.id){s(a);continue}if(o.cycle){s(a);continue}if(o.count>1&&e.reused==="ref"){s(a);continue}}}function Oh(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=o=>{const l=e.seen.get(o);if(l.ref===null)return;const c=l.def??l.schema,f={...c},u=l.ref;if(l.ref=null,u){n(u);const h=e.seen.get(u),g=h.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(g)):Object.assign(c,g),Object.assign(c,f),o._zod.parent===u)for(const v in c)v==="$ref"||v==="allOf"||v in f||delete c[v];if(g.$ref&&h.def)for(const v in c)v==="$ref"||v==="allOf"||v in h.def&&JSON.stringify(c[v])===JSON.stringify(h.def[v])&&delete c[v]}const p=o._zod.parent;if(p&&p!==u){n(p);const h=e.seen.get(p);if(h?.schema.$ref&&(c.$ref=h.schema.$ref,h.def))for(const g in c)g==="$ref"||g==="allOf"||g in h.def&&JSON.stringify(c[g])===JSON.stringify(h.def[g])&&delete c[g]}e.override({zodSchema:o,jsonSchema:c,path:l.path??[]})};for(const o of[...e.seen.entries()].reverse())n(o[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const o=e.external.registry.get(t)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(o)}Object.assign(i,r.def??r.schema);const s=e.metadataRegistry.get(t)?.id;s!==void 0&&i.id===s&&delete i.id;const a=e.external?.defs??{};for(const o of e.seen.entries()){const l=o[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,a[l.defId]=l.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?i.$defs=a:i.definitions=a);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:Qa(t,"input",e.processors),output:Qa(t,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function It(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return It(n.element,r);if(n.type==="set")return It(n.valueType,r);if(n.type==="lazy")return It(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return It(n.innerType,r);if(n.type==="intersection")return It(n.left,r)||It(n.right,r);if(n.type==="record"||n.type==="map")return It(n.keyType,r)||It(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:It(n.in,r)||It(n.out,r);if(n.type==="object"){for(const i in n.shape)if(It(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(It(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(It(i,r))return!0;return!!(n.rest&&It(n.rest,r))}return!1}var aS=(e,t={})=>r=>{const n=Ah({...r,processors:t});return Et(e,n),Ch(n,e),Oh(n,e)},Qa=(e,t,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},a=Ah({...i??{},target:s,io:t,processors:r});return Et(e,a),Ch(a,e),Oh(a,e)},oS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},lS=(e,t,r,n)=>{const i=r;i.type="string";const{minimum:s,maximum:a,format:o,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof a=="number"&&(i.maxLength=a),o&&(i.format=oS[o]??o,i.format===""&&delete i.format,o==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){const f=[...l];f.length===1?i.pattern=f[0].source:f.length>1&&(i.allOf=[...f.map(u=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:u.source}))])}},uS=(e,t,r,n)=>{const i=r,{minimum:s,maximum:a,format:o,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:f}=e._zod.bag;typeof o=="string"&&o.includes("int")?i.type="integer":i.type="number";const u=typeof f=="number"&&f>=(s??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";u?h?(i.minimum=f,i.exclusiveMinimum=!0):i.exclusiveMinimum=f:typeof s=="number"&&(i.minimum=s),p?h?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof a=="number"&&(i.maximum=a),typeof l=="number"&&(i.multipleOf=l)},cS=(e,t,r,n)=>{r.not={}},dS=(e,t,r,n)=>{},fS=(e,t,r,n)=>{const i=e._zod.def,s=Zf(i.entries);s.every(a=>typeof a=="number")&&(r.type="number"),s.every(a=>typeof a=="string")&&(r.type="string"),r.enum=s},hS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},pS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},mS=(e,t,r,n)=>{const i=r,s=e._zod.def,{minimum:a,maximum:o}=e._zod.bag;typeof a=="number"&&(i.minItems=a),typeof o=="number"&&(i.maxItems=o),i.type="array",i.items=Et(s.element,t,{...n,path:[...n.path,"items"]})},vS=(e,t,r,n)=>{const i=r,s=e._zod.def;i.type="object",i.properties={};const a=s.shape;for(const c in a)i.properties[c]=Et(a[c],t,{...n,path:[...n.path,"properties",c]});const o=new Set(Object.keys(a)),l=new Set([...o].filter(c=>{const f=s.shape[c]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));l.size>0&&(i.required=Array.from(l)),s.catchall?._zod.def.type==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=Et(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},gS=(e,t,r,n)=>{const i=e._zod.def,s=i.inclusive===!1,a=i.options.map((o,l)=>Et(o,t,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=a:r.anyOf=a},yS=(e,t,r,n)=>{const i=e._zod.def,s=Et(i.left,t,{...n,path:[...n.path,"allOf",0]}),a=Et(i.right,t,{...n,path:[...n.path,"allOf",1]}),o=l=>"allOf"in l&&Object.keys(l).length===1;r.allOf=[...o(s)?s.allOf:[s],...o(a)?a.allOf:[a]]},bS=(e,t,r,n)=>{const i=e._zod.def,s=Et(i.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},_S=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},wS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},kS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},SS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType;let a;try{a=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},ES=(e,t,r,n)=>{const i=e._zod.def,s=i.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?s?i.out:i.in:i.out;Et(a,t,n);const o=t.seen.get(e);o.ref=a},TS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.readOnly=!0},Dh=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},xS=K("ZodISODateTime",(e,t)=>{$0.init(e,t),Qe.init(e,t)});function AS(e){return Rk(xS,e)}var CS=K("ZodISODate",(e,t)=>{F0.init(e,t),Qe.init(e,t)});function OS(e){return Lk(CS,e)}var DS=K("ZodISOTime",(e,t)=>{N0.init(e,t),Qe.init(e,t)});function IS(e){return zk(DS,e)}var PS=K("ZodISODuration",(e,t)=>{R0.init(e,t),Qe.init(e,t)});function MS(e){return qk(PS,e)}var $S=(e,t)=>{Qf.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>xw(e,r)},flatten:{value:r=>Tw(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,tu,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,tu,2)}},isEmpty:{get(){return e.issues.length===0}}})},fr=K("ZodError",$S,{Parent:Error}),FS=au(fr),NS=ou(fr),RS=Wa(fr),LS=Ha(fr),zS=Ow(fr),qS=Dw(fr),US=Iw(fr),BS=Pw(fr),VS=Mw(fr),jS=$w(fr),ZS=Fw(fr),WS=Nw(fr),Ih=new WeakMap;function Fs(e,t,r){const n=Object.getPrototypeOf(e);let i=Ih.get(n);if(i||(i=new Set,Ih.set(n,i)),!i.has(t)){i.add(t);for(const s in r){const a=r[s];Object.defineProperty(n,s,{configurable:!0,enumerable:!1,get(){const o=a.bind(this);return Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:o}),o},set(o){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:o})}})}}}var dt=K("ZodType",(e,t)=>(ct.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Qa(e,"input"),output:Qa(e,"output")}}),e.toJSONSchema=aS(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>FS(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>RS(e,r,n),e.parseAsync=async(r,n)=>NS(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>LS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>zS(e,r,n),e.decode=(r,n)=>qS(e,r,n),e.encodeAsync=async(r,n)=>US(e,r,n),e.decodeAsync=async(r,n)=>BS(e,r,n),e.safeEncode=(r,n)=>VS(e,r,n),e.safeDecode=(r,n)=>jS(e,r,n),e.safeEncodeAsync=async(r,n)=>ZS(e,r,n),e.safeDecodeAsync=async(r,n)=>WS(e,r,n),Fs(e,"ZodType",{check(...r){const n=this.def;return this.clone(Cn(n,{checks:[...n.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return On(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(R1(r,n))},superRefine(r,n){return this.check(L1(r,n))},overwrite(r){return this.check(Ci(r))},optional(){return zh(this)},exactOptional(){return T1(this)},nullable(){return qh(this)},nullish(){return zh(qh(this))},nonoptional(r){return I1(this,r)},array(){return Rh(this)},or(r){return y1([this,r])},and(r){return _1(this,r)},transform(r){return Bh(this,S1(r))},default(r){return C1(this,r)},prefault(r){return D1(this,r)},catch(r){return M1(this,r)},pipe(r){return Bh(this,r)},readonly(){return N1(this)},describe(r){const n=this.clone();return $s.add(n,{description:r}),n},meta(...r){if(r.length===0)return $s.get(this);const n=this.clone();return $s.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return $s.get(e)?.description},configurable:!0}),e)),Ph=K("_ZodString",(e,t)=>{lu.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>lS(e,n,i,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Fs(e,"_ZodString",{regex(...n){return this.check(Zk(...n))},includes(...n){return this.check(Gk(...n))},startsWith(...n){return this.check(Kk(...n))},endsWith(...n){return this.check(Yk(...n))},min(...n){return this.check(Ja(...n))},max(...n){return this.check(Th(...n))},length(...n){return this.check(xh(...n))},nonempty(...n){return this.check(Ja(1,...n))},lowercase(n){return this.check(Wk(n))},uppercase(n){return this.check(Hk(n))},trim(){return this.check(Qk())},normalize(...n){return this.check(Jk(...n))},toLowerCase(){return this.check(Xk())},toUpperCase(){return this.check(eS())},slugify(){return this.check(tS())}})}),HS=K("ZodString",(e,t)=>{lu.init(e,t),Ph.init(e,t),e.email=r=>e.check(vk(GS,r)),e.url=r=>e.check(wk(KS,r)),e.jwt=r=>e.check(Nk(c1,r)),e.emoji=r=>e.check(kk(YS,r)),e.guid=r=>e.check(wh(Mh,r)),e.uuid=r=>e.check(gk(Xa,r)),e.uuidv4=r=>e.check(yk(Xa,r)),e.uuidv6=r=>e.check(bk(Xa,r)),e.uuidv7=r=>e.check(_k(Xa,r)),e.nanoid=r=>e.check(Sk(JS,r)),e.guid=r=>e.check(wh(Mh,r)),e.cuid=r=>e.check(Ek(QS,r)),e.cuid2=r=>e.check(Tk(XS,r)),e.ulid=r=>e.check(xk(e1,r)),e.base64=r=>e.check(Mk(o1,r)),e.base64url=r=>e.check($k(l1,r)),e.xid=r=>e.check(Ak(t1,r)),e.ksuid=r=>e.check(Ck(r1,r)),e.ipv4=r=>e.check(Ok(n1,r)),e.ipv6=r=>e.check(Dk(i1,r)),e.cidrv4=r=>e.check(Ik(s1,r)),e.cidrv6=r=>e.check(Pk(a1,r)),e.e164=r=>e.check(Fk(u1,r)),e.datetime=r=>e.check(AS(r)),e.date=r=>e.check(OS(r)),e.time=r=>e.check(IS(r)),e.duration=r=>e.check(MS(r))});function Qt(e){return mk(HS,e)}var Qe=K("ZodStringFormat",(e,t)=>{Je.init(e,t),Ph.init(e,t)}),GS=K("ZodEmail",(e,t)=>{T0.init(e,t),Qe.init(e,t)}),Mh=K("ZodGUID",(e,t)=>{S0.init(e,t),Qe.init(e,t)}),Xa=K("ZodUUID",(e,t)=>{E0.init(e,t),Qe.init(e,t)}),KS=K("ZodURL",(e,t)=>{x0.init(e,t),Qe.init(e,t)}),YS=K("ZodEmoji",(e,t)=>{A0.init(e,t),Qe.init(e,t)}),JS=K("ZodNanoID",(e,t)=>{C0.init(e,t),Qe.init(e,t)}),QS=K("ZodCUID",(e,t)=>{O0.init(e,t),Qe.init(e,t)}),XS=K("ZodCUID2",(e,t)=>{D0.init(e,t),Qe.init(e,t)}),e1=K("ZodULID",(e,t)=>{I0.init(e,t),Qe.init(e,t)}),t1=K("ZodXID",(e,t)=>{P0.init(e,t),Qe.init(e,t)}),r1=K("ZodKSUID",(e,t)=>{M0.init(e,t),Qe.init(e,t)}),n1=K("ZodIPv4",(e,t)=>{L0.init(e,t),Qe.init(e,t)}),i1=K("ZodIPv6",(e,t)=>{z0.init(e,t),Qe.init(e,t)}),s1=K("ZodCIDRv4",(e,t)=>{q0.init(e,t),Qe.init(e,t)}),a1=K("ZodCIDRv6",(e,t)=>{U0.init(e,t),Qe.init(e,t)}),o1=K("ZodBase64",(e,t)=>{B0.init(e,t),Qe.init(e,t)}),l1=K("ZodBase64URL",(e,t)=>{j0.init(e,t),Qe.init(e,t)}),u1=K("ZodE164",(e,t)=>{Z0.init(e,t),Qe.init(e,t)}),c1=K("ZodJWT",(e,t)=>{H0.init(e,t),Qe.init(e,t)}),$h=K("ZodNumber",(e,t)=>{lh.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>uS(e,n,i,s),Fs(e,"ZodNumber",{gt(n,i){return this.check(Sh(n,i))},gte(n,i){return this.check(du(n,i))},min(n,i){return this.check(du(n,i))},lt(n,i){return this.check(kh(n,i))},lte(n,i){return this.check(cu(n,i))},max(n,i){return this.check(cu(n,i))},int(n){return this.check(Fh(n))},safe(n){return this.check(Fh(n))},positive(n){return this.check(Sh(0,n))},nonnegative(n){return this.check(du(0,n))},negative(n){return this.check(kh(0,n))},nonpositive(n){return this.check(cu(0,n))},multipleOf(n,i){return this.check(Eh(n,i))},step(n,i){return this.check(Eh(n,i))},finite(){return this}});const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Ns(e){return Uk($h,e)}var d1=K("ZodNumberFormat",(e,t)=>{G0.init(e,t),$h.init(e,t)});function Fh(e){return Bk(d1,e)}var f1=K("ZodUnknown",(e,t)=>{K0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>dS(e,r,n,i)});function Nh(){return Vk(f1)}var h1=K("ZodNever",(e,t)=>{Y0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>cS(e,r,n,i)});function p1(e){return jk(h1,e)}var m1=K("ZodArray",(e,t)=>{J0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>mS(e,r,n,i),e.element=t.element,Fs(e,"ZodArray",{min(r,n){return this.check(Ja(r,n))},nonempty(r){return this.check(Ja(1,r))},max(r,n){return this.check(Th(r,n))},length(r,n){return this.check(xh(r,n))},unwrap(){return this.element}})});function Rh(e,t){return rS(m1,e,t)}var v1=K("ZodObject",(e,t)=>{X0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>vS(e,r,n,i),We(e,"shape",()=>t.shape),Fs(e,"ZodObject",{keyof(){return w1(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Nh()})},loose(){return this.clone({...this._zod.def,catchall:Nh()})},strict(){return this.clone({...this._zod.def,catchall:p1()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return bw(this,r)},safeExtend(r){return _w(this,r)},merge(r){return ww(this,r)},pick(r){return gw(this,r)},omit(r){return yw(this,r)},partial(...r){return kw(Lh,this,r[0])},required(...r){return Sw(Uh,this,r[0])}})});function fu(e,t){return new v1({type:"object",shape:e??{},...ye(t)})}var g1=K("ZodUnion",(e,t)=>{ek.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>gS(e,r,n,i),e.options=t.options});function y1(e,t){return new g1({type:"union",options:e,...ye(t)})}var b1=K("ZodIntersection",(e,t)=>{tk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>yS(e,r,n,i)});function _1(e,t){return new b1({type:"intersection",left:e,right:t})}var hu=K("ZodEnum",(e,t)=>{rk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>fS(e,n,i,s),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{const s={};for(const a of n)if(r.has(a))s[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new hu({...t,checks:[],...ye(i),entries:s})},e.exclude=(n,i)=>{const s={...t.entries};for(const a of n)if(r.has(a))delete s[a];else throw new Error(`Key ${a} not found in enum`);return new hu({...t,checks:[],...ye(i),entries:s})}});function w1(e,t){return new hu({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...ye(t)})}var k1=K("ZodTransform",(e,t)=>{nk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>pS(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new jf(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Ms(s,r.value,t));else{const a=s;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Ms(a))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(s=>(r.value=s,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function S1(e){return new k1({type:"transform",transform:e})}var Lh=K("ZodOptional",(e,t)=>{mh.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Dh(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function zh(e){return new Lh({type:"optional",innerType:e})}var E1=K("ZodExactOptional",(e,t)=>{ik.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Dh(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function T1(e){return new E1({type:"optional",innerType:e})}var x1=K("ZodNullable",(e,t)=>{sk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>bS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function qh(e){return new x1({type:"nullable",innerType:e})}var A1=K("ZodDefault",(e,t)=>{ak.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>wS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function C1(e,t){return new A1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Kf(t)}})}var O1=K("ZodPrefault",(e,t)=>{ok.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function D1(e,t){return new O1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Kf(t)}})}var Uh=K("ZodNonOptional",(e,t)=>{lk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_S(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function I1(e,t){return new Uh({type:"nonoptional",innerType:e,...ye(t)})}var P1=K("ZodCatch",(e,t)=>{uk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>SS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function M1(e,t){return new P1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var $1=K("ZodPipe",(e,t)=>{ck.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>ES(e,r,n,i),e.in=t.in,e.out=t.out});function Bh(e,t){return new $1({type:"pipe",in:e,out:t})}var F1=K("ZodReadonly",(e,t)=>{dk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>TS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function N1(e){return new F1({type:"readonly",innerType:e})}var Vh=K("ZodCustom",(e,t)=>{fk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>hS(e,r,n,i)});function R1(e,t={}){return nS(Vh,e,t)}function L1(e,t){return iS(e,t)}function z1(e,t={}){const r=new Vh({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...ye(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var q1=fu({id:Ns(),customer:fu({customer_salutation_id:Ns().positive({message:"user.fieldErrors.titleRequire"}),name:Qt().min(1,{message:"user.fieldErrors.nameRequire"}),surname:Qt().min(1,{message:"user.fieldErrors.surnameRequire"}),email:Qt().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:Qt().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:Qt().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:Qt().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:Qt().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:Ns().positive().default(60),language_id:Ns().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),lN=fu({ticket_sale_id:Ns(),start_at:Qt().date(),personalizations:Rh(q1)});function pu(e,t){return e-t*Math.floor(e/t)}var jh=1721426;function eo(e,t,r,n){t=mu(e,t);let i=t-1,s=-2;return r<=2?s=0:to(t)&&(s=-1),jh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function to(e){return e%4===0&&(e%100!==0||e%400===0)}function mu(e,t){return e==="BC"?1-t:t}function U1(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var B1={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},Oi=class{fromJulianDay(e){let t=e,r=t-jh,n=Math.floor(r/146097),i=pu(r,146097),s=Math.floor(i/36524),a=pu(i,36524),o=Math.floor(a/1461),l=pu(a,1461),c=Math.floor(l/365),[f,u]=U1(n*400+s*100+o*4+c+(s!==4&&c!==4?1:0)),p=t-eo(f,u,1,1),h=2;t<eo(f,u,3,1)?h=0:to(u)&&(h=1);let g=Math.floor(((p+h)*12+373)/367);return new zs(f,u,g,t-eo(f,u,g,1)+1)}toJulianDay(e){return eo(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return B1[to(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return to(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return e.era==="BC"}balanceDate(e){e.year<=0&&(e.era=e.era==="BC"?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}},V1={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Dn(e,t){return t=er(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function vu(e,t){return t=er(t,e.calendar),e=yu(e),t=yu(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function j1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function Z1(e,t){return Dn(e,Di(t))}var W1={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Zh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?W1[r]:Q1(t),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function H1(e){return Br(Date.now(),e)}function Di(e){return tE(H1(e))}function Wh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function G1(e,t){return Hh(e)-Hh(t)}function Hh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var gu=null,K1=!1;function Xt(){return gu==null&&(gu=new Intl.DateTimeFormat().resolvedOptions().timeZone),gu}function Gh(){return K1}function yu(e){return e.subtract({days:e.day-1})}function Y1(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var Kh=new Map,bu=new Map;function J1(e){if(Intl.Locale){let r=Kh.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&Kh.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function Q1(e){let t=bu.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return bu.set(e,t),t.firstDay}let r=J1(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];n==="mon"?t={firstDay:1}:n==="tue"?t={firstDay:2}:n==="wed"?t={firstDay:3}:n==="thu"?t={firstDay:4}:n==="fri"?t={firstDay:5}:n==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:r&&V1[r]||0};bu.set(e,t)}return t.firstDay}function In(e){return e=er(e,new Oi),Yh(mu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Yh(e,t,r,n,i,s,a){let o=new Date;return o.setUTCHours(n,i,s,a),o.setUTCFullYear(e,t-1,r),o.getTime()}function Rs(e,t){if(t==="UTC")return 0;if(e>0&&t===Xt()&&!Gh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:a,second:o}=Qh(e,t);return Yh(r,n,i,s,a,o,0)-Math.floor(e/1e3)*1e3}var Jh=new Map;function Qh(e,t){let r=Jh.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Jh.set(t,r));let n=r.formatToParts(new Date(e)),i={};for(let s of n)s.type!=="literal"&&(i[s.type]=s.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}var ro=864e5;function X1(e,t){let r=In(e);return Xh(e,t,r-Rs(r-ro,t),r-Rs(r+ro,t))}function Xh(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>eE(e,t,i))}function eE(e,t,r){let n=Qh(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function Ur(e,t,r="compatible"){let n=Pn(e);if(t==="UTC")return In(n);if(t===Xt()&&r==="compatible"&&!Gh()){n=er(n,new Oi);let l=new Date,c=mu(n.era,n.year);return l.setFullYear(c,n.month-1,n.day),l.setHours(n.hour,n.minute,n.second,n.millisecond),l.getTime()}let i=In(n),s=Rs(i-ro,t),a=Rs(i+ro,t),o=Xh(n,t,i-s,i-a);if(o.length===1)return o[0];if(o.length>1)switch(r){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(i-s,i-a);case"compatible":case"later":return Math.max(i-s,i-a);case"reject":throw new RangeError("No such absolute time found")}}function ep(e,t,r="compatible"){return new Date(Ur(e,t,r))}function Br(e,t){let r=Rs(e,t),n=new Date(e+r),i=n.getUTCFullYear(),s=n.getUTCMonth()+1,a=n.getUTCDate(),o=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),f=n.getUTCMilliseconds();return new Mn(i<1?"BC":"AD",i<1?-i+1:i,s,a,t,r,o,l,c,f)}function tE(e){return new zs(e.calendar,e.era,e.year,e.month,e.day)}function Pn(e,t){let r=0,n=0,i=0,s=0;if("timeZone"in e)({hour:r,minute:n,second:i,millisecond:s}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:i,millisecond:s}=t),new Ii(e.calendar,e.era,e.year,e.month,e.day,r,n,i,s)}function er(e,t){if(j1(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,Qn(n),n}function rE(e,t,r){return e instanceof Mn?e.timeZone===t?e:tp(e,t):Br(Ur(e,t,r),t)}function nE(e){let t=In(e)-e.offset;return new Date(t)}function tp(e,t){return er(Br(In(e)-e.offset,t),e.calendar)}var Ls=36e5;function no(e,t){let r=e.copy(),n="hour"in r?oE(r,t):0;_u(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,wu(r),rp(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,iE(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let i=r.calendar.getYearsInEra(r);if(r.year>i){let a=r.calendar.isInverseEra?.(r);r.year=i,r.month=a?1:r.calendar.getMonthsInYear(r),r.day=a?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function _u(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function wu(e){for(;e.month<1;)_u(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,_u(e,1)}function iE(e){for(;e.day<1;)e.month--,wu(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,wu(e)}function rp(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Qn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),rp(e)}function np(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function ip(e,t){return no(e,np(t))}function ku(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),Qn(r),r}function io(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),aE(r),r}function sE(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=so(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=so(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=so(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=so(e.hour,24),t}function aE(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function so(e,t){let r=e%t;return r<0&&(r+=t),r}function oE(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,sE(e)}function Su(e,t,r,n){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),a=s.indexOf(e.era);if(a<0)throw new Error("Invalid era: "+e.era);a=an(a,r,0,s.length-1,n?.round),i.era=s[a],Qn(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=an(e.year,r,-1/0,9999,n?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=an(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":i.day=an(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),Qn(i),i}function sp(e,t,r,n){let i=e.copy();switch(t){case"hour":{let s=e.hour,a=0,o=23;if(n?.hourCycle===12){let l=s>=12;a=l?12:0,o=l?23:11}i.hour=an(s,r,a,o,n?.round);break}case"minute":i.minute=an(e.minute,r,0,59,n?.round);break;case"second":i.second=an(e.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=an(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return i}function an(e,t,r,n,i=!1){if(i){e+=Math.sign(t),e<r&&(e=n);let s=Math.abs(t);t>0?e=Math.ceil(e/s)*s:e=Math.floor(e/s)*s,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function ap(e,t){let r;return t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?r=Ur(no(Pn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):r=In(e)-e.offset,r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5,er(Br(r,e.timeZone),e.calendar)}function lE(e,t){return ap(e,np(t))}function uE(e,t,r,n){switch(t){case"hour":{let i=0,s=23;if(n?.hourCycle===12){let g=e.hour>=12;i=g?12:0,s=g?23:11}let a=Pn(e),o=er(io(a,{hour:i}),new Oi),l=[Ur(o,e.timeZone,"earlier"),Ur(o,e.timeZone,"later")].filter(g=>Br(g,e.timeZone).day===o.day)[0],c=er(io(a,{hour:s}),new Oi),f=[Ur(c,e.timeZone,"earlier"),Ur(c,e.timeZone,"later")].filter(g=>Br(g,e.timeZone).day===c.day).pop(),u=In(e)-e.offset,p=Math.floor(u/Ls),h=u%Ls;return u=an(p,r,Math.floor(l/Ls),Math.floor(f/Ls),n?.round)*Ls+h,er(Br(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return sp(e,t,r,n);case"era":case"year":case"month":case"day":return er(Br(Ur(Su(Pn(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function cE(e,t,r){let n=Pn(e),i=io(ku(n,t),t);return i.compare(n)===0?e:er(Br(Ur(i,e.timeZone,r),e.timeZone),e.calendar)}var dE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,fE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,hE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,Eu=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/,pE=["hours","minutes","seconds"],uN=["years","months","weeks","days",...pE];function ao(e){let t=e.match(dE);if(!t)throw Eu.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new zs(Be(t[1],0,9999),Be(t[2],1,12),1);return r.day=Be(t[3],1,r.calendar.getDaysInMonth(r)),r}function op(e){let t=e.match(fE);if(!t)throw Eu.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=Be(t[1],-9999,9999),n=new Ii(r<1?"BC":"AD",r<1?-r+1:r,Be(t[2],1,12),1,t[4]?Be(t[4],0,23):0,t[5]?Be(t[5],0,59):0,t[6]?Be(t[6],0,59):0,t[7]?Be(t[7],0,1/0)*1e3:0);return n.day=Be(t[3],0,n.calendar.getDaysInMonth(n)),n}function lp(e,t){let r=e.match(hE);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Be(r[1],-9999,9999),i=new Mn(n<1?"BC":"AD",n<1?-n+1:n,Be(r[2],1,12),1,r[11],0,r[4]?Be(r[4],0,23):0,r[5]?Be(r[5],0,59):0,r[6]?Be(r[6],0,59):0,r[7]?Be(r[7],0,1/0)*1e3:0);i.day=Be(r[3],0,i.calendar.getDaysInMonth(i));let s=Pn(i),a;if(r[8]){let o=Be(r[8],-23,23);if(i.offset=Math.sign(o)*(Math.abs(o)*36e5+Be(r[9]??"0",0,59)*6e4+Be(r[10]??"0",0,59)*1e3),a=In(i)-i.offset,!X1(s,i.timeZone).includes(a))throw new Error(`Offset ${dp(i.offset)} is invalid for ${Tu(i)} in ${i.timeZone}`)}else a=Ur(Pn(s),i.timeZone,t);return Br(a,i.timeZone)}function up(e,t){let r=e.match(Eu);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Be(r[1],-9999,9999),i=new Mn(n<1?"BC":"AD",n<1?-n+1:n,Be(r[2],1,12),1,t,0,r[4]?Be(r[4],0,23):0,r[5]?Be(r[5],0,59):0,r[6]?Be(r[6],0,59):0,r[7]?Be(r[7],0,1/0)*1e3:0);return i.day=Be(r[3],0,i.calendar.getDaysInMonth(i)),r[8]&&(i.offset=Be(r[8],-23,23)*36e5+Be(r[9]??"0",0,59)*6e4),tp(i,t)}function Be(e,t,r){let n=Number(e);if(n<t||n>r)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function mE(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function cp(e){let t=er(e,new Oi),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Tu(e){return`${cp(e)}T${mE(e)}`}function dp(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),s=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(s+=`:${String(i).padStart(2,"0")}`),s}function vE(e){return`${Tu(e)}${dp(e.offset)}[${e.timeZone}]`}function xu(e){let t=typeof e[0]=="object"?e.shift():new Oi,r;if(typeof e[0]=="string")r=e.shift();else{let a=t.getEras();r=a[a.length-1]}let n=e.shift(),i=e.shift(),s=e.shift();return[t,r,n,i,s]}var zs=class ld{#e;constructor(...t){let[r,n,i,s,a]=xu(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,Qn(this)}copy(){return this.era?new ld(this.calendar,this.era,this.year,this.month,this.day):new ld(this.calendar,this.year,this.month,this.day)}add(t){return no(this,t)}subtract(t){return ip(this,t)}set(t){return ku(this,t)}cycle(t,r,n){return Su(this,t,r,n)}toDate(t){return ep(this,t)}toString(){return cp(this)}compare(t){return Wh(this,t)}},Ii=class ud{#e;constructor(...t){let[r,n,i,s,a]=xu(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Qn(this)}copy(){return this.era?new ud(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new ud(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return no(this,t)}subtract(t){return ip(this,t)}set(t){return ku(io(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return Su(this,t,r,n);default:return sp(this,t,r,n)}}toDate(t,r){return ep(this,t,r)}toString(){return Tu(this)}compare(t){let r=Wh(this,t);return r===0?G1(this,Pn(t)):r}},Mn=class cd{#e;constructor(...t){let[r,n,i,s,a]=xu(t),o=t.shift(),l=t.shift();this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,this.timeZone=o,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Qn(this)}copy(){return this.era?new cd(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new cd(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return ap(this,t)}subtract(t){return lE(this,t)}set(t,r){return cE(this,t,r)}cycle(t,r,n){return uE(this,t,r,n)}toDate(){return nE(this)}toString(){return vE(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-rE(t,this.timeZone).toDate().getTime()}},Au=new Map,hr=class{constructor(e,t={}){this.formatter=fp(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,t);if(t<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,t);if(t<e)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return bE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=_E(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}},gE={true:{ja:"h11"},false:{}};function fp(e,t={}){if(typeof t.hour12=="boolean"&&yE()){t={...t};let i=gE[String(t.hour12)][e.split("-")[0]],s=t.hour12?"h12":"h23";t.hourCycle=i??s,delete t.hour12}let r=e+(t?Object.entries(t).sort((i,s)=>i[0]<s[0]?-1:1).join():"");if(Au.has(r))return Au.get(r);let n=new Intl.DateTimeFormat(e,t);return Au.set(r,n),n}var Cu=null;function yE(){return Cu==null&&(Cu=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Cu}var Ou=null;function bE(){return Ou==null&&(Ou=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Ou}function _E(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=fp(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(s=>s.type==="hour").value,10),i=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(s=>s.type==="hour").value,10);if(n===0&&i===23)return"h23";if(n===24&&i===23)return"h24";if(n===0&&i===11)return"h11";if(n===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}var wE={dayMonth:{month:"numeric",day:"numeric"},short:{year:"numeric",month:"numeric",day:"numeric"}};function hp(e,t){const r=up(e,"Europe/Berlin");return new hr(t,{timeZone:r.timeZone,hour:"numeric",minute:"numeric"}).format(r.toDate())}function kE(e,t,r){const n=up(e instanceof Date?e.toISOString():e,"Europe/Berlin");return new hr(r,{timeZone:n.timeZone,...wE[t]}).format(n.toDate())}function oo(e){return e?.type==="Ticket"}function Vr(e){const t=e;return!!t&&t.type==="Ticket"&&t.is_mantle===!0&&!!t.sub_tickets&&Object.keys(t.sub_tickets).length>0}function qs(e){return Object.entries(e.sub_tickets??{}).map(([t,r])=>({id:Number(t),title:r?.title??"",description:r?.description??null,min_persons:r?.min_persons??0,max_persons:r?.max_persons??0}))}function Us(e,t){return{...e,selectedTime:t?.selectedTime??"",type:"Ticket",subtype:{time_slot:"timeslot",normal:"day",annual:"annual"}[e.ticket_type],shop_order:e.shop_order??0,content:void 0}}function Bs(e,t=""){return qf(Object.values(e).map(r=>Us(r,{selectedTime:t})),r=>r.shop_order)}function Du(e,t){const r=n=>Object.keys(n.total_capacities??{}).find(i=>(n.total_capacities?.[i]??0)>0);return qf(Object.values(e).filter(n=>r(n)||Object.keys(n.total_capacities??{}).length===0).map(n=>Us(n,{selectedTime:r(n)??t})),n=>n.shop_order)}function Vs(e,t=""){let r=Object.entries(e);return t!==""&&(r=r.filter(([,n])=>n.total_capacities?.[t]&&n.total_capacities[t]>0)),Object.fromEntries(r)}var pp=e=>qr(Object.values(e.mantle?.composition??{}));function SE(e){const t=e.quantity??0;return Vr(e.product)?t*pp(e):t}function Iu(e,t,r,n){e.clearPrecart();let i=0;for(const s of[...r.items,...t.items]){if(!oo(s.product))continue;const a=SE(s);s===n&&(i=a),e.addPrecartItemQuantity(s.product.id,a)}return i}var EE=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!oo(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,s=e.quotaManager,a=Iu(s,t,n,r),o=s.ticketCapacity(i.id,i.selectedTime,a),l=s.totalCapacity(i.id,i.selectedTime);return{max:Math.min(i.max_persons||100,o),min:i.min_persons||0,bookedOut:o===0,unavailable:l===0}},TE=function(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxQuantity_Mantle) impossible");if(!Vr(r.product))throw new Error("(maxQuantity_Mantle) impossible");const i=r.product,s=e.quotaManager,a=Iu(s,t,n,r),o=s.ticketCapacity(i.id,i.selectedTime,a),l=s.totalCapacity(i.id,i.selectedTime),c=pp(r),f=c>1?Math.floor(o/c):o;return{max:Math.min(i.max_persons||100,f),min:i.min_persons||0,bookedOut:f===0,unavailable:l===0}},xE=e=>Object.fromEntries(qs(e).map(t=>[t.id,t.max_persons]));function AE(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxSubQuantities) impossible");if(!Vr(r.product))throw new Error("(maxSubQuantities) impossible");const i=r.product,s=r.quantity??0;let a=1/0;return s>0&&(Iu(e.quotaManager,t,n,r),a=Math.floor(e.quotaManager.ticketCapacity(i.id,i.selectedTime,0)/s)),Object.fromEntries(qs(i).map(o=>[o.id,Math.min(o.max_persons,(r.mantle?.composition?.[o.id]??0)+a)]))}function js(e){return e?.type==="Event"}function CE(e){return js(e)&&e.subtype==="scale"}function OE(e,t,r){const n={type:"Event",id:t,tax_included:!0,...e};if(r?.date){const i=r.date;r.date_title=i.title||"",r.date_description=i.description||"",r.event_title=i.event_title||"",r.event_subtitle=i.event_sub_title||"",r.price_title=e.title||"",r.price_description=e.description||""}return{dateId:t,minAvailableCapacity:0,selectedTime:"",...r,...n,...e,type:"Event",subtype:e.scale_price_id===void 0?"flat":"scale"}}function Pu(e,t,r){return OE(e,t,r)}var DE=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!js(r.product))throw new Error("(getMaxQuantitySeats) impossible");const i=r.product.dateId,s=e.allSeats[i];if(!s)return console.error("(getMaxQuantity) no seats found for dateId",i),{max:0,min:0,unavailable:!0,bookedOut:!1};const a=Math.min(s.max||100,s.max_per_registration||100,s.available??100),o={max_per_registration:a,available:100,overbook:!1,...s};let l=a;o.overbook&&(l=Math.min(o.max||100,o.max_per_registration||100));const c=n.totalQuantity,f=qr(t.items.filter(p=>n.items.some(h=>h.uuid===p.uuid)),p=>p.quantity),u=Math.max(l-f-c+r.quantity,0);return{max:u,min:o.min??0,unavailable:o.available===0,bookedOut:u===0}},IE=function(e,t,r,n){if(e.capacityPolicy(r)!=="unlimited")throw new Error("(getMaxQuantityUnlimited) impossible");return{max:r.product.max_persons??100,min:r.product.min_persons??0,unavailable:!1,bookedOut:!1}};function PE(e){return{apiData:e,_timeslots:[],addQuotas(t){this._timeslots=[],this.apiData={...this.apiData,...t}},precart:{},clearPrecart(){this.precart={},this._timeslots=[]},setPrecartItemQuantity(t,r){this.precart[t]=r,this._timeslots=[]},addPrecartItemQuantity(t,r){this.precart[t]=(this.precart[t]??0)+r,this._timeslots=[]},getPrecartItemQuantity(t){return this.precart[t]??0},timeslots(){return this._timeslots.length===0&&(this._timeslots=Object.entries(this.apiData).flatMap(([t,r])=>Object.keys(r.capacities).map(n=>{const i=qr(r.ticket_ids.map(s=>this.getPrecartItemQuantity(s)));return{timeSlot:n,quota:t,capacity:r.capacities[n]-i,tickets:r.ticket_ids,totalCapacity:r.total_capacities[n]}}))),this._timeslots},filterBy({timeslot:t,ticketId:r,date:n}={}){let i=this.timeslots();return r&&(i=i.filter(s=>s.tickets.includes(r))),t&&(i=i.filter(s=>s.timeSlot===t)),n&&(i=i.filter(s=>s.timeSlot.startsWith(n))),i.flatMap(s=>s.tickets.map(a=>({timeslot:t,ticket:a,quota:s.quota,capacity:s.capacity,totalCapacity:s.totalCapacity})))},ticketCapacity(t,r,n=this.getPrecartItemQuantity(t)){const i=eu(this.filterBy({timeslot:r,ticketId:t}).map(s=>s.capacity))??0;return Math.max(0,i+n)},totalCapacity(t,r){return eu(this.filterBy({timeslot:r,ticketId:t}).map(n=>n.totalCapacity))??0},timeslotsOn(t,r){let n=this.timeslots().filter(s=>s.timeSlot.startsWith(t.toString()));r&&(n=n.filter(s=>s.tickets.some(a=>r.includes(a))));const i=aw(n,s=>s.timeSlot);return Object.values(i).map(s=>ow(lw(s.flatMap(a=>a.tickets)).map(a=>eu(s.filter(o=>o.tickets.includes(a)),o=>o.capacity)).filter(a=>a!==null),a=>a.capacity)??s[0]).sort((s,a)=>s.timeSlot.localeCompare(a.timeSlot))}}}function ME(e){let t=0;_s(()=>{ve(()=>{if(e.items.length===t)return;const r=e.items.length>t?"go-cart-item-added":"go-cart-item-removed";t=e.items.length,document.dispatchEvent(new CustomEvent(r,{detail:e.items.length}))})})}function yt(e){let t;try{t=new Intl.NumberFormat(x.locale??"de",{style:"currency",currency:x.currency??"EUR"})}catch{t=new Intl.NumberFormat("de",{style:"currency",currency:"EUR"})}return t.format((e??0)/100)}function on(e){if(!e)return;const t=e.split(",").map(r=>r.trim()).map(Number).filter(r=>!isNaN(r)&&r>0);return t.length>0?t:void 0}function mp(e){return e?.type==="Tour"}function vp(e,t){return{...e,type:"Tour",description:"",price_cents:e.totalPriceCents,tax_included:!0,vat_pct:0,instanceKey:t?.instanceKey??crypto.randomUUID(),wire:$E(e)}}function $E(e){const t={language_id:e.languageId};return e.quantities?t.quantities=e.quantities:t.quantity=e.participants,e.gradeId!=null&&(t.grade_id=e.gradeId),e.ageGroupId!=null&&(t.age_group_id=e.ageGroupId),e.surcharges&&(t.surcharges=e.surcharges),e.equipment&&(t.equipment=e.equipment),e.attendees&&(t.attendees=e.attendees),e.customs&&(t.customs=e.customs),t}function FE(e){const{type:t,description:r,price_cents:n,tax_included:i,vat_pct:s,instanceKey:a,wire:o,...l}=e;return vp({...l,totalPriceCents:n},{instanceKey:a})}var NE=0;function ot(e,t){const r={quantity:0,time:"",...t??{}};return Vr(e)&&(r.mantle={composition:r.mantle?.composition??Object.fromEntries(qs(e).map(n=>[n.id,n.max_persons])),key:r.mantle?.key??`mantle-${NE++}`}),{...r,quantity:r.quantity??0,time:r.time??"",type:e.type,product:e,orderAttributes(){const n={shipped_with_merchandise_id:null,shipping_mode:"email",id:this.product.id,uuid:this.uuid};switch(e.type){case"Ticket":return{...n,time:this.time,quantity:this.quantity,...Vr(this.product)&&this.mantle?{sub_ticket_quantities:this.mantle.composition}:{}};case"Event":switch(e.subtype){case"flat":return{...n,quantity:this.quantity};case"scale":return{...n,quantities:{[e.scale_price_id]:this.quantity}};default:throw new Error(`(orderAttributes) Unhandled Event subtype: ${e}`)}case"Coupon":return{...n,quantity:this.quantity};case"Tour":return{...n,start_time:this.time,...e.wire};default:throw new Error(`(orderAttributes) Unhandled product type: ${e}`)}},get uuid(){return this.type+"-"+this.product.id+this.subUId},get subUId(){const n=[];return this.time&&n.push(`time: ${this.time}`),CE(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),mp(this.product)&&n.push(`tour: ${this.product.instanceKey}`),this.display?.discounted&&n.push("discounted"),Vr(this.product)&&this.mantle?.key&&n.push(`mantle_key: ${this.mantle.key}`),this.voucher?.code&&n.push(`voucher_code: ${this.voucher.code}`),n.length>0?` (${n.join(", ")})`:""},toString(){return this.uuid+":"+this.quantity},get price_cents(){const n="dynamic_prices"in this.product?this.product.dynamic_prices:null;return this.time&&n?.[this.time]!=null?n[this.time]:this.product.price_cents},get price_formatted(){return yt(this.price_cents)},get final_price_cents(){const n=this.product.tax_included?1:1+this.product.vat_pct/100;return this.price_cents*n},get final_price_formatted(){return yt(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return yt(this.total_price_cents)}}}var cN=15*6e4;function lo(){return typeof window<"u"&&typeof localStorage<"u"}function RE(e,t){if(lo())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Mu(e){if(!lo())return null;try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(t){return console.warn(`Failed to load from localStorage (${e}):`,t),null}}function gp(e){if(lo())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}function yp(e){return{...e,description:"",tax_included:!0,type:"Coupon"}}var bp="go-cart",uo=(e,t)=>localStorage.setItem(bp,JSON.stringify({items:e,coupons:t,savedAt:Date.now()}));function LE(e){const t=e.product.type;switch(t){case"Ticket":return $u(e)?ot(Us(e.product,{selectedTime:e.product.selectedTime}),{time:e.time,quantity:e.quantity,mantle:e.mantle,voucher:e.voucher}):void 0;case"Event":return $u(e)?ot(Pu(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;case"Tour":return $u(e)?ot(FE(e.product),{time:e.time,quantity:e.quantity}):void 0;case"Coupon":return ot(yp(e.product),{quantity:e.quantity});default:throw new Error(`Unhandled case: ${t}`)}}function zE(e){let t=[],r=[],n;try{const i=localStorage.getItem(bp);if(!i)return[];const s=JSON.parse(i);if(Array.isArray(s))t=s,r=[];else if(typeof s=="object"&&s!==null)t=s.items||[],r=s.coupons||[],n=s.savedAt;else throw console.dir({parsed:s,content:i}),new Error("go-cart has invalid format");return n&&Date.now()-n>9e5?(e.clearItems(),e.clearCoupons(),uo([],[]),[]):(t.length===0?e.clearItems():e.items=t.map(LE).filter(VE),e.clearCoupons(),r.forEach(a=>e.addCoupon(typeof a=="string"?{code:a,kind:"actionToken"}:a)),e.items)}catch(i){return console.error(i),uo([],[]),[]}}function qE(e){zE(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});uo(e.items||[],e.coupons||[]),_s(()=>{ve(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});r!==t&&(t=r,uo(e.items||[],e.coupons||[]))})})}var UE=e=>new Date<new Date(e),BE=e=>ao(e.slice(0,10)).compare(Di(Xt()))>=0,$u=e=>e.time?e.product.subtype==="day"?BE(e.time):UE(e.time):!0,VE=e=>e!==void 0,jE=0;function Pi(e,t=20){const r=Me([]),n=Me([]);let i=ae(void 0);const s={items:r,coupons:n,get paymentModeId(){return d(i)},set paymentModeId(a){$(i,a,!0)},uid:`cart-${jE++}`,get nonEmptyItems(){return this.items.filter(a=>a.quantity>0)},get totalPriceCents(){return Math.max(0,qr(this.items,a=>a.total_price_cents))},get totalQuantity(){return qr(this.items,a=>a.quantity)},get valueVoucherCents(){return qr(this.coupons.filter(a=>a.kind==="valueVoucher"),a=>a.valueCents??0)},get amountToPayCents(){return Math.max(0,this.totalPriceCents-this.valueVoucherCents)},toString(){return this.uid+" > ["+this.items.map(a=>a.uuid+":"+a.quantity).join(", ")+"]"},orderData(){return{items:this.items.map(a=>({type:a.type,attributes:a.orderAttributes()})),shipping_address_id:null,comment:null,reference:null,payment_mode_id:this.paymentModeId??x.settings?.defaultPaymentModeId,coupons:this.coupons.map(a=>a.code),donations:[],affiliate:{},total:this.amountToPayCents}},get totalFormatted(){return yt(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(a){for(let o=this.items.length-1;o>=0;o--)this.items[o].uuid===a.uuid&&this.items.splice(o,1);a?.voucher?.code&&!this.items.some(o=>o.voucher?.code===a.voucher.code)&&this.removeCoupon(a.voucher.code)},addItem(a){const o=this.items.find(l=>l.uuid===a.uuid);o?o.quantity+=a.quantity:this.items.push(a)},addItems(a){a.forEach(o=>this.addItem(o))},addCoupon(a){const o={...a,code:a.code.toUpperCase()};this.coupons.some(l=>l.code===o.code)||this.coupons.push(o)},removeCoupon(a){const o=a.toUpperCase(),l=this.coupons.findIndex(c=>c.code===o);if(l>-1){const[c]=this.coupons.splice(l,1);if(c.kind==="serviceVoucher")for(let f=this.items.length-1;f>=0;f--)this.items[f].voucher?.code===o&&this.items.splice(f,1)}},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()}};return e&&e.forEach(a=>s.addItem(ot(a))),s}function ZE(){const e=Me(Pi());return qE(e),ME(e),e}var Mi="go-capacity";function _p(e,t){const r=Mu(Mi);RE(Mi,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function wp(e){const t=Mu(Mi);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){gp(Mi);return}if(t.allSeats)for(const r in t.allSeats){const n=parseInt(r);e.addSeats(n,t.allSeats[n],!1)}t.allQuotas&&e.addQuotas(t.allQuotas,!1)}}function WE(e){lo()&&window.addEventListener("storage",t=>{if(t.key===Mi&&wp(e),t.key==="go-cart"){const r=Mu("go-cart");(!r||!r.items||r.items.length===0)&&gp(Mi)}})}function kp(){const e={allSeats:{},allQuotas:{},quotaManager:PE({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&_p(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&_p(this.allSeats,this.allQuotas)},capacityPolicy(t){const r=t.product.type;switch(r){case"Ticket":const n=t.product,i=n.subtype;switch(i){case"timeslot":case"event:ticket":case"day":return Vr(n)?"mantle":"quotas";case"annual":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${i}`)}case"Event":const s=t.product.subtype;switch(s){case"flat":case"scale":return"seats";default:throw new Error(`(getMaxAvailability) Unhandled case: ${s}`)}case"Coupon":return"unlimited";case"Tour":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${r}`)}},capacity(t,r,n){const i=this.capacityPolicy(r),s={quotas:EE,mantle:TE,seats:DE,unlimited:IE}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Re(()=>s(this,t,r,n))},subTicketMaxes(t,r,n){if(!Vr(r.product))return{};const i=this.capacityPolicy(r);if(i!=="mantle"&&i!=="unlimited")throw new Error(`(subTicketMaxes) impossible: ${i}`);return Re(()=>i==="mantle"?AE(this,t,r,n):xE(r.product))}};return wp(e),WE(e),e}function Sp(e){if(typeof document>"u"||!e)return;const t=`; ${document.cookie}`.split(`; ${e}=`);if(t.length===2){const r=t.pop()?.split(";").shift();return r?decodeURIComponent(r):void 0}}var Ep=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},HE=class extends Ep{constructor(){super()}get isLoggedIn(){try{const e=Sp("auth_headers");if(!e)return!1;const t=JSON.parse(e),r=Math.floor(Date.now()/1e3);return!t["access-token"]||parseInt(t.expiry,10)<r?!1:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.uid)}catch{return!1}}get isGuest(){if(this.isLoggedIn)return!1;try{const e=Sp("auth_headers");if(!e)return!0;const t=JSON.parse(e);return typeof t.uid=="string"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.uid)}catch{return!0}}},GE=class extends Ep{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},KE=e=>{switch(e){case"angular":return new HE;case"jmb":return new GE;default:throw new Error("Unhandled shop type: "+e)}};function YE(e){return e==null||typeof e=="string"&&e.trim()===""}function JE(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||YE(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function QE(e,t){return JE(e,t)}var XE={withStackTrace:!1},Tp=(e,t,r=XE)=>({data:t.isOk()?{type:"Ok",value:t.value}:{type:"Err",value:t.error},message:e,stack:r.withStackTrace?new Error().stack:void 0});function Xn(e,t,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(f){try{c(n.next(f))}catch(u){a(u)}}function l(f){try{c(n.throw(f))}catch(u){a(u)}}function c(f){f.done?s(f.value):i(f.value).then(o,l)}c((n=n.apply(e,t||[])).next())})}function xp(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function jr(e){return this instanceof jr?(this.v=e,this):new jr(e)}function Ap(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(h){return function(g){return Promise.resolve(g).then(h,u)}}function o(h,g){n[h]&&(i[h]=function(v){return new Promise(function(m,y){s.push([h,v,m,y])>1||l(h,v)})},g&&(i[h]=g(i[h])))}function l(h,g){try{c(n[h](g))}catch(v){p(s[0][3],v)}}function c(h){h.value instanceof jr?Promise.resolve(h.value.v).then(f,u):p(s[0][2],h)}function f(h){l("next",h)}function u(h){l("throw",h)}function p(h,g){h(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}function eT(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,s){t[i]=e[i]?function(a){return(r=!r)?{value:jr(e[i](a)),done:!1}:s?s(a):a}:s}}function tT(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof xp=="function"?xp(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(a){return new Promise(function(o,l){a=e[s](a),i(o,l,a.done,a.value)})}}function i(s,a,o,l){Promise.resolve(l).then(function(c){s({value:c,done:o})},a)}}var ei=class br{constructor(t){this._promise=t}static fromSafePromise(t){return new br(t.then(r=>new Wr(r)))}static fromPromise(t,r){return new br(t.then(n=>new Wr(n)).catch(n=>new Sr(r(n))))}static fromThrowable(t,r){return(...n)=>new br(Xn(this,void 0,void 0,function*(){try{return new Wr(yield t(...n))}catch(i){return new Sr(r?r(i):i)}}))}static combine(t){return rT(t)}static combineWithAllErrors(t){return nT(t)}map(t){return new br(this._promise.then(r=>Xn(this,void 0,void 0,function*(){return r.isErr()?new Sr(r.error):new Wr(yield t(r.value))})))}andThrough(t){return new br(this._promise.then(r=>Xn(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);const n=yield t(r.value);return n.isErr()?new Sr(n.error):new Wr(r.value)})))}andTee(t){return new br(this._promise.then(r=>Xn(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);try{yield t(r.value)}catch{}return new Wr(r.value)})))}orTee(t){return new br(this._promise.then(r=>Xn(this,void 0,void 0,function*(){if(r.isOk())return new Wr(r.value);try{yield t(r.error)}catch{}return new Sr(r.error)})))}mapErr(t){return new br(this._promise.then(r=>Xn(this,void 0,void 0,function*(){return r.isOk()?new Wr(r.value):new Sr(yield t(r.error))})))}andThen(t){return new br(this._promise.then(r=>{if(r.isErr())return new Sr(r.error);const n=t(r.value);return n instanceof br?n._promise:n}))}orElse(t){return new br(this._promise.then(r=>Xn(this,void 0,void 0,function*(){return r.isErr()?t(r.error):new Wr(r.value)})))}match(t,r){return this._promise.then(n=>n.match(t,r))}unwrapOr(t){return this._promise.then(r=>r.unwrapOr(t))}safeUnwrap(){return Ap(this,arguments,function*(){return yield jr(yield jr(yield*eT(tT(yield jr(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return Ap(this,arguments,function*(){const r=yield jr(this._promise);return r.isErr()&&(yield yield jr(co(r.error))),yield jr(r.value)})}};function co(e){return new ei(Promise.resolve(new Sr(e)))}var dN=ei.fromPromise,fN=ei.fromSafePromise,hN=ei.fromThrowable,Cp=e=>{let t=$n([]);for(const r of e)if(r.isErr()){t=Zr(r.error);break}else t.map(n=>n.push(r.value));return t},rT=e=>ei.fromSafePromise(Promise.all(e)).andThen(Cp),Op=e=>{let t=$n([]);for(const r of e)r.isErr()&&t.isErr()?t.error.push(r.error):r.isErr()&&t.isOk()?t=Zr([r.error]):r.isOk()&&t.isOk()&&t.value.push(r.value);return t},nT=e=>ei.fromSafePromise(Promise.all(e)).andThen(Op),Fu;(function(e){function t(i,s){return(...a)=>{try{return $n(i(...a))}catch(o){return Zr(s?s(o):o)}}}e.fromThrowable=t;function r(i){return Cp(i)}e.combine=r;function n(i){return Op(i)}e.combineWithAllErrors=n})(Fu||(Fu={}));function $n(e){return new Wr(e)}function Zr(e){return new Sr(e)}var Wr=class{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return $n(e(this.value))}mapErr(e){return $n(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map(t=>this.value)}andTee(e){try{e(this.value)}catch{}return $n(this.value)}orTee(e){return $n(this.value)}orElse(e){return $n(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return ei.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,t){return e(this.value)}safeUnwrap(){const e=this.value;return(function*(){return e})()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw Tp("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},Sr=class{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return Zr(this.error)}mapErr(e){return Zr(e(this.error))}andThrough(e){return Zr(this.error)}andTee(e){return Zr(this.error)}orTee(e){try{e(this.error)}catch{}return Zr(this.error)}andThen(e){return Zr(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return co(this.error)}asyncAndThrough(e){return co(this.error)}asyncMap(e){return co(this.error)}unwrapOr(e){return e}match(e,t){return t(this.error)}safeUnwrap(){const e=this.error;return(function*(){throw yield Zr(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw Tp("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},pN=Fu.fromThrowable,iT=/\{[^{}]+\}/g,sT=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function aT(){return Math.random().toString(36).slice(2,11)}function oT(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:s,pathSerializer:a,headers:o,requestInitExt:l=void 0,...c}={...e};l=sT()?l:void 0,t=$p(t);const f=[];async function u(p,h){const{baseUrl:g,fetch:v=n,Request:m=r,headers:y,params:S={},parseAs:k="json",querySerializer:E,bodySerializer:A=s??uT,pathSerializer:O,body:F,middleware:R=[],...Y}=h||{};let N=t;g&&(N=$p(g)??t);let X=typeof i=="function"?i:Pp(i);E&&(X=typeof E=="function"?E:Pp({...typeof i=="object"?i:{},...E}));const q=O||a||lT,le=F===void 0?void 0:A(F,Mp(o,y,S.header)),he=Mp(le===void 0||le instanceof FormData?{}:{"Content-Type":"application/json"},o,y,S.header),j=[...f,...R],oe={redirect:"follow",...c,...Y,body:le,headers:he};let ee,fe,ce=new m(cT(p,{baseUrl:N,params:S,querySerializer:X,pathSerializer:q}),oe),de;for(const P in Y)P in ce||(ce[P]=Y[P]);if(j.length){ee=aT(),fe=Object.freeze({baseUrl:N,fetch:v,parseAs:k,querySerializer:X,bodySerializer:A,pathSerializer:q});for(const P of j)if(P&&typeof P=="object"&&typeof P.onRequest=="function"){const te=await P.onRequest({request:ce,schemaPath:p,params:S,options:fe,id:ee});if(te)if(te instanceof m)ce=te;else if(te instanceof Response){de=te;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!de){try{de=await v(ce,l)}catch(P){let te=P;if(j.length)for(let L=j.length-1;L>=0;L--){const be=j[L];if(be&&typeof be=="object"&&typeof be.onError=="function"){const Z=await be.onError({request:ce,error:te,schemaPath:p,params:S,options:fe,id:ee});if(Z){if(Z instanceof Response){te=void 0,de=Z;break}if(Z instanceof Error){te=Z;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(te)throw te}if(j.length)for(let P=j.length-1;P>=0;P--){const te=j[P];if(te&&typeof te=="object"&&typeof te.onResponse=="function"){const L=await te.onResponse({request:ce,response:de,schemaPath:p,params:S,options:fe,id:ee});if(L){if(!(L instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");de=L}}}}const G=de.headers.get("Content-Length");if(de.status===204||ce.method==="HEAD"||G==="0"&&!de.headers.get("Transfer-Encoding")?.includes("chunked"))return de.ok?{data:void 0,response:de}:{error:void 0,response:de};if(de.ok)return{data:await(async()=>{if(k==="stream")return de.body;if(k==="json"&&!G){const te=await de.text();return te?JSON.parse(te):void 0}return await de[k]()})(),response:de};let Q=await de.text();try{Q=JSON.parse(Q)}catch{}return{error:Q,response:de}}return{request(p,h,g){return u(h,{...g,method:p.toUpperCase()})},GET(p,h){return u(p,{...h,method:"GET"})},PUT(p,h){return u(p,{...h,method:"PUT"})},POST(p,h){return u(p,{...h,method:"POST"})},DELETE(p,h){return u(p,{...h,method:"DELETE"})},OPTIONS(p,h){return u(p,{...h,method:"OPTIONS"})},HEAD(p,h){return u(p,{...h,method:"HEAD"})},PATCH(p,h){return u(p,{...h,method:"PATCH"})},TRACE(p,h){return u(p,{...h,method:"TRACE"})},use(...p){for(const h of p)if(h){if(typeof h!="object"||!("onRequest"in h||"onResponse"in h||"onError"in h))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");f.push(h)}},eject(...p){for(const h of p){const g=f.indexOf(h);g!==-1&&f.splice(g,1)}}}}function fo(e,t,r){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function Dp(e,t,r){if(!t||typeof t!="object")return"";const n=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if(r.style!=="deepObject"&&r.explode===!1){for(const o in t)n.push(o,r.allowReserved===!0?t[o]:encodeURIComponent(t[o]));const a=n.join(",");switch(r.style){case"form":return`${e}=${a}`;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return a}}for(const a in t){const o=r.style==="deepObject"?`${e}[${a}]`:a;n.push(fo(o,t[a],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function Ip(e,t,r){if(!Array.isArray(t))return"";if(r.explode===!1){const s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",a=(r.allowReserved===!0?t:t.map(o=>encodeURIComponent(o))).join(s);switch(r.style){case"simple":return a;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return`${e}=${a}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const s of t)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?s:encodeURIComponent(s)):i.push(fo(e,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function Pp(e){return function(r){const n=[];if(r&&typeof r=="object")for(const i in r){const s=r[i];if(s!=null){if(Array.isArray(s)){if(s.length===0)continue;n.push(Ip(i,s,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(Dp(i,s,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(fo(i,s,e))}}return n.join("&")}}function lT(e,t){let r=e;for(const n of e.match(iT)??[]){let i=n.substring(1,n.length-1),s=!1,a="simple";if(i.endsWith("*")&&(s=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(a="label",i=i.substring(1)):i.startsWith(";")&&(a="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const o=t[i];if(Array.isArray(o)){r=r.replace(n,Ip(i,o,{style:a,explode:s}));continue}if(typeof o=="object"){r=r.replace(n,Dp(i,o,{style:a,explode:s}));continue}if(a==="matrix"){r=r.replace(n,`;${fo(i,o)}`);continue}r=r.replace(n,a==="label"?`.${encodeURIComponent(o)}`:encodeURIComponent(o))}return r}function uT(e,t){return e instanceof FormData?e:t&&(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])==="application/x-www-form-urlencoded"?new URLSearchParams(e).toString():JSON.stringify(e)}function cT(e,t){let r=`${t.baseUrl}${e}`;t.params?.path&&(r=t.pathSerializer(r,t.params.path));let n=t.querySerializer(t.params.query??{});return n.startsWith("?")&&(n=n.substring(1)),n&&(r+=`?${n}`),r}function Mp(...e){const t=new Headers;for(const r of e){if(!r||typeof r!="object")continue;const n=r instanceof Headers?r.entries():Object.entries(r);for(const[i,s]of n)if(s===null)t.delete(i);else if(Array.isArray(s))for(const a of s)t.append(i,a);else s!==void 0&&t.set(i,s)}return t}function $p(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function dT(e,t){return oT({baseUrl:e,headers:{"X-Shop-Url":t}})}var fT="/api/v4/calendar",hT="/api/v4/tickets/calendar",pT="/api/v4/auth/validate_token",mT="/api/v4/tickets/list_and_quotas",vT="/api/v4/tickets",gT="/api/v4/auth/sign_in",yT="/api/v4/auth",bT="/api/v4/orders/withdrawals",_T="/api/v4/customer/memberships/activate",wT="/api/v4/orders",kT="/api/v4/customer/customer_addresses",ST="/api/v4/customer/memberships",Fp={SHOP_GUEST:10,SHOP:20},ho={error:{success:!1,errors:["Not signed in"]}},Np=K_,ET=class{type;#e=ae(Me({customerSalutations:[],countries:[],locales:[]}));#t={};constructor(e,t,r,n="angular"){this.type=n,e&&t&&r&&this.load(e,t,r,n)}async load(e,t,r,n="angular"){(e.includes("jmb-staging.gomus.de")||e.includes("jmb.gomus.de"))&&(this.type="jmb"),d(this.#e).urls=J_(this.type),d(this.#e).currentUser=KE(this.type),d(this.#e).apiUrl=e,d(this.#e).shopDomain=t,d(this.#e).locale=r||"de",W_(d(this.#e).locale),this.#t={},d(this.#e).client=dT(e,t),d(this.#e).capacityManager=kp(),d(this.#e).cart=ZE(),d(this.#e).auth=new Bf,d(this.#e).client.use(new cw(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return d(this.#e).capacityManager||(d(this.#e).capacityManager=kp()),d(this.#e).capacityManager}get cart(){return d(this.#e).cart}get auth(){return d(this.#e).auth||(d(this.#e).auth=new Bf),d(this.#e).auth}get currentUser(){return d(this.#e).currentUser}get slug(){return this.shopDomain?.match(/^(?:https?:\/\/)?([^.-]+)/)?.[1]}get client(){return d(this.#e).client}get name(){return this.shop?.name}get config(){return this.shop?.config}get payment_modes(){return this.shop?.payment_modes}get content(){return this.shop?.content}get settings(){return this.shop?.settings}get donations(){return this.shop?.config.donations}get translations(){return{...Np[(this.locale??"en").toLowerCase().split(/[-_]/)[0]]??Np.en,...this.shop?.translations}}get currency(){return this.shop?.config.currency}t(e,t){return this.translate(e,t)}translate(e,t){if(!this.translations?.[e])return e;let r=this.translations[e];if(t&&r)for(const[n,i]of Object.entries(t))r=r.replace(`{{${n}}}`,i);return r||""}get apiUrl(){return d(this.#e).apiUrl}get shopDomain(){return d(this.#e).shopDomain}get baseUrl(){return"https://"+this.shopDomain}get locale(){return d(this.#e).locale??"de"}formatTime(e){return hp(e,this.locale)}formatDate(e,t){return kE(e,t,this.locale)}get shop(){return this.fetchAndCache("/api/v4/shop","shop","shop")}get _data(){return d(this.#e)}getCustomer(){return this.auth.data.accessToken?this.fetchAndCache(pT,"getCustomer","",{cache:5}):ho}getOrders(e={}){return this.auth.data.accessToken?this.fetchAndCache(wT,`orders-${JSON.stringify(e)}`,"",{cache:5,query:e}):ho}getCustomerAddresses(){return this.auth.data.accessToken?this.fetchAndCache(kT,"customerAddresses","",{cache:5}):ho}getCustomerMemberships(){return this.auth.data.accessToken?this.fetchAndCache(ST,"customerMemberships","",{cache:5}):ho}ticketsCalendar(e){return this.fetchAndCache(hT,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(fT,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(mT,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:Vt({per_page:100},e??{})})}tickets(e){return this.fetchAndCache(vT,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:Vt({per_page:100},e??{})})}ticketsContent(e){return this.fetchAndCache("/api/v4/tickets/content",`ticketsContent-${JSON.stringify(e)}`,"data",{cache:300,query:Vt({"ticket_ids[]":e},{per_page:100})})}signIn(e){return this.apiPost(gT,{body:e,requiredFields:["email","password"]})}signUp(e,t=!1){e=Vt({addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:t?Fp.SHOP_GUEST:Fp.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(yT,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(bT,{body:t,requiredFields:["order_id","first_name","last_name","email"],parseAs:"text"})}getDates(e){return this.fetchAndCache("/api/v4/dates",`dates-${JSON.stringify(e)}`,"dates",{query:Vt({per_page:100},e),cache:60})}updatePassword(e){return this.apiPut("/api/v4/auth/password",{body:e,requiredFields:["current_password","password","password_confirmation"]})}passwordReset(e){return this.apiPost("/api/v4/auth/password",{body:e,requiredFields:["email"]})}setNewPassword(e,t){return this.apiPut("/api/v4/auth/password",{body:e,requiredFields:["password","password_confirmation"],params:{header:t}})}activateMembership(e){return this.apiPost(_T,{body:e,requiredFields:["email"],parseAs:"text"})}checkout(e){return this.apiPost("/api/v4/orders",{body:e,requiredFields:["items","total"]})}#r=null;async createCart(e){const t=JSON.stringify({items:e.items??[],coupons:e.coupons??[]});if(this.#r?.key===t)return this.#r.result;const r=await this.apiPost("/api/v4/cart",{body:e,requiredFields:["items"]});return this.#r={key:t,result:r},r}order(e){return this.fetchAndCache("/api/v4/orders/{id}",`order-${e}`,"order",{path:{id:e}})}annualOrder(e){return this.fetchAndCache("/api/v4/annual/order",`annual-order-${e}`,"order",{query:{token:e}})}finalizePersonalizations(e,t){return this.apiPost("/api/v4/annual/personalization/finalize",{body:t,params:{query:{token:e}}})}uploadPersonalizationPhoto(e,t,r){const n=new FormData;return n.append("file",r),this.apiUpload("/api/v4/annual/personalizations/{id}/upload",{body:n,params:{path:{id:t},query:{token:e}}})}fetchAndCache(e,t,r,n){if(n??={},n.query??={},n.cache??=1e3,n.path??={},!this.#i())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),d(this.#e)[t];const i=n.query,s=e+JSON.stringify(i),a=!this.#t[s],o=this.#t[s]?.fetchedAt<Date.now()-n.cache*1e3;return(a||o)&&this.apiGet(e,i,n.path).then(l=>{l&&(d(this.#e)[t]=r===""?l:l[r])}),d(this.#e)[t]}get museums(){return this.fetchAndCache("/api/v4/museums","museums","museums",{query:{per_page:100}})}get exhibitions(){return this.fetchAndCache("/api/v4/exhibitions","exhibitions","exhibitions",{query:{per_page:100}})}getEvent(e){return this.fetchAndCache(`/api/v4/events/${e}`,`single_event_${e}`,"event")}getTicketCapacities(e,t){return this.apiPost("/api/v4/tickets/capacities",{body:{date:e,ticket_ids:t},requiredFields:["date","ticket_ids"]})}getCouponSaleByBarcode(e){return this.fetchAndCache(`/api/v4/coupon_sales/barcode/${e}`,`coupon_sale_barcode_${e}`,"coupon_sale",{cache:0})}getCoupons(){return this.fetchAndCache("/api/v4/coupons","coupons","coupons",{query:{online_available:!0,per_page:100}})}getEventDetailsOnDate(e,t){return this.fetchAndCache(`/api/v4/events/${e}/dates/${t}`,`/api/v4/events/${e}/dates/${t}`,"date")}get events(){return this.fetchAndCache("/api/v4/events","events","events",{query:{per_page:100}})}get upcomingEvents(){return this.fetchAndCache("/api/v4/events","events","events",{query:{by_bookable:!0,with_bookings_in_future:1,per_page:100}})}get tours(){return this.fetchAndCache("/api/v4/tours","tours","tours",{query:{per_page:100}})}get merchandises(){return this.fetchAndCache("/api/v4/merchandises","merchandises","merchandises",{query:{per_page:100}})}get customerSalutations(){return this.fetchAndCache("/api/v3/customer_salutations","customerSalutations","customer_salutations")}get countries(){return this.fetchAndCache("/api/v3/countries","countries","countries",{query:{per_page:100}})}get locales(){return this.fetchAndCache("/api/v4/locales","locales","locales_options")}get urls(){return d(this.#e).urls}get#n(){return{params:{query:{locale:this.locale},header:{"X-Shop-Url":this.shopDomain}}}}async apiPost(e,t){return this.apiCall(e,{method:"POST",...t})}async apiPut(e,t){return this.apiCall(e,{method:"PUT",...t})}async apiDELETE(e,t){return this.apiCall(e,{method:"DELETE",...t})}async apiUpload(e,t){this.#s();const{body:r,params:n={}}=t;return await this.client.POST(e,{body:r,params:Vt(this.#n,{params:n}).params,bodySerializer:i=>i})}async apiCall(e,t){this.#s();const{body:r,params:n={},requiredFields:i,parseAs:s}=t,a=QE(r,i);if(Object.keys(a).length>0)return{error:{errors:a}};const o=this.client[t.method];return await o(e,{body:r,params:Vt(this.#n,{params:n}).params,parseAs:s})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(t=>t.status==="fetching").length;)await ew(10)}async apiGet(e,t={},r){this.#s();const n=e+JSON.stringify(t);this.#t[n]={status:"fetching",fetchedAt:Date.now()};let i=this.#n;t&&(i=Vt(i,{params:{query:t}})),e&&(i=Vt(i,{params:{path:r}}));const s=await this.client.GET(e,i);return this.#t[n]={status:"completed",fetchedAt:Date.now()},s.data||s}#i=()=>this.apiUrl!==void 0&&this.shopDomain!==void 0&&this.locale!==void 0&&this.client!==void 0;#s=()=>{if(this.apiUrl===void 0)throw new Error("Public API URL is not set");if(this.shopDomain===void 0)throw new Error("Shop Domain (X-Shop-Url) is not set");if(this.locale===void 0)throw new Error("Locale is not set");if(this.client===void 0)throw new Error("client is not set");if(!this.#i())throw new Error("Fetch is not possible.")}},x=new ET;function $i(e){return function(t,r){if(t)t.addEventListener(e,n=>{n.stopPropagation(),n.detail.value=r});else throw new Error("(createSetDetails) Host is undefined, You are probably trying to use this in a non-web-component context.")}}var TT=class cy{host;KEY;pollDuration;#e=ae(Me({value:void 0}));error=!1;constructor(t,r,n=1e3){this.host=t,this.KEY=r,this.pollDuration=n}static static(t){const r=new cy(null,null);return r.value=t,r}load(){Ql(()=>(this.host.dispatchEvent(new CustomEvent(this.KEY,{detail:this,bubbles:!0})),this.value),this.pollDuration).then(()=>{},()=>{this.error=!0,console.warn("(createGetDetails) could not load data for:",this.KEY)})}get value(){return d(this.#e).value}set value(t){d(this.#e).value=t}};function Fi(e){return function(t,r={pollDuration:1e3}){if(t){const n=new TT(t,e,r.pollDuration);return n.load(r.pollDuration),n}else throw new Error("(createGetDetails) Host is undefined, You are probably trying to use this in a non-web-component context.")}}var xT={urls:{},navigateTo:e=>{window.location.assign(e)},forms:{},fields:{},quantityStepper:!0},AT=class{defaultConfig=Vt(xT,window.customOptions);override=this.defaultConfig;#e=ae(Me(this.defaultConfig));get options(){return d(this.#e)}set options(e){$(this.#e,e,!0)}constructor(){this.update()}update(){const e=Vt(this.defaultConfig,this.override);e.forms=Object.keys({...this.defaultConfig.forms,...this.override.forms}).reduce((t,r)=>(t[r]={...this.defaultConfig.forms[r],...this.override.forms[r]},t),{}),this.options=e}get config(){return this.options}define(e){return this.override=Vt(this.override,e),this.update(),this}default(e){return this.defaultConfig=Vt(this.defaultConfig,e),this.update(),this}},Xe=new AT,Rp=class{#e=ae();get token(){return d(this.#e)}set token(e){$(this.#e,e,!0)}#t=ae();get ticketSaleId(){return d(this.#t)}set ticketSaleId(e){$(this.#t,e,!0)}get order(){if(this.token)return hl(x.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return hl(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return Xe.config.urls.annualTicketPersonalizationForm?Xe.config.urls.annualTicketPersonalizationForm(this.token,e.id):x.urls.annualTicketPersonalizationForm(this.token,e.id)}},Lp="go-annual-ticket-personalization",zp=$i(Lp),CT=Fi(Lp),OT=B("<li><a> </a></li>"),DT=B('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function IT(e,t){ne(t,!0);let r=_(t,"token",7);const n=new Rp;zp(t.$$host,n),ve(()=>{n.token=r()});let i=D(()=>n.order);var s={details:n,get token(){return r()},set token(c){r(c),b()}},a=re(),o=U(a),l=c=>{var f=re(),u=U(f);Ne(u,17,()=>d(i).ticket_sales,p=>p.id,(p,h)=>{var g=DT(),v=M(g),m=M(v,!0);I(v);var y=V(v,2),S=M(y,!0);I(y);var k=V(y,2),E=A=>{var O=OT(),F=M(O),R=M(F,!0);I(F),I(O),J((Y,N)=>{me(F,"href",Y),H(R,N)},[()=>n.goToPersonalization(d(h)),()=>x.t("ticket.annual.personalization.list.personalize.add")]),T(A,O)};ue(k,A=>{d(h).status=="not_ready_to_send"&&A(E)}),I(g),J(A=>{me(g,"data-ticket-sale-id",d(h).id),H(m,d(h).title),H(S,A)},[()=>x.t("ticket.annual.personalization.detail.title",{count:d(h).personalizations.length})]),T(p,g)}),T(c,f)};return ue(o,c=>{d(i)&&c(l)}),T(e,a),ie(s)}customElements.define("go-annual-ticket-personalization",se(IT,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));var PT={salutation:{key:"salutation",apiKey:"customer_salutation_id",type:"select",label:"user.registration.form.customer_salutation_id",placeholder:"",description:"",autocomplete:"honorific-prefix",options:()=>x.customerSalutations.map(e=>({label:e.salutation,value:e.id}))},firstName:{key:"firstName",apiKey:"name",type:"text",label:"user.registration.form.name",placeholder:"",description:"",autocomplete:"given-name"},lastName:{key:"lastName",apiKey:"surname",type:"text",label:"user.registration.form.surname",placeholder:"",description:"",autocomplete:"family-name"},email:{key:"email",apiKey:"email",type:"email",label:"user.registration.form.email",placeholder:"",description:"",autocomplete:"email",validator:Qt().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:Qt().email("user.fieldErrors.emailValid")},password:{key:"password",apiKey:"password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"current-password"},currentPassword:{key:"current_password",apiKey:"current_password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"current-password"},newPassword:{key:"password",apiKey:"password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"new-password",validator:Qt().min(6,"user.fieldErrors.passwordTooShort")},confirmPassword:{key:"confirmPassword",apiKey:"password_confirmation",type:"password",label:"user.registration.form.confirmPassword",placeholder:"",description:"",autocomplete:"new-password"},addressee:{key:"addressee",apiKey:"addr_addressat",type:"text",label:"user.registration.form.adressat",placeholder:"",description:"",autocomplete:"name"},street:{key:"street",apiKey:"addr_street",type:"text",label:"user.registration.form.street",placeholder:"",description:"",autocomplete:"street-address"},postcode:{key:"postcode",apiKey:"addr_zip",type:"text",label:"user.registration.form.plz",placeholder:"",description:"",autocomplete:"postal-code"},city:{key:"city",apiKey:"addr_city",type:"text",label:"user.registration.form.city",placeholder:"",description:"",autocomplete:"address-level2"},country:{key:"country",apiKey:"addr_country_id",type:"select",label:"user.registration.form.country",placeholder:"",description:"",autocomplete:"country",options:()=>x.countries.map(e=>({label:e.name,value:e.id}))},language:{key:"language",apiKey:"language_id",type:"select",label:"user.registration.form.language",placeholder:"",description:"",autocomplete:"language",options:()=>(x.locales??[]).map(e=>({label:x.t(`languages.${e.locale}`),value:e.id}))},acceptTerms:{key:"acceptTerms",apiKey:"terms",type:"checkbox",label:"user.registration.form.accept",placeholder:"",description:"",autocomplete:"off"},startAt:{apiKey:"start_at",key:"startAt",type:"date",label:"ticket.annual.personalization.list.startAt.update",placeholder:"",description:"",autocomplete:"off",validator:Qt().date()},dateOfBirth:{key:"dateOfBirth",apiKey:"date_of_birth",type:"date",label:"user.registration.form.dateOfBirth",placeholder:"",description:"",autocomplete:"bday",validator:Qt().date()},token:{key:"token",apiKey:"id",type:"text",label:"cart.coupon.form.code",placeholder:"",description:"",autocomplete:"off"},photo:{key:"photo",apiKey:"file",type:"file",label:"ticket.annual.personalization.form.photo",placeholder:"",description:"",autocomplete:"off",validator:z1(File)},withdrawalFirstName:{key:"withdrawalFirstName",apiKey:"first_name",type:"text",label:"user.registration.form.name",placeholder:"",description:"",autocomplete:"given-name"},withdrawalLastName:{key:"withdrawalLastName",apiKey:"last_name",type:"text",label:"user.registration.form.surname",placeholder:"",description:"",autocomplete:"family-name"},orderNumber:{key:"orderNumber",apiKey:"order_id",type:"text",label:"withdrawal.form.orderNumber",placeholder:"",description:"",autocomplete:"off"},withdrawalNote:{key:"withdrawalNote",apiKey:"note",type:"textarea",label:"withdrawal.form.note",placeholder:"",description:"",autocomplete:"off"},paymentMode:{key:"paymentMode",apiKey:"payment_mode_id",type:"paymentMode",label:"cart.paymentMode.label",placeholder:"",description:"",autocomplete:"off",options:()=>(x.payment_modes?Object.values(x.payment_modes):[]).map(e=>({value:String(e.id),label:e.name}))}};function MT(e,t){return{...e,errors:e.errors||[],value:e.value??$T(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){FT(this)}}}function $T(e){return e==="checkbox"?!1:e==="file"?null:""}function FT(e){if(e.errors=[],!e.validator){e.required&&(e.value===!1||e.value===""||e.value===null||e.value===void 0)&&(e.errors=["common.fieldErrors.required"]);return}const t=e.validator.safeParse(e.value);t.success?e.errors=[]:e.errors=t.error.format()._errors}var Pt=class rl{static#e={};static defineForm(t){Xe.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){Xe.default({fields:t})}static{rl.defineFields(PT)}static setRequiredApiKeys(t,r){rl.#e[t]=r}static getFormOptions(t){return Xe.config.forms[t]}static createField(t,r){const n=rl.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return MT(n,r)}static getFormFields(t){return NT(t)}static getFieldInit(t){return Xe.config.fields[t]}};function NT(e){const t=Xe.config.forms[e];if(!t)throw new Error(`(formFields) Form ${e} not found`);const r=t.fields;return r||(console.warn("(formFields) No fields defined for form",e),[])}function Nu(e){return e?e.filter(t=>t.mounted&&(t.errors?.length||t.apiErrors?.length)).length:0}function RT(e,t){ne(t,!0);let r=_(t,"token",7),n=_(t,"ticketSaleId",7),i=null;const s=new Rp;zp(t.$$host,s),ve(()=>{s.token=r(),s.ticketSaleId=n()}),Pt.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function a(){if(!i)return;const v=s.ticketSale.personalizations.length,m=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),y=Uf(v,(O,F)=>{const R=m[F-1].details;return O.push(R),O},[]);if(y.forEach(O=>{O.fields.forEach(F=>{O.validateField(F)})}),!Uf(v,(O,F)=>y[F-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const O=y.map(async(R,Y)=>{const N=s.ticketSale.personalizations[Y].id,X=R.fields.find(le=>le.key==="photo")?.value;if(!(X instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const q=await x.uploadPersonalizationPhoto(r(),N,X);return q.error?{ok:!1,error:q.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),F=(await Promise.all(O)).find(R=>!R.ok);if(F){i.details.apiErrors=[F.error];return}}const S={personalization:{ticket_sale_id:s.ticketSaleId,start_at:i.details.formData.start_at,personalizations:y.map((O,F)=>{const R=uw(O.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[F].id,customer:R}})}},k=await x.finalizePersonalizations(r(),S);if(k.error){i.details.apiErrors=k.error.error?[k.error.error]:[];return}const E=Xe.config.forms.personalization?.beforeSubmit;E&&E(S);const A=Xe.config.urls.annualTicketPersonalizationFormSubmit?.(r());A&&Xe.config.navigateTo(A)}let o=null,l=null,c=null,f=0;function u(v){v.querySelectorAll("go-field").forEach(m=>m.replaceChildren())}function p(){return o?!0:(o=t.$$host.querySelector("go-personalization-form"),o?(l=o.cloneNode(!0),u(l),c=new Comment("go-personalization-form-anchor"),o.after(c),!0):(console.warn("[personalization] No <go-personalization-form> supplied"),!1))}function h(v){if(!p()||!o||!l||!c)return;const m=o.parentElement;if(!m)return;const y=Math.max(v,1),S=Array.from(m.querySelectorAll("go-personalization-form"));for(;S.length<y;){const E=l.cloneNode(!0);u(E),m.insertBefore(E,c),S.push(E)}for(;S.length>y;){const E=S.pop();E&&E!==o&&E.remove()}const k=s.ticketSale?.personalizations??[];S.forEach((E,A)=>{const O=k[A];O&&(E.dataset.personalizationId=String(O.id))}),f=y}En(()=>{p(),t.$$host.addEventListener("go-submit",a),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),ve(()=>{if(!s.ticketSale)return;const v=s.ticketSale?.personalizations.length??1;v!==f&&h(v)});var g={details:s,get token(){return r()},set token(v){r(v),b()},get ticketSaleId(){return n()},set ticketSaleId(v){n(v),b()}};return ie(g)}customElements.define("go-annual-ticket-personalization-form",se(RT,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var LT=class{formId;form;#e=ae(Me([]));#t=D(()=>Nu(this.fields)==0);get isValid(){return d(this.#t)}set isValid(e){$(this.#t,e)}#r=ae();get successMessage(){return d(this.#r)}set successMessage(e){$(this.#r,e,!0)}get formData(){function e(r){return iw(r)||tw(r)?r:r==="true"||r==="false"?r==="true":!Number.isNaN(+r)&&r.trim()!==""?+r:r}const t=this.fields.filter(r=>r!==void 0).filter(r=>r.type!=="file").filter(r=>r.value!=="");return Object.fromEntries(t.map(r=>[r.apiKey,e(r.value)]))}fieldValue(e){return this.fields.find(t=>t.key===e)?.value}get apiErrors(){return d(this.#e)}set apiErrors(e){if($(this.#e,[],!0),this.fields.forEach(t=>t.apiErrors=[]),Xl(e)){$(this.#e,e,!0);return}if(e.errors&&Xl(e.errors)&&$(this.#e,e.errors,!0),nw(e.error)){$(this.#e,[e.error],!0);return}for(const[t,r]of Object.entries(e)){if(t==="full_messages"||t==="success"||t==="errors")continue;const n=this.fields.find(i=>i.apiKey===t);if(!n){console.error(`(set apiErrors) Field with API key ${t} not found`);continue}n.apiErrors=r}}validateForm(){this.fields.forEach(e=>this.validateField(e))}validateField(e){if(e.validate(),e.apiKey==="password_confirmation"){const t=this.fields.find(r=>r.apiKey==="password");(!t||t&&e.value!==t.value)&&e.errors.push("user.fieldErrors.passwordMatch")}else if(e.apiKey==="email_confirmation"){const t=this.fields.find(r=>r.apiKey==="email");(!t||t&&e.value!==t.value)&&e.errors.push("user.fieldErrors.emailMatch")}}get fields(){const e=this.form.closest("go-form");return Array.from(this.form.querySelectorAll("go-field")).filter(t=>t.closest("go-form")===e).map(t=>t.getField?.()).filter(t=>!!t)}toString(){return`Form: ${this.formId}, Fields: [${this.fields.map(e=>e.key).join(", ")}], Data: ${JSON.stringify(this.formData)}`}fill(e){const t=this.fields;Object.entries(e).forEach(([r,n])=>{const i=t.find(s=>s.apiKey===r);if(!i){console.warn(`(FormDetails.fill) Field with API key ${r} not found.`);return}if(i.type==="select"&&!i.options?.().find(s=>s.value===n))throw new Error(`(FormDetails.fill) Field ${r} has invalid value: ${n}`);if(i.type==="checkbox"&&![!0,!1].includes(n))throw new Error(`(FormDetails.fill) Field ${r} has invalid value: ${n}`);i.value=n})}constructor(e,t){this.formId=e,this.form=t}},qp="go-form-details",zT=$i(qp),Ni=Fi(qp);function Hr(e,t,r){const n=e.firstElementChild||void 0;if(e.children?.length===1&&n?.tagName.toLowerCase()===t)return n;const i=document.createElement(t);r&&Object.entries(r).forEach(([a,o])=>{typeof o=="boolean"?o&&i.setAttribute(a,""):i.setAttribute(a,o)});const s=document.createDocumentFragment();for(;e.firstChild;)s.appendChild(e.firstChild);return i.appendChild(s),e.replaceChildren(i),i}var qT=B("<go-all-fields></go-all-fields> <go-form-feedback><go-errors-feedback></go-errors-feedback> <go-success-feedback></go-success-feedback></go-form-feedback> <go-submit> </go-submit>",3);function UT(e,t){ne(t,!0);let r=_(t,"formId",7),n=_(t,"custom",7);const i=new LT(r(),t.$$host);zT(t.$$host,i);async function s(f){f.preventDefault(),f.stopPropagation(),i.validateForm(),i?.form?.dispatchEvent(new Event("go-after-validation",f)),i.isValid&&(i.apiErrors={},i.successMessage=void 0,i?.form?.dispatchEvent(new Event("go-submit",f)),t.$$host.dispatchEvent(new Event("submit",{bubbles:!0,composed:!0})))}En(()=>{const f=Hr(t.$$host,"form",{novalidate:!0});f.addEventListener("submit",s),i.form=f});var a={details:i,get formId(){return r()},set formId(f){r(f),b()},get custom(){return n()},set custom(f){n(f),b()}},o=re(),l=U(o),c=f=>{var u=qT(),p=U(u),h=V(p,2),g=V(h,2),v=M(g,!0);I(g),J(m=>H(v,m),[()=>x.t(Pt.getFormOptions(r())?.submitLabel||"Submit")]),T(f,u)};return ue(l,f=>{n()||f(c)}),T(e,o),ie(a)}customElements.define("go-form",se(UT,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var BT=B("<go-form></go-form>",2);function VT(e,t){ne(t,!0);let r=_(t,"custom",7,!1),n=_(t,"redirectUrl",7,"");Pt.defineForm({id:"passwordReset",submitLabel:"user.passwordReset.actions.requestPasswordReset",fields:[{key:"email",required:!0}]});async function i(o){const l=o.target.details,c=l.formData,f=await x.passwordReset(n()?{...c,redirect_url:n()}:c);f.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),l.successMessage=f.data.message,l.apiErrors=[]):l.apiErrors=f.error.errors}var s={get custom(){return r()},set custom(o=!1){r(o),b()},get redirectUrl(){return n()},set redirectUrl(o=""){n(o),b()}},a=BT();return xn(a,"formId","passwordReset"),J(()=>xn(a,"custom",r())),Ts("submit",a,i),T(e,a),ie(s)}customElements.define("go-password-reset",se(VT,{redirectUrl:{attribute:"redirect-url",type:"String"},custom:{}},[],[]));var jT=B("<go-form></go-form>",2);function ZT(e,t){ne(t,!0);let r=_(t,"accessToken",7,""),n=_(t,"client",7,""),i=_(t,"uid",7,"");Pt.defineForm({id:"setPassword",submitLabel:"user.passwordReset.actions.resetPassword",fields:[{key:"newPassword",required:!0},{key:"confirmPassword",required:!0}]});async function s(l){const c=l.target.details,f=await x.setNewPassword(c.formData,{"access-token":r(),client:n(),uid:i()});f.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),c.successMessage=f.data.message,c.apiErrors=[]):c.apiErrors=f.error.errors}var a={get accessToken(){return r()},set accessToken(l=""){r(l),b()},get client(){return n()},set client(l=""){n(l),b()},get uid(){return i()},set uid(l=""){i(l),b()}},o=jT();return xn(o,"formId","setPassword"),Ts("submit",o,s),T(e,o),ie(a)}customElements.define("go-set-password",se(ZT,{accessToken:{attribute:"access-token",type:"String"},client:{attribute:"client",type:"String"},uid:{attribute:"uid",type:"String"}},[],[]));function WT(e,t){ne(t,!0),Pt.defineForm({id:"signIn",submitLabel:"common.actions.login",fields:[{key:"email",required:!0},{key:"password",required:!0}]});let r=_(t,"custom",7,!1);async function n(i){const s=i.target.details,a=await x.signIn(s.formData);a.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error.errors}return Hr(t.$$host,"go-form",{"form-id":"signIn",custom:r()}),t.$$host.addEventListener("submit",n),ie({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-sign-in",se(WT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function HT(e,t){ne(t,!0);let r=_(t,"custom",7,!1);Pt.defineForm({id:"signUp",submitLabel:"common.actions.register",fields:[{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"newPassword",required:!0},{key:"confirmPassword",required:!0},{key:"acceptTerms",required:!0}]});async function n(i){const s=i.target.details,a=await x.signUp(s.formData,!1);a.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error.errors}return Hr(t.$$host,"go-form",{"form-id":"signUp",custom:r()}),t.$$host.addEventListener("submit",n),ie({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-sign-up",se(HT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function GT(e,t){if(typeof e=="number"&&Number.isFinite(e))return e;if(e&&typeof e=="object"){const r=Object.values(e).reduce((n,i)=>typeof i=="number"&&Number.isFinite(i)?n+i:n,0);if(r>0)return r}return t}function KT(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function YT(e){return GT(KT(e),0)}function JT(e,t){const r=Pi(),n=new Set(t.map(i=>i.attributes.coupon).filter(Boolean).map(i=>i.toUpperCase()));return e.coupons.forEach(i=>r.addCoupon({...i,applied:i.kind!=="actionToken"||n.has(i.code)})),t.forEach(i=>{const s=i.attributes,a=s.uuid,o=e.items.find(l=>l.uuid===a);if(!o){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:s});return}r.addItem(QT(o,s))}),r}function QT(e,t){const r=mp(e.product)?1:YT(t),n=e.product.price_cents,i=n===0?0:t.price_cents??n,s=i<n;return ot({...e.product,price_cents:i},{quantity:r,time:e.time,voucher:e.voucher,mantle:e.mantle,display:{discounted:s,reference_uuid:e.uuid,originalPrice:n}})}var XT=class{#e=ae();get displayCart(){return d(this.#e)}set displayCart(e){$(this.#e,e,!0)}#t=ae(!1);get preview(){return d(this.#t)}set preview(e){$(this.#t,e,!0)}get totalPriceCents(){return this.displayCart?.amountToPayCents??0}get subtotalPriceCents(){return x.cart?.totalPriceCents??0}get discountedAmountCents(){return Math.max(0,this.subtotalPriceCents-this.totalPriceCents)}get isDiscounted(){return this.discountedAmountCents>0}async calculateDisplayCart(){const e=x.cart;if(e)try{const{items:t,coupons:r}=e.orderData(),n=await x.createCart({items:t,coupons:r});if(n?.data){this.displayCart=JT(e,n.data.items??[]);return}console.error("(go-cart) Unable to fetch discounted cart data",n?.error),this.displayCart=e}catch(t){console.error("(go-cart) Unable to fetch discounted cart data",t),this.displayCart=e}}},Up="go-cart-details",ex=$i(Up),Ri=Fi(Up),tx=B('<span class="go-cart-item-title" data-testid="cart-item-title"> </span>');function Bp(e,t){ne(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(a){r(a),b()}},i=tx(),s=M(i,!0);return I(i),J(()=>H(s,r().product.title)),T(e,i),ie(n)}se(Bp,{cartItem:{}},[],[],{mode:"open"});var rx=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span><span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),nx=B('<span class="go-cart-item-title" data-testid="cart-item-title"><span class="go-cart-item-title-event-title"> </span><span class="go-cart-item-title-ticket-title"> </span></span><!>',1);function Vp(e,t){ne(t,!0);let r=_(t,"cartItem",7);if(!js(r().product))throw new Error("Product is not an event ticket");const n=r().product;var i={get cartItem(){return r()},set cartItem(h){r(h),b()}},s=nx(),a=U(s),o=M(a),l=M(o,!0);I(o);var c=V(o),f=M(c,!0);I(c),I(a);var u=V(a),p=h=>{var g=rx(),v=U(g),m=M(v,!0);I(v);var y=V(v),S=M(y,!0);I(y),J((k,E)=>{H(m,k),H(S,E)},[()=>x.formatDate(r().time,"dayMonth"),()=>x.formatTime(r().time)]),T(h,g)};return ue(u,h=>{r().time&&h(p)}),J(()=>{H(l,n.event_title),H(f,n.title)}),T(e,s),ie(i)}se(Vp,{cartItem:{}},[],[],{mode:"open"});var ix=B('<span class="go-cart-item-subtitle" data-testid="cart-item-subtitle"> </span>'),sx=B('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),ax=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),ox=B('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!> <!>',1);function jp(e,t){ne(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(p){r(p),b()}},i=ox(),s=U(i),a=M(s,!0);I(s);var o=V(s,2),l=p=>{var h=ix(),g=M(h,!0);I(h),J(()=>H(g,r().product.sub_title)),T(p,h)},c=D(()=>oo(r().product)&&r().product.sub_title);ue(o,p=>{d(c)&&p(l)});var f=V(o,2),u=p=>{var h=ax(),g=U(h),v=M(g,!0);I(g);var m=V(g,2),y=S=>{var k=sx(),E=M(k,!0);I(k),J(A=>H(E,A),[()=>x.formatTime(r().time)]),T(S,k)};ue(m,S=>{r().product.type==="Ticket"&&r().product.subtype==="timeslot"&&S(y)}),J(S=>H(v,S),[()=>x.formatDate(r().time,"dayMonth")]),T(p,h)};return ue(f,p=>{r().time&&p(u)}),J(()=>H(a,r().product.title)),T(e,i),ie(n)}se(jp,{cartItem:{}},[],[],{mode:"open"});var lx=B('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),ux=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),cx=B('<span class="go-cart-item-custom" data-testid="cart-item-custom"> </span>'),dx=B('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <span class="go-cart-item-participants" data-testid="cart-item-participants"> </span> <!> <!>',1);function Zp(e,t){ne(t,!0);let r=_(t,"cartItem",7);const n=D(()=>r().product),i=D(()=>{if(!r().time)return null;try{return{date:x.formatDate(r().time,"short"),time:x.formatTime(r().time)}}catch{return{date:r().time,time:""}}}),s=m=>m==null?"":typeof m=="object"?JSON.stringify(m):String(m),a=D(()=>Object.entries(d(n).customs??{}).filter(([,m])=>m!=null&&m!==""));var o={get cartItem(){return r()},set cartItem(m){r(m),b()}},l=dx(),c=U(l),f=M(c,!0);I(c);var u=V(c,2),p=M(u,!0);I(u);var h=V(u,2),g=m=>{var y=ux(),S=U(y),k=M(S,!0);I(S);var E=V(S,2),A=O=>{var F=lx(),R=M(F,!0);I(F),J(()=>H(R,d(i).time)),T(O,F)};ue(E,O=>{d(i).time&&O(A)}),J(()=>H(k,d(i).date)),T(m,y)};ue(h,m=>{d(i)&&m(g)});var v=V(h,2);return Ne(v,17,()=>d(a),([m,y])=>m,(m,y)=>{var S=D(()=>Hy(d(y),2));let k=()=>d(S)[0],E=()=>d(S)[1];var A=cx(),O=M(A);I(A),J(F=>H(O,`${k()??""}: ${F??""}`),[()=>s(E())]),T(m,A)}),J(m=>{H(f,d(n).title),H(p,m)},[()=>x.t("cart.item.participants",{count:d(n).participants})]),T(e,l),ie(o)}se(Zp,{cartItem:{}},[],[],{mode:"open"});function Wp(e,{min:t,max:r}){const n=e<t?Math.max(t,1):e+1;return n>r?e:n}function fx(e,{min:t,floor:r=0}){return e<=t?r:e-1}function hx(e,{min:t,max:r,floor:n=0}){if(!Number.isFinite(e)||e<=0)return n;let i=Math.floor(e);return i<t&&(i=t),i>r&&(i=r),i}function px(e,{min:t,max:r,floor:n=0}){return e<0||e>r?!1:e===n||e>=t}function Hp(e,t){return Wp(e,t)>e}function Gp(e,{floor:t=0}){return e>t}var mx=B('<div class="go-quantity-stepper" role="group"><button type="button" tabindex="-1"><span aria-hidden="true"> </span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>');function Kp(e,t){const r=mt();ne(t,!0);let n=_(t,"value",7),i=_(t,"min",7),s=_(t,"max",7),a=_(t,"floor",7,0),o=_(t,"label",7),l=_(t,"decreaseLabel",7),c=_(t,"increaseLabel",7),f=_(t,"onDecrementBelowMin",7),u=_(t,"removeAriaLabel",7),p=_(t,"removeLabel",7,"✕"),h=_(t,"onChange",7);const g=D(()=>f()!=null),v=D(()=>Math.max(i(),1)),m=D(()=>d(g)?{min:d(v),max:s(),floor:d(v)}:{min:i(),max:s(),floor:a()}),y=D(()=>d(g)&&n()<=d(v));let S,k=ae(!1);const E=D(()=>!d(y)&&!Gp(n(),d(m))),A=D(()=>!Hp(n(),d(m)));function O(G){G!==n()&&h()(G)}function F(){d(y)?f()():R()}function R(){Gp(n(),d(m))&&O(fx(n(),d(m)))}function Y(){Hp(n(),d(m))&&O(Wp(n(),d(m)))}function N(){const G=parseInt(S.value,10);if(d(g)&&(!Number.isFinite(G)||G<=0)){$(k,!1),S.value=String(n()),f()();return}const Q=hx(G,d(m));$(k,!1),S.value=String(Q),O(Q)}function X(){const G=S.value.trim();$(k,!(/^\d+$/.test(G)&&px(parseInt(G,10),d(m))))}function q(G){switch(G.key){case"ArrowUp":G.preventDefault(),Y();break;case"ArrowDown":G.preventDefault(),R();break;case"Home":G.preventDefault(),O(d(m).floor);break;case"End":G.preventDefault(),O(s());break;case"Enter":G.preventDefault(),N();break}}var le={get value(){return n()},set value(G){n(G),b()},get min(){return i()},set min(G){i(G),b()},get max(){return s()},set max(G){s(G),b()},get floor(){return a()},set floor(G=0){a(G),b()},get label(){return o()},set label(G){o(G),b()},get decreaseLabel(){return l()},set decreaseLabel(G){l(G),b()},get increaseLabel(){return c()},set increaseLabel(G){c(G),b()},get onDecrementBelowMin(){return f()},set onDecrementBelowMin(G){f(G),b()},get removeAriaLabel(){return u()},set removeAriaLabel(G){u(G),b()},get removeLabel(){return p()},set removeLabel(G="✕"){p(G),b()},get onChange(){return h()},set onChange(G){h(G),b()}},he=mx(),j=M(he);let oe;var ee=M(j),fe=M(ee,!0);I(ee),I(j);var ce=V(j,2);Is(ce),Yl(ce,G=>S=G,()=>S);var de=V(ce,2);return I(he),J(()=>{me(he,"aria-label",o()),oe=St(j,1,"go-quantity-stepper-button go-quantity-stepper-decrement",null,oe,{"go-quantity-stepper-remove":d(y)}),me(j,"title",d(y)?u():l()),me(j,"aria-controls",r),me(j,"aria-disabled",d(E)),H(fe,d(y)?p():"−"),me(ce,"id",r),me(ce,"aria-label",o()),Ul(ce,n()),me(ce,"aria-valuenow",n()),me(ce,"aria-valuemin",d(m).floor),me(ce,"aria-valuemax",s()),me(ce,"aria-invalid",d(k)?"true":void 0),me(de,"title",c()),me(de,"aria-controls",r),me(de,"aria-disabled",d(A))}),pt("click",j,F),pt("input",ce,X),pt("change",ce,N),Ts("blur",ce,N),pt("keydown",ce,q),pt("click",de,Y),T(e,he),ie(le)}cr(["click","input","change","keydown"]),se(Kp,{value:{},min:{},max:{},floor:{},label:{},decreaseLabel:{},increaseLabel:{},onDecrementBelowMin:{},removeAriaLabel:{},removeLabel:{},onChange:{}},[],[],{mode:"open"});function vx(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[po(n)];if(t<e)return e>n?[po(e)]:[];const i=Math.max(e,n),s=[po(n)];for(let a=i;a<=t;a++)a!==n&&s.push(po(a));return s}function po(e){return{value:e,label:e.toString()}}var gx=B("<option> </option>"),yx=B('<select class="go-quantity-select"></select>');function mo(e,t){ne(t,!0);let r=_(t,"value",7),n=_(t,"min",7),i=_(t,"max",7),s=_(t,"label",7),a=_(t,"floor",7,0),o=_(t,"deselectable",7,!0),l=_(t,"onDecrementBelowMin",7),c=_(t,"onChange",7);const f=D(()=>Xe.config.quantityStepper);var u={get value(){return r()},set value(m){r(m),b()},get min(){return n()},set min(m){n(m),b()},get max(){return i()},set max(m){i(m),b()},get label(){return s()},set label(m){s(m),b()},get floor(){return a()},set floor(m=0){a(m),b()},get deselectable(){return o()},set deselectable(m=!0){o(m),b()},get onDecrementBelowMin(){return l()},set onDecrementBelowMin(m){l(m),b()},get onChange(){return c()},set onChange(m){c(m),b()}},p=re(),h=U(p),g=m=>{{let y=D(()=>o()?0:n()),S=D(()=>x.t("quantity.decrease")),k=D(()=>x.t("quantity.increase")),E=D(()=>x.t("quantity.remove")),A=D(()=>x.t("quantity.remove.label"));Kp(m,{get value(){return r()},get min(){return n()},get max(){return i()},get floor(){return d(y)},get label(){return s()},get decreaseLabel(){return d(S)},get increaseLabel(){return d(k)},get onDecrementBelowMin(){return l()},get removeAriaLabel(){return d(E)},get removeLabel(){return d(A)},get onChange(){return c()}})}},v=m=>{var y=yx();Ne(y,21,()=>vx(n(),i(),{floor:o()?a():n()}),S=>S.value,(S,k)=>{var E=gx(),A=M(E,!0);I(E);var O={};J(()=>{If(E,r()===d(k).value),H(A,d(k).label),O!==(O=d(k).value)&&(E.value=(E.__value=d(k).value)??"")}),T(S,E)}),I(y),J(()=>me(y,"aria-label",s())),pt("change",y,S=>c()(parseInt(S.target.value,10))),T(m,y)};return ue(h,m=>{d(f)?m(g):m(v,-1)}),T(e,p),ie(u)}cr(["change"]),se(mo,{value:{},min:{},max:{},label:{},floor:{},deselectable:{},onDecrementBelowMin:{},onChange:{}},[],[],{mode:"open"});function Yp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function bx(e){if(Array.isArray(e))return e}function _x(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}function wx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
76
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kx(e,t){return bx(e)||_x(e,t)||Sx(e,t)||wx()}function Sx(e,t){if(e){if(typeof e=="string")return Yp(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Yp(e,t):void 0}}var Jp=Object.entries,Qp=Object.setPrototypeOf,Ex=Object.isFrozen,Tx=Object.getPrototypeOf,xx=Object.getOwnPropertyDescriptor,Mt=Object.freeze,pr=Object.seal,Li=Object.create,Xp=typeof Reflect<"u"&&Reflect,Ru=Xp.apply,Lu=Xp.construct;Mt||(Mt=function(t){return t}),pr||(pr=function(t){return t}),Ru||(Ru=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];return t.apply(r,i)}),Lu||(Lu=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return new t(...n)});var zi=ft(Array.prototype.forEach),Ax=ft(Array.prototype.lastIndexOf),em=ft(Array.prototype.pop),qi=ft(Array.prototype.push),Cx=ft(Array.prototype.splice),$t=Array.isArray,Zs=ft(String.prototype.toLowerCase),zu=ft(String.prototype.toString),tm=ft(String.prototype.match),Ui=ft(String.prototype.replace),rm=ft(String.prototype.indexOf),Ox=ft(String.prototype.trim),Dx=ft(Number.prototype.toString),Ix=ft(Boolean.prototype.toString),nm=typeof BigInt>"u"?null:ft(BigInt.prototype.toString),im=typeof Symbol>"u"?null:ft(Symbol.prototype.toString),rt=ft(Object.prototype.hasOwnProperty),Ws=ft(Object.prototype.toString),Tt=ft(RegExp.prototype.test),Hs=Px(TypeError);function ft(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Ru(e,t,n)}}function Px(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Lu(e,r)}}function Ae(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zs;if(Qp&&Qp(e,null),!$t(t))return e;let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const s=r(i);s!==i&&(Ex(t)||(t[n]=s),i=s)}e[i]=!0}return e}function Mx(e){for(let t=0;t<e.length;t++)rt(e,t)||(e[t]=null);return e}function At(e){const t=Li(null);for(const n of Jp(e)){var r=kx(n,2);const i=r[0],s=r[1];rt(e,i)&&($t(s)?t[i]=Mx(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=At(s):t[i]=s)}return t}function $x(e){switch(typeof e){case"string":return e;case"number":return Dx(e);case"boolean":return Ix(e);case"bigint":return nm?nm(e):"0";case"symbol":return im?im(e):"Symbol()";case"undefined":return Ws(e);case"function":case"object":{if(e===null)return Ws(e);const t=e,r=Gr(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:Ws(n)}return Ws(e)}default:return Ws(e)}}function Gr(e,t){for(;e!==null;){const n=xx(e,t);if(n){if(n.get)return ft(n.get);if(typeof n.value=="function")return ft(n.value)}e=Tx(e)}function r(){return null}return r}function Fx(e){try{return Tt(e,""),!0}catch{return!1}}var sm=Mt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),qu=Mt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Uu=Mt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Nx=Mt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Bu=Mt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Rx=Mt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),am=Mt(["#text"]),om=Mt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Vu=Mt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),lm=Mt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),vo=Mt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Lx=pr(/{{[\w\W]*|^[\w\W]*}}/g),zx=pr(/<%[\w\W]*|^[\w\W]*%>/g),qx=pr(/\${[\w\W]*/g),Ux=pr(/^data-[\-\w.\u00B7-\uFFFF]+$/),Bx=pr(/^aria-[\-\w]+$/),um=pr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Vx=pr(/^(?:\w+script|data):/i),jx=pr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Zx=pr(/^html$/i),Wx=pr(/^[a-z][.\w]*(-[.\w]+)+$/i),Kr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Hx=function(){return typeof window>"u"?null:window},Gx=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},cm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function dm(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Hx();const t=ge=>dm(ge);if(t.version="3.4.7",t.removed=[],!e||!e.document||e.document.nodeType!==Kr.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const n=r,i=n.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,o=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,f=e.trustedTypes,u=o.prototype,p=Gr(u,"cloneNode"),h=Gr(u,"remove"),g=Gr(u,"nextSibling"),v=Gr(u,"childNodes"),m=Gr(u,"parentNode"),y=Gr(u,"shadowRoot"),S=Gr(u,"attributes"),k=a&&a.prototype?Gr(a.prototype,"nodeType"):null,E=a&&a.prototype?Gr(a.prototype,"nodeName"):null;if(typeof s=="function"){const ge=r.createElement("template");ge.content&&ge.content.ownerDocument&&(r=ge.content.ownerDocument)}let A,O="";const F=r,R=F.implementation,Y=F.createNodeIterator,N=F.createDocumentFragment,X=F.getElementsByTagName,q=n.importNode;let le=cm();t.isSupported=typeof Jp=="function"&&typeof m=="function"&&R&&R.createHTMLDocument!==void 0;const he=Lx,j=zx,oe=qx,ee=Ux,fe=Bx,ce=Vx,de=jx,G=Wx;let Q=um,P=null;const te=Ae({},[...sm,...qu,...Uu,...Bu,...am]);let L=null;const be=Ae({},[...om,...Vu,...lm,...vo]);let Z=Object.seal(Li(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),w=null,_e=null;const we=Object.seal(Li(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let De=!0,Le=!0,je=!1,bt=!0,st=!1,Nt=!0,_t=!1,Rt=!1,nr=!1,Ht=!1,vr=!1,Ir=!1,Pr=!0,yn=!1;const Mr="user-content-";let gr=!0,Xr=!1,en={},xt=null;const qn=Ae({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let rs=null;const ns=Ae({},["audio","video","img","source","image","track"]);let fa=null;const ed=Ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pi="http://www.w3.org/1998/Math/MathML",is="http://www.w3.org/2000/svg",yr="http://www.w3.org/1999/xhtml";let Un=yr,td=!1,rd=null;const vF=Ae({},[pi,is,yr],zu);let nd=Ae({},["mi","mo","mn","ms","mtext"]),id=Ae({},["annotation-xml"]);const gF=Ae({},["title","style","font","a","script"]);let ha=null;const yF=["application/xhtml+xml","text/html"],bF="text/html";let lt=null,ss=null;const _F=r.createElement("form"),Qg=function(C){return C instanceof RegExp||C instanceof Function},sd=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ss&&ss===C)return;(!C||typeof C!="object")&&(C={}),C=At(C),ha=yF.indexOf(C.PARSER_MEDIA_TYPE)===-1?bF:C.PARSER_MEDIA_TYPE,lt=ha==="application/xhtml+xml"?zu:Zs,P=rt(C,"ALLOWED_TAGS")&&$t(C.ALLOWED_TAGS)?Ae({},C.ALLOWED_TAGS,lt):te,L=rt(C,"ALLOWED_ATTR")&&$t(C.ALLOWED_ATTR)?Ae({},C.ALLOWED_ATTR,lt):be,rd=rt(C,"ALLOWED_NAMESPACES")&&$t(C.ALLOWED_NAMESPACES)?Ae({},C.ALLOWED_NAMESPACES,zu):vF,fa=rt(C,"ADD_URI_SAFE_ATTR")&&$t(C.ADD_URI_SAFE_ATTR)?Ae(At(ed),C.ADD_URI_SAFE_ATTR,lt):ed,rs=rt(C,"ADD_DATA_URI_TAGS")&&$t(C.ADD_DATA_URI_TAGS)?Ae(At(ns),C.ADD_DATA_URI_TAGS,lt):ns,xt=rt(C,"FORBID_CONTENTS")&&$t(C.FORBID_CONTENTS)?Ae({},C.FORBID_CONTENTS,lt):qn,w=rt(C,"FORBID_TAGS")&&$t(C.FORBID_TAGS)?Ae({},C.FORBID_TAGS,lt):At({}),_e=rt(C,"FORBID_ATTR")&&$t(C.FORBID_ATTR)?Ae({},C.FORBID_ATTR,lt):At({}),en=rt(C,"USE_PROFILES")?C.USE_PROFILES&&typeof C.USE_PROFILES=="object"?At(C.USE_PROFILES):C.USE_PROFILES:!1,De=C.ALLOW_ARIA_ATTR!==!1,Le=C.ALLOW_DATA_ATTR!==!1,je=C.ALLOW_UNKNOWN_PROTOCOLS||!1,bt=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,st=C.SAFE_FOR_TEMPLATES||!1,Nt=C.SAFE_FOR_XML!==!1,_t=C.WHOLE_DOCUMENT||!1,Ht=C.RETURN_DOM||!1,vr=C.RETURN_DOM_FRAGMENT||!1,Ir=C.RETURN_TRUSTED_TYPE||!1,nr=C.FORCE_BODY||!1,Pr=C.SANITIZE_DOM!==!1,yn=C.SANITIZE_NAMED_PROPS||!1,gr=C.KEEP_CONTENT!==!1,Xr=C.IN_PLACE||!1,Q=Fx(C.ALLOWED_URI_REGEXP)?C.ALLOWED_URI_REGEXP:um,Un=typeof C.NAMESPACE=="string"?C.NAMESPACE:yr,nd=rt(C,"MATHML_TEXT_INTEGRATION_POINTS")&&C.MATHML_TEXT_INTEGRATION_POINTS&&typeof C.MATHML_TEXT_INTEGRATION_POINTS=="object"?At(C.MATHML_TEXT_INTEGRATION_POINTS):Ae({},["mi","mo","mn","ms","mtext"]),id=rt(C,"HTML_INTEGRATION_POINTS")&&C.HTML_INTEGRATION_POINTS&&typeof C.HTML_INTEGRATION_POINTS=="object"?At(C.HTML_INTEGRATION_POINTS):Ae({},["annotation-xml"]);const W=rt(C,"CUSTOM_ELEMENT_HANDLING")&&C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING=="object"?At(C.CUSTOM_ELEMENT_HANDLING):Li(null);if(Z=Li(null),rt(W,"tagNameCheck")&&Qg(W.tagNameCheck)&&(Z.tagNameCheck=W.tagNameCheck),rt(W,"attributeNameCheck")&&Qg(W.attributeNameCheck)&&(Z.attributeNameCheck=W.attributeNameCheck),rt(W,"allowCustomizedBuiltInElements")&&typeof W.allowCustomizedBuiltInElements=="boolean"&&(Z.allowCustomizedBuiltInElements=W.allowCustomizedBuiltInElements),st&&(Le=!1),vr&&(Ht=!0),en&&(P=Ae({},am),L=Li(null),en.html===!0&&(Ae(P,sm),Ae(L,om)),en.svg===!0&&(Ae(P,qu),Ae(L,Vu),Ae(L,vo)),en.svgFilters===!0&&(Ae(P,Uu),Ae(L,Vu),Ae(L,vo)),en.mathMl===!0&&(Ae(P,Bu),Ae(L,lm),Ae(L,vo))),we.tagCheck=null,we.attributeCheck=null,rt(C,"ADD_TAGS")&&(typeof C.ADD_TAGS=="function"?we.tagCheck=C.ADD_TAGS:$t(C.ADD_TAGS)&&(P===te&&(P=At(P)),Ae(P,C.ADD_TAGS,lt))),rt(C,"ADD_ATTR")&&(typeof C.ADD_ATTR=="function"?we.attributeCheck=C.ADD_ATTR:$t(C.ADD_ATTR)&&(L===be&&(L=At(L)),Ae(L,C.ADD_ATTR,lt))),rt(C,"ADD_URI_SAFE_ATTR")&&$t(C.ADD_URI_SAFE_ATTR)&&Ae(fa,C.ADD_URI_SAFE_ATTR,lt),rt(C,"FORBID_CONTENTS")&&$t(C.FORBID_CONTENTS)&&(xt===qn&&(xt=At(xt)),Ae(xt,C.FORBID_CONTENTS,lt)),rt(C,"ADD_FORBID_CONTENTS")&&$t(C.ADD_FORBID_CONTENTS)&&(xt===qn&&(xt=At(xt)),Ae(xt,C.ADD_FORBID_CONTENTS,lt)),gr&&(P["#text"]=!0),_t&&Ae(P,["html","head","body"]),P.table&&(Ae(P,["tbody"]),delete w.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw Hs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Hs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=C.TRUSTED_TYPES_POLICY,O=A.createHTML("")}else A===void 0&&(A=Gx(f,i)),A!==null&&typeof O=="string"&&(O=A.createHTML(""));(le.uponSanitizeElement.length>0||le.uponSanitizeAttribute.length>0)&&P===te&&(P=At(P)),le.uponSanitizeAttribute.length>0&&L===be&&(L=At(L)),Mt&&Mt(C),ss=C},Xg=Ae({},[...qu,...Uu,...Nx]),ey=Ae({},[...Bu,...Rx]),wF=function(C){let W=m(C);(!W||!W.tagName)&&(W={namespaceURI:Un,tagName:"template"});const pe=Zs(C.tagName),Ie=Zs(W.tagName);return rd[C.namespaceURI]?C.namespaceURI===is?W.namespaceURI===yr?pe==="svg":W.namespaceURI===pi?pe==="svg"&&(Ie==="annotation-xml"||nd[Ie]):!!Xg[pe]:C.namespaceURI===pi?W.namespaceURI===yr?pe==="math":W.namespaceURI===is?pe==="math"&&id[Ie]:!!ey[pe]:C.namespaceURI===yr?W.namespaceURI===is&&!id[Ie]||W.namespaceURI===pi&&!nd[Ie]?!1:!ey[pe]&&(gF[pe]||!Xg[pe]):!!(ha==="application/xhtml+xml"&&rd[C.namespaceURI]):!1},$r=function(C){qi(t.removed,{element:C});try{m(C).removeChild(C)}catch{h(C)}},mi=function(C,W){try{qi(t.removed,{attribute:W.getAttributeNode(C),from:W})}catch{qi(t.removed,{attribute:null,from:W})}if(W.removeAttribute(C),C==="is")if(Ht||vr)try{$r(W)}catch{}else try{W.setAttribute(C,"")}catch{}},ty=function(C){let W=null,pe=null;if(nr)C="<remove></remove>"+C;else{const tt=tm(C,/^[\r\n\t ]+/);pe=tt&&tt[0]}ha==="application/xhtml+xml"&&Un===yr&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");const Ie=A?A.createHTML(C):C;if(Un===yr)try{W=new c().parseFromString(Ie,ha)}catch{}if(!W||!W.documentElement){W=R.createDocument(Un,"template",null);try{W.documentElement.innerHTML=td?O:Ie}catch{}}const ze=W.body||W.documentElement;return C&&pe&&ze.insertBefore(r.createTextNode(pe),ze.childNodes[0]||null),Un===yr?X.call(W,_t?"html":"body")[0]:_t?W.documentElement:ze},ry=function(C){return Y.call(C.ownerDocument||C,C,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},ny=function(C){C.normalize();const W=Y.call(C.ownerDocument||C,C,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let pe=W.nextNode();for(;pe;){let Ie=pe.data;zi([he,j,oe],ze=>{Ie=Ui(Ie,ze," ")}),pe.data=Ie,pe=W.nextNode()}},Xo=function(C){const W=E?E(C):null;return typeof W!="string"||lt(W)!=="form"?!1:typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||C.attributes!==S(C)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function"||C.nodeType!==k(C)||C.childNodes!==v(C)},pa=function(C){if(!k||typeof C!="object"||C===null)return!1;try{return k(C)===Kr.documentFragment}catch{return!1}},el=function(C){if(!k||typeof C!="object"||C===null)return!1;try{return typeof k(C)=="number"}catch{return!1}};function bn(ge,C,W){zi(ge,pe=>{pe.call(t,C,W,ss)})}const iy=function(C){let W=null;if(bn(le.beforeSanitizeElements,C,null),Xo(C))return $r(C),!0;const pe=lt(C.nodeName);if(bn(le.uponSanitizeElement,C,{tagName:pe,allowedTags:P}),Nt&&C.hasChildNodes()&&!el(C.firstElementChild)&&Tt(/<[/\w!]/g,C.innerHTML)&&Tt(/<[/\w!]/g,C.textContent)||Nt&&C.namespaceURI===yr&&pe==="style"&&el(C.firstElementChild)||C.nodeType===Kr.progressingInstruction||Nt&&C.nodeType===Kr.comment&&Tt(/<[/\w]/g,C.data))return $r(C),!0;if(w[pe]||!(we.tagCheck instanceof Function&&we.tagCheck(pe))&&!P[pe]){if(!w[pe]&&ay(pe)&&(Z.tagNameCheck instanceof RegExp&&Tt(Z.tagNameCheck,pe)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(pe)))return!1;if(gr&&!xt[pe]){const Ie=m(C),ze=v(C);if(ze&&Ie){const tt=ze.length;for(let Gt=tt-1;Gt>=0;--Gt){const Bn=p(ze[Gt],!0);Ie.insertBefore(Bn,g(C))}}}return $r(C),!0}return(k?k(C):C.nodeType)===Kr.element&&!wF(C)||(pe==="noscript"||pe==="noembed"||pe==="noframes")&&Tt(/<\/no(script|embed|frames)/i,C.innerHTML)?($r(C),!0):(st&&C.nodeType===Kr.text&&(W=C.textContent,zi([he,j,oe],Ie=>{W=Ui(W,Ie," ")}),C.textContent!==W&&(qi(t.removed,{element:C.cloneNode()}),C.textContent=W)),bn(le.afterSanitizeElements,C,null),!1)},sy=function(C,W,pe){if(_e[W]||Pr&&(W==="id"||W==="name")&&(pe in r||pe in _F))return!1;const Ie=L[W]||we.attributeCheck instanceof Function&&we.attributeCheck(W,C);if(!(Le&&!_e[W]&&Tt(ee,W))){if(!(De&&Tt(fe,W))){if(!Ie||_e[W]){if(!(ay(C)&&(Z.tagNameCheck instanceof RegExp&&Tt(Z.tagNameCheck,C)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(C))&&(Z.attributeNameCheck instanceof RegExp&&Tt(Z.attributeNameCheck,W)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(W,C))||W==="is"&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&Tt(Z.tagNameCheck,pe)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(pe))))return!1}else if(!fa[W]){if(!Tt(Q,Ui(pe,de,""))){if(!((W==="src"||W==="xlink:href"||W==="href")&&C!=="script"&&rm(pe,"data:")===0&&rs[C])){if(!(je&&!Tt(ce,Ui(pe,de,"")))){if(pe)return!1}}}}}}return!0},kF=Ae({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ay=function(C){return!kF[Zs(C)]&&Tt(G,C)},oy=function(C){bn(le.beforeSanitizeAttributes,C,null);const W=C.attributes;if(!W||Xo(C))return;const pe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0};let Ie=W.length;for(;Ie--;){const ze=W[Ie],tt=ze.name,Gt=ze.namespaceURI,Bn=ze.value,_n=lt(tt),ad=Bn;let wt=tt==="value"?ad:Ox(ad);if(pe.attrName=_n,pe.attrValue=wt,pe.keepAttr=!0,pe.forceKeepAttr=void 0,bn(le.uponSanitizeAttribute,C,pe),wt=pe.attrValue,yn&&(_n==="id"||_n==="name")&&rm(wt,Mr)!==0&&(mi(tt,C),wt=Mr+wt),Nt&&Tt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,wt)){mi(tt,C);continue}if(_n==="attributename"&&tm(wt,"href")){mi(tt,C);continue}if(pe.forceKeepAttr)continue;if(!pe.keepAttr){mi(tt,C);continue}if(!bt&&Tt(/\/>/i,wt)){mi(tt,C);continue}st&&zi([he,j,oe],uy=>{wt=Ui(wt,uy," ")});const ly=lt(C.nodeName);if(!sy(ly,_n,wt)){mi(tt,C);continue}if(A&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Gt)switch(f.getAttributeType(ly,_n)){case"TrustedHTML":wt=A.createHTML(wt);break;case"TrustedScriptURL":wt=A.createScriptURL(wt);break}if(wt!==ad)try{Gt?C.setAttributeNS(Gt,tt,wt):C.setAttribute(tt,wt),Xo(C)?$r(C):em(t.removed)}catch{mi(tt,C)}}bn(le.afterSanitizeAttributes,C,null)},tl=function(C){let W=null;const pe=ry(C);for(bn(le.beforeSanitizeShadowDOM,C,null);W=pe.nextNode();)if(bn(le.uponSanitizeShadowNode,W,null),iy(W),oy(W),pa(W.content)&&tl(W.content),(k?k(W):W.nodeType)===Kr.element){const Ie=y?y(W):W.shadowRoot;pa(Ie)&&(as(Ie),tl(Ie))}bn(le.afterSanitizeShadowDOM,C,null)},as=function(C){const W=k?k(C):C.nodeType;if(W===Kr.element){const ze=y?y(C):C.shadowRoot;pa(ze)&&(as(ze),tl(ze))}const pe=v?v(C):C.childNodes;if(!pe)return;const Ie=[];zi(pe,ze=>{qi(Ie,ze)});for(const ze of Ie)as(ze);if(W===Kr.element){const ze=E?E(C):null;if(typeof ze=="string"&&lt(ze)==="template"){const tt=C.content;pa(tt)&&as(tt)}}};return t.sanitize=function(ge){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=null,pe=null,Ie=null,ze=null;if(td=!ge,td&&(ge="<!-->"),typeof ge!="string"&&!el(ge)&&(ge=$x(ge),typeof ge!="string"))throw Hs("dirty is not a string, aborting");if(!t.isSupported)return ge;if(Rt||sd(C),t.removed=[],typeof ge=="string"&&(Xr=!1),Xr){const Bn=E?E(ge):ge.nodeName;if(typeof Bn=="string"){const _n=lt(Bn);if(!P[_n]||w[_n])throw Hs("root node is forbidden and cannot be sanitized in-place")}if(Xo(ge))throw Hs("root node is clobbered and cannot be sanitized in-place");as(ge)}else if(el(ge))W=ty("<!---->"),pe=W.ownerDocument.importNode(ge,!0),pe.nodeType===Kr.element&&pe.nodeName==="BODY"||pe.nodeName==="HTML"?W=pe:W.appendChild(pe),as(pe);else{if(!Ht&&!st&&!_t&&ge.indexOf("<")===-1)return A&&Ir?A.createHTML(ge):ge;if(W=ty(ge),!W)return Ht?null:Ir?O:""}W&&nr&&$r(W.firstChild);const tt=ry(Xr?ge:W);for(;Ie=tt.nextNode();)iy(Ie),oy(Ie),pa(Ie.content)&&tl(Ie.content);if(Xr)return st&&ny(ge),ge;if(Ht){if(st&&ny(W),vr)for(ze=N.call(W.ownerDocument);W.firstChild;)ze.appendChild(W.firstChild);else ze=W;return(L.shadowroot||L.shadowrootmode)&&(ze=q.call(n,ze,!0)),ze}let Gt=_t?W.outerHTML:W.innerHTML;return _t&&P["!doctype"]&&W.ownerDocument&&W.ownerDocument.doctype&&W.ownerDocument.doctype.name&&Tt(Zx,W.ownerDocument.doctype.name)&&(Gt="<!DOCTYPE "+W.ownerDocument.doctype.name+`>
77
+ `+Gt),st&&zi([he,j,oe],Bn=>{Gt=Ui(Gt,Bn," ")}),A&&Ir?A.createHTML(Gt):Gt},t.setConfig=function(){sd(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Rt=!0},t.clearConfig=function(){ss=null,Rt=!1},t.isValidAttribute=function(ge,C,W){return ss||sd({}),sy(lt(ge),lt(C),W)},t.addHook=function(ge,C){typeof C=="function"&&qi(le[ge],C)},t.removeHook=function(ge,C){if(C!==void 0){const W=Ax(le[ge],C);return W===-1?void 0:Cx(le[ge],W,1)[0]}return em(le[ge])},t.removeHooks=function(ge){le[ge]=[]},t.removeAllHooks=function(){le=cm()},t}var fm=dm(),Kx=B('<span class="go-sub-ticket-description"></span>'),Yx=B('<span class="go-sub-ticket-quantity"> </span>'),Jx=B('<li><span class="go-sub-ticket-title"> </span> <!> <!></li>');function ju(e,t){ne(t,!0);let r=_(t,"sub",7),n=_(t,"quantity",7),i=_(t,"max",23,()=>r().max_persons),s=_(t,"onChange",7),a=_(t,"preview",7,!1);const o=D(()=>r().min_persons===r().max_persons);var l={get sub(){return r()},set sub(y){r(y),b()},get quantity(){return n()},set quantity(y){n(y),b()},get max(){return i()},set max(y=r.max_persons){i(y),b()},get onChange(){return s()},set onChange(y){s(y),b()},get preview(){return a()},set preview(y=!1){a(y),b()}},c=Jx(),f=M(c),u=M(f,!0);I(f);var p=V(f,2),h=y=>{var S=Kx();Sf(S,()=>fm.sanitize(r().description),!0),I(S),T(y,S)};ue(p,y=>{r().description&&y(h)});var g=V(p,2),v=y=>{var S=Yx(),k=M(S,!0);I(S),J(()=>{me(S,"data-testid",`sub-ticket-${r().id??""}-quantity`),H(k,n())}),T(y,S)},m=y=>{{let S=D(()=>r().title||x.t("cart.content.table.edit"));mo(y,{get value(){return n()},get min(){return r().min_persons},get max(){return i()},get label(){return d(S)},deselectable:!1,get onChange(){return s()}})}};return ue(g,y=>{a()||d(o)?y(v):y(m,-1)}),I(c),J(()=>{St(c,1,dr(["go-sub-ticket",d(o)&&"is-fixed",a()&&"is-preview",n()===0&&"is-empty"])),me(c,"data-testid",`sub-ticket-${r().id??""}`),H(u,r().title)}),T(e,c),ie(l)}se(ju,{sub:{},quantity:{},max:{},onChange:{},preview:{}},[],[],{mode:"open"});function hm(e,t){const{product:r}=e;return js(r)?[r.event_title,e.time&&hp(e.time,t),r.title].filter(Boolean).join(" - "):r.title}var Qx=B('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),Xx=B('<span class="go-cart-item-price-discounted"> </span>'),eA=B('<span data-testid="cart-item-participant-count"> </span>'),tA=B('<span data-testid="cart-item-voucher-quantity"> </span>'),rA=B("<span> </span>"),nA=B('<li class="go-cart-item-remove"><button class="go-cart-remove"> </button></li>'),iA=B('<ul class="go-sub-tickets" role="list"></ul>'),sA=B('<article class="go-cart-item-content"><ul><li class="go-cart-item-title-container"><!></li> <li class="go-cart-item-price"><!></li> <li class="go-cart-item-count"><!></li> <!> <li class="go-cart-item-sum"> </li></ul></article> <!>',1);function pm(e,t){ne(t,!0);let r=_(t,"displayItem",7),n=_(t,"displayCart",7),i=_(t,"preview",7),s=ae(void 0),a=ae(Me({}));const o=D(()=>x.cart?.items.find(y=>y.uuid===(r().display?.reference_uuid??r().uuid))),l=D(()=>Vr(r().product)?r().product:null),c=Pi();ve(()=>{x.cart?.items.map(y=>y.quantity),x.cart?.items.forEach(y=>y.mantle&&Object.values(y.mantle.composition)),Re(()=>{$(s,x.capacityManager.capacity(n(),r(),c),!0),$(a,d(o)?x.capacityManager.subTicketMaxes(x.cart,d(o),c):{},!0)})});function f(y){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}d(o).quantity=Math.max(0,d(o).quantity-r().quantity+y)}function u(){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}const y=Math.max(0,d(o).quantity-r().quantity);y===0?x.cart?.deleteItem(d(o)):d(o).quantity=y}function p(y,S){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}d(o).mantle&&(d(o).mantle.composition[y]=S)}var h={get displayItem(){return r()},set displayItem(y){r(y),b()},get displayCart(){return n()},set displayCart(y){n(y),b()},get preview(){return i()},set preview(y){i(y),b()}},g=re(),v=U(g),m=y=>{var S=sA(),k=U(S),E=M(k),A=M(E),O=M(A),F=Z=>{jp(Z,{get cartItem(){return r()}})},R=Z=>{Vp(Z,{get cartItem(){return r()}})},Y=Z=>{Bp(Z,{get cartItem(){return r()}})},N=Z=>{Zp(Z,{get cartItem(){return r()}})};ue(O,Z=>{r().product.type==="Ticket"?Z(F):r().product.type==="Event"?Z(R,1):r().product.type==="Coupon"?Z(Y,2):r().product.type==="Tour"&&Z(N,3)}),I(A);var X=V(A,2),q=M(X),le=Z=>{var w=Qx(),_e=U(w),we=M(_e,!0);I(_e);var De=V(_e,2),Le=M(De,!0);I(De),J((je,bt)=>{H(we,je),H(Le,bt)},[()=>yt(r().display.originalPrice),()=>yt(r().final_price_cents)]),T(Z,w)},he=Z=>{var w=Xx(),_e=M(w,!0);I(w),J(we=>H(_e,we),[()=>yt(r().final_price_cents)]),T(Z,w)};ue(q,Z=>{r().display?.discounted?Z(le):Z(he,-1)}),I(X);var j=V(X,2),oe=M(j),ee=Z=>{var w=eA(),_e=M(w,!0);I(w),J(()=>H(_e,r().product.participants)),T(Z,w)},fe=Z=>{var w=tA(),_e=M(w,!0);I(w),J(()=>H(_e,r().quantity)),T(Z,w)},ce=Z=>{var w=rA(),_e=M(w,!0);I(w),J(()=>H(_e,r().quantity)),T(Z,w)},de=Z=>{{let w=D(()=>r().quantity??0),_e=D(()=>hm(r(),x.locale));mo(Z,{get value(){return d(w)},get min(){return d(s).min},get max(){return d(s).max},get label(){return d(_e)},floor:1,onChange:f,onDecrementBelowMin:u})}};ue(oe,Z=>{r().product.type==="Tour"?Z(ee):r().voucher?.code?Z(fe,1):i()?Z(ce,2):Z(de,-1)}),I(j);var G=V(j,2),Q=Z=>{var w=nA(),_e=M(w),we=M(_e,!0);I(_e),I(w),J((De,Le)=>{me(_e,"aria-label",De),H(we,Le)},[()=>x.t("cart.item.aria.removeItem"),()=>x.t("cart.item.remove")]),pt("click",_e,u),T(Z,w)};ue(G,Z=>{i()||Z(Q)});var P=V(G,2),te=M(P,!0);I(P),I(E),I(k);var L=V(k,2),be=Z=>{var w=iA();Ne(w,21,()=>qs(d(l)),_e=>_e.id,(_e,we)=>{{let De=D(()=>r().mantle?.composition?.[d(we).id]??0);ju(_e,{get sub(){return d(we)},get preview(){return i()},get quantity(){return d(De)},get max(){return d(a)[d(we).id]},onChange:Le=>p(d(we).id,Le)})}}),I(w),J(()=>me(w,"aria-label",d(l).title)),T(Z,w)};ue(L,Z=>{d(l)&&Z(be)}),J(Z=>H(te,Z),[()=>yt(r().total_price_cents)]),T(y,S)};return ue(v,y=>{d(s)&&y(m)}),T(e,g),ie(h)}cr(["click"]),se(pm,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var aA=B('<li class="go-cart-header-remove"></li>'),oA=B('<li class="go-cart-item"><!></li>'),lA=B('<ol data-testid="cart-items"><li class="go-cart-header"><ul><li class="go-cart-header-title"> </li> <li class="go-cart-header-price"> </li> <li class="go-cart-header-count"> </li> <!> <li class="go-cart-header-sum"> </li></ul></li> <!></ol>');function uA(e,t){ne(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=lA(),c=M(l),f=M(c),u=M(f),p=M(u,!0);I(u);var h=V(u,2),g=M(h,!0);I(h);var v=V(h,2),m=M(v,!0);I(v);var y=V(v,2),S=O=>{var F=aA();T(O,F)};ue(y,O=>{d(n).preview||O(S)});var k=V(y,2),E=M(k,!0);I(k),I(f),I(c);var A=V(c,2);Ne(A,17,()=>d(n).displayCart.items,O=>O.uuid,(O,F)=>{var R=oA();pm(M(R),{get displayItem(){return d(F)},get displayCart(){return d(n).displayCart},get preview(){return d(n).preview}}),I(R),T(O,R)}),I(l),J((O,F,R,Y)=>{H(p,O),H(g,F),H(m,R),H(E,Y)},[()=>x.t("cart.content.table.desc"),()=>x.t("cart.content.table.price"),()=>x.t("cart.content.table.quantity"),()=>x.t("cart.content.table.total")]),T(o,l)};ue(s,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.items.length&&o(a)}),T(e,i),ie()}customElements.define("go-cart-items",se(uA,{},[],[]));var cA=B('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),dA=B('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),fA=B('<ol data-testid="cart-coupons"></ol>');function hA(e,t){ne(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=fA();Ne(l,21,()=>d(n).displayCart.coupons,c=>c.code,(c,f)=>{var u=dA();let p;var h=M(u),g=M(h),v=M(g),m=M(v,!0);I(v);var y=V(v,2),S=k=>{var E=cA(),A=M(E);I(E),J(O=>me(A,"aria-label",O),[()=>x.t("cart.coupons.remove")]),pt("click",A,()=>x.cart?.removeCoupon(d(f).code)),T(k,E)};ue(y,k=>{d(n).preview||k(S)}),I(g),I(h),I(u),J(()=>{p=St(u,1,"go-cart-coupon",null,p,{"go-cart-coupon-inactive":!d(f).applied}),H(m,d(f).code)}),T(c,u)}),I(l),T(o,l)};ue(s,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.coupons.length>0&&o(a)}),T(e,i),ie()}cr(["click"]),customElements.define("go-cart-coupons",se(hA,{},[],[]));var pA=B('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function mA(e,t){ne(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=pA(),c=M(l,!0);I(l),J(f=>H(c,f),[()=>yt(d(n).totalPriceCents)]),T(o,l)};ue(s,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.items.length&&o(a)}),T(e,i),ie()}customElements.define("go-cart-total-amount",se(mA,{},[],[]));function vA(e,t){ne(t,!0);const r=_(t,"preview",7,!1),n=new XT;ex(t.$$host,n),ve(()=>{n.preview=r()}),ve(()=>{x.cart&&(x.cart.items.map(s=>s.uuid+":"+s.quantity+":"+s.time),x.cart.coupons.map(s=>s.code).join("|"),x.cart.items.forEach(s=>s.mantle&&Object.values(s.mantle.composition)),Re(()=>n.calculateDisplayCart()))});async function i(){const s=t.$$host.querySelectorAll("go-coupon-redemption");let a=!0;for(const o of s){const l=await o.flush?.();l&&!l.success&&(a=!1)}return a}return t.$$host.addEventListener("click",async s=>{const a=s.target.closest("go-submit");if(!a)return;const o=a.closest("go-form");if(o&&t.$$host.contains(o))return;const l=await i();l&&t.$$host.dispatchEvent(new CustomEvent("go-submit",{detail:{ok:l},bubbles:!0,composed:!0}))}),ie({get preview(){return r()},set preview(s=!1){r(s),b()}})}customElements.define("go-cart",se(vA,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var gA=B('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function yA(e,t){ne(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=gA(),c=M(l,!0);I(l),J(f=>H(c,f),[()=>yt(d(n).subtotalPriceCents)]),T(o,l)};ue(s,o=>{d(n)&&x.cart?.items.length&&o(a)}),T(e,i),ie()}customElements.define("go-cart-subtotal-amount",se(yA,{},[],[]));var bA=B('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function _A(e,t){ne(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=bA(),c=V(M(l),1,!0);I(l),J(f=>H(c,f),[()=>yt(d(n).discountedAmountCents)]),T(o,l)};ue(s,o=>{d(n)&&d(n).discountedAmountCents>0&&o(a)}),T(e,i),ie()}customElements.define("go-cart-discounted-amount",se(_A,{},[],[]));function wA(e,t){ne(t,!0),Hr(t.$$host,"go-if",{when:"data.cart.items.length === 0"}),ie()}customElements.define("go-cart-empty",se(wA,{},[],[]));function kA(e,t){ne(t,!0);let r=D(()=>x.cart?.items.length);Ot();var n=Bt();J(()=>H(n,d(r))),T(e,n),ie()}customElements.define("go-cart-counter",se(kA,{},[],[]));function SA(e){const t=document.createElement("form");t.method="post",t.action=e.url;for(const[r,n]of Object.entries(e.params)){const i=document.createElement("input");i.type="hidden",i.name=r,i.value=String(n),t.appendChild(i)}document.body.appendChild(t),t.submit()}async function mm(e,t){const r=x.cart;if(!r)return;const n=e.details.fieldValue("paymentMode");r.paymentModeId=n==null?void 0:String(n);const i=await x.checkout(r.orderData());if(i.error){e.details.apiErrors=i.error;return}const s=Xe.config.forms[t]?.beforeSubmit;s&&await s(e.details.formData);const a=i.data.meta,o=Xe.config.navigateTo;a.status==="success"?o?.(x.urls.checkoutSuccess(i.data.order.token)):a.status==="fail"?o?.(x.urls.checkoutFailure("")):a.payment_url?o?.(a.payment_url):a.payment_data?SA(a.payment_data):o?.(x.urls.checkoutFailure(""))}function vm(e,t){Pt.defineForm({id:"checkoutGuest",submitLabel:"cart.detail.actions.checkout",fields:[{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"acceptTerms",required:!0},{key:"paymentMode",required:!0}]}),Hr(e,"go-form",{"form-id":"checkoutGuest",custom:t}),e.addEventListener("submit",async r=>{const n=r.target;if(!x.cart)return;const i=await x.signUp(n.details.formData,!0);if(i.error){n.details.apiErrors=i.error.errors;return}await mm(n,"checkoutGuest")})}function EA(e,t){Pt.defineForm({id:"checkoutUser",submitLabel:"cart.detail.actions.checkout",fields:[{key:"acceptTerms",required:!0},{key:"paymentMode",required:!0}]}),Hr(e,"go-form",{"form-id":"checkoutUser",custom:t}),e.addEventListener("submit",async r=>{const n=r.target;await mm(n,"checkoutUser")})}function TA(e,t){ne(t,!0);let r=_(t,"custom",7,!1);return vm(t.$$host,r()),ie({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-form",se(TA,{custom:{}},[],[]));function xA(e,t){ne(t,!0);let r=_(t,"custom",7,!1);return vm(t.$$host,r()),ie({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-guest",se(xA,{custom:{}},[],[]));function AA(e,t){ne(t,!0);let r=_(t,"custom",7,!1);return EA(t.$$host,r()),ie({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-user",se(AA,{custom:{}},[],[]));var CA="TokenActions::ApplyOrderDiscount";async function OA(e){if(!x.cart)throw new Error("(go-coupon-redemption): cart not found");const t=x.cart,r=await x.asyncFetch(()=>x.getCouponSaleByBarcode(e));return r?.is_valid?r.value_action===CA?(t.addCoupon({code:e,kind:"actionToken"}),{success:!0}):r.is_voucher_for?IA(e,r):r.value_cents&&r.value_cents>0?DA(e,r.value_cents):Zu([x.t("cart.coupon.form.errors.notValid")]):Zu([x.t("cart.coupon.form.errors.notValid")])}function DA(e,t){return x.cart.addCoupon({code:e,kind:"valueVoucher",valueCents:t}),{success:!0}}async function IA(e,t){const r=e.toUpperCase();if(x.cart.coupons.some(a=>a.code===r))return{success:!0};const n=await x.asyncFetch(()=>x.tickets({"by_ticket_ids[]":[t.is_voucher_for]})),i=Array.isArray(n)?n.find(a=>a.id===t.is_voucher_for):void 0;if(!i)return Zu([x.t("cart.coupon.form.errors.error")]);const s={...i,price_cents:0};return x.cart.addItem(ot(Us(s),{quantity:1,voucher:{code:r}})),x.cart.addCoupon({code:r,kind:"serviceVoucher"}),{success:!0}}function Zu(e){return{success:!1,errors:e}}var PA=B("<go-form></go-form>",2);function MA(e,t){ne(t,!0),Pt.defineForm({id:"couponRedemption",submitLabel:"cart.coupon.form.submit",fields:[{key:"token",required:!0}]});async function r(o){const l=o.details.fields.find(u=>u.key==="token"),c=(o.details.fieldValue("token")??"").trim().toUpperCase();if(!c)return{success:!0};const f=await OA(c);return f.success?(o.details.apiErrors=[],l&&(l.value=""),o.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),f):(o.details.apiErrors=f.errors,f)}async function n(o){await r(o.target)}async function i(){const o=t.$$host.querySelector("go-form");return o?.details?r(o):{success:!0}}var s={flush:i},a=PA();return xn(a,"formId","couponRedemption"),Ts("submit",a,n),T(e,a),ie(s)}customElements.define("go-coupon-redemption",se(MA,{},[],["flush"])),yb();var $A=class{#e=ae();get campaign(){return d(this.#e)}set campaign(e){$(this.#e,e,!0)}#t=ae();get amount(){return d(this.#t)}set amount(e){$(this.#t,e,!0)}selectCampaign=e=>{this.campaign=e,document.getElementsByClassName("donation-actions")[0]?.scrollIntoView()};addDonationToCart=()=>{if(this.amount===void 0||this.campaign===void 0)return;const e={value:this.amount,campaign_id:this.campaign.id};let t=JSON.parse(localStorage.getItem("201600627v4donations")||"[]");qr(t.filter(r=>r.campaign_id=e.campaign_id),r=>r.value)+e.value>this.campaign.guest_limit&&this.campaign.guest_limit>0&&(!x.currentUser?.isAuthenticated||x.currentUser.isGuest)?this.skipDonation():(t.push(e),localStorage.setItem("201600627v4donations",JSON.stringify(t)),localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",x.urls.cart()),window.location.replace(x.urls.cart()))};skipDonation=()=>{localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",x.urls.cart()),window.location.replace(x.urls.cart())}},Ct=new $A,FA=B('<img alt="logo"/>'),NA=B('<div role="button" tabindex="0"><div class="donation-image"><!></div> <div class="donation-info"><p class="donation-info-title"> </p> <p class="donation-info-description"> </p></div></div>');function gm(e,t){ne(t,!0);let r=_(t,"campaign",7);const n=D(()=>r().translations);var i={get campaign(){return r()},set campaign(v){r(v),b()}},s=NA();let a;var o=M(s),l=M(o),c=v=>{var m=FA();J(y=>me(m,"src",y),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),T(v,m)};ue(l,v=>{r().picture.thumbnail&&v(c)}),I(o);var f=V(o,2),u=M(f),p=M(u,!0);I(u);var h=V(u,2),g=M(h,!0);return I(h),I(f),I(s),J(()=>{a=St(s,1,"go-donation-campaign",null,a,{selected:Ct.campaign?.id===r()?.id}),H(p,d(n)["donations.headline"]),H(g,d(n)["donations.shop.info"])}),pt("click",s,()=>Ct.selectCampaign(r())),pt("keydown",s,v=>{v.key==="Enter"&&Ct.selectCampaign(r())}),T(e,s),ie(i)}cr(["click","keydown"]),se(gm,{campaign:{}},[],[],{mode:"open"});var RA=B("<button> </button>"),LA=B('<form id="donationForm" action="" novalidate=""><div class="donation-custom form-group"><label for="donation-custom-amount"> </label> <input class="form-control" id="donation-custom-amount" type="number" min="1"/></div></form>'),zA=B('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function ym(e,t){ne(t,!0);const r=Ct.campaign?.guest_limit?Ct.campaign.guest_limit/100:void 0;let n=ae(void 0);function i(p){Ct.amount=p,$(n,null)}function s(p){const h=document.getElementById("donationForm");h.checkValidity()?Ct.amount=p.target.valueAsNumber*100:(Ct.amount=void 0,h.reportValidity())}var a=zA(),o=M(a),l=M(o,!0);I(o);var c=V(o,2);Ne(c,20,()=>Ct.campaign?.options,p=>p,(p,h)=>{var g=RA();let v;var m=M(g,!0);I(g),J(y=>{v=St(g,1,"btn btn-default",null,v,{selected:Ct.amount===h}),H(m,y)},[()=>yt(h)]),pt("click",g,()=>i(h)),T(p,g)}),I(c);var f=V(c,2),u=p=>{var h=LA(),g=M(h),v=M(g),m=M(v,!0);I(v);var y=V(v,2);Is(y),I(g),I(h),J((S,k)=>{H(m,S),me(y,"max",r),me(y,"placeholder",k),Ul(y,d(n))},[()=>x.t("donations.selection.custom.label"),()=>x.t("donations.selection.custom.input.placeholder")]),pt("input",y,s),T(p,h)};ue(f,p=>{Ct.campaign?.free_donations&&p(u)}),I(a),J(p=>H(l,p),[()=>x.t("donations.selection.title")]),T(e,a),ie()}cr(["click","input"]),se(ym,{},[],[],{mode:"open"});var qA=B('<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>');function UA(e,t){ne(t,!1),En(()=>{x.donations?.campaigns?.length==1&&Ct.selectCampaign(x.donations?.campaigns[0])}),Jl();var r=re(),n=U(r),i=s=>{var a=qA(),o=M(a);Ne(o,1,()=>x?.donations?.campaigns,v=>v.id,(v,m)=>{gm(v,{get campaign(){return d(m)}})});var l=V(o,2),c=v=>{ym(v,{})};ue(l,v=>{Ct.campaign&&v(c)});var f=V(l,2),u=M(f),p=M(u,!0);I(u);var h=V(u,2),g=M(h,!0);I(h),I(f),I(a),J((v,m)=>{H(p,v),h.disabled=!Ct.amount,H(g,m)},[()=>x.t("donations.actions.continueWithoutDonation"),()=>x.t("donations.actions.addToCart")]),pt("click",u,function(...v){Ct.skipDonation?.apply(this,v)}),pt("click",h,function(...v){Ct.addDonationToCart?.apply(this,v)}),T(s,a)};ue(n,s=>{x.donations&&x.donations.campaigns&&s(i)}),T(e,r),ie()}cr(["click"]),customElements.define("go-donations",se(UA,{},[],[]));function BA(e){return typeof e=="function"}function Gs(e){return e!==null&&typeof e=="object"}var VA=["string","number","bigint","boolean"];function Wu(e){return e==null||VA.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Wu(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}var go=Symbol("box"),bm=Symbol("is-writable");function z(e,t){const r=D(e);return t?{[go]:!0,[bm]:!0,get current(){return d(r)},set current(n){t(n)}}:{[go]:!0,get current(){return e()}}}function _m(e){return Gs(e)&&go in e}function jA(e){return _m(e)?e:BA(e)?z(e):Er(e)}function Er(e){let t=ae(Me(e));return{[go]:!0,[bm]:!0,get current(){return d(t)},set current(r){$(t,r,!0)}}}function wm(...e){return function(t){for(const r of e)if(r){if(t.defaultPrevented)return;typeof r=="function"?r.call(this,t):r.current?.call(this,t)}}}var km=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ZA=/\n/g,WA=/^\s*/,HA=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,GA=/^:\s*/,KA=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,YA=/^[;\s]*/,JA=/^\s+|\s+$/g,QA=`
78
+ `,Sm="/",Em="*",ti="",XA="comment",eC="declaration";function tC(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(g){var v=g.match(ZA);v&&(r+=v.length);var m=g.lastIndexOf(QA);n=~m?g.length-m:n+g.length}function s(){var g={line:r,column:n};return function(v){return v.position=new a(g),c(),v}}function a(g){this.start=g,this.end={line:r,column:n},this.source=t.source}a.prototype.content=e;function o(g){var v=new Error(t.source+":"+r+":"+n+": "+g);if(v.reason=g,v.filename=t.source,v.line=r,v.column=n,v.source=e,!t.silent)throw v}function l(g){var v=g.exec(e);if(v){var m=v[0];return i(m),e=e.slice(m.length),v}}function c(){l(WA)}function f(g){var v;for(g=g||[];v=u();)v!==!1&&g.push(v);return g}function u(){var g=s();if(!(Sm!=e.charAt(0)||Em!=e.charAt(1))){for(var v=2;ti!=e.charAt(v)&&(Em!=e.charAt(v)||Sm!=e.charAt(v+1));)++v;if(v+=2,ti===e.charAt(v-1))return o("End of comment missing");var m=e.slice(2,v-2);return n+=2,i(m),e=e.slice(v),n+=2,g({type:XA,comment:m})}}function p(){var g=s(),v=l(HA);if(v){if(u(),!l(GA))return o("property missing ':'");var m=l(KA),y=g({type:eC,property:Tm(v[0].replace(km,ti)),value:m?Tm(m[0].replace(km,ti)):ti});return l(YA),y}}function h(){var g=[];f(g);for(var v;v=p();)v!==!1&&(g.push(v),f(g));return g}return c(),h()}function Tm(e){return e?e.replace(JA,ti):ti}function rC(e,t){let r=null;if(!e||typeof e!="string")return r;const n=tC(e),i=typeof t=="function";return n.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:o}=s;i?t(a,o,s):o&&(r=r||{},r[a]=o)}),r}var nC=/\d/,iC=["-","_","/","."];function sC(e=""){if(!nC.test(e))return e!==e.toLowerCase()}function aC(e){const t=[];let r="",n,i;for(const s of e){const a=iC.includes(s);if(a===!0){t.push(r),r="",n=void 0;continue}const o=sC(s);if(i===!1){if(n===!1&&o===!0){t.push(r),r=s,n=o;continue}if(n===!0&&o===!1&&r.length>1){const l=r.at(-1);t.push(r.slice(0,Math.max(0,r.length-1))),r=l+s,n=o;continue}}r+=s,n=o,i=a}return t.push(r),t}function xm(e){return e?aC(e).map(t=>lC(t)).join(""):""}function oC(e){return uC(xm(e||""))}function lC(e){return e?e[0].toUpperCase()+e.slice(1):""}function uC(e){return e?e[0].toLowerCase()+e.slice(1):""}function Ks(e){if(!e)return{};const t={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){t[xm(n)]=i;return}if(n.startsWith("--")){t[n]=i;return}t[oC(n)]=i}return rC(e,r),t}function Ys(...e){return(...t)=>{for(const r of e)typeof r=="function"&&r(...t)}}function cC(e,t){const r=RegExp(e,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,t):n}}var dC=cC(/[A-Z]/,e=>`-${e.toLowerCase()}`);function fC(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${dC(t)}: ${e[t]};`).join(`
79
+ `)}function Js(e={}){return fC(e).replace(`
80
+ `," ")}var hC=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],pC=new Set(hC);function mC(e){return pC.has(e)}function Ke(...e){const t={...e[0]};for(let r=1;r<e.length;r++){const n=e[r];if(n){for(const i of Object.keys(n)){const s=t[i],a=n[i],o=typeof s=="function",l=typeof a=="function";if(o&&mC(i))t[i]=wm(s,a);else if(o&&l)t[i]=Ys(s,a);else if(i==="class"){const c=Wu(s),f=Wu(a);c&&f?t[i]=Ra(s,a):c?t[i]=Ra(s):f&&(t[i]=Ra(a))}else if(i==="style"){const c=typeof s=="object",f=typeof a=="object",u=typeof s=="string",p=typeof a=="string";if(c&&f)t[i]={...s,...a};else if(c&&p){const h=Ks(a);t[i]={...s,...h}}else if(u&&f)t[i]={...Ks(s),...a};else if(u&&p){const h=Ks(s),g=Ks(a);t[i]={...h,...g}}else c?t[i]=s:f?t[i]=a:u?t[i]=s:p&&(t[i]=a)}else t[i]=a!==void 0?a:s}for(const i of Object.getOwnPropertySymbols(n)){const s=t[i],a=n[i];t[i]=a!==void 0?a:s}}}return typeof t.style=="object"&&(t.style=Js(t.style).replaceAll(`
81
+ `," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Am={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"},vC=Js(Am),Cm=typeof window<"u"?window:void 0,mN=typeof window<"u"?window.document:void 0,vN=typeof window<"u"?window.navigator:void 0,gN=typeof window<"u"?window.location:void 0;function gC(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var yC=class extends Map{#e=new Map;#t=ae(0);#r=ae(0);#n=nn||-1;constructor(e){if(super(),e){for(var[t,r]of e)super.set(t,r);this.#r.v=super.size}}#i(e){return nn===this.#n?ae(e):Sn(e)}has(e){var t=this.#e,r=t.get(e);if(r===void 0)if(super.has(e))r=this.#i(0),t.set(e,r);else return d(this.#t),!1;return d(r),!0}forEach(e,t){this.#s(),super.forEach(e,t)}get(e){var t=this.#e,r=t.get(e);if(r===void 0)if(super.has(e))r=this.#i(0),t.set(e,r);else{d(this.#t);return}return d(r),super.get(e)}set(e,t){var r=this.#e,n=r.get(e),i=super.get(e),s=super.set(e,t),a=this.#t;if(n===void 0)n=this.#i(0),r.set(e,n),$(this.#r,super.size),Lr(a);else if(i!==t){Lr(n);var o=a.reactions===null?null:new Set(a.reactions);(o===null||!n.reactions?.every(l=>o.has(l)))&&Lr(a)}return s}delete(e){var t=this.#e,r=t.get(e),n=super.delete(e);return r!==void 0&&(t.delete(e),$(r,-1)),n&&($(this.#r,super.size),Lr(this.#t)),n}clear(){if(super.size!==0){super.clear();var e=this.#e;$(this.#r,0);for(var t of e.values())$(t,-1);Lr(this.#t),e.clear()}}#s(){d(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var t of super.keys())if(!e.has(t)){var r=this.#i(0);e.set(t,r)}}for([,r]of this.#e)d(r)}keys(){return d(this.#t),super.keys()}values(){return this.#s(),super.values()}entries(){return this.#s(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return d(this.#r),super.size}},bC=class{#e;#t;constructor(e={}){const{window:t=Cm,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=wl(n=>{const i=gt(t,"focusin",n),s=gt(t,"focusout",n);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?gC(this.#e):null}},yN=new bC;function _C(e){return typeof e=="function"}var Ft=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return Eb(this.#t)}get(){const e=Ad(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=Ad(this.#t);return t===void 0?e:t}set(e){return Sb(this.#t,e)}};function wC(e,t){switch(e){case"post":ve(t);break;case"pre":Ol(t);break}}function Hu(e,t,r,n={}){const{lazy:i=!1}=n;let s=!i,a=Array.isArray(e)?[]:void 0;wC(t,()=>{const o=Array.isArray(e)?e.map(c=>c()):e();if(!s){s=!0,a=o;return}const l=Re(()=>r(o,a));return a=o,l})}function Om(e,t,r){const n=_s(()=>{let i=!1;Hu(e,t,(s,a)=>{if(i){n();return}const o=r(s,a);return i=!0,o},{lazy:!0})});ve(()=>n)}function nt(e,t,r){Hu(e,"post",t,r)}function kC(e,t,r){Hu(e,"pre",t,r)}nt.pre=kC;function SC(e,t){Om(e,"post",t)}function EC(e,t){Om(e,"pre",t)}SC.pre=EC;function Dm(e){return _C(e)?e():e}var TC=class{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=D(()=>(d(this.#a)?.(),this.getSize().width));#o=D(()=>(d(this.#a)?.(),this.getSize().height));#a=D(()=>{const e=Dm(this.#n);if(e)return wl(t=>{if(!this.#i)return;const r=new this.#i.ResizeObserver(n=>{this.#t=!0;for(const i of n){const s=this.#r.box==="content-box"?i.contentBoxSize:i.borderBoxSize,a=Array.isArray(s)?s:[s];this.#e.width=a.reduce((o,l)=>Math.max(o,l.inlineSize),0),this.#e.height=a.reduce((o,l)=>Math.max(o,l.blockSize),0)}t()});return r.observe(e),()=>{this.#t=!1,r.disconnect()}})});constructor(e,t={box:"border-box"}){this.#i=t.window??Cm,this.#r=t,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=Dm(this.#n);if(!e||!this.#i)return;const t=e.offsetWidth,r=e.offsetHeight;if(this.#r.box==="border-box")return{width:t,height:r};const n=this.#i.getComputedStyle(e),i=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),s=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),a=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),o=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth);return{width:t-i-a,height:r-s-o}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return d(this.#a)?.(),this.getSize()}get width(){return d(this.#s)}get height(){return d(this.#o)}};function xC(e,t){let r,n=null;return(...i)=>new Promise(s=>{n&&n(void 0),n=s,clearTimeout(r),r=setTimeout(async()=>{const a=await e(...i);n&&(n(a),n=null)},t)})}function AC(e,t){let r=0,n=null;return(...i)=>{const s=Date.now();return r&&s-r<t?n??Promise.resolve(void 0):(r=s,n=e(...i),n)}}function Im(e,t,r={},n){const{lazy:i=!1,once:s=!1,initialValue:a,debounce:o,throttle:l}=r;let c=ae(Me(a)),f=ae(!1),u=ae(void 0),p=ae(Me([]));const h=()=>{d(p).forEach(k=>k()),$(p,[],!0)},g=k=>{$(p,[...d(p),k],!0)},v=async(k,E,A=!1)=>{try{$(f,!0),$(u,void 0),h();const O=new AbortController;g(()=>O.abort());const F=await t(k,E,{data:d(c),refetching:A,onCleanup:g,signal:O.signal});return $(c,F,!0),F}catch(O){O instanceof DOMException&&O.name==="AbortError"||$(u,O,!0);return}finally{$(f,!1)}},m=o?xC(v,o):l?AC(v,l):v,y=Array.isArray(e)?e:[e];let S;return n((k,E)=>{s&&S||(S=k,m(Array.isArray(e)?k:k[0],Array.isArray(e)?E:E?.[0]))},{lazy:i}),{get current(){return d(c)},get loading(){return d(f)},get error(){return d(u)},mutate:k=>{$(c,k,!0)},refetch:k=>{const E=y.map(A=>A());return m(Array.isArray(e)?E:E[0],Array.isArray(e)?E:E[0],k??!0)}}}function CC(e,t,r){return Im(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e];nt(()=>s.map(o=>o()),(o,l)=>{n(o,l??[])},i)})}function OC(e,t,r){return Im(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e],a=()=>s.map(o=>o());nt.pre(a,(o,l)=>{n(o,l??[])},i)})}CC.pre=OC;function ri(e){ve(()=>()=>{e()})}function DC(e,t){return setTimeout(t,e)}function Qs(e){hf().then(e)}var IC=1,PC=9,MC=11;function Gu(e){return Gs(e)&&e.nodeType===IC&&typeof e.nodeName=="string"}function Pm(e){return Gs(e)&&e.nodeType===PC}function $C(e){return Gs(e)&&e.constructor?.name==="VisualViewport"}function FC(e){return Gs(e)&&e.nodeType!==void 0}function Mm(e){return FC(e)&&e.nodeType===MC&&"host"in e}function NC(e,t){if(!e||!t||!Gu(e)||!Gu(t))return!1;const r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&Mm(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function yo(e){return Pm(e)?e:$C(e)?e.document:e?.ownerDocument??document}function $m(e){return Mm(e)?$m(e.host):Pm(e)?e.defaultView??window:Gu(e)?e.ownerDocument?.defaultView??window:window}function RC(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var Bi=class{element;#e=D(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return d(this.#e)}set root(e){$(this.#e,e)}constructor(e){typeof e=="function"?this.element=z(e):this.element=e}getDocument=()=>yo(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>RC(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function et(e,t){return{[__()]:r=>_m(e)?(e.current=r,Re(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e.current=null,t?.(null))}):(e(r),Re(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e(null),t?.(null))})}}function Tr(e){return e?"true":"false"}function Ku(e){return e?"true":void 0}function Ve(e){return e?"":void 0}function Fm(e){return e?"open":"closed"}function LC(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}var zC=class{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(t=>[t,this.getAttr(t)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function bo(e){const t=new zC(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Yu="ArrowDown",Nm="ArrowLeft",Rm="ArrowRight",Ju="ArrowUp",qC="Backspace",UC="Enter",bN="Escape",_N=" ",wN="Tab",kN="a",SN="P",EN="A",TN="p",ln=typeof document<"u",Lm=BC();function BC(){return ln&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function xr(e){return e instanceof HTMLElement}function ni(e){return e instanceof Element}function VC(e){return e instanceof Element||e instanceof SVGElement}function _o(e){return!Number.isNaN(Number(e))&&!Number.isNaN(Number.parseFloat(e))}function Fn(e){return e===null}function wo(e){return e.pointerType==="touch"}function jC(e){return e!==null}var ZC=class{#e;#t=null;#r=null;#n=0;constructor(e){this.#e=e,ri(()=>this.#i())}#i(){this.#t!==null&&(window.cancelAnimationFrame(this.#t),this.#t=null),this.#r?.disconnect(),this.#r=null,this.#n++}run(e){this.#i();const t=this.#e.ref.current;if(!t)return;if(typeof t.getAnimations!="function"){this.#s(e);return}const r=this.#n,n=()=>{r===this.#n&&this.#s(e)},i=()=>{if(r!==this.#n)return;const a=t.getAnimations();if(a.length===0){n();return}Promise.all(a.map(o=>o.finished)).then(()=>{n()}).catch(()=>{if(r===this.#n){if(t.getAnimations().some(o=>o.pending||o.playState!=="finished")){i();return}n()}})},s=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,i()})};if(!this.#e.afterTick.current){s();return}this.#t=window.requestAnimationFrame(()=>{this.#t=null;const a="data-starting-style";if(!t.hasAttribute(a)){s();return}this.#r=new MutationObserver(()=>{r===this.#n&&(t.hasAttribute(a)||(this.#r?.disconnect(),this.#r=null,s()))}),this.#r.observe(t,{attributes:!0,attributeFilter:[a]})})}#s(e){const t=()=>{e()};this.#e.afterTick?Qs(t):t()}},zm=class{#e;#t;#r;#n=ae(!1);#i=ae(void 0);#s=!1;#o=null;constructor(e){this.#e=e,$(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new ZC({ref:this.#e.ref,afterTick:this.#e.open}),ri(()=>this.#a()),nt(()=>this.#e.open.current,t=>{if(!this.#s){this.#s=!0;return}if(this.#a(),!t&&this.#e.shouldSkipExitAnimation?.()){$(this.#n,!1),$(this.#i,void 0),this.#e.onComplete?.();return}if(t&&$(this.#n,!0),$(this.#i,t?"starting":"ending",!0),t&&(this.#o=window.requestAnimationFrame(()=>{this.#o=null,this.#e.open.current&&$(this.#i,void 0)})),!this.#t){t||$(this.#n,!1),$(this.#i,void 0),this.#e.onComplete?.();return}this.#r.run(()=>{t===this.#e.open.current&&(this.#e.open.current||$(this.#n,!1),$(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return d(this.#n)}get transitionStatus(){return d(this.#i)}#a(){this.#o!==null&&(window.cancelAnimationFrame(this.#o),this.#o=null)}};function Te(){}function Pe(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var WC=new Ft("BitsConfig");function HC(){const e=new GC(null,{});return WC.getOr(e).opts}var GC=class{opts;constructor(e,t){const r=KC(e,t);this.opts={defaultPortalTo:r(n=>n.defaultPortalTo),defaultLocale:r(n=>n.defaultLocale)}}};function KC(e,t){return r=>z(()=>{const n=r(t)?.current;if(n!==void 0)return n;if(e!==null)return r(e.opts)?.current})}function qm(e,t){return r=>{const n=HC();return z(()=>{const i=r();if(i!==void 0)return i;const s=e(n).current;return s!==void 0?s:t})}}var Um=qm(e=>e.defaultLocale,"en"),xN=qm(e=>e.defaultPortalTo,"body"),YC=class{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){const r=this.createEvent(t);return e.dispatchEvent(r),r}listen(e,t,r){const n=i=>{t(i)};return gt(e,this.eventName,n,r)}};function Bm(e,t=500){let r=null;const n=(...i)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{e(...i)},t)};return n.destroy=()=>{r!==null&&(clearTimeout(r),r=null)},n}function Vm(e,t){return e===t||e.contains(t)}function jm(e){return e?.ownerDocument??document}function JC(e,t){const{clientX:r,clientY:n}=e,i=t.getBoundingClientRect();return r<i.left||r>i.right||n<i.top||n>i.bottom}var Zm=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ko=Zm.join(","),Wm=typeof Element>"u",ii=Wm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,So=!Wm&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Eo=function(t,r){var n;r===void 0&&(r=!0);var i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert");return i===""||i==="true"||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Eo(t.parentNode))},QC=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Hm=function(t,r,n){if(Eo(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ko));return r&&ii.call(t,ko)&&i.unshift(t),i=i.filter(n),i},To=function(t,r,n){for(var i=[],s=Array.from(t);s.length;){var a=s.shift();if(!Eo(a,!1))if(a.tagName==="SLOT"){var o=a.assignedElements(),l=To(o.length?o:a.children,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:a,candidates:l})}else{ii.call(a,ko)&&n.filter(a)&&(r||!t.includes(a))&&i.push(a);var c=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),f=!Eo(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&f){var u=To(c===!0?a.children:c.children,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:a,candidates:u})}else s.unshift.apply(s,a.children)}}return i},Gm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Km=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||QC(t))&&!Gm(t)?0:t.tabIndex},XC=function(t,r){var n=Km(t);return n<0&&r&&!Gm(t)?0:n},eO=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Ym=function(t){return t.tagName==="INPUT"},tO=function(t){return Ym(t)&&t.type==="hidden"},rO=function(t){return t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"})},nO=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},iO=function(t){if(!t.name)return!0;var r=t.form||So(t),n=function(o){return r.querySelectorAll('input[type="radio"][name="'+o+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var s=nO(i,t.form);return!s||s===t},sO=function(t){return Ym(t)&&t.type==="radio"},aO=function(t){return sO(t)&&!iO(t)},oO=function(t){var r,n=t&&So(t),i=(r=n)===null||r===void 0?void 0:r.host,s=!1;if(n&&n!==t){var a,o,l;for(s=!!((a=i)!==null&&a!==void 0&&(o=a.ownerDocument)!==null&&o!==void 0&&o.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&i;){var c,f,u;n=So(i),i=(c=n)===null||c===void 0?void 0:c.host,s=!!((f=i)!==null&&f!==void 0&&(u=f.ownerDocument)!==null&&u!==void 0&&u.contains(i))}}return s},Jm=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},lO=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(t).visibility==="hidden")return!0;var s=ii.call(t,"details>summary:first-of-type")?t.parentElement:t;if(ii.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var a=t;t;){var o=t.parentElement,l=So(t);if(o&&!o.shadowRoot&&i(o)===!0)return Jm(t);t.assignedSlot?t=t.assignedSlot:!o&&l!==t.ownerDocument?t=l.host:t=o}t=a}if(oO(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Jm(t);return!1},uO=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return ii.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},xo=function(t,r){return!(r.disabled||tO(r)||lO(r,t)||rO(r)||uO(r))},Qu=function(t,r){return!(aO(r)||Km(r)<0||!xo(t,r))},cO=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},Qm=function(t){var r=[],n=[];return t.forEach(function(i,s){var a=!!i.scopeParent,o=a?i.scopeParent:i,l=XC(o,a),c=a?Qm(i.candidates):o;l===0?a?r.push.apply(r,c):r.push(o):n.push({documentOrder:s,tabIndex:l,item:i,isScope:a,content:c})}),n.sort(eO).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(r)},dO=function(t,r){r=r||{};var n;return r.getShadowRoot?n=To([t],r.includeContainer,{filter:Qu.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:cO}):n=Hm(t,r.includeContainer,Qu.bind(null,r)),Qm(n)},fO=function(t,r){r=r||{};var n;return r.getShadowRoot?n=To([t],r.includeContainer,{filter:xo.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=Hm(t,r.includeContainer,xo.bind(null,r)),n},hO=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return ii.call(t,ko)===!1?!1:Qu(r,t)},pO=Zm.concat("iframe:not([inert]):not([inert] *)").join(","),mO=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return ii.call(t,pO)===!1?!1:xo(r,t)};function vO(e,t){if(t<=0)return[];const r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}function Xu(e,t){return e>=0&&e<t.length}var gO="data-context-menu-trigger",yO="data-context-menu-content",AN=new Ft("Menu.Root"),CN=new Ft("Menu.Root | Menu.Sub"),ON=new Ft("Menu.Content"),DN=new Ft("Menu.Group | Menu.RadioGroup"),IN=new Ft("Menu.RadioGroup"),PN=new Ft("Menu.CheckboxGroup"),MN=new YC("bitsmenuopen",{bubbles:!1,cancelable:!0}),$N=bo({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});globalThis.bitsDismissableLayers??=new Map;var bO=class dy{static create(t){return new dy(t)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#s=void 0;#o;#a=Te;constructor(t){this.opts=t,this.#t=t.interactOutsideBehavior,this.#e=t.onInteractOutside,this.#o=t.onFocusOutside,ve(()=>{this.#s=jm(this.opts.ref.current)});let r=Te;const n=()=>{this.#v(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),r()};nt([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return DC(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#u())}),n}),ri(()=>{this.#v.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#a(),r()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Qs(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#o.current?.(t)})};#u(){return Ys(gt(this.#s,"pointerdown",Ys(this.#h,this.#f),{capture:!0}),gt(this.#s,"pointerdown",Ys(this.#p,this.#d)),gt(this.#s,"focusin",this.#l))}#c=t=>{let r=t;r.defaultPrevented&&(r=Xm(t)),this.#e.current(t)};#d=Bm(t=>{if(!this.opts.ref.current){this.#a();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||kO(t,this.opts.ref.current);if(!this.#n||this.#y()||!r){this.#a();return}let n=t;if(n.defaultPrevented&&(n=Xm(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#a();return}t.pointerType==="touch"?(this.#a(),this.#a=gt(this.#s,"click",this.#c,{once:!0})):this.#e.current(n)},10);#h=t=>{this.#r[t.type]=!0};#p=t=>{this.#r[t.type]=!1};#f=()=>{this.opts.ref.current&&(this.#n=wO(this.opts.ref.current))};#m=t=>this.opts.ref.current?Vm(this.opts.ref.current,t):!1;#v=Bm(()=>{for(const t in this.#r)this.#r[t]=!1;this.#n=!1},20);#y(){return Object.values(this.#r).some(Boolean)}#w=()=>{this.#i=!0};#_=()=>{this.#i=!1};props={onfocuscapture:this.#w,onblurcapture:this.#_}};function _O(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:r}])=>r==="close"||r==="ignore")}function wO(e){const t=[...globalThis.bitsDismissableLayers],r=_O(t);if(r)return r[0].opts.ref.current===e;const[n]=t[0];return n.opts.ref.current===e}function kO(e,t){const r=e.target;if(!VC(r))return!1;const n=!!r.closest(`[${gO}]`),i=!!t.closest(`[${yO}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:jm(r).documentElement.contains(r)&&!Vm(t,r)&&JC(e,t)}function Xm(e){const t=e.currentTarget,r=e.target;let n;e instanceof PointerEvent?n=new PointerEvent(e.type,e):n=new PointerEvent("pointerdown",e);let i=!1;return new Proxy(n,{get:(s,a)=>a==="currentTarget"?t:a==="target"?r:a==="preventDefault"?()=>{i=!0,typeof s.preventDefault=="function"&&s.preventDefault()}:a==="defaultPrevented"?i:a in s?s[a]:e[a]})}function ev(e,t){ne(t,!0);let r=_(t,"interactOutsideBehavior",7,"close"),n=_(t,"onInteractOutside",7,Te),i=_(t,"onFocusOutside",7,Te),s=_(t,"id",7),a=_(t,"children",7),o=_(t,"enabled",7),l=_(t,"isValidEvent",7,()=>!1),c=_(t,"ref",7);const f=bO.create({id:z(()=>s()),interactOutsideBehavior:z(()=>r()),onInteractOutside:z(()=>n()),enabled:z(()=>o()),onFocusOutside:z(()=>i()),isValidEvent:z(()=>l()),ref:c()});var u={get interactOutsideBehavior(){return r()},set interactOutsideBehavior(g="close"){r(g),b()},get onInteractOutside(){return n()},set onInteractOutside(g=Te){n(g),b()},get onFocusOutside(){return i()},set onFocusOutside(g=Te){i(g),b()},get id(){return s()},set id(g){s(g),b()},get children(){return a()},set children(g){a(g),b()},get enabled(){return o()},set enabled(g){o(g),b()},get isValidEvent(){return l()},set isValidEvent(g=()=>!1){l(g),b()},get ref(){return c()},set ref(g){c(g),b()}},p=re(),h=U(p);return Se(h,()=>a()??qe,()=>({props:f.props})),T(e,p),ie(u)}se(ev,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;var SO=class fy{static create(t){return new fy(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new Bi(this.opts.ref);let r=Te;nt(()=>t.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>gt(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=t=>{if(t.key!=="Escape"||!EO(this))return;const r=new KeyboardEvent(t.type,t);t.preventDefault();const n=this.opts.escapeKeydownBehavior.current;n!=="close"&&n!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(r)}};function EO(e){const t=[...globalThis.bitsEscapeLayers],r=t.findLast(([i,{current:s}])=>s==="close"||s==="ignore");if(r)return r[0]===e;const[n]=t[0];return n===e}function tv(e,t){ne(t,!0);let r=_(t,"escapeKeydownBehavior",7,"close"),n=_(t,"onEscapeKeydown",7,Te),i=_(t,"children",7),s=_(t,"enabled",7),a=_(t,"ref",7);SO.create({escapeKeydownBehavior:z(()=>r()),onEscapeKeydown:z(()=>n()),enabled:z(()=>s()),ref:a()});var o={get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(f="close"){r(f),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(f=Te){n(f),b()},get children(){return i()},set children(f){i(f),b()},get enabled(){return s()},set enabled(f){s(f),b()},get ref(){return a()},set ref(f){a(f),b()}},l=re(),c=U(l);return Se(c,()=>i()??qe),T(e,l),ie(o)}se(tv,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});var TO=class hy{static instance;#e=Er([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new hy),this.instance}register(t){const r=this.getActive();r&&r!==t&&r.pause();const n=document.activeElement;n&&n!==document.body&&this.#r.set(t,n),this.#e.current=this.#e.current.filter(i=>i!==t),this.#e.current.unshift(t)}unregister(t){this.#e.current=this.#e.current.filter(n=>n!==t);const r=this.getActive();r&&r.resume()}getActive(){return this.#e.current[0]}setFocusMemory(t,r){this.#t.set(t,r)}getFocusMemory(t){return this.#t.get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,r){this.#r.set(t,r)}getPreFocusMemory(t){return this.#r.get(t)}clearPreFocusMemory(t){this.#r.delete(t)}},xO=class py{#e=!1;#t=null;#r=TO.getInstance();#n=[];#i;constructor(t){this.#i=t}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#s(){for(const t of this.#n)t();this.#n=[]}mount(t){this.#t&&this.unmount(),this.#t=t,this.#r.register(this),this.#l(),this.#o()}unmount(){this.#t&&(this.#s(),this.#a(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#t=null)}#o(){if(!this.#t)return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;const r=this.#c();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#t.focus()})}#a(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(t),!t.defaultPrevented){const r=this.#r.getPreFocusMemory(this);if(r&&document.contains(r))try{r.focus()}catch{document.body.focus()}}}#l(){if(!this.#t||!this.#i.trap.current)return;const t=this.#t,r=t.ownerDocument,n=a=>{if(this.#e||!this.#r.isActiveScope(this))return;const o=a.target;if(o)if(t.contains(o))this.#r.setFocusMemory(this,o);else{const l=this.#r.getFocusMemory(this);if(l&&t.contains(l)&&mO(l))a.preventDefault(),l.focus();else{const c=this.#c(),f=this.#d()[0];(c||f||t).focus()}}},i=a=>{if(!this.#i.loop||this.#e||a.key!=="Tab"||!this.#r.isActiveScope(this))return;const o=this.#u();if(o.length===0)return;const l=o[0],c=o[o.length-1];!a.shiftKey&&r.activeElement===c?(a.preventDefault(),l.focus()):a.shiftKey&&r.activeElement===l&&(a.preventDefault(),c.focus())};this.#n.push(gt(r,"focusin",n,{capture:!0}),gt(t,"keydown",i));const s=new MutationObserver(()=>{const a=this.#r.getFocusMemory(this);if(a&&!t.contains(a)){const o=this.#c(),l=this.#d()[0],c=o||l;c?(c.focus(),this.#r.setFocusMemory(this,c)):t.focus()}});s.observe(t,{childList:!0,subtree:!0}),this.#n.push(()=>s.disconnect())}#u(){return this.#t?dO(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#c(){return this.#u()[0]||null}#d(){return this.#t?fO(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let r=null;return nt([()=>t.ref.current,()=>t.enabled.current],([n,i])=>{n&&i?(r||(r=new py(t)),r.mount(n)):r&&(r.unmount(),r=null)}),ri(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}};function rv(e,t){ne(t,!0);let r=_(t,"enabled",7,!1),n=_(t,"trapFocus",7,!1),i=_(t,"loop",7,!1),s=_(t,"onCloseAutoFocus",7,Te),a=_(t,"onOpenAutoFocus",7,Te),o=_(t,"focusScope",7),l=_(t,"ref",7);const c=xO.use({enabled:z(()=>r()),trap:z(()=>n()),loop:i(),onCloseAutoFocus:z(()=>s()),onOpenAutoFocus:z(()=>a()),ref:l()});var f={get enabled(){return r()},set enabled(h=!1){r(h),b()},get trapFocus(){return n()},set trapFocus(h=!1){n(h),b()},get loop(){return i()},set loop(h=!1){i(h),b()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(h=Te){s(h),b()},get onOpenAutoFocus(){return a()},set onOpenAutoFocus(h=Te){a(h),b()},get focusScope(){return o()},set focusScope(h){o(h),b()},get ref(){return l()},set ref(h){l(h),b()}},u=re(),p=U(u);return Se(p,()=>o()??qe,()=>({props:c.props})),T(e,u),ie(f)}se(rv,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"});var nv=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var AO=class my{static create(t){return new my(t)}opts;domContext;#e=Te;#t=!1;#r=nv;#n=nv;constructor(t){this.opts=t,this.domContext=new Bi(t.ref);let r=Te;nt(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([n,i,s])=>(this.#t=n,this.#r=i,this.#n=s,n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#i()),()=>{this.#t=!1,r(),this.#a(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return Ys(gt(this.domContext.getDocument(),"pointerdown",this.#o),gt(this.domContext.getDocument(),"pointerup",wm(this.#a,this.#s)))}#s=t=>{this.#n(t)};#o=t=>{const r=this.opts.ref.current,n=t.target;!xr(r)||!xr(n)||!this.#t||!OO(this)||!NC(r,n)||(this.#r(t),!t.defaultPrevented&&(this.#e=CO(r,this.domContext.getDocument().body)))};#a=()=>{this.#e(),this.#e=Te}},iv=e=>e.style.userSelect||e.style.webkitUserSelect;function CO(e,t){const r=iv(t),n=iv(e);return Ao(t,"none"),Ao(e,"text"),()=>{Ao(t,r),Ao(e,n)}}function Ao(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function OO(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function sv(e,t){ne(t,!0);let r=_(t,"preventOverflowTextSelection",7,!0),n=_(t,"onPointerDown",7,Te),i=_(t,"onPointerUp",7,Te),s=_(t,"id",7),a=_(t,"children",7),o=_(t,"enabled",7),l=_(t,"ref",7);AO.create({id:z(()=>s()),onPointerDown:z(()=>n()),onPointerUp:z(()=>i()),enabled:z(()=>o()&&r()),ref:l()});var c={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(p=!0){r(p),b()},get onPointerDown(){return n()},set onPointerDown(p=Te){n(p),b()},get onPointerUp(){return i()},set onPointerUp(p=Te){i(p),b()},get id(){return s()},set id(p){s(p),b()},get children(){return a()},set children(p){a(p),b()},get enabled(){return o()},set enabled(p){o(p),b()},get ref(){return l()},set ref(p){l(p),b()}},f=re(),u=U(f);return Se(u,()=>a()??qe),T(e,f),ie(c)}se(sv,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsIdCounter??={current:0};function Nn(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var DO=class{#e;#t=0;#r=ae();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),$(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,d(this.#r)===void 0&&(this.#n=_s(()=>{$(this.#r,this.#e(...e),!0)})),ve(()=>()=>{this.#i()}),d(this.#r)}},Co=new yC,Oo=ae(null),ec=null,Xs=null,ea=!1,av=z(()=>{for(const e of Co.values())if(e)return!0;return!1}),tc=null,IO=new DO(()=>{function e(){document.body.setAttribute("style",d(Oo)??""),document.body.style.removeProperty("--scrollbar-width"),Lm&&ec?.(),$(Oo,null)}function t(){Xs!==null&&(window.clearTimeout(Xs),Xs=null)}function r(i,s){t(),ea=!0,tc=Date.now();const a=tc,o=()=>{Xs=null,tc===a&&(ov(Co)?ea=!1:(ea=!1,s()))},l=i===null?24:i;Xs=window.setTimeout(o,l)}function n(){d(Oo)===null&&Co.size===0&&!ea&&$(Oo,document.body.getAttribute("style"),!0)}return nt(()=>av.current,()=>{if(!av.current)return;n(),ea=!1;const i=getComputedStyle(document.documentElement),s=getComputedStyle(document.body),a=i.scrollbarGutter?.includes("stable")||s.scrollbarGutter?.includes("stable"),o=window.innerWidth-document.documentElement.clientWidth,l={padding:Number.parseInt(s.paddingRight??"0",10)+o,margin:Number.parseInt(s.marginRight??"0",10)};o>0&&!a&&(document.body.style.paddingRight=`${l.padding}px`,document.body.style.marginRight=`${l.margin}px`,document.body.style.setProperty("--scrollbar-width",`${o}px`)),document.body.style.overflow="hidden",Lm&&(ec=gt(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),Qs(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),ri(()=>()=>{ec?.()}),{get lockMap(){return Co},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}}),PO=class{#e=Nn();#t;#r=()=>null;#n;locked;constructor(e,t=()=>null){this.#t=e,this.#r=t,this.#n=IO.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=z(()=>this.#n.lockMap.get(this.#e)??!1,r=>this.#n.lockMap.set(this.#e,r)),ri(()=>{if(this.#n.lockMap.delete(this.#e),ov(this.#n.lockMap))return;const r=this.#r();this.#n.scheduleCleanupIfNoNewLocks(r,()=>{this.#n.resetBodyStyle()})}))}};function ov(e){for(const[t,r]of e)if(r)return!0;return!1}function rc(e,t){ne(t,!0);let r=_(t,"preventScroll",7,!0),n=_(t,"restoreScrollDelay",7,null);return r()&&new PO(r(),()=>n()),ie({get preventScroll(){return r()},set preventScroll(i=!0){r(i),b()},get restoreScrollDelay(){return n()},set restoreScrollDelay(i=null){n(i),b()}})}se(rc,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function MO(e){if(!ln||!e)return null;let t=e.querySelector("[data-bits-announcer]");const r=i=>{const s=e.createElement("div");return s.role="log",s.ariaLive=i,s.setAttribute("aria-relevant","additions"),s};if(!xr(t)){const i=e.createElement("div");i.style.cssText=vC,i.setAttribute("data-bits-announcer",""),i.appendChild(r("assertive")),i.appendChild(r("polite")),t=i,e.body.insertBefore(t,e.body.firstChild)}return{getLog:i=>{if(!xr(t))return null;const s=t.querySelector(`[aria-live="${i}"]`);return xr(s)?s:null}}}function Do(e){const t=MO(e);function r(n,i="assertive",s=7500){if(!t||!ln||!e)return;const a=t.getLog(i),o=e.createElement("div");return typeof n=="number"?n=n.toString():n===null?n="Empty":n=n.trim(),o.innerText=n,i==="assertive"?a?.replaceChildren(o):a?.appendChild(o),setTimeout(()=>{o.remove()},s)}return{announce:r}}var $O={defaultValue:void 0,granularity:"day"};function lv(e){const{defaultValue:t,granularity:r,minValue:n,maxValue:i}={...$O,...e};if(Array.isArray(t)&&t.length)return t[t.length-1];if(t&&!Array.isArray(t))return t;{let s=new Date;n&&s<n.toDate(Xt())?s=n.toDate(Xt()):i&&s>i.toDate(Xt())&&(s=i.toDate(Xt()));const a=s.getFullYear(),o=s.getMonth()+1,l=s.getDate();return["hour","minute","second"].includes(r??"day")?new Ii(a,o,l,0,0,0):new zs(a,o,l)}}function uv(e,t){let r;return t instanceof Mn?r=lp(e):t instanceof Ii?r=op(e):r=ao(e),r.calendar!==t.calendar?er(r,t.calendar):r}function Zt(e,t=Xt()){return e instanceof Mn?e.toDate():e.toDate(t)}function FO(e){if(e instanceof zs)return"date";if(e instanceof Ii)return"datetime";if(e instanceof Mn)return"zoneddatetime";throw new Error("Unknown date type")}function NO(e,t){switch(t){case"date":return ao(e);case"datetime":return op(e);case"zoneddatetime":return lp(e);default:throw new Error(`Unknown date type: ${t}`)}}function RO(e){return e instanceof Ii}function nc(e){return e instanceof Mn}function Io(e){return RO(e)||nc(e)}function ta(e){if(e instanceof Date){const t=e.getFullYear(),r=e.getMonth()+1;return new Date(t,r,0).getDate()}else return e.set({day:100}).day}function si(e,t){return e.compare(t)<0}function LO(e,t){return e.compare(t)>0}function cv(e,t,r){const n=Zh(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function dv(e,t,r){const n=Zh(e,r),i=t===0?6:t-1;return n===i?e:n>i?e.add({days:7-n+i}):e.add({days:i-n})}var Po=["day","month","year"],Mo=["hour","minute","second","dayPeriod"],fv=["literal","timeZoneName"],ra=[...Po,...Mo],hv=[...ra,...fv],zO=[...Mo,...fv],FN=hv.filter(e=>e!=="literal"),NN=zO.filter(e=>e!=="literal"),qO=["ach","af","am","an","ar","ast","az","be","bg","bn","br","bs","ca","cak","ckb","cs","cy","da","de","dsb","el","en","eo","es","et","eu","fa","ff","fi","fr","fy","ga","gd","gl","he","hr","hsb","hu","ia","id","it","ja","ka","kk","kn","ko","lb","lo","lt","lv","meh","ml","ms","nl","nn","no","oc","pl","pt","rm","ro","ru","sc","scn","sk","sl","sr","sv","szl","tg","th","tr","uk","zh-CN","zh-TW"],UO=["year","month","day"],ic={ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:" 年 ",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}};function BO(e){if(pv(e))return ic[e];{const t=WO(e);return pv(t)?ic[t]:ic.en}}function sc(e,t,r){return VO(e)?BO(r)[e]:ZO(e)?t:jO(e)?"––":""}function pv(e){return qO.includes(e)}function VO(e){return UO.includes(e)}function jO(e){return e==="hour"||e==="minute"||e==="second"}function ZO(e){return e==="era"||e==="dayPeriod"}function WO(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function ac(e){const t=["hour","minute","second"],r=ra.map(n=>n==="dayPeriod"?[n,"AM"]:[n,null]).filter(([n])=>n==="literal"||n===null?!1:e==="day"?!t.includes(n):!0);return Object.fromEntries(r)}function HO(e){const{segmentValues:t,formatter:r,locale:n,dateRef:i}=e,s=Object.keys(t).reduce((o,l)=>{if(!vv(l))return o;if("hour"in t&&l==="dayPeriod"){const c=t[l];Fn(c)?o[l]=sc(l,"AM",n):o[l]=c}else o[l]=a(l);return o},{});function a(o){if("hour"in t){const l=t[o],c=typeof l=="string"&&l?.startsWith("0"),f=l!==null?Number.parseInt(l):null;if(l==="0"&&o!=="year")return"0";if(!Fn(l)&&!Fn(f)){const u=r.part(i.set({[o]:l}),o,{hourCycle:e.hourCycle===24?"h23":void 0}),p=e.hourCycle===12||e.hourCycle===void 0&&yv(n)===12;if(o==="hour"&&p){if(f>12){const h=f-12;return h===0?"12":h<10?`0${h}`:`${h}`}return f===0?"12":f<10?`0${f}`:`${f}`}return o==="year"?`${l}`:c&&u.length===1?`0${u}`:u}else return sc(o,"",n)}else{if($o(o)){const l=t[o],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(Fn(l))return sc(o,"",n);{const f=r.part(i.set({[o]:l}),o);return o==="year"?`${l}`:c&&f.length===1?`0${f}`:f}}return""}}return s}function GO(e){const{granularity:t,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:a}=e;return n.toParts(r,YO(t,a)).map(o=>["literal","dayPeriod","timeZoneName",null].includes(o.type)||!vv(o.type)?{part:o.type,value:o.value}:{part:o.type,value:i[o.type]}).filter(o=>!(Fn(o.part)||Fn(o.value)||o.part==="timeZoneName"&&(!nc(r)||s)))}function KO(e){const t=HO(e);return{obj:t,arr:GO({contentObj:t,...e})}}function YO(e,t){const r={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short",hourCycle:t===24?"h23":void 0,hour12:t===24?!1:void 0};return e==="day"&&(delete r.second,delete r.hour,delete r.minute,delete r.timeZoneName),e==="hour"&&delete r.minute,e==="minute"&&delete r.second,r}function mv(){return ra.reduce((e,t)=>(e[t]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},e),{})}function $o(e){return Po.includes(e)}function vv(e){return ra.includes(e)}function JO(e){return hv.includes(e)}function gv(e){return!ln||!e?[]:Fo(e).map(t=>t.dataset.segment).filter(t=>ra.includes(t))}function QO(e){const{segmentObj:t,fieldNode:r,dateRef:n}=e,i=gv(r);let s=n;for(const a of i)if("hour"in t){const o=t[a];if(Fn(o))continue;s=s.set({[a]:t[a]})}else if($o(a)){const o=t[a];if(Fn(o))continue;s=s.set({[a]:t[a]})}return s}function XO(e,t){const r=gv(t);for(const n of r)if("hour"in e){if(e[n]===null)return!1}else if($o(n)&&e[n]===null)return!1;return!0}function eD(e){return typeof e!="object"||e===null?!1:Object.entries(e).every(([t,r])=>(Mo.includes(t)||Po.includes(t))&&(t==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function tD(e,t){return t||(Io(e)?"minute":"day")}function oc(e){return!!(["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Backspace"," "].includes(e)||_o(e))}function rD(e,t){if(!ln)return!1;const r=Fo(t);return r.length?r[0].id===e:!1}function nD(e){const{id:t,formatter:r,value:n,doc:i}=e;if(!ln)return;const s=r.selectedDate(n),a=i.getElementById(t);if(a)a.innerText=`Selected Date: ${s}`;else{const o=i.createElement("div");o.style.cssText=Js({display:"none"}),o.id=t,o.innerText=`Selected Date: ${s}`,i.body.appendChild(o)}}function iD(e,t){if(!ln)return;const r=t.getElementById(e);r&&t.body.removeChild(r)}function yv(e){return new Intl.DateTimeFormat(e,{hour:"numeric"}).formatToParts(new Date("2023-01-01T13:00:00")).find(t=>t.type==="hour")?.value==="1"?12:24}function na(e,t){const r=e.currentTarget;if(!xr(r))return;const{prev:n,next:i}=lc(r,t);if(e.key==="ArrowLeft"){if(!n)return;n.focus()}else if(e.key==="ArrowRight"){if(!i)return;i.focus()}}function sD(e,t){const r=t.indexOf(e);return r===t.length-1||r===-1?null:t[r+1]}function aD(e,t){const r=t.indexOf(e);return r===0||r===-1?null:t[r-1]}function lc(e,t){const r=Fo(t);return r.length?{next:sD(e,r),prev:aD(e,r)}:{next:null,prev:null}}function bv(e,t){const r=e.currentTarget;if(!xr(r))return;const{next:n}=lc(r,t);n&&n.focus()}function _v(e,t){const r=e.currentTarget;if(!xr(r))return;const{prev:n}=lc(r,t);n&&n.focus()}function ia(e){return e==="ArrowRight"||e==="ArrowLeft"}function Fo(e){return e?Array.from(e.querySelectorAll("[data-segment]")).filter(t=>{if(!xr(t))return!1;const r=t.dataset.segment;return r==="trigger"?!0:!(!JO(r)||r==="literal")}):[]}function oD(e){return Fo(e)[0]}var lD={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function wv(e){let t=e.initialLocale;function r(h){t=h}function n(){return t}function i(h,g){return new hr(t,g).format(h)}function s(h,g=!0){return Io(h)&&g?i(Zt(h),{dateStyle:"long",timeStyle:"long"}):i(Zt(h),{dateStyle:"long"})}function a(h){return typeof e.monthFormat.current!="function"&&typeof e.yearFormat.current!="function"?new hr(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(h):`${typeof e.monthFormat.current=="function"?e.monthFormat.current(h.getMonth()+1):new hr(t,{month:e.monthFormat.current}).format(h)} ${typeof e.yearFormat.current=="function"?e.yearFormat.current(h.getFullYear()):new hr(t,{year:e.yearFormat.current}).format(h)}`}function o(h){return new hr(t,{month:"long"}).format(h)}function l(h){return new hr(t,{year:"numeric"}).format(h)}function c(h,g){return nc(h)?new hr(t,{...g,timeZone:h.timeZone}).formatToParts(Zt(h)):new hr(t,g).formatToParts(Zt(h))}function f(h,g="narrow"){return new hr(t,{weekday:g}).format(h)}function u(h,g=void 0){return new hr(t,{hour:"numeric",minute:"numeric",hourCycle:g===24?"h23":void 0}).formatToParts(h).find(v=>v.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function p(h,g,v={}){const m=c(h,{...lD,...v}).find(y=>y.type===g);return m?m.value:""}return{setLocale:r,getLocale:n,fullMonth:o,fullYear:l,fullMonthAndYear:a,toParts:c,custom:i,part:p,dayPeriod:u,selectedDate:s,dayOfWeek:f}}function uD(e){return!(!xr(e)||!e.hasAttribute("data-bits-day"))}function kv(e,t){const r=[];let n=e.add({days:1});const i=t;for(;n.compare(i)<0;)r.push(n),n=n.add({days:1});return r}function uc(e){const{dateObj:t,weekStartsOn:r,fixedWeeks:n,locale:i}=e,s=ta(t),a=Array.from({length:s},(v,m)=>t.set({day:m+1})),o=yu(t),l=Y1(t),c=r!==void 0?cv(o,r,"en-US"):cv(o,0,i),f=r!==void 0?dv(l,r,"en-US"):dv(l,0,i),u=kv(c.subtract({days:1}),o),p=kv(l,f.add({days:1})),h=u.length+a.length+p.length;if(n&&h<42){const v=42-h;let m=p[p.length-1];m||(m=t.add({months:1}).set({day:1}));let y=v;p.length===0&&(y=v-1,p.push(m));const S=Array.from({length:y},(k,E)=>{const A=E+1;return m.add({days:A})});p.push(...S)}const g=u.concat(a,p);return{value:t,dates:g,weeks:vO(g,7)}}function sa(e){const{numberOfMonths:t,dateObj:r,...n}=e,i=[];if(!t||t===1)return i.push(uc({...n,dateObj:r})),i;i.push(uc({...n,dateObj:r}));for(let s=1;s<t;s++){const a=r.add({months:s});i.push(uc({...n,dateObj:a}))}return i}function cc(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(t=>xr(t)):[]}function Sv(e,t){const r=e.getAttribute("data-value");r&&(t.current=uv(r,t.current))}function cD({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:a,numberOfMonths:o}){const l=cc(n);if(!l.length)return;const c=l.indexOf(e)+t;if(Xu(c,l)){const f=l[c];return Sv(f,r),f.focus()}if(c<0){if(i)return;const f=a[0]?.value;if(!f)return;r.current=f.subtract({months:o}),Qs(()=>{const u=cc(n);if(!u.length)return;const p=u.length-Math.abs(c);if(Xu(p,u)){const h=u[p];return Sv(h,r),h.focus()}})}if(c>=l.length){if(s)return;const f=a[0]?.value;if(!f)return;r.current=f.add({months:o}),Qs(()=>{const u=cc(n);if(!u.length)return;const p=c-l.length;if(Xu(p,u))return u[p].focus()})}}var Ev=[Yu,Ju,Nm,Rm],Tv=[UC," "];function dD({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!uD(i)||!Ev.includes(e.key)&&!Tv.includes(e.key))return;e.preventDefault();const s={[Yu]:7,[Ju]:-7,[Nm]:-1,[Rm]:1};if(Ev.includes(e.key)){const a=s[e.key];a!==void 0&&r(i,a)}if(Tv.includes(e.key)){const a=i.getAttribute("data-value");if(!a)return;t(e,uv(a,n))}}function fD({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:a,setPlaceholder:o}){const l=e[0]?.value;if(l)if(n)o(l.add({months:r}));else{const c=l.add({months:1}),f=sa({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:a,numberOfMonths:r});o(c),t(f)}}function hD({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:a,setPlaceholder:o}){const l=e[0]?.value;if(l)if(n)o(l.subtract({months:r}));else{const c=l.subtract({months:1}),f=sa({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:a,numberOfMonths:r});o(c),t(f)}}function pD({months:e,formatter:t,weekdayFormat:r}){if(!e.length)return[];const n=e[0].weeks[0];return n?n.map(i=>t.dayOfWeek(Zt(i),r)):[]}function mD(e){ve(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;Re(()=>{const s=e.placeholder.current;if(!s)return;const a={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(sa({...a,dateObj:s}))})})}function vD({calendarNode:e,label:t,accessibleHeadingId:r}){const n=yo(e),i=n.createElement("div");i.style.cssText=Js({border:"0px",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"});const s=n.createElement("div");return s.textContent=t,s.id=r,s.role="heading",s.ariaLevel="2",e.insertBefore(i,e.firstChild),i.appendChild(s),()=>{const a=n.getElementById(r);a&&(i.parentElement?.removeChild(i),a.remove())}}function gD({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:a}){ve(()=>{e.current,Re(()=>{t().some(o=>vu(o,e.current))||a(sa({weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current,dateObj:e.current}))})})}function yD({maxValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[t.length-1]?.value;return n?LO(n.add({months:1}).set({day:1}),e):!1}function bD({minValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[0]?.value;return n?si(n.subtract({months:1}).set({day:35}),e):!1}function _D({months:e,locale:t,formatter:r}){if(!e.length)return"";if(t!==r.getLocale()&&r.setLocale(t),e.length===1){const c=Zt(e[0].value);return`${r.fullMonthAndYear(c)}`}const n=Zt(e[0].value),i=Zt(e[e.length-1].value),s=r.fullMonth(n),a=r.fullMonth(i),o=r.fullYear(n),l=r.fullYear(i);return o===l?`${s} - ${a} ${l}`:`${s} ${o} - ${a} ${l}`}function wD({fullCalendarLabel:e,id:t,isInvalid:r,disabled:n,readonly:i}){return{id:t,role:"application","aria-label":e,"data-invalid":Ve(r),"data-disabled":Ve(n),"data-readonly":Ve(i)}}function kD(e){const t=yo(e.target).querySelector("[data-bits-day][data-focused]");t&&(e.preventDefault(),t?.focus())}function SD(e){if(!ln)return;const t=Array.from(e.querySelectorAll("[data-bits-day]:not([aria-disabled=true])"));if(t.length===0)return;const r=t[0],n=r?.getAttribute("data-value"),i=r?.getAttribute("data-type");if(!(!n||!i))return NO(n,i)}function ED({ref:e,placeholder:t,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:s}){function a(o){return!!(s.current(o)||n.current&&si(o,n.current)||i.current&&si(i.current,o))}nt(()=>e.current,()=>{e.current&&t.current&&Dn(t.current,r)&&a(r)&&(t.current=SD(e.current)??r)})}function TD(e,t){return!e||!t?e:Io(e)&&Io(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}var xD=bo({component:"calendar",parts:["root","grid","cell","next-button","prev-button","day","grid-body","grid-head","grid-row","head-cell","header","heading","month-select","year-select"]});function AD(e){const t=new Date().getFullYear(),r=Math.max(e.placeholderYear,t);let n,i;if(e.minValue)n=e.minValue.year;else{const a=r-100;n=e.placeholderYear<a?e.placeholderYear-10:a}e.maxValue?i=e.maxValue.year:i=r+10,n>i&&(n=i);const s=i-n+1;return Array.from({length:s},(a,o)=>n+o)}var Ar=new Ft("Calendar.Root | RangeCalender.Root"),xv=class vy{static create(t){return Ar.set(new vy(t))}opts;#e=D(()=>this.months.map(t=>t.value));get visibleMonths(){return d(this.#e)}set visibleMonths(t){$(this.#e,t)}formatter;accessibleHeadingId=Nn();domContext;attachment;#t=ae(Me([]));get months(){return d(this.#t)}set months(t){$(this.#t,t,!0)}announcer;constructor(t){this.opts=t,this.attachment=et(this.opts.ref),this.domContext=new Bi(t.ref),this.announcer=Do(null),this.formatter=wv({initialLocale:this.opts.locale.current,monthFormat:this.opts.monthFormat,yearFormat:this.opts.yearFormat}),this.setMonths=this.setMonths.bind(this),this.nextPage=this.nextPage.bind(this),this.prevPage=this.prevPage.bind(this),this.prevYear=this.prevYear.bind(this),this.nextYear=this.nextYear.bind(this),this.setYear=this.setYear.bind(this),this.setMonth=this.setMonth.bind(this),this.isOutsideVisibleMonths=this.isOutsideVisibleMonths.bind(this),this.isDateDisabled=this.isDateDisabled.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.shiftFocus=this.shiftFocus.bind(this),this.handleCellClick=this.handleCellClick.bind(this),this.handleMultipleUpdate=this.handleMultipleUpdate.bind(this),this.handleSingleUpdate=this.handleSingleUpdate.bind(this),this.onkeydown=this.onkeydown.bind(this),this.getBitsAttr=this.getBitsAttr.bind(this),En(()=>{this.announcer=Do(this.domContext.getDocument())}),this.months=sa({dateObj:this.opts.placeholder.current,weekStartsOn:this.opts.weekStartsOn.current,locale:this.opts.locale.current,fixedWeeks:this.opts.fixedWeeks.current,numberOfMonths:this.opts.numberOfMonths.current}),this.#s(),this.#o(),this.#a(),gD({placeholder:this.opts.placeholder,getVisibleMonths:()=>this.visibleMonths,weekStartsOn:this.opts.weekStartsOn,locale:this.opts.locale,fixedWeeks:this.opts.fixedWeeks,numberOfMonths:this.opts.numberOfMonths,setMonths:r=>this.months=r}),mD({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),nt(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),nt(()=>this.opts.value.current,()=>{const r=this.opts.value.current;if(Array.isArray(r)&&r.length){const n=r[r.length-1];n&&this.opts.placeholder.current!==n&&(this.opts.placeholder.current=n)}else!Array.isArray(r)&&r&&this.opts.placeholder.current!==r&&(this.opts.placeholder.current=r)}),ED({placeholder:t.placeholder,defaultPlaceholder:t.defaultPlaceholder,isDateDisabled:t.isDateDisabled,maxValue:t.maxValue,minValue:t.minValue,ref:t.ref})}setMonths(t){this.months=t}#r=D(()=>pD({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return d(this.#r)}set weekdays(t){$(this.#r,t)}#n=D(()=>Re(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return d(this.#n)}set initialPlaceholderYear(t){$(this.#n,t)}#i=D(()=>AD({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return d(this.#i)}set defaultYears(t){$(this.#i,t)}#s(){ve(()=>{if(Re(()=>this.opts.initialFocus.current)){const t=this.opts.ref.current?.querySelector("[data-focused]");t&&t.focus()}})}#o(){ve(()=>{if(this.opts.ref.current)return vD({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#a(){Ol(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){fD({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){hD({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}nextYear(){this.opts.placeholder.current=this.opts.placeholder.current.add({years:1})}prevYear(){this.opts.placeholder.current=this.opts.placeholder.current.subtract({years:1})}setYear(t){this.opts.placeholder.current=this.opts.placeholder.current.set({year:t})}setMonth(t){this.opts.placeholder.current=this.opts.placeholder.current.set({month:t})}#l=D(()=>yD({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return d(this.#l)}set isNextButtonDisabled(t){$(this.#l,t)}#u=D(()=>bD({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return d(this.#u)}set isPrevButtonDisabled(t){$(this.#u,t)}#c=D(()=>{const t=this.opts.value.current,r=this.opts.isDateDisabled.current,n=this.opts.isDateUnavailable.current;if(Array.isArray(t)){if(!t.length)return!1;for(const i of t)if(r(i)||n(i))return!0}else{if(!t)return!1;if(r(t)||n(t))return!0}return!1});get isInvalid(){return d(this.#c)}set isInvalid(t){$(this.#c,t)}#d=D(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,_D({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return d(this.#d)}set headingValue(t){$(this.#d,t)}#h=D(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return d(this.#h)}set fullCalendarLabel(t){$(this.#h,t)}isOutsideVisibleMonths(t){return!this.visibleMonths.some(r=>vu(t,r))}isDateDisabled(t){if(this.opts.isDateDisabled.current(t)||this.opts.disabled.current)return!0;const r=this.opts.minValue.current,n=this.opts.maxValue.current;return!!(r&&si(t,r)||n&&si(n,t))}isDateSelected(t){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>Dn(n,t)):r?Dn(r,t):!1}shiftFocus(t,r){return cD({node:t,add:r,placeholder:this.opts.placeholder,calendarNode:this.opts.ref.current,isPrevButtonDisabled:this.isPrevButtonDisabled,isNextButtonDisabled:this.isNextButtonDisabled,months:this.months,numberOfMonths:this.opts.numberOfMonths.current})}#p(t){if(this.opts.type.current!=="multiple"||!this.opts.maxDays.current)return!0;const r=t.length;return!(this.opts.maxDays.current&&r>this.opts.maxDays.current)}handleCellClick(t,r){if(this.opts.readonly.current||this.opts.isDateDisabled.current?.(r)||this.opts.isDateUnavailable.current?.(r))return;const n=this.opts.value.current;if(this.opts.type.current==="multiple")(Array.isArray(n)||n===void 0)&&(this.opts.value.current=this.handleMultipleUpdate(n,r));else if(!Array.isArray(n)){const i=this.handleSingleUpdate(n,r);i?this.announcer.announce(`Selected Date: ${this.formatter.selectedDate(i,!1)}`,"polite"):this.announcer.announce("Selected date is now empty.","polite",5e3),this.opts.value.current=TD(i,n),i!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(t,r){if(!t){const s=[r];return this.#p(s)?s:[r]}if(!Array.isArray(t))return;const n=t.findIndex(s=>Dn(s,r)),i=this.opts.preventDeselect.current;if(n===-1){const s=[...t,r];return this.#p(s)?s:[r]}else{if(i)return t;{const s=t.filter(a=>!Dn(a,r));if(!s.length){this.opts.placeholder.current=r;return}return s}}}handleSingleUpdate(t,r){if(Array.isArray(t),!t)return r;if(!this.opts.preventDeselect.current&&Dn(t,r)){this.opts.placeholder.current=r;return}return r}onkeydown(t){dD({event:t,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#f=D(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return d(this.#f)}set snippetProps(t){$(this.#f,t)}getBitsAttr=t=>xD.getAttr(t);#m=D(()=>({...wD({fullCalendarLabel:this.fullCalendarLabel,id:this.opts.id.current,isInvalid:this.isInvalid,disabled:this.opts.disabled.current,readonly:this.opts.readonly.current}),[this.getBitsAttr("root")]:"",onkeydown:this.onkeydown,...this.attachment}));get props(){return d(this.#m)}set props(t){$(this.#m,t)}},CD=class gy{static create(t){return new gy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Ku(!0),"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("heading")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},Av=new Ft("Calendar.Cell | RangeCalendar.Cell"),OD=class yy{static create(t){return Av.set(new yy(t,Ar.get()))}opts;root;#e=D(()=>Zt(this.opts.date.current));get cellDate(){return d(this.#e)}set cellDate(t){$(this.#e,t)}#t=D(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return d(this.#t)}set isUnavailable(t){$(this.#t,t)}#r=D(()=>Z1(this.opts.date.current,Xt()));get isDateToday(){return d(this.#r)}set isDateToday(t){$(this.#r,t)}#n=D(()=>!vu(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return d(this.#n)}set isOutsideMonth(t){$(this.#n,t)}#i=D(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return d(this.#i)}set isOutsideVisibleMonths(t){$(this.#i,t)}#s=D(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return d(this.#s)}set isDisabled(t){$(this.#s,t)}#o=D(()=>Dn(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return d(this.#o)}set isFocusedDate(t){$(this.#o,t)}#a=D(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return d(this.#a)}set isSelectedDate(t){$(this.#a,t)}#l=D(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return d(this.#l)}set labelText(t){$(this.#l,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#u=D(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return d(this.#u)}set snippetProps(t){$(this.#u,t)}#c=D(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return d(this.#c)}set ariaDisabled(t){$(this.#c,t)}#d=D(()=>({"data-unavailable":Ve(this.isUnavailable),"data-today":this.isDateToday?"":void 0,"data-outside-month":this.isOutsideMonth?"":void 0,"data-outside-visible-months":this.isOutsideVisibleMonths?"":void 0,"data-focused":this.isFocusedDate?"":void 0,"data-selected":Ve(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":FO(this.opts.date.current),"data-disabled":Ve(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return d(this.#d)}set sharedDataAttrs(t){$(this.#d,t)}#h=D(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":Tr(this.isSelectedDate),"aria-disabled":Tr(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return d(this.#h)}set props(t){$(this.#h,t)}},DD=class by{static create(t){return new by(t,Av.get())}opts;cell;attachment;constructor(t,r){this.opts=t,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=et(this.opts.ref)}#e=D(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1);onclick(t){this.cell.isDisabled||this.cell.root.handleCellClick(t,this.cell.opts.date.current)}#t=D(()=>({disabled:this.cell.isDisabled,unavailable:this.cell.isUnavailable,selected:this.cell.isSelectedDate,day:`${this.cell.opts.date.current.day}`}));get snippetProps(){return d(this.#t)}set snippetProps(t){$(this.#t,t)}#r=D(()=>({id:this.opts.id.current,role:"button","aria-label":this.cell.labelText,"aria-disabled":Tr(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:d(this.#e),[this.cell.root.getBitsAttr("day")]:"","data-bits-day":"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#r)}set props(t){$(this.#r,t)}},ID=class _y{static create(t){return new _y(t,Ar.get())}opts;root;#e=D(()=>this.root.isNextButtonDisabled);get isDisabled(){return d(this.#e)}set isDisabled(t){$(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(this.opts.ref)}onclick(t){this.isDisabled||this.root.nextPage()}#t=D(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Next","aria-disabled":Tr(this.isDisabled),"data-disabled":Ve(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("next-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#t)}set props(t){$(this.#t,t)}},PD=class wy{static create(t){return new wy(t,Ar.get())}opts;root;#e=D(()=>this.root.isPrevButtonDisabled);get isDisabled(){return d(this.#e)}set isDisabled(t){$(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(this.opts.ref)}onclick(t){this.isDisabled||this.root.prevPage()}#t=D(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Previous","aria-disabled":Tr(this.isDisabled),"data-disabled":Ve(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("prev-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#t)}set props(t){$(this.#t,t)}},MD=class ky{static create(t){return new ky(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,tabindex:-1,role:"grid","aria-readonly":Tr(this.root.opts.readonly.current),"aria-disabled":Tr(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),"data-disabled":Ve(this.root.opts.disabled.current),[this.root.getBitsAttr("grid")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},$D=class Sy{static create(t){return new Sy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-body")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},FD=class Ey{static create(t){return new Ey(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-head")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},ND=class Ty{static create(t){return new Ty(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-row")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},RD=class xy{static create(t){return new xy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("head-cell")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},LD=class Ay{static create(t){return new Ay(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ve(this.root.opts.disabled.current),"data-readonly":Ve(this.root.opts.readonly.current),[this.root.getBitsAttr("header")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},zD=new Set(["$$slots","$$events","$$legacy","$$host","child","children","id","ref","value","onValueChange","placeholder","onPlaceholderChange","weekdayFormat","weekStartsOn","pagedNavigation","isDateDisabled","isDateUnavailable","fixedWeeks","numberOfMonths","locale","calendarLabel","disabled","readonly","minValue","maxValue","preventDeselect","type","disableDaysOutsideMonth","initialFocus","maxDays","monthFormat","yearFormat"]),qD=B("<div><!></div>");function Cv(e,t){ne(t,!0);let r=_(t,"child",7),n=_(t,"children",7),i=_(t,"id",23,Nn),s=_(t,"ref",15,null),a=_(t,"value",15),o=_(t,"onValueChange",7,Te),l=_(t,"placeholder",15),c=_(t,"onPlaceholderChange",7,Te),f=_(t,"weekdayFormat",7,"narrow"),u=_(t,"weekStartsOn",7),p=_(t,"pagedNavigation",7,!1),h=_(t,"isDateDisabled",7,()=>!1),g=_(t,"isDateUnavailable",7,()=>!1),v=_(t,"fixedWeeks",7,!1),m=_(t,"numberOfMonths",7,1),y=_(t,"locale",7),S=_(t,"calendarLabel",7,"Event"),k=_(t,"disabled",7,!1),E=_(t,"readonly",7,!1),A=_(t,"minValue",7,void 0),O=_(t,"maxValue",7,void 0),F=_(t,"preventDeselect",7,!1),R=_(t,"type",7),Y=_(t,"disableDaysOutsideMonth",7,!0),N=_(t,"initialFocus",7,!1),X=_(t,"maxDays",7),q=_(t,"monthFormat",7,"long"),le=_(t,"yearFormat",7,"numeric"),he=He(t,zD);const j=lv({defaultValue:a(),minValue:A(),maxValue:O()});function oe(){l()===void 0&&l(j)}oe(),nt.pre(()=>l(),()=>{oe()});function ee(){a()===void 0&&a(R()==="single"?void 0:[])}ee(),nt.pre(()=>a(),()=>{ee()});const fe=xv.create({id:z(()=>i()),ref:z(()=>s(),L=>s(L)),weekdayFormat:z(()=>f()),weekStartsOn:z(()=>u()),pagedNavigation:z(()=>p()),isDateDisabled:z(()=>h()),isDateUnavailable:z(()=>g()),fixedWeeks:z(()=>v()),numberOfMonths:z(()=>m()),locale:Um(()=>y()),calendarLabel:z(()=>S()),readonly:z(()=>E()),disabled:z(()=>k()),minValue:z(()=>A()),maxValue:z(()=>O()),disableDaysOutsideMonth:z(()=>Y()),initialFocus:z(()=>N()),maxDays:z(()=>X()),placeholder:z(()=>l(),L=>{l(L),c()(L)}),preventDeselect:z(()=>F()),value:z(()=>a(),L=>{a(L),o()(L)}),type:z(()=>R()),monthFormat:z(()=>q()),yearFormat:z(()=>le()),defaultPlaceholder:j}),ce=D(()=>Ke(he,fe.props));var de={get child(){return r()},set child(L){r(L),b()},get children(){return n()},set children(L){n(L),b()},get id(){return i()},set id(L=Nn()){i(L),b()},get ref(){return s()},set ref(L=null){s(L),b()},get value(){return a()},set value(L){a(L),b()},get onValueChange(){return o()},set onValueChange(L=Te){o(L),b()},get placeholder(){return l()},set placeholder(L){l(L),b()},get onPlaceholderChange(){return c()},set onPlaceholderChange(L=Te){c(L),b()},get weekdayFormat(){return f()},set weekdayFormat(L="narrow"){f(L),b()},get weekStartsOn(){return u()},set weekStartsOn(L){u(L),b()},get pagedNavigation(){return p()},set pagedNavigation(L=!1){p(L),b()},get isDateDisabled(){return h()},set isDateDisabled(L=()=>!1){h(L),b()},get isDateUnavailable(){return g()},set isDateUnavailable(L=()=>!1){g(L),b()},get fixedWeeks(){return v()},set fixedWeeks(L=!1){v(L),b()},get numberOfMonths(){return m()},set numberOfMonths(L=1){m(L),b()},get locale(){return y()},set locale(L){y(L),b()},get calendarLabel(){return S()},set calendarLabel(L="Event"){S(L),b()},get disabled(){return k()},set disabled(L=!1){k(L),b()},get readonly(){return E()},set readonly(L=!1){E(L),b()},get minValue(){return A()},set minValue(L=void 0){A(L),b()},get maxValue(){return O()},set maxValue(L=void 0){O(L),b()},get preventDeselect(){return F()},set preventDeselect(L=!1){F(L),b()},get type(){return R()},set type(L){R(L),b()},get disableDaysOutsideMonth(){return Y()},set disableDaysOutsideMonth(L=!0){Y(L),b()},get initialFocus(){return N()},set initialFocus(L=!1){N(L),b()},get maxDays(){return X()},set maxDays(L){X(L),b()},get monthFormat(){return q()},set monthFormat(L="long"){q(L),b()},get yearFormat(){return le()},set yearFormat(L="numeric"){le(L),b()}},G=re(),Q=U(G),P=L=>{var be=re(),Z=U(be);{let w=D(()=>({props:d(ce),...fe.snippetProps}));Se(Z,r,()=>d(w))}T(L,be)},te=L=>{var be=qD();Ue(be,()=>({...d(ce)}));var Z=M(be);Se(Z,()=>n()??qe,()=>fe.snippetProps),I(be),T(L,be)};return ue(Q,L=>{r()?L(P):L(te,-1)}),T(e,G),ie(de)}se(Cv,{child:{},children:{},id:{},ref:{},value:{},onValueChange:{},placeholder:{},onPlaceholderChange:{},weekdayFormat:{},weekStartsOn:{},pagedNavigation:{},isDateDisabled:{},isDateUnavailable:{},fixedWeeks:{},numberOfMonths:{},locale:{},calendarLabel:{},disabled:{},readonly:{},minValue:{},maxValue:{},preventDeselect:{},type:{},disableDaysOutsideMonth:{},initialFocus:{},maxDays:{},monthFormat:{},yearFormat:{}},[],[],{mode:"open"});var UD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),BD=B("<div><!></div>");function dc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,UD);const l=DD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);{let S=D(()=>({props:d(c),...l.snippetProps}));Se(y,i,()=>d(S))}T(v,m)},g=v=>{var m=BD();Ue(m,()=>({...d(c)}));var y=M(m),S=E=>{var A=re(),O=U(A);Se(O,()=>n()??qe,()=>l.snippetProps),T(E,A)},k=E=>{var A=Bt();J(()=>H(A,l.cell.opts.date.current.day)),T(E,A)};ue(y,E=>{n()?E(S):E(k,-1)}),I(m),T(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),T(e,u),ie(f)}se(dc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var VD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),jD=B("<table><!></table>");function fc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,VD);const l=MD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),T(v,m)},g=v=>{var m=jD();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),T(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),T(e,u),ie(f)}se(fc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var ZD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),WD=B("<tbody><!></tbody>");function hc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,ZD);const l=$D.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),T(v,m)},g=v=>{var m=WD();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),T(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),T(e,u),ie(f)}se(hc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var HD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]),GD=B("<td><!></td>");function pc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=_(t,"date",7),l=_(t,"month",7),c=He(t,HD);const f=OD.create({id:z(()=>a()),ref:z(()=>s(),y=>s(y)),date:z(()=>o()),month:z(()=>l())}),u=D(()=>Ke(c,f.props));var p={get children(){return n()},set children(y){n(y),b()},get child(){return i()},set child(y){i(y),b()},get ref(){return s()},set ref(y=null){s(y),b()},get id(){return a()},set id(y=Pe(r)){a(y),b()},get date(){return o()},set date(y){o(y),b()},get month(){return l()},set month(y){l(y),b()}},h=re(),g=U(h),v=y=>{var S=re(),k=U(S);{let E=D(()=>({props:d(u),...f.snippetProps}));Se(k,i,()=>d(E))}T(y,S)},m=y=>{var S=GD();Ue(S,()=>({...d(u)}));var k=M(S);Se(k,()=>n()??qe,()=>f.snippetProps),I(S),T(y,S)};return ue(g,y=>{i()?y(v):y(m,-1)}),T(e,h),ie(p)}se(pc,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var KD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),YD=B("<thead><!></thead>");function mc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,KD);const l=FD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),T(v,m)},g=v=>{var m=YD();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),T(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),T(e,u),ie(f)}se(mc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var JD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),QD=B("<th><!></th>");function vc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,JD);const l=RD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),T(v,m)},g=v=>{var m=QD();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),T(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),T(e,u),ie(f)}se(vc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var XD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),eI=B("<tr><!></tr>");function aa(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,XD);const l=ND.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),T(v,m)},g=v=>{var m=eI();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),T(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),T(e,u),ie(f)}se(aa,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var tI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),rI=B("<header><!></header>");function gc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,tI);const l=LD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c)})),T(v,m)},g=v=>{var m=rI();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>n()??qe),I(m),T(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),T(e,u),ie(f)}se(gc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var nI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),iI=B("<div><!></div>");function yc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=He(t,nI);const l=CD.create({id:z(()=>a()),ref:z(()=>s(),v=>s(v))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get ref(){return s()},set ref(v=null){s(v),b()},get id(){return a()},set id(v=Pe(r)){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,i,()=>({props:d(c),headingValue:l.root.headingValue})),T(v,m)},g=v=>{var m=iI();Ue(m,()=>({...d(c)}));var y=M(m),S=E=>{var A=re(),O=U(A);Se(O,()=>n()??qe,()=>({headingValue:l.root.headingValue})),T(E,A)},k=E=>{var A=Bt();J(()=>H(A,l.root.headingValue)),T(E,A)};ue(y,E=>{n()?E(S):E(k,-1)}),I(m),T(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),T(e,u),ie(f)}se(yc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var sI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),aI=B("<button><!></button>");function bc(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Pe(r)),a=_(t,"ref",15,null),o=_(t,"tabindex",7,0),l=He(t,sI);const c=ID.create({id:z(()=>s()),ref:z(()=>a(),m=>a(m))}),f=D(()=>Ke(l,c.props,{tabindex:o()}));var u={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get id(){return s()},set id(m=Pe(r)){s(m),b()},get ref(){return a()},set ref(m=null){a(m),b()},get tabindex(){return o()},set tabindex(m=0){o(m),b()}},p=re(),h=U(p),g=m=>{var y=re(),S=U(y);Se(S,i,()=>({props:d(f)})),T(m,y)},v=m=>{var y=aI();Ue(y,()=>({...d(f)}));var S=M(y);Se(S,()=>n()??qe),I(y),T(m,y)};return ue(h,m=>{i()?m(g):m(v,-1)}),T(e,p),ie(u)}se(bc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var oI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),lI=B("<button><!></button>");function _c(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Pe(r)),a=_(t,"ref",15,null),o=_(t,"tabindex",7,0),l=He(t,oI);const c=PD.create({id:z(()=>s()),ref:z(()=>a(),m=>a(m))}),f=D(()=>Ke(l,c.props,{tabindex:o()}));var u={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get id(){return s()},set id(m=Pe(r)){s(m),b()},get ref(){return a()},set ref(m=null){a(m),b()},get tabindex(){return o()},set tabindex(m=0){o(m),b()}},p=re(),h=U(p),g=m=>{var y=re(),S=U(y);Se(S,i,()=>({props:d(f)})),T(m,y)},v=m=>{var y=lI();Ue(y,()=>({...d(f)}));var S=M(y);Se(S,()=>n()??qe),I(y),T(m,y)};return ue(h,m=>{i()?m(g):m(v,-1)}),T(e,p),ie(u)}se(_c,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var uI=new Set(["$$slots","$$events","$$legacy","$$host","value"]),Ov=B("<input/>");function Dv(e,t){ne(t,!0);let r=_(t,"value",15),n=He(t,uI);const i=D(()=>Ke(n,{"aria-hidden":"true",tabindex:-1,style:{...Am,position:"absolute",top:"0",left:"0"}}));var s={get value(){return r()},set value(f){r(f),b()}},a=re(),o=U(a),l=f=>{var u=Ov();Ue(u,()=>({...d(i),value:r()}),void 0,void 0,void 0,void 0,!0),T(f,u)},c=f=>{var u=Ov();Ue(u,()=>({...d(i)}),void 0,void 0,void 0,void 0,!0),qa(u,r),T(f,u)};return ue(o,f=>{d(i).type==="checkbox"?f(l):f(c,-1)}),T(e,a),ie(s)}se(Dv,{value:{}},[],[],{mode:"open"});var cI=["top","right","bottom","left"],Rn=Math.min,tr=Math.max,No=Math.round,Ro=Math.floor,Yr=e=>({x:e,y:e}),dI={left:"right",right:"left",bottom:"top",top:"bottom"};function wc(e,t,r){return tr(e,Rn(t,r))}function un(e,t){return typeof e=="function"?e(t):e}function cn(e){return e.split("-")[0]}function Vi(e){return e.split("-")[1]}function kc(e){return e==="x"?"y":"x"}function Sc(e){return e==="y"?"height":"width"}function Jr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ec(e){return kc(Jr(e))}function fI(e,t,r){r===void 0&&(r=!1);const n=Vi(e),i=Ec(e),s=Sc(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Lo(a)),[a,Lo(a)]}function hI(e){const t=Lo(e);return[Tc(e),t,Tc(t)]}function Tc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Iv=["left","right"],Pv=["right","left"],pI=["top","bottom"],mI=["bottom","top"];function vI(e,t,r){switch(e){case"top":case"bottom":return r?t?Pv:Iv:t?Iv:Pv;case"left":case"right":return t?pI:mI;default:return[]}}function gI(e,t,r,n){const i=Vi(e);let s=vI(cn(e),r==="start",n);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(Tc)))),s}function Lo(e){const t=cn(e);return dI[t]+e.slice(t.length)}function yI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mv(e){return typeof e!="number"?yI(e):{top:e,right:e,bottom:e,left:e}}function zo(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function $v(e,t,r){let{reference:n,floating:i}=e;const s=Jr(t),a=Ec(t),o=Sc(a),l=cn(t),c=s==="y",f=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,p=n[o]/2-i[o]/2;let h;switch(l){case"top":h={x:f,y:n.y-i.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-i.width,y:u};break;default:h={x:n.x,y:n.y}}switch(Vi(t)){case"start":h[a]-=p*(r&&c?-1:1);break;case"end":h[a]+=p*(r&&c?-1:1);break}return h}async function bI(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=un(t,e),g=Mv(h),v=o[p?u==="floating"?"reference":"floating":u],m=zo(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(v)))==null||r?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:c,rootBoundary:f,strategy:l})),y=u==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),k=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},E=zo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:S,strategy:l}):y);return{top:(m.top-E.top+g.top)/k.y,bottom:(E.bottom-m.bottom+g.bottom)/k.y,left:(m.left-E.left+g.left)/k.x,right:(E.right-m.right+g.right)/k.x}}var _I=50,wI=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:a}=r,o=a.detectOverflow?a:{...a,detectOverflow:bI},l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:u}=$v(c,n,l),p=n,h=0;const g={};for(let v=0;v<s.length;v++){const m=s[v];if(!m)continue;const{name:y,fn:S}=m,{x:k,y:E,data:A,reset:O}=await S({x:f,y:u,initialPlacement:n,placement:p,strategy:i,middlewareData:g,rects:c,platform:o,elements:{reference:e,floating:t}});f=k??f,u=E??u,g[y]={...g[y],...A},O&&h<_I&&(h++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(c=O.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:f,y:u}=$v(c,p,l)),v=-1)}return{x:f,y:u,placement:p,strategy:i,middlewareData:g}},kI=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:s,platform:a,elements:o,middlewareData:l}=t,{element:c,padding:f=0}=un(e,t)||{};if(c==null)return{};const u=Mv(f),p={x:r,y:n},h=Ec(i),g=Sc(h),v=await a.getDimensions(c),m=h==="y",y=m?"top":"left",S=m?"bottom":"right",k=m?"clientHeight":"clientWidth",E=s.reference[g]+s.reference[h]-p[h]-s.floating[g],A=p[h]-s.reference[h],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let F=O?O[k]:0;(!F||!await(a.isElement==null?void 0:a.isElement(O)))&&(F=o.floating[k]||s.floating[g]);const R=E/2-A/2,Y=F/2-v[g]/2-1,N=Rn(u[y],Y),X=Rn(u[S],Y),q=N,le=F-v[g]-X,he=F/2-v[g]/2+R,j=wc(q,he,le),oe=!l.arrow&&Vi(i)!=null&&he!==j&&s.reference[g]/2-(he<q?N:X)-v[g]/2<0,ee=oe?he<q?he-q:he-le:0;return{[h]:p[h]+ee,data:{[h]:j,centerOffset:he-j-ee,...oe&&{alignmentOffset:ee}},reset:oe}}}),SI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:s,rects:a,initialPlacement:o,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...m}=un(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=cn(i),S=Jr(o),k=cn(o)===o,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),A=p||(k||!v?[Lo(o)]:hI(o)),O=g!=="none";!p&&O&&A.push(...gI(o,v,g,E));const F=[o,...A],R=await l.detectOverflow(t,m),Y=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&Y.push(R[y]),u){const he=fI(i,a,E);Y.push(R[he[0]],R[he[1]])}if(N=[...N,{placement:i,overflows:Y}],!Y.every(he=>he<=0)){var X,q;const he=(((X=s.flip)==null?void 0:X.index)||0)+1,j=F[he];if(j&&(!(u==="alignment"&&S!==Jr(j))||N.every(ee=>Jr(ee.placement)===S?ee.overflows[0]>0:!0)))return{data:{index:he,overflows:N},reset:{placement:j}};let oe=(q=N.filter(ee=>ee.overflows[0]<=0).sort((ee,fe)=>ee.overflows[1]-fe.overflows[1])[0])==null?void 0:q.placement;if(!oe)switch(h){case"bestFit":{var le;const ee=(le=N.filter(fe=>{if(O){const ce=Jr(fe.placement);return ce===S||ce==="y"}return!0}).map(fe=>[fe.placement,fe.overflows.filter(ce=>ce>0).reduce((ce,de)=>ce+de,0)]).sort((fe,ce)=>fe[1]-ce[1])[0])==null?void 0:le[0];ee&&(oe=ee);break}case"initialPlacement":oe=o;break}if(i!==oe)return{reset:{placement:oe}}}return{}}}};function Fv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Nv(e){return cI.some(t=>e[t]>=0)}var EI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...s}=un(e,t);switch(i){case"referenceHidden":{const a=Fv(await n.detectOverflow(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Nv(a)}}}case"escaped":{const a=Fv(await n.detectOverflow(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:a,escaped:Nv(a)}}}default:return{}}}}},Rv=new Set(["left","top"]);async function TI(e,t){const{placement:r,platform:n,elements:i}=e,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=cn(r),o=Vi(r),l=Jr(r)==="y",c=Rv.has(a)?-1:1,f=s&&l?-1:1,u=un(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return o&&typeof g=="number"&&(h=o==="end"?g*-1:g),l?{x:h*f,y:p*c}:{x:p*c,y:h*f}}var xI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:s,placement:a,middlewareData:o}=t,l=await TI(t,e);return a===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:a}}}}},AI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:s}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:y=>{let{x:S,y:k}=y;return{x:S,y:k}}},...c}=un(e,t),f={x:r,y:n},u=await s.detectOverflow(t,c),p=Jr(cn(i)),h=kc(p);let g=f[h],v=f[p];if(a){const y=h==="y"?"top":"left",S=h==="y"?"bottom":"right",k=g+u[y],E=g-u[S];g=wc(k,g,E)}if(o){const y=p==="y"?"top":"left",S=p==="y"?"bottom":"right",k=v+u[y],E=v-u[S];v=wc(k,v,E)}const m=l.fn({...t,[h]:g,[p]:v});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[h]:a,[p]:o}}}}}},CI=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=un(e,t),f={x:r,y:n},u=Jr(i),p=kc(u);let h=f[p],g=f[u];const v=un(o,t),m=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const k=p==="y"?"height":"width",E=s.reference[p]-s.floating[k]+m.mainAxis,A=s.reference[p]+s.reference[k]-m.mainAxis;h<E?h=E:h>A&&(h=A)}if(c){var y,S;const k=p==="y"?"width":"height",E=Rv.has(cn(i)),A=s.reference[u]-s.floating[k]+(E&&((y=a.offset)==null?void 0:y[u])||0)+(E?0:m.crossAxis),O=s.reference[u]+s.reference[k]+(E?0:((S=a.offset)==null?void 0:S[u])||0)-(E?m.crossAxis:0);g<A?g=A:g>O&&(g=O)}return{[p]:h,[u]:g}}}},OI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:s,platform:a,elements:o}=t,{apply:l=()=>{},...c}=un(e,t),f=await a.detectOverflow(t,c),u=cn(i),p=Vi(i),h=Jr(i)==="y",{width:g,height:v}=s.floating;let m,y;u==="top"||u==="bottom"?(m=u,y=p===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(y=u,m=p==="end"?"top":"bottom");const S=v-f.top-f.bottom,k=g-f.left-f.right,E=Rn(v-f[m],S),A=Rn(g-f[y],k),O=!t.middlewareData.shift;let F=E,R=A;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=k),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(F=S),O&&!p){const N=tr(f.left,0),X=tr(f.right,0),q=tr(f.top,0),le=tr(f.bottom,0);h?R=g-2*(N!==0||X!==0?N+X:tr(f.left,f.right)):F=v-2*(q!==0||le!==0?q+le:tr(f.top,f.bottom))}await l({...t,availableWidth:R,availableHeight:F});const Y=await a.getDimensions(o.floating);return g!==Y.width||v!==Y.height?{reset:{rects:!0}}:{}}}};function qo(){return typeof window<"u"}function ji(e){return Lv(e)?(e.nodeName||"").toLowerCase():"#document"}function rr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qr(e){var t;return(t=(Lv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lv(e){return qo()?e instanceof Node||e instanceof rr(e).Node:!1}function Cr(e){return qo()?e instanceof Element||e instanceof rr(e).Element:!1}function dn(e){return qo()?e instanceof HTMLElement||e instanceof rr(e).HTMLElement:!1}function zv(e){return!qo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rr(e).ShadowRoot}function oa(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Or(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function DI(e){return/^(table|td|th)$/.test(ji(e))}function Uo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var II=/transform|translate|scale|rotate|perspective|filter/,PI=/paint|layout|strict|content/,ai=e=>!!e&&e!=="none",xc;function Ac(e){const t=Cr(e)?Or(e):e;return ai(t.transform)||ai(t.translate)||ai(t.scale)||ai(t.rotate)||ai(t.perspective)||!Cc()&&(ai(t.backdropFilter)||ai(t.filter))||II.test(t.willChange||"")||PI.test(t.contain||"")}function MI(e){let t=Ln(e);for(;dn(t)&&!Zi(t);){if(Ac(t))return t;if(Uo(t))return null;t=Ln(t)}return null}function Cc(){return xc==null&&(xc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),xc}function Zi(e){return/^(html|body|#document)$/.test(ji(e))}function Or(e){return rr(e).getComputedStyle(e)}function Bo(e){return Cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ln(e){if(ji(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zv(e)&&e.host||Qr(e);return zv(t)?t.host:t}function qv(e){const t=Ln(e);return Zi(t)?e.ownerDocument?e.ownerDocument.body:e.body:dn(t)&&oa(t)?t:qv(t)}function la(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=qv(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),a=rr(i);if(s){const o=Oc(a);return t.concat(a,a.visualViewport||[],oa(i)?i:[],o&&r?la(o):[])}else return t.concat(i,la(i,[],r))}function Oc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Uv(e){const t=Or(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=dn(e),s=i?e.offsetWidth:r,a=i?e.offsetHeight:n,o=No(r)!==s||No(n)!==a;return o&&(r=s,n=a),{width:r,height:n,$:o}}function Dc(e){return Cr(e)?e:e.contextElement}function Wi(e){const t=Dc(e);if(!dn(t))return Yr(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:s}=Uv(t);let a=(s?No(r.width):r.width)/n,o=(s?No(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}var $I=Yr(0);function Bv(e){const t=rr(e);return!Cc()||!t.visualViewport?$I:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function FI(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==rr(e)?!1:t}function oi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=Dc(e);let a=Yr(1);t&&(n?Cr(n)&&(a=Wi(n)):a=Wi(e));const o=FI(s,r,n)?Bv(s):Yr(0);let l=(i.left+o.x)/a.x,c=(i.top+o.y)/a.y,f=i.width/a.x,u=i.height/a.y;if(s){const p=rr(s),h=n&&Cr(n)?rr(n):n;let g=p,v=Oc(g);for(;v&&n&&h!==g;){const m=Wi(v),y=v.getBoundingClientRect(),S=Or(v),k=y.left+(v.clientLeft+parseFloat(S.paddingLeft))*m.x,E=y.top+(v.clientTop+parseFloat(S.paddingTop))*m.y;l*=m.x,c*=m.y,f*=m.x,u*=m.y,l+=k,c+=E,g=rr(v),v=Oc(g)}}return zo({width:f,height:u,x:l,y:c})}function Vo(e,t){const r=Bo(e).scrollLeft;return t?t.left+r:oi(Qr(e)).left+r}function Vv(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Vo(e,r),y:r.top+t.scrollTop}}function NI(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const s=i==="fixed",a=Qr(n),o=t?Uo(t.floating):!1;if(n===a||o&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Yr(1);const f=Yr(0),u=dn(n);if((u||!u&&!s)&&((ji(n)!=="body"||oa(a))&&(l=Bo(n)),u)){const h=oi(n);c=Wi(n),f.x=h.x+n.clientLeft,f.y=h.y+n.clientTop}const p=a&&!u&&!s?Vv(a,l):Yr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+f.x+p.x,y:r.y*c.y-l.scrollTop*c.y+f.y+p.y}}function RI(e){return Array.from(e.getClientRects())}function LI(e){const t=Qr(e),r=Bo(e),n=e.ownerDocument.body,i=tr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=tr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Vo(e);const o=-r.scrollTop;return Or(n).direction==="rtl"&&(a+=tr(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:a,y:o}}var jv=25;function zI(e,t){const r=rr(e),n=Qr(e),i=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;const f=Cc();(!f||f&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}const c=Vo(n);if(c<=0){const f=n.ownerDocument,u=f.body,p=getComputedStyle(u),h=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(n.clientWidth-u.clientWidth-h);g<=jv&&(s-=g)}else c<=jv&&(s+=c);return{width:s,height:a,x:o,y:l}}function qI(e,t){const r=oi(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=dn(e)?Wi(e):Yr(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:i*s.x,y:n*s.y}}function Zv(e,t,r){let n;if(t==="viewport")n=zI(e,r);else if(t==="document")n=LI(Qr(e));else if(Cr(t))n=qI(t,r);else{const i=Bv(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return zo(n)}function Wv(e,t){const r=Ln(e);return r===t||!Cr(r)||Zi(r)?!1:Or(r).position==="fixed"||Wv(r,t)}function UI(e,t){const r=t.get(e);if(r)return r;let n=la(e,[],!1).filter(o=>Cr(o)&&ji(o)!=="body"),i=null;const s=Or(e).position==="fixed";let a=s?Ln(e):e;for(;Cr(a)&&!Zi(a);){const o=Or(a),l=Ac(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||oa(a)&&!l&&Wv(e,a))?n=n.filter(c=>c!==a):i=o,a=Ln(a)}return t.set(e,n),n}function BI(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Uo(t)?[]:UI(t,this._c):[].concat(r),n],a=Zv(t,s[0],i);let o=a.top,l=a.right,c=a.bottom,f=a.left;for(let u=1;u<s.length;u++){const p=Zv(t,s[u],i);o=tr(p.top,o),l=Rn(p.right,l),c=Rn(p.bottom,c),f=tr(p.left,f)}return{width:l-f,height:c-o,x:f,y:o}}function VI(e){const{width:t,height:r}=Uv(e);return{width:t,height:r}}function jI(e,t,r){const n=dn(t),i=Qr(t),s=r==="fixed",a=oi(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const l=Yr(0);function c(){l.x=Vo(i)}if(n||!n&&!s)if((ji(t)!=="body"||oa(i))&&(o=Bo(t)),n){const u=oi(t,!0,s,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else i&&c();s&&!n&&i&&c();const f=i&&!n&&!s?Vv(i,o):Yr(0);return{x:a.left+o.scrollLeft-l.x-f.x,y:a.top+o.scrollTop-l.y-f.y,width:a.width,height:a.height}}function Ic(e){return Or(e).position==="static"}function Hv(e,t){if(!dn(e)||Or(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Qr(e)===r&&(r=r.ownerDocument.body),r}function Gv(e,t){const r=rr(e);if(Uo(e))return r;if(!dn(e)){let i=Ln(e);for(;i&&!Zi(i);){if(Cr(i)&&!Ic(i))return i;i=Ln(i)}return r}let n=Hv(e,t);for(;n&&DI(n)&&Ic(n);)n=Hv(n,t);return n&&Zi(n)&&Ic(n)&&!Ac(n)?r:n||MI(e)||r}var ZI=async function(e){const t=this.getOffsetParent||Gv,r=this.getDimensions,n=await r(e.floating);return{reference:jI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function WI(e){return Or(e).direction==="rtl"}var HI={convertOffsetParentRelativeRectToViewportRelativeRect:NI,getDocumentElement:Qr,getClippingRect:BI,getOffsetParent:Gv,getElementRects:ZI,getClientRects:RI,getDimensions:VI,getScale:Wi,isElement:Cr,isRTL:WI};function Kv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function GI(e,t){let r=null,n;const i=Qr(e);function s(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:f,top:u,width:p,height:h}=c;if(o||t(),!p||!h)return;const g=Ro(u),v=Ro(i.clientWidth-(f+p)),m=Ro(i.clientHeight-(u+h)),y=Ro(f),S={rootMargin:-g+"px "+-v+"px "+-m+"px "+-y+"px",threshold:tr(0,Rn(1,l))||1};let k=!0;function E(A){const O=A[0].intersectionRatio;if(O!==l){if(!k)return a();O?a(!1,O):n=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!Kv(c,e.getBoundingClientRect())&&a(),k=!1}try{r=new IntersectionObserver(E,{...S,root:i.ownerDocument})}catch{r=new IntersectionObserver(E,S)}r.observe(e)}return a(!0),s}function KI(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Dc(e),f=i||s?[...c?la(c):[],...t?la(t):[]]:[];f.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const u=c&&o?GI(c,r):null;let p=-1,h=null;a&&(h=new ResizeObserver(y=>{let[S]=y;S&&S.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var k;(k=h)==null||k.observe(t)})),r()}),c&&!l&&h.observe(c),t&&h.observe(t));let g,v=l?oi(e):null;l&&m();function m(){const y=oi(e);v&&!Kv(v,y)&&r(),v=y,g=requestAnimationFrame(m)}return r(),()=>{var y;f.forEach(S=>{i&&S.removeEventListener("scroll",r),s&&S.removeEventListener("resize",r)}),u?.(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(g)}}var YI=xI,JI=AI,QI=SI,XI=OI,eP=EI,tP=kI,rP=CI,nP=(e,t,r)=>{const n=new Map,i={platform:HI,...r},s={...i.platform,_c:n};return wI(e,t,{...i,platform:s})};function li(e){return typeof e=="function"?e():e}function Yv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jv(e,t){const r=Yv(e);return Math.round(t*r)/r}function Qv(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function iP(e){const t=e.whileElementsMounted,r=D(()=>li(e.open)??!0),n=D(()=>li(e.middleware)),i=D(()=>li(e.transform)??!0),s=D(()=>li(e.placement)??"bottom"),a=D(()=>li(e.strategy)??"absolute"),o=D(()=>li(e.sideOffset)??0),l=D(()=>li(e.alignOffset)??0),c=e.reference;let f=ae(0),u=ae(0);const p=Er(null);let h=ae(Me(d(a))),g=ae(Me(d(s))),v=ae(Me({})),m=ae(!1),y=!1,S=0;const k=D(()=>{const N=p.current?Jv(p.current,d(f)):d(f),X=p.current?Jv(p.current,d(u)):d(u);return d(i)?{position:d(h),left:"0",top:"0",transform:`translate(${N}px, ${X}px)`,...p.current&&Yv(p.current)>=1.5&&{willChange:"transform"}}:{position:d(h),left:`${N}px`,top:`${X}px`}});let E;function A(){if(c.current===null||p.current===null)return;const N=c.current,X=p.current,q=++S;nP(N,X,{middleware:d(n),placement:d(s),strategy:d(a)}).then(le=>{if(q===S&&!(c.current!==N||p.current!==X)){if(sP(N)){$(v,{...d(v),hide:{...d(v).hide,referenceHidden:!0}},!0);return}if(!d(r)&&d(f)!==0&&d(u)!==0){const he=Math.max(Math.abs(d(o)),Math.abs(d(l)),15);if(le.x<=he&&le.y<=he)return}$(f,le.x,!0),$(u,le.y,!0),$(h,le.strategy,!0),$(g,le.placement,!0),$(v,le.middlewareData,!0),$(m,!0)}})}function O(){typeof E=="function"&&(E(),E=void 0),S++}function F(){if(O(),t===void 0){A();return}d(r)&&(c.current===null||p.current===null||(E=t(c.current,p.current,A)))}function R(){!d(r)&&p.current===null&&$(m,!1)}function Y(){return[d(n),d(s),d(a),d(o),d(l),d(r)]}return ve(()=>{t===void 0&&d(r)&&A()}),ve(F),ve(()=>{if(t!==void 0){if(Y(),!d(r)){y=!1;return}if(!d(m)){y=!1;return}if(!y){y=!0;return}A()}}),ve(R),ve(()=>O),{floating:p,reference:c,get strategy(){return d(h)},get placement(){return d(g)},get middlewareData(){return d(v)},get isPositioned(){return d(m)},get floatingStyles(){return d(k)},get update(){return A}}}function sP(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var aP={top:"bottom",right:"left",bottom:"top",left:"right"},Pc=new Ft("Floating.Root"),Xv=new Ft("Floating.Content"),Mc=new Ft("Floating.Root"),oP=class dd{static create(t=!1){return t?Mc.set(new dd):Pc.set(new dd)}anchorNode=Er(null);customAnchorNode=Er(null);triggerNode=Er(null);constructor(){ve(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},lP=class fd{static create(t,r=!1){return r?Xv.set(new fd(t,Mc.get())):Xv.set(new fd(t,Pc.get()))}opts;root;contentRef=Er(null);wrapperRef=Er(null);arrowRef=Er(null);contentAttachment=et(this.contentRef);wrapperAttachment=et(this.wrapperRef);arrowAttachment=et(this.arrowRef);arrowId=Er(Nn());#e=D(()=>{if(typeof this.opts.style=="string")return Ks(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new TC(()=>this.arrowRef.current??void 0);#n=D(()=>this.#r?.width??0);#i=D(()=>this.#r?.height??0);#s=D(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#o=D(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#a=D(()=>d(this.#o).length>0);get hasExplicitBoundaries(){return d(this.#a)}set hasExplicitBoundaries(t){$(this.#a,t)}#l=D(()=>({padding:this.opts.collisionPadding.current,boundary:d(this.#o).filter(jC),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return d(this.#l)}set detectOverflowOptions(t){$(this.#l,t)}#u=ae(void 0);#c=ae(void 0);#d=ae(void 0);#h=ae(void 0);#p=D(()=>[YI({mainAxis:this.opts.sideOffset.current+d(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&JI({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?rP():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&QI({...this.detectOverflowOptions}),XI({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:n})=>{const{width:i,height:s}=t.reference;$(this.#u,r,!0),$(this.#c,n,!0),$(this.#d,i,!0),$(this.#h,s,!0)}}),this.arrowRef.current&&tP({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),cP({arrowWidth:d(this.#n),arrowHeight:d(this.#i)}),this.opts.hideWhenDetached.current&&eP({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return d(this.#p)}set middleware(t){$(this.#p,t)}floating;#f=D(()=>dP(this.floating.placement));get placedSide(){return d(this.#f)}set placedSide(t){$(this.#f,t)}#m=D(()=>fP(this.floating.placement));get placedAlign(){return d(this.#m)}set placedAlign(t){$(this.#m,t)}#v=D(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return d(this.#v)}set arrowX(t){$(this.#v,t)}#y=D(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return d(this.#y)}set arrowY(t){$(this.#y,t)}#w=D(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return d(this.#w)}set cannotCenterArrow(t){$(this.#w,t)}#_=ae();get contentZIndex(){return d(this.#_)}set contentZIndex(t){$(this.#_,t,!0)}#g=D(()=>aP[this.placedSide]);get arrowBaseSide(){return d(this.#g)}set arrowBaseSide(t){$(this.#g,t)}#k=D(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${d(this.#u)}px`,"--bits-floating-available-height":`${d(this.#c)}px`,"--bits-floating-anchor-width":`${d(this.#d)}px`,"--bits-floating-anchor-height":`${d(this.#h)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...d(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return d(this.#k)}set wrapperProps(t){$(this.#k,t)}#b=D(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Js({...d(this.#e)}),...this.contentAttachment}));get props(){return d(this.#b)}set props(t){$(this.#b,t)}#S=D(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return d(this.#S)}set arrowStyle(t){$(this.#S,t)}constructor(t,r){this.opts=t,this.root=r,this.#t=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),nt(()=>t.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=iP({strategy:()=>this.opts.strategy.current,placement:()=>d(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>KI(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),ve(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),nt(()=>this.contentRef.current,n=>{if(!n||!this.opts.enabled.current)return;const i=$m(n),s=i.requestAnimationFrame(()=>{if(this.contentRef.current!==n||!this.opts.enabled.current)return;const a=i.getComputedStyle(n).zIndex;a!==this.contentZIndex&&(this.contentZIndex=a)});return()=>{i.cancelAnimationFrame(s)}}),ve(()=>{this.floating.floating.current=this.wrapperRef.current})}},uP=class hd{static create(t,r=!1){return r?new hd(t,Mc.get()):new hd(t,Pc.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=jA(t.virtualEl.current):r.triggerNode=t.ref}};function cP(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,o=s?0:e.arrowHeight,[l,c]=$c(r),f={start:"0%",center:"50%",end:"100%"}[c],u=(i.arrow?.x??0)+a/2,p=(i.arrow?.y??0)+o/2;let h="",g="";return l==="bottom"?(h=s?f:`${u}px`,g=`${-o}px`):l==="top"?(h=s?f:`${u}px`,g=`${n.floating.height+o}px`):l==="right"?(h=`${-o}px`,g=s?f:`${p}px`):l==="left"&&(h=`${n.floating.width+o}px`,g=s?f:`${p}px`),{data:{x:h,y:g}}}}}function $c(e){const[t,r="center"]=e.split("-");return[t,r]}function dP(e){return $c(e)[0]}function fP(e){return $c(e)[1]}function eg(e,t){ne(t,!0);let r=_(t,"children",7),n=_(t,"tooltip",7,!1);oP.create(n());var i={get children(){return r()},set children(o){r(o),b()},get tooltip(){return n()},set tooltip(o=!1){n(o),b()}},s=re(),a=U(s);return Se(a,()=>r()??qe),T(e,s),ie(i)}se(eg,{children:{},tooltip:{}},[],[],{mode:"open"});function tg(e,t){ne(t,!0);let r=_(t,"id",7),n=_(t,"children",7),i=_(t,"virtualEl",7),s=_(t,"ref",7),a=_(t,"tooltip",7,!1);uP.create({id:z(()=>r()),virtualEl:z(()=>i()),ref:s()},a());var o={get id(){return r()},set id(f){r(f),b()},get children(){return n()},set children(f){n(f),b()},get virtualEl(){return i()},set virtualEl(f){i(f),b()},get ref(){return s()},set ref(f){s(f),b()},get tooltip(){return a()},set tooltip(f=!1){a(f),b()}},l=re(),c=U(l);return Se(c,()=>n()??qe),T(e,l),ie(o)}se(tg,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function rg(e,t){ne(t,!0);let r=_(t,"content",7),n=_(t,"side",7,"bottom"),i=_(t,"sideOffset",7,0),s=_(t,"align",7,"center"),a=_(t,"alignOffset",7,0),o=_(t,"id",7),l=_(t,"arrowPadding",7,0),c=_(t,"avoidCollisions",7,!0),f=_(t,"collisionBoundary",23,()=>[]),u=_(t,"collisionPadding",7,0),p=_(t,"hideWhenDetached",7,!1),h=_(t,"onPlaced",7,()=>{}),g=_(t,"sticky",7,"partial"),v=_(t,"updatePositionStrategy",7,"optimized"),m=_(t,"strategy",7,"fixed"),y=_(t,"dir",7,"ltr"),S=_(t,"style",23,()=>({})),k=_(t,"wrapperId",23,Nn),E=_(t,"customAnchor",7,null),A=_(t,"enabled",7),O=_(t,"tooltip",7,!1);const F=lP.create({side:z(()=>n()),sideOffset:z(()=>i()),align:z(()=>s()),alignOffset:z(()=>a()),id:z(()=>o()),arrowPadding:z(()=>l()),avoidCollisions:z(()=>c()),collisionBoundary:z(()=>f()),collisionPadding:z(()=>u()),hideWhenDetached:z(()=>p()),onPlaced:z(()=>h()),sticky:z(()=>g()),updatePositionStrategy:z(()=>v()),strategy:z(()=>m()),dir:z(()=>y()),style:z(()=>S()),enabled:z(()=>A()),wrapperId:z(()=>k()),customAnchor:z(()=>E())},O()),R=D(()=>Ke(F.wrapperProps,{style:{pointerEvents:"auto"}}));var Y={get content(){return r()},set content(q){r(q),b()},get side(){return n()},set side(q="bottom"){n(q),b()},get sideOffset(){return i()},set sideOffset(q=0){i(q),b()},get align(){return s()},set align(q="center"){s(q),b()},get alignOffset(){return a()},set alignOffset(q=0){a(q),b()},get id(){return o()},set id(q){o(q),b()},get arrowPadding(){return l()},set arrowPadding(q=0){l(q),b()},get avoidCollisions(){return c()},set avoidCollisions(q=!0){c(q),b()},get collisionBoundary(){return f()},set collisionBoundary(q=[]){f(q),b()},get collisionPadding(){return u()},set collisionPadding(q=0){u(q),b()},get hideWhenDetached(){return p()},set hideWhenDetached(q=!1){p(q),b()},get onPlaced(){return h()},set onPlaced(q=()=>{}){h(q),b()},get sticky(){return g()},set sticky(q="partial"){g(q),b()},get updatePositionStrategy(){return v()},set updatePositionStrategy(q="optimized"){v(q),b()},get strategy(){return m()},set strategy(q="fixed"){m(q),b()},get dir(){return y()},set dir(q="ltr"){y(q),b()},get style(){return S()},set style(q={}){S(q),b()},get wrapperId(){return k()},set wrapperId(q=Nn()){k(q),b()},get customAnchor(){return E()},set customAnchor(q=null){E(q),b()},get enabled(){return A()},set enabled(q){A(q),b()},get tooltip(){return O()},set tooltip(q=!1){O(q),b()}},N=re(),X=U(N);return Se(X,()=>r()??qe,()=>({props:F.props,wrapperProps:d(R)})),T(e,N),ie(Y)}se(rg,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function ng(e,t){ne(t,!0);let r=_(t,"content",7),n=_(t,"onPlaced",7);En(()=>{n()?.()});var i={get content(){return r()},set content(o){r(o),b()},get onPlaced(){return n()},set onPlaced(o){n(o),b()}},s=re(),a=U(s);return Se(a,()=>r()??qe,()=>({props:{},wrapperProps:{}})),T(e,s),ie(i)}se(ng,{content:{},onPlaced:{}},[],[],{mode:"open"});var hP=new Set(["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);function ig(e,t){ne(t,!0);let r=_(t,"content",7),n=_(t,"isStatic",7,!1),i=_(t,"onPlaced",7),s=He(t,hP);var a={get content(){return r()},set content(u){r(u),b()},get isStatic(){return n()},set isStatic(u=!1){n(u),b()},get onPlaced(){return i()},set onPlaced(u){i(u),b()}},o=re(),l=U(o),c=u=>{ng(u,{get content(){return r()},get onPlaced(){return i()}})},f=u=>{rg(u,An({get content(){return r()},get onPlaced(){return i()}},()=>s))};return ue(l,u=>{n()?u(c):u(f,-1)}),T(e,o),ie(a)}se(ig,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var pP=new Set(["$$slots","$$events","$$legacy","$$host","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]),mP=B("<!> <!>",1);function Fc(e,t){ne(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),s=_(t,"preventOverflowTextSelection",7),a=_(t,"id",7),o=_(t,"onPointerDown",7),l=_(t,"onPointerUp",7),c=_(t,"side",7),f=_(t,"sideOffset",7),u=_(t,"align",7),p=_(t,"alignOffset",7),h=_(t,"arrowPadding",7),g=_(t,"avoidCollisions",7),v=_(t,"collisionBoundary",7),m=_(t,"collisionPadding",7),y=_(t,"sticky",7),S=_(t,"hideWhenDetached",7),k=_(t,"updatePositionStrategy",7),E=_(t,"strategy",7),A=_(t,"dir",7),O=_(t,"preventScroll",7),F=_(t,"wrapperId",7),R=_(t,"style",7),Y=_(t,"onPlaced",7),N=_(t,"onInteractOutside",7),X=_(t,"onCloseAutoFocus",7),q=_(t,"onOpenAutoFocus",7),le=_(t,"onFocusOutside",7),he=_(t,"interactOutsideBehavior",7,"close"),j=_(t,"loop",7),oe=_(t,"trapFocus",7,!0),ee=_(t,"isValidEvent",7,()=>!1),fe=_(t,"customAnchor",7,null),ce=_(t,"isStatic",7,!1),de=_(t,"enabled",7),G=_(t,"ref",7),Q=_(t,"tooltip",7,!1),P=_(t,"contentPointerEvents",7,"auto"),te=He(t,pP);const L=D(()=>O()??!0),be=D(()=>E()??(d(L)?"fixed":"absolute"));var Z={get popper(){return r()},set popper(w){r(w),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(w){n(w),b()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(w){i(w),b()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(w){s(w),b()},get id(){return a()},set id(w){a(w),b()},get onPointerDown(){return o()},set onPointerDown(w){o(w),b()},get onPointerUp(){return l()},set onPointerUp(w){l(w),b()},get side(){return c()},set side(w){c(w),b()},get sideOffset(){return f()},set sideOffset(w){f(w),b()},get align(){return u()},set align(w){u(w),b()},get alignOffset(){return p()},set alignOffset(w){p(w),b()},get arrowPadding(){return h()},set arrowPadding(w){h(w),b()},get avoidCollisions(){return g()},set avoidCollisions(w){g(w),b()},get collisionBoundary(){return v()},set collisionBoundary(w){v(w),b()},get collisionPadding(){return m()},set collisionPadding(w){m(w),b()},get sticky(){return y()},set sticky(w){y(w),b()},get hideWhenDetached(){return S()},set hideWhenDetached(w){S(w),b()},get updatePositionStrategy(){return k()},set updatePositionStrategy(w){k(w),b()},get strategy(){return E()},set strategy(w){E(w),b()},get dir(){return A()},set dir(w){A(w),b()},get preventScroll(){return O()},set preventScroll(w){O(w),b()},get wrapperId(){return F()},set wrapperId(w){F(w),b()},get style(){return R()},set style(w){R(w),b()},get onPlaced(){return Y()},set onPlaced(w){Y(w),b()},get onInteractOutside(){return N()},set onInteractOutside(w){N(w),b()},get onCloseAutoFocus(){return X()},set onCloseAutoFocus(w){X(w),b()},get onOpenAutoFocus(){return q()},set onOpenAutoFocus(w){q(w),b()},get onFocusOutside(){return le()},set onFocusOutside(w){le(w),b()},get interactOutsideBehavior(){return he()},set interactOutsideBehavior(w="close"){he(w),b()},get loop(){return j()},set loop(w){j(w),b()},get trapFocus(){return oe()},set trapFocus(w=!0){oe(w),b()},get isValidEvent(){return ee()},set isValidEvent(w=()=>!1){ee(w),b()},get customAnchor(){return fe()},set customAnchor(w=null){fe(w),b()},get isStatic(){return ce()},set isStatic(w=!1){ce(w),b()},get enabled(){return de()},set enabled(w){de(w),b()},get ref(){return G()},set ref(w){G(w),b()},get tooltip(){return Q()},set tooltip(w=!1){Q(w),b()},get contentPointerEvents(){return P()},set contentPointerEvents(w="auto"){P(w),b()}};return ig(e,{get isStatic(){return ce()},get id(){return a()},get side(){return c()},get sideOffset(){return f()},get align(){return u()},get alignOffset(){return p()},get arrowPadding(){return h()},get avoidCollisions(){return g()},get collisionBoundary(){return v()},get collisionPadding(){return m()},get sticky(){return y()},get hideWhenDetached(){return S()},get updatePositionStrategy(){return k()},get strategy(){return d(be)},get dir(){return A()},get wrapperId(){return F()},get style(){return R()},get onPlaced(){return Y()},get customAnchor(){return fe()},get enabled(){return de()},get tooltip(){return Q()},content:(_e,we)=>{let De=()=>we?.().props,Le=()=>we?.().wrapperProps;var je=mP(),bt=U(je),st=Rt=>{rc(Rt,{get preventScroll(){return d(L)}})},Nt=Rt=>{rc(Rt,{get preventScroll(){return d(L)}})};ue(bt,Rt=>{t.forceMount&&de()?Rt(st):t.forceMount||Rt(Nt,1)});var _t=V(bt,2);rv(_t,{get onOpenAutoFocus(){return q()},get onCloseAutoFocus(){return X()},get loop(){return j()},get enabled(){return de()},get trapFocus(){return oe()},get forceMount(){return t.forceMount},get ref(){return G()},focusScope:(nr,Ht)=>{let vr=()=>Ht?.().props;tv(nr,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return de()},get ref(){return G()},children:(Ir,Pr)=>{ev(Ir,{get id(){return a()},get onInteractOutside(){return N()},get onFocusOutside(){return le()},get interactOutsideBehavior(){return he()},get isValidEvent(){return ee()},get enabled(){return de()},get ref(){return G()},children:(Mr,gr)=>{let Xr=()=>gr?.().props;sv(Mr,{get id(){return a()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return o()},get onPointerUp(){return l()},get enabled(){return de()},get ref(){return G()},children:(en,xt)=>{var qn=re(),rs=U(qn);{let ns=D(()=>({props:Ke(te,De(),Xr(),vr(),{style:{pointerEvents:P()}}),wrapperProps:Le()}));Se(rs,()=>r()??qe,()=>d(ns))}T(en,qn)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),T(_e,je)},$$slots:{content:!0}}),ie(Z)}se(Fc,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{},ref:{},tooltip:{},contentPointerEvents:{}},[],[],{mode:"open"});var vP=new Set(["$$slots","$$events","$$legacy","$$host","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);function sg(e,t){ne(t,!0);let r=_(t,"popper",7),n=_(t,"open",7),i=_(t,"onEscapeKeydown",7),s=_(t,"escapeKeydownBehavior",7),a=_(t,"preventOverflowTextSelection",7),o=_(t,"id",7),l=_(t,"onPointerDown",7),c=_(t,"onPointerUp",7),f=_(t,"side",7),u=_(t,"sideOffset",7),p=_(t,"align",7),h=_(t,"alignOffset",7),g=_(t,"arrowPadding",7),v=_(t,"avoidCollisions",7),m=_(t,"collisionBoundary",7),y=_(t,"collisionPadding",7),S=_(t,"sticky",7),k=_(t,"hideWhenDetached",7),E=_(t,"updatePositionStrategy",7),A=_(t,"strategy",7),O=_(t,"dir",7),F=_(t,"preventScroll",7),R=_(t,"wrapperId",7),Y=_(t,"style",7),N=_(t,"onPlaced",7),X=_(t,"onInteractOutside",7),q=_(t,"onCloseAutoFocus",7),le=_(t,"onOpenAutoFocus",7),he=_(t,"onFocusOutside",7),j=_(t,"interactOutsideBehavior",7,"close"),oe=_(t,"loop",7),ee=_(t,"trapFocus",7,!0),fe=_(t,"isValidEvent",7,()=>!1),ce=_(t,"customAnchor",7,null),de=_(t,"isStatic",7,!1),G=_(t,"ref",7),Q=_(t,"shouldRender",7),P=He(t,vP);var te={get popper(){return r()},set popper(w){r(w),b()},get open(){return n()},set open(w){n(w),b()},get onEscapeKeydown(){return i()},set onEscapeKeydown(w){i(w),b()},get escapeKeydownBehavior(){return s()},set escapeKeydownBehavior(w){s(w),b()},get preventOverflowTextSelection(){return a()},set preventOverflowTextSelection(w){a(w),b()},get id(){return o()},set id(w){o(w),b()},get onPointerDown(){return l()},set onPointerDown(w){l(w),b()},get onPointerUp(){return c()},set onPointerUp(w){c(w),b()},get side(){return f()},set side(w){f(w),b()},get sideOffset(){return u()},set sideOffset(w){u(w),b()},get align(){return p()},set align(w){p(w),b()},get alignOffset(){return h()},set alignOffset(w){h(w),b()},get arrowPadding(){return g()},set arrowPadding(w){g(w),b()},get avoidCollisions(){return v()},set avoidCollisions(w){v(w),b()},get collisionBoundary(){return m()},set collisionBoundary(w){m(w),b()},get collisionPadding(){return y()},set collisionPadding(w){y(w),b()},get sticky(){return S()},set sticky(w){S(w),b()},get hideWhenDetached(){return k()},set hideWhenDetached(w){k(w),b()},get updatePositionStrategy(){return E()},set updatePositionStrategy(w){E(w),b()},get strategy(){return A()},set strategy(w){A(w),b()},get dir(){return O()},set dir(w){O(w),b()},get preventScroll(){return F()},set preventScroll(w){F(w),b()},get wrapperId(){return R()},set wrapperId(w){R(w),b()},get style(){return Y()},set style(w){Y(w),b()},get onPlaced(){return N()},set onPlaced(w){N(w),b()},get onInteractOutside(){return X()},set onInteractOutside(w){X(w),b()},get onCloseAutoFocus(){return q()},set onCloseAutoFocus(w){q(w),b()},get onOpenAutoFocus(){return le()},set onOpenAutoFocus(w){le(w),b()},get onFocusOutside(){return he()},set onFocusOutside(w){he(w),b()},get interactOutsideBehavior(){return j()},set interactOutsideBehavior(w="close"){j(w),b()},get loop(){return oe()},set loop(w){oe(w),b()},get trapFocus(){return ee()},set trapFocus(w=!0){ee(w),b()},get isValidEvent(){return fe()},set isValidEvent(w=()=>!1){fe(w),b()},get customAnchor(){return ce()},set customAnchor(w=null){ce(w),b()},get isStatic(){return de()},set isStatic(w=!1){de(w),b()},get ref(){return G()},set ref(w){G(w),b()},get shouldRender(){return Q()},set shouldRender(w){Q(w),b()}},L=re(),be=U(L),Z=w=>{Fc(w,An({get popper(){return r()},get onEscapeKeydown(){return i()},get escapeKeydownBehavior(){return s()},get preventOverflowTextSelection(){return a()},get id(){return o()},get onPointerDown(){return l()},get onPointerUp(){return c()},get side(){return f()},get sideOffset(){return u()},get align(){return p()},get alignOffset(){return h()},get arrowPadding(){return g()},get avoidCollisions(){return v()},get collisionBoundary(){return m()},get collisionPadding(){return y()},get sticky(){return S()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return E()},get strategy(){return A()},get dir(){return O()},get preventScroll(){return F()},get wrapperId(){return R()},get style(){return Y()},get onPlaced(){return N()},get customAnchor(){return ce()},get isStatic(){return de()},get enabled(){return n()},get onInteractOutside(){return X()},get onCloseAutoFocus(){return q()},get onOpenAutoFocus(){return le()},get interactOutsideBehavior(){return j()},get loop(){return oe()},get trapFocus(){return ee()},get isValidEvent(){return fe()},get onFocusOutside(){return he()},forceMount:!1,get ref(){return G()}},()=>P))};return ue(be,w=>{Q()&&w(Z)}),T(e,L),ie(te)}se(sg,{popper:{},open:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},ref:{},shouldRender:{}},[],[],{mode:"open"});var gP=new Set(["$$slots","$$events","$$legacy","$$host","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);function ag(e,t){ne(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),s=_(t,"preventOverflowTextSelection",7),a=_(t,"id",7),o=_(t,"onPointerDown",7),l=_(t,"onPointerUp",7),c=_(t,"side",7),f=_(t,"sideOffset",7),u=_(t,"align",7),p=_(t,"alignOffset",7),h=_(t,"arrowPadding",7),g=_(t,"avoidCollisions",7),v=_(t,"collisionBoundary",7),m=_(t,"collisionPadding",7),y=_(t,"sticky",7),S=_(t,"hideWhenDetached",7),k=_(t,"updatePositionStrategy",7),E=_(t,"strategy",7),A=_(t,"dir",7),O=_(t,"preventScroll",7),F=_(t,"wrapperId",7),R=_(t,"style",7),Y=_(t,"onPlaced",7),N=_(t,"onInteractOutside",7),X=_(t,"onCloseAutoFocus",7),q=_(t,"onOpenAutoFocus",7),le=_(t,"onFocusOutside",7),he=_(t,"interactOutsideBehavior",7,"close"),j=_(t,"loop",7),oe=_(t,"trapFocus",7,!0),ee=_(t,"isValidEvent",7,()=>!1),fe=_(t,"customAnchor",7,null),ce=_(t,"isStatic",7,!1),de=_(t,"enabled",7),G=He(t,gP);var Q={get popper(){return r()},set popper(P){r(P),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(P){n(P),b()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(P){i(P),b()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(P){s(P),b()},get id(){return a()},set id(P){a(P),b()},get onPointerDown(){return o()},set onPointerDown(P){o(P),b()},get onPointerUp(){return l()},set onPointerUp(P){l(P),b()},get side(){return c()},set side(P){c(P),b()},get sideOffset(){return f()},set sideOffset(P){f(P),b()},get align(){return u()},set align(P){u(P),b()},get alignOffset(){return p()},set alignOffset(P){p(P),b()},get arrowPadding(){return h()},set arrowPadding(P){h(P),b()},get avoidCollisions(){return g()},set avoidCollisions(P){g(P),b()},get collisionBoundary(){return v()},set collisionBoundary(P){v(P),b()},get collisionPadding(){return m()},set collisionPadding(P){m(P),b()},get sticky(){return y()},set sticky(P){y(P),b()},get hideWhenDetached(){return S()},set hideWhenDetached(P){S(P),b()},get updatePositionStrategy(){return k()},set updatePositionStrategy(P){k(P),b()},get strategy(){return E()},set strategy(P){E(P),b()},get dir(){return A()},set dir(P){A(P),b()},get preventScroll(){return O()},set preventScroll(P){O(P),b()},get wrapperId(){return F()},set wrapperId(P){F(P),b()},get style(){return R()},set style(P){R(P),b()},get onPlaced(){return Y()},set onPlaced(P){Y(P),b()},get onInteractOutside(){return N()},set onInteractOutside(P){N(P),b()},get onCloseAutoFocus(){return X()},set onCloseAutoFocus(P){X(P),b()},get onOpenAutoFocus(){return q()},set onOpenAutoFocus(P){q(P),b()},get onFocusOutside(){return le()},set onFocusOutside(P){le(P),b()},get interactOutsideBehavior(){return he()},set interactOutsideBehavior(P="close"){he(P),b()},get loop(){return j()},set loop(P){j(P),b()},get trapFocus(){return oe()},set trapFocus(P=!0){oe(P),b()},get isValidEvent(){return ee()},set isValidEvent(P=()=>!1){ee(P),b()},get customAnchor(){return fe()},set customAnchor(P=null){fe(P),b()},get isStatic(){return ce()},set isStatic(P=!1){ce(P),b()},get enabled(){return de()},set enabled(P){de(P),b()}};return Fc(e,An({get popper(){return r()},get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get preventOverflowTextSelection(){return s()},get id(){return a()},get onPointerDown(){return o()},get onPointerUp(){return l()},get side(){return c()},get sideOffset(){return f()},get align(){return u()},get alignOffset(){return p()},get arrowPadding(){return h()},get avoidCollisions(){return g()},get collisionBoundary(){return v()},get collisionPadding(){return m()},get sticky(){return y()},get hideWhenDetached(){return S()},get updatePositionStrategy(){return k()},get strategy(){return E()},get dir(){return A()},get preventScroll(){return O()},get wrapperId(){return F()},get style(){return R()},get onPlaced(){return Y()},get customAnchor(){return fe()},get isStatic(){return ce()},get enabled(){return de()},get onInteractOutside(){return N()},get onCloseAutoFocus(){return X()},get onOpenAutoFocus(){return q()},get interactOutsideBehavior(){return he()},get loop(){return j()},get trapFocus(){return oe()},get isValidEvent(){return ee()},get onFocusOutside(){return le()}},()=>G,{forceMount:!0})),ie(Q)}se(ag,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{}},[],[],{mode:"open"});var jo=bo({component:"date-field",parts:["input","label","segment"]}),Hi={day:{min:1,max:e=>{const t=e.segmentValues.month,r=e.value.current??e.placeholder.current;return ta(t?r.set({month:Number.parseInt(t)}):r)},cycle:1,padZero:!0},month:{min:1,max:12,cycle:1,padZero:!0,getAnnouncement:(e,t)=>t.placeholder.current?`${e} - ${t.formatter.fullMonth(Zt(t.placeholder.current.set({month:e})))}`:""},year:{min:1,max:9999,cycle:1,padZero:!1},hour:{min:e=>e.hourCycle.current===12?1:0,max:e=>e.hourCycle.current===24?23:e.hourCycle.current===12||yv(e.locale.current)===12?12:23,cycle:1,canBeZero:!0,padZero:!0},minute:{min:0,max:59,cycle:1,canBeZero:!0,padZero:!0},second:{min:0,max:59,cycle:1,canBeZero:!0,padZero:!0}},zn=new Ft("DateField.Root"),yP=class Cy{static create(t,r){return zn.set(new Cy(t,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Nn();formatter;initialSegments;#e=ae();get segmentValues(){return d(this.#e)}set segmentValues(t){$(this.#e,t,!0)}announcer;#t=D(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return d(this.#t)}set readonlySegmentsSet(t){$(this.#t,t)}segmentStates=mv();#r=ae(null);#n=ae(null);#i=ae(null);get descriptionNode(){return d(this.#i)}set descriptionNode(t){$(this.#i,t,!0)}#s=ae(null);get validationNode(){return d(this.#s)}set validationNode(t){$(this.#s,t,!0)}states=mv();#o=ae(null);get dayPeriodNode(){return d(this.#o)}set dayPeriodNode(t){$(this.#o,t,!0)}rangeRoot=void 0;#a=ae("");get name(){return d(this.#a)}set name(t){$(this.#a,t,!0)}domContext=new Bi(()=>null);constructor(t,r){this.rangeRoot=r,this.value=t.value,this.placeholder=r?r.opts.placeholder:t.placeholder,this.validate=r?Er(void 0):t.validate,this.minValue=r?r.opts.minValue:t.minValue,this.maxValue=r?r.opts.maxValue:t.maxValue,this.disabled=r?r.opts.disabled:t.disabled,this.readonly=r?r.opts.readonly:t.readonly,this.granularity=r?r.opts.granularity:t.granularity,this.readonlySegments=r?r.opts.readonlySegments:t.readonlySegments,this.hourCycle=r?r.opts.hourCycle:t.hourCycle,this.locale=r?r.opts.locale:t.locale,this.hideTimeZone=r?r.opts.hideTimeZone:t.hideTimeZone,this.required=r?r.opts.required:t.required,this.onInvalid=r?r.opts.onInvalid:t.onInvalid,this.errorMessageId=r?r.opts.errorMessageId:t.errorMessageId,this.isInvalidProp=t.isInvalidProp,this.formatter=wv({initialLocale:this.locale.current,monthFormat:z(()=>"long"),yearFormat:z(()=>"numeric")}),this.initialSegments=ac(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=Do(null),this.getFieldNode=this.getFieldNode.bind(this),this.updateSegment=this.updateSegment.bind(this),this.handleSegmentClick=this.handleSegmentClick.bind(this),this.getBaseSegmentAttrs=this.getBaseSegmentAttrs.bind(this),ve(()=>{Re(()=>{this.initialSegments=ac(this.inferredGranularity)})}),En(()=>{this.announcer=Do(this.domContext.getDocument())}),ri(()=>{r||iD(this.descriptionId,this.domContext.getDocument())}),ve(()=>{r||this.formatter.getLocale()!==this.locale.current&&this.formatter.setLocale(this.locale.current)}),ve(()=>{if(r)return;this.value.current&&nD({id:Re(()=>this.descriptionId),formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()});const n=Re(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&Re(()=>{this.value.current&&(this.placeholder.current=this.value.current)})}),this.value.current&&this.syncSegmentValues(this.value.current),ve(()=>{this.locale.current,this.value.current&&this.syncSegmentValues(this.value.current),this.#l()}),ve(()=>{this.value.current===void 0&&(this.segmentValues=ac(this.inferredGranularity))}),nt(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(t){this.name=t}setFieldNode(t){$(this.#r,t,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:d(this.#r)}setLabelNode(t){$(this.#n,t,!0)}getLabelNode(){return this.rangeRoot?this.rangeRoot.labelNode:d(this.#n)}#l(){this.states.day.updating=null,this.states.month.updating=null,this.states.year.updating=null,this.states.hour.updating=null,this.states.minute.updating=null,this.states.dayPeriod.updating=null}setValue(t){this.value.current=t}syncSegmentValues(t){const r=Po.map(n=>{const i=t[n];if(n==="month"){if(this.states.month.updating)return[n,this.states.month.updating];if(i<10)return[n,`0${i}`]}if(n==="day"){if(this.states.day.updating)return[n,this.states.day.updating];if(i<10)return[n,`0${i}`]}if(n==="year"){if(this.states.year.updating)return[n,this.states.year.updating];const s=4-`${i}`.length;if(s>0)return[n,`${"0".repeat(s)}${i}`]}return[n,`${i}`]});if("hour"in t){const n=Mo.map(s=>{if(s==="dayPeriod")return this.states.dayPeriod.updating?[s,this.states.dayPeriod.updating]:[s,this.formatter.dayPeriod(Zt(t))];if(s==="hour"){if(this.states.hour.updating)return[s,this.states.hour.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`];if(t[s]===0&&this.dayPeriodNode)return[s,"12"]}else if(s==="minute"){if(this.states.minute.updating)return[s,this.states.minute.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`]}else if(s==="second"){if(this.states.second.updating)return[s,this.states.second.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`]}return[s,`${t[s]}`]}),i=[...r,...n];this.segmentValues=Object.fromEntries(i),this.#l();return}this.segmentValues=Object.fromEntries(r)}#u=D(()=>{const t=this.value.current;if(!t)return!1;const r=this.validate.current?.(t);if(r)return{reason:"custom",message:r};const n=this.minValue.current;if(n&&si(t,n))return{reason:"min"};const i=this.maxValue.current;return i&&si(i,t)?{reason:"max"}:!1});get validationStatus(){return d(this.#u)}set validationStatus(t){$(this.#u,t)}#c=D(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return d(this.#c)}set isInvalid(t){$(this.#c,t)}#d=D(()=>{const t=this.granularity.current;return t||tD(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return d(this.#d)}set inferredGranularity(t){$(this.#d,t)}#h=D(()=>this.value.current!==void 0?this.value.current:this.placeholder.current);get dateRef(){return d(this.#h)}set dateRef(t){$(this.#h,t)}#p=D(()=>KO({segmentValues:this.segmentValues,formatter:this.formatter,locale:this.locale.current,granularity:this.inferredGranularity,dateRef:this.dateRef,hideTimeZone:this.hideTimeZone.current,hourCycle:this.hourCycle.current}));get allSegmentContent(){return d(this.#p)}set allSegmentContent(t){$(this.#p,t)}#f=D(()=>this.allSegmentContent.arr);get segmentContents(){return d(this.#f)}set segmentContents(t){$(this.#f,t)}sharedSegmentAttrs={role:"spinbutton",contenteditable:"true",tabindex:0,spellcheck:!1,inputmode:"numeric",autocorrect:"off",enterkeyhint:"next",style:{caretColor:"transparent"},onbeforeinput:t=>{(!t.data||t.data.length<=1)&&t.preventDefault()}};#m(t){return`${t} ${this.getLabelNode()?.id??""}`}updateSegment(t,r){const n=this.disabled.current,i=this.readonly.current,s=this.readonlySegmentsSet;if(n||i||s.has(t))return;const a=this.segmentValues;let o=a;const l=this.placeholder.current;if(eD(a)){const c=a[t],f=r;if(t==="month"){const u=f(c);if(this.states.month.updating=u,u!==null&&a.day!==null){const p=ta(Zt(l.set({month:Number.parseInt(u)})));Number.parseInt(a.day)>p&&(a.day=`${p}`)}o={...a,[t]:u}}else if(t==="dayPeriod"){const u=f(c);this.states.dayPeriod.updating=u;const p=this.value.current;if(p&&"hour"in p){const h=p.hour;u==="AM"?h>=12&&(a.hour=`${h-12}`):u==="PM"&&h<12&&(a.hour=`${h+12}`)}o={...a,[t]:u}}else if(t==="hour"){const u=f(c);if(this.states.hour.updating=u,u!==null&&a.dayPeriod!==null){const p=this.formatter.dayPeriod(Zt(l.set({hour:Number.parseInt(u)})),this.hourCycle.current);(p==="AM"||p==="PM")&&(a.dayPeriod=p)}o={...a,[t]:u}}else if(t==="minute"){const u=f(c);this.states.minute.updating=u,o={...a,[t]:u}}else if(t==="second"){const u=f(c);this.states.second.updating=u,o={...a,[t]:u}}else if(t==="year"){const u=f(c);this.states.year.updating=u,o={...a,[t]:u}}else if(t==="day"){const u=f(c);this.states.day.updating=u,o={...a,[t]:u}}else{const u=f(c);o={...a,[t]:u}}}else if($o(t)){const c=a[t],f=r,u=f(c);if(t==="month"&&u!==null&&a.day!==null){this.states.month.updating=u;const p=ta(Zt(l.set({month:Number.parseInt(u)})));Number.parseInt(a.day)>p&&(a.day=`${p}`),o={...a,[t]:u}}else if(t==="year"){const p=f(c);this.states.year.updating=p,o={...a,[t]:p}}else if(t==="day"){const p=f(c);this.states.day.updating=p,o={...a,[t]:p}}else o={...a,[t]:u}}this.segmentValues=o,XO(o,d(this.#r))?this.setValue(QO({segmentObj:o,fieldNode:d(this.#r),dateRef:this.placeholder.current})):(this.setValue(void 0),this.segmentValues=o)}handleSegmentClick(t){this.disabled.current&&t.preventDefault()}getBaseSegmentAttrs(t,r){const n=this.readonlySegmentsSet.has(t),i={"aria-invalid":Ku(this.isInvalid),"aria-disabled":Tr(this.disabled.current),"aria-readonly":Tr(this.readonly.current||n),"data-invalid":Ve(this.isInvalid),"data-disabled":Ve(this.disabled.current),"data-readonly":Ve(this.readonly.current||n),"data-segment":`${t}`,[jo.segment]:""};if(t==="literal")return i;const s=this.descriptionNode?.id,a=rD(r,d(this.#r))&&s,o=this.errorMessageId?.current,l=a?`${s} ${this.isInvalid&&o?o:""}`:void 0,c=!(this.readonly.current||n||this.disabled.current);return{...i,"aria-labelledby":this.#m(r),contenteditable:c?"true":void 0,"aria-describedby":l,tabindex:this.disabled.current?void 0:0}}},bP=class Oy{static create(t){return new Oy(t,zn.get())}opts;root;domContext;attachment;constructor(t,r){this.opts=t,this.root=r,this.domContext=new Bi(t.ref),this.root.domContext=this.domContext,this.attachment=et(t.ref,n=>this.root.setFieldNode(n)),nt(()=>this.opts.name.current,n=>{this.root.setName(n)})}#e=D(()=>{if(ln&&this.domContext.getElementById(this.root.descriptionId))return this.root.descriptionId});#t=D(()=>({id:this.opts.id.current,role:"group","aria-labelledby":this.root.getLabelNode()?.id??void 0,"aria-describedby":d(this.#e),"aria-disabled":Tr(this.root.disabled.current),"data-invalid":this.root.isInvalid?"":void 0,"data-disabled":Ve(this.root.disabled.current),[jo.input]:"",...this.attachment}));get props(){return d(this.#t)}set props(t){$(this.#t,t)}},_P=class Dy{static create(){return new Dy(zn.get())}root;#e=D(()=>this.root.name!=="");get shouldRender(){return d(this.#e)}set shouldRender(t){$(this.#e,t)}#t=D(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return d(this.#t)}set isoValue(t){$(this.#t,t)}constructor(t){this.root=t}#r=D(()=>({name:this.root.name,value:this.isoValue,required:this.root.required.current}));get props(){return d(this.#r)}set props(t){$(this.#r,t)}},wP=class Iy{static create(t){return new Iy(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(t.ref,n=>this.root.setLabelNode(n))}onclick(t){if(this.root.disabled.current)return;const r=oD(this.root.getFieldNode());r&&r.focus()}#e=D(()=>({id:this.opts.id.current,"data-invalid":Ve(this.root.isInvalid),"data-disabled":Ve(this.root.disabled.current),[jo.label]:"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},Gi=class{opts;root;announcer;part;config;attachment;constructor(e,t,r,n){this.opts=e,this.root=t,this.part=r,this.config=n,this.announcer=t.announcer,this.onkeydown=this.onkeydown.bind(this),this.onfocusout=this.onfocusout.bind(this),this.attachment=et(e.ref)}#e(){return typeof this.config.max=="function"?this.config.max(this.root):this.config.max}#t(){return typeof this.config.min=="function"?this.config.min(this.root):this.config.min}#r(e){return this.config.getAnnouncement?this.config.getAnnouncement(e,this.root):e}#n(e,t=!0){const r=String(e);return t&&this.config.padZero&&r.length===1?`0${e}`:r}onkeydown(e){const t=this.root.value.current??this.root.placeholder.current;if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&!((this.part==="hour"||this.part==="minute"||this.part==="second")&&!(this.part in t))&&(e.key!=="Tab"&&e.preventDefault(),!!oc(e.key))){if(Nc(e.key)){this.#i(t);return}if(Rc(e.key)){this.#s(t);return}if(_o(e.key)){this.#o(e);return}if(Lc(e.key)){this.#a(e);return}ia(e.key)&&na(e,this.root.getFieldNode())}}#i(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#s(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,-this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#o(e){const t=Number.parseInt(e.key);let r=!1;const n=this.#e(),i=Math.floor(n/10),s=t===0,a=this.part;this.root.updateSegment(this.part,o=>{if(a in this.root.states&&this.root.states[a].hasLeftFocus&&(o=null,this.root.states[a].hasLeftFocus=!1),o===null)return s?(a in this.root.states&&(this.root.states[a].lastKeyZero=!0),this.announcer.announce("0"),"0"):(a in this.root.states&&(this.root.states[a].lastKeyZero||t>i)&&(r=!0),a in this.root.states&&(this.root.states[a].lastKeyZero=!1),r&&String(t).length===1?(this.announcer.announce(t),`0${t}`):`${t}`);if(a in this.root.states&&this.root.states[a].lastKeyZero)return t!==0?(r=!0,this.root.states[a].lastKeyZero=!1,`0${t}`):this.part==="hour"&&t===0&&this.root.hourCycle.current===24?(r=!0,this.root.states[a].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&t===0?(r=!0,this.root.states[a].lastKeyZero=!1,"00"):o;const l=Number.parseInt(o+t.toString());return l>n?(r=!0,`0${t}`):(r=!0,`${l}`)}),r&&bv(e,this.root.getFieldNode())}#a(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1);let r=!1;this.root.updateSegment(this.part,n=>{if(n===null)return r=!0,this.announcer.announce(null),null;if(n.length===2&&n.startsWith("0"))return this.announcer.announce(null),null;const i=n.toString();if(i.length===1)return this.announcer.announce(null),null;const s=Number.parseInt(i.slice(0,-1));return this.announcer.announce(this.#r(s)),`${s}`}),r&&_v(e,this.root.getFieldNode())}onfocusout(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!0),this.config.padZero&&this.root.updateSegment(this.part,r=>r&&r.length===1?`0${r}`:r)}getSegmentProps(){const e=this.root.segmentValues,t=this.root.placeholder.current,r=e[this.part]===null;let n=t;e[this.part]&&(n=t.set({[this.part]:Number.parseInt(e[this.part])}));const i=n[this.part],s=this.#t(),a=this.#e();let o=r?"Empty":`${i}`;return this.part==="hour"&&"dayPeriod"in e&&e.dayPeriod&&(o=r?"Empty":`${i} ${e.dayPeriod}`),{"aria-label":`${this.part}, `,"aria-valuemin":s,"aria-valuemax":a,"aria-valuenow":i,"aria-valuetext":o}}#l=D(()=>({...this.root.sharedSegmentAttrs,id:this.opts.id.current,...this.getSegmentProps(),onkeydown:this.onkeydown,onfocusout:this.onfocusout,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs(this.part,this.opts.id.current),...this.attachment}));get props(){return d(this.#l)}set props(e){$(this.#l,e)}},kP=class extends Gi{#e=[];#t=0;constructor(e,t){super(e,t,"year",Hi.year)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!=="Tab"&&e.preventDefault(),!!oc(e.key))){if(Nc(e.key)){this.#r(),super.onkeydown(e);return}if(Rc(e.key)){this.#r(),super.onkeydown(e);return}if(_o(e.key)){this.#i(e);return}if(Lc(e.key)){this.#s(e);return}ia(e.key)&&na(e,this.root.getFieldNode())}}#r(){this.#t=0}#n(){this.#t++}#i(e){this.#e.push(e.key);let t=!1;const r=Number.parseInt(e.key);this.root.updateSegment("year",n=>{if(this.root.states.year.hasLeftFocus&&(n=null,this.root.states.year.hasLeftFocus=!1),n===null)return this.announcer.announce(r),`000${r}`;const i=n.toString()+r.toString(),s=Number.parseInt(i);if(String(s).length<4)return this.#t>0&&this.#e.length<=this.#t&&i.length<=4?(this.announcer.announce(s),i):(this.announcer.announce(s),og(s));this.announcer.announce(s),t=!0;const a=`${s}`;return a.length>4?a.slice(0,4):a}),(this.#e.length===4||this.#e.length===this.#t)&&(t=!0),t&&bv(e,this.root.getFieldNode())}#s(e){this.#e=[],this.#n();let t=!1;this.root.updateSegment("year",r=>{if(this.root.states.year.hasLeftFocus=!1,r===null)return t=!0,this.announcer.announce(null),null;const n=r.toString();if(n.length===1)return this.announcer.announce(null),null;const i=n.slice(0,-1);return this.announcer.announce(i),`${i}`}),t&&_v(e,this.root.getFieldNode())}onfocusout(e){this.root.states.year.hasLeftFocus=!0,this.#e=[],this.#r(),this.root.updateSegment("year",t=>t&&t.length!==4?og(Number.parseInt(t)):t)}},SP=class extends Gi{constructor(e,t){super(e,t,"day",Hi.day)}},EP=class extends Gi{constructor(e,t){super(e,t,"month",Hi.month)}},TP=class extends Gi{constructor(e,t){super(e,t,"hour",Hi.hour)}onkeydown(e){if(_o(e.key)){const t=this.root.updateSegment.bind(this.root);this.root.updateSegment=(r,n)=>{const i=t(r,n);return r==="hour"&&"hour"in this.root.segmentValues&&this.root.segmentValues.hour==="0"&&this.root.dayPeriodNode&&this.root.hourCycle.current!==24&&(this.root.segmentValues.hour="12"),i}}super.onkeydown(e),this.root.updateSegment=this.root.updateSegment.bind(this.root)}},xP=class extends Gi{constructor(e,t){super(e,t,"minute",Hi.minute)}},AP=class extends Gi{constructor(e,t){super(e,t,"second",Hi.second)}},CP=class Py{static create(t){return new Py(t,zn.get())}opts;root;attachment;#e;constructor(t,r){this.opts=t,this.root=r,this.#e=this.root.announcer,this.onkeydown=this.onkeydown.bind(this),this.attachment=et(t.ref,n=>this.root.dayPeriodNode=n)}onkeydown(t){if(!(t.ctrlKey||t.metaKey||this.root.disabled.current)&&(t.key!=="Tab"&&t.preventDefault(),!!PP(t.key))){if(Nc(t.key)||Rc(t.key)){this.root.updateSegment("dayPeriod",r=>{if(r==="AM")return this.#e.announce("PM"),"PM";const n="AM";return this.#e.announce(n),n});return}Lc(t.key)&&(this.root.states.dayPeriod.hasLeftFocus=!1,this.root.updateSegment("dayPeriod",()=>(this.#e.announce("AM"),"AM"))),t.key==="A"||t.key,this.root.updateSegment("dayPeriod",()=>{const r=t.key==="A"||t.key==="a"?"AM":"PM";return this.#e.announce(r),r}),ia(t.key)&&na(t,this.root.getFieldNode())}}#t=D(()=>{const t=this.root.segmentValues;if(!("dayPeriod"in t))return;const r=0,n=12,i=t.dayPeriod==="AM"?0:12,s=t.dayPeriod??"AM";return{...this.root.sharedSegmentAttrs,id:this.opts.id.current,inputmode:"text","aria-label":"AM/PM","aria-valuemin":r,"aria-valuemax":n,"aria-valuenow":i,"aria-valuetext":s,onkeydown:this.onkeydown,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs("dayPeriod",this.opts.id.current),...this.attachment}});get props(){return d(this.#t)}set props(t){$(this.#t,t)}},OP=class My{static create(t){return new My(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(t.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Ku(!0),...this.root.getBaseSegmentAttrs("literal",this.opts.id.current),...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},DP=class $y{static create(t){return new $y(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=et(t.ref)}onkeydown(t){t.key!=="Tab"&&t.preventDefault(),!this.root.disabled.current&&ia(t.key)&&na(t,this.root.getFieldNode())}#e=D(()=>({role:"textbox",id:this.opts.id.current,"aria-label":"timezone, ",style:{caretColor:"transparent"},onkeydown:this.onkeydown,...this.root.getBaseSegmentAttrs("timeZoneName",this.opts.id.current),"data-readonly":Ve(!0),...this.attachment}));get props(){return d(this.#e)}set props(t){$(this.#e,t)}},IP=class{static create(e,t){const r=zn.get();switch(e){case"day":return new SP(t,r);case"month":return new EP(t,r);case"year":return new kP(t,r);case"hour":return new TP(t,r);case"minute":return new xP(t,r);case"second":return new AP(t,r);case"dayPeriod":return new CP(t,r);case"literal":return new OP(t,r);case"timeZoneName":return new DP(t,r)}}};function PP(e){return oc(e)||e==="A"||e==="P"||e==="a"||e==="p"}function Nc(e){return e===Ju}function Rc(e){return e===Yu}function Lc(e){return e===qC}function og(e){const t=4-String(e).length;return`${"0".repeat(t)}${e}`}function lg(e,t){ne(t,!1);const r=_P.create();Jl();var n=re(),i=U(n),s=a=>{Dv(a,An(()=>r.props))};ue(i,a=>{r.shouldRender&&a(s)}),T(e,n),ie()}se(lg,{},[],[],{mode:"open"});var MP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]),$P=B("<div><!></div>"),FP=B("<!> <!>",1);function ug(e,t){const r=mt();ne(t,!0);let n=_(t,"id",23,()=>Pe(r)),i=_(t,"ref",15,null),s=_(t,"name",7,""),a=_(t,"children",7),o=_(t,"child",7),l=He(t,MP);const c=bP.create({id:z(()=>n()),ref:z(()=>i(),m=>i(m)),name:z(()=>s())}),f=D(()=>Ke(l,c.props));var u={get id(){return n()},set id(m=Pe(r)){n(m),b()},get ref(){return i()},set ref(m=null){i(m),b()},get name(){return s()},set name(m=""){s(m),b()},get children(){return a()},set children(m){a(m),b()},get child(){return o()},set child(m){o(m),b()}},p=FP(),h=U(p),g=m=>{var y=re(),S=U(y);Se(S,o,()=>({props:d(f),segments:c.root.segmentContents})),T(m,y)},v=m=>{var y=$P();Ue(y,()=>({...d(f)}));var S=M(y);Se(S,()=>a()??qe,()=>({segments:c.root.segmentContents})),I(y),T(m,y)};return ue(h,m=>{o()?m(g):m(v,-1)}),lg(V(h,2),{}),T(e,p),ie(u)}se(ug,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var NP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]),RP=B("<div><!></div>");function cg(e,t){const r=mt();ne(t,!0);let n=_(t,"id",23,()=>Pe(r)),i=_(t,"ref",15,null),s=_(t,"children",7),a=_(t,"child",7),o=He(t,NP);const l=wP.create({id:z(()=>n()),ref:z(()=>i(),v=>i(v))}),c=D(()=>Ke(o,l.props));var f={get id(){return n()},set id(v=Pe(r)){n(v),b()},get ref(){return i()},set ref(v=null){i(v),b()},get children(){return s()},set children(v){s(v),b()},get child(){return a()},set child(v){a(v),b()}},u=re(),p=U(u),h=v=>{var m=re(),y=U(m);Se(y,a,()=>({props:d(c)})),T(v,m)},g=v=>{var m=RP();Ue(m,()=>({...d(c)}));var y=M(m);Se(y,()=>s()??qe),I(m),T(v,m)};return ue(p,v=>{a()?v(h):v(g,-1)}),T(e,u),ie(f)}se(cg,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var LP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]),zP=B("<span><!></span>");function dg(e,t){const r=mt();ne(t,!0);let n=_(t,"id",23,()=>Pe(r)),i=_(t,"ref",15,null),s=_(t,"children",7),a=_(t,"child",7),o=_(t,"part",7),l=He(t,LP);const c=IP.create(o(),{id:z(()=>n()),ref:z(()=>i(),m=>i(m))}),f=D(()=>Ke(l,c.props));var u={get id(){return n()},set id(m=Pe(r)){n(m),b()},get ref(){return i()},set ref(m=null){i(m),b()},get children(){return s()},set children(m){s(m),b()},get child(){return a()},set child(m){a(m),b()},get part(){return o()},set part(m){o(m),b()}},p=re(),h=U(p),g=m=>{var y=re(),S=U(y);Se(S,a,()=>({props:d(f)})),T(m,y)},v=m=>{var y=zP();Ue(y,()=>({...d(f)}));var S=M(y);Se(S,()=>s()??qe),I(y),T(m,y)};return ue(h,m=>{a()?m(g):m(v,-1)}),T(e,p),ie(u)}se(dg,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});var fg=new Ft("DatePicker.Root"),qP=class Fy{static create(t){return fg.set(new Fy(t))}opts;constructor(t){this.opts=t}};function zc(e,t){const[r,n]=e;let i=!1;const s=t.length;for(let a=0,o=s-1;a<s;o=a++){const[l,c]=t[a]??[0,0],[f,u]=t[o]??[0,0];c>=n!=u>=n&&r<=(f-l)*(n-c)/(u-c)+l&&(i=!i)}return i}function qc(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function hg(e,t){const r=e.left+e.width/2,n=e.top+e.height/2,i=t.left+t.width/2,s=t.top+t.height/2,a=i-r,o=s-n;return Math.abs(a)>Math.abs(o)?a>0?"right":"left":o>0?"bottom":"top"}var UP=class{#e;#t;#r;#n=null;#i=null;#s=[];#o=null;#a=null;#l=null;#u(){this.#a!==null&&(cancelAnimationFrame(this.#a),this.#a=null)}#c(){this.#u(),this.#a=requestAnimationFrame(()=>{this.#a=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())})}#d(){this.#l!==null&&(clearTimeout(this.#l),this.#l=null)}#h(){this.#r!==null&&(this.#d(),this.#l=window.setTimeout(()=>{this.#l=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())},this.#r))}constructor(e){this.#e=e,this.#t=e.buffer??1;const t=e.transitIntentTimeout;this.#r=typeof t=="number"&&t>0?t:null,nt([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#o=null,this.#f();return}this.#o&&this.#o!==r&&this.#f(),this.#o=r;const s=yo(r),a=u=>{this.#p([u.clientX,u.clientY],r,n)},o=u=>{const p=u.relatedTarget;if(ni(p)&&n.contains(p))return;const h=this.#e.ignoredTargets?.()??[];ni(p)&&h.some(g=>g===p||g.contains(p))||(this.#s=ni(p)&&h.length>0?h.filter(g=>p.contains(g)):[],this.#n=[u.clientX,u.clientY],this.#i="content",this.#c())},l=()=>{this.#f()},c=()=>{this.#f()},f=u=>{const p=u.relatedTarget;ni(p)&&r.contains(p)||(this.#n=[u.clientX,u.clientY],this.#i="trigger",this.#c())};return[gt(s,"pointermove",a),gt(r,"pointerleave",o),gt(r,"pointerenter",l),gt(n,"pointerenter",c),gt(n,"pointerleave",f)].reduce((u,p)=>()=>{u(),p()},()=>{})})}#p(e,t,r){if(!this.#n||!this.#i)return;this.#u(),this.#h();const n=t.getBoundingClientRect(),i=r.getBoundingClientRect();if(this.#i==="content"&&qc(e,i)){this.#f();return}if(this.#i==="trigger"&&qc(e,n)){this.#f();return}if(this.#i==="content"&&this.#s.length>0)for(const l of this.#s){const c=l.getBoundingClientRect();if(qc(e,c))return;const f=hg(n,c),u=this.#m(n,c,f);if(u&&zc(e,u))return}const s=hg(n,i),a=this.#m(n,i,s);if(a&&zc(e,a))return;const o=this.#i==="content"?i:n;zc(e,this.#v(this.#n,o,s,this.#i))||(this.#f(),this.#e.onPointerExit())}#f(){this.#n=null,this.#i=null,this.#s=[],this.#u(),this.#d()}#m(e,t,r){const n=this.#t;switch(r){case"top":return[[Math.min(e.left,t.left)-n,e.top],[Math.min(e.left,t.left)-n,t.bottom],[Math.max(e.right,t.right)+n,t.bottom],[Math.max(e.right,t.right)+n,e.top]];case"bottom":return[[Math.min(e.left,t.left)-n,e.bottom],[Math.min(e.left,t.left)-n,t.top],[Math.max(e.right,t.right)+n,t.top],[Math.max(e.right,t.right)+n,e.bottom]];case"left":return[[e.left,Math.min(e.top,t.top)-n],[t.right,Math.min(e.top,t.top)-n],[t.right,Math.max(e.bottom,t.bottom)+n],[e.left,Math.max(e.bottom,t.bottom)+n]];case"right":return[[e.right,Math.min(e.top,t.top)-n],[t.left,Math.min(e.top,t.top)-n],[t.left,Math.max(e.bottom,t.bottom)+n],[e.right,Math.max(e.bottom,t.bottom)+n]]}}#v(e,t,r,n){const i=this.#t*4,[s,a]=e;switch(n==="trigger"?this.#y(r):r){case"top":return[[s-i,a+i],[s+i,a+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case"bottom":return[[s-i,a-i],[s+i,a-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case"left":return[[s+i,a-i],[s+i,a+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case"right":return[[s-i,a-i],[s-i,a+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}#y(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}},Uc=bo({component:"popover",parts:["root","trigger","content","close","overlay"]}),Bc=new Ft("Popover.Root"),BP=class Ny{static create(t){return Bc.set(new Ny(t))}opts;#e=ae(null);get contentNode(){return d(this.#e)}set contentNode(t){$(this.#e,t,!0)}contentPresence;#t=ae(null);get triggerNode(){return d(this.#t)}set triggerNode(t){$(this.#t,t,!0)}#r=ae(null);get overlayNode(){return d(this.#r)}set overlayNode(t){$(this.#r,t,!0)}overlayPresence;#n=ae(!1);get openedViaHover(){return d(this.#n)}set openedViaHover(t){$(this.#n,t,!0)}#i=ae(!1);get hasInteractedWithContent(){return d(this.#i)}set hasInteractedWithContent(t){$(this.#i,t,!0)}#s=ae(!1);get hoverCooldown(){return d(this.#s)}set hoverCooldown(t){$(this.#s,t,!0)}#o=ae(0);get closeDelay(){return d(this.#o)}set closeDelay(t){$(this.#o,t,!0)}#a=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new zm({ref:z(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new zm({ref:z(()=>this.overlayNode),open:this.opts.open}),nt(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#u())})}setDomContext(t){this.#l=t}#u(){this.#a!==null&&this.#l&&(this.#l.clearTimeout(this.#a),this.#a=null)}toggleOpen(){this.#u(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#u(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#u(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#u(),this.closeDelay<=0?this.opts.open.current=!1:this.#l&&(this.#a=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#a=null},this.closeDelay))))}cancelDelayedClose(){this.#u()}markInteraction(){this.hasInteractedWithContent=!0,this.#u()}},VP=class Ry{static create(t){return new Ry(t,Bc.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=ae(!1);constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new Bi(t.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),nt(()=>this.opts.closeDelay.current,n=>{this.root.closeDelay=n})}#n(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#i(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#s(){this.#n(),this.#i()}onpointerenter(t){if(this.opts.disabled.current||!this.opts.openOnHover.current||wo(t)||($(this.#r,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const r=this.opts.openDelay.current;r<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},r)}onpointerleave(t){this.opts.disabled.current||this.opts.openOnHover.current&&(wo(t)||($(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#s(),d(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}d(this.#r)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(t){this.opts.disabled.current||(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.#s(),this.root.toggleOpen())}#o(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#a=D(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Tr(this.root.opts.open.current),"data-state":Fm(this.root.opts.open.current),"aria-controls":this.#o(),[Uc.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return d(this.#a)}set props(t){$(this.#a,t)}},jP=class Ly{static create(t){return new Ly(t,Bc.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref,n=>this.root.contentNode=n),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new UP({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(t){this.root.markInteraction()}onfocusin(t){const r=t.target;ni(r)&&hO(r)&&this.root.markInteraction()}onpointerenter(t){wo(t)||this.root.cancelDelayedClose()}onpointerleave(t){wo(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!ni(t.target))return;const r=t.target.closest(Uc.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(ni(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(t.target))return}else if(typeof this.opts.customAnchor.current=="string"){const n=document.querySelector(this.opts.customAnchor.current);if(n&&n.contains(t.target))return}}this.root.handleClose()}};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=D(()=>({open:this.root.opts.open.current}));get snippetProps(){return d(this.#e)}set snippetProps(t){$(this.#e,t)}#t=D(()=>({id:this.opts.id.current,tabindex:-1,"data-state":Fm(this.root.opts.open.current),...LC(this.root.contentPresence.transitionStatus),[Uc.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return d(this.#t)}set props(t){$(this.#t,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}};function pg(e,t){ne(t,!0);let r=_(t,"open",15,!1),n=_(t,"onOpenChange",7,Te),i=_(t,"onOpenChangeComplete",7,Te),s=_(t,"value",15),a=_(t,"onValueChange",7,Te),o=_(t,"placeholder",15),l=_(t,"onPlaceholderChange",7,Te),c=_(t,"isDateUnavailable",7,()=>!1),f=_(t,"validate",7,Te),u=_(t,"onInvalid",7,Te),p=_(t,"minValue",7),h=_(t,"maxValue",7),g=_(t,"disabled",7,!1),v=_(t,"readonly",7,!1),m=_(t,"granularity",7),y=_(t,"readonlySegments",23,()=>[]),S=_(t,"hourCycle",7),k=_(t,"locale",7),E=_(t,"hideTimeZone",7,!1),A=_(t,"required",7,!1),O=_(t,"calendarLabel",7,"Event"),F=_(t,"disableDaysOutsideMonth",7,!0),R=_(t,"preventDeselect",7,!1),Y=_(t,"pagedNavigation",7,!1),N=_(t,"weekStartsOn",7),X=_(t,"weekdayFormat",7,"narrow"),q=_(t,"isDateDisabled",7,()=>!1),le=_(t,"fixedWeeks",7,!1),he=_(t,"numberOfMonths",7,1),j=_(t,"closeOnDateSelect",7,!0),oe=_(t,"initialFocus",7,!1),ee=_(t,"errorMessageId",7),fe=_(t,"children",7),ce=_(t,"monthFormat",7,"long"),de=_(t,"yearFormat",7,"numeric");const G=lv({granularity:m(),defaultValue:s(),minValue:p(),maxValue:h()});function Q(){o()===void 0&&o(G)}Q(),nt.pre(()=>o(),()=>{Q()});function P(){j()&&r(!1)}const te=qP.create({open:z(()=>r(),w=>{r(w),n()(w)}),value:z(()=>s(),w=>{s(w),a()(w)}),placeholder:z(()=>o(),w=>{o(w),l()(w)}),isDateUnavailable:z(()=>c()),minValue:z(()=>p()),maxValue:z(()=>h()),disabled:z(()=>g()),readonly:z(()=>v()),granularity:z(()=>m()),readonlySegments:z(()=>y()),hourCycle:z(()=>S()),locale:Um(()=>k()),hideTimeZone:z(()=>E()),required:z(()=>A()),calendarLabel:z(()=>O()),disableDaysOutsideMonth:z(()=>F()),preventDeselect:z(()=>R()),pagedNavigation:z(()=>Y()),weekStartsOn:z(()=>N()),weekdayFormat:z(()=>X()),isDateDisabled:z(()=>q()),fixedWeeks:z(()=>le()),numberOfMonths:z(()=>he()),initialFocus:z(()=>oe()),onDateSelect:z(()=>P),defaultPlaceholder:G,monthFormat:z(()=>ce()),yearFormat:z(()=>de())});BP.create({open:te.opts.open,onOpenChangeComplete:z(()=>i())}),yP.create({value:te.opts.value,disabled:te.opts.disabled,readonly:te.opts.readonly,readonlySegments:te.opts.readonlySegments,validate:z(()=>f()),onInvalid:z(()=>u()),minValue:te.opts.minValue,maxValue:te.opts.maxValue,granularity:te.opts.granularity,hideTimeZone:te.opts.hideTimeZone,hourCycle:te.opts.hourCycle,locale:te.opts.locale,required:te.opts.required,placeholder:te.opts.placeholder,errorMessageId:z(()=>ee()),isInvalidProp:z(()=>{})});var L={get open(){return r()},set open(w=!1){r(w),b()},get onOpenChange(){return n()},set onOpenChange(w=Te){n(w),b()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(w=Te){i(w),b()},get value(){return s()},set value(w){s(w),b()},get onValueChange(){return a()},set onValueChange(w=Te){a(w),b()},get placeholder(){return o()},set placeholder(w){o(w),b()},get onPlaceholderChange(){return l()},set onPlaceholderChange(w=Te){l(w),b()},get isDateUnavailable(){return c()},set isDateUnavailable(w=()=>!1){c(w),b()},get validate(){return f()},set validate(w=Te){f(w),b()},get onInvalid(){return u()},set onInvalid(w=Te){u(w),b()},get minValue(){return p()},set minValue(w){p(w),b()},get maxValue(){return h()},set maxValue(w){h(w),b()},get disabled(){return g()},set disabled(w=!1){g(w),b()},get readonly(){return v()},set readonly(w=!1){v(w),b()},get granularity(){return m()},set granularity(w){m(w),b()},get readonlySegments(){return y()},set readonlySegments(w=[]){y(w),b()},get hourCycle(){return S()},set hourCycle(w){S(w),b()},get locale(){return k()},set locale(w){k(w),b()},get hideTimeZone(){return E()},set hideTimeZone(w=!1){E(w),b()},get required(){return A()},set required(w=!1){A(w),b()},get calendarLabel(){return O()},set calendarLabel(w="Event"){O(w),b()},get disableDaysOutsideMonth(){return F()},set disableDaysOutsideMonth(w=!0){F(w),b()},get preventDeselect(){return R()},set preventDeselect(w=!1){R(w),b()},get pagedNavigation(){return Y()},set pagedNavigation(w=!1){Y(w),b()},get weekStartsOn(){return N()},set weekStartsOn(w){N(w),b()},get weekdayFormat(){return X()},set weekdayFormat(w="narrow"){X(w),b()},get isDateDisabled(){return q()},set isDateDisabled(w=()=>!1){q(w),b()},get fixedWeeks(){return le()},set fixedWeeks(w=!1){le(w),b()},get numberOfMonths(){return he()},set numberOfMonths(w=1){he(w),b()},get closeOnDateSelect(){return j()},set closeOnDateSelect(w=!0){j(w),b()},get initialFocus(){return oe()},set initialFocus(w=!1){oe(w),b()},get errorMessageId(){return ee()},set errorMessageId(w){ee(w),b()},get children(){return fe()},set children(w){fe(w),b()},get monthFormat(){return ce()},set monthFormat(w="long"){ce(w),b()},get yearFormat(){return de()},set yearFormat(w="numeric"){de(w),b()}},be=re(),Z=U(be);return $e(Z,()=>eg,(w,_e)=>{_e(w,{children:(we,De)=>{var Le=re(),je=U(Le);Se(je,()=>fe()??qe),T(we,Le)},$$slots:{default:!0}})}),T(e,be),ie(L)}se(pg,{open:{},onOpenChange:{},onOpenChangeComplete:{},value:{},onValueChange:{},placeholder:{},onPlaceholderChange:{},isDateUnavailable:{},validate:{},onInvalid:{},minValue:{},maxValue:{},disabled:{},readonly:{},granularity:{},readonlySegments:{},hourCycle:{},locale:{},hideTimeZone:{},required:{},calendarLabel:{},disableDaysOutsideMonth:{},preventDeselect:{},pagedNavigation:{},weekStartsOn:{},weekdayFormat:{},isDateDisabled:{},fixedWeeks:{},numberOfMonths:{},closeOnDateSelect:{},initialFocus:{},errorMessageId:{},children:{},monthFormat:{},yearFormat:{}},[],[],{mode:"open"});var ZP=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]),WP=B("<div><!></div>");function mg(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Pe(r)),a=_(t,"ref",15,null),o=He(t,ZP);const l=fg.get(),c=xv.create({id:z(()=>s()),ref:z(()=>a(),m=>a(m)),calendarLabel:l.opts.calendarLabel,fixedWeeks:l.opts.fixedWeeks,isDateDisabled:l.opts.isDateDisabled,isDateUnavailable:l.opts.isDateUnavailable,locale:l.opts.locale,numberOfMonths:l.opts.numberOfMonths,pagedNavigation:l.opts.pagedNavigation,preventDeselect:l.opts.preventDeselect,readonly:l.opts.readonly,type:z(()=>"single"),weekStartsOn:l.opts.weekStartsOn,weekdayFormat:l.opts.weekdayFormat,disabled:l.opts.disabled,disableDaysOutsideMonth:l.opts.disableDaysOutsideMonth,maxValue:l.opts.maxValue,minValue:l.opts.minValue,placeholder:l.opts.placeholder,value:l.opts.value,onDateSelect:l.opts.onDateSelect,initialFocus:l.opts.initialFocus,defaultPlaceholder:l.opts.defaultPlaceholder,maxDays:z(()=>{}),monthFormat:l.opts.monthFormat,yearFormat:l.opts.yearFormat}),f=D(()=>Ke(o,c.props));var u={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get id(){return s()},set id(m=Pe(r)){s(m),b()},get ref(){return a()},set ref(m=null){a(m),b()}},p=re(),h=U(p),g=m=>{var y=re(),S=U(y);{let k=D(()=>({props:d(f),...c.snippetProps}));Se(S,i,()=>d(k))}T(m,y)},v=m=>{var y=WP();Ue(y,()=>({...d(f)}));var S=M(y);Se(S,()=>n()??qe,()=>c.snippetProps),I(y),T(m,y)};return ue(h,m=>{i()?m(g):m(v,-1)}),T(e,p),ie(u)}se(mg,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var HP=new Set(["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]),vg=B("<div><div><!></div></div>");function gg(e,t){const r=mt();ne(t,!0);let n=_(t,"child",7),i=_(t,"children",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Pe(r)),o=_(t,"forceMount",7,!1),l=_(t,"onOpenAutoFocus",7,Te),c=_(t,"onCloseAutoFocus",7,Te),f=_(t,"onEscapeKeydown",7,Te),u=_(t,"onInteractOutside",7,Te),p=_(t,"trapFocus",7,!0),h=_(t,"preventScroll",7,!1),g=_(t,"customAnchor",7,null),v=_(t,"style",7),m=He(t,HP);const y=jP.create({id:z(()=>a()),ref:z(()=>s(),N=>s(N)),onInteractOutside:z(()=>u()),onEscapeKeydown:z(()=>f()),customAnchor:z(()=>g())}),S=D(()=>Ke(m,y.props)),k=D(()=>p()&&y.shouldTrapFocus);function E(N){y.shouldTrapFocus||N.preventDefault(),l()(N)}var A={get child(){return n()},set child(N){n(N),b()},get children(){return i()},set children(N){i(N),b()},get ref(){return s()},set ref(N=null){s(N),b()},get id(){return a()},set id(N=Pe(r)){a(N),b()},get forceMount(){return o()},set forceMount(N=!1){o(N),b()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(N=Te){l(N),b()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(N=Te){c(N),b()},get onEscapeKeydown(){return f()},set onEscapeKeydown(N=Te){f(N),b()},get onInteractOutside(){return u()},set onInteractOutside(N=Te){u(N),b()},get trapFocus(){return p()},set trapFocus(N=!0){p(N),b()},get preventScroll(){return h()},set preventScroll(N=!1){h(N),b()},get customAnchor(){return g()},set customAnchor(N=null){g(N),b()},get style(){return v()},set style(N){v(N),b()}},O=re(),F=U(O),R=N=>{ag(N,An(()=>d(S),()=>y.popperProps,{get ref(){return y.opts.ref},get enabled(){return y.root.opts.open.current},get id(){return a()},get trapFocus(){return d(k)},get preventScroll(){return h()},loop:!0,forceMount:!0,get customAnchor(){return g()},onOpenAutoFocus:E,get onCloseAutoFocus(){return c()},get shouldRender(){return y.shouldRender},popper:(q,le)=>{let he=()=>le?.().props,j=()=>le?.().wrapperProps;const oe=D(()=>Ke(he(),{style:Qv("popover")},{style:v()}));var ee=re(),fe=U(ee),ce=G=>{var Q=re(),P=U(Q);{let te=D(()=>({props:d(oe),wrapperProps:j(),...y.snippetProps}));Se(P,n,()=>d(te))}T(G,Q)},de=G=>{var Q=vg();Ue(Q,()=>({...j()}));var P=M(Q);Ue(P,()=>({...d(oe)}));var te=M(P);Se(te,()=>i()??qe),I(P),I(Q),T(G,Q)};ue(fe,G=>{n()?G(ce):G(de,-1)}),T(q,ee)},$$slots:{popper:!0}}))},Y=N=>{sg(N,An(()=>d(S),()=>y.popperProps,{get ref(){return y.opts.ref},get open(){return y.root.opts.open.current},get id(){return a()},get trapFocus(){return d(k)},get preventScroll(){return h()},loop:!0,forceMount:!1,get customAnchor(){return g()},onOpenAutoFocus:E,get onCloseAutoFocus(){return c()},get shouldRender(){return y.shouldRender},popper:(q,le)=>{let he=()=>le?.().props,j=()=>le?.().wrapperProps;const oe=D(()=>Ke(he(),{style:Qv("popover")},{style:v()}));var ee=re(),fe=U(ee),ce=G=>{var Q=re(),P=U(Q);{let te=D(()=>({props:d(oe),wrapperProps:j(),...y.snippetProps}));Se(P,n,()=>d(te))}T(G,Q)},de=G=>{var Q=vg();Ue(Q,()=>({...j()}));var P=M(Q);Ue(P,()=>({...d(oe)}));var te=M(P);Se(te,()=>i()??qe),I(P),I(Q),T(G,Q)};ue(fe,G=>{n()?G(ce):G(de,-1)}),T(q,ee)},$$slots:{popper:!0}}))};return ue(F,N=>{o()?N(R):o()||N(Y,1)}),T(e,O),ie(A)}se(gg,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:"open"});var GP=new Set(["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);function yg(e,t){ne(t,!0);let r=_(t,"ref",15,null),n=_(t,"onOpenAutoFocus",7),i=He(t,GP);const s=D(()=>Ke({onOpenAutoFocus:n()},{onOpenAutoFocus:kD}));var a={get ref(){return r()},set ref(o=null){r(o),b()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(o){n(o),b()}};return gg(e,An(()=>d(s),()=>i,{get ref(){return r()},set ref(o){r(o)}})),ie(a)}se(yg,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var KP=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),YP=B("<button><!></button>");function bg(e,t){const r=mt();ne(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Pe(r)),a=_(t,"ref",15,null),o=_(t,"type",7,"button"),l=_(t,"disabled",7,!1),c=_(t,"openOnHover",7,!1),f=_(t,"openDelay",7,700),u=_(t,"closeDelay",7,300),p=He(t,KP);const h=VP.create({id:z(()=>s()),ref:z(()=>a(),m=>a(m)),disabled:z(()=>!!l()),openOnHover:z(()=>c()),openDelay:z(()=>f()),closeDelay:z(()=>u())}),g=D(()=>Ke(p,h.props,{type:o()}));var v={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get id(){return s()},set id(m=Pe(r)){s(m),b()},get ref(){return a()},set ref(m=null){a(m),b()},get type(){return o()},set type(m="button"){o(m),b()},get disabled(){return l()},set disabled(m=!1){l(m),b()},get openOnHover(){return c()},set openOnHover(m=!1){c(m),b()},get openDelay(){return f()},set openDelay(m=700){f(m),b()},get closeDelay(){return u()},set closeDelay(m=300){u(m),b()}};return tg(e,{get id(){return s()},get ref(){return h.opts.ref},children:(m,y)=>{var S=re(),k=U(S),E=O=>{var F=re(),R=U(F);Se(R,i,()=>({props:d(g)})),T(O,F)},A=O=>{var F=YP();Ue(F,()=>({...d(g)}));var R=M(F);Se(R,()=>n()??qe),I(F),T(O,F)};ue(k,O=>{i()?O(E):O(A,-1)}),T(m,S)},$$slots:{default:!0}}),ie(v)}se(bg,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});var JP=new Set(["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function _g(e,t){ne(t,!0);let r=_(t,"ref",15,null),n=_(t,"onkeydown",7),i=He(t,JP);function s(l){if(ia(l.key)){const c=l.currentTarget.closest(jo.selector("input"));if(!c)return;na(l,c)}}const a=D(()=>Ke({onkeydown:n()},{onkeydown:s}));var o={get ref(){return r()},set ref(l=null){r(l),b()},get onkeydown(){return n()},set onkeydown(l){n(l),b()}};return bg(e,An(()=>i,{"data-segment":"trigger"},()=>d(a),{get ref(){return r()},set ref(l){r(l)}})),ie(o)}se(_g,{ref:{},onkeydown:{}},[],[],{mode:"open"});var Vc=B("<!> <!>",1),wg=B("<!> <!> <!>",1);function kg(e,t){ne(t,!0);let r=_(t,"dateString",15),n=_(t,"labelClass",7),i=_(t,"inputClass",7),s=_(t,"labelText",7),a=ae(Me(Di(Xt())));const o="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);ve(()=>{r(d(a).toString())});var l={get dateString(){return r()},set dateString(u){r(u),b()},get labelClass(){return n()},set labelClass(u){n(u),b()},get inputClass(){return i()},set inputClass(u){i(u),b()},get labelText(){return s()},set labelText(u){s(u),b()}},c=re(),f=U(c);{let u=D(()=>x.locale||"de");$e(f,()=>pg,(p,h)=>{h(p,{get locale(){return d(u)},weekStartsOn:1,isDateDisabled:g=>g.compare(Di(Xt()))<0,get value(){return d(a)},set value(g){$(a,g,!0)},children:(g,v)=>{var m=wg(),y=U(m);$e(y,()=>cg,(E,A)=>{A(E,{get id(){return o},get class(){return`go-datepicker-label ${n()??""}`},children:(O,F)=>{var R=re(),Y=U(R),N=X=>{var q=re(),le=U(q);Se(le,s),T(X,q)};ue(Y,X=>{s()&&X(N)}),T(O,R)},$$slots:{default:!0}})});var S=V(y,2);{const E=(A,O)=>{let F=()=>O?.().segments;var R=Vc(),Y=U(R);Ne(Y,17,F,sn,(X,q)=>{let le=()=>d(q).part,he=()=>d(q).value;var j=re(),oe=U(j);$e(oe,()=>dg,(ee,fe)=>{fe(ee,{get part(){return le()},children:(ce,de)=>{Ot();var G=Bt();J(()=>H(G,he())),T(ce,G)},$$slots:{default:!0}})}),T(X,j)});var N=V(Y,2);$e(N,()=>_g,(X,q)=>{q(X,{get"aria-labelledby"(){return o},class:"go-calendar-button"})}),T(A,R)};$e(S,()=>ug,(A,O)=>{O(A,{get class(){return`go-datepicker-input ${i()??""}`},children:E,$$slots:{default:!0}})})}var k=V(S,2);$e(k,()=>yg,(E,A)=>{A(E,{children:(O,F)=>{var R=re(),Y=U(R);{const N=(X,q)=>{let le=()=>q?.().months,he=()=>q?.().weekdays;var j=Vc(),oe=U(j);$e(oe,()=>gc,(fe,ce)=>{ce(fe,{children:(de,G)=>{var Q=wg(),P=U(Q);$e(P,()=>_c,(be,Z)=>{Z(be,{class:"go-datepicker-previous"})});var te=V(P,2);$e(te,()=>yc,(be,Z)=>{Z(be,{class:"go-datepicker-selected-month"})});var L=V(te,2);$e(L,()=>bc,(be,Z)=>{Z(be,{class:"go-datepicker-next"})}),T(de,Q)},$$slots:{default:!0}})});var ee=V(oe,2);Ne(ee,16,le,fe=>fe,(fe,ce)=>{var de=re(),G=U(de);$e(G,()=>fc,(Q,P)=>{P(Q,{children:(te,L)=>{var be=Vc(),Z=U(be);$e(Z,()=>mc,(_e,we)=>{we(_e,{children:(De,Le)=>{var je=re(),bt=U(je);$e(bt,()=>aa,(st,Nt)=>{Nt(st,{children:(_t,Rt)=>{var nr=re(),Ht=U(nr);Ne(Ht,17,he,sn,(vr,Ir)=>{var Pr=re(),yn=U(Pr);$e(yn,()=>vc,(Mr,gr)=>{gr(Mr,{children:(Xr,en)=>{Ot();var xt=Bt();J(()=>H(xt,d(Ir))),T(Xr,xt)},$$slots:{default:!0}})}),T(vr,Pr)}),T(_t,nr)},$$slots:{default:!0}})}),T(De,je)},$$slots:{default:!0}})});var w=V(Z,2);$e(w,()=>hc,(_e,we)=>{we(_e,{children:(De,Le)=>{var je=re(),bt=U(je);Ne(bt,16,()=>ce.weeks,st=>st,(st,Nt)=>{var _t=re(),Rt=U(_t);$e(Rt,()=>aa,(nr,Ht)=>{Ht(nr,{children:(vr,Ir)=>{var Pr=re(),yn=U(Pr);Ne(yn,16,()=>Nt,Mr=>Mr,(Mr,gr,Xr,en)=>{var xt=re(),qn=U(xt);$e(qn,()=>pc,(rs,ns)=>{ns(rs,{get date(){return gr},get month(){return ce.value},children:(fa,ed)=>{var pi=re(),is=U(pi);$e(is,()=>dc,(yr,Un)=>{Un(yr,{})}),T(fa,pi)},$$slots:{default:!0}})}),T(Mr,xt)}),T(vr,Pr)},$$slots:{default:!0}})}),T(st,_t)}),T(De,je)},$$slots:{default:!0}})}),T(te,be)},$$slots:{default:!0}})}),T(fe,de)}),T(X,j)};$e(Y,()=>mg,(X,q)=>{q(X,{children:N,$$slots:{default:!0}})})}T(O,R)},$$slots:{default:!0}})}),T(g,m)},$$slots:{default:!0}})})}return T(e,c),ie(l)}se(kg,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var QP=new Set(["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]),XP=B('<span class="go-field-star" aria-hidden="true">*</span>'),eM=B(" <!>",1),tM=B("<label><!></label> <input/>",1),rM=B("<label><!></label> <textarea></textarea>",1),nM=B('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),iM=B("<label><!></label> <input/> <!>",1),sM=B('<label><input/> <span class="go-checkbox-label"><!></span></label>'),aM=B('<img src="" alt=""/> <option> </option>',1),oM=B('<option disabled="" hidden="" selected=""> </option> <!>',1),lM=B("<!>",1),uM=B("<label><!></label> <select><!></select>",1),cM=B('<img style="width: 60px" aria-hidden="true"/>'),dM=B('<span class="go-payment-mode-icons"></span>'),fM=B('<span class="go-payment-mode-name"> </span>'),hM=B('<label><input type="radio"/> <!></label>'),pM=B('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),mM=B("<label> <input/></label>"),vM=B("<fieldset><legend><!></legend> <!></fieldset>");function Sg(e,t){ne(t,!0);const r=j=>{Ot();var oe=eM(),ee=U(oe),fe=V(ee),ce=de=>{var G=XP();T(de,G)};ue(fe,de=>{u().required&&de(ce)}),J(()=>H(ee,`${d(R)??""} `)),T(j,oe)},n=j=>{var oe=tM(),ee=U(oe);r(M(ee)),I(ee);var fe=V(ee,2);Ue(fe,()=>({...d(F),...m,class:g(),placeholder:u().placeholder,type:u().type,name:u().key}),void 0,void 0,void 0,void 0,!0),J(()=>{St(ee,1,dr(h())),me(ee,"for",d(A))}),qa(fe,()=>u().value,ce=>u(u().value=ce,!0)),T(j,oe)},i=j=>{var oe=rM(),ee=U(oe);r(M(ee)),I(ee);var fe=V(ee,2);Gb(fe),Ue(fe,()=>({...d(F),...m,class:g(),placeholder:u().placeholder,name:u().key})),J(()=>{St(ee,1,dr(h())),me(ee,"for",d(A))}),qa(fe,()=>u().value,ce=>u(u().value=ce,!0)),T(j,oe)},s=j=>{var oe=iM(),ee=U(oe);r(M(ee)),I(ee);var fe=V(ee,2),ce=Q=>{const P=Q.currentTarget.files;u(u().value=P&&P[0]?P[0]:null,!0),d(S)?d(S).validateField(u()):u().validate()};Ue(fe,()=>({...d(F),...m,class:g(),type:"file",accept:"image/*",name:u().key,onchange:ce}),void 0,void 0,void 0,void 0,!0);var de=V(fe,2),G=Q=>{var P=nM(),te=M(P),L=V(te,2),be=M(L,!0);I(L),I(P),J(Z=>{me(P,"data-field-preview",u().key),me(te,"src",d(N)),me(te,"alt",Z),H(be,u().value.name)},[()=>x.t("forms.file.preview_alt")||"User uploaded photo"]),T(Q,P)};ue(de,Q=>{d(N)&&u().value instanceof File&&Q(G)}),J(()=>{St(ee,1,dr(h())),me(ee,"for",d(A))}),T(j,oe)},a=j=>{var oe=sM(),ee=M(oe);Ue(ee,()=>({...d(F),...m,name:u().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var fe=V(ee,2);r(M(fe)),I(fe),I(oe),J(()=>{St(oe,1,dr(h())),me(oe,"for",d(A))}),q_(ee,()=>u().value===!0,ce=>{u(u().value=ce,!0)}),T(j,oe)},o=j=>{var oe=uM(),ee=U(oe);r(M(ee)),I(ee);var fe=V(ee,2);Ue(fe,()=>({...d(F),...m,name:u().key,class:g()})),L_(fe,()=>{var ce=M(fe),de=lM(),G=U(de),Q=P=>{var te=oM(),L=U(te),be=M(L,!0);I(L),L.value=L.__value="";var Z=V(L,2);Ne(Z,17,()=>u().options(),w=>w.value,(w,_e)=>{var we=aM(),De=V(U(we),2),Le=M(De,!0);I(De);var je={};J(()=>{H(Le,d(_e).label),je!==(je=d(_e).value)&&(De.value=(De.__value=d(_e).value)??"")}),T(w,we)}),J(w=>H(be,w),[()=>x.t("common.choose")]),T(P,te)};ue(G,P=>{u().options&&P(Q)}),T(ce,de)}),J(()=>{St(ee,1,dr(h())),me(ee,"for",d(A))}),O_(fe,()=>u().value,ce=>u(u().value=ce,!0)),T(j,oe)},l=j=>{kg(j,{get labelClass(){return h()},get inputClass(){return g()},get labelText(){return r},get dateString(){return u().value},set dateString(oe){u(u().value=oe,!0)}})},c=j=>{const oe=D(()=>x.payment_modes?Object.values(x.payment_modes):[]);var ee=pM(),fe=M(ee);r(M(fe)),I(fe);var ce=V(fe,2);Ne(ce,17,()=>d(oe),de=>de.id,(de,G)=>{var Q=hM(),P=M(Q);Is(P);var te=V(P,2),L=Z=>{var w=dM();Ne(w,20,()=>d(G).icons,_e=>_e,(_e,we)=>{const De=D(()=>Y+we+".svg");var Le=cM();J(()=>{St(Le,1,dr(we)),me(Le,"src",d(De)),me(Le,"alt",we+" icon")}),T(_e,Le)}),I(w),T(Z,w)},be=Z=>{var w=fM(),_e=M(w,!0);I(w),J(()=>H(_e,d(G).name)),T(Z,w)};ue(te,Z=>{d(G).icons.length>0?Z(L):Z(be,-1)}),I(Q),J((Z,w,_e)=>{me(P,"name",u().key),Ul(P,Z),$_(P,w),me(P,"hidden",d(oe).length===1),me(P,"aria-label",_e)},[()=>String(d(G).id),()=>u().value===String(d(G).id),()=>x.t(`cart.paymentMode.ariaLabel.${d(G).name.toLowerCase()}`)]),pt("change",P,()=>{u(u().value=String(d(G).id),!0)}),T(de,Q)}),I(ee),J(()=>{me(ee,"aria-required",u().required),me(ee,"aria-invalid",u().errors.length>0)}),T(j,ee)},f=j=>{var oe=vM(),ee=M(oe);r(M(ee)),I(ee);var fe=V(ee,2),ce=de=>{var G=re(),Q=U(G);Ne(Q,17,()=>u().options(),P=>P.value,(P,te)=>{var L=mM(),be=M(L),Z=V(be);Ue(Z,()=>({...d(F),...m,class:g(),type:"radio"}),void 0,void 0,void 0,void 0,!0),I(L),J(()=>{St(L,1,dr(h())),me(L,"for",d(A)+d(te).value),H(be,`${d(te).label??""} `)}),qa(Z,()=>u().value,w=>u(u().value=w,!0)),T(P,L)}),T(de,G)};ue(fe,de=>{u().options&&de(ce)}),I(oe),T(j,oe)};let u=_(t,"field",15),p=_(t,"describedByIds",7),h=_(t,"labelClass",7),g=_(t,"inputClass",7),v=_(t,"host",7),m=He(t,QP);const y=Ni(v()),S=D(()=>y.value),k={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:a,select:o,radio:f,date:l,file:s,textarea:i,paymentMode:c},E=D(()=>k[u().type]);let A=D(()=>t.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function O(){u().type!=="checkbox"&&u().value&&(d(S)?d(S).validateField(u()):u().validate())}const F=D(()=>({id:d(A),"aria-describedby":p(),"aria-required":u().required,"aria-invalid":u().errors.length>0,autocomplete:u().autocomplete,onblur:O}));let R=D(()=>x.t(u().label)||u().label);const Y="https://cdn.shop.platform.gomus.de/";ve(()=>{if(u().type!=="paymentMode")return;const j=x.payment_modes?Object.values(x.payment_modes):[];j.length===1&&u().value===""&&u(u().value=String(j[0].id),!0)});let N=ae(null);ve(()=>{const j=u().value;if(j instanceof File&&j.type.startsWith("image/")){const oe=URL.createObjectURL(j);return $(N,oe,!0),()=>{URL.revokeObjectURL(oe),$(N,null)}}$(N,null)});var X={get field(){return u()},set field(j){u(j),b()},get describedByIds(){return p()},set describedByIds(j){p(j),b()},get labelClass(){return h()},set labelClass(j){h(j),b()},get inputClass(){return g()},set inputClass(j){g(j),b()},get host(){return v()},set host(j){v(j),b()}},q=re(),le=U(q),he=j=>{var oe=re(),ee=U(oe);Se(ee,()=>d(E)),T(j,oe)};return ue(le,j=>{d(E)&&j(he)}),T(e,q),ie(X)}cr(["change"]),se(Sg,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var gM=B("<span> </span>"),yM=B("<li> </li>"),bM=B('<ul class="go-field-errors"></ul>'),_M=B("<!> <!> <!>",1);function wM(e,t){ne(t,!0);let r=_(t,"key",7),n=_(t,"required",7,!1),i=_(t,"labelClass",7),s=_(t,"inputClass",7),a=ae(Me(Pt.createField(r(),n())));const o=Ni(t.$$host),l=D(()=>o.value),c=()=>d(a);let f=D(()=>d(a)?[...d(a).errors,...d(a).apiErrors].map(F=>x.t(F)):[]),u=D(()=>d(a)?.description),p=D(()=>d(f).length>0),h=D(()=>`go-description-${r()}-${Math.floor(Math.random()*100)}`),g=D(()=>`go-errors-${r()}-${Math.floor(Math.random()*100)}`),v=D(()=>[d(u)&&d(h),d(p)&&d(g)].filter(Boolean).join(" ")||void 0);ve(()=>{t.$$host.classList.toggle("go-field",!0),t.$$host.classList.toggle("is-invalid",d(f).length>0)}),t.$$host.dataset.testid=r(),ve(()=>{d(a)&&(d(a).mounted=!0,d(a).value,Re(()=>{d(a)?.errors.length&&d(l).validateField(d(a))}))});var m={getField:c,get key(){return r()},set key(F){r(F),b()},get required(){return n()},set required(F=!1){n(F),b()},get labelClass(){return i()},set labelClass(F){i(F),b()},get inputClass(){return s()},set inputClass(F){s(F),b()}},y=_M(),S=U(y);Sg(S,{get describedByIds(){return d(v)},get labelClass(){return i()},get inputClass(){return s()},host:t.$$host,get field(){return d(a)},set field(F){$(a,F,!0)}});var k=V(S,2),E=F=>{var R=gM(),Y=M(R,!0);I(R),J(()=>{me(R,"id",d(h)),H(Y,d(a).description)}),T(F,R)};ue(k,F=>{d(u)&&F(E)});var A=V(k,2),O=F=>{var R=bM();Ne(R,21,()=>d(f),sn,(Y,N)=>{var X=yM(),q=M(X,!0);I(X),J(()=>H(q,d(N))),T(Y,X)}),I(R),J(()=>me(R,"id",d(g))),T(F,R)};return ue(A,F=>{d(p)&&F(O)}),T(e,y),ie(m)}customElements.define("go-field",se(wM,{key:{attribute:"key",reflect:!0,type:"String"},required:{attribute:"required",reflect:!0,type:"Boolean"},labelClass:{attribute:"label-class",reflect:!0,type:"String"},inputClass:{attribute:"input-class",reflect:!0,type:"String"}},[],["getField"]));var kM=B("<go-field></go-field>",2);function SM(e,t){ne(t,!0);let r=Ni(t.$$host),n=D(()=>r.value),i=D(()=>d(n)?Pt.getFormFields(d(n)?.formId):[]);var s=re(),a=U(s);Ne(a,17,()=>d(i),o=>o.key,(o,l)=>{var c=kM();J(()=>xn(c,"key",d(l).key)),J(()=>xn(c,"required",d(l).required)),T(o,c)}),T(e,s),ie()}customElements.define("go-all-fields",se(SM,{},[],[]));var EM=B('<p aria-hidden="true"> </p>'),TM=B("<li> </li>"),xM=B('<ul class="go-error-feedback-api-errors"></ul>'),AM=B('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function CM(e,t){ne(t,!0);const r=Ni(t.$$host),n=D(()=>r.value);ve(()=>{d(n)?.form?.addEventListener("go-after-validation",()=>{$(a,Nu(d(n)?.fields),!0)})});let i=ae(0);setInterval(()=>{$(i,Nu(d(n)?.fields)||0,!0)},100);let s=D(()=>d(i)+(d(n)?.apiErrors?.length||0)),a=ae(-1);ve(()=>{t.$$host.classList.toggle("is-invalid",d(s)>0),t.$$host.classList.toggle("go-feedback",!0),t.$$host.setAttribute("data-num-errors",d(s).toString())});var o=AM(),l=M(o),c=M(l),f=m=>{var y=Bt();J(S=>H(y,S),[()=>x.t("forms.errorSummary",{count:d(a)})]),T(m,y)};ue(c,m=>{d(a)>0&&m(f)}),I(l);var u=V(l,2),p=m=>{var y=EM(),S=M(y,!0);I(y),J(k=>H(S,k),[()=>x.t("forms.errorSummary",{count:d(i)})]),T(m,y)};ue(u,m=>{d(i)>0&&m(p)});var h=V(u,2),g=m=>{var y=xM();Ne(y,21,()=>d(n)?.apiErrors,sn,(S,k)=>{var E=TM(),A=M(E,!0);I(E),J(()=>H(A,d(k))),T(S,E)}),I(y),T(m,y)},v=D(()=>d(n)&&Xl(d(n).apiErrors)&&d(n).apiErrors.length>0);ue(h,m=>{d(v)&&m(g)}),I(o),T(e,o),ie()}customElements.define("go-errors-feedback",se(CM,{},[],[]));var OM=B('<div class="go-form-feedback"><!></div>');function DM(e,t){var r=OM(),n=M(r);E_(n,t,"default",{},null),I(r),T(e,r)}customElements.define("go-form-feedback",se(DM,{},["default"],[]));function IM(e,t){ne(t,!0);let r=_(t,"buttonClass",7,"");return En(()=>{Hr(t.$$host,"button",{type:"submit",class:r()})}),ie({get buttonClass(){return r()},set buttonClass(n=""){r(n),b()}})}customElements.define("go-submit",se(IM,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var PM=B('<div aria-live="assertive"> </div>');function MM(e,t){ne(t,!0);const r=Ni(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=PM();let c;var f=M(l,!0);I(l),J(()=>{c=St(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":d(n).successMessage}),H(f,d(n)?.successMessage)}),T(o,l)};ue(s,o=>{d(n)?.successMessage&&o(a)}),T(e,i),ie()}customElements.define("go-success-feedback",se(MM,{},[],[]));var mr="INUMBER",Ki="IOP1",Yi="IOP2",Ji="IOP3",fn="IVAR",ui="IVARNAME",Qi="IFUNCALL",Zo="IFUNDEF",Wt="IEXPR",jc="IEXPREVAL",ci="IMEMBER",Wo="IENDSTATEMENT",Xi="IARRAY";function Fe(e,t){this.type=e,this.value=t??0}Fe.prototype.toString=function(){switch(this.type){case mr:case Ki:case Yi:case Ji:case fn:case ui:case Wo:return this.value;case Qi:return"CALL "+this.value;case Zo:return"DEF "+this.value;case Xi:return"ARRAY "+this.value;case ci:return"."+this.value;default:return"Invalid Instruction"}};function Ho(e){return new Fe(Ki,e)}function hn(e){return new Fe(Yi,e)}function Eg(e){return new Fe(Ji,e)}function Zc(e,t,r,n,i){for(var s=[],a=[],o,l,c,f,u=0;u<e.length;u++){var p=e[u],h=p.type;if(h===mr||h===ui)Array.isArray(p.value)?s.push.apply(s,Zc(p.value.map(function(g){return new Fe(mr,g)}).concat(new Fe(Xi,p.value.length)),t,r,n,i)):s.push(p);else if(h===fn&&i.hasOwnProperty(p.value))p=new Fe(mr,i[p.value]),s.push(p);else if(h===Yi&&s.length>1)l=s.pop(),o=s.pop(),f=r[p.value],p=new Fe(mr,f(o.value,l.value)),s.push(p);else if(h===Ji&&s.length>2)c=s.pop(),l=s.pop(),o=s.pop(),p.value==="?"?s.push(o.value?l.value:c.value):(f=n[p.value],p=new Fe(mr,f(o.value,l.value,c.value)),s.push(p));else if(h===Ki&&s.length>0)o=s.pop(),f=t[p.value],p=new Fe(mr,f(o.value)),s.push(p);else if(h===Wt){for(;s.length>0;)a.push(s.shift());a.push(new Fe(Wt,Zc(p.value,t,r,n,i)))}else if(h===ci&&s.length>0)o=s.pop(),s.push(new Fe(mr,o.value[p.value]));else{for(;s.length>0;)a.push(s.shift());a.push(p)}}for(;s.length>0;)a.push(s.shift());return a}function Tg(e,t,r){for(var n=[],i=0;i<e.length;i++){var s=e[i],a=s.type;if(a===fn&&s.value===t)for(var o=0;o<r.tokens.length;o++){var l=r.tokens[o],c;l.type===Ki?c=Ho(l.value):l.type===Yi?c=hn(l.value):l.type===Ji?c=Eg(l.value):c=new Fe(l.type,l.value),n.push(c)}else a===Wt?n.push(new Fe(Wt,Tg(s.value,t,r))):n.push(s)}return n}function di(e,t,r){var n=[],i,s,a,o,l,c;if(Wc(e))return pn(e,r);for(var f=e.length,u=0;u<f;u++){var p=e[u],h=p.type;if(h===mr||h===ui)n.push(p.value);else if(h===Yi)s=n.pop(),i=n.pop(),p.value==="and"?n.push(i?!!di(s,t,r):!1):p.value==="or"?n.push(i?!0:!!di(s,t,r)):p.value==="="?(o=t.binaryOps[p.value],n.push(o(i,di(s,t,r),r))):(o=t.binaryOps[p.value],n.push(o(pn(i,r),pn(s,r))));else if(h===Ji)a=n.pop(),s=n.pop(),i=n.pop(),p.value==="?"?n.push(di(i?s:a,t,r)):(o=t.ternaryOps[p.value],n.push(o(pn(i,r),pn(s,r),pn(a,r))));else if(h===fn)if(p.value in t.functions)n.push(t.functions[p.value]);else if(p.value in t.unaryOps&&t.parser.isOperatorEnabled(p.value))n.push(t.unaryOps[p.value]);else{var g=r[p.value];if(g!==void 0)n.push(g);else throw new Error("undefined variable: "+p.value)}else if(h===Ki)i=n.pop(),o=t.unaryOps[p.value],n.push(o(pn(i,r)));else if(h===Qi){for(c=p.value,l=[];c-- >0;)l.unshift(pn(n.pop(),r));if(o=n.pop(),o.apply&&o.call)n.push(o.apply(void 0,l));else throw new Error(o+" is not a function")}else if(h===Zo)n.push((function(){for(var v=n.pop(),m=[],y=p.value;y-- >0;)m.unshift(n.pop());var S=n.pop(),k=function(){for(var E=Object.assign({},r),A=0,O=m.length;A<O;A++)E[m[A]]=arguments[A];return di(v,t,E)};return Object.defineProperty(k,"name",{value:S,writable:!1}),r[S]=k,k})());else if(h===Wt)n.push($M(p,t));else if(h===jc)n.push(p);else if(h===ci)i=n.pop(),n.push(i[p.value]);else if(h===Wo)n.pop();else if(h===Xi){for(c=p.value,l=[];c-- >0;)l.unshift(n.pop());n.push(l)}else throw new Error("invalid Expression")}if(n.length>1)throw new Error("invalid Expression (parity)");return n[0]===0?0:pn(n[0],r)}function $M(e,t,r){return Wc(e)?e:{type:jc,value:function(n){return di(e.value,t,n)}}}function Wc(e){return e&&e.type===jc}function pn(e,t){return Wc(e)?e.value(t):e}function Hc(e,t){for(var r=[],n,i,s,a,o,l,c=0;c<e.length;c++){var f=e[c],u=f.type;if(u===mr)typeof f.value=="number"&&f.value<0?r.push("("+f.value+")"):Array.isArray(f.value)?r.push("["+f.value.map(xg).join(", ")+"]"):r.push(xg(f.value));else if(u===Yi)i=r.pop(),n=r.pop(),a=f.value,t?a==="^"?r.push("Math.pow("+n+", "+i+")"):a==="and"?r.push("(!!"+n+" && !!"+i+")"):a==="or"?r.push("(!!"+n+" || !!"+i+")"):a==="||"?r.push("(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }(("+n+"),("+i+")))"):a==="=="?r.push("("+n+" === "+i+")"):a==="!="?r.push("("+n+" !== "+i+")"):a==="["?r.push(n+"[("+i+") | 0]"):r.push("("+n+" "+a+" "+i+")"):a==="["?r.push(n+"["+i+"]"):r.push("("+n+" "+a+" "+i+")");else if(u===Ji)if(s=r.pop(),i=r.pop(),n=r.pop(),a=f.value,a==="?")r.push("("+n+" ? "+i+" : "+s+")");else throw new Error("invalid Expression");else if(u===fn||u===ui)r.push(f.value);else if(u===Ki)n=r.pop(),a=f.value,a==="-"||a==="+"?r.push("("+a+n+")"):t?a==="not"?r.push("(!"+n+")"):a==="!"?r.push("fac("+n+")"):r.push(a+"("+n+")"):a==="!"?r.push("("+n+"!)"):r.push("("+a+" "+n+")");else if(u===Qi){for(l=f.value,o=[];l-- >0;)o.unshift(r.pop());a=r.pop(),r.push(a+"("+o.join(", ")+")")}else if(u===Zo){for(i=r.pop(),l=f.value,o=[];l-- >0;)o.unshift(r.pop());n=r.pop(),t?r.push("("+n+" = function("+o.join(", ")+") { return "+i+" })"):r.push("("+n+"("+o.join(", ")+") = "+i+")")}else if(u===ci)n=r.pop(),r.push(n+"."+f.value);else if(u===Xi){for(l=f.value,o=[];l-- >0;)o.unshift(r.pop());r.push("["+o.join(", ")+"]")}else if(u===Wt)r.push("("+Hc(f.value,t)+")");else if(u!==Wo)throw new Error("invalid Expression")}return r.length>1&&(t?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function xg(e){return typeof e=="string"?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}function es(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}function Gc(e,t,r){r=r||{};for(var n=!!r.withMembers,i=null,s=0;s<e.length;s++){var a=e[s];a.type===fn||a.type===ui?!n&&!es(t,a.value)?t.push(a.value):(i!==null&&(es(t,i)||t.push(i)),i=a.value):a.type===ci&&n&&i!==null?i+="."+a.value:a.type===Wt?Gc(a.value,t,r):i!==null&&(es(t,i)||t.push(i),i=null)}i!==null&&!es(t,i)&&t.push(i)}function Dr(e,t){this.tokens=e,this.parser=t,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.functions=t.functions}Dr.prototype.simplify=function(e){return e=e||{},new Dr(Zc(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,e),this.parser)},Dr.prototype.substitute=function(e,t){return t instanceof Dr||(t=this.parser.parse(String(t))),new Dr(Tg(this.tokens,e,t),this.parser)},Dr.prototype.evaluate=function(e){return e=e||{},di(this.tokens,this,e)},Dr.prototype.toString=function(){return Hc(this.tokens,!1)},Dr.prototype.symbols=function(e){e=e||{};var t=[];return Gc(this.tokens,t,e),t},Dr.prototype.variables=function(e){e=e||{};var t=[];Gc(this.tokens,t,e);var r=this.functions;return t.filter(function(n){return!(n in r)})},Dr.prototype.toJSFunction=function(e,t){var r=this,n=new Function(e,"with(this.functions) with (this.ternaryOps) with (this.binaryOps) with (this.unaryOps) { return "+Hc(this.simplify(t).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var ua="TEOF",Ge="TOP",Go="TNUMBER",Ag="TSTRING",mn="TPAREN",ts="TBRACKET",Ko="TCOMMA",Kc="TNAME",Yc="TSEMICOLON";function Cg(e,t,r){this.type=e,this.value=t,this.index=r}Cg.prototype.toString=function(){return this.type+": "+this.value};function it(e,t){this.pos=0,this.current=null,this.unaryOps=e.unaryOps,this.binaryOps=e.binaryOps,this.ternaryOps=e.ternaryOps,this.consts=e.consts,this.expression=t,this.savedPosition=0,this.savedCurrent=null,this.options=e.options,this.parser=e}it.prototype.newToken=function(e,t,r){return new Cg(e,t,r??this.pos)},it.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},it.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},it.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(ua,"EOF");if(this.isWhitespace()||this.isComment())return this.next();if(this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isBracket()||this.isComma()||this.isSemicolon()||this.isNamedOp()||this.isConst()||this.isName())return this.current;this.parseError('Unknown character "'+this.expression.charAt(this.pos)+'"')},it.prototype.isString=function(){var e=!1,t=this.pos,r=this.expression.charAt(t);if(r==="'"||r==='"')for(var n=this.expression.indexOf(r,t+1);n>=0&&this.pos<this.expression.length;){if(this.pos=n+1,this.expression.charAt(n-1)!=="\\"){var i=this.expression.substring(t+1,n);this.current=this.newToken(Ag,this.unescape(i),t),e=!0;break}n=this.expression.indexOf(r,n+1)}return e},it.prototype.isParen=function(){var e=this.expression.charAt(this.pos);return e==="("||e===")"?(this.current=this.newToken(mn,e),this.pos++,!0):!1},it.prototype.isBracket=function(){var e=this.expression.charAt(this.pos);return(e==="["||e==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(ts,e),this.pos++,!0):!1},it.prototype.isComma=function(){return this.expression.charAt(this.pos)===","?(this.current=this.newToken(Ko,","),this.pos++,!0):!1},it.prototype.isSemicolon=function(){return this.expression.charAt(this.pos)===";"?(this.current=this.newToken(Yc,";"),this.pos++,!0):!1},it.prototype.isConst=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||r!=="_"&&r!=="."&&(r<"0"||r>"9")))break}if(t>e){var n=this.expression.substring(e,t);if(n in this.consts)return this.current=this.newToken(Go,this.consts[n]),this.pos+=n.length,!0}return!1},it.prototype.isNamedOp=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||r!=="_"&&(r<"0"||r>"9")))break}if(t>e){var n=this.expression.substring(e,t);if(this.isOperatorEnabled(n)&&(n in this.binaryOps||n in this.unaryOps||n in this.ternaryOps))return this.current=this.newToken(Ge,n),this.pos+=n.length,!0}return!1},it.prototype.isName=function(){for(var e=this.pos,t=e,r=!1;t<this.expression.length;t++){var n=this.expression.charAt(t);if(n.toUpperCase()===n.toLowerCase()){if(t===this.pos&&(n==="$"||n==="_")){n==="_"&&(r=!0);continue}else if(t===this.pos||!r||n!=="_"&&(n<"0"||n>"9"))break}else r=!0}if(r){var i=this.expression.substring(e,t);return this.current=this.newToken(Kc,i),this.pos+=i.length,!0}return!1},it.prototype.isWhitespace=function(){for(var e=!1,t=this.expression.charAt(this.pos);(t===" "||t===" "||t===`
82
+ `||t==="\r")&&(e=!0,this.pos++,!(this.pos>=this.expression.length));)t=this.expression.charAt(this.pos);return e};var FM=/^[0-9a-f]{4}$/i;it.prototype.unescape=function(e){var t=e.indexOf("\\");if(t<0)return e;for(var r=e.substring(0,t);t>=0;){var n=e.charAt(++t);switch(n){case"'":r+="'";break;case'"':r+='"';break;case"\\":r+="\\";break;case"/":r+="/";break;case"b":r+="\b";break;case"f":r+="\f";break;case"n":r+=`
83
+ `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"u":var i=e.substring(t+1,t+5);FM.test(i)||this.parseError("Illegal escape sequence: \\u"+i),r+=String.fromCharCode(parseInt(i,16)),t+=4;break;default:throw this.parseError('Illegal escape sequence: "\\'+n+'"')}++t;var s=e.indexOf("\\",t);r+=e.substring(t,s<0?e.length:s),t=s}return r},it.prototype.isComment=function(){return this.expression.charAt(this.pos)==="/"&&this.expression.charAt(this.pos+1)==="*"?(this.pos=this.expression.indexOf("*/",this.pos)+2,this.pos===1&&(this.pos=this.expression.length),!0):!1},it.prototype.isRadixInteger=function(){var e=this.pos;if(e>=this.expression.length-2||this.expression.charAt(e)!=="0")return!1;++e;var t,r;if(this.expression.charAt(e)==="x")t=16,r=/^[0-9a-f]$/i,++e;else if(this.expression.charAt(e)==="b")t=2,r=/^[01]$/i,++e;else return!1;for(var n=!1,i=e;e<this.expression.length;){var s=this.expression.charAt(e);if(r.test(s))e++,n=!0;else break}return n&&(this.current=this.newToken(Go,parseInt(this.expression.substring(i,e),t)),this.pos=e),n},it.prototype.isNumber=function(){for(var e=!1,t=this.pos,r=t,n=t,i=!1,s=!1,a;t<this.expression.length&&(a=this.expression.charAt(t),a>="0"&&a<="9"||!i&&a===".");)a==="."?i=!0:s=!0,t++,e=s;if(e&&(n=t),a==="e"||a==="E"){t++;for(var o=!0,l=!1;t<this.expression.length;){if(a=this.expression.charAt(t),o&&(a==="+"||a==="-"))o=!1;else if(a>="0"&&a<="9")l=!0,o=!1;else break;t++}l||(t=n)}return e?(this.current=this.newToken(Go,parseFloat(this.expression.substring(r,t))),this.pos=t):this.pos=n,e},it.prototype.isOperator=function(){var e=this.pos,t=this.expression.charAt(this.pos);if(t==="+"||t==="-"||t==="*"||t==="/"||t==="%"||t==="^"||t==="?"||t===":"||t===".")this.current=this.newToken(Ge,t);else if(t==="∙"||t==="•")this.current=this.newToken(Ge,"*");else if(t===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ge,">="),this.pos++):this.current=this.newToken(Ge,">");else if(t==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ge,"<="),this.pos++):this.current=this.newToken(Ge,"<");else if(t==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(Ge,"||"),this.pos++;else return!1;else if(t==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ge,"=="),this.pos++):this.current=this.newToken(Ge,t);else if(t==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ge,"!="),this.pos++):this.current=this.newToken(Ge,t);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=e,!1)},it.prototype.isOperatorEnabled=function(e){return this.parser.isOperatorEnabled(e)},it.prototype.getCoordinates=function(){var e=0,t,r=-1;do e++,t=this.pos-r,r=this.expression.indexOf(`
84
+ `,r+1);while(r>=0&&r<this.pos);return{line:e,column:t}},it.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)};function Ye(e,t,r){this.parser=e,this.tokens=t,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=r.allowMemberAccess!==!1}Ye.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},Ye.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?es(t,e.value):typeof t=="function"?t(e):e.value===t},Ye.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},Ye.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},Ye.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},Ye.prototype.expect=function(e,t){if(!this.accept(e,t)){var r=this.tokens.getCoordinates();throw new Error("parse error ["+r.line+":"+r.column+"]: Expected "+(t||e))}},Ye.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.accept(Kc)||this.accept(Ge,r))e.push(new Fe(fn,this.current.value));else if(this.accept(Go))e.push(new Fe(mr,this.current.value));else if(this.accept(Ag))e.push(new Fe(mr,this.current.value));else if(this.accept(mn,"("))this.parseExpression(e),this.expect(mn,")");else if(this.accept(ts,"["))if(this.accept(ts,"]"))e.push(new Fe(Xi,0));else{var n=this.parseArrayList(e);e.push(new Fe(Xi,n))}else throw new Error("unexpected "+this.nextToken)},Ye.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},Ye.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},Ye.prototype.parseUntilEndStatement=function(e,t){return this.accept(Yc)?(this.nextToken&&this.nextToken.type!==ua&&!(this.nextToken.type===mn&&this.nextToken.value===")")&&t.push(new Fe(Wo)),this.nextToken.type!==ua&&this.parseExpression(t),e.push(new Fe(Wt,t)),!0):!1},Ye.prototype.parseArrayList=function(e){for(var t=0;!this.accept(ts,"]");)for(this.parseExpression(e),++t;this.accept(Ko);)this.parseExpression(e),++t;return t},Ye.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(Ge,"=");){var t=e.pop(),r=[],n=e.length-1;if(t.type===Qi){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=t.value+1;i<s;i++){var a=n-i;e[a].type===fn&&(e[a]=new Fe(ui,e[a].value))}this.parseVariableAssignmentExpression(r),e.push(new Fe(Wt,r)),e.push(new Fe(Zo,t.value));continue}if(t.type!==fn&&t.type!==ci)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),e.push(new Fe(ui,t.value)),e.push(new Fe(Wt,r)),e.push(hn("="))}},Ye.prototype.parseConditionalExpression=function(e){for(this.parseOrExpression(e);this.accept(Ge,"?");){var t=[],r=[];this.parseConditionalExpression(t),this.expect(Ge,":"),this.parseConditionalExpression(r),e.push(new Fe(Wt,t)),e.push(new Fe(Wt,r)),e.push(Eg("?"))}},Ye.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(Ge,"or");){var t=[];this.parseAndExpression(t),e.push(new Fe(Wt,t)),e.push(hn("or"))}},Ye.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(Ge,"and");){var t=[];this.parseComparison(t),e.push(new Fe(Wt,t)),e.push(hn("and"))}};var NM=["==","!=","<","<=",">=",">","in"];Ye.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(Ge,NM);){var t=this.current;this.parseAddSub(e),e.push(hn(t.value))}};var RM=["+","-","||"];Ye.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(Ge,RM);){var t=this.current;this.parseTerm(e),e.push(hn(t.value))}};var LM=["*","/","%"];Ye.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(Ge,LM);){var t=this.current;this.parseFactor(e),e.push(hn(t.value))}},Ye.prototype.parseFactor=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.save(),this.accept(Ge,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===mn&&this.nextToken.value==="("){this.restore(),this.parseExponential(e);return}else if(this.nextToken.type===Yc||this.nextToken.type===Ko||this.nextToken.type===ua||this.nextToken.type===mn&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var n=this.current;this.parseFactor(e),e.push(Ho(n.value))}else this.parseExponential(e)},Ye.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(Ge,"^");)this.parseFactor(e),e.push(hn("^"))},Ye.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(Ge,"!");)e.push(Ho("!"))},Ye.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function r(s){return s.value in t}if(this.accept(Ge,r)){var n=this.current;this.parseAtom(e),e.push(Ho(n.value))}else for(this.parseMemberExpression(e);this.accept(mn,"(");)if(this.accept(mn,")"))e.push(new Fe(Qi,0));else{var i=this.parseArgumentList(e);e.push(new Fe(Qi,i))}},Ye.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(mn,")");)for(this.parseExpression(e),++t;this.accept(Ko);)this.parseExpression(e),++t;return t},Ye.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(Ge,".")||this.accept(ts,"[");){var t=this.current;if(t.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(Kc),e.push(new Fe(ci,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(ts,"]"),e.push(hn("["))}else throw new Error("unexpected symbol: "+t.value)}};function zM(e,t){return Number(e)+Number(t)}function qM(e,t){return e-t}function UM(e,t){return e*t}function BM(e,t){return e/t}function VM(e,t){return e%t}function jM(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function ZM(e,t){return e===t}function WM(e,t){return e!==t}function HM(e,t){return e>t}function GM(e,t){return e<t}function KM(e,t){return e>=t}function YM(e,t){return e<=t}function JM(e,t){return!!(e&&t)}function QM(e,t){return!!(e||t)}function XM(e,t){return es(t,e)}function e$(e){return(Math.exp(e)-Math.exp(-e))/2}function t$(e){return(Math.exp(e)+Math.exp(-e))/2}function r$(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function n$(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function i$(e){return Math.log(e+Math.sqrt(e*e-1))}function s$(e){return Math.log((1+e)/(1-e))/2}function Og(e){return Math.log(e)*Math.LOG10E}function a$(e){return-e}function o$(e){return!e}function l$(e){return e<0?Math.ceil(e):Math.floor(e)}function u$(e){return Math.random()*(e||1)}function Dg(e){return Qc(e+1)}function c$(e){return isFinite(e)&&e===Math.round(e)}var d$=4.7421875,Jc=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function Qc(e){var t,r;if(c$(e)){if(e<=0)return isFinite(e)?1/0:NaN;if(e>171)return 1/0;for(var n=e-2,i=e-1;n>1;)i*=n,n--;return i===0&&(i=1),i}if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*Qc(1-e));if(e>=171.35)return 1/0;if(e>85){var s=e*e,a=s*e,o=a*e,l=o*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*s)-139/(51840*a)-571/(2488320*o)+163879/(209018880*l)+5246819/(75246796800*l*e))}--e,r=Jc[0];for(var c=1;c<Jc.length;++c)r+=Jc[c]/(e+c);return t=e+d$+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function f$(e){return Array.isArray(e)?e.length:String(e).length}function Ig(){for(var e=0,t=0,r=0;r<arguments.length;r++){var n=Math.abs(arguments[r]),i;t<n?(i=t/n,e=e*i*i+1,t=n):n>0?(i=n/t,e+=i*i):e+=n}return t===1/0?1/0:t*Math.sqrt(e)}function Pg(e,t,r){return e?t:r}function h$(e,t){return typeof t>"u"||+t==0?Math.round(e):(e=+e,t=-+t,isNaN(e)||!(typeof t=="number"&&t%1===0)?NaN:(e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=e.toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}function p$(e,t,r){return r&&(r[e]=t),t}function m$(e,t){return e[t|0]}function v$(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function g$(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function y$(e,t){if(typeof e!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(t))throw new Error("Second argument to map is not an array");return t.map(function(r,n){return e(r,n)})}function b$(e,t,r){if(typeof e!="function")throw new Error("First argument to fold is not a function");if(!Array.isArray(r))throw new Error("Second argument to fold is not an array");return r.reduce(function(n,i,s){return e(n,i,s)},t)}function _$(e,t){if(typeof e!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(t))throw new Error("Second argument to filter is not an array");return t.filter(function(r,n){return e(r,n)})}function w$(e,t){if(!(Array.isArray(t)||typeof t=="string"))throw new Error("Second argument to indexOf is not a string or array");return t.indexOf(e)}function k$(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function S$(e){return(e>0)-(e<0)||+e}var Mg=1/3;function E$(e){return e<0?-Math.pow(-e,Mg):Math.pow(e,Mg)}function T$(e){return Math.exp(e)-1}function x$(e){return Math.log(1+e)}function A$(e){return Math.log(e)/Math.LN2}function fi(e){this.options=e||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||e$,cosh:Math.cosh||t$,tanh:Math.tanh||r$,asinh:Math.asinh||n$,acosh:Math.acosh||i$,atanh:Math.atanh||s$,sqrt:Math.sqrt,cbrt:Math.cbrt||E$,log:Math.log,log2:Math.log2||A$,ln:Math.log,lg:Math.log10||Og,log10:Math.log10||Og,expm1:Math.expm1||T$,log1p:Math.log1p||x$,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||l$,"-":a$,"+":Number,exp:Math.exp,not:o$,length:f$,"!":Dg,sign:Math.sign||S$},this.binaryOps={"+":zM,"-":qM,"*":UM,"/":BM,"%":VM,"^":Math.pow,"||":jM,"==":ZM,"!=":WM,">":HM,"<":GM,">=":KM,"<=":YM,and:JM,or:QM,in:XM,"=":p$,"[":m$},this.ternaryOps={"?":Pg},this.functions={random:u$,fac:Dg,min:g$,max:v$,hypot:Math.hypot||Ig,pyt:Math.hypot||Ig,pow:Math.pow,atan2:Math.atan2,if:Pg,gamma:Qc,roundTo:h$,map:y$,fold:b$,filter:_$,indexOf:w$,join:k$},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}fi.prototype.parse=function(e){var t=[],r=new Ye(this,new it(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(ua,"EOF"),new Dr(t,this)},fi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var $g=new fi;fi.parse=function(e){return $g.parse(e)},fi.evaluate=function(e,t){return $g.parse(e).evaluate(t)};var Fg={"+":"add","-":"subtract","*":"multiply","/":"divide","%":"remainder","^":"power","!":"factorial","<":"comparison",">":"comparison","<=":"comparison",">=":"comparison","==":"comparison","!=":"comparison","||":"concatenate",and:"logical",or:"logical",not:"logical","?":"conditional",":":"conditional","=":"assignment","[":"array","()=":"fndef"};function C$(e){return Fg.hasOwnProperty(e)?Fg[e]:e}fi.prototype.isOperatorEnabled=function(e){var t=C$(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var O$=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,D$=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,I$=/(__optional\("[^"]+"\))\.length\b/g,P$=new fi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),Ng=new Map;function M$(e){return e.replace(O$,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace(D$,(t,r)=>`__length(${r})`).replace(I$,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function $$(e){const t=Ng.get(e);if(t)return t;const r=P$.parse(M$(e));return Ng.set(e,r),r}function F$(e,t){if(e==null||typeof e!="string")return e;const r={data:t,undefined:void 0,null:null};r.__optional=n=>n.split(".").reduce((i,s)=>{if(i!=null)return i[s]},r),r.__length=n=>{if(n!=null){if(typeof n=="string"||Array.isArray(n))return n.length;if(typeof n=="object"&&"length"in n){const i=n.length;return typeof i=="number"?i:void 0}}};try{const n=$$(e);for(const i of n.symbols()){if(r[i]!==void 0)continue;const s=globalThis[i];typeof s=="function"&&(r[i]=s)}return n.evaluate(r)}catch(n){console.error(`Error while evaluating when (${e}) in go-if: ${n.message}`)}}var Rg=["ticket:timeslot","ticket:day","ticket:annual","event:admission","event:admission:day","event:admission:timeslot","event:price","events:admission","events:admission:day","events:admission:timeslot","events:price","coupon"],N$=7200*1e3;async function vn(e,t){if(!e.withContent)return;const r=t.map(n=>n.id).filter(n=>typeof n=="number");if(r.length)try{const n=await x.asyncFetch(()=>x.ticketsContent(r))??[],i=new Map(n.map(s=>[s.id,s.content]));for(const s of t){if(typeof s.id!="number")continue;const a=i.get(s.id);a&&(s.content=a)}}catch{}}function Yo(e,t){x.capacityManager.addQuotas(t),e.timeslotTicketIds=[...e.timeslotTicketIds,...Object.values(t).flatMap(r=>r.ticket_ids)]}function Jo(e,t,r){const n=Date.parse(r);return e.filter(i=>{const s=i.start_time.slice(0,10),a=Date.parse(i.start_time);return s===t&&a>=n&&a<=n+N$&&(i.seats?.available??0)>0})}async function Qo(e){if(!e?.selectedDate)return;const{quotas:t}=await x.asyncFetch(()=>x.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),"by_ticket_types[]":["time_slot"],"by_museum_ids[]":e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds}));Yo(e,t)}var R$={name:"ticket:timeslot",calendarEndpoint:"tickets",apiToken:"time_slot",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.selectedDate)return;const{quotas:t}=await x.asyncFetch(()=>x.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds}));Yo(e,t)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTimeslot)return;const{tickets:r,quotas:n}=await x.asyncFetch(()=>x.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));x.capacityManager.addQuotas(n);const i=Bs(Vs(r,t.selectedTime),t.selectedTime);await vn(e,i);for(const s of i)e.preCart.addItem(ot(s,{time:t.selectedTime}))}},L$={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate)return;const{tickets:r,quotas:n}=await x.asyncFetch(()=>x.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),"by_ticket_types[]":["normal"],"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));x.capacityManager.addQuotas(n);const i=Du(r);await vn(e,i);for(const s of i)e.preCart.addItem(ot(s,{time:s.selectedTime}))}},z$={name:"ticket:annual",calendarEndpoint:null,apiToken:"annual",requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t)return;const r=await x.asyncFetch(()=>x.tickets({by_bookable:!0,"by_ticket_types[]":["annual"],"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds})),n=Object.values(r).map(i=>Us(i));await vn(e,n);for(const i of n)e.preCart.addItem(ot(i))}},q$={name:"event:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.eventIds?.length||!e.selectedDate)return;const t=await x.asyncFetch(()=>x.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_bookable:!0,valid_at:e.selectedDate.toString()}));Yo(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await x.asyncFetch(()=>x.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_bookable:!0,valid_at:t.selectedDate.toString()}));x.capacityManager.addQuotas(i);const s=Bs(Vs(n,t.selectedTime),t.selectedTime);await vn(e,s);for(const a of s)e.preCart.addItem(ot(a,{time:t.selectedTime}))}},U$={name:"event:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await x.asyncFetch(()=>x.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:t.selectedDate.toString()}));x.capacityManager.addQuotas(i);const s=Du(n);await vn(e,s);for(const a of s)e.preCart.addItem(ot(a,{time:a.selectedTime}))}},B$={name:"event:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.eventIds?.length||!e.selectedDate)return;const t=await x.asyncFetch(()=>x.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:e.selectedDate.toString()}));Yo(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate||!t.selectedTimeslot)return;const r=await x.asyncFetch(()=>x.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:t.selectedDate.toString()}));x.capacityManager.addQuotas(i);const s=Bs(Vs(n,t.selectedTime),t.selectedTime);await vn(e,s);for(const a of s)e.preCart.addItem(ot(a,{time:t.selectedTime}))}},V$={name:"event:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"segment",field:"dateId"}],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.eventIds?.length,loadTimeslots:async()=>{},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||e.dateId===void 0)return;const r=await x.asyncFetch(()=>x.getEventDetailsOnDate(t.eventIds[0],e.dateId));if(r.prices?.length){for(const n of r.prices){const i=Pu(n,r.id,{event_title:r.event_title});e.preCart.addItem(ot(i,{time:r.start_time}))}r.seats&&x.capacityManager.addSeats(r.id,r.seats)}}},j$={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Jo(await x.asyncFetch(()=>x.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await x.asyncFetch(()=>x.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:a}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_bookable:!0,valid_at:n.start_time.slice(0,10)}));x.capacityManager.addQuotas(a);const o=Bs(Vs(s,n.start_time),n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(ot(l,{time:n.start_time}))}}},Z$={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Jo(await x.asyncFetch(()=>x.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await x.asyncFetch(()=>x.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:a}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:n.start_time.slice(0,10)}));x.capacityManager.addQuotas(a);const o=Du(s,n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(ot(l,{time:l.selectedTime}))}}},W$={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Jo(await x.asyncFetch(()=>x.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await x.asyncFetch(()=>x.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:a}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:n.start_time.slice(0,10)}));x.capacityManager.addQuotas(a);const o=Bs(Vs(s,n.start_time),n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(ot(l,{time:n.start_time}))}}},H$={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Jo(await x.asyncFetch(()=>x.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime),n=e.query;for(const i of r){if(!i.prices?.length)continue;const s=n?i.prices.filter(a=>a.title?.includes(n)):i.prices;for(const a of s){const o=Pu(a,i.id,{event_title:i.event_title});e.preCart.addItem(ot(o,{time:i.start_time}))}i.seats&&x.capacityManager.addSeats(i.id,i.seats)}}},G$={name:"coupon",calendarEndpoint:null,requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,loadTimeslots:async()=>{},async loadProducts(e){const t=await x.asyncFetch(()=>x.getCoupons());for(const r of t??[])e.preCart.addItem(ot(yp(r)))}},K$={"ticket:timeslot":R$,"ticket:day":L$,"ticket:annual":z$,"event:admission":q$,"event:admission:day":U$,"event:admission:timeslot":B$,"event:price":V$,"events:admission":j$,"events:admission:day":Z$,"events:admission:timeslot":W$,"events:price":H$,coupon:G$};function hi(e){const t=K$[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${Rg.join(", ")}`),t}var Lg=Rg,Y$=0,J$=class{uid=Y$++;#e=ae();get filters(){return d(this.#e)}set filters(e){$(this.#e,e,!0)}#t=ae();get eventIds(){return d(this.#t)}set eventIds(e){$(this.#t,e,!0)}#r=ae();get museumIds(){return d(this.#r)}set museumIds(e){$(this.#r,e,!0)}#n=ae();get exhibitionIds(){return d(this.#n)}set exhibitionIds(e){$(this.#n,e,!0)}#i=ae();get ticketIds(){return d(this.#i)}set ticketIds(e){$(this.#i,e,!0)}#s=ae();get ticketGroupIds(){return d(this.#s)}set ticketGroupIds(e){$(this.#s,e,!0)}#o=ae();get selectedDate(){return d(this.#o)}set selectedDate(e){$(this.#o,e,!0)}#a=ae();get selectedTimeslot(){return d(this.#a)}set selectedTimeslot(e){$(this.#a,e,!0)}timeslotTicketIds=[];#l=D(()=>this.selectedTimeslot);get selectedTime(){return d(this.#l)}set selectedTime(e){$(this.#l,e)}#u=ae(Me([]));get ticketSegments(){return d(this.#u)}set ticketSegments(e){$(this.#u,e,!0)}#c=D(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return d(this.#c)}set preCarts(e){$(this.#c,e)}#d=ae();get timeslotDetails(){return d(this.#d)}set timeslotDetails(e){$(this.#d,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>hi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>hi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>hi(e).isTicketsVisible(this))}},zg="go-ticket-selection",Q$=$i(zg),gn=Fi(zg);function X$(e,t){ne(t,!0);let r=_(t,"when",7),n=_(t,"then",7,"show");const i=gn(t.$$host),s=D(()=>i.value),a=CT(t.$$host),o=D(()=>a.value),l=Ni(t.$$host),c=D(()=>l.value),f=Ri(t.$$host),u=D(()=>f.value),p=x.auth;let h=D(()=>({ticketSelection:d(s),personalizationDetails:d(o),formData:d(c)?.formData,cart:x.cart,cartView:d(u),auth:{isAuthenticated:p.isAuthenticated(),isLoggedIn:p.isLoggedIn(),isGuest:p.isGuest()}}));const g=k=>{$(h,k)},v=()=>d(h);let m=D(()=>F$(r(),d(h))),y=null;ve(()=>{const k=t.$$host;if(d(m)&&n()==="show")y&&(k.appendChild(y),y=null);else if(!y&&k.childNodes.length>0)for(y=document.createDocumentFragment();k.firstChild;)y.appendChild(k.firstChild)});var S={_setData:g,_getData:v,get when(){return r()},set when(k){r(k),b()},get then(){return n()},set then(k="show"){n(k),b()}};return ie(S)}customElements.define("go-if",se(X$,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function qg(e,t){ne(t,!0);let r=_(t,"apiUrl",7),n=_(t,"shopDomain",7),i=_(t,"locale",7);return i(i()||localStorage.getItem("lang")||"en"),ve(()=>{(n()!==x.shopDomain||r()!==x.apiUrl||i()!==x.locale)&&(x.load(r(),n(),i()),console.warn("shop loaded due to prop change"))}),ie({get apiUrl(){return r()},set apiUrl(s){r(s),b()},get shopDomain(){return n()},set shopDomain(s){n(s),b()},get locale(){return i()},set locale(s){i(s),b()}})}customElements.define("gomus-init",se(qg,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function e2(e,t){ne(t,!0);let r=_(t,"apiDomain",7),n=_(t,"shopDomain",7),i=_(t,"locale",7),s=`https://${r()}`;var a={get apiDomain(){return r()},set apiDomain(o){r(o),b()},get shopDomain(){return n()},set shopDomain(o){n(o),b()},get locale(){return i()},set locale(o){i(o),b()}};return qg(e,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),ie(a)}customElements.define("go-init",se(e2,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function t2(e,t){ne(t,!0);const r=_(t,"to",7),n=D(()=>Xe.config.urls[r()]),i=Hr(t.$$host,"a");return ve(()=>{if(!d(n)){console.warn(`[go-link] No URL found for route "${r()}".`),i.removeAttribute("href");return}i.setAttribute("href",d(n)())}),i.addEventListener("click",s=>{if(s.preventDefault(),!Xe.config.urls[r()]){console.warn(`[go-link] No URL found for route "${r()}". You can define it with go.config.urls.${r()} = () => 'https://example.com/my-route'`);return}Xe.config.navigateTo(Xe.config.urls[r()]())}),ie({get to(){return r()},set to(s){r(s),b()}})}customElements.define("go-link",se(t2,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));function r2(e,t){ne(t,!0);let r=_(t,"custom",7,!1);Pt.defineForm({id:"membershipActivation",submitLabel:"membership.activation.actions.submit",fields:[{key:"email",required:!0}]});async function n(i){const s=i.target.details;(await x.activateMembership(s.formData)).response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=[x.t("membership.activation.form.errors.requestFailed")]}return Hr(t.$$host,"go-form",{"form-id":"membershipActivation",custom:r()}),t.$$host.addEventListener("submit",n),ie({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-membership-activation",se(r2,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));var n2=class{#e=ae();get token(){return d(this.#e)}set token(e){$(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return hl(x.order(this.token))}downloadLink(e,t){if(this.order?.is_valid)switch(e.type){case"Event":return`${x.apiUrl}/api/v4/orders/${this.order.id}/events/${e.attributes.id}.pdf?locale=${x.locale}&token=${this.token}`;case"Ticket":return e.attributes.ticket_type==="annual"&&!e.attributes.is_voucher?Xe.config.urls.annualTicketPersonalizationList?.()?Xe.config.urls.annualTicketPersonalizationList(this.token):x.urls?.annualTicketPersonalizationList(this.token):`${x.apiUrl}/api/v4/orders/${this.order.id}/tickets/${e.attributes.id}.pdf?locale=${x.locale}&token=${this.token}&barcode_id=${t}`;default:break}}},Ug="go-order-details",i2=$i(Ug),Bg=Fi(Ug);function s2(e,t){ne(t,!0);let r=_(t,"token",7);const n=new n2(r());i2(t.$$host,n),ve(()=>{n.token=r(),Re(()=>{x.cart.clearItems(),x.auth.isGuest()&&x.auth.signOut()})});var i={orderDetails:n,get token(){return r()},set token(s){r(s),b()}};return ie(i)}customElements.define("go-order",se(s2,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var a2=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),o2=B('<br/> <span class="go-order-item-quantities"> </span>',1),l2=B('<a aria-label="iCal link"> </a>'),u2=B('<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>');function Vg(e,t){ne(t,!0);let r=_(t,"item",7),n=_(t,"orderDetails",7);var i={get item(){return r()},set item(A){r(A),b()},get orderDetails(){return n()},set orderDetails(A){n(A),b()}},s=u2(),a=M(s),o=M(a),l=V(M(o),2),c=M(l),f=M(c,!0);I(c);var u=V(c,2),p=A=>{var O=a2(),F=U(O),R=M(F,!0);I(F);var Y=V(F,2),N=M(Y,!0);I(Y),J((X,q)=>{H(R,X),H(N,q)},[()=>x.formatDate(r().attributes.start_time,"dayMonth"),()=>x.formatTime(r().attributes.start_time)]),T(A,O)};ue(u,A=>{r().attributes.start_time&&A(p)});var h=V(u,2);Ne(h,17,()=>r().attributes.quantities,A=>A.id,(A,O)=>{var F=o2(),R=V(U(F),2),Y=M(R);I(R),J(()=>H(Y,`${d(O).quantity??""} x ${d(O).title??""}`)),T(A,F)});var g=V(h,2),v=M(g,!0);I(g),I(l);var m=V(l,2),y=M(m,!0);I(m);var S=V(m,4),k=M(S),E=A=>{var O=l2(),F=M(O,!0);I(O),J(R=>{me(O,"href",x.apiUrl+r().attributes.ical_url),H(F,R)},[()=>x.t("common.calendar")]),T(A,O)};return ue(k,A=>{r().attributes.ical_url&&A(E)}),I(S),I(o),I(a),I(s),J((A,O,F)=>{H(f,r().attributes.title),me(g,"href",A),H(v,O),H(y,F)},[()=>n().downloadLink(r()),()=>x.t("common.download"),()=>yt(r().price_cents)]),T(e,s),ie(i)}se(Vg,{item:{},orderDetails:{}},[],[],{mode:"open"});var jg=B('<span class="go-order-item-subtitle" data-testid="order-item-subtitle"> </span>'),c2=B('<br/> <span class="go-order-item-quantities" data-testid="order-sub-ticket"> </span>',1),d2=B('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),f2=B('<span class="go-cart-item-date"> </span>'),h2=B('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),p2=B('<br/> <a class="go-ticket-personalization"> </a>',1),m2=B('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),v2=B('<a aria-label="iCal link"> </a>'),g2=B('<li><article><ul><li class="go-order-breakdown-count"></li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"><!></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>'),y2=B('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),b2=B('<a class="go-ticket-personalization"> </a>'),_2=B('<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>');function Zg(e,t){ne(t,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${x.locale}.svg`;let n=_(t,"item",7),i=_(t,"orderDetails",7);const s=D(()=>(n().attributes.sub_ticket_sales??[]).filter(u=>u.quantity>0));var a={get item(){return n()},set item(u){n(u),b()},get orderDetails(){return i()},set orderDetails(u){i(u),b()}},o=re(),l=U(o),c=u=>{var p=re(),h=U(p);Ne(h,17,()=>({length:n().attributes.quantity}),sn,(g,v,m)=>{var y=g2(),S=M(y),k=M(S),E=M(k);E.textContent="1";var A=V(E,2),O=M(A),F=M(O,!0);I(O);var R=V(O,2),Y=Q=>{var P=jg(),te=M(P,!0);I(P),J(()=>H(te,n().attributes.sub_title)),T(Q,P)};ue(R,Q=>{n().attributes.sub_title&&Q(Y)});var N=V(R,2);Ne(N,17,()=>d(s),Q=>Q.id,(Q,P)=>{var te=c2(),L=V(U(te),2),be=M(L);I(L),J(()=>H(be,`${d(P).quantity??""} x ${d(P).title??""}`)),T(Q,te)});var X=V(N,2),q=Q=>{const P=D(()=>n().attributes.barcodes[m]?.id);var te=h2(),L=U(te),be=we=>{var De=d2(),Le=U(De),je=M(Le,!0);I(Le);var bt=V(Le,2),st=M(bt,!0);I(bt),J((Nt,_t)=>{H(je,Nt),H(st,_t)},[()=>x.formatDate(n().attributes.start_time,"dayMonth"),()=>x.formatTime(n().attributes.start_time)]),T(we,De)},Z=we=>{var De=f2(),Le=M(De,!0);I(De),J(je=>H(Le,je),[()=>x.formatDate(n().attributes.start_time,"dayMonth")]),T(we,De)};ue(L,we=>{n().attributes.ticket_type==="time_slot"?we(be):n().attributes.ticket_type==="normal"&&we(Z,1)});var w=V(L,4),_e=M(w,!0);I(w),J((we,De)=>{me(w,"href",we),H(_e,De)},[()=>i().downloadLink(n(),d(P)),()=>x.t("common.download")]),T(Q,te)},le=Q=>{var P=p2(),te=V(U(P),2),L=M(te,!0);I(te),J((be,Z)=>{me(te,"href",be),H(L,Z)},[()=>i().downloadLink(n()),()=>x.t("common.personalize")]),T(Q,P)};ue(X,Q=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?Q(q):Q(le,-1)}),I(A);var he=V(A,2),j=M(he,!0);I(he);var oe=V(he,2),ee=M(oe),fe=Q=>{var P=m2(),te=M(P);I(P),J(()=>{me(P,"href",x.apiUrl+n().attributes.barcodes[m]?.passbook_url),me(te,"src",r)}),T(Q,P)};ue(ee,Q=>{n().attributes.barcodes[m]&&n().attributes.barcodes[m]?.passbook_url&&Q(fe)}),I(oe);var ce=V(oe,2),de=M(ce),G=Q=>{var P=v2(),te=M(P,!0);I(P),J(L=>{me(P,"href",x.apiUrl+n().attributes.ical_url),H(te,L)},[()=>x.t("common.calendar")]),T(Q,P)};ue(de,Q=>{n().attributes.ical_url&&Q(G)}),I(ce),I(k),I(S),I(y),J(Q=>{H(F,n().attributes.title),H(j,Q)},[()=>yt(n().price_cents)]),T(g,y)}),T(u,p)},f=u=>{var p=_2(),h=M(p),g=M(h),v=M(g),m=M(v,!0);I(v);var y=V(v,2),S=M(y),k=M(S,!0);I(S);var E=V(S,2),A=X=>{var q=jg(),le=M(q,!0);I(q),J(()=>H(le,n().attributes.sub_title)),T(X,q)};ue(E,X=>{n().attributes.sub_title&&X(A)});var O=V(E,2),F=X=>{var q=y2(),le=M(q,!0);I(q),J((he,j)=>{me(q,"href",he),H(le,j)},[()=>i().downloadLink(n()),()=>x.t("common.download")]),T(X,q)},R=X=>{var q=b2(),le=M(q,!0);I(q),J((he,j)=>{me(q,"href",he),H(le,j)},[()=>i().downloadLink(n()),()=>x.t("common.personalize")]),T(X,q)};ue(O,X=>{n().attributes.is_voucher?X(F):X(R,-1)}),I(y);var Y=V(y,2),N=M(Y,!0);I(Y),Ot(2),I(g),I(h),I(p),J(X=>{H(m,n().attributes.quantity),H(k,n().attributes.title),H(N,X)},[()=>yt(n().price_cents)]),T(u,p)};return ue(l,u=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?u(c):u(f,-1)}),T(e,o),ie(a)}se(Zg,{item:{},orderDetails:{}},[],[],{mode:"open"});var w2=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),k2=B('<br/> <span class="go-order-item-quantities"> </span>',1),S2=B('<a aria-label="iCal link"> </a>'),E2=B('<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <span class="go-order-item-participants" data-testid="order-item-participants"> </span> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>');function Wg(e,t){ne(t,!0);let r=_(t,"item",7);const n=D(()=>(r().attributes.prices??[]).filter(A=>A.title&&A.quantity!=null));var i={get item(){return r()},set item(A){r(A),b()}},s=E2(),a=M(s),o=M(a),l=V(M(o),2),c=M(l),f=M(c,!0);I(c);var u=V(c,2),p=M(u,!0);I(u);var h=V(u,2),g=A=>{var O=w2(),F=U(O),R=M(F,!0);I(F);var Y=V(F,2),N=M(Y,!0);I(Y),J((X,q)=>{H(R,X),H(N,q)},[()=>x.formatDate(r().attributes.start_time,"dayMonth"),()=>x.formatTime(r().attributes.start_time)]),T(A,O)};ue(h,A=>{r().attributes.start_time&&A(g)});var v=V(h,2);Ne(v,17,()=>d(n),A=>A.title,(A,O)=>{var F=k2(),R=V(U(F),2),Y=M(R);I(R),J(()=>H(Y,`${d(O).quantity??""} x ${d(O).title??""}`)),T(A,F)}),I(l);var m=V(l,2),y=M(m,!0);I(m);var S=V(m,4),k=M(S),E=A=>{var O=S2(),F=M(O,!0);I(O),J(R=>{me(O,"href",x.apiUrl+r().attributes.ical_url),H(F,R)},[()=>x.t("common.calendar")]),T(A,O)};return ue(k,A=>{r().attributes.ical_url&&A(E)}),I(S),I(o),I(a),I(s),J((A,O)=>{H(f,r().attributes.title),H(p,A),H(y,O)},[()=>x.t("cart.item.participants",{count:r().attributes.participants}),()=>yt(r().price_cents)]),T(e,s),ie(i)}se(Wg,{item:{}},[],[],{mode:"open"});var T2=B('<ol><li class="data-go-order-breakdown-header"><ul><li class="go-order-breakdown-header-count"> </li> <li class="go-order-breakdown-header-product"> </li> <li class="go-order-breakdown-header-price"> </li> <li class="go-order-breakdown-header-passbook"></li></ul></li> <!> <li class="go-order-breakdown-footer"><ul><li class="go-cart-footer-title"></li> <li class="go-cart-footer-count"></li> <li class="go-cart-footer-price"> </li> <li class="go-cart-footer-passbook"></li></ul></li></ol>');function x2(e,t){ne(t,!0);const r=Bg(t.$$host),n=D(()=>r.value);let i=D(()=>d(n)?.order);var s=re(),a=U(s),o=l=>{var c=T2(),f=M(c),u=M(f),p=M(u),h=M(p,!0);I(p);var g=V(p,2),v=M(g,!0);I(g);var m=V(g,2),y=M(m,!0);I(m),Ot(2),I(u),I(f);var S=V(f,2);Ne(S,17,()=>d(i).items,F=>F.id,(F,R)=>{var Y=re(),N=U(Y),X=he=>{Zg(he,{get item(){return d(R)},get orderDetails(){return d(n)}})},q=he=>{Vg(he,{get item(){return d(R)},get orderDetails(){return d(n)}})},le=he=>{Wg(he,{get item(){return d(R)}})};ue(N,he=>{d(R).type==="Ticket"?he(X):d(R).type==="Event"?he(q,1):d(R).type==="Tour"&&he(le,2)}),T(F,Y)});var k=V(S,2),E=M(k),A=V(M(E),4),O=M(A,!0);I(A),Ot(2),I(E),I(k),I(c),J((F,R,Y,N)=>{H(h,F),H(v,R),H(y,Y),H(O,N)},[()=>x.t("common.table.count"),()=>x.t("common.table.product"),()=>x.t("common.table.price"),()=>x.t("common.table.total",{value:yt(d(i).total_price_cents)})]),T(l,c)};ue(a,l=>{d(i)&&d(n)&&l(o)}),T(e,s),ie()}customElements.define("go-order-breakdown",se(x2,{},[],[]));function A2(e,t){ne(t,!0);const r=Bg(t.$$host),n=D(()=>r.value);let i=D(()=>d(n)?.order);Ot();var s=Bt();J(()=>H(s,d(i)?.id)),T(e,s),ie()}customElements.define("go-order-invoice-id",se(A2,{},[],[]));var C2=B("<go-form></go-form>",2);function O2(e,t){ne(t,!1),Pt.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const s=i.target.details,a=await x.updatePassword(s.formData);a.data?(s.successMessage=x.t("user.passwordSuccess.desc.title"),s.apiErrors=[]):s.apiErrors=a.error?.errors||a.error||a.errors}Jl();var n=C2();xn(n,"formId","passwordResetForm"),Ts("submit",n,r),T(e,n),ie()}customElements.define("go-profile-password",se(O2,{},[],[]));var D2=B("<go-form></go-form>",2);function I2(e,t){ne(t,!0),Pt.defineForm({id:"accountDetailsForm",fields:[{key:"salutation",required:!1},{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"language",required:!0}]});let r=ae(void 0);const n=D(()=>x.getCustomer()),i=D(()=>d(n)&&"data"in d(n)?d(n).data:void 0);En(async()=>{await x.waitForAllFetches(),await Ql(()=>d(r).details),await Ql(()=>d(i)),d(r).details.fill(d(i))});var s=D2();xn(s,"formId","accountDetailsForm"),Yl(s,a=>$(r,a),()=>d(r)),T(e,s),ie()}customElements.define("go-profile-details",se(I2,{},[],[]));var P2=B('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function M2(e,t){ne(t,!0);const r=D(()=>x.getCustomer()),n=D(()=>d(r)&&"data"in d(r)?d(r).data:void 0);var i=re(),s=U(i),a=l=>{var c=P2(),f=U(c),u=M(f);I(f);var p=V(f,2),h=M(p,!0);I(p),J(()=>{H(u,`${d(n).name??""}
85
+ ${d(n).surname??""}`),H(h,d(n).email)}),T(l,c)},o=l=>{var c=Bt();J(f=>H(c,f),[()=>x.t("user.login.desc.text")]),T(l,c)};ue(s,l=>{d(n)?l(a):l(o,-1)}),T(e,i),ie()}customElements.define("go-profile-overview",se(M2,{},[],[]));function $2(e,t){ne(t,!0);function r(h){if(!h)return;const g=[];for(const v of h.split(",")){const m=v.trim();m&&(Lg.includes(m)?g.push(m):console.warn(`[go-ticket-selection] Unknown filter "${m}". Valid filters: ${Lg.join(", ")}`))}return g.length?g:void 0}let n=_(t,"filters",7),i=_(t,"eventIds",7),s=_(t,"museumIds",7),a=_(t,"exhibitionIds",7),o=_(t,"selectedDate",7),l=_(t,"selectedTimeslot",7),c=_(t,"ticketIds",7),f=_(t,"ticketGroupIds",7);const u=new J$;ve(()=>{t.$$host.hasAttribute("mode")&&console.warn('[go-ticket-selection] `mode` attribute is deprecated and ignored. Use `filters` instead, e.g. filters="ticket:timeslot".')}),ve(()=>{u.filters=r(n()),u.eventIds=on(i()),u.museumIds=on(s()),u.exhibitionIds=on(a()),u.ticketIds=on(c()),u.ticketGroupIds=on(f()),u.selectedTimeslot=l(),o()&&(u.selectedDate=ao(o()))}),ve(()=>{u.selectedDate&&Re(()=>{o(u.selectedDate.toString())})}),ve(()=>{u.selectedTimeslot,Re(()=>{l(u.selectedTimeslot)})}),Q$(t.$$host,u);var p={details:u,get filters(){return n()},set filters(h){n(h),b()},get eventIds(){return i()},set eventIds(h){i(h),b()},get museumIds(){return s()},set museumIds(h){s(h),b()},get exhibitionIds(){return a()},set exhibitionIds(h){a(h),b()},get selectedDate(){return o()},set selectedDate(h){o(h),b()},get selectedTimeslot(){return l()},set selectedTimeslot(h){l(h),b()},get ticketIds(){return c()},set ticketIds(h){c(h),b()},get ticketGroupIds(){return f()},set ticketGroupIds(h){f(h),b()}};return ie(p)}customElements.define("go-ticket-selection",se($2,{filters:{attribute:"filters",reflect:!0,type:"String"},eventIds:{attribute:"event-ids",reflect:!0,type:"String"},ticketIds:{attribute:"ticket-ids",reflect:!0,type:"String"},ticketGroupIds:{attribute:"ticket-group-ids",reflect:!0,type:"String"},museumIds:{attribute:"museum-ids",reflect:!0,type:"String"},exhibitionIds:{attribute:"exhibition-ids",reflect:!0,type:"String"},selectedDate:{attribute:"selected-date",reflect:!0,type:"String"},selectedTimeslot:{attribute:"selected-timeslot",reflect:!0,type:"String"}},[],["details"]));function F2(e,t){ne(t,!0);const r=gn(t.$$host),n=D(()=>r.value);ve(()=>{t.$$host.style.display=d(n)?.isTicketsVisible?"block":"none",t.$$host.classList.toggle("is-hidden",!d(n)?.isTicketsVisible),t.$$host.classList.toggle("is-visible",d(n)?.isTicketsVisible)}),ie()}customElements.define("go-tickets",se(F2,{},[],[]));function N2(e,t){ne(t,!0);const r=gn(t.$$host),n=D(()=>r.value),i=D(()=>qr(d(n)?.preCarts||[],a=>a.items.length)),s=D(()=>!d(n)?.isTicketsVisible||d(n)?.isTicketsVisible&&d(i)===0);ve(()=>{t.$$host.style.display=d(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!d(s)),t.$$host.classList.toggle("is-visible",d(s))}),ie()}customElements.define("go-tickets-empty",se(N2,{},[],[]));function R2(e,t){ne(t,!0);const r=gn(t.$$host),n=D(()=>r.value);let i=D(()=>qr(d(n)?.preCarts||[],a=>a.totalPriceCents));Ot();var s=Bt();J(a=>H(s,a),[()=>yt(d(i))]),T(e,s),ie()}customElements.define("go-tickets-sum",se(R2,{},[],[]));var L2=class{#e;get ticketSelectionDetails(){return d(this.#e)}set ticketSelectionDetails(e){$(this.#e,e)}#t=ae(Me(Pi()));get preCart(){return d(this.#t)}set preCart(e){$(this.#t,e,!0)}#r=ae();get filters(){return d(this.#r)}set filters(e){$(this.#r,e,!0)}#n=ae();get dateId(){return d(this.#n)}set dateId(e){$(this.#n,e,!0)}#i=ae();get limit(){return d(this.#i)}set limit(e){$(this.#i,e,!0)}#s=ae();get query(){return d(this.#s)}set query(e){$(this.#s,e,!0)}#o=ae(Me([]));get ticketGroupIds(){return d(this.#o)}set ticketGroupIds(e){$(this.#o,e,!0)}#a=ae(Me([]));get languageIds(){return d(this.#a)}set languageIds(e){$(this.#a,e,!0)}#l=ae(Me([]));get catchWordIds(){return d(this.#l)}set catchWordIds(e){$(this.#l,e,!0)}#u=ae(Me([]));get museumIds(){return d(this.#u)}set museumIds(e){$(this.#u,e,!0)}#c=ae(!1);get withContent(){return d(this.#c)}set withContent(e){$(this.#c,e,!0)}constructor(e,t){this.filters=e===void 0?void 0:Array.isArray(e)?e:[e],this.#e=D(()=>t.value)}get effectiveFilters(){return this.filters?.length?this.filters:this.ticketSelectionDetails?.filters??[]}clear(){this.preCart=Pi([])}toString(){return JSON.stringify({filters:this.effectiveFilters,preCart:this.preCart.toString()})}async loadTickets(){this.preCart=Pi();const e=this.effectiveFilters.filter(t=>t!=="custom");await Promise.all(e.map(t=>hi(t).loadProducts(this)))}},Hg="go-ticket-segment",z2=$i(Hg),Xc=Fi(Hg);function q2(e,t){ne(t,!0);const r=_(t,"filters",7),n=_(t,"dateId",7),i=_(t,"query",7),s=_(t,"limit",7),a=_(t,"ticketGroupIds",7),o=_(t,"languageIds",7),l=_(t,"catchWordIds",7),c=_(t,"museumIds",7),f=_(t,"withContent",7);function u(y){if(!y)return;const S=y.split(",").map(k=>k.trim()).filter(Boolean);return S.length?S:void 0}const p=gn(t.$$host),h=p.value,g=new L2(u(r()),p);z2(t.$$host,g),ve(()=>{g.filters=u(r()),g.dateId=n(),g.query=i(),g.limit=s(),g.ticketGroupIds=on(a()),g.languageIds=on(o()),g.catchWordIds=on(l()),g.museumIds=on(c()),g.withContent=!!f()}),ve(()=>{g.dateId,g.filters,g.ticketGroupIds,g.museumIds,g.languageIds,g.catchWordIds,g.query,g.limit,g.withContent,h?.filters,h?.selectedTimeslot,h?.selectedTime,h?.selectedDate,h?.museumIds,Re(()=>{g.loadTickets()})}),ve(()=>{h&&Re(()=>h?.addTicketSegment(g))});const v=D(()=>g.preCart.items.length);ve(()=>{t.$$host.classList.toggle("is-empty",d(v)===0)});var m={details:g,get filters(){return r()},set filters(y){r(y),b()},get dateId(){return n()},set dateId(y){n(y),b()},get query(){return i()},set query(y){i(y),b()},get limit(){return s()},set limit(y){s(y),b()},get ticketGroupIds(){return a()},set ticketGroupIds(y){a(y),b()},get languageIds(){return o()},set languageIds(y){o(y),b()},get catchWordIds(){return l()},set catchWordIds(y){l(y),b()},get museumIds(){return c()},set museumIds(y){c(y),b()},get withContent(){return f()},set withContent(y){f(y),b()}};return ie(m)}customElements.define("go-ticket-segment",se(q2,{catchWordIds:{attribute:"catch-word-ids",reflect:!0,type:"String"},dateId:{attribute:"date-id",reflect:!0,type:"Number"},filters:{attribute:"filters",reflect:!0,type:"String"},languageIds:{attribute:"language-ids",reflect:!0,type:"String"},limit:{attribute:"limit",reflect:!0,type:"Number"},query:{attribute:"query",reflect:!0,type:"String"},ticketGroupIds:{attribute:"ticket-group-ids",reflect:!0,type:"String"},museumIds:{attribute:"museum-ids",reflect:!0,type:"String"},withContent:{attribute:"with-content",reflect:!0,type:"Boolean"}},[],["details"]));function U2(e,t){ne(t,!0);const r=gn(t.$$host).value,n=Xc(t.$$host).value,i=D(()=>n?.preCart.items.length),s=D(()=>!r?.isTicketsVisible||r?.isTicketsVisible&&d(i)===0);ve(()=>{t.$$host.style.display=d(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!d(s)),t.$$host.classList.toggle("is-visible",d(s))}),ie()}customElements.define("go-ticket-segment-empty",se(U2,{},[],[]));var B2=B('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),V2=B('<span class="go-tickets-item-subtitle" data-testid="ticket-subtitle"> </span>'),j2=B('<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>'),Z2=B('<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>'),W2=B('<ul class="go-sub-tickets" role="list"></ul>'),H2=B('<li><article><ul><li class="go-tickets-item-title"><!> <!></li> <!> <li class="go-tickets-item-description" data-go-tickets-description=""></li> <!> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><!></li></ul></article> <!></li>');function Gg(e,t){const r=mt();ne(t,!0);const n=k=>{var E=B2(),A=U(E),O=M(A);I(A);var F=V(A,2),R=M(F,!0);I(F),J(Y=>{H(O,`${s().product.event_title??""} - ${Y??""}`),H(R,s().product.title)},[()=>x.formatTime(s().time)]),T(k,E)},i=k=>{Ot();var E=Bt();J(()=>H(E,s().product.title)),T(k,E)};let s=_(t,"item",7),a=_(t,"details",7),o=ae(void 0),l=ae(Me({}));const c=D(()=>Vr(s().product)?s().product:null);let f=ae(!1);const u=D(()=>s().product?.content?.reduction_reason),p=`go-ticket-info-${r}`;ve(()=>{a().preCart.items.map(k=>k.quantity),a().preCart.items.forEach(k=>k.mantle&&Object.values(k.mantle.composition)),x.cart?.items.map(k=>k.quantity),x.cart?.items.forEach(k=>k.mantle&&Object.values(k.mantle.composition)),Re(()=>{$(o,x.capacityManager.capacity(x.cart,s(),a().preCart),!0),$(l,x.capacityManager.subTicketMaxes(x.cart,s(),a().preCart),!0)})});function h(k,E){s().mantle&&(s().mantle.composition[k]=E)}let g=i;js(s().product)&&(g=n);var v={get item(){return s()},set item(k){s(k),b()},get details(){return a()},set details(k){a(k),b()}},m=re(),y=U(m),S=k=>{var E=H2(),A=M(E),O=M(A),F=M(O),R=M(F);g(R);var Y=V(R,2),N=Q=>{var P=V2(),te=M(P,!0);I(P),J(()=>H(te,s().product.sub_title)),T(Q,P)};ue(Y,Q=>{s().product.sub_title&&Q(N)}),I(F);var X=V(F,2),q=Q=>{var P=j2(),te=M(P);I(P),J(L=>{St(te,1,dr(["go-ticket-info-icon",d(f)&&"is-active"])),me(te,"aria-expanded",d(f)),me(te,"aria-controls",p),me(te,"aria-label",L)},[()=>x.t("ticket.list.additionalInfo")]),pt("click",te,()=>$(f,!d(f))),T(Q,P)};ue(X,Q=>{d(u)&&Q(q)});var le=V(X,2);Sf(le,()=>fm.sanitize(s().product.description),!0),I(le);var he=V(le,2),j=Q=>{var P=Z2(),te=M(P,!0);I(P),J(L=>{me(P,"id",p),me(P,"hidden",!d(f)),H(te,L)},[()=>x.t(d(u))]),T(Q,P)};ue(he,Q=>{d(u)&&Q(j)});var oe=V(he,2),ee=M(oe,!0);I(oe);var fe=V(oe,2),ce=M(fe);{let Q=D(()=>hm(s(),x.locale));mo(ce,{get value(){return s().quantity},get min(){return d(o).min},get max(){return d(o).max},get label(){return d(Q)},onChange:P=>s().quantity=P})}I(fe),I(O),I(A);var de=V(A,2),G=Q=>{var P=W2();Ne(P,21,()=>qs(d(c)),te=>te.id,(te,L)=>{{let be=D(()=>s().mantle?.composition?.[d(L).id]??0);ju(te,{get sub(){return d(L)},get quantity(){return d(be)},get max(){return d(l)[d(L).id]},onChange:Z=>h(d(L).id,Z)})}}),I(P),J(()=>me(P,"aria-label",d(c).title)),T(Q,P)};ue(de,Q=>{d(c)&&s().quantity>0&&Q(G)}),I(E),J(()=>{St(A,1,dr(["go-tickets-item",d(o).bookedOut&&"is-booked-out"])),me(A,"data-testid",s().uuid),H(ee,s().price_formatted)}),T(k,E)};return ue(y,k=>{d(o)&&!d(o).unavailable&&k(S)}),T(e,m),ie(v)}cr(["click"]),se(Gg,{item:{},details:{}},[],[],{mode:"open"});var G2=B('<ol class="go-tickets" data-testid="tickets"><li class="go-tickets-header" data-go-tickets-header="" data-testid="tickets-header"><ul><li class="go-tickets-header-title" data-go-tickets-title=""> </li> <li class="go-tickets-header-description" data-go-tickets-description=""> </li> <li class="go-tickets-header-price" data-go-tickets-price=""> </li> <li class="go-tickets-header-quality" data-go-tickets-quality=""> </li></ul></li> <!></ol>');function K2(e,t){ne(t,!0);const r=Xc(t.$$host),n=D(()=>r.value),i=D(()=>d(n)?.preCart?.items.length&&d(n)?.preCart?.items.length>0);var s=re(),a=U(s),o=l=>{var c=G2(),f=M(c),u=M(f),p=M(u),h=M(p,!0);I(p);var g=V(p,2),v=M(g,!0);I(g);var m=V(g,2),y=M(m,!0);I(m);var S=V(m,2),k=M(S,!0);I(S),I(u),I(f);var E=V(f,2);Ne(E,17,()=>d(n).preCart.items,A=>A.uuid,(A,O)=>{Gg(A,{get item(){return d(O)},get details(){return d(n)}})}),I(c),J((A,O,F,R)=>{H(h,A),H(v,O),H(y,F),H(k,R)},[()=>x.t("product.detail.table.title"),()=>x.t("product.detail.table.desc"),()=>x.t("product.detail.table.price"),()=>x.t("product.detail.table.quantity")]),T(l,c)};ue(a,l=>{d(i)&&d(n)&&l(o)}),T(e,s),ie()}customElements.define("go-ticket-segment-body",se(K2,{},[],[]));function Y2(e,t){ne(t,!0);const r=Xc(t.$$host),n=D(()=>r.value);Ot();var i=Bt();J(()=>H(i,d(n)?.preCart.totalFormatted)),T(e,i),ie()}customElements.define("go-ticket-segment-sum",se(Y2,{},[],[]));var J2=class{#e;get tsd(){return d(this.#e)}set tsd(e){$(this.#e,e)}#t=ae(Me([]));get timeslots(){return d(this.#t)}set timeslots(e){$(this.#t,e,!0)}constructor(e){e&&(this.#e=D(()=>e.value),this.tsd&&(this.tsd.timeslotDetails=this))}get boockedOutCount(){return this.timeslots.filter(e=>e.capacity==0).length}recalculateCapacities(){const e=this.tsd?.selectedDate;if(!e){this.timeslots=[];return}const t=x.capacityManager.quotaManager;t.clearPrecart();for(const r of x.cart?.items??[]){const n=r.product;oo(n)&&t.setPrecartItemQuantity(n.id,r.quantity??0)}this.timeslots=t.timeslotsOn(e,this.tsd?.timeslotTicketIds).map(r=>({...r,startAt:r.timeSlot,timeFormatted:x.formatTime(r.timeSlot),available:r.capacity>0}))}},Q2=B('<li><label> <input type="radio" name="timeslot"/></label></li>'),X2=B('<ul data-testid="timeslots"></ul>');function eF(e,t){ne(t,!0);const r=[],n=new J2(gn(t.$$host));ve(()=>{const f=n.tsd;if(!f)return;const u=f.filters,p=f.selectedDate;Re(async()=>{f.timeslotTicketIds=[],u?.length&&p&&await Promise.all(u.map(h=>hi(h).loadTimeslots(f))),n.recalculateCapacities()})}),ve(()=>{x.cart?.items.map(f=>f.quantity),Re(()=>n.recalculateCapacities())});const i=(f,u)=>{!f||!("dispatchEvent"in f)||f.dispatchEvent(new CustomEvent("go-timeslot-select",{detail:{selected:u},bubbles:!0,composed:!0}))},s=f=>{i(f.target,n.tsd?.selectedTimeslot)};ve(()=>{const f=n.tsd;if(!f)return;const u=n.timeslots;if(u.length!==1)return;const p=u[0];p.available&&f.selectedTimeslot!==p.startAt&&(f.selectedTimeslot=p.startAt,i(t.$$host,p.startAt))});var a={details:n},o=re(),l=U(o),c=f=>{var u=X2();Ne(u,20,()=>n.timeslots,p=>p,(p,h)=>{const g=D(()=>h.totalCapacity===0),v=D(()=>!d(g)&&h.capacity===0),m=D(()=>d(g)||d(v)||!h.available),y=D(()=>n.tsd?.selectedTimeslot===h.startAt);var S=Q2(),k=M(S),E=M(k),A=V(E);Is(A);var O;I(k),I(S),J(()=>{St(S,1,dr({"go-timeslot":!0,"is-unavailable":d(g),"is-sold-out":d(v),"is-disabled":d(m),"is-selected":d(y)})),H(E,`${h.timeFormatted??""} `),A.disabled=d(m),me(A,"aria-disabled",d(m)),O!==(O=h.startAt)&&(A.value=(A.__value=h.startAt)??"")}),pt("change",A,s),z_(r,[],A,()=>(h.startAt,n.tsd.selectedTimeslot),F=>n.tsd.selectedTimeslot=F),T(p,S)}),I(u),T(f,u)};return ue(l,f=>{n.tsd?.isTimeslotsVisible&&f(c)}),T(e,o),ie(a)}cr(["change"]),customElements.define("go-timeslots",se(eF,{},[],["details"]));function tF(e){return typeof e=="string"?`'${e}'`:e==null?String(e):sw(e)?"a Promise — the callback must be synchronous":`a ${typeof e}`}var rF=class{#e=ae();get details(){return d(this.#e)}set details(e){$(this.#e,e,!0)}#t=ae(Me(Di(Xt())));get startAt(){return d(this.#t)}set startAt(e){$(this.#t,e,!0)}#r=ae(void 0);get selected(){return d(this.#r)}set selected(e){$(this.#r,e,!0)}#n=ae();get availabilityOverride(){return d(this.#n)}set availabilityOverride(e){$(this.#n,e,!0)}#i=[];get endpoint(){return(this.details?.filters?.map(e=>hi(e).calendarEndpoint).filter(Boolean)??[])[0]??null}get dates(){if(this.details)switch(this.endpoint){case"tickets":return this.ticketsDates();case"events":return this.eventsDates();default:return}}defaultAvailability(e){switch(this.dates?.[e.toString()]){case"unavailable":return"unavailable";case"fully_booked":return"sold_out";default:return"available"}}availability(e){const t=this.defaultAvailability(e),r=this.#s();if(!r)return t;let n;try{n=r(e.toString(),t)}catch(i){return this.#o("threw",`[go-calendar] the availability-override callback threw (${String(i)}) — using the gomus default instead.`),t}return n==="pass_through"?t:n==="available"||n==="sold_out"||n==="unavailable"?n:(this.#o("returned",`[go-calendar] the availability-override callback must return 'available', 'sold_out', 'unavailable' or 'pass_through', got ${tF(n)} — using the gomus default instead.`),t)}#s(){const e=this.availabilityOverride;if(typeof e=="function")return e;if(!e)return;const t=globalThis[e];if(typeof t=="function")return t;this.#o(`unresolved:${e}`,`[go-calendar] availability-override="${e}" does not resolve to a function on window — using the gomus defaults.`,console.warn)}#o(e,t,r=console.error){this.#i.includes(e)||(this.#i.push(e),r(t))}isDateDisabled(e){return e.compare(Di(Xt()))<0||this.availability(e)==="unavailable"}isDateUnavailable(e){return this.availability(e)==="sold_out"}get apiFilters(){return this.details?.filters?.map(e=>hi(e).apiToken).filter(Boolean)}params(e){return this.details?{by_bookable:!0,"by_ticket_types[]":this.apiFilters,"by_ticket_ids[]":this.details.ticketIds,"by_ticket_group_ids[]":this.details.ticketGroupIds,"by_museum_ids[]":this.details.museumIds,"by_exhibition_ids[]":this.details.exhibitionIds,"by_event_ids[]":this.details.eventIds,depth:"availability_status",start_at:e.toString(),end_at:e.add({months:1}).toString()}:{}}fetchPeriod(){const e=this.startAt.set({day:1});return[e.subtract({months:1}),e,e.add({months:1}),e.add({months:2})]}#a(e){return this.fetchPeriod().reduce((t,r)=>Object.assign(t,e(this.params(r))),{})}eventsDates(){return this.#a(e=>x.calendar(e))}ticketsDates(){return this.#a(e=>x.ticketsCalendar(e))}},nF=B("<!> <!> <!>",1),iF=B("<div> </div>"),Kg=B("<!> <!>",1),sF=B('<div data-calendar-wrapper=""><!></div>');function Yg(e,t){ne(t,!0);let r=_(t,"calendarClass",7),n=ae(void 0);const i=r();ve(()=>{d(n)?.dispatchEvent(new CustomEvent("go-date-select",{detail:{selected:r().selected},bubbles:!0}))});var s={details:i,get calendarClass(){return r()},set calendarClass(l){r(l),b()}},a=sF(),o=M(a);{const l=(c,f)=>{let u=()=>f?.().months,p=()=>f?.().weekdays;var h=Kg(),g=U(h);$e(g,()=>gc,(m,y)=>{y(m,{children:(S,k)=>{var E=nF(),A=U(E);$e(A,()=>_c,(R,Y)=>{Y(R,{class:"go-calendar-prev-button",children:(N,X)=>{Ot();var q=Bt("Prev");T(N,q)},$$slots:{default:!0}})});var O=V(A,2);$e(O,()=>yc,(R,Y)=>{Y(R,{class:"go-calendar-heading"})});var F=V(O,2);$e(F,()=>bc,(R,Y)=>{Y(R,{class:"go-calendar-next-button",children:(N,X)=>{Ot();var q=Bt("Next");T(N,q)},$$slots:{default:!0}})}),T(S,E)},$$slots:{default:!0}})});var v=V(g,2);Ne(v,17,u,sn,(m,y)=>{var S=re(),k=U(S);$e(k,()=>fc,(E,A)=>{A(E,{class:"go-calendar-grid",children:(O,F)=>{var R=Kg(),Y=U(R);$e(Y,()=>mc,(X,q)=>{q(X,{class:"go-calendar-grid-head",children:(le,he)=>{var j=re(),oe=U(j);$e(oe,()=>aa,(ee,fe)=>{fe(ee,{class:"go-calendar-grid-row",children:(ce,de)=>{var G=re(),Q=U(G);Ne(Q,17,p,sn,(P,te,L,be)=>{var Z=re(),w=U(Z);$e(w,()=>vc,(_e,we)=>{we(_e,{children:(De,Le)=>{var je=iF(),bt=M(je,!0);I(je),J(st=>H(bt,st),[()=>d(te).slice(0,2)]),T(De,je)},$$slots:{default:!0}})}),T(P,Z)}),T(ce,G)},$$slots:{default:!0}})}),T(le,j)},$$slots:{default:!0}})});var N=V(Y,2);$e(N,()=>hc,(X,q)=>{q(X,{class:"go-calendar-grid-body",children:(le,he)=>{var j=re(),oe=U(j);Ne(oe,17,()=>d(y).weeks,sn,(ee,fe,ce,de)=>{var G=re(),Q=U(G);$e(Q,()=>aa,(P,te)=>{te(P,{class:"go-calendar-grid-row",children:(L,be)=>{var Z=re(),w=U(Z);Ne(w,17,()=>d(fe),sn,(_e,we,De,Le)=>{var je=re(),bt=U(je);$e(bt,()=>pc,(st,Nt)=>{Nt(st,{get date(){return d(we)},get month(){return d(y).value},class:"go-calendar-cell",children:(_t,Rt)=>{var nr=re(),Ht=U(nr);{let vr=D(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(d(we)),"is-disabled":r().isDateDisabled(d(we)),"is-selected":r().selected?.compare(d(we))===0}));$e(Ht,()=>dc,(Ir,Pr)=>{Pr(Ir,{get class(){return d(vr)},children:(yn,Mr)=>{Ot();var gr=Bt();J(()=>H(gr,d(we).day)),T(yn,gr)},$$slots:{default:!0}})})}T(_t,nr)},$$slots:{default:!0}})}),T(_e,je)}),T(L,Z)},$$slots:{default:!0}})}),T(ee,G)}),T(le,j)},$$slots:{default:!0}})}),T(O,R)},$$slots:{default:!0}})}),T(m,S)}),T(c,h)};$e(o,()=>Cv,(c,f)=>{f(c,{weekdayFormat:"long",fixedWeeks:!0,preventDeselect:!0,type:"single",get locale(){return x.locale},isDateDisabled:u=>r().isDateDisabled(u),isDateUnavailable:u=>r().isDateUnavailable(u),disableDaysOutsideMonth:!1,class:"go-calendar-root",get value(){return r().selected},set value(u){r().selected=u},get placeholder(){return r().startAt},set placeholder(u){r().startAt=u},children:l,$$slots:{default:!0}})})}return I(a),Yl(a,l=>$(n,l),()=>d(n)),T(e,a),ie(s)}se(Yg,{calendarClass:{}},[],["details"],{mode:"open"});function aF(e,t){ne(t,!0);let r=_(t,"availabilityOverride",7);const n=new rF,i=n,s=gn(t.$$host),a=D(()=>s.value);ve(()=>{n.details=d(a),n.availabilityOverride=r()}),t.$$host.addEventListener("go-date-select",u=>{d(a)&&(d(a).selectedDate=u.detail.selected,d(a).selectedTimeslot=void 0)});var o={details:i,get availabilityOverride(){return r()},set availabilityOverride(u){r(u),b()}},l=re(),c=U(l),f=u=>{Yg(u,{get calendarClass(){return n}})};return ue(c,u=>{d(a)?.isCalendarVisible&&u(f)}),T(e,l),ie(o)}customElements.define("go-calendar",se(aF,{availabilityOverride:{attribute:"availability-override",type:"String"}},[],["details"]));var oF=class{#e;get ticketSelectionDetails(){return d(this.#e)}set ticketSelectionDetails(e){$(this.#e,e)}constructor(e){e&&(this.#e=D(()=>e.value))}addToCart(){if(!x.cart){console.error("cart not found");return}if(!this.ticketSelectionDetails){console.error("ticket selection details not found");return}const e=this.ticketSelectionDetails.preCarts,t=e.flatMap(r=>r.nonEmptyItems.map(n=>{const i=n.product.ticket_type!="annual"?n.time:void 0;return ot(n.product,{quantity:n.quantity,time:i,mantle:n.mantle&&{composition:{...n.mantle.composition}}})}));x.cart.addItems(t),e.forEach(r=>r.items.forEach(n=>n.quantity=0)),Xe.config.urls.cart&&Xe.config.navigateTo(Xe.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(e=>e.items.some(t=>t.quantity>0)):!1}},lF=B('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function uF(e,t){ne(t,!0);const r=new oF(gn(t.$$host));var n={details:r},i=lF(),s=M(i,!0);return I(i),J((a,o,l)=>{i.disabled=a,me(i,"data-x",o),H(s,l)},[()=>!r.anyTicketsSelected(),()=>!r.anyTicketsSelected(),()=>x.t("common.actions.cart")]),pt("click",i,()=>r.addToCart()),T(e,i),ie(n)}cr(["click"]),customElements.define("go-add-to-cart-button",se(uF,{},[],["details"]));function cF(e,t){ne(t,!0);let r=_(t,"custom",7,!1);Pt.defineForm({id:"withdrawal",submitLabel:"withdrawal.actions.submit",fields:[{key:"withdrawalFirstName",required:!0},{key:"withdrawalLastName",required:!0},{key:"email",required:!0},{key:"orderNumber",required:!0},{key:"withdrawalNote",required:!1}]});async function n(i){const s=i.target.details,a=await x.withdrawal(s.formData);a.response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error?.errors??[x.t("withdrawal.form.errors.requestFailed")]}return Hr(t.$$host,"go-form",{"form-id":"withdrawal",custom:r()}),t.$$host.addEventListener("submit",n),ie({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-withdrawal-form",se(cF,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));var dF=["id","time","participants","languageId","totalPriceCents","title"];function fF(e){for(const t of dF)if(e[t]==null||e[t]==="")throw new Error(`(go.cart.addTour) '${t}' is required`);if(!(e.participants>0))throw new Error("(go.cart.addTour) 'participants' must be a positive number");if(e.quantities){const t=qr(Object.values(e.quantities));if(t!==e.participants)throw new Error(`(go.cart.addTour) 'quantities' must sum to 'participants' (${t} !== ${e.participants})`)}}async function hF(e){if(fF(e),!x.cart)throw new Error("(go.cart.addTour) shop not initialized — call go.init first");const{time:t,...r}=e,n=ot(vp(r),{quantity:1,time:t});return x.cart.addItem(n),n.uuid}var ca=null;async function da(){if(ca)return ca;if(!x.client)throw new Error("[go] Shop not initialized — call go.init({ shop, api, locale }) first.")}var pF=e=>e.split(".").reduce((t,r)=>t?.[r],Jg);async function mF(e){const t=e.go;let r=t&&t._queue||[];t&&t._queue&&!t.cart&&console.warn("(go) the pasted go snippet predates go.cart — cart calls cannot be queued before load. Update the snippet or gate on window.go.loaded.");for(const n of r)if(n.method!=="load")try{const i=pF(n.method);if(typeof i!="function")throw new Error(`(go) unknown command: ${n.method}`);await i(n.options)}catch(i){console.error(i)}e.go=Jg,t&&(t._queue=null)}var Jg={loaded:!0,config:e=>{Xe.define(e)},init:async e=>{try{ca=x.load("https://"+e.api,e.shop,e.locale),await ca}catch(t){throw ca=null,t}},api:{getCustomer:async()=>(await da(),x.asyncFetch(()=>x.getCustomer())),getOrders:async e=>(await da(),x.asyncFetch(()=>x.getOrders(e))),getCustomerAddresses:async()=>(await da(),x.asyncFetch(()=>x.getCustomerAddresses())),getCustomerMemberships:async()=>(await da(),x.asyncFetch(()=>x.getCustomerMemberships()))},cart:{addTour:async e=>(await da(),hF(e))}};(async()=>await mF(window))()})();