@gomusdev/web-components 4.16.1 → 4.17.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.
- package/README.md +12 -0
- package/dist-js/gomus-webcomponents.iife.js +20 -10
- package/dist-js/gomus-webcomponents.js +20 -10
- package/dist-js/gomus-webcomponents.min.iife.js +14 -14
- package/dist-js/gomus-webcomponents.min.js +788 -780
- package/dist-js/src/config/configStore.svelte.d.ts +8 -0
- package/package.json +1 -1
|
@@ -7,11 +7,11 @@ ${n}in ${a.function?.[il].split("/").pop()}`,a=a.p;return{message:e.message+`
|
|
|
7
7
|
${i}
|
|
8
8
|
`,stack:e.stack?.split(`
|
|
9
9
|
`).filter(s=>!s.includes("svelte/src/internal")).join(`
|
|
10
|
-
`)}}}function fN(e){const t=Rb.get(e);t&&(wn(e,"message",{value:t.message}),wn(e,"stack",{value:t.stack}))}var Lb=~(sr|Zn|ar);function lt(e,t){e.f=e.f&Lb|t}function gl(e){(e.f&512)!==0||e.deps===null?lt(e,ar):lt(e,Zn)}function Id(e){if(e!==null)for(const t of e)(t.f&2)===0||(t.f&65536)===0||(t.f^=da,Id(t.deps))}function Pd(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),Id(e.deps),lt(e,ar)}var zb=!1,Ss=!1;function qb(e){var t=Ss;try{return Ss=!1,[e(),Ss]}finally{Ss=t}}var Es=null,_i=null,Ee=null,ga=null,Dt=null,yl=null,ya=!1,bl=!1,wi=null,xs=null,Md=0,hN=new Set,Ub=1,ki=class ld{id=Ub++;#e=!1;linked=!0;#t=null;#r=null;async_deriveds=new Map;current=new Map;previous=new Map;#n=new Set;#i=new Set;#a=0;#s=new Map;#o=null;#l=[];#u=[];#c=new Set;#d=new Set;#h=new Map;#p=new Set;is_fork=!1;#f=!1;constructor(){_i===null?Es=_i=this:(_i.#r=this,this.#t=_i),_i=this}#m(){if(this.is_fork)return!0;for(const n of this.#s.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)lt(i,sr),r(i);for(i of n.m)lt(i,Zn),r(i)}this.#p.add(t)}#v(){this.#e=!0,Md++>1e3&&(this.#b(),Bb());for(const l of this.#c)this.#d.delete(l),lt(l,sr),this.schedule(l);for(const l of this.#d)lt(l,Zn),this.schedule(l);const t=this.#l;this.#l=[],this.apply();var r=wi=[],n=[],i=xs=[];for(const l of t)try{this.#y(l,r,n)}catch(c){throw Rd(l),this.#m()||this.discard(),c}if(Ee=null,i.length>0){var a=ld.ensure();for(const l of i)a.schedule(l)}if(wi=null,xs=null,this.#m()){this.#g(n),this.#g(r);for(const[l,c]of this.#h)Nd(l,c);i.length>0&&Ee.#v();return}const s=this.#w();if(s){this.#g(n),this.#g(r),s.#_(this);return}this.#c.clear(),this.#d.clear();for(const l of this.#n)l(this);this.#n.clear(),ga=this,$d(n),$d(r),ga=null,this.#o?.resolve();var o=Ee;if(this.#a===0&&(this.#l.length===0||o!==null)&&(this.#b(),Yt&&(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^=ar;for(var i=t.first;i!==null;){var a=i.f,s=(a&96)!==0;if(!(s&&(a&1024)!==0||(a&8192)!==0||this.#h.has(i))&&i.fn!==null){s?i.f^=ar:(a&4)!==0?r.push(i):Yt&&(a&16777224)!==0?n.push(i):Sa(i)&&((a&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 a=this.async_deriveds.get(n);a&&i.promise.then(a.resolve).catch(a.reject)}this.transfer_effects(t.#c,t.#d);const r=n=>{var i=n.reactions;if(i!==null)for(const o of i){var a=o.f;if((a&2)!==0)r(o);else{var s=o;a&4194320&&!this.async_deriveds.has(s)&&(this.#d.delete(s),lt(s,sr),this.schedule(s))}}};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)Pd(t[r],this.#c,this.#d)}capture(t,r,n=!1){t.v!==dt&&!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{bl=!0,Ee=this,this.#v()}finally{Md=0,yl=null,wi=null,xs=null,bl=!1,Ee=null,Dt=null,Hn.clear()}}discard(){for(const t of this.#i)t(this);this.#i.clear(),this.#b(),this.#o?.resolve()}register_created_effect(t){this.#u.push(t)}#k(){for(let f=Es;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 a=new Set,s=new Map;for(var o of r)Fd(o,i,a,s);s=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&&_l(u,l,s)&&((u.f&4194320)!==0?(lt(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.#a+=1,t){let n=this.#s.get(r)??0;this.#s.set(r,n+1)}}decrement(t,r){if(this.#a-=1,t){let n=this.#s.get(r)??0;n===1?this.#s.delete(r):this.#s.set(r,n-1)}this.#f||(this.#f=!0,or(()=>{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.#o??=yd()).promise}static ensure(){if(Ee===null){const t=Ee=new ld;!bl&&!ya&&or(()=>{t.#e||t.flush()})}return Ee}apply(){if(!Yt||!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=Es;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(yl=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(wi!==null&&r===Te&&(Yt||(Oe===null||(Oe.f&2)===0)&&!zb))return;if((n&96)!==0){if((n&1024)===0)return;r.f^=ar}}this.#l.push(r)}#b(){if(this.linked){var t=this.#t,r=this.#r;t===null?Es=r:t.#r=r,r===null?_i=t:r.#t=t,this.linked=!1}}};function b(e){var t=ya;ya=!0;try{var r;for(e&&(Ee!==null&&!Ee.is_fork&&Ee.flush(),r=e());;){if(Nb(),Ee===null)return r;Ee.flush()}}finally{ya=t}}function Bb(){if(0){var e;for(const r of Ee.current.keys())for(const[n,i]of r.updated??[])var t}try{pb()}catch(r){kn(r,yl)}}var Lr=null;function $d(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&Sa(n)&&(Lr=new Set,Ti(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&nf(n),Lr?.size>0)){Hn.clear();for(const i of Lr){if((i.f&24576)!==0)continue;const a=[i];let s=i.parent;for(;s!==null;)Lr.has(s)&&(Lr.delete(s),a.push(s)),s=s.parent;for(let o=a.length-1;o>=0;o--){const l=a[o];(l.f&24576)===0&&Ti(l)}}Lr.clear()}}Lr=null}}function Fd(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const a=i.f;(a&2)!==0?Fd(i,t,r,n):(a&4194320)!==0&&(a&2048)===0&&_l(i,t,n)&&(lt(i,sr),wl(i))}}function _l(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(vs.call(t,i))return!0;if((i.f&2)!==0&&_l(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function wl(e){Ee.schedule(e)}function Nd(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),lt(e,ar);for(var r=e.first;r!==null;)Nd(r,t),r=r.next}}function Rd(e){lt(e,ar);for(var t=e.first;t!==null;)Rd(t),t=t.next}function kl(e){let t=0,r=Sn(0),n;return()=>{Ol()&&(d(r),xi(()=>(t===0&&(n=Re(()=>e(()=>zr(r)))),t+=1,()=>{or(()=>{t-=1,t===0&&(n?.(),n=void 0,zr(r))})})))}}var Vb=ua|gi;function jb(e,t,r,n){new Zb(e,t,r,n)}var Zb=class{parent;is_pending=!1;transform_error;#e;#t=ke?Ce:null;#r;#n;#i;#a=null;#s=null;#o=null;#l=null;#u=0;#c=0;#d=!1;#h=new Set;#p=new Set;#f=null;#m=kl(()=>(this.#f=Sn(this.#u),()=>{this.#f=null}));constructor(e,t,r,n){this.#e=e,this.#r=t,this.#n=i=>{var a=Te;a.b=this,a.f|=128,r(i)},this.parent=Te.b,this.transform_error=n??this.parent?.transform_error??(i=>i),this.#i=ka(()=>{if(ke){const i=this.#t;tn();const a=i.data==="[!";if(i.data.startsWith("[?")){const s=JSON.parse(i.data.slice(2));this.#y(s)}else a?this.#w():this.#v()}else this.#_()},Vb),ke&&(this.#e=Ce)}#v(){try{this.#a=zt(()=>this.#n(this.#e))}catch(e){this.error(e)}}#y(e){const t=this.#r.failed;t&&(this.#o=zt(()=>{t(this.#e,()=>e,()=>()=>{})}))}#w(){const e=this.#r.pending;e&&(this.is_pending=!0,this.#s=zt(()=>e(this.#e)),or(()=>{var t=this.#l=document.createDocumentFragment(),r=Lt();t.append(r),this.#a=this.#k(()=>zt(()=>this.#n(r))),this.#c===0&&(this.#e.before(t),this.#l=null,Gn(this.#s,()=>{this.#s=null}),this.#g(Ee))}))}#_(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#u=0,this.#a=zt(()=>{this.#n(this.#e)}),this.#c>0){var e=this.#l=document.createDocumentFragment();Pl(this.#a,e);const t=this.#r.pending;this.#s=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){Pd(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;ur(this.#i),qt(this.#i),bi(this.#i.ctx);try{return ki.ensure(),e()}catch(i){return Dd(i),null}finally{ur(t),qt(r),bi(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.#s&&Gn(this.#s,()=>{this.#s=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,or(()=>{this.#d=!1,this.#f&&Ei(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.#a&&Ee.skip_effect(this.#a),this.#s&&Ee.skip_effect(this.#s),this.#o&&Ee.skip_effect(this.#o),Ee.oncommit(()=>{this.#S(e)})):this.#S(e)}#S(e){this.#a&&(yt(this.#a),this.#a=null),this.#s&&(yt(this.#s),this.#s=null),this.#o&&(yt(this.#o),this.#o=null),ke&&(mt(this.#t),gt(),mt(ma()));var t=this.#r.onerror;let r=this.#r.failed;var n=!1,i=!1;const a=()=>{if(n){Tb();return}n=!0,i&&wb(),this.#o!==null&&Gn(this.#o,()=>{this.#o=null}),this.#k(()=>{this.#_()})},s=o=>{try{i=!0,t?.(o,a),i=!1}catch(l){kn(l,this.#i&&this.#i.parent)}r&&(this.#o=this.#k(()=>{try{return zt(()=>{var l=Te;l.b=this,l.f|=128,r(this.#e,()=>o,()=>a)})}catch(l){return kn(l,this.#i.parent),null}}))};or(()=>{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(s,l=>kn(l,this.#i&&this.#i.parent)):s(o)})}};function Ld(e,t,r,n){const i=va()?Si:Sl;var a=e.filter(h=>!h.settled),s=t.map(i);if(r.length===0&&a.length===0){n(s);return}var o=Te,l=Wb(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(h=>h.promise)):null;function f(h){if((o.f&16384)===0){l();try{n([...s,...h])}catch(g){kn(g,o)}Ts()}}var u=zd();if(r.length===0){c.then(()=>f([])).finally(u);return}function p(){Promise.all(r.map(h=>Gb(h))).then(f).catch(h=>kn(h,o)).finally(u)}c?c.then(()=>{l(),p(),Ts()}):p()}function Wb(){var e=Te,t=Oe,r=Ze,n=Ee;if(0)var i;return function(s=!0){ur(e),qt(t),bi(r),s&&(e.f&16384)===0&&(n?.activate(),n?.apply())}}function Ts(e=!0){ur(null),qt(null),bi(null),e&&Ee?.deactivate()}function zd(){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 Hb=null;function pN(e){Hb=e}var mN=new Set;function Si(e){var t=2|sr;return Te!==null&&(Te.f|=gi),{ctx:Ze,deps:null,effects:null,equals:xd,f:t,fn:e,reactions:null,rv:0,v:dt,wv:0,parent:Te,ac:null}}var As=Symbol("obsolete");function Gb(e,t,r){let n=Te;n===null&&cb();var i=void 0,a=Sn(dt),s=!Oe,o=new Set;return o_(()=>{var l=Te,c=yd();i=c.promise;try{Promise.resolve(e()).then(c.resolve,h=>{h!==ws&&c.reject(h)}).finally(Ts)}catch(h){c.reject(h),Ts()}var f=Ee;if(s){if((l.f&32768)!==0)var u=zd();if(n.b?.is_rendered())f.async_deriveds.get(l)?.reject(As);else for(const h of o.values())h.reject(As);o.add(c),f.async_deriveds.set(l,c)}const p=(h,g=void 0)=>{u?.(),o.delete(c),g!==As&&(f.activate(),g?(a.f|=_s,Ei(a,g)):((a.f&8388608)!==0&&(a.f^=_s),Ei(a,h)),f.deactivate())};c.promise.then(p,h=>p(null,h||"unknown"))}),Ps(()=>{for(const l of o)l.reject(As)}),new Promise(l=>{function c(f){function u(){f===i?l(a):c(i)}f.then(u,u)}c(i)})}function P(e){const t=Si(e);return Yt||lf(t),t}function Sl(e){const t=Si(e);return t.equals=Td,t}function Kb(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)yt(t[r])}}var vN=[];function El(e){var t,r=Te,n=e.parent;if(!rn&&n!==null&&e.v!==dt&&(n.f&24576)!==0)return kb(),e.v;ur(n);try{e.f&=~da,Kb(e),t=hf(e)}finally{ur(r)}return t}function qd(e){var t=El(e);if(!e.equals(t)&&(e.wv=df(),(!Ee?.is_fork||e.deps===null)&&(Ee!==null?(Ee.capture(e,t,!0),ga?.capture(e,t,!0)):e.v=t,e.deps===null))){lt(e,ar);return}rn||(Dt!==null?(Ol()||Ee?.is_fork)&&Dt.set(e,t):gl(e))}function Yb(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ws),t.fn!==null&&(t.teardown=qe),t.ac=null,Ea(t,0),Il(t))}function Ud(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Ti(t)}var ba=new Set,Hn=new Map;function gN(e){ba=e}var xl=!1;function Jb(){xl=!0}function Sn(e,t){var r={f:0,v:e,reactions:null,equals:xd,rv:0,wv:0};return r}function se(e,t){const r=Sn(e,t);return lf(r),r}function Bd(e,t=!1,r=!0){const n=Sn(e);return t||(n.equals=Td),yi&&r&&Ze!==null&&Ze.l!==null&&(Ze.l.s??=[]).push(n),n}function F(e,t,r=!1){Oe!==null&&(!kr||(Oe.f&131072)!==0)&&va()&&(Oe.f&4325394)!==0&&(qr===null||!qr.has(e))&&_b();let n=r?Pe(t):t;return Ei(e,n,xs)}function Ei(e,t,r=null){if(!e.equals(t)){Hn.set(e,rn?t:e.v);var n=ki.ensure();if(n.capture(e,t),(e.f&2)!==0){const i=e;(e.f&2048)!==0&&El(i),Dt===null&&gl(i)}e.wv=df(),jd(e,sr,r),va()&&Te!==null&&(Te.f&1024)!==0&&(Te.f&96)===0&&(cr===null?c_([e]):cr.push(e)),!n.is_fork&&ba.size>0&&!xl&&Vd()}return t}function Vd(){xl=!1;for(const e of ba){(e.f&1024)!==0&<(e,Zn);let t;try{t=Sa(e)}catch{t=!0}t&&Ti(e)}ba.clear()}function zr(e){F(e,e.v+1)}function jd(e,t,r){var n=e.reactions;if(n!==null)for(var i=va(),a=n.length,s=0;s<a;s++){var o=n[s],l=o.f;if(!(!i&&o===Te)){var c=(l&sr)===0;if(c&<(o,t),(l&131072)!==0)ba.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|=da),jd(f,Zn,r))}else if(c){var u=o;(l&16)!==0&&Lr!==null&&Lr.add(u),r!==null?r.push(u):wl(u)}}}}var Qb=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Pe(e){if(typeof e!="object"||e===null||Rr in e)return e;const t=bs(e);if(t!==vd&&t!==tb)return e;var r=new Map,n=ms(e),i=se(0),a=null,s=nn,o=u=>{if(nn===s)return u();var p=Oe,h=nn;qt(null),cf(s);var g=u();return qt(p),cf(h),g};n&&r.set("length",se(e.length,a));var l="";let c=!1;function f(u){if(!c){c=!0,l=u,Ad(i,`${l} version`);for(const[p,h]of r)Ad(h,Xb(l,p));c=!1}}return new Proxy(e,{defineProperty(u,p,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&yb();var g=r.get(p);return g===void 0?o(()=>{var v=se(h.value,a);return r.set(p,v),v}):F(g,h.value,!0),!0},deleteProperty(u,p){var h=r.get(p);if(h===void 0){if(p in u){const g=o(()=>se(dt,a));r.set(p,g),zr(i)}}else F(h,dt),zr(i);return!0},get(u,p,h){if(p===Rr)return e;var g=r.get(p),v=p in u;if(g===void 0&&(!v||Nr(u,p)?.writable)&&(g=o(()=>{var y=se(Pe(v?u[p]:dt),a);return y}),r.set(p,g)),g!==void 0){var m=d(g);return m===dt?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!==dt)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return h},has(u,p){if(p===Rr)return!0;var h=r.get(p),g=h!==void 0&&h.v!==dt||Reflect.has(u,p);return(h!==void 0||Te!==null&&(!g||Nr(u,p)?.writable))&&(h===void 0&&(h=o(()=>{var v=se(g?Pe(u[p]):dt,a);return v}),r.set(p,h)),d(h)===dt)?!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 E=r.get(y+"");E!==void 0?F(E,dt):y in u&&(E=o(()=>se(dt,a)),r.set(y+"",E))}if(v===void 0)(!m||Nr(u,p)?.writable)&&(v=o(()=>se(void 0,a)),F(v,Pe(h)),r.set(p,v));else{m=v.v!==dt;var S=o(()=>Pe(h));F(v,S)}var T=Reflect.getOwnPropertyDescriptor(u,p);if(T?.set&&T.set.call(g,h),!m){if(n&&typeof p=="string"){var A=r.get("length"),I=Number(p);Number.isInteger(I)&&I>=A.v&&F(A,I+1)}zr(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!==dt});for(var[h,g]of r)g.v!==dt&&!(h in u)&&p.push(h);return p},setPrototypeOf(){bb()}})}function Xb(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:Qb.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function _a(e){try{if(e!==null&&typeof e=="object"&&Rr in e)return e[Rr]}catch{}return e}function Zd(e,t){return Object.is(_a(e),_a(t))}var e_=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function yN(e){return new Proxy(e,{get(t,r,n){var i=Reflect.get(t,r,n);return e_.has(r)?function(...a){Jb();var s=i.apply(this,a);return Vd(),s}:i}})}function bN(){const e=Array.prototype,t=Array.__svelte_cleanup;t&&t();const{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(a,s){const o=r.call(this,a,s);if(o===-1){for(let l=s??0;l<this.length;l+=1)if(_a(this[l])===a){fl("array.indexOf(...)");break}}return o},e.lastIndexOf=function(a,s){const o=n.call(this,a,s??this.length-1);if(o===-1){for(let l=0;l<=(s??this.length-1);l+=1)if(_a(this[l])===a){fl("array.lastIndexOf(...)");break}}return o},e.includes=function(a,s){const o=i.call(this,a,s);if(!o){for(let l=0;l<this.length;l+=1)if(_a(this[l])===a){fl("array.includes(...)");break}}return o},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var Wd,t_,Tl,Hd,Gd;function Al(){if(Wd===void 0){Wd=window,t_=document,Tl=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Hd=Nr(t,"firstChild").get,Gd=Nr(t,"nextSibling").get,gd(e)&&(e[ul]=void 0,e[kd]=null,e[cl]=void 0,e.__e=void 0),gd(r)&&(r[dl]=void 0)}}function Lt(e=""){return document.createTextNode(e)}function Jt(e){return Hd.call(e)}function wr(e){return Gd.call(e)}function D(e,t){if(!ke)return Jt(e);var r=Jt(Ce);if(r===null)r=Ce.appendChild(Lt());else if(t&&r.nodeType!==3){var n=Lt();return r?.before(n),mt(n),n}return t&&Os(r),mt(r),r}function B(e,t=!1){if(!ke){var r=Jt(e);return r instanceof Comment&&r.data===""?wr(r):r}if(t){if(Ce?.nodeType!==3){var n=Lt();return Ce?.before(n),mt(n),n}Os(Ce)}return Ce}function V(e,t=1,r=!1){let n=ke?Ce:e;for(var i;t--;)i=n,n=wr(n);if(!ke)return n;if(r){if(n?.nodeType!==3){var a=Lt();return n===null?i?.after(a):n.before(a),mt(a),a}Os(n)}return mt(n),n}function Cl(e){e.textContent=""}function Kd(){return!Yt||Lr!==null?!1:(Te.f&ol)!==0}function Cs(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 r_(e=""){return document.createComment(e)}function Os(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 n_(e,t){if(t){const r=document.body;e.autofocus=!0,or(()=>{document.activeElement===r&&e.focus()})}}function i_(e){ke&&Jt(e)!==null&&Cl(e)}var Yd=!1;function Jd(){Yd||(Yd=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[fa]?.()})},{capture:!0}))}function Ds(e){var t=Oe,r=Te;qt(null),ur(null);try{return e()}finally{qt(t),ur(r)}}function Is(e,t,r,n=r){e.addEventListener(t,()=>Ds(r));const i=e[fa];i?e[fa]=()=>{i(),n(!0)}:e[fa]=()=>n(!0),Jd()}function Qd(e){Te===null&&(Oe===null&&hb(e),fb()),rn&&db(e)}function a_(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function lr(e,t){var r=Te;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)wi!==null?wi.push(n):ki.ensure().schedule(n);else if(t!==null){try{Ti(n)}catch(s){throw yt(n),s}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|=ua))}if(i!==null&&(i.parent=r,r!==null&&a_(i,r),Oe!==null&&(Oe.f&2)!==0&&(e&64)===0)){var a=Oe;(a.effects??=[]).push(i)}return n}function Ol(){return Oe!==null&&!kr}function Ps(e){const t=lr(8,null);return lt(t,ar),t.teardown=e,t}function ve(e){Qd("$effect");var t=Te.f;if(!Oe&&(t&32)!==0&&Ze!==null&&!Ze.i){var r=Ze;(r.e??=[]).push(e)}else return Xd(e)}function Xd(e){return lr(4|_d,e)}function Dl(e){return Qd("$effect.pre"),lr(8|_d,e)}function wa(e){ki.ensure();const t=lr(64|gi,e);return()=>{yt(t)}}function s_(e){ki.ensure();const t=lr(64|gi,e);return(r={})=>new Promise(n=>{r.outro?Gn(t,()=>{yt(t),n(void 0)}):(yt(t),n(void 0))})}function Ms(e){return lr(4,e)}function o_(e){return lr(sb|gi,e)}function xi(e,t=0){return lr(8|t,e)}function Y(e,t=[],r=[],n=[]){Ld(n,t,r,i=>{lr(8,()=>{e(...i.map(d))})})}function ka(e,t=0){var r=lr(16|t,e);return r}function ef(e,t=0){var r=lr(ib|t,e);return r}function zt(e){return lr(32|gi,e)}function tf(e){var t=e.teardown;if(t!==null){const r=rn,n=Oe;of(!0),qt(null);try{t.call(null)}finally{of(r),qt(n)}}}function Il(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Ds(()=>{i.abort(ws)});var n=r.next;(r.f&64)!==0?r.parent=null:yt(r,t),r=n}}function l_(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&yt(t),t=r}}function yt(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(rf(e.nodes.start,e.nodes.end),r=!0),e.f|=bd,Il(e,t&&!r),Ea(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const a of n)a.stop();tf(e),e.f^=bd,e.f|=ab;var i=e.parent;i!==null&&i.first!==null&&nf(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function rf(e,t){for(;e!==null;){var r=e===t?null:wr(e);e.remove(),e=r}}function nf(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=[];af(e,n,!0);var i=()=>{r&&yt(e),t&&t()},a=n.length;if(a>0){var s=()=>--a||i();for(var o of n)o.out(s)}else i()}function af(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 a=i.next;if((i.f&64)===0){var s=(i.f&65536)!==0||(i.f&32)!==0&&(e.f&16)!==0;af(i,t,s?r:!1)}i=a}}}function $s(e){sf(e,!0)}function sf(e,t){if((e.f&8192)!==0){e.f^=sl,(e.f&1024)===0&&(lt(e,sr),ki.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 a=e.nodes&&e.nodes.t;if(a!==null)for(const s of a)(s.is_global||t)&&s.in()}}function Pl(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:wr(r);t.append(r),r=i}}var u_=null,Fs=!1,rn=!1;function of(e){rn=e}var Oe=null,kr=!1;function qt(e){Oe=e}var Te=null;function ur(e){Te=e}var qr=null;function lf(e){Oe!==null&&(!Yt||(Oe.f&2)!==0)&&(qr??=new Set).add(e)}var Ut=null,Qt=0,cr=null;function c_(e){cr=e}var uf=1,Kn=0,nn=Kn;function cf(e){nn=e}function df(){return++uf}function Sa(e){var t=e.f;if((t&2048)!==0)return!0;if(t&2&&(e.f&=~da),(t&4096)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var a=r[i];if(Sa(a)&&qd(a),a.wv>e.wv)return!0}(t&512)!==0&&Dt===null&<(e,ar)}return!1}function ff(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!Yt&&qr!==null&&qr.has(e)))for(var i=0;i<n.length;i++){var a=n[i];(a.f&2)!==0?ff(a,t,!1):t===a&&(r?lt(a,sr):(a.f&1024)!==0&<(a,Zn),wl(a))}}function hf(e){var t=Ut,r=Qt,n=cr,i=Oe,a=qr,s=Ze,o=kr,l=nn,c=e.f;Ut=null,Qt=0,cr=null,Oe=(c&96)===0?e:null,qr=null,bi(e.ctx),kr=!1,nn=++Kn,e.ac!==null&&(Ds(()=>{e.ac.abort(ws)}),e.ac=null);try{e.f|=wd;var f=e.fn,u=f();e.f|=ol;var p=e.deps,h=Ee?.is_fork;if(Ut!==null){var g;if(h||Ea(e,Qt),p!==null&&Qt>0)for(p.length=Qt+Ut.length,g=0;g<Ut.length;g++)p[Qt+g]=Ut[g];else e.deps=p=Ut;if(Ol()&&(e.f&512)!==0)for(g=Qt;g<p.length;g++)(p[g].reactions??=[]).push(e)}else!h&&p!==null&&Qt<p.length&&(Ea(e,Qt),p.length=Qt);if(va()&&cr!==null&&!kr&&p!==null&&(e.f&6146)===0)for(g=0;g<cr.length;g++)ff(cr[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;cr!==null&&(n===null?n=cr:n.push(...cr))}return(e.f&8388608)!==0&&(e.f^=_s),u}catch(v){return Dd(v)}finally{e.f^=wd,Ut=t,Qt=r,cr=n,Oe=i,qr=a,bi(s),kr=o,nn=l}}function d_(e,t){let r=t.reactions;if(r!==null){var n=eb.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||!vs.call(Ut,t))){var a=t;(a.f&512)!==0&&(a.f^=512,a.f&=~da),a.v!==dt&&gl(a),Yb(a),Ea(a,0)}}function Ea(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)d_(e,r[n])}function Ti(e){var t=e.f;if((t&16384)===0){lt(e,ar);var r=Te,n=Fs;if(Te=e,Fs=!0,0)var i,a;try{(t&16777232)!==0?l_(e):Il(e),tf(e);var s=hf(e);if(e.teardown=typeof s=="function"?s:null,e.wv=uf,0)for(var o of e.deps);}finally{Fs=n,Te=r}}}async function pf(){if(Yt)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),b()}function d(e){var t=(e.f&2)!==0;if(u_?.add(e),Oe!==null&&!kr&&!(Te!==null&&(Te.f&16384)!==0)&&(qr===null||!qr.has(e))){var r=Oe.deps;if((Oe.f&2097152)!==0)e.rv<Kn&&(e.rv=Kn,Ut===null&&r!==null&&r[Qt]===e?Qt++:Ut===null?Ut=[e]:Ut.push(e));else{Oe.deps??=[],vs.call(Oe.deps,e)||Oe.deps.push(e);var n=e.reactions;n===null?e.reactions=[Oe]:vs.call(n,Oe)||n.push(Oe)}}if(0){if(!kr&&Hb&&!Hb.warned&&(Hb.effect.f&2097152)===0&&!Hb.effect_deps.has(e))var i;if(tN&&!kr&&aN!==null&&Oe!==null&&aN.reaction===Oe&&!e.trace){if(i)var a,s}}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||vf(o))&&(l=El(o)),Hn.set(o,l),l}var c=(o.f&512)===0&&!kr&&Oe!==null&&(Fs||(Oe.f&512)!==0),f=(o.f&ol)===0;Sa(o)&&(c&&(o.f|=512),qd(o)),c&&!f&&(Ud(o),mf(o))}if(Dt?.has(e))return Dt.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function mf(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&&(Ud(t),mf(t))}function vf(e){if(e.v===dt)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Hn.has(t)||(t.f&2)!==0&&vf(t))return!0;return!1}function Re(e){var t=kr;try{return kr=!0,e()}finally{kr=t}}function f_(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Rr in e)Ml(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Rr in r&&Ml(r)}}}function Ml(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{Ml(e[n],t)}catch{}const r=bs(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=md(r);for(let i in n){const a=n[i].get;if(a)try{a.call(e)}catch{}}}}}var xa=Symbol("events"),gf=new Set,$l=new Set;function Fl(e,t,r,n={}){function i(a){if(n.capture||Nl.call(t,a),!a.cancelBubble)return Ds(()=>r?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?or(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function bt(e,t,r,n={}){var i=Fl(t,e,r,n);return()=>{e.removeEventListener(t,i,n)}}function Ta(e,t,r,n,i){var a={capture:n,passive:i},s=Fl(e,t,r,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Ps(()=>{t.removeEventListener(e,s,a)})}function ut(e,t,r){(t[xa]??={})[e]=r}function Bt(e){for(var t=0;t<e.length;t++)gf.add(e[t]);for(var r of $l)r(e)}var yf=null;function Nl(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;yf=e;var s=0,o=yf===e&&e[xa];if(o){var l=i.indexOf(o);if(l!==-1&&(t===document||t===window)){e[xa]=t;return}var c=i.indexOf(t);if(c===-1)return;l<=c&&(s=l)}if(a=i[s]||e.target,a!==t){wn(e,"currentTarget",{configurable:!0,get(){return a||r}});var f=Oe,u=Te;qt(null),ur(null);try{for(var p,h=[];a!==null&&a!==t;){try{var g=a[xa]?.[n];g!=null&&(!a.disabled||e.target===a)&&g.call(a,e)}catch(v){p?h.push(v):p=v}if(e.cancelBubble)break;s++,a=s<i.length?i[s]:null}if(p){for(let v of h)queueMicrotask(()=>{throw v});throw p}}finally{e[xa]=t,delete e.currentTarget,qt(f),ur(u)}}}var h_=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function bf(e){return h_?.createHTML(e)??e}function p_(e){var t=Cs("template");return t.innerHTML=bf(e.replaceAll("<!>","<!---->")),t.content}function Sr(e,t){var r=Te;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function q(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,a=!e.startsWith("<!>");return()=>{if(ke)return Sr(Ce,null),Ce;i===void 0&&(i=p_(a?e:"<!>"+e),r||(i=Jt(i)));var s=n||Tl?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=Jt(s),l=s.lastChild;Sr(o,l)}else Sr(s,s);return s}}function Vt(e=""){if(!ke){var t=Lt(e+"");return Sr(t,t),t}var r=Ce;return r.nodeType!==3?(r.before(r=Lt()),mt(r)):Os(r),Sr(r,r),r}function ie(){if(ke)return Sr(Ce,null),Ce;var e=document.createDocumentFragment(),t=document.createComment(""),r=Lt();return e.append(t,r),Sr(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 vt(){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 m_=/\r/g;function v_(e){e=e.replace(m_,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}function g_(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}var y_=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function b_(e){return y_.includes(e)}var __=["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"],w_={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 k_(e){return e=e.toLowerCase(),w_[e]??e}var _N=[...__,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"],S_=["touchstart","touchmove"];function E_(e){return S_.includes(e)}var x_=["$state","$state.raw","$derived","$derived.by"],wN=[...x_,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function T_(e){return e?.replace(/\//g,"/")}var _f=!0;function Z(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[dl]??=e.nodeValue)&&(e[dl]=r,e.nodeValue=`${r}`)}function wf(e,t){return kf(e,t)}function A_(e,t){Al(),t.intro=t.intro??!1;const r=t.target,n=ke,i=Ce;try{for(var a=Jt(r);a&&(a.nodeType!==8||a.data!=="[");)a=wr(a);if(!a)throw jn;St(!0),mt(a);const s=kf(e,{...t,anchor:a});return St(!1),s}catch(s){if(s instanceof Error&&s.message.split(`
|
|
11
|
-
`).some(o=>o.startsWith("https://svelte.dev/e/")))throw s;return s!==jn&&console.warn("Failed to hydrate: ",s),t.recover===!1&&mb(),Al(),Cl(r),St(!1),wf(e,t)}finally{St(n),mt(i)}}var Ns=new Map;function kf(e,{target:t,anchor:r,props:n={},events:i,context:a,intro:s=!0,transformError:o}){Al();var l=void 0,c=s_(()=>{var f=r??t.appendChild(Lt());jb(f,{pending:()=>{}},h=>{te({});var
|
|
12
|
-
\r\f \v\uFEFF`];function N_(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 a=i.length,s=0;(s=n.indexOf(i,s))>=0;){var o=s+a;(s===0||Tf.includes(n[s-1]))&&(o===n.length||Tf.includes(n[o]))?n=(s===0?"":n.substring(0,s))+n.substring(o+1):s=o}}return n===""?null:n}function Af(e,t=!1){var r=t?" !important;":";",n="";for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==""&&(n+=" "+i+": "+a+r)}return n}function ql(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function R_(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 a=!1,s=0,o=!1,l=[];n&&l.push(...Object.keys(n).map(ql)),i&&l.push(...Object.keys(i).map(ql));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):a?a===p&&(a=!1):p==="/"&&e[u+1]==="*"?o=!0:p==='"'||p==="'"?a=p:p==="("?s++:p===")"&&s--,!o&&a===!1&&s===0){if(p===":"&&f===-1)f=u;else if(p===";"||u===v-1){if(f!==-1){var h=ql(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+=Af(n)),i&&(r+=Af(i,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function Et(e,t,r,n,i,a){var s=e[ul];if(ke||s!==r||s===void 0){var o=N_(r,n,a);(!ke||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):t?e.className=o:e.setAttribute("class",o)),e[ul]=r}else if(a&&i!==a)for(var l in a){var c=!!a[l];(i==null||c!==!!i[l])&&e.classList.toggle(l,c)}return a}function Ul(e,t={},r,n){for(var i in r){var a=r[i];t[i]!==a&&(r[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,n))}}function L_(e,t,r,n){var i=e[cl];if(ke||i!==t){var a=R_(t,n);(!ke||a!==e.getAttribute("style"))&&(a==null?e.removeAttribute("style"):e.style.cssText=a),e[cl]=t}else n&&(Array.isArray(n)?(Ul(e,r?.[0],n[0]),Ul(e,r?.[1],n[1],"important")):Ul(e,r,n));return n}function Ls(e,t,r=!1){if(e.multiple){if(t==null)return;if(!ms(t))return xb();for(var n of e.options)n.selected=t.includes(Oa(n));return}for(n of e.options)if(Zd(Oa(n),t)){n.selected=!0;return}(!r||t!==void 0)&&(e.selectedIndex=-1)}function Cf(e){var t=new MutationObserver(()=>{Ls(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Ps(()=>{t.disconnect()})}function z_(e,t,r=t){var n=new WeakSet,i=!0;Is(e,"change",a=>{var s=a?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(s),Oa);else{var l=e.querySelector(s)??e.querySelector("option:not([disabled])");o=l&&Oa(l)}r(o),e.__value=o,Ee!==null&&n.add(Ee)}),Ms(()=>{var a=t();if(e===document.activeElement){var s=Yt?ga:Ee;if(n.has(s))return}if(Ls(e,a,i),i&&a===void 0){var o=e.querySelector(":checked");o!==null&&(a=Oa(o),r(a))}e.__value=a,i=!1}),Cf(e)}function Oa(e){return"__value"in e?e.__value:e.value}var Da=Symbol("class"),Ia=Symbol("style"),Of=Symbol("is custom element"),Df=Symbol("is html"),q_=ha?"link":"LINK",If=ha?"input":"INPUT",U_=ha?"option":"OPTION",B_=ha?"select":"SELECT",V_=ha?"progress":"PROGRESS";function Ai(e){if(ke){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;pe(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;pe(e,"checked",null),e.checked=i}}};e[fa]=r,or(r),Jd()}}function Bl(e,t){var r=zs(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==V_)||(e.value=t??"")}function Pf(e,t){var r=zs(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function Mf(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function pe(e,t,r,n){var i=zs(e);if(ke&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===q_)){n||void 0;return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[ob]=r),r==null?e.removeAttribute(t):typeof r!="string"&&jl(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Tn(e,t,r){var n=Oe,i=Te;let a=ke;ke&&St(!1),qt(null),ur(null);try{t!=="style"&&(Vl.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?jl(e).includes(t):r&&typeof r=="object")?e[t]=r:pe(e,t,r==null?r:String(r))}finally{qt(n),ur(i),a&&St(!0)}}function j_(e,t,r,n,i=!1,a=!1){if(ke&&i&&e.nodeName===If){var s=e;(s.type==="checkbox"?"defaultChecked":"defaultValue")in r||Ai(s)}var o=zs(e),l=o[Of],c=!o[Df];let f=ke&&l;f&&St(!1);var u=t||{},p=e.nodeName===U_;for(var h in t)h in r||(r[h]=null);r.class?r.class=dr(r.class):(n||r[Da])&&(r.class=null),r[Ia]&&(r.style??=null);var g=jl(e);if(e.nodeName===If&&"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,pe(e,"type",v,a))}for(const I in r){let M=r[I];if(p&&I==="value"&&M==null){e.value=e.__value="",u[I]=M;continue}if(I==="class"){Et(e,e.namespaceURI==="http://www.w3.org/1999/xhtml",M,n,t?.[Da],r[Da]),u[I]=M,u[Da]=r[Da];continue}if(I==="style"){L_(e,M,t?.[Ia],r[Ia]),u[I]=M,u[Ia]=r[Ia];continue}var m=u[I];if(!(M===m&&!(M===void 0&&e.hasAttribute(I)))){u[I]=M;var y=I[0]+I[1];if(y!=="$$")if(y==="on"){const N={},j="$$"+I;let R=I.slice(2);var E=b_(R);if(g_(R)&&(R=R.slice(0,-7),N.capture=!0),!E&&m){if(M!=null)continue;e.removeEventListener(R,u[j],N),u[j]=null}if(E)ut(R,e,M),Bt([R]);else if(M!=null){let X=function(U){u[I].call(this,U)};var A=X;u[j]=Fl(R,e,X,N)}}else if(I==="style")pe(e,I,M);else if(I==="autofocus")n_(e,!!M);else if(!l&&(I==="__value"||I==="value"&&M!=null))e.value=e.__value=M;else if(I==="selected"&&p)Mf(e,M);else{var S=I;c||(S=k_(S));var T=S==="defaultValue"||S==="defaultChecked";if(M==null&&!l&&!T)if(o[I]=null,S==="value"||S==="checked"){let N=e;const j=t===void 0;if(S==="value"){let R=N.defaultValue;N.removeAttribute(S),N.defaultValue=R,N.value=N.__value=j?R:null}else{let R=N.defaultChecked;N.removeAttribute(S),N.defaultChecked=R,N.checked=j?R:!1}}else e.removeAttribute(I);else T||g.includes(S)&&(l||typeof M!="string")?(e[S]=M,S in o&&(o[S]=dt)):typeof M!="function"&&pe(e,S,M,a)}}}return f&&St(!0),u}function Ue(e,t,r=[],n=[],i=[],a,s=!1,o=!1){Ld(i,r,n,l=>{var c=void 0,f={},u=e.nodeName===B_,p=!1;if(ef(()=>{var g=t(...l.map(d)),v=j_(e,c,g,a,s,o);p&&u&&"value"in g&&Ls(e,g.value);for(let y of Object.getOwnPropertySymbols(f))g[y]||yt(f[y]);for(let y of Object.getOwnPropertySymbols(g)){var m=g[y];y.description==="@attach"&&(!c||m!==c[y])&&(f[y]&&yt(f[y]),f[y]=zt(()=>F_(e,()=>m))),v[y]=m}c=v}),u){var h=e;Ms(()=>{Ls(h,c.value,!0),Cf(h)})}p=!0})}function zs(e){return e[kd]??={[Of]:e.nodeName.includes("-"),[Df]:e.namespaceURI===Yy}}var Vl=new Map;function jl(e){var t=e.getAttribute("is")||e.nodeName,r=Vl.get(t);if(r)return r;Vl.set(t,r=[]);for(var n,i=e,a=Element.prototype;a!==i;){n=md(i);for(var s in n)n[s].set&&s!=="innerHTML"&&s!=="textContent"&&s!=="innerText"&&r.push(s);i=bs(i)}return r}function EN(e,t,r){}function Zl(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function $f(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function Z_(e,t){var r=$f(e.srcset),n=$f(t);return n.length===r.length&&n.every(([i,a],s)=>a===r[s][1]&&(Zl(r[s][0],i)||Zl(i,r[s][0])))}var Wl=null;function W_(){if(Wl===null){var e=Cs("select");e.innerHTML=bf("<option><span>t</span></option>"),Wl=e.firstChild?.firstChild?.nodeType===1}return Wl}function H_(e,t){var r=ke;W_()||(St(!1),e.textContent="",e.append(r_("")));try{t()}finally{r&&(ke?C(e):(St(!0),mt(e)))}}function qs(e,t,r=t){var n=new WeakSet;Is(e,"input",async i=>{var a=i?e.defaultValue:e.value;if(a=Gl(e)?Kl(a):a,r(a),Ee!==null&&n.add(Ee),await pf(),a!==(a=t())){var s=e.selectionStart,o=e.selectionEnd,l=e.value.length;if(e.value=a??"",o!==null){var c=e.value.length;s===o&&o===l&&c>l?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=s,e.selectionEnd=Math.min(o,c))}}}),(ke&&e.defaultValue!==e.value||Re(t)==null&&e.value)&&(r(Gl(e)?Kl(e.value):e.value),Ee!==null&&n.add(Ee)),xi(()=>{var i=t();if(e===document.activeElement){var a=Yt?ga:Ee;if(n.has(a))return}Gl(e)&&i===Kl(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}var Hl=new Set;function G_(e,t,r,n,i=n){var a=r.getAttribute("type")==="checkbox",s=e;let o=!1;if(t!==null)for(var l of t)s=s[l]??=[];s.push(r),Is(r,"change",()=>{var c=r.__value;a&&(c=Ff(s,c,r.checked)),i(c)},()=>i(a?[]:null)),xi(()=>{var c=n();if(ke&&r.defaultChecked!==r.checked){o=!0;return}a?(c=c||[],r.checked=c.includes(r.__value)):r.checked=Zd(r.__value,c)}),Ps(()=>{var c=s.indexOf(r);c!==-1&&s.splice(c,1)}),Hl.has(s)||(Hl.add(s),or(()=>{s.sort((c,f)=>c.compareDocumentPosition(f)===4?-1:1),Hl.delete(s)})),or(()=>{if(o){var c;a?c=Ff(s,c,r.checked):c=s.find(f=>f.checked)?.__value,i(c)}})}function K_(e,t,r=t){Is(e,"change",n=>{r(n?e.defaultChecked:e.checked)}),(ke&&e.defaultChecked!==e.checked||Re(t)==null)&&r(e.checked),xi(()=>{var n=t();e.checked=!!n})}function Ff(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 Gl(e){var t=e.type;return t==="number"||t==="range"}function Kl(e){return e===""?null:+e}function Yl(e,t){return e===t||e?.[Rr]===t}function Us(e={},t,r,n){var i=Ze.r,a=Te;return Ms(()=>{var s,o;return xi(()=>{s=o,o=n?.()||[],Re(()=>{Yl(r(...o),e)||(t(e,...o),s&&Yl(r(...s),e)&&t(null,...s))})}),()=>{let l=a;for(;l!==i&&l.parent!==null&&l.parent.f&33554432;)l=l.parent;const c=()=>{o&&Yl(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=()=>f_(t.s);if(e){let i=0,a={};const s=Si(()=>{let o=!1;const l=t.s;for(const c in l)l[c]!==a[c]&&(a[c]=l[c],o=!0);return o&&i++,i});n=()=>d(s)}r.b.length&&Dl(()=>{Nf(t,n),al(r.b)}),ve(()=>{const i=Re(()=>r.m.map(rb));return()=>{for(const a of i)typeof a=="function"&&a()}}),r.a.length&&ve(()=>{Nf(t,n),al(r.a)})}function Nf(e,t){if(e.l.s)for(const r of e.l.s)d(r);t()}var Y_={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},Y_)}var J_={get(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(la(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];la(i)&&(i=i());const a=Nr(i,t);if(a&&a.set)return a.set(r),!0}return!1},getOwnPropertyDescriptor(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(la(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n){const i=Nr(n,t);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,t){if(t===Rr||t===ll)return!1;for(let r of e.props)if(la(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(la(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},J_)}function _(e,t,r,n){var i=!yi||(r&2)!==0,a=(r&8)!==0,s=(r&16)!==0,o=n,l=!0,c=void 0,f=()=>s&&i?(c??=Si(n),d(c)):(l&&(l=!1,o=s?Re(n):n),o);let u;if(a){var p=Rr in e||ll in e;u=Nr(e,t)?.set??(p&&t in e?T=>e[t]=T:void 0)}var h,g=!1;a?[h,g]=qb(()=>e[t]):h=e[t],h===void 0&&n!==void 0&&(h=f(),u&&(i&&vb(t),u(h)));var v;if(i?v=()=>{var T=e[t];return T===void 0?f():(l=!0,T)}:v=()=>{var T=e[t];return T!==void 0&&(o=void 0),T===void 0?o:T},i&&(r&4)===0)return v;if(u){var m=e.$$legacy;return(function(T,A){return arguments.length>0?((!i||!A||m||g)&&u(A?v():T),T):v()})}var y=!1,E=((r&1)!==0?Si:Sl)(()=>(y=!1,v()));a&&d(E);var S=Te;return(function(T,A){if(arguments.length>0){const I=A?d(E):i&&a?Pe(T):T;return F(E,I),y=!0,o!==void 0&&(o=I),T}return rn&&y||(S.f&16384)!==0?E.v:d(E)})}function Q_(e){return new X_(e)}var X_=class{#e;#t;constructor(e){var t=new Map,r=(i,a)=>{var s=Bd(a,!1,!1);return t.set(i,s),s};const n=new Proxy({...e.props||{},$$events:{}},{get(i,a){return d(t.get(a)??r(a,Reflect.get(i,a)))},has(i,a){return a===ll?!0:(d(t.get(a)??r(a,Reflect.get(i,a))),Reflect.has(i,a))},set(i,a,s){return F(t.get(a)??r(a,s),s),Reflect.set(i,a,s)}});this.#t=(e.hydrate?A_:wf)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!Yt&&(!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(a){this.#t[i]=a},enumerable:!0});this.#t.$set=i=>{Object.assign(n,i)},this.#t.$destroy=()=>{C_(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()}},Rf;typeof HTMLElement=="function"&&(Rf=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 a=>{const s=Cs("slot");i!=="default"&&(s.name=i),x(a,s)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=ew(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 a=this.$$g_p(i.name);a in this.$$d||(this.$$d[a]=Bs(a,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=Q_({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=wa(()=>{xi(()=>{this.$$r=!0;for(const i of ys(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const a=Bs(i,this.$$d[i],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,a)}this.$$r=!1})});for(const i in this.$$l)for(const a of this.$$l[i]){const s=this.$$c.$on(i,a);this.$$l_u.set(a,s)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Bs(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 ys(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Bs(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 ew(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ne(e,t,r,n,i,a){let s=class extends Rf{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return ys(t).map(o=>(t[o].attribute||o).toLowerCase())}};return ys(t).forEach(o=>{wn(s.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){l=Bs(o,l,t),this.$$d[o]=l;var c=this.$$c;c&&(Nr(c,o)?.get?c[o]=l:c.$set({[o]:l}))}})}),n.forEach(o=>{wn(s.prototype,o,{get(){return this.$$c?.[o]}})}),a&&(s=a(s)),e.element=s,s}function tw(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 rw={"quantity.remove":"Remove item","quantity.remove.label":"✕","cart.item.remove":"✕","common.table.donation":"Donation","cart.donation.title":"Donation","donations.checkbox.label":"Add a {{amount}} donation to {{campaign}}"},nw={"quantity.remove":"Artikel entfernen","quantity.remove.label":"✕","cart.item.remove":"✕","common.table.donation":"Spende","cart.donation.title":"Spende","donations.checkbox.label":"{{amount}} für {{campaign}} spenden"},iw={en:rw,de:nw},Lf={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:ow,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:lw,cart:()=>"/#/cart",annualTicketPersonalizationForm:(e,t)=>`/#/tickets/annual/personalisation/${e}/${t}`,annualTicketPersonalizationList:e=>`/#/tickets/annual/personalisation/${e}`,annualTicketPersonalizationFormSubmit:e=>`/#/tickets/annual/personalisation/${e}`},aw={...Lf,checkoutSuccess:e=>`/checkout/success/?token=${e}`,checkoutFailure:e=>`/checkout/failure?error=${e}`};function sw(e){return e==="angular"?Lf:aw}function ow(e){return`/#/products/events?category_id=${(k.settings?.multipleEventsMenuItems.event_groups[e]||[]).join("&category_id=")}`}function lw(e){return`/#/products/tours?category_id=${(k.settings?.multipleToursMenuItems.tour_groups[e]||[]).join("&category_id=")}`}function uw(e){return new Promise(t=>setTimeout(t,e))}function zf(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function cw(e){return typeof e=="boolean"}function Ql(e,t=1e3){return new Promise((r,n)=>{const i=Date.now(),a=20,s=()=>{try{const o=e();if(o){r(o);return}if(Date.now()-i>=t){n(new Error("Timeout reached without truthy value"));return}setTimeout(s,a)}catch(o){n(o)}};s()})}var Xl=Array.isArray,qf=e=>!!e&&e.constructor===Object,dw=e=>!!(e&&e.constructor&&e.call&&e.apply),fw=e=>typeof e=="string"||e instanceof String,hw=e=>{try{return Number(e)===e}catch{return!1}},pw=e=>!(!e||!e.then||!dw(e.then)),mw=(e,t)=>e.reduce((r,n)=>{const i=t(n);return r[i]||(r[i]=[]),r[i].push(n),r},{}),Uf=(e,t)=>!e||(e.length??0)===0?null:e.reduce(t);function fr(e,t){return(e||[]).reduce((r,n)=>r+(t?t(n):n),0)}var Bf=(e,t,r=!1)=>{if(!e)return[];const n=(a,s)=>t(a)-t(s),i=(a,s)=>t(s)-t(a);return e.slice().sort(r===!0?i:n)};function vw(e,t){const r=t??(n=>n);return Uf(e,(n,i)=>r(n)>r(i)?n:i)}function eu(e,t){const r=t??(n=>n);return Uf(e,(n,i)=>r(n)<r(i)?n:i)}var gw=(e,t)=>{const r=e.reduce((n,i)=>{const a=t?t(i):i;return n[a]||(n[a]=i),n},{});return Object.values(r)},Vf=(e,t,r)=>{let n=r;for(let i=1;i<=e;i++)n=t(n,i);return n},yw=(e,t)=>e?!t||t.length===0?e:t.reduce((r,n)=>(delete r[n],r),{...e}):{},jt=(e,t)=>!e||!t?e??t??{}:Object.entries({...e,...t}).reduce((r,[n,i])=>({...r,[n]:qf(e[n])?jt(e[n],i):i}),{}),jf=class{#e=se(Pe({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&&zf(this.data.uid))}isGuest(){return!!(this.data.uid&&!zf(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(!(qf(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)}},bw=class{auth;constructor(e){this.auth=e}onRequest({request:e}){const{uid:t,client:r,accessToken:n,expiry:i}=this.auth.data,a=e.headers;t&&!a.has("uid")&&a.set("uid",t),r&&!a.has("client")&&a.set("client",r),n&&!a.has("access-token")&&a.set("access-token",n),i&&!a.has("expiry")&&a.set("expiry",String(i)),n&&!a.has("token-type")&&a.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}},Zf;function Q(e,t,r){function n(o,l){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),o._zod.traits.has(e))return;o._zod.traits.add(e),t(o,l);const c=s.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 a extends i{}Object.defineProperty(a,"name",{value:e});function s(o){var l;const c=r?.Parent?new a:this;n(c,o),(l=c._zod).deferred??(l.deferred=[]);for(const f of c._zod.deferred)f();return c}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:o=>r?.Parent&&o instanceof r.Parent?!0:o?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var Ci=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Wf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Zf=globalThis).__zod_globalConfig??(Zf.__zod_globalConfig={});var Vs=globalThis.__zod_globalConfig;function Yn(e){return e&&Object.assign(Vs,e),Vs}function Hf(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 _w(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 Gf=Symbol("evaluating");function We(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Gf)return n===void 0&&(n=Gf,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 Kf(e){return JSON.stringify(e)}function ww(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Yf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function js(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var kw=ru(()=>{if(Vs.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function Pa(e){if(js(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(js(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Jf(e){return Pa(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Sw=new Set(["string","number","symbol"]);function Zs(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 Ew(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var xw={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 Tw(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 a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=r.shape[a])}return Jn(this,"shape",i),i},checks:[]}))}function Aw(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 a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return Jn(this,"shape",i),i},checks:[]}))}function Cw(e,t){if(!Pa(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 Ow(e,t){if(!Pa(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 Dw(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 Iw(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,a={...i};if(r)for(const s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(a[s]=e?new e({type:"optional",innerType:i[s]}):i[s])}else for(const s in i)a[s]=e?new e({type:"optional",innerType:i[s]}):i[s];return Jn(this,"shape",a),a},checks:[]}))}function Pw(e,t,r){return On(t,Cn(t._zod.def,{get shape(){const n=t._zod.def.shape,i={...n};if(r)for(const a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(const a in n)i[a]=new e({type:"nonoptional",innerType:n[a]});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 Mw(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 Qf(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Ws(e){return typeof e=="string"?e:e?.message}function Qn(e,t,r){const n=e.message?e.message:Ws(e.inst?._zod.def?.error?.(e))??Ws(t?.error?.(e))??Ws(r.customError?.(e))??Ws(r.localeError?.(e))??"Invalid input",{inst:i,continue:a,input:s,...o}=e;return o.path??(o.path=[]),o.message=n,t?.reportInput&&(o.input=s),o}function au(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ma(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}var Xf=(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})},eh=Q("$ZodError",Xf),th=Q("$ZodError",Xf,{Parent:Error});function $w(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 Fw(e,t=r=>r.message){const r={_errors:[]},n=(i,a=[])=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>n({issues:o},[...a,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...a,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...a,...s.path]);else{const o=[...a,...s.path];if(o.length===0)r._errors.push(t(s));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(s))),l=l[f],c++}}}};return n(e),r}var su=e=>(t,r,n,i)=>{const a=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new Ci;if(s.issues.length){const o=new(i?.Err??e)(s.issues.map(l=>Qn(l,a,Yn())));throw Yf(o,i?.callee),o}return s.value},ou=e=>async(t,r,n,i)=>{const a=n?{...n,async:!0}:{async:!0};let s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){const o=new(i?.Err??e)(s.issues.map(l=>Qn(l,a,Yn())));throw Yf(o,i?.callee),o}return s.value},Hs=e=>(t,r,n)=>{const i=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new Ci;return a.issues.length?{success:!1,error:new(e??eh)(a.issues.map(s=>Qn(s,i,Yn())))}:{success:!0,data:a.value}},Nw=Hs(th),Gs=e=>async(t,r,n)=>{const i=n?{...n,async:!0}:{async:!0};let a=t._zod.run({value:r,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(s=>Qn(s,i,Yn())))}:{success:!0,data:a.value}},Rw=Gs(th),Lw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return su(e)(t,r,i)},zw=e=>(t,r,n)=>su(e)(t,r,n),qw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return ou(e)(t,r,i)},Uw=e=>async(t,r,n)=>ou(e)(t,r,n),Bw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Hs(e)(t,r,i)},Vw=e=>(t,r,n)=>Hs(e)(t,r,n),jw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Gs(e)(t,r,i)},Zw=e=>async(t,r,n)=>Gs(e)(t,r,n),Ww=/^[cC][0-9a-z]{6,}$/,Hw=/^[0-9a-z]+$/,Gw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Kw=/^[0-9a-vA-V]{20}$/,Yw=/^[A-Za-z0-9]{27}$/,Jw=/^[a-zA-Z0-9_-]{21}$/,Qw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Xw=/^([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})$/,rh=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)$/,e0=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,t0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function r0(){return new RegExp(t0,"u")}var 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])$/,i0=/^(([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}|:))$/,a0=/^((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])$/,s0=/^(([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])$/,o0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,nh=/^[A-Za-z0-9_-]*$/,l0=/^https?$/,u0=/^\+[1-9]\d{6,14}$/,ih="(?:(?:\\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])))",c0=new RegExp(`^${ih}$`);function ah(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 d0(e){return new RegExp(`^${ah(e)}$`)}function f0(e){const t=ah({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(`^${ih}T(?:${n})$`)}var h0=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},p0=/^-?\d+$/,m0=/^-?\d+(?:\.\d+)?$/,v0=/^[^A-Z]*$/,g0=/^[^a-z]*$/,Zt=Q("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),sh={number:"number",bigint:"bigint",object:"date"},oh=Q("$ZodCheckLessThan",(e,t)=>{Zt.init(e,t);const r=sh[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,a=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<a&&(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})}}),lh=Q("$ZodCheckGreaterThan",(e,t)=>{Zt.init(e,t);const r=sh[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,a=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(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})}}),y0=Q("$ZodCheckMultipleOf",(e,t)=>{Zt.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):_w(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})}}),b0=Q("$ZodCheckNumberFormat",(e,t)=>{Zt.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[i,a]=xw[t.format];e._zod.onattach.push(s=>{const o=s._zod.bag;o.format=t.format,o.minimum=i,o.maximum=a,r&&(o.pattern=p0)}),e._zod.check=s=>{const o=s.value;if(r){if(!Number.isInteger(o)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});return}if(!Number.isSafeInteger(o)){o>0?s.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}):s.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&&s.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),o>a&&s.issues.push({origin:"number",input:o,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),_0=Q("$ZodCheckMaxLength",(e,t)=>{var r;Zt.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 a=au(i);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),w0=Q("$ZodCheckMinLength",(e,t)=>{var r;Zt.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 a=au(i);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),k0=Q("$ZodCheckLengthEquals",(e,t)=>{var r;Zt.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,a=i.length;if(a===t.length)return;const s=au(i),o=a>t.length;n.issues.push({origin:s,...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})}}),Ks=Q("$ZodCheckStringFormat",(e,t)=>{var r,n;Zt.init(e,t),e._zod.onattach.push(i=>{const a=i._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.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=()=>{})}),S0=Q("$ZodCheckRegex",(e,t)=>{Ks.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})}}),E0=Q("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=v0),Ks.init(e,t)}),x0=Q("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=g0),Ks.init(e,t)}),T0=Q("$ZodCheckIncludes",(e,t)=>{Zt.init(e,t);const r=Zs(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(i=>{const a=i._zod.bag;a.patterns??(a.patterns=new Set),a.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})}}),A0=Q("$ZodCheckStartsWith",(e,t)=>{Zt.init(e,t);const r=new RegExp(`^${Zs(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})}}),C0=Q("$ZodCheckEndsWith",(e,t)=>{Zt.init(e,t);const r=new RegExp(`.*${Zs(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})}}),O0=Q("$ZodCheckOverwrite",(e,t)=>{Zt.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),D0=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 fN(e){const t=Rb.get(e);t&&(wn(e,"message",{value:t.message}),wn(e,"stack",{value:t.stack}))}var Lb=~(sr|Zn|ar);function lt(e,t){e.f=e.f&Lb|t}function gl(e){(e.f&512)!==0||e.deps===null?lt(e,ar):lt(e,Zn)}function Id(e){if(e!==null)for(const t of e)(t.f&2)===0||(t.f&65536)===0||(t.f^=da,Id(t.deps))}function Pd(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),Id(e.deps),lt(e,ar)}var zb=!1,Ss=!1;function qb(e){var t=Ss;try{return Ss=!1,[e(),Ss]}finally{Ss=t}}var Es=null,_i=null,Ee=null,ga=null,Dt=null,yl=null,ya=!1,bl=!1,wi=null,xs=null,Md=0,hN=new Set,Ub=1,ki=class ld{id=Ub++;#e=!1;linked=!0;#t=null;#r=null;async_deriveds=new Map;current=new Map;previous=new Map;#n=new Set;#i=new Set;#a=0;#s=new Map;#o=null;#l=[];#u=[];#c=new Set;#d=new Set;#h=new Map;#p=new Set;is_fork=!1;#f=!1;constructor(){_i===null?Es=_i=this:(_i.#r=this,this.#t=_i),_i=this}#m(){if(this.is_fork)return!0;for(const n of this.#s.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)lt(i,sr),r(i);for(i of n.m)lt(i,Zn),r(i)}this.#p.add(t)}#v(){this.#e=!0,Md++>1e3&&(this.#b(),Bb());for(const l of this.#c)this.#d.delete(l),lt(l,sr),this.schedule(l);for(const l of this.#d)lt(l,Zn),this.schedule(l);const t=this.#l;this.#l=[],this.apply();var r=wi=[],n=[],i=xs=[];for(const l of t)try{this.#y(l,r,n)}catch(c){throw Rd(l),this.#m()||this.discard(),c}if(Ee=null,i.length>0){var a=ld.ensure();for(const l of i)a.schedule(l)}if(wi=null,xs=null,this.#m()){this.#g(n),this.#g(r);for(const[l,c]of this.#h)Nd(l,c);i.length>0&&Ee.#v();return}const s=this.#w();if(s){this.#g(n),this.#g(r),s.#_(this);return}this.#c.clear(),this.#d.clear();for(const l of this.#n)l(this);this.#n.clear(),ga=this,$d(n),$d(r),ga=null,this.#o?.resolve();var o=Ee;if(this.#a===0&&(this.#l.length===0||o!==null)&&(this.#b(),Yt&&(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^=ar;for(var i=t.first;i!==null;){var a=i.f,s=(a&96)!==0;if(!(s&&(a&1024)!==0||(a&8192)!==0||this.#h.has(i))&&i.fn!==null){s?i.f^=ar:(a&4)!==0?r.push(i):Yt&&(a&16777224)!==0?n.push(i):Sa(i)&&((a&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 a=this.async_deriveds.get(n);a&&i.promise.then(a.resolve).catch(a.reject)}this.transfer_effects(t.#c,t.#d);const r=n=>{var i=n.reactions;if(i!==null)for(const o of i){var a=o.f;if((a&2)!==0)r(o);else{var s=o;a&4194320&&!this.async_deriveds.has(s)&&(this.#d.delete(s),lt(s,sr),this.schedule(s))}}};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)Pd(t[r],this.#c,this.#d)}capture(t,r,n=!1){t.v!==dt&&!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{bl=!0,Ee=this,this.#v()}finally{Md=0,yl=null,wi=null,xs=null,bl=!1,Ee=null,Dt=null,Hn.clear()}}discard(){for(const t of this.#i)t(this);this.#i.clear(),this.#b(),this.#o?.resolve()}register_created_effect(t){this.#u.push(t)}#k(){for(let f=Es;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 a=new Set,s=new Map;for(var o of r)Fd(o,i,a,s);s=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&&_l(u,l,s)&&((u.f&4194320)!==0?(lt(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.#a+=1,t){let n=this.#s.get(r)??0;this.#s.set(r,n+1)}}decrement(t,r){if(this.#a-=1,t){let n=this.#s.get(r)??0;n===1?this.#s.delete(r):this.#s.set(r,n-1)}this.#f||(this.#f=!0,or(()=>{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.#o??=yd()).promise}static ensure(){if(Ee===null){const t=Ee=new ld;!bl&&!ya&&or(()=>{t.#e||t.flush()})}return Ee}apply(){if(!Yt||!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=Es;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(yl=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(wi!==null&&r===Te&&(Yt||(Oe===null||(Oe.f&2)===0)&&!zb))return;if((n&96)!==0){if((n&1024)===0)return;r.f^=ar}}this.#l.push(r)}#b(){if(this.linked){var t=this.#t,r=this.#r;t===null?Es=r:t.#r=r,r===null?_i=t:r.#t=t,this.linked=!1}}};function b(e){var t=ya;ya=!0;try{var r;for(e&&(Ee!==null&&!Ee.is_fork&&Ee.flush(),r=e());;){if(Nb(),Ee===null)return r;Ee.flush()}}finally{ya=t}}function Bb(){if(0){var e;for(const r of Ee.current.keys())for(const[n,i]of r.updated??[])var t}try{pb()}catch(r){kn(r,yl)}}var Lr=null;function $d(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&Sa(n)&&(Lr=new Set,Ti(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&nf(n),Lr?.size>0)){Hn.clear();for(const i of Lr){if((i.f&24576)!==0)continue;const a=[i];let s=i.parent;for(;s!==null;)Lr.has(s)&&(Lr.delete(s),a.push(s)),s=s.parent;for(let o=a.length-1;o>=0;o--){const l=a[o];(l.f&24576)===0&&Ti(l)}}Lr.clear()}}Lr=null}}function Fd(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const a=i.f;(a&2)!==0?Fd(i,t,r,n):(a&4194320)!==0&&(a&2048)===0&&_l(i,t,n)&&(lt(i,sr),wl(i))}}function _l(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(vs.call(t,i))return!0;if((i.f&2)!==0&&_l(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function wl(e){Ee.schedule(e)}function Nd(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),lt(e,ar);for(var r=e.first;r!==null;)Nd(r,t),r=r.next}}function Rd(e){lt(e,ar);for(var t=e.first;t!==null;)Rd(t),t=t.next}function kl(e){let t=0,r=Sn(0),n;return()=>{Ol()&&(d(r),xi(()=>(t===0&&(n=Re(()=>e(()=>zr(r)))),t+=1,()=>{or(()=>{t-=1,t===0&&(n?.(),n=void 0,zr(r))})})))}}var Vb=ua|gi;function jb(e,t,r,n){new Zb(e,t,r,n)}var Zb=class{parent;is_pending=!1;transform_error;#e;#t=ke?Ce:null;#r;#n;#i;#a=null;#s=null;#o=null;#l=null;#u=0;#c=0;#d=!1;#h=new Set;#p=new Set;#f=null;#m=kl(()=>(this.#f=Sn(this.#u),()=>{this.#f=null}));constructor(e,t,r,n){this.#e=e,this.#r=t,this.#n=i=>{var a=Te;a.b=this,a.f|=128,r(i)},this.parent=Te.b,this.transform_error=n??this.parent?.transform_error??(i=>i),this.#i=ka(()=>{if(ke){const i=this.#t;tn();const a=i.data==="[!";if(i.data.startsWith("[?")){const s=JSON.parse(i.data.slice(2));this.#y(s)}else a?this.#w():this.#v()}else this.#_()},Vb),ke&&(this.#e=Ce)}#v(){try{this.#a=zt(()=>this.#n(this.#e))}catch(e){this.error(e)}}#y(e){const t=this.#r.failed;t&&(this.#o=zt(()=>{t(this.#e,()=>e,()=>()=>{})}))}#w(){const e=this.#r.pending;e&&(this.is_pending=!0,this.#s=zt(()=>e(this.#e)),or(()=>{var t=this.#l=document.createDocumentFragment(),r=Lt();t.append(r),this.#a=this.#k(()=>zt(()=>this.#n(r))),this.#c===0&&(this.#e.before(t),this.#l=null,Gn(this.#s,()=>{this.#s=null}),this.#g(Ee))}))}#_(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#u=0,this.#a=zt(()=>{this.#n(this.#e)}),this.#c>0){var e=this.#l=document.createDocumentFragment();Pl(this.#a,e);const t=this.#r.pending;this.#s=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){Pd(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;ur(this.#i),qt(this.#i),bi(this.#i.ctx);try{return ki.ensure(),e()}catch(i){return Dd(i),null}finally{ur(t),qt(r),bi(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.#s&&Gn(this.#s,()=>{this.#s=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,or(()=>{this.#d=!1,this.#f&&Ei(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.#a&&Ee.skip_effect(this.#a),this.#s&&Ee.skip_effect(this.#s),this.#o&&Ee.skip_effect(this.#o),Ee.oncommit(()=>{this.#S(e)})):this.#S(e)}#S(e){this.#a&&(yt(this.#a),this.#a=null),this.#s&&(yt(this.#s),this.#s=null),this.#o&&(yt(this.#o),this.#o=null),ke&&(mt(this.#t),gt(),mt(ma()));var t=this.#r.onerror;let r=this.#r.failed;var n=!1,i=!1;const a=()=>{if(n){Tb();return}n=!0,i&&wb(),this.#o!==null&&Gn(this.#o,()=>{this.#o=null}),this.#k(()=>{this.#_()})},s=o=>{try{i=!0,t?.(o,a),i=!1}catch(l){kn(l,this.#i&&this.#i.parent)}r&&(this.#o=this.#k(()=>{try{return zt(()=>{var l=Te;l.b=this,l.f|=128,r(this.#e,()=>o,()=>a)})}catch(l){return kn(l,this.#i.parent),null}}))};or(()=>{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(s,l=>kn(l,this.#i&&this.#i.parent)):s(o)})}};function Ld(e,t,r,n){const i=va()?Si:Sl;var a=e.filter(h=>!h.settled),s=t.map(i);if(r.length===0&&a.length===0){n(s);return}var o=Te,l=Wb(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(h=>h.promise)):null;function f(h){if((o.f&16384)===0){l();try{n([...s,...h])}catch(y){kn(y,o)}Ts()}}var u=zd();if(r.length===0){c.then(()=>f([])).finally(u);return}function p(){Promise.all(r.map(h=>Gb(h))).then(f).catch(h=>kn(h,o)).finally(u)}c?c.then(()=>{l(),p(),Ts()}):p()}function Wb(){var e=Te,t=Oe,r=Ze,n=Ee;if(0)var i;return function(s=!0){ur(e),qt(t),bi(r),s&&(e.f&16384)===0&&(n?.activate(),n?.apply())}}function Ts(e=!0){ur(null),qt(null),bi(null),e&&Ee?.deactivate()}function zd(){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 Hb=null;function pN(e){Hb=e}var mN=new Set;function Si(e){var t=2|sr;return Te!==null&&(Te.f|=gi),{ctx:Ze,deps:null,effects:null,equals:xd,f:t,fn:e,reactions:null,rv:0,v:dt,wv:0,parent:Te,ac:null}}var As=Symbol("obsolete");function Gb(e,t,r){let n=Te;n===null&&cb();var i=void 0,a=Sn(dt),s=!Oe,o=new Set;return o_(()=>{var l=Te,c=yd();i=c.promise;try{Promise.resolve(e()).then(c.resolve,h=>{h!==ws&&c.reject(h)}).finally(Ts)}catch(h){c.reject(h),Ts()}var f=Ee;if(s){if((l.f&32768)!==0)var u=zd();if(n.b?.is_rendered())f.async_deriveds.get(l)?.reject(As);else for(const h of o.values())h.reject(As);o.add(c),f.async_deriveds.set(l,c)}const p=(h,y=void 0)=>{u?.(),o.delete(c),y!==As&&(f.activate(),y?(a.f|=_s,Ei(a,y)):((a.f&8388608)!==0&&(a.f^=_s),Ei(a,h)),f.deactivate())};c.promise.then(p,h=>p(null,h||"unknown"))}),Ps(()=>{for(const l of o)l.reject(As)}),new Promise(l=>{function c(f){function u(){f===i?l(a):c(i)}f.then(u,u)}c(i)})}function P(e){const t=Si(e);return Yt||lf(t),t}function Sl(e){const t=Si(e);return t.equals=Td,t}function Kb(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)yt(t[r])}}var vN=[];function El(e){var t,r=Te,n=e.parent;if(!rn&&n!==null&&e.v!==dt&&(n.f&24576)!==0)return kb(),e.v;ur(n);try{e.f&=~da,Kb(e),t=hf(e)}finally{ur(r)}return t}function qd(e){var t=El(e);if(!e.equals(t)&&(e.wv=df(),(!Ee?.is_fork||e.deps===null)&&(Ee!==null?(Ee.capture(e,t,!0),ga?.capture(e,t,!0)):e.v=t,e.deps===null))){lt(e,ar);return}rn||(Dt!==null?(Ol()||Ee?.is_fork)&&Dt.set(e,t):gl(e))}function Yb(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ws),t.fn!==null&&(t.teardown=qe),t.ac=null,Ea(t,0),Il(t))}function Ud(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Ti(t)}var ba=new Set,Hn=new Map;function gN(e){ba=e}var xl=!1;function Jb(){xl=!0}function Sn(e,t){var r={f:0,v:e,reactions:null,equals:xd,rv:0,wv:0};return r}function se(e,t){const r=Sn(e,t);return lf(r),r}function Bd(e,t=!1,r=!0){const n=Sn(e);return t||(n.equals=Td),yi&&r&&Ze!==null&&Ze.l!==null&&(Ze.l.s??=[]).push(n),n}function F(e,t,r=!1){Oe!==null&&(!kr||(Oe.f&131072)!==0)&&va()&&(Oe.f&4325394)!==0&&(qr===null||!qr.has(e))&&_b();let n=r?Pe(t):t;return Ei(e,n,xs)}function Ei(e,t,r=null){if(!e.equals(t)){Hn.set(e,rn?t:e.v);var n=ki.ensure();if(n.capture(e,t),(e.f&2)!==0){const i=e;(e.f&2048)!==0&&El(i),Dt===null&&gl(i)}e.wv=df(),jd(e,sr,r),va()&&Te!==null&&(Te.f&1024)!==0&&(Te.f&96)===0&&(cr===null?c_([e]):cr.push(e)),!n.is_fork&&ba.size>0&&!xl&&Vd()}return t}function Vd(){xl=!1;for(const e of ba){(e.f&1024)!==0&<(e,Zn);let t;try{t=Sa(e)}catch{t=!0}t&&Ti(e)}ba.clear()}function zr(e){F(e,e.v+1)}function jd(e,t,r){var n=e.reactions;if(n!==null)for(var i=va(),a=n.length,s=0;s<a;s++){var o=n[s],l=o.f;if(!(!i&&o===Te)){var c=(l&sr)===0;if(c&<(o,t),(l&131072)!==0)ba.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|=da),jd(f,Zn,r))}else if(c){var u=o;(l&16)!==0&&Lr!==null&&Lr.add(u),r!==null?r.push(u):wl(u)}}}}var Qb=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Pe(e){if(typeof e!="object"||e===null||Rr in e)return e;const t=bs(e);if(t!==vd&&t!==tb)return e;var r=new Map,n=ms(e),i=se(0),a=null,s=nn,o=u=>{if(nn===s)return u();var p=Oe,h=nn;qt(null),cf(s);var y=u();return qt(p),cf(h),y};n&&r.set("length",se(e.length,a));var l="";let c=!1;function f(u){if(!c){c=!0,l=u,Ad(i,`${l} version`);for(const[p,h]of r)Ad(h,Xb(l,p));c=!1}}return new Proxy(e,{defineProperty(u,p,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&yb();var y=r.get(p);return y===void 0?o(()=>{var v=se(h.value,a);return r.set(p,v),v}):F(y,h.value,!0),!0},deleteProperty(u,p){var h=r.get(p);if(h===void 0){if(p in u){const y=o(()=>se(dt,a));r.set(p,y),zr(i)}}else F(h,dt),zr(i);return!0},get(u,p,h){if(p===Rr)return e;var y=r.get(p),v=p in u;if(y===void 0&&(!v||Nr(u,p)?.writable)&&(y=o(()=>{var g=se(Pe(v?u[p]:dt),a);return g}),r.set(p,y)),y!==void 0){var m=d(y);return m===dt?void 0:m}return Reflect.get(u,p,h)},getOwnPropertyDescriptor(u,p){var h=Reflect.getOwnPropertyDescriptor(u,p);if(h&&"value"in h){var y=r.get(p);y&&(h.value=d(y))}else if(h===void 0){var v=r.get(p),m=v?.v;if(v!==void 0&&m!==dt)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return h},has(u,p){if(p===Rr)return!0;var h=r.get(p),y=h!==void 0&&h.v!==dt||Reflect.has(u,p);return(h!==void 0||Te!==null&&(!y||Nr(u,p)?.writable))&&(h===void 0&&(h=o(()=>{var v=se(y?Pe(u[p]):dt,a);return v}),r.set(p,h)),d(h)===dt)?!1:y},set(u,p,h,y){var v=r.get(p),m=p in u;if(n&&p==="length")for(var g=h;g<v.v;g+=1){var E=r.get(g+"");E!==void 0?F(E,dt):g in u&&(E=o(()=>se(dt,a)),r.set(g+"",E))}if(v===void 0)(!m||Nr(u,p)?.writable)&&(v=o(()=>se(void 0,a)),F(v,Pe(h)),r.set(p,v));else{m=v.v!==dt;var S=o(()=>Pe(h));F(v,S)}var T=Reflect.getOwnPropertyDescriptor(u,p);if(T?.set&&T.set.call(y,h),!m){if(n&&typeof p=="string"){var A=r.get("length"),I=Number(p);Number.isInteger(I)&&I>=A.v&&F(A,I+1)}zr(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!==dt});for(var[h,y]of r)y.v!==dt&&!(h in u)&&p.push(h);return p},setPrototypeOf(){bb()}})}function Xb(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:Qb.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function _a(e){try{if(e!==null&&typeof e=="object"&&Rr in e)return e[Rr]}catch{}return e}function Zd(e,t){return Object.is(_a(e),_a(t))}var e_=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function yN(e){return new Proxy(e,{get(t,r,n){var i=Reflect.get(t,r,n);return e_.has(r)?function(...a){Jb();var s=i.apply(this,a);return Vd(),s}:i}})}function bN(){const e=Array.prototype,t=Array.__svelte_cleanup;t&&t();const{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(a,s){const o=r.call(this,a,s);if(o===-1){for(let l=s??0;l<this.length;l+=1)if(_a(this[l])===a){fl("array.indexOf(...)");break}}return o},e.lastIndexOf=function(a,s){const o=n.call(this,a,s??this.length-1);if(o===-1){for(let l=0;l<=(s??this.length-1);l+=1)if(_a(this[l])===a){fl("array.lastIndexOf(...)");break}}return o},e.includes=function(a,s){const o=i.call(this,a,s);if(!o){for(let l=0;l<this.length;l+=1)if(_a(this[l])===a){fl("array.includes(...)");break}}return o},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var Wd,t_,Tl,Hd,Gd;function Al(){if(Wd===void 0){Wd=window,t_=document,Tl=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Hd=Nr(t,"firstChild").get,Gd=Nr(t,"nextSibling").get,gd(e)&&(e[ul]=void 0,e[kd]=null,e[cl]=void 0,e.__e=void 0),gd(r)&&(r[dl]=void 0)}}function Lt(e=""){return document.createTextNode(e)}function Jt(e){return Hd.call(e)}function wr(e){return Gd.call(e)}function D(e,t){if(!ke)return Jt(e);var r=Jt(Ce);if(r===null)r=Ce.appendChild(Lt());else if(t&&r.nodeType!==3){var n=Lt();return r?.before(n),mt(n),n}return t&&Os(r),mt(r),r}function B(e,t=!1){if(!ke){var r=Jt(e);return r instanceof Comment&&r.data===""?wr(r):r}if(t){if(Ce?.nodeType!==3){var n=Lt();return Ce?.before(n),mt(n),n}Os(Ce)}return Ce}function V(e,t=1,r=!1){let n=ke?Ce:e;for(var i;t--;)i=n,n=wr(n);if(!ke)return n;if(r){if(n?.nodeType!==3){var a=Lt();return n===null?i?.after(a):n.before(a),mt(a),a}Os(n)}return mt(n),n}function Cl(e){e.textContent=""}function Kd(){return!Yt||Lr!==null?!1:(Te.f&ol)!==0}function Cs(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 r_(e=""){return document.createComment(e)}function Os(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 n_(e,t){if(t){const r=document.body;e.autofocus=!0,or(()=>{document.activeElement===r&&e.focus()})}}function i_(e){ke&&Jt(e)!==null&&Cl(e)}var Yd=!1;function Jd(){Yd||(Yd=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[fa]?.()})},{capture:!0}))}function Ds(e){var t=Oe,r=Te;qt(null),ur(null);try{return e()}finally{qt(t),ur(r)}}function Is(e,t,r,n=r){e.addEventListener(t,()=>Ds(r));const i=e[fa];i?e[fa]=()=>{i(),n(!0)}:e[fa]=()=>n(!0),Jd()}function Qd(e){Te===null&&(Oe===null&&hb(e),fb()),rn&&db(e)}function a_(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function lr(e,t){var r=Te;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)wi!==null?wi.push(n):ki.ensure().schedule(n);else if(t!==null){try{Ti(n)}catch(s){throw yt(n),s}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|=ua))}if(i!==null&&(i.parent=r,r!==null&&a_(i,r),Oe!==null&&(Oe.f&2)!==0&&(e&64)===0)){var a=Oe;(a.effects??=[]).push(i)}return n}function Ol(){return Oe!==null&&!kr}function Ps(e){const t=lr(8,null);return lt(t,ar),t.teardown=e,t}function ve(e){Qd("$effect");var t=Te.f;if(!Oe&&(t&32)!==0&&Ze!==null&&!Ze.i){var r=Ze;(r.e??=[]).push(e)}else return Xd(e)}function Xd(e){return lr(4|_d,e)}function Dl(e){return Qd("$effect.pre"),lr(8|_d,e)}function wa(e){ki.ensure();const t=lr(64|gi,e);return()=>{yt(t)}}function s_(e){ki.ensure();const t=lr(64|gi,e);return(r={})=>new Promise(n=>{r.outro?Gn(t,()=>{yt(t),n(void 0)}):(yt(t),n(void 0))})}function Ms(e){return lr(4,e)}function o_(e){return lr(sb|gi,e)}function xi(e,t=0){return lr(8|t,e)}function Y(e,t=[],r=[],n=[]){Ld(n,t,r,i=>{lr(8,()=>{e(...i.map(d))})})}function ka(e,t=0){var r=lr(16|t,e);return r}function ef(e,t=0){var r=lr(ib|t,e);return r}function zt(e){return lr(32|gi,e)}function tf(e){var t=e.teardown;if(t!==null){const r=rn,n=Oe;of(!0),qt(null);try{t.call(null)}finally{of(r),qt(n)}}}function Il(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Ds(()=>{i.abort(ws)});var n=r.next;(r.f&64)!==0?r.parent=null:yt(r,t),r=n}}function l_(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&yt(t),t=r}}function yt(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(rf(e.nodes.start,e.nodes.end),r=!0),e.f|=bd,Il(e,t&&!r),Ea(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const a of n)a.stop();tf(e),e.f^=bd,e.f|=ab;var i=e.parent;i!==null&&i.first!==null&&nf(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function rf(e,t){for(;e!==null;){var r=e===t?null:wr(e);e.remove(),e=r}}function nf(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=[];af(e,n,!0);var i=()=>{r&&yt(e),t&&t()},a=n.length;if(a>0){var s=()=>--a||i();for(var o of n)o.out(s)}else i()}function af(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 a=i.next;if((i.f&64)===0){var s=(i.f&65536)!==0||(i.f&32)!==0&&(e.f&16)!==0;af(i,t,s?r:!1)}i=a}}}function $s(e){sf(e,!0)}function sf(e,t){if((e.f&8192)!==0){e.f^=sl,(e.f&1024)===0&&(lt(e,sr),ki.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 a=e.nodes&&e.nodes.t;if(a!==null)for(const s of a)(s.is_global||t)&&s.in()}}function Pl(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:wr(r);t.append(r),r=i}}var u_=null,Fs=!1,rn=!1;function of(e){rn=e}var Oe=null,kr=!1;function qt(e){Oe=e}var Te=null;function ur(e){Te=e}var qr=null;function lf(e){Oe!==null&&(!Yt||(Oe.f&2)!==0)&&(qr??=new Set).add(e)}var Ut=null,Qt=0,cr=null;function c_(e){cr=e}var uf=1,Kn=0,nn=Kn;function cf(e){nn=e}function df(){return++uf}function Sa(e){var t=e.f;if((t&2048)!==0)return!0;if(t&2&&(e.f&=~da),(t&4096)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var a=r[i];if(Sa(a)&&qd(a),a.wv>e.wv)return!0}(t&512)!==0&&Dt===null&<(e,ar)}return!1}function ff(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!Yt&&qr!==null&&qr.has(e)))for(var i=0;i<n.length;i++){var a=n[i];(a.f&2)!==0?ff(a,t,!1):t===a&&(r?lt(a,sr):(a.f&1024)!==0&<(a,Zn),wl(a))}}function hf(e){var t=Ut,r=Qt,n=cr,i=Oe,a=qr,s=Ze,o=kr,l=nn,c=e.f;Ut=null,Qt=0,cr=null,Oe=(c&96)===0?e:null,qr=null,bi(e.ctx),kr=!1,nn=++Kn,e.ac!==null&&(Ds(()=>{e.ac.abort(ws)}),e.ac=null);try{e.f|=wd;var f=e.fn,u=f();e.f|=ol;var p=e.deps,h=Ee?.is_fork;if(Ut!==null){var y;if(h||Ea(e,Qt),p!==null&&Qt>0)for(p.length=Qt+Ut.length,y=0;y<Ut.length;y++)p[Qt+y]=Ut[y];else e.deps=p=Ut;if(Ol()&&(e.f&512)!==0)for(y=Qt;y<p.length;y++)(p[y].reactions??=[]).push(e)}else!h&&p!==null&&Qt<p.length&&(Ea(e,Qt),p.length=Qt);if(va()&&cr!==null&&!kr&&p!==null&&(e.f&6146)===0)for(y=0;y<cr.length;y++)ff(cr[y],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;cr!==null&&(n===null?n=cr:n.push(...cr))}return(e.f&8388608)!==0&&(e.f^=_s),u}catch(v){return Dd(v)}finally{e.f^=wd,Ut=t,Qt=r,cr=n,Oe=i,qr=a,bi(s),kr=o,nn=l}}function d_(e,t){let r=t.reactions;if(r!==null){var n=eb.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||!vs.call(Ut,t))){var a=t;(a.f&512)!==0&&(a.f^=512,a.f&=~da),a.v!==dt&&gl(a),Yb(a),Ea(a,0)}}function Ea(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)d_(e,r[n])}function Ti(e){var t=e.f;if((t&16384)===0){lt(e,ar);var r=Te,n=Fs;if(Te=e,Fs=!0,0)var i,a;try{(t&16777232)!==0?l_(e):Il(e),tf(e);var s=hf(e);if(e.teardown=typeof s=="function"?s:null,e.wv=uf,0)for(var o of e.deps);}finally{Fs=n,Te=r}}}async function pf(){if(Yt)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),b()}function d(e){var t=(e.f&2)!==0;if(u_?.add(e),Oe!==null&&!kr&&!(Te!==null&&(Te.f&16384)!==0)&&(qr===null||!qr.has(e))){var r=Oe.deps;if((Oe.f&2097152)!==0)e.rv<Kn&&(e.rv=Kn,Ut===null&&r!==null&&r[Qt]===e?Qt++:Ut===null?Ut=[e]:Ut.push(e));else{Oe.deps??=[],vs.call(Oe.deps,e)||Oe.deps.push(e);var n=e.reactions;n===null?e.reactions=[Oe]:vs.call(n,Oe)||n.push(Oe)}}if(0){if(!kr&&Hb&&!Hb.warned&&(Hb.effect.f&2097152)===0&&!Hb.effect_deps.has(e))var i;if(tN&&!kr&&aN!==null&&Oe!==null&&aN.reaction===Oe&&!e.trace){if(i)var a,s}}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||vf(o))&&(l=El(o)),Hn.set(o,l),l}var c=(o.f&512)===0&&!kr&&Oe!==null&&(Fs||(Oe.f&512)!==0),f=(o.f&ol)===0;Sa(o)&&(c&&(o.f|=512),qd(o)),c&&!f&&(Ud(o),mf(o))}if(Dt?.has(e))return Dt.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function mf(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&&(Ud(t),mf(t))}function vf(e){if(e.v===dt)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Hn.has(t)||(t.f&2)!==0&&vf(t))return!0;return!1}function Re(e){var t=kr;try{return kr=!0,e()}finally{kr=t}}function f_(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Rr in e)Ml(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Rr in r&&Ml(r)}}}function Ml(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{Ml(e[n],t)}catch{}const r=bs(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=md(r);for(let i in n){const a=n[i].get;if(a)try{a.call(e)}catch{}}}}}var xa=Symbol("events"),gf=new Set,$l=new Set;function Fl(e,t,r,n={}){function i(a){if(n.capture||Nl.call(t,a),!a.cancelBubble)return Ds(()=>r?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?or(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function bt(e,t,r,n={}){var i=Fl(t,e,r,n);return()=>{e.removeEventListener(t,i,n)}}function Ta(e,t,r,n,i){var a={capture:n,passive:i},s=Fl(e,t,r,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Ps(()=>{t.removeEventListener(e,s,a)})}function ut(e,t,r){(t[xa]??={})[e]=r}function Bt(e){for(var t=0;t<e.length;t++)gf.add(e[t]);for(var r of $l)r(e)}var yf=null;function Nl(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;yf=e;var s=0,o=yf===e&&e[xa];if(o){var l=i.indexOf(o);if(l!==-1&&(t===document||t===window)){e[xa]=t;return}var c=i.indexOf(t);if(c===-1)return;l<=c&&(s=l)}if(a=i[s]||e.target,a!==t){wn(e,"currentTarget",{configurable:!0,get(){return a||r}});var f=Oe,u=Te;qt(null),ur(null);try{for(var p,h=[];a!==null&&a!==t;){try{var y=a[xa]?.[n];y!=null&&(!a.disabled||e.target===a)&&y.call(a,e)}catch(v){p?h.push(v):p=v}if(e.cancelBubble)break;s++,a=s<i.length?i[s]:null}if(p){for(let v of h)queueMicrotask(()=>{throw v});throw p}}finally{e[xa]=t,delete e.currentTarget,qt(f),ur(u)}}}var h_=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function bf(e){return h_?.createHTML(e)??e}function p_(e){var t=Cs("template");return t.innerHTML=bf(e.replaceAll("<!>","<!---->")),t.content}function Sr(e,t){var r=Te;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function q(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,a=!e.startsWith("<!>");return()=>{if(ke)return Sr(Ce,null),Ce;i===void 0&&(i=p_(a?e:"<!>"+e),r||(i=Jt(i)));var s=n||Tl?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=Jt(s),l=s.lastChild;Sr(o,l)}else Sr(s,s);return s}}function Vt(e=""){if(!ke){var t=Lt(e+"");return Sr(t,t),t}var r=Ce;return r.nodeType!==3?(r.before(r=Lt()),mt(r)):Os(r),Sr(r,r),r}function ie(){if(ke)return Sr(Ce,null),Ce;var e=document.createDocumentFragment(),t=document.createComment(""),r=Lt();return e.append(t,r),Sr(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 vt(){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 m_=/\r/g;function v_(e){e=e.replace(m_,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}function g_(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}var y_=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function b_(e){return y_.includes(e)}var __=["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"],w_={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 k_(e){return e=e.toLowerCase(),w_[e]??e}var _N=[...__,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"],S_=["touchstart","touchmove"];function E_(e){return S_.includes(e)}var x_=["$state","$state.raw","$derived","$derived.by"],wN=[...x_,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function T_(e){return e?.replace(/\//g,"/")}var _f=!0;function Z(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[dl]??=e.nodeValue)&&(e[dl]=r,e.nodeValue=`${r}`)}function wf(e,t){return kf(e,t)}function A_(e,t){Al(),t.intro=t.intro??!1;const r=t.target,n=ke,i=Ce;try{for(var a=Jt(r);a&&(a.nodeType!==8||a.data!=="[");)a=wr(a);if(!a)throw jn;St(!0),mt(a);const s=kf(e,{...t,anchor:a});return St(!1),s}catch(s){if(s instanceof Error&&s.message.split(`
|
|
11
|
+
`).some(o=>o.startsWith("https://svelte.dev/e/")))throw s;return s!==jn&&console.warn("Failed to hydrate: ",s),t.recover===!1&&mb(),Al(),Cl(r),St(!1),wf(e,t)}finally{St(n),mt(i)}}var Ns=new Map;function kf(e,{target:t,anchor:r,props:n={},events:i,context:a,intro:s=!0,transformError:o}){Al();var l=void 0,c=s_(()=>{var f=r??t.appendChild(Lt());jb(f,{pending:()=>{}},h=>{te({});var y=Ze;if(a&&(y.c=a),i&&(n.$$events=i),ke&&Sr(h,null),_f=s,l=e(h,n)||{},_f=!0,ke&&(Te.nodes.end=Ce,Ce===null||Ce.nodeType!==8||Ce.data!=="]"))throw pa(),jn;re()},o);var u=new Set,p=h=>{for(var y=0;y<h.length;y++){var v=h[y];if(!u.has(v)){u.add(v);var m=E_(v);for(const S of[t,document]){var g=Ns.get(S);g===void 0&&(g=new Map,Ns.set(S,g));var E=g.get(v);E===void 0?(S.addEventListener(v,Nl,{passive:m}),g.set(v,1)):g.set(v,E+1)}}}};return p(gs(gf)),$l.add(p),()=>{for(var h of u)for(const m of[t,document]){var y=Ns.get(m),v=y.get(h);--v==0?(m.removeEventListener(h,Nl),y.delete(h),y.size===0&&Ns.delete(m)):y.set(h,v)}$l.delete(p),f!==r&&f.parentNode?.removeChild(f)}});return Rl.set(l,c),l}var Rl=new WeakMap;function C_(e,t){const r=Rl.get(e);return r?(Rl.delete(e),r(t)):Promise.resolve()}var Ll=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}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),r=this.#t.get(t);if(r)$s(r),this.#n.delete(t);else{var n=this.#r.get(t);n&&($s(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,a]of this.#e){if(this.#e.delete(i),i===e)break;const s=this.#r.get(a);s&&(yt(s.effect),this.#r.delete(a))}for(const[i,a]of this.#t){if(i===t||this.#n.has(i))continue;const s=()=>{if(Array.from(this.#e.values()).includes(i)){var o=document.createDocumentFragment();Pl(a,o),o.append(Lt()),this.#r.set(i,{effect:a,fragment:o})}else yt(a);this.#n.delete(i),this.#t.delete(i)};this.#i||!r?(this.#n.add(i),Gn(a,s,!1)):s()}}};#s=e=>{this.#e.delete(e);const t=Array.from(this.#e.values());for(const[r,n]of this.#r)t.includes(r)||(yt(n.effect),this.#r.delete(r))};ensure(e,t){var r=Ee,n=Kd();if(t&&!this.#t.has(e)&&!this.#r.has(e))if(n){var i=document.createDocumentFragment(),a=Lt();i.append(a),this.#r.set(e,{effect:zt(()=>t(a)),fragment:i})}else this.#t.set(e,zt(()=>t(this.anchor)));if(this.#e.set(r,e),n){for(const[s,o]of this.#t)s===e?r.unskip_effect(o):r.skip_effect(o);for(const[s,o]of this.#r)s===e?r.unskip_effect(o.effect):r.skip_effect(o.effect);r.oncommit(this.#a),r.ondiscard(this.#s)}else ke&&(this.anchor=Ce),this.#a(r)}};function Se(e,t,...r){var n=new Ll(e);ka(()=>{const i=t()??null;n.ensure(i,i&&(a=>i(a,...r)))},ua)}if(0)var eR;function En(e){Ze===null&&Sd("onMount"),yi&&Ze.l!==null?O_(Ze).m.push(e):ve(()=>{const t=Re(e);if(typeof t=="function")return t})}function O_(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function D_(){return Symbol(Xy)}function ue(e,t,r=!1){var n;ke&&(n=Ce,tn());var i=new Ll(e),a=r?ua:0;function s(o,l){if(ke){var c=hl(n);if(o!==parseInt(c.substring(1))){var f=ma();mt(f),i.anchor=f,St(!1),i.ensure(o,l),St(!0);return}}i.ensure(o,l)}ka(()=>{var o=!1;t((l,c=0)=>{o=!0,s(c,l)}),o||s(-1,null)},a)}function an(e,t){return t}function I_(e,t,r){for(var n=[],i=t.length,a,s=t.length,o=0;o<i;o++){let u=t[o];Gn(u,()=>{if(a){if(a.pending.delete(u),a.done.add(u),a.pending.size===0){var p=e.outrogroups;zl(e,gs(a.done)),p.delete(a),p.size===0&&(e.outrogroups=null)}}else s-=1},!1)}if(s===0){var l=n.length===0&&r!==null;if(l){var c=r,f=c.parentNode;Cl(f),f.append(c),e.items.clear()}zl(e,t,!l)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function zl(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(const s of e.pending.values())for(const o of s)n.add(e.items.get(o).e)}for(var i=0;i<t.length;i++){var a=t[i];n?.has(a)?(a.f|=ca,Pl(a,document.createDocumentFragment())):yt(t[i],r)}}var Sf;function Me(e,t,r,n,i,a=null){var s=e,o=new Map;if((t&4)!==0){var l=e;s=ke?mt(Jt(l)):l.appendChild(Lt())}ke&&tn();var c=null,f=Sl(()=>{var g=r();return ms(g)?g:g==null?[]:gs(g)}),u,p=new Map,h=!0;function y(g){(m.effect.f&16384)===0&&(m.pending.delete(g),m.fallback=c,P_(m,u,s,t,n),c!==null&&(u.length===0?(c.f&33554432)===0?$s(c):(c.f^=ca,Ca(c,null,s)):Gn(c,()=>{c=null})))}function v(g){m.pending.delete(g)}var m={effect:ka(()=>{u=d(f);var g=u.length;let E=!1;ke&&hl(s)==="[!"!=(g===0)&&(s=ma(),mt(s),St(!1),E=!0);for(var S=new Set,T=Ee,A=Kd(),I=0;I<g;I+=1){ke&&Ce.nodeType===8&&Ce.data==="]"&&(s=Ce,E=!0,St(!1));var M=u[I],N=n(M,I);if(0)var j;var R=h?null:o.get(N);R?(R.v&&Ei(R.v,M),R.i&&Ei(R.i,I),A&&T.unskip_effect(R.e)):(R=M_(o,h?s:Sf??=Lt(),M,N,I,i,t,r),h||(R.e.f|=ca),o.set(N,R)),S.add(N)}if(g===0&&a&&!c&&(h?c=zt(()=>a(s)):(c=zt(()=>a(Sf??=Lt())),c.f|=ca)),g>S.size&&Ed("","",""),ke&&g>0&&mt(ma()),!h)if(p.set(T,S),A){for(const[X,U]of o)S.has(X)||T.skip_effect(U.e);T.oncommit(y),T.ondiscard(v)}else y(T);E&&St(!0),d(f)}),flags:t,items:o,pending:p,outrogroups:null,fallback:c};h=!1,ke&&(s=Ce)}function Aa(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function P_(e,t,r,n,i){var a=(n&8)!==0,s=t.length,o=e.items,l=Aa(e.effect.first),c,f=null,u,p=[],h=[],y,v,m,g;if(a)for(g=0;g<s;g+=1)y=t[g],v=i(y,g),m=o.get(v).e,(m.f&33554432)===0&&(m.nodes?.a?.measure(),(u??=new Set).add(m));for(g=0;g<s;g+=1){if(y=t[g],v=i(y,g),m=o.get(v).e,e.outrogroups!==null)for(const R of e.outrogroups)R.pending.delete(m),R.done.delete(m);if((m.f&8192)!==0&&($s(m),a&&(m.nodes?.a?.unfix(),(u??=new Set).delete(m))),(m.f&33554432)!==0)if(m.f^=ca,m===l)Ca(m,null,r);else{var E=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,E),Ca(m,E,r),f=m,p=[],h=[],l=Aa(f.next);continue}if(m!==l){if(c!==void 0&&c.has(m)){if(p.length<h.length){var S=h[0],T;f=S.prev;var A=p[0],I=p[p.length-1];for(T=0;T<p.length;T+=1)Ca(p[T],S,r);for(T=0;T<h.length;T+=1)c.delete(h[T]);xn(e,A.prev,I.next),xn(e,f,A),xn(e,I,S),l=S,f=I,g-=1,p=[],h=[]}else c.delete(m),Ca(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=Aa(l.next);if(l===null)continue}(m.f&33554432)===0&&p.push(m),f=m,l=Aa(m.next)}if(e.outrogroups!==null){for(const R of e.outrogroups)R.pending.size===0&&(zl(e,gs(R.done)),e.outrogroups?.delete(R));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||c!==void 0){var M=[];if(c!==void 0)for(m of c)(m.f&8192)===0&&M.push(m);for(;l!==null;)(l.f&8192)===0&&l!==e.fallback&&M.push(l),l=Aa(l.next);var N=M.length;if(N>0){var j=(n&4)!==0&&s===0?r:null;if(a){for(g=0;g<N;g+=1)M[g].nodes?.a?.measure();for(g=0;g<N;g+=1)M[g].nodes?.a?.fix()}I_(e,M,j)}}a&&or(()=>{if(u!==void 0)for(m of u)m.nodes?.a?.apply()})}function M_(e,t,r,n,i,a,s,o){var l=(s&1)!==0?(s&16)===0?Bd(r,!1,!1):Sn(r):null,c=(s&2)!==0?Sn(i):null;return{v:l,i:c,e:zt(()=>(a(t,l??r,c??i,o),()=>{e.delete(n)}))}}function Ca(e,t,r){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end,a=t&&(t.f&33554432)===0?t.nodes.start:r;n!==null;){var s=wr(n);if(a.before(n),n===i)return;n=s}}function xn(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function kN(e,t){const r=new Map,n=e.length;for(let i=0;i<n;i++){const a=t(e[i],i);if(r.has(a)){const s=String(r.get(a)),o=String(i);let l=String(a);l.startsWith("[object ")&&(l=null),Ed(s,o,l)}r.set(a,i)}}function SN(e,t,r){if(!t||t===v_(String(r??"")))return;let n;const i=e.__svelte_meta?.loc;i?n=`near ${i.file}:${i.line}:${i.column}`:ml?.[il]&&(n=`in ${ml[il]}`),Eb(T_(n))}function Ef(e,t,r=!1,n=!1,i=!1,a=!1){var s=e,o="";if(r){var l=e;ke&&(s=mt(Jt(l)))}Y(()=>{var c=Te;if(o===(o=t()??"")){ke&&tn();return}if(r&&!ke){c.nodes=null,l.innerHTML=o,o!==""&&Sr(Jt(l),l.lastChild);return}if(c.nodes!==null&&(rf(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=wr(u);if(u===null)throw pa(),jn;Sr(Ce,p),s=mt(u);return}var h=Cs(n?"svg":i?"math":"template",n?Jy:i?Qy:void 0);h.innerHTML=o;var y=n||i?h:h.content;if(Sr(Jt(y),y.lastChild),n||i)for(;Jt(y);)s.before(Jt(y));else s.before(y)}})}function $_(e,t,r,n,i){ke&&tn();var a=t.$$slots?.[r],s=!1;a===!0&&(a=t[r==="default"?"children":r],s=!0),a===void 0?i!==null&&i(e):a(e,s?()=>n:n)}function Fe(e,t,r){var n;ke&&(n=Ce,tn());var i=new Ll(e);ka(()=>{var a=t()??null;if(ke&&hl(n)==="["!=(a!==null)){var s=ma();mt(s),i.anchor=s,St(!1),i.ensure(a,a&&(o=>r(o,a))),St(!0);return}i.ensure(a,a&&(o=>r(o,a)))},ua)}function F_(e,t){var r=void 0,n;ef(()=>{r!==(r=t())&&(n&&(yt(n),n=null),r&&(n=zt(()=>{Ms(()=>r(e))})))})}function xf(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=xf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Rs(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=xf(e))&&(n&&(n+=" "),n+=t);return n}function dr(e){return typeof e=="object"?Rs(e):e??""}var Tf=[...`
|
|
12
|
+
\r\f \v\uFEFF`];function N_(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 a=i.length,s=0;(s=n.indexOf(i,s))>=0;){var o=s+a;(s===0||Tf.includes(n[s-1]))&&(o===n.length||Tf.includes(n[o]))?n=(s===0?"":n.substring(0,s))+n.substring(o+1):s=o}}return n===""?null:n}function Af(e,t=!1){var r=t?" !important;":";",n="";for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==""&&(n+=" "+i+": "+a+r)}return n}function ql(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function R_(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 a=!1,s=0,o=!1,l=[];n&&l.push(...Object.keys(n).map(ql)),i&&l.push(...Object.keys(i).map(ql));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):a?a===p&&(a=!1):p==="/"&&e[u+1]==="*"?o=!0:p==='"'||p==="'"?a=p:p==="("?s++:p===")"&&s--,!o&&a===!1&&s===0){if(p===":"&&f===-1)f=u;else if(p===";"||u===v-1){if(f!==-1){var h=ql(e.substring(c,f).trim());if(!l.includes(h)){p!==";"&&u++;var y=e.substring(c,u).trim();r+=" "+y+";"}}c=u+1,f=-1}}}}return n&&(r+=Af(n)),i&&(r+=Af(i,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function Et(e,t,r,n,i,a){var s=e[ul];if(ke||s!==r||s===void 0){var o=N_(r,n,a);(!ke||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):t?e.className=o:e.setAttribute("class",o)),e[ul]=r}else if(a&&i!==a)for(var l in a){var c=!!a[l];(i==null||c!==!!i[l])&&e.classList.toggle(l,c)}return a}function Ul(e,t={},r,n){for(var i in r){var a=r[i];t[i]!==a&&(r[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,n))}}function L_(e,t,r,n){var i=e[cl];if(ke||i!==t){var a=R_(t,n);(!ke||a!==e.getAttribute("style"))&&(a==null?e.removeAttribute("style"):e.style.cssText=a),e[cl]=t}else n&&(Array.isArray(n)?(Ul(e,r?.[0],n[0]),Ul(e,r?.[1],n[1],"important")):Ul(e,r,n));return n}function Ls(e,t,r=!1){if(e.multiple){if(t==null)return;if(!ms(t))return xb();for(var n of e.options)n.selected=t.includes(Oa(n));return}for(n of e.options)if(Zd(Oa(n),t)){n.selected=!0;return}(!r||t!==void 0)&&(e.selectedIndex=-1)}function Cf(e){var t=new MutationObserver(()=>{Ls(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Ps(()=>{t.disconnect()})}function z_(e,t,r=t){var n=new WeakSet,i=!0;Is(e,"change",a=>{var s=a?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(s),Oa);else{var l=e.querySelector(s)??e.querySelector("option:not([disabled])");o=l&&Oa(l)}r(o),e.__value=o,Ee!==null&&n.add(Ee)}),Ms(()=>{var a=t();if(e===document.activeElement){var s=Yt?ga:Ee;if(n.has(s))return}if(Ls(e,a,i),i&&a===void 0){var o=e.querySelector(":checked");o!==null&&(a=Oa(o),r(a))}e.__value=a,i=!1}),Cf(e)}function Oa(e){return"__value"in e?e.__value:e.value}var Da=Symbol("class"),Ia=Symbol("style"),Of=Symbol("is custom element"),Df=Symbol("is html"),q_=ha?"link":"LINK",If=ha?"input":"INPUT",U_=ha?"option":"OPTION",B_=ha?"select":"SELECT",V_=ha?"progress":"PROGRESS";function Ai(e){if(ke){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;pe(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;pe(e,"checked",null),e.checked=i}}};e[fa]=r,or(r),Jd()}}function Bl(e,t){var r=zs(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==V_)||(e.value=t??"")}function Pf(e,t){var r=zs(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function Mf(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function pe(e,t,r,n){var i=zs(e);if(ke&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===q_)){n||void 0;return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[ob]=r),r==null?e.removeAttribute(t):typeof r!="string"&&jl(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Tn(e,t,r){var n=Oe,i=Te;let a=ke;ke&&St(!1),qt(null),ur(null);try{t!=="style"&&(Vl.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?jl(e).includes(t):r&&typeof r=="object")?e[t]=r:pe(e,t,r==null?r:String(r))}finally{qt(n),ur(i),a&&St(!0)}}function j_(e,t,r,n,i=!1,a=!1){if(ke&&i&&e.nodeName===If){var s=e;(s.type==="checkbox"?"defaultChecked":"defaultValue")in r||Ai(s)}var o=zs(e),l=o[Of],c=!o[Df];let f=ke&&l;f&&St(!1);var u=t||{},p=e.nodeName===U_;for(var h in t)h in r||(r[h]=null);r.class?r.class=dr(r.class):(n||r[Da])&&(r.class=null),r[Ia]&&(r.style??=null);var y=jl(e);if(e.nodeName===If&&"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,pe(e,"type",v,a))}for(const I in r){let M=r[I];if(p&&I==="value"&&M==null){e.value=e.__value="",u[I]=M;continue}if(I==="class"){Et(e,e.namespaceURI==="http://www.w3.org/1999/xhtml",M,n,t?.[Da],r[Da]),u[I]=M,u[Da]=r[Da];continue}if(I==="style"){L_(e,M,t?.[Ia],r[Ia]),u[I]=M,u[Ia]=r[Ia];continue}var m=u[I];if(!(M===m&&!(M===void 0&&e.hasAttribute(I)))){u[I]=M;var g=I[0]+I[1];if(g!=="$$")if(g==="on"){const N={},j="$$"+I;let R=I.slice(2);var E=b_(R);if(g_(R)&&(R=R.slice(0,-7),N.capture=!0),!E&&m){if(M!=null)continue;e.removeEventListener(R,u[j],N),u[j]=null}if(E)ut(R,e,M),Bt([R]);else if(M!=null){let X=function(U){u[I].call(this,U)};var A=X;u[j]=Fl(R,e,X,N)}}else if(I==="style")pe(e,I,M);else if(I==="autofocus")n_(e,!!M);else if(!l&&(I==="__value"||I==="value"&&M!=null))e.value=e.__value=M;else if(I==="selected"&&p)Mf(e,M);else{var S=I;c||(S=k_(S));var T=S==="defaultValue"||S==="defaultChecked";if(M==null&&!l&&!T)if(o[I]=null,S==="value"||S==="checked"){let N=e;const j=t===void 0;if(S==="value"){let R=N.defaultValue;N.removeAttribute(S),N.defaultValue=R,N.value=N.__value=j?R:null}else{let R=N.defaultChecked;N.removeAttribute(S),N.defaultChecked=R,N.checked=j?R:!1}}else e.removeAttribute(I);else T||y.includes(S)&&(l||typeof M!="string")?(e[S]=M,S in o&&(o[S]=dt)):typeof M!="function"&&pe(e,S,M,a)}}}return f&&St(!0),u}function Ue(e,t,r=[],n=[],i=[],a,s=!1,o=!1){Ld(i,r,n,l=>{var c=void 0,f={},u=e.nodeName===B_,p=!1;if(ef(()=>{var y=t(...l.map(d)),v=j_(e,c,y,a,s,o);p&&u&&"value"in y&&Ls(e,y.value);for(let g of Object.getOwnPropertySymbols(f))y[g]||yt(f[g]);for(let g of Object.getOwnPropertySymbols(y)){var m=y[g];g.description==="@attach"&&(!c||m!==c[g])&&(f[g]&&yt(f[g]),f[g]=zt(()=>F_(e,()=>m))),v[g]=m}c=v}),u){var h=e;Ms(()=>{Ls(h,c.value,!0),Cf(h)})}p=!0})}function zs(e){return e[kd]??={[Of]:e.nodeName.includes("-"),[Df]:e.namespaceURI===Yy}}var Vl=new Map;function jl(e){var t=e.getAttribute("is")||e.nodeName,r=Vl.get(t);if(r)return r;Vl.set(t,r=[]);for(var n,i=e,a=Element.prototype;a!==i;){n=md(i);for(var s in n)n[s].set&&s!=="innerHTML"&&s!=="textContent"&&s!=="innerText"&&r.push(s);i=bs(i)}return r}function EN(e,t,r){}function Zl(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function $f(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function Z_(e,t){var r=$f(e.srcset),n=$f(t);return n.length===r.length&&n.every(([i,a],s)=>a===r[s][1]&&(Zl(r[s][0],i)||Zl(i,r[s][0])))}var Wl=null;function W_(){if(Wl===null){var e=Cs("select");e.innerHTML=bf("<option><span>t</span></option>"),Wl=e.firstChild?.firstChild?.nodeType===1}return Wl}function H_(e,t){var r=ke;W_()||(St(!1),e.textContent="",e.append(r_("")));try{t()}finally{r&&(ke?C(e):(St(!0),mt(e)))}}function qs(e,t,r=t){var n=new WeakSet;Is(e,"input",async i=>{var a=i?e.defaultValue:e.value;if(a=Gl(e)?Kl(a):a,r(a),Ee!==null&&n.add(Ee),await pf(),a!==(a=t())){var s=e.selectionStart,o=e.selectionEnd,l=e.value.length;if(e.value=a??"",o!==null){var c=e.value.length;s===o&&o===l&&c>l?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=s,e.selectionEnd=Math.min(o,c))}}}),(ke&&e.defaultValue!==e.value||Re(t)==null&&e.value)&&(r(Gl(e)?Kl(e.value):e.value),Ee!==null&&n.add(Ee)),xi(()=>{var i=t();if(e===document.activeElement){var a=Yt?ga:Ee;if(n.has(a))return}Gl(e)&&i===Kl(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}var Hl=new Set;function G_(e,t,r,n,i=n){var a=r.getAttribute("type")==="checkbox",s=e;let o=!1;if(t!==null)for(var l of t)s=s[l]??=[];s.push(r),Is(r,"change",()=>{var c=r.__value;a&&(c=Ff(s,c,r.checked)),i(c)},()=>i(a?[]:null)),xi(()=>{var c=n();if(ke&&r.defaultChecked!==r.checked){o=!0;return}a?(c=c||[],r.checked=c.includes(r.__value)):r.checked=Zd(r.__value,c)}),Ps(()=>{var c=s.indexOf(r);c!==-1&&s.splice(c,1)}),Hl.has(s)||(Hl.add(s),or(()=>{s.sort((c,f)=>c.compareDocumentPosition(f)===4?-1:1),Hl.delete(s)})),or(()=>{if(o){var c;a?c=Ff(s,c,r.checked):c=s.find(f=>f.checked)?.__value,i(c)}})}function K_(e,t,r=t){Is(e,"change",n=>{r(n?e.defaultChecked:e.checked)}),(ke&&e.defaultChecked!==e.checked||Re(t)==null)&&r(e.checked),xi(()=>{var n=t();e.checked=!!n})}function Ff(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 Gl(e){var t=e.type;return t==="number"||t==="range"}function Kl(e){return e===""?null:+e}function Yl(e,t){return e===t||e?.[Rr]===t}function Us(e={},t,r,n){var i=Ze.r,a=Te;return Ms(()=>{var s,o;return xi(()=>{s=o,o=n?.()||[],Re(()=>{Yl(r(...o),e)||(t(e,...o),s&&Yl(r(...s),e)&&t(null,...s))})}),()=>{let l=a;for(;l!==i&&l.parent!==null&&l.parent.f&33554432;)l=l.parent;const c=()=>{o&&Yl(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=()=>f_(t.s);if(e){let i=0,a={};const s=Si(()=>{let o=!1;const l=t.s;for(const c in l)l[c]!==a[c]&&(a[c]=l[c],o=!0);return o&&i++,i});n=()=>d(s)}r.b.length&&Dl(()=>{Nf(t,n),al(r.b)}),ve(()=>{const i=Re(()=>r.m.map(rb));return()=>{for(const a of i)typeof a=="function"&&a()}}),r.a.length&&ve(()=>{Nf(t,n),al(r.a)})}function Nf(e,t){if(e.l.s)for(const r of e.l.s)d(r);t()}var Y_={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},Y_)}var J_={get(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(la(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];la(i)&&(i=i());const a=Nr(i,t);if(a&&a.set)return a.set(r),!0}return!1},getOwnPropertyDescriptor(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(la(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n){const i=Nr(n,t);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,t){if(t===Rr||t===ll)return!1;for(let r of e.props)if(la(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(la(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},J_)}function _(e,t,r,n){var i=!yi||(r&2)!==0,a=(r&8)!==0,s=(r&16)!==0,o=n,l=!0,c=void 0,f=()=>s&&i?(c??=Si(n),d(c)):(l&&(l=!1,o=s?Re(n):n),o);let u;if(a){var p=Rr in e||ll in e;u=Nr(e,t)?.set??(p&&t in e?T=>e[t]=T:void 0)}var h,y=!1;a?[h,y]=qb(()=>e[t]):h=e[t],h===void 0&&n!==void 0&&(h=f(),u&&(i&&vb(t),u(h)));var v;if(i?v=()=>{var T=e[t];return T===void 0?f():(l=!0,T)}:v=()=>{var T=e[t];return T!==void 0&&(o=void 0),T===void 0?o:T},i&&(r&4)===0)return v;if(u){var m=e.$$legacy;return(function(T,A){return arguments.length>0?((!i||!A||m||y)&&u(A?v():T),T):v()})}var g=!1,E=((r&1)!==0?Si:Sl)(()=>(g=!1,v()));a&&d(E);var S=Te;return(function(T,A){if(arguments.length>0){const I=A?d(E):i&&a?Pe(T):T;return F(E,I),g=!0,o!==void 0&&(o=I),T}return rn&&g||(S.f&16384)!==0?E.v:d(E)})}function Q_(e){return new X_(e)}var X_=class{#e;#t;constructor(e){var t=new Map,r=(i,a)=>{var s=Bd(a,!1,!1);return t.set(i,s),s};const n=new Proxy({...e.props||{},$$events:{}},{get(i,a){return d(t.get(a)??r(a,Reflect.get(i,a)))},has(i,a){return a===ll?!0:(d(t.get(a)??r(a,Reflect.get(i,a))),Reflect.has(i,a))},set(i,a,s){return F(t.get(a)??r(a,s),s),Reflect.set(i,a,s)}});this.#t=(e.hydrate?A_:wf)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!Yt&&(!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(a){this.#t[i]=a},enumerable:!0});this.#t.$set=i=>{Object.assign(n,i)},this.#t.$destroy=()=>{C_(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()}},Rf;typeof HTMLElement=="function"&&(Rf=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 a=>{const s=Cs("slot");i!=="default"&&(s.name=i),x(a,s)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=ew(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 a=this.$$g_p(i.name);a in this.$$d||(this.$$d[a]=Bs(a,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=Q_({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=wa(()=>{xi(()=>{this.$$r=!0;for(const i of ys(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const a=Bs(i,this.$$d[i],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,a)}this.$$r=!1})});for(const i in this.$$l)for(const a of this.$$l[i]){const s=this.$$c.$on(i,a);this.$$l_u.set(a,s)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Bs(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 ys(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Bs(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 ew(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ne(e,t,r,n,i,a){let s=class extends Rf{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return ys(t).map(o=>(t[o].attribute||o).toLowerCase())}};return ys(t).forEach(o=>{wn(s.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){l=Bs(o,l,t),this.$$d[o]=l;var c=this.$$c;c&&(Nr(c,o)?.get?c[o]=l:c.$set({[o]:l}))}})}),n.forEach(o=>{wn(s.prototype,o,{get(){return this.$$c?.[o]}})}),a&&(s=a(s)),e.element=s,s}function tw(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 rw={"quantity.remove":"Remove item","quantity.remove.label":"✕","cart.item.remove":"✕","common.table.donation":"Donation","cart.donation.title":"Donation","donations.checkbox.label":"Add a {{amount}} donation to {{campaign}}"},nw={"quantity.remove":"Artikel entfernen","quantity.remove.label":"✕","cart.item.remove":"✕","common.table.donation":"Spende","cart.donation.title":"Spende","donations.checkbox.label":"{{amount}} für {{campaign}} spenden"},iw={en:rw,de:nw},Lf={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:ow,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:lw,cart:()=>"/#/cart",annualTicketPersonalizationForm:(e,t)=>`/#/tickets/annual/personalisation/${e}/${t}`,annualTicketPersonalizationList:e=>`/#/tickets/annual/personalisation/${e}`,annualTicketPersonalizationFormSubmit:e=>`/#/tickets/annual/personalisation/${e}`},aw={...Lf,checkoutSuccess:e=>`/checkout/success/?token=${e}`,checkoutFailure:e=>`/checkout/failure?error=${e}`};function sw(e){return e==="angular"?Lf:aw}function ow(e){return`/#/products/events?category_id=${(k.settings?.multipleEventsMenuItems.event_groups[e]||[]).join("&category_id=")}`}function lw(e){return`/#/products/tours?category_id=${(k.settings?.multipleToursMenuItems.tour_groups[e]||[]).join("&category_id=")}`}function uw(e){return new Promise(t=>setTimeout(t,e))}function zf(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function cw(e){return typeof e=="boolean"}function Ql(e,t=1e3){return new Promise((r,n)=>{const i=Date.now(),a=20,s=()=>{try{const o=e();if(o){r(o);return}if(Date.now()-i>=t){n(new Error("Timeout reached without truthy value"));return}setTimeout(s,a)}catch(o){n(o)}};s()})}var Xl=Array.isArray,qf=e=>!!e&&e.constructor===Object,dw=e=>!!(e&&e.constructor&&e.call&&e.apply),fw=e=>typeof e=="string"||e instanceof String,hw=e=>{try{return Number(e)===e}catch{return!1}},pw=e=>!(!e||!e.then||!dw(e.then)),mw=(e,t)=>e.reduce((r,n)=>{const i=t(n);return r[i]||(r[i]=[]),r[i].push(n),r},{}),Uf=(e,t)=>!e||(e.length??0)===0?null:e.reduce(t);function fr(e,t){return(e||[]).reduce((r,n)=>r+(t?t(n):n),0)}var Bf=(e,t,r=!1)=>{if(!e)return[];const n=(a,s)=>t(a)-t(s),i=(a,s)=>t(s)-t(a);return e.slice().sort(r===!0?i:n)};function vw(e,t){const r=t??(n=>n);return Uf(e,(n,i)=>r(n)>r(i)?n:i)}function eu(e,t){const r=t??(n=>n);return Uf(e,(n,i)=>r(n)<r(i)?n:i)}var gw=(e,t)=>{const r=e.reduce((n,i)=>{const a=t?t(i):i;return n[a]||(n[a]=i),n},{});return Object.values(r)},Vf=(e,t,r)=>{let n=r;for(let i=1;i<=e;i++)n=t(n,i);return n},yw=(e,t)=>e?!t||t.length===0?e:t.reduce((r,n)=>(delete r[n],r),{...e}):{},jt=(e,t)=>!e||!t?e??t??{}:Object.entries({...e,...t}).reduce((r,[n,i])=>({...r,[n]:qf(e[n])?jt(e[n],i):i}),{}),jf=class{#e=se(Pe({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&&zf(this.data.uid))}isGuest(){return!!(this.data.uid&&!zf(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(!(qf(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)}},bw=class{auth;constructor(e){this.auth=e}onRequest({request:e}){const{uid:t,client:r,accessToken:n,expiry:i}=this.auth.data,a=e.headers;t&&!a.has("uid")&&a.set("uid",t),r&&!a.has("client")&&a.set("client",r),n&&!a.has("access-token")&&a.set("access-token",n),i&&!a.has("expiry")&&a.set("expiry",String(i)),n&&!a.has("token-type")&&a.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}},Zf;function Q(e,t,r){function n(o,l){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),o._zod.traits.has(e))return;o._zod.traits.add(e),t(o,l);const c=s.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 a extends i{}Object.defineProperty(a,"name",{value:e});function s(o){var l;const c=r?.Parent?new a:this;n(c,o),(l=c._zod).deferred??(l.deferred=[]);for(const f of c._zod.deferred)f();return c}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:o=>r?.Parent&&o instanceof r.Parent?!0:o?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var Ci=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Wf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Zf=globalThis).__zod_globalConfig??(Zf.__zod_globalConfig={});var Vs=globalThis.__zod_globalConfig;function Yn(e){return e&&Object.assign(Vs,e),Vs}function Hf(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 _w(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 Gf=Symbol("evaluating");function We(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Gf)return n===void 0&&(n=Gf,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 Kf(e){return JSON.stringify(e)}function ww(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Yf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function js(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var kw=ru(()=>{if(Vs.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function Pa(e){if(js(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(js(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Jf(e){return Pa(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Sw=new Set(["string","number","symbol"]);function Zs(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 Ew(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var xw={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 Tw(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 a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=r.shape[a])}return Jn(this,"shape",i),i},checks:[]}))}function Aw(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 a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return Jn(this,"shape",i),i},checks:[]}))}function Cw(e,t){if(!Pa(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 Ow(e,t){if(!Pa(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 Dw(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 Iw(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,a={...i};if(r)for(const s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(a[s]=e?new e({type:"optional",innerType:i[s]}):i[s])}else for(const s in i)a[s]=e?new e({type:"optional",innerType:i[s]}):i[s];return Jn(this,"shape",a),a},checks:[]}))}function Pw(e,t,r){return On(t,Cn(t._zod.def,{get shape(){const n=t._zod.def.shape,i={...n};if(r)for(const a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(const a in n)i[a]=new e({type:"nonoptional",innerType:n[a]});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 Mw(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 Qf(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Ws(e){return typeof e=="string"?e:e?.message}function Qn(e,t,r){const n=e.message?e.message:Ws(e.inst?._zod.def?.error?.(e))??Ws(t?.error?.(e))??Ws(r.customError?.(e))??Ws(r.localeError?.(e))??"Invalid input",{inst:i,continue:a,input:s,...o}=e;return o.path??(o.path=[]),o.message=n,t?.reportInput&&(o.input=s),o}function au(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ma(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}var Xf=(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})},eh=Q("$ZodError",Xf),th=Q("$ZodError",Xf,{Parent:Error});function $w(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 Fw(e,t=r=>r.message){const r={_errors:[]},n=(i,a=[])=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>n({issues:o},[...a,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...a,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...a,...s.path]);else{const o=[...a,...s.path];if(o.length===0)r._errors.push(t(s));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(s))),l=l[f],c++}}}};return n(e),r}var su=e=>(t,r,n,i)=>{const a=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new Ci;if(s.issues.length){const o=new(i?.Err??e)(s.issues.map(l=>Qn(l,a,Yn())));throw Yf(o,i?.callee),o}return s.value},ou=e=>async(t,r,n,i)=>{const a=n?{...n,async:!0}:{async:!0};let s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){const o=new(i?.Err??e)(s.issues.map(l=>Qn(l,a,Yn())));throw Yf(o,i?.callee),o}return s.value},Hs=e=>(t,r,n)=>{const i=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new Ci;return a.issues.length?{success:!1,error:new(e??eh)(a.issues.map(s=>Qn(s,i,Yn())))}:{success:!0,data:a.value}},Nw=Hs(th),Gs=e=>async(t,r,n)=>{const i=n?{...n,async:!0}:{async:!0};let a=t._zod.run({value:r,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(s=>Qn(s,i,Yn())))}:{success:!0,data:a.value}},Rw=Gs(th),Lw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return su(e)(t,r,i)},zw=e=>(t,r,n)=>su(e)(t,r,n),qw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return ou(e)(t,r,i)},Uw=e=>async(t,r,n)=>ou(e)(t,r,n),Bw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Hs(e)(t,r,i)},Vw=e=>(t,r,n)=>Hs(e)(t,r,n),jw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Gs(e)(t,r,i)},Zw=e=>async(t,r,n)=>Gs(e)(t,r,n),Ww=/^[cC][0-9a-z]{6,}$/,Hw=/^[0-9a-z]+$/,Gw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Kw=/^[0-9a-vA-V]{20}$/,Yw=/^[A-Za-z0-9]{27}$/,Jw=/^[a-zA-Z0-9_-]{21}$/,Qw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Xw=/^([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})$/,rh=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)$/,e0=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,t0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function r0(){return new RegExp(t0,"u")}var 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])$/,i0=/^(([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}|:))$/,a0=/^((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])$/,s0=/^(([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])$/,o0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,nh=/^[A-Za-z0-9_-]*$/,l0=/^https?$/,u0=/^\+[1-9]\d{6,14}$/,ih="(?:(?:\\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])))",c0=new RegExp(`^${ih}$`);function ah(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 d0(e){return new RegExp(`^${ah(e)}$`)}function f0(e){const t=ah({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(`^${ih}T(?:${n})$`)}var h0=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},p0=/^-?\d+$/,m0=/^-?\d+(?:\.\d+)?$/,v0=/^[^A-Z]*$/,g0=/^[^a-z]*$/,Zt=Q("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),sh={number:"number",bigint:"bigint",object:"date"},oh=Q("$ZodCheckLessThan",(e,t)=>{Zt.init(e,t);const r=sh[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,a=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<a&&(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})}}),lh=Q("$ZodCheckGreaterThan",(e,t)=>{Zt.init(e,t);const r=sh[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,a=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(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})}}),y0=Q("$ZodCheckMultipleOf",(e,t)=>{Zt.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):_w(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})}}),b0=Q("$ZodCheckNumberFormat",(e,t)=>{Zt.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[i,a]=xw[t.format];e._zod.onattach.push(s=>{const o=s._zod.bag;o.format=t.format,o.minimum=i,o.maximum=a,r&&(o.pattern=p0)}),e._zod.check=s=>{const o=s.value;if(r){if(!Number.isInteger(o)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});return}if(!Number.isSafeInteger(o)){o>0?s.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}):s.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&&s.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),o>a&&s.issues.push({origin:"number",input:o,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),_0=Q("$ZodCheckMaxLength",(e,t)=>{var r;Zt.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 a=au(i);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),w0=Q("$ZodCheckMinLength",(e,t)=>{var r;Zt.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 a=au(i);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),k0=Q("$ZodCheckLengthEquals",(e,t)=>{var r;Zt.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,a=i.length;if(a===t.length)return;const s=au(i),o=a>t.length;n.issues.push({origin:s,...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})}}),Ks=Q("$ZodCheckStringFormat",(e,t)=>{var r,n;Zt.init(e,t),e._zod.onattach.push(i=>{const a=i._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.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=()=>{})}),S0=Q("$ZodCheckRegex",(e,t)=>{Ks.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})}}),E0=Q("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=v0),Ks.init(e,t)}),x0=Q("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=g0),Ks.init(e,t)}),T0=Q("$ZodCheckIncludes",(e,t)=>{Zt.init(e,t);const r=Zs(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(i=>{const a=i._zod.bag;a.patterns??(a.patterns=new Set),a.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})}}),A0=Q("$ZodCheckStartsWith",(e,t)=>{Zt.init(e,t);const r=new RegExp(`^${Zs(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})}}),C0=Q("$ZodCheckEndsWith",(e,t)=>{Zt.init(e,t);const r=new RegExp(`.*${Zs(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})}}),O0=Q("$ZodCheckOverwrite",(e,t)=>{Zt.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),D0=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
|
-
`))}},I0={major:4,minor:4,patch:3},ft=Q("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=I0;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const i of n)for(const a of i._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(s,o,l)=>{let c=Oi(s),f;for(const u of o){if(u._zod.def.when){if(Mw(s)||!u._zod.def.when(s))continue}else if(c)continue;const p=s.issues.length,h=u._zod.check(s);if(h instanceof Promise&&l?.async===!1)throw new Ci;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,s.issues.length!==p&&(c||(c=Oi(s,p)))});else{if(s.issues.length===p)continue;c||(c=Oi(s,p))}}return f?f.then(()=>s):s},a=(s,o,l)=>{if(Oi(s))return s.aborted=!0,s;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=(s,o)=>{if(o.skipChecks)return e._zod.parse(s,o);if(o.direction==="backward"){const c=e._zod.parse({value:s.value,issues:[]},{...o,skipChecks:!0});return c instanceof Promise?c.then(f=>a(f,s,o)):a(c,s,o)}const l=e._zod.parse(s,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 a=Nw(e,i);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return Rw(e,i).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),lu=Q("$ZodString",(e,t)=>{ft.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??h0(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}}),Qe=Q("$ZodStringFormat",(e,t)=>{Ks.init(e,t),lu.init(e,t)}),P0=Q("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Xw),Qe.init(e,t)}),M0=Q("$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=rh(r))}else t.pattern??(t.pattern=rh());Qe.init(e,t)}),$0=Q("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=e0),Qe.init(e,t)}),F0=Q("$ZodURL",(e,t)=>{Qe.init(e,t),e._zod.check=r=>{try{const n=r.value.trim();if(!t.normalize&&t.protocol?.source===l0.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})}}}),N0=Q("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=r0()),Qe.init(e,t)}),R0=Q("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Jw),Qe.init(e,t)}),L0=Q("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ww),Qe.init(e,t)}),z0=Q("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Hw),Qe.init(e,t)}),q0=Q("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Gw),Qe.init(e,t)}),U0=Q("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Kw),Qe.init(e,t)}),B0=Q("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Yw),Qe.init(e,t)}),V0=Q("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=f0(t)),Qe.init(e,t)}),j0=Q("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=c0),Qe.init(e,t)}),Z0=Q("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=d0(t)),Qe.init(e,t)}),W0=Q("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Qw),Qe.init(e,t)}),H0=Q("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=n0),Qe.init(e,t),e._zod.bag.format="ipv4"}),G0=Q("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=i0),Qe.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})}}}),K0=Q("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=a0),Qe.init(e,t)}),Y0=Q("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=s0),Qe.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[i,a]=n;if(!a)throw new Error;const s=Number(a);if(`${s}`!==a)throw new Error;if(s<0||s>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 uh(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var J0=Q("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=o0),Qe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{uh(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Q0(e){if(!nh.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/");return uh(t.padEnd(Math.ceil(t.length/4)*4,"="))}var X0=Q("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=nh),Qe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Q0(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),ek=Q("$ZodE164",(e,t)=>{t.pattern??(t.pattern=u0),Qe.init(e,t)});function tk(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 rk=Q("$ZodJWT",(e,t)=>{Qe.init(e,t),e._zod.check=r=>{tk(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),ch=Q("$ZodNumber",(e,t)=>{ft.init(e,t),e._zod.pattern=e._zod.bag.pattern??m0,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 a=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,...a?{received:a}:{}}),r}}),nk=Q("$ZodNumberFormat",(e,t)=>{b0.init(e,t),ch.init(e,t)}),ik=Q("$ZodUnknown",(e,t)=>{ft.init(e,t),e._zod.parse=r=>r}),ak=Q("$ZodNever",(e,t)=>{ft.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function dh(e,t,r){e.issues.length&&t.issues.push(...Qf(r,e.issues)),t.value[r]=e.value}var sk=Q("$ZodArray",(e,t)=>{ft.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 a=[];for(let s=0;s<i.length;s++){const o=i[s],l=t.element._zod.run({value:o,issues:[]},n);l instanceof Promise?a.push(l.then(c=>dh(c,r,s))):dh(l,r,s)}return a.length?Promise.all(a).then(()=>r):r}});function Ys(e,t,r,n,i,a){const s=r in n;if(e.issues.length){if(i&&a&&!s)return;t.issues.push(...Qf(r,e.issues))}if(!s&&!i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?s&&(t.value[r]=void 0):t.value[r]=e.value}function fh(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=Ew(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function hh(e,t,r,n,i,a){const s=[],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"){s.push(p);continue}const h=l.run({value:t[p],issues:[]},n);h instanceof Promise?e.push(h.then(
|
|
14
|
+
`))}},I0={major:4,minor:4,patch:3},ft=Q("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=I0;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const i of n)for(const a of i._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(s,o,l)=>{let c=Oi(s),f;for(const u of o){if(u._zod.def.when){if(Mw(s)||!u._zod.def.when(s))continue}else if(c)continue;const p=s.issues.length,h=u._zod.check(s);if(h instanceof Promise&&l?.async===!1)throw new Ci;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,s.issues.length!==p&&(c||(c=Oi(s,p)))});else{if(s.issues.length===p)continue;c||(c=Oi(s,p))}}return f?f.then(()=>s):s},a=(s,o,l)=>{if(Oi(s))return s.aborted=!0,s;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=(s,o)=>{if(o.skipChecks)return e._zod.parse(s,o);if(o.direction==="backward"){const c=e._zod.parse({value:s.value,issues:[]},{...o,skipChecks:!0});return c instanceof Promise?c.then(f=>a(f,s,o)):a(c,s,o)}const l=e._zod.parse(s,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 a=Nw(e,i);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return Rw(e,i).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),lu=Q("$ZodString",(e,t)=>{ft.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??h0(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}}),Qe=Q("$ZodStringFormat",(e,t)=>{Ks.init(e,t),lu.init(e,t)}),P0=Q("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Xw),Qe.init(e,t)}),M0=Q("$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=rh(r))}else t.pattern??(t.pattern=rh());Qe.init(e,t)}),$0=Q("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=e0),Qe.init(e,t)}),F0=Q("$ZodURL",(e,t)=>{Qe.init(e,t),e._zod.check=r=>{try{const n=r.value.trim();if(!t.normalize&&t.protocol?.source===l0.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})}}}),N0=Q("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=r0()),Qe.init(e,t)}),R0=Q("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Jw),Qe.init(e,t)}),L0=Q("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ww),Qe.init(e,t)}),z0=Q("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Hw),Qe.init(e,t)}),q0=Q("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Gw),Qe.init(e,t)}),U0=Q("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Kw),Qe.init(e,t)}),B0=Q("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Yw),Qe.init(e,t)}),V0=Q("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=f0(t)),Qe.init(e,t)}),j0=Q("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=c0),Qe.init(e,t)}),Z0=Q("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=d0(t)),Qe.init(e,t)}),W0=Q("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Qw),Qe.init(e,t)}),H0=Q("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=n0),Qe.init(e,t),e._zod.bag.format="ipv4"}),G0=Q("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=i0),Qe.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})}}}),K0=Q("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=a0),Qe.init(e,t)}),Y0=Q("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=s0),Qe.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[i,a]=n;if(!a)throw new Error;const s=Number(a);if(`${s}`!==a)throw new Error;if(s<0||s>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 uh(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var J0=Q("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=o0),Qe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{uh(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Q0(e){if(!nh.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/");return uh(t.padEnd(Math.ceil(t.length/4)*4,"="))}var X0=Q("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=nh),Qe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Q0(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),ek=Q("$ZodE164",(e,t)=>{t.pattern??(t.pattern=u0),Qe.init(e,t)});function tk(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 rk=Q("$ZodJWT",(e,t)=>{Qe.init(e,t),e._zod.check=r=>{tk(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),ch=Q("$ZodNumber",(e,t)=>{ft.init(e,t),e._zod.pattern=e._zod.bag.pattern??m0,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 a=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,...a?{received:a}:{}}),r}}),nk=Q("$ZodNumberFormat",(e,t)=>{b0.init(e,t),ch.init(e,t)}),ik=Q("$ZodUnknown",(e,t)=>{ft.init(e,t),e._zod.parse=r=>r}),ak=Q("$ZodNever",(e,t)=>{ft.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function dh(e,t,r){e.issues.length&&t.issues.push(...Qf(r,e.issues)),t.value[r]=e.value}var sk=Q("$ZodArray",(e,t)=>{ft.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 a=[];for(let s=0;s<i.length;s++){const o=i[s],l=t.element._zod.run({value:o,issues:[]},n);l instanceof Promise?a.push(l.then(c=>dh(c,r,s))):dh(l,r,s)}return a.length?Promise.all(a).then(()=>r):r}});function Ys(e,t,r,n,i,a){const s=r in n;if(e.issues.length){if(i&&a&&!s)return;t.issues.push(...Qf(r,e.issues))}if(!s&&!i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?s&&(t.value[r]=void 0):t.value[r]=e.value}function fh(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=Ew(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function hh(e,t,r,n,i,a){const s=[],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"){s.push(p);continue}const h=l.run({value:t[p],issues:[]},n);h instanceof Promise?e.push(h.then(y=>Ys(y,r,p,t,f,u))):Ys(h,r,p,t,f,u)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:a}),e.length?Promise.all(e).then(()=>r):r}var ok=Q("$ZodObject",(e,t)=>{if(ft.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const s=t.shape;Object.defineProperty(t,"shape",{get:()=>{const o={...s};return Object.defineProperty(t,"shape",{value:o}),o}})}const r=ru(()=>fh(t));We(e._zod,"propValues",()=>{const s=t.shape,o={};for(const l in s){const c=s[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=js,i=t.catchall;let a;e._zod.parse=(s,o)=>{a??(a=r.value);const l=s.value;if(!n(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};const c=[],f=a.shape;for(const u of a.keys){const p=f[u],h=p._zod.optin==="optional",y=p._zod.optout==="optional",v=p._zod.run({value:l[u],issues:[]},o);v instanceof Promise?c.push(v.then(m=>Ys(m,s,u,l,h,y))):Ys(v,s,u,l,h,y)}return i?hh(c,l,s,o,r.value,e):c.length?Promise.all(c).then(()=>s):s}}),lk=Q("$ZodObjectJIT",(e,t)=>{ok.init(e,t);const r=e._zod.parse,n=ru(()=>fh(t)),i=p=>{const h=new D0(["shape","payload","ctx"]),y=n.value,v=S=>{const T=Kf(S);return`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`};h.write("const input = payload.value;");const m=Object.create(null);let g=0;for(const S of y.keys)m[S]=`key_${g++}`;h.write("const newResult = {};");for(const S of y.keys){const T=m[S],A=Kf(S),I=p[S],M=I?._zod?.optin==="optional",N=I?._zod?.optout==="optional";h.write(`const ${T} = ${v(S)};`),M&&N?h.write(`
|
|
15
15
|
if (${T}.issues.length) {
|
|
16
16
|
if (${A} in input) {
|
|
17
17
|
payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
|
|
@@ -70,16 +70,16 @@ ${i}
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
`)}h.write("payload.value = newResult;"),h.write("return payload;");const E=h.compile();return(S,T)=>E(p,S,T)};let a;const s=js,o=!Vs.jitless,c=o&&kw.value,f=t.catchall;let u;e._zod.parse=(p,h)=>{u??(u=n.value);const g=p.value;return s(g)?o&&c&&h?.async===!1&&h.jitless!==!0?(a||(a=i(t.shape)),p=a(p,h),f?hh([],g,p,h,u,e):p):r(p,h):(p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p)}});function ph(e,t,r,n){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const i=e.filter(a=>!Oi(a));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(a=>a.issues.map(s=>Qn(s,n,Yn())))}),t)}var uk=Q("$ZodUnion",(e,t)=>{ft.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 a=!1;const s=[];for(const o of t.options){const l=o._zod.run({value:n.value,issues:[]},i);if(l instanceof Promise)s.push(l),a=!0;else{if(l.issues.length===0)return l;s.push(l)}}return a?Promise.all(s).then(o=>ph(o,n,e,i)):ph(s,n,e,i)}}),ck=Q("$ZodIntersection",(e,t)=>{ft.init(e,t),e._zod.parse=(r,n)=>{const i=r.value,a=t.left._zod.run({value:i,issues:[]},n),s=t.right._zod.run({value:i,issues:[]},n);return a instanceof Promise||s instanceof Promise?Promise.all([a,s]).then(([o,l])=>mh(r,o,l)):mh(r,a,s)}});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(Pa(e)&&Pa(t)){const r=Object.keys(t),n=Object.keys(e).filter(a=>r.indexOf(a)!==-1),i={...e,...t};for(const a of n){const s=uu(e[a],t[a]);if(!s.valid)return{valid:!1,mergeErrorPath:[a,...s.mergeErrorPath]};i[a]=s.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],a=t[n],s=uu(i,a);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function mh(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 a=[...n].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(a.length&&i&&e.issues.push({...i,keys:a}),Oi(e))return e;const s=uu(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var dk=Q("$ZodEnum",(e,t)=>{ft.init(e,t);const r=Hf(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>Sw.has(typeof i)).map(i=>typeof i=="string"?Zs(i):i.toString()).join("|")})$`),e._zod.parse=(i,a)=>{const s=i.value;return n.has(s)||i.issues.push({code:"invalid_value",values:r,input:s,inst:e}),i}}),fk=Q("$ZodTransform",(e,t)=>{ft.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Wf(e.constructor.name);const i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(a=>(r.value=a,r.fallback=!0,r));if(i instanceof Promise)throw new Ci;return r.value=i,r.fallback=!0,r}});function vh(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var gh=Q("$ZodOptional",(e,t)=>{ft.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,a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(s=>vh(s,i)):vh(a,i)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),hk=Q("$ZodExactOptional",(e,t)=>{gh.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)}),pk=Q("$ZodNullable",(e,t)=>{ft.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)}),mk=Q("$ZodDefault",(e,t)=>{ft.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(a=>yh(a,t)):yh(i,t)}});function yh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var vk=Q("$ZodPrefault",(e,t)=>{ft.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))}),gk=Q("$ZodNonOptional",(e,t)=>{ft.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(a=>bh(a,e)):bh(i,e)}});function bh(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 yk=Q("$ZodCatch",(e,t)=>{ft.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(a=>(r.value=a.value,a.issues.length&&(r.value=t.catchValue({...r,error:{issues:a.issues.map(s=>Qn(s,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(a=>Qn(a,n,Yn()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),bk=Q("$ZodPipe",(e,t)=>{ft.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 a=t.out._zod.run(r,n);return a instanceof Promise?a.then(s=>Js(s,t.in,n)):Js(a,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(a=>Js(a,t.out,n)):Js(i,t.out,n)}});function Js(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 _k=Q("$ZodReadonly",(e,t)=>{ft.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(_h):_h(i)}});function _h(e){return e.value=Object.freeze(e.value),e}var wk=Q("$ZodCustom",(e,t)=>{Zt.init(e,t),ft.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(a=>wh(a,r,n,e));wh(i,r,n,e)}});function wh(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(Ma(i))}}var kh,kk=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 Sk(){return new kk}(kh=globalThis).__zod_globalRegistry??(kh.__zod_globalRegistry=Sk());var $a=globalThis.__zod_globalRegistry;function Ek(e,t){return new e({type:"string",...ye(t)})}function xk(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ye(t)})}function Sh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ye(t)})}function Tk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ye(t)})}function Ak(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ye(t)})}function Ck(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ye(t)})}function Ok(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ye(t)})}function Dk(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ye(t)})}function Ik(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ye(t)})}function Pk(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ye(t)})}function Mk(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ye(t)})}function $k(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ye(t)})}function Fk(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ye(t)})}function Nk(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ye(t)})}function Rk(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ye(t)})}function Lk(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ye(t)})}function zk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ye(t)})}function qk(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ye(t)})}function Uk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ye(t)})}function Bk(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ye(t)})}function Vk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ye(t)})}function jk(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ye(t)})}function Zk(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ye(t)})}function Wk(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ye(t)})}function Hk(e,t){return new e({type:"string",format:"date",check:"string_format",...ye(t)})}function Gk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ye(t)})}function Kk(e,t){return new e({type:"string",format:"duration",check:"string_format",...ye(t)})}function Yk(e,t){return new e({type:"number",checks:[],...ye(t)})}function Jk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ye(t)})}function Qk(e){return new e({type:"unknown"})}function Xk(e,t){return new e({type:"never",...ye(t)})}function Eh(e,t){return new oh({check:"less_than",...ye(t),value:e,inclusive:!1})}function cu(e,t){return new oh({check:"less_than",...ye(t),value:e,inclusive:!0})}function xh(e,t){return new lh({check:"greater_than",...ye(t),value:e,inclusive:!1})}function du(e,t){return new lh({check:"greater_than",...ye(t),value:e,inclusive:!0})}function Th(e,t){return new y0({check:"multiple_of",...ye(t),value:e})}function Ah(e,t){return new _0({check:"max_length",...ye(t),maximum:e})}function Qs(e,t){return new w0({check:"min_length",...ye(t),minimum:e})}function Ch(e,t){return new k0({check:"length_equals",...ye(t),length:e})}function eS(e,t){return new S0({check:"string_format",format:"regex",...ye(t),pattern:e})}function tS(e){return new E0({check:"string_format",format:"lowercase",...ye(e)})}function rS(e){return new x0({check:"string_format",format:"uppercase",...ye(e)})}function nS(e,t){return new T0({check:"string_format",format:"includes",...ye(t),includes:e})}function iS(e,t){return new A0({check:"string_format",format:"starts_with",...ye(t),prefix:e})}function aS(e,t){return new C0({check:"string_format",format:"ends_with",...ye(t),suffix:e})}function Di(e){return new O0({check:"overwrite",tx:e})}function sS(e){return Di(t=>t.normalize(e))}function oS(){return Di(e=>e.trim())}function lS(){return Di(e=>e.toLowerCase())}function uS(){return Di(e=>e.toUpperCase())}function cS(){return Di(e=>ww(e))}function dS(e,t,r){return new e({type:"array",element:t,...ye(r)})}function fS(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ye(r)})}function hS(e,t){const r=pS(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ma(i,n.value,r._zod.def));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=r),a.continue??(a.continue=!r._zod.def.abort),n.issues.push(Ma(a))}},e(n.value,n)),t);return r}function pS(e,t){const r=new Zt({check:"custom",...ye(t)});return r._zod.check=e,r}function Oh(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??$a,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 xt(e,t,r={path:[],schemaPath:[]}){var n;const i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,r.schemaPath.includes(e)&&(a.cycle=r.path),a.schema;const s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);const o=e._zod.toJSONSchema?.();if(o)s.schema=o;else{const c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,c);else{const u=s.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&&(s.ref||(s.ref=f),xt(f,t,c),t.seen.get(f).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),t.io==="input"&&It(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function Dh(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 s of e.seen.entries()){const o=e.metadataRegistry.get(s[0])?.id;if(o){const l=n.get(o);if(l&&l!==s[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,s[0])}}const i=s=>{const o=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(s[0])?.id,u=e.external.uri??(h=>h);if(f)return{ref:u(f)};const p=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=p,{defId:p,ref:`${u("__shared")}#/${o}/${p}`}}if(s[1]===r)return{ref:"#"};const l=`#/${o}/`,c=s[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:l+c}},a=s=>{if(s[1].schema.$ref)return;const o=s[1],{ref:l,defId:c}=i(s);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 s of e.seen.entries()){const o=s[1];if(o.cycle)throw new Error(`Cycle detected: #/${o.cycle?.join("/")}/<root>
|
|
73
|
+
`)}h.write("payload.value = newResult;"),h.write("return payload;");const E=h.compile();return(S,T)=>E(p,S,T)};let a;const s=js,o=!Vs.jitless,c=o&&kw.value,f=t.catchall;let u;e._zod.parse=(p,h)=>{u??(u=n.value);const y=p.value;return s(y)?o&&c&&h?.async===!1&&h.jitless!==!0?(a||(a=i(t.shape)),p=a(p,h),f?hh([],y,p,h,u,e):p):r(p,h):(p.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),p)}});function ph(e,t,r,n){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const i=e.filter(a=>!Oi(a));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(a=>a.issues.map(s=>Qn(s,n,Yn())))}),t)}var uk=Q("$ZodUnion",(e,t)=>{ft.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 a=!1;const s=[];for(const o of t.options){const l=o._zod.run({value:n.value,issues:[]},i);if(l instanceof Promise)s.push(l),a=!0;else{if(l.issues.length===0)return l;s.push(l)}}return a?Promise.all(s).then(o=>ph(o,n,e,i)):ph(s,n,e,i)}}),ck=Q("$ZodIntersection",(e,t)=>{ft.init(e,t),e._zod.parse=(r,n)=>{const i=r.value,a=t.left._zod.run({value:i,issues:[]},n),s=t.right._zod.run({value:i,issues:[]},n);return a instanceof Promise||s instanceof Promise?Promise.all([a,s]).then(([o,l])=>mh(r,o,l)):mh(r,a,s)}});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(Pa(e)&&Pa(t)){const r=Object.keys(t),n=Object.keys(e).filter(a=>r.indexOf(a)!==-1),i={...e,...t};for(const a of n){const s=uu(e[a],t[a]);if(!s.valid)return{valid:!1,mergeErrorPath:[a,...s.mergeErrorPath]};i[a]=s.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],a=t[n],s=uu(i,a);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function mh(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 a=[...n].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(a.length&&i&&e.issues.push({...i,keys:a}),Oi(e))return e;const s=uu(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var dk=Q("$ZodEnum",(e,t)=>{ft.init(e,t);const r=Hf(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>Sw.has(typeof i)).map(i=>typeof i=="string"?Zs(i):i.toString()).join("|")})$`),e._zod.parse=(i,a)=>{const s=i.value;return n.has(s)||i.issues.push({code:"invalid_value",values:r,input:s,inst:e}),i}}),fk=Q("$ZodTransform",(e,t)=>{ft.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Wf(e.constructor.name);const i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(a=>(r.value=a,r.fallback=!0,r));if(i instanceof Promise)throw new Ci;return r.value=i,r.fallback=!0,r}});function vh(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var gh=Q("$ZodOptional",(e,t)=>{ft.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,a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(s=>vh(s,i)):vh(a,i)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),hk=Q("$ZodExactOptional",(e,t)=>{gh.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)}),pk=Q("$ZodNullable",(e,t)=>{ft.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)}),mk=Q("$ZodDefault",(e,t)=>{ft.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(a=>yh(a,t)):yh(i,t)}});function yh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var vk=Q("$ZodPrefault",(e,t)=>{ft.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))}),gk=Q("$ZodNonOptional",(e,t)=>{ft.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(a=>bh(a,e)):bh(i,e)}});function bh(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 yk=Q("$ZodCatch",(e,t)=>{ft.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(a=>(r.value=a.value,a.issues.length&&(r.value=t.catchValue({...r,error:{issues:a.issues.map(s=>Qn(s,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(a=>Qn(a,n,Yn()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),bk=Q("$ZodPipe",(e,t)=>{ft.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 a=t.out._zod.run(r,n);return a instanceof Promise?a.then(s=>Js(s,t.in,n)):Js(a,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(a=>Js(a,t.out,n)):Js(i,t.out,n)}});function Js(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 _k=Q("$ZodReadonly",(e,t)=>{ft.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(_h):_h(i)}});function _h(e){return e.value=Object.freeze(e.value),e}var wk=Q("$ZodCustom",(e,t)=>{Zt.init(e,t),ft.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(a=>wh(a,r,n,e));wh(i,r,n,e)}});function wh(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(Ma(i))}}var kh,kk=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 Sk(){return new kk}(kh=globalThis).__zod_globalRegistry??(kh.__zod_globalRegistry=Sk());var $a=globalThis.__zod_globalRegistry;function Ek(e,t){return new e({type:"string",...ye(t)})}function xk(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ye(t)})}function Sh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ye(t)})}function Tk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ye(t)})}function Ak(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ye(t)})}function Ck(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ye(t)})}function Ok(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ye(t)})}function Dk(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ye(t)})}function Ik(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ye(t)})}function Pk(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ye(t)})}function Mk(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ye(t)})}function $k(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ye(t)})}function Fk(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ye(t)})}function Nk(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ye(t)})}function Rk(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ye(t)})}function Lk(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ye(t)})}function zk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ye(t)})}function qk(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ye(t)})}function Uk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ye(t)})}function Bk(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ye(t)})}function Vk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ye(t)})}function jk(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ye(t)})}function Zk(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ye(t)})}function Wk(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ye(t)})}function Hk(e,t){return new e({type:"string",format:"date",check:"string_format",...ye(t)})}function Gk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ye(t)})}function Kk(e,t){return new e({type:"string",format:"duration",check:"string_format",...ye(t)})}function Yk(e,t){return new e({type:"number",checks:[],...ye(t)})}function Jk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ye(t)})}function Qk(e){return new e({type:"unknown"})}function Xk(e,t){return new e({type:"never",...ye(t)})}function Eh(e,t){return new oh({check:"less_than",...ye(t),value:e,inclusive:!1})}function cu(e,t){return new oh({check:"less_than",...ye(t),value:e,inclusive:!0})}function xh(e,t){return new lh({check:"greater_than",...ye(t),value:e,inclusive:!1})}function du(e,t){return new lh({check:"greater_than",...ye(t),value:e,inclusive:!0})}function Th(e,t){return new y0({check:"multiple_of",...ye(t),value:e})}function Ah(e,t){return new _0({check:"max_length",...ye(t),maximum:e})}function Qs(e,t){return new w0({check:"min_length",...ye(t),minimum:e})}function Ch(e,t){return new k0({check:"length_equals",...ye(t),length:e})}function eS(e,t){return new S0({check:"string_format",format:"regex",...ye(t),pattern:e})}function tS(e){return new E0({check:"string_format",format:"lowercase",...ye(e)})}function rS(e){return new x0({check:"string_format",format:"uppercase",...ye(e)})}function nS(e,t){return new T0({check:"string_format",format:"includes",...ye(t),includes:e})}function iS(e,t){return new A0({check:"string_format",format:"starts_with",...ye(t),prefix:e})}function aS(e,t){return new C0({check:"string_format",format:"ends_with",...ye(t),suffix:e})}function Di(e){return new O0({check:"overwrite",tx:e})}function sS(e){return Di(t=>t.normalize(e))}function oS(){return Di(e=>e.trim())}function lS(){return Di(e=>e.toLowerCase())}function uS(){return Di(e=>e.toUpperCase())}function cS(){return Di(e=>ww(e))}function dS(e,t,r){return new e({type:"array",element:t,...ye(r)})}function fS(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ye(r)})}function hS(e,t){const r=pS(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ma(i,n.value,r._zod.def));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=r),a.continue??(a.continue=!r._zod.def.abort),n.issues.push(Ma(a))}},e(n.value,n)),t);return r}function pS(e,t){const r=new Zt({check:"custom",...ye(t)});return r._zod.check=e,r}function Oh(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??$a,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 xt(e,t,r={path:[],schemaPath:[]}){var n;const i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,r.schemaPath.includes(e)&&(a.cycle=r.path),a.schema;const s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);const o=e._zod.toJSONSchema?.();if(o)s.schema=o;else{const c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,c);else{const u=s.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&&(s.ref||(s.ref=f),xt(f,t,c),t.seen.get(f).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),t.io==="input"&&It(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function Dh(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 s of e.seen.entries()){const o=e.metadataRegistry.get(s[0])?.id;if(o){const l=n.get(o);if(l&&l!==s[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,s[0])}}const i=s=>{const o=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(s[0])?.id,u=e.external.uri??(h=>h);if(f)return{ref:u(f)};const p=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=p,{defId:p,ref:`${u("__shared")}#/${o}/${p}`}}if(s[1]===r)return{ref:"#"};const l=`#/${o}/`,c=s[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:l+c}},a=s=>{if(s[1].schema.$ref)return;const o=s[1],{ref:l,defId:c}=i(s);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 s of e.seen.entries()){const o=s[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 s of e.seen.entries()){const o=s[1];if(t===s[0]){a(s);continue}if(e.external){const l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){a(s);continue}}if(e.metadataRegistry.get(s[0])?.id){a(s);continue}if(o.cycle){a(s);continue}if(o.count>1&&e.reused==="ref"){a(s);continue}}}function Ih(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 a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;const s=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,s[l.defId]=l.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:Xs(t,"input",e.processors),output:Xs(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 mS=(e,t={})=>r=>{const n=Oh({...r,processors:t});return xt(e,n),Dh(n,e),Ih(n,e)},Xs=(e,t,r={})=>n=>{const{libraryOptions:i,target:a}=n??{},s=Oh({...i??{},target:a,io:t,processors:r});return xt(e,s),Dh(s,e),Ih(s,e)},vS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},gS=(e,t,r,n)=>{const i=r;i.type="string";const{minimum:a,maximum:s,format:o,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof a=="number"&&(i.minLength=a),typeof s=="number"&&(i.maxLength=s),o&&(i.format=vS[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}))])}},yS=(e,t,r,n)=>{const i=r,{minimum:a,maximum:s,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>=(a??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(s??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 a=="number"&&(i.minimum=a),p?h?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof s=="number"&&(i.maximum=s),typeof l=="number"&&(i.multipleOf=l)},bS=(e,t,r,n)=>{r.not={}},_S=(e,t,r,n)=>{},wS=(e,t,r,n)=>{const i=e._zod.def,a=Hf(i.entries);a.every(s=>typeof s=="number")&&(r.type="number"),a.every(s=>typeof s=="string")&&(r.type="string"),r.enum=a},kS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},SS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},ES=(e,t,r,n)=>{const i=r,a=e._zod.def,{minimum:s,maximum:o}=e._zod.bag;typeof s=="number"&&(i.minItems=s),typeof o=="number"&&(i.maxItems=o),i.type="array",i.items=xt(a.element,t,{...n,path:[...n.path,"items"]})},xS=(e,t,r,n)=>{const i=r,a=e._zod.def;i.type="object",i.properties={};const s=a.shape;for(const c in s)i.properties[c]=xt(s[c],t,{...n,path:[...n.path,"properties",c]});const o=new Set(Object.keys(s)),l=new Set([...o].filter(c=>{const f=a.shape[c]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));l.size>0&&(i.required=Array.from(l)),a.catchall?._zod.def.type==="never"?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=xt(a.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},TS=(e,t,r,n)=>{const i=e._zod.def,a=i.inclusive===!1,s=i.options.map((o,l)=>xt(o,t,{...n,path:[...n.path,a?"oneOf":"anyOf",l]}));a?r.oneOf=s:r.anyOf=s},AS=(e,t,r,n)=>{const i=e._zod.def,a=xt(i.left,t,{...n,path:[...n.path,"allOf",0]}),s=xt(i.right,t,{...n,path:[...n.path,"allOf",1]}),o=l=>"allOf"in l&&Object.keys(l).length===1;r.allOf=[...o(a)?a.allOf:[a],...o(s)?s.allOf:[s]]},CS=(e,t,r,n)=>{const i=e._zod.def,a=xt(i.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=i.innerType,r.nullable=!0):r.anyOf=[a,{type:"null"}]},OS=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType},DS=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},IS=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},PS=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType;let s;try{s=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},MS=(e,t,r,n)=>{const i=e._zod.def,a=i.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?a?i.out:i.in:i.out;xt(s,t,n);const o=t.seen.get(e);o.ref=s},$S=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType,r.readOnly=!0},Ph=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType},FS=Q("ZodISODateTime",(e,t)=>{V0.init(e,t),Xe.init(e,t)});function NS(e){return Wk(FS,e)}var RS=Q("ZodISODate",(e,t)=>{j0.init(e,t),Xe.init(e,t)});function LS(e){return Hk(RS,e)}var zS=Q("ZodISOTime",(e,t)=>{Z0.init(e,t),Xe.init(e,t)});function qS(e){return Gk(zS,e)}var US=Q("ZodISODuration",(e,t)=>{W0.init(e,t),Xe.init(e,t)});function BS(e){return Kk(US,e)}var VS=(e,t)=>{eh.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Fw(e,r)},flatten:{value:r=>$w(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}}})},hr=Q("ZodError",VS,{Parent:Error}),jS=su(hr),ZS=ou(hr),WS=Hs(hr),HS=Gs(hr),GS=Lw(hr),KS=zw(hr),YS=qw(hr),JS=Uw(hr),QS=Bw(hr),XS=Vw(hr),e1=jw(hr),t1=Zw(hr),Mh=new WeakMap;function Fa(e,t,r){const n=Object.getPrototypeOf(e);let i=Mh.get(n);if(i||(i=new Set,Mh.set(n,i)),!i.has(t)){i.add(t);for(const a in r){const s=r[a];Object.defineProperty(n,a,{configurable:!0,enumerable:!1,get(){const o=s.bind(this);return Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:o}),o},set(o){Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:o})}})}}}var ht=Q("ZodType",(e,t)=>(ft.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Xs(e,"input"),output:Xs(e,"output")}}),e.toJSONSchema=mS(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>jS(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>WS(e,r,n),e.parseAsync=async(r,n)=>ZS(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>HS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>GS(e,r,n),e.decode=(r,n)=>KS(e,r,n),e.encodeAsync=async(r,n)=>YS(e,r,n),e.decodeAsync=async(r,n)=>JS(e,r,n),e.safeEncode=(r,n)=>QS(e,r,n),e.safeDecode=(r,n)=>XS(e,r,n),e.safeEncodeAsync=async(r,n)=>e1(e,r,n),e.safeDecodeAsync=async(r,n)=>t1(e,r,n),Fa(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(W1(r,n))},superRefine(r,n){return this.check(H1(r,n))},overwrite(r){return this.check(Di(r))},optional(){return Uh(this)},exactOptional(){return $1(this)},nullable(){return Bh(this)},nullish(){return Uh(Bh(this))},nonoptional(r){return q1(this,r)},array(){return zh(this)},or(r){return A1([this,r])},and(r){return O1(this,r)},transform(r){return jh(this,P1(r))},default(r){return R1(this,r)},prefault(r){return z1(this,r)},catch(r){return B1(this,r)},pipe(r){return jh(this,r)},readonly(){return Z1(this)},describe(r){const n=this.clone();return $a.add(n,{description:r}),n},meta(...r){if(r.length===0)return $a.get(this);const n=this.clone();return $a.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 $a.get(e)?.description},configurable:!0}),e)),$h=Q("_ZodString",(e,t)=>{lu.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(n,i,a)=>gS(e,n,i,a);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Fa(e,"_ZodString",{regex(...n){return this.check(eS(...n))},includes(...n){return this.check(nS(...n))},startsWith(...n){return this.check(iS(...n))},endsWith(...n){return this.check(aS(...n))},min(...n){return this.check(Qs(...n))},max(...n){return this.check(Ah(...n))},length(...n){return this.check(Ch(...n))},nonempty(...n){return this.check(Qs(1,...n))},lowercase(n){return this.check(tS(n))},uppercase(n){return this.check(rS(n))},trim(){return this.check(oS())},normalize(...n){return this.check(sS(...n))},toLowerCase(){return this.check(lS())},toUpperCase(){return this.check(uS())},slugify(){return this.check(cS())}})}),r1=Q("ZodString",(e,t)=>{lu.init(e,t),$h.init(e,t),e.email=r=>e.check(xk(n1,r)),e.url=r=>e.check(Dk(i1,r)),e.jwt=r=>e.check(Zk(b1,r)),e.emoji=r=>e.check(Ik(a1,r)),e.guid=r=>e.check(Sh(Fh,r)),e.uuid=r=>e.check(Tk(eo,r)),e.uuidv4=r=>e.check(Ak(eo,r)),e.uuidv6=r=>e.check(Ck(eo,r)),e.uuidv7=r=>e.check(Ok(eo,r)),e.nanoid=r=>e.check(Pk(s1,r)),e.guid=r=>e.check(Sh(Fh,r)),e.cuid=r=>e.check(Mk(o1,r)),e.cuid2=r=>e.check($k(l1,r)),e.ulid=r=>e.check(Fk(u1,r)),e.base64=r=>e.check(Bk(v1,r)),e.base64url=r=>e.check(Vk(g1,r)),e.xid=r=>e.check(Nk(c1,r)),e.ksuid=r=>e.check(Rk(d1,r)),e.ipv4=r=>e.check(Lk(f1,r)),e.ipv6=r=>e.check(zk(h1,r)),e.cidrv4=r=>e.check(qk(p1,r)),e.cidrv6=r=>e.check(Uk(m1,r)),e.e164=r=>e.check(jk(y1,r)),e.datetime=r=>e.check(NS(r)),e.date=r=>e.check(LS(r)),e.time=r=>e.check(qS(r)),e.duration=r=>e.check(BS(r))});function Xt(e){return Ek(r1,e)}var Xe=Q("ZodStringFormat",(e,t)=>{Qe.init(e,t),$h.init(e,t)}),n1=Q("ZodEmail",(e,t)=>{$0.init(e,t),Xe.init(e,t)}),Fh=Q("ZodGUID",(e,t)=>{P0.init(e,t),Xe.init(e,t)}),eo=Q("ZodUUID",(e,t)=>{M0.init(e,t),Xe.init(e,t)}),i1=Q("ZodURL",(e,t)=>{F0.init(e,t),Xe.init(e,t)}),a1=Q("ZodEmoji",(e,t)=>{N0.init(e,t),Xe.init(e,t)}),s1=Q("ZodNanoID",(e,t)=>{R0.init(e,t),Xe.init(e,t)}),o1=Q("ZodCUID",(e,t)=>{L0.init(e,t),Xe.init(e,t)}),l1=Q("ZodCUID2",(e,t)=>{z0.init(e,t),Xe.init(e,t)}),u1=Q("ZodULID",(e,t)=>{q0.init(e,t),Xe.init(e,t)}),c1=Q("ZodXID",(e,t)=>{U0.init(e,t),Xe.init(e,t)}),d1=Q("ZodKSUID",(e,t)=>{B0.init(e,t),Xe.init(e,t)}),f1=Q("ZodIPv4",(e,t)=>{H0.init(e,t),Xe.init(e,t)}),h1=Q("ZodIPv6",(e,t)=>{G0.init(e,t),Xe.init(e,t)}),p1=Q("ZodCIDRv4",(e,t)=>{K0.init(e,t),Xe.init(e,t)}),m1=Q("ZodCIDRv6",(e,t)=>{Y0.init(e,t),Xe.init(e,t)}),v1=Q("ZodBase64",(e,t)=>{J0.init(e,t),Xe.init(e,t)}),g1=Q("ZodBase64URL",(e,t)=>{X0.init(e,t),Xe.init(e,t)}),y1=Q("ZodE164",(e,t)=>{ek.init(e,t),Xe.init(e,t)}),b1=Q("ZodJWT",(e,t)=>{rk.init(e,t),Xe.init(e,t)}),Nh=Q("ZodNumber",(e,t)=>{ch.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(n,i,a)=>yS(e,n,i,a),Fa(e,"ZodNumber",{gt(n,i){return this.check(xh(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(Eh(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(Rh(n))},safe(n){return this.check(Rh(n))},positive(n){return this.check(xh(0,n))},nonnegative(n){return this.check(du(0,n))},negative(n){return this.check(Eh(0,n))},nonpositive(n){return this.check(cu(0,n))},multipleOf(n,i){return this.check(Th(n,i))},step(n,i){return this.check(Th(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 Na(e){return Yk(Nh,e)}var _1=Q("ZodNumberFormat",(e,t)=>{nk.init(e,t),Nh.init(e,t)});function Rh(e){return Jk(_1,e)}var w1=Q("ZodUnknown",(e,t)=>{ik.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_S(e,r,n,i)});function Lh(){return Qk(w1)}var k1=Q("ZodNever",(e,t)=>{ak.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>bS(e,r,n,i)});function S1(e){return Xk(k1,e)}var E1=Q("ZodArray",(e,t)=>{sk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>ES(e,r,n,i),e.element=t.element,Fa(e,"ZodArray",{min(r,n){return this.check(Qs(r,n))},nonempty(r){return this.check(Qs(1,r))},max(r,n){return this.check(Ah(r,n))},length(r,n){return this.check(Ch(r,n))},unwrap(){return this.element}})});function zh(e,t){return dS(E1,e,t)}var x1=Q("ZodObject",(e,t)=>{lk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>xS(e,r,n,i),We(e,"shape",()=>t.shape),Fa(e,"ZodObject",{keyof(){return D1(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Lh()})},loose(){return this.clone({...this._zod.def,catchall:Lh()})},strict(){return this.clone({...this._zod.def,catchall:S1()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return Cw(this,r)},safeExtend(r){return Ow(this,r)},merge(r){return Dw(this,r)},pick(r){return Tw(this,r)},omit(r){return Aw(this,r)},partial(...r){return Iw(qh,this,r[0])},required(...r){return Pw(Vh,this,r[0])}})});function fu(e,t){return new x1({type:"object",shape:e??{},...ye(t)})}var T1=Q("ZodUnion",(e,t)=>{uk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>TS(e,r,n,i),e.options=t.options});function A1(e,t){return new T1({type:"union",options:e,...ye(t)})}var C1=Q("ZodIntersection",(e,t)=>{ck.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>AS(e,r,n,i)});function O1(e,t){return new C1({type:"intersection",left:e,right:t})}var hu=Q("ZodEnum",(e,t)=>{dk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(n,i,a)=>wS(e,n,i,a),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{const a={};for(const s of n)if(r.has(s))a[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new hu({...t,checks:[],...ye(i),entries:a})},e.exclude=(n,i)=>{const a={...t.entries};for(const s of n)if(r.has(s))delete a[s];else throw new Error(`Key ${s} not found in enum`);return new hu({...t,checks:[],...ye(i),entries:a})}});function D1(e,t){return new hu({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...ye(t)})}var I1=Q("ZodTransform",(e,t)=>{fk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>SS(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Wf(e.constructor.name);r.addIssue=a=>{if(typeof a=="string")r.issues.push(Ma(a,r.value,t));else{const s=a;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(Ma(s))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(a=>(r.value=a,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function P1(e){return new I1({type:"transform",transform:e})}var qh=Q("ZodOptional",(e,t)=>{gh.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ph(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Uh(e){return new qh({type:"optional",innerType:e})}var M1=Q("ZodExactOptional",(e,t)=>{hk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ph(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function $1(e){return new M1({type:"optional",innerType:e})}var F1=Q("ZodNullable",(e,t)=>{pk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>CS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Bh(e){return new F1({type:"nullable",innerType:e})}var N1=Q("ZodDefault",(e,t)=>{mk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>DS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function R1(e,t){return new N1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Jf(t)}})}var L1=Q("ZodPrefault",(e,t)=>{vk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>IS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function z1(e,t){return new L1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Jf(t)}})}var Vh=Q("ZodNonOptional",(e,t)=>{gk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>OS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function q1(e,t){return new Vh({type:"nonoptional",innerType:e,...ye(t)})}var U1=Q("ZodCatch",(e,t)=>{yk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>PS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function B1(e,t){return new U1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var V1=Q("ZodPipe",(e,t)=>{bk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>MS(e,r,n,i),e.in=t.in,e.out=t.out});function jh(e,t){return new V1({type:"pipe",in:e,out:t})}var j1=Q("ZodReadonly",(e,t)=>{_k.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$S(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Z1(e){return new j1({type:"readonly",innerType:e})}var Zh=Q("ZodCustom",(e,t)=>{wk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kS(e,r,n,i)});function W1(e,t={}){return fS(Zh,e,t)}function H1(e,t){return hS(e,t)}function G1(e,t={}){const r=new Zh({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 K1=fu({id:Na(),customer:fu({customer_salutation_id:Na().positive({message:"user.fieldErrors.titleRequire"}),name:Xt().min(1,{message:"user.fieldErrors.nameRequire"}),surname:Xt().min(1,{message:"user.fieldErrors.surnameRequire"}),email:Xt().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:Xt().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:Xt().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:Xt().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:Xt().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:Na().positive().default(60),language_id:Na().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),xN=fu({ticket_sale_id:Na(),start_at:Xt().date(),personalizations:zh(K1)});function pu(e,t){return e-t*Math.floor(e/t)}var Wh=1721426;function to(e,t,r,n){t=mu(e,t);let i=t-1,a=-2;return r<=2?a=0:ro(t)&&(a=-1),Wh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+a+n)}function ro(e){return e%4===0&&(e%100!==0||e%400===0)}function mu(e,t){return e==="BC"?1-t:t}function Y1(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var J1={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-Wh,n=Math.floor(r/146097),i=pu(r,146097),a=Math.floor(i/36524),s=pu(i,36524),o=Math.floor(s/1461),l=pu(s,1461),c=Math.floor(l/365),[f,u]=Y1(n*400+a*100+o*4+c+(a!==4&&c!==4?1:0)),p=t-to(f,u,1,1),h=2;t<to(f,u,3,1)?h=0:ro(u)&&(h=1);let g=Math.floor(((p+h)*12+373)/367);return new za(f,u,g,t-to(f,u,g,1)+1)}toJulianDay(e){return to(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return J1[ro(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return ro(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"}},Q1={"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=tr(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=tr(t,e.calendar),e=yu(e),t=yu(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function X1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function eE(e,t){return Dn(e,Pi(t))}var tE={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Hh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?tE[r]:oE(t),a=Math.ceil(n+1-i)%7;return a<0&&(a+=7),a}function rE(e){return Br(Date.now(),e)}function Pi(e){return cE(rE(e))}function Gh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function nE(e,t){return Kh(e)-Kh(t)}function Kh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var gu=null,iE=!1;function er(){return gu==null&&(gu=new Intl.DateTimeFormat().resolvedOptions().timeZone),gu}function Yh(){return iE}function yu(e){return e.subtract({days:e.day-1})}function aE(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var Jh=new Map,bu=new Map;function sE(e){if(Intl.Locale){let r=Jh.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&Jh.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function oE(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=sE(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&&Q1[r]||0};bu.set(e,t)}return t.firstDay}function In(e){return e=tr(e,new Ii),Qh(mu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Qh(e,t,r,n,i,a,s){let o=new Date;return o.setUTCHours(n,i,a,s),o.setUTCFullYear(e,t-1,r),o.getTime()}function Ra(e,t){if(t==="UTC")return 0;if(e>0&&t===er()&&!Yh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:a,minute:s,second:o}=ep(e,t);return Qh(r,n,i,a,s,o,0)-Math.floor(e/1e3)*1e3}var Xh=new Map;function ep(e,t){let r=Xh.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"}),Xh.set(t,r));let n=r.formatToParts(new Date(e)),i={};for(let a of n)a.type!=="literal"&&(i[a.type]=a.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 no=864e5;function lE(e,t){let r=In(e);return tp(e,t,r-Ra(r-no,t),r-Ra(r+no,t))}function tp(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>uE(e,t,i))}function uE(e,t,r){let n=ep(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===er()&&r==="compatible"&&!Yh()){n=tr(n,new Ii);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),a=Ra(i-no,t),s=Ra(i+no,t),o=tp(n,t,i-a,i-s);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-a,i-s);case"compatible":case"later":return Math.max(i-a,i-s);case"reject":throw new RangeError("No such absolute time found")}}function rp(e,t,r="compatible"){return new Date(Ur(e,t,r))}function Br(e,t){let r=Ra(e,t),n=new Date(e+r),i=n.getUTCFullYear(),a=n.getUTCMonth()+1,s=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,a,s,t,r,o,l,c,f)}function cE(e){return new za(e.calendar,e.era,e.year,e.month,e.day)}function Pn(e,t){let r=0,n=0,i=0,a=0;if("timeZone"in e)({hour:r,minute:n,second:i,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:i,millisecond:a}=t),new Mi(e.calendar,e.era,e.year,e.month,e.day,r,n,i,a)}function tr(e,t){if(X1(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 dE(e,t,r){return e instanceof Mn?e.timeZone===t?e:np(e,t):Br(Ur(e,t,r),t)}function fE(e){let t=In(e)-e.offset;return new Date(t)}function np(e,t){return tr(Br(In(e)-e.offset,t),e.calendar)}var La=36e5;function io(e,t){let r=e.copy(),n="hour"in r?vE(r,t):0;_u(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,wu(r),ip(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,hE(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 s=r.calendar.isInverseEra?.(r);r.year=i,r.month=s?1:r.calendar.getMonthsInYear(r),r.day=s?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let a=r.calendar.getMonthsInYear(r);return r.month>a&&(r.month=a,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 hE(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 ip(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)),ip(e)}function ap(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function sp(e,t){return io(e,ap(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),Xn(r),r}function ao(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),mE(r),r}function pE(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 mE(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 vE(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,pE(e)}function Su(e,t,r,n){let i=e.copy();switch(t){case"era":{let a=e.calendar.getEras(),s=a.indexOf(e.era);if(s<0)throw new Error("Invalid era: "+e.era);s=sn(s,r,0,a.length-1,n?.round),i.era=a[s],Xn(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=sn(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=sn(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":i.day=sn(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 op(e,t,r,n){let i=e.copy();switch(t){case"hour":{let a=e.hour,s=0,o=23;if(n?.hourCycle===12){let l=a>=12;s=l?12:0,o=l?23:11}i.hour=sn(a,r,s,o,n?.round);break}case"minute":i.minute=sn(e.minute,r,0,59,n?.round);break;case"second":i.second=sn(e.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=sn(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return i}function sn(e,t,r,n,i=!1){if(i){e+=Math.sign(t),e<r&&(e=n);let a=Math.abs(t);t>0?e=Math.ceil(e/a)*a:e=Math.floor(e/a)*a,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function lp(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(io(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,tr(Br(r,e.timeZone),e.calendar)}function gE(e,t){return lp(e,ap(t))}function yE(e,t,r,n){switch(t){case"hour":{let i=0,a=23;if(n?.hourCycle===12){let g=e.hour>=12;i=g?12:0,a=g?23:11}let s=Pn(e),o=tr(ao(s,{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=tr(ao(s,{hour:a}),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/La),h=u%La;return u=sn(p,r,Math.floor(l/La),Math.floor(f/La),n?.round)*La+h,tr(Br(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return op(e,t,r,n);case"era":case"year":case"month":case"day":return tr(Br(Ur(Su(Pn(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function bE(e,t,r){let n=Pn(e),i=ao(ku(n,t),t);return i.compare(n)===0?e:tr(Br(Ur(i,e.timeZone,r),e.timeZone),e.calendar)}var _E=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,wE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,kE=/^([+-]\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)$/,SE=["hours","minutes","seconds"],TN=["years","months","weeks","days",...SE];function oo(e){let t=e.match(_E);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 za(Be(t[1],0,9999),Be(t[2],1,12),1);return r.day=Be(t[3],1,r.calendar.getDaysInMonth(r)),r}function up(e){let t=e.match(wE);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 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 cp(e,t){let r=e.match(kE);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 a=Pn(i),s;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),s=In(i)-i.offset,!lE(a,i.timeZone).includes(s))throw new Error(`Offset ${hp(i.offset)} is invalid for ${xu(i)} in ${i.timeZone}`)}else s=Ur(Pn(a),i.timeZone,t);return Br(s,i.timeZone)}function dp(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),np(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 EE(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 fp(e){let t=tr(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 xu(e){return`${fp(e)}T${EE(e)}`}function hp(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),a=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(a+=`:${String(i).padStart(2,"0")}`),a}function xE(e){return`${xu(e)}${hp(e.offset)}[${e.timeZone}]`}function Tu(e){let t=typeof e[0]=="object"?e.shift():new Ii,r;if(typeof e[0]=="string")r=e.shift();else{let s=t.getEras();r=s[s.length-1]}let n=e.shift(),i=e.shift(),a=e.shift();return[t,r,n,i,a]}var za=class ud{#e;constructor(...t){let[r,n,i,a,s]=Tu(t);this.calendar=r,this.era=n,this.year=i,this.month=a,this.day=s,Xn(this)}copy(){return this.era?new ud(this.calendar,this.era,this.year,this.month,this.day):new ud(this.calendar,this.year,this.month,this.day)}add(t){return io(this,t)}subtract(t){return sp(this,t)}set(t){return ku(this,t)}cycle(t,r,n){return Su(this,t,r,n)}toDate(t){return rp(this,t)}toString(){return fp(this)}compare(t){return Gh(this,t)}},Mi=class cd{#e;constructor(...t){let[r,n,i,a,s]=Tu(t);this.calendar=r,this.era=n,this.year=i,this.month=a,this.day=s,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 cd(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new cd(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return io(this,t)}subtract(t){return sp(this,t)}set(t){return ku(ao(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 op(this,t,r,n)}}toDate(t,r){return rp(this,t,r)}toString(){return xu(this)}compare(t){let r=Gh(this,t);return r===0?nE(this,Pn(t)):r}},Mn=class dd{#e;constructor(...t){let[r,n,i,a,s]=Tu(t),o=t.shift(),l=t.shift();this.calendar=r,this.era=n,this.year=i,this.month=a,this.day=s,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 dd(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new dd(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return lp(this,t)}subtract(t){return gE(this,t)}set(t,r){return bE(this,t,r)}cycle(t,r,n){return yE(this,t,r,n)}toDate(){return fE(this)}toString(){return xE(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-dE(t,this.timeZone).toDate().getTime()}},Au=new Map,pr=class{constructor(e,t={}){this.formatter=pp(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 CE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=OE(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}},TE={true:{ja:"h11"},false:{}};function pp(e,t={}){if(typeof t.hour12=="boolean"&&AE()){t={...t};let i=TE[String(t.hour12)][e.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=i??a,delete t.hour12}let r=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[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 AE(){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 CE(){return Ou==null&&(Ou=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Ou}function OE(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=pp(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),i=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(a=>a.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 DE={dayMonth:{month:"numeric",day:"numeric"},short:{year:"numeric",month:"numeric",day:"numeric"}};function mp(e,t){const r=dp(e,"Europe/Berlin");return new pr(t,{timeZone:r.timeZone,hour:"numeric",minute:"numeric"}).format(r.toDate())}function IE(e,t,r){const n=dp(e instanceof Date?e.toISOString():e,"Europe/Berlin");return new pr(r,{timeZone:n.timeZone,...DE[t]}).format(n.toDate())}function lo(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 qa(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 Ua(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 Ba(e,t=""){return Bf(Object.values(e).map(r=>Ua(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 Bf(Object.values(e).filter(n=>r(n)||Object.keys(n.total_capacities??{}).length===0).map(n=>Ua(n,{selectedTime:r(n)??t})),n=>n.shop_order)}function Va(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 vp=e=>fr(Object.values(e.mantle?.composition??{}));function PE(e){const t=e.quantity??0;return Vr(e.product)?t*vp(e):t}function Iu(e,t,r,n){e.clearPrecart();let i=0;for(const a of[...r.items,...t.items]){if(!lo(a.product))continue;const s=PE(a);a===n&&(i=s),e.addPrecartItemQuantity(a.product.id,s)}return i}var ME=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!lo(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,a=e.quotaManager,s=Iu(a,t,n,r),o=a.ticketCapacity(i.id,i.selectedTime,s),l=a.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}},$E=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,a=e.quotaManager,s=Iu(a,t,n,r),o=a.ticketCapacity(i.id,i.selectedTime,s),l=a.totalCapacity(i.id,i.selectedTime),c=vp(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}},FE=e=>Object.fromEntries(qa(e).map(t=>[t.id,t.max_persons]));function NE(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,a=r.quantity??0;let s=1/0;return a>0&&(Iu(e.quotaManager,t,n,r),s=Math.floor(e.quotaManager.ticketCapacity(i.id,i.selectedTime,0)/a)),Object.fromEntries(qa(i).map(o=>[o.id,Math.min(o.max_persons,(r.mantle?.composition?.[o.id]??0)+s)]))}function ja(e){return e?.type==="Event"}function RE(e){return ja(e)&&e.subtype==="scale"}function LE(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 LE(e,t,r)}var zE=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!ja(r.product))throw new Error("(getMaxQuantitySeats) impossible");const i=r.product.dateId,a=e.allSeats[i];if(!a)return console.error("(getMaxQuantity) no seats found for dateId",i),{max:0,min:0,unavailable:!0,bookedOut:!1};const s=Math.min(a.max||100,a.max_per_registration||100,a.available??100),o={max_per_registration:s,available:100,overbook:!1,...a};let l=s;o.overbook&&(l=Math.min(o.max||100,o.max_per_registration||100));const c=n.totalQuantity,f=fr(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}},qE=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 UE(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=fr(r.ticket_ids.map(a=>this.getPrecartItemQuantity(a)));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(a=>a.tickets.includes(r))),t&&(i=i.filter(a=>a.timeSlot===t)),n&&(i=i.filter(a=>a.timeSlot.startsWith(n))),i.flatMap(a=>a.tickets.map(s=>({timeslot:t,ticket:s,quota:a.quota,capacity:a.capacity,totalCapacity:a.totalCapacity})))},ticketCapacity(t,r,n=this.getPrecartItemQuantity(t)){const i=eu(this.filterBy({timeslot:r,ticketId:t}).map(a=>a.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(a=>a.timeSlot.startsWith(t.toString()));r&&(n=n.filter(a=>a.tickets.some(s=>r.includes(s))));const i=mw(n,a=>a.timeSlot);return Object.values(i).map(a=>vw(gw(a.flatMap(s=>s.tickets)).map(s=>eu(a.filter(o=>o.tickets.includes(s)),o=>o.capacity)).filter(s=>s!==null),s=>s.capacity)??a[0]).sort((a,s)=>a.timeSlot.localeCompare(s.timeSlot))}}}function BE(e){let t=0;wa(()=>{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 et(e){let t;try{t=new Intl.NumberFormat(k.locale??"de",{style:"currency",currency:k.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 gp(e){return e?.type==="Tour"}function yp(e,t){return{...e,type:"Tour",description:"",price_cents:e.totalPriceCents,tax_included:!0,vat_pct:0,instanceKey:t?.instanceKey??crypto.randomUUID(),wire:VE(e)}}function VE(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 jE(e){const{type:t,description:r,price_cents:n,tax_included:i,vat_pct:a,instanceKey:s,wire:o,...l}=e;return yp({...l,totalPriceCents:n},{instanceKey:s})}var ZE=0;function nt(e,t){const r={quantity:0,time:"",...t??{}};return Vr(e)&&(r.mantle={composition:r.mantle?.composition??Object.fromEntries(qa(e).map(n=>[n.id,n.max_persons])),key:r.mantle?.key??`mantle-${ZE++}`}),{...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}`),RE(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),gp(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 et(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 et(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return et(this.total_price_cents)}}}var AN=15*6e4;function uo(){return typeof window<"u"&&typeof localStorage<"u"}function WE(e,t){if(uo())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Mu(e){if(!uo())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 bp(e){if(uo())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}function _p(e){return{...e,description:"",tax_included:!0,type:"Coupon"}}var wp="go-cart",co=(e,t,r)=>localStorage.setItem(wp,JSON.stringify({items:e,coupons:t,donations:r,savedAt:Date.now()}));function HE(e){const t=e.product.type;switch(t){case"Ticket":return $u(e)?nt(Ua(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)?nt(Pu(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;case"Tour":return $u(e)?nt(jE(e.product),{time:e.time,quantity:e.quantity}):void 0;case"Coupon":return nt(_p(e.product),{quantity:e.quantity});default:throw new Error(`Unhandled case: ${t}`)}}function GE(e){let t=[],r=[],n=[],i;try{const a=localStorage.getItem(wp);if(!a)return[];const s=JSON.parse(a);if(Array.isArray(s))t=s,r=[],n=[];else if(typeof s=="object"&&s!==null)t=s.items||[],r=s.coupons||[],n=s.donations||[],i=s.savedAt;else throw console.dir({parsed:s,content:a}),new Error("go-cart has invalid format");return typeof i=="number"&&Date.now()-i>9e5?(e.clearItems(),e.clearCoupons(),e.clearDonations(),co([],[],[]),[]):(t.length===0?e.clearItems():e.items=t.map(HE).filter(QE),e.clearCoupons(),r.forEach(o=>e.addCoupon(typeof o=="string"?{code:o,kind:"actionToken"}:o)),e.clearDonations(),n.forEach(o=>{typeof o?.value=="number"&&typeof o?.campaign_id=="number"&&e.addDonation({value:o.value,campaign_id:o.campaign_id})}),e.items)}catch(a){return console.error(a),co([],[],[]),[]}}function KE(e){GE(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[],donations:e.donations||[]});co(e.items||[],e.coupons||[],e.donations||[]),wa(()=>{ve(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[],donations:e.donations||[]});r!==t&&(t=r,co(e.items||[],e.coupons||[],e.donations||[]))})})}var YE=e=>new Date<new Date(e),JE=e=>oo(e.slice(0,10)).compare(Pi(er()))>=0,$u=e=>e.time?e.product.subtype==="day"?JE(e.time):YE(e.time):!0,QE=e=>e!==void 0,XE=0;function ei(e,t=20){const r=Pe([]),n=Pe([]),i=Pe([]);let a=se(void 0);const s={items:r,coupons:n,donations:i,get paymentModeId(){return d(a)},set paymentModeId(o){F(a,o,!0)},uid:`cart-${XE++}`,get nonEmptyItems(){return this.items.filter(o=>o.quantity>0)},get totalPriceCents(){return Math.max(0,fr(this.items,o=>o.total_price_cents)+this.donationCents)},get donationCents(){return fr(this.donations,o=>o.value)},get totalQuantity(){return fr(this.items,o=>o.quantity)},get valueVoucherCents(){return fr(this.coupons.filter(o=>o.kind==="valueVoucher"),o=>o.valueCents??0)},get amountToPayCents(){const o=fr(this.items,l=>l.total_price_cents);return Math.max(0,o-this.valueVoucherCents)+this.donationCents},toString(){return this.uid+" > ["+this.items.map(o=>o.uuid+":"+o.quantity).join(", ")+"]"},orderData(){return{items:this.items.map(o=>({type:o.type,attributes:o.orderAttributes()})),shipping_address_id:null,comment:null,reference:null,payment_mode_id:this.paymentModeId??k.settings?.defaultPaymentModeId,coupons:this.coupons.map(o=>o.code),donations:this.donations.map(o=>({value:o.value,campaign_id:o.campaign_id})),affiliate:{},total:this.amountToPayCents}},get totalFormatted(){return et(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(o){for(let l=this.items.length-1;l>=0;l--)this.items[l].uuid===o.uuid&&this.items.splice(l,1);o?.voucher?.code&&!this.items.some(l=>l.voucher?.code===o.voucher.code)&&this.removeCoupon(o.voucher.code)},addItem(o){const l=this.items.find(c=>c.uuid===o.uuid);l?l.quantity+=o.quantity:this.items.push(o)},addItems(o){o.forEach(l=>this.addItem(l))},addCoupon(o){const l={...o,code:o.code.toUpperCase()};this.coupons.some(c=>c.code===l.code)||this.coupons.push(l)},removeCoupon(o){const l=o.toUpperCase(),c=this.coupons.findIndex(f=>f.code===l);if(c>-1){const[f]=this.coupons.splice(c,1);if(f.kind==="serviceVoucher")for(let u=this.items.length-1;u>=0;u--)this.items[u].voucher?.code===l&&this.items.splice(u,1)}},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()},hasDonation(o,l){return this.donations.some(c=>c.campaign_id===o&&c.value===l)},addDonation(o){this.hasDonation(o.campaign_id,o.value)||this.donations.push(o)},removeDonation(o,l){const c=this.donations.findIndex(f=>f.campaign_id===o&&f.value===l);c>-1&&this.donations.splice(c,1)},clearDonations(){for(;this.donations.length>0;)this.donations.pop()}};return e&&e.forEach(o=>s.addItem(nt(o))),s}function ex(){const e=Pe(ei());return KE(e),BE(e),e}var $i="go-capacity";function kp(e,t){const r=Mu($i);WE($i,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function Sp(e){const t=Mu($i);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){bp($i);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 tx(e){uo()&&window.addEventListener("storage",t=>{if(t.key===$i&&Sp(e),t.key==="go-cart"){const r=Mu("go-cart");(!r||!r.items||r.items.length===0)&&bp($i)}})}function Ep(){const e={allSeats:{},allQuotas:{},quotaManager:UE({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&kp(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&kp(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 a=t.product.subtype;switch(a){case"flat":case"scale":return"seats";default:throw new Error(`(getMaxAvailability) Unhandled case: ${a}`)}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),a={quotas:ME,mantle:$E,seats:zE,unlimited:qE}[i];if(!a)throw new Error(`(maxQuantity) impossible: ${i}`);return Re(()=>a(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"?NE(this,t,r,n):FE(r.product))}};return Sp(e),tx(e),e}function xp(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 Tp=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},rx=class extends Tp{constructor(){super()}get isLoggedIn(){try{const e=xp("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=xp("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}}},nx=class extends Tp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},ix=e=>{switch(e){case"angular":return new rx;case"jmb":return new nx;default:throw new Error("Unhandled shop type: "+e)}};function ax(e){return e==null||typeof e=="string"&&e.trim()===""}function sx(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||ax(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function ox(e,t){return sx(e,t)}var lx={withStackTrace:!1},Ap=(e,t,r=lx)=>({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(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?a(f.value):i(f.value).then(o,l)}c((n=n.apply(e,t||[])).next())})}function Cp(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 Op(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(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){a.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(a[0][3],v)}}function c(h){h.value instanceof jr?Promise.resolve(h.value.v).then(f,u):p(a[0][2],h)}function f(h){l("next",h)}function u(h){l("throw",h)}function p(h,g){h(g),a.shift(),a.length&&l(a[0][0],a[0][1])}}function ux(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,a){t[i]=e[i]?function(s){return(r=!r)?{value:jr(e[i](s)),done:!1}:a?a(s):s}:a}}function cx(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 Cp=="function"?Cp(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(s){return new Promise(function(o,l){s=e[a](s),i(o,l,s.done,s.value)})}}function i(a,s,o,l){Promise.resolve(l).then(function(c){a({value:c,done:o})},s)}}var ri=class _r{constructor(t){this._promise=t}static fromSafePromise(t){return new _r(t.then(r=>new Wr(r)))}static fromPromise(t,r){return new _r(t.then(n=>new Wr(n)).catch(n=>new Er(r(n))))}static fromThrowable(t,r){return(...n)=>new _r(ti(this,void 0,void 0,function*(){try{return new Wr(yield t(...n))}catch(i){return new Er(r?r(i):i)}}))}static combine(t){return dx(t)}static combineWithAllErrors(t){return fx(t)}map(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?new Er(r.error):new Wr(yield t(r.value))})))}andThrough(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Er(r.error);const n=yield t(r.value);return n.isErr()?new Er(n.error):new Wr(r.value)})))}andTee(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Er(r.error);try{yield t(r.value)}catch{}return new Wr(r.value)})))}orTee(t){return new _r(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 Er(r.error)})))}mapErr(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isOk()?new Wr(r.value):new Er(yield t(r.error))})))}andThen(t){return new _r(this._promise.then(r=>{if(r.isErr())return new Er(r.error);const n=t(r.value);return n instanceof _r?n._promise:n}))}orElse(t){return new _r(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 Op(this,arguments,function*(){return yield jr(yield jr(yield*ux(cx(yield jr(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return Op(this,arguments,function*(){const r=yield jr(this._promise);return r.isErr()&&(yield yield jr(fo(r.error))),yield jr(r.value)})}};function fo(e){return new ri(Promise.resolve(new Er(e)))}var CN=ri.fromPromise,ON=ri.fromSafePromise,DN=ri.fromThrowable,Dp=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},dx=e=>ri.fromSafePromise(Promise.all(e)).andThen(Dp),Ip=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},fx=e=>ri.fromSafePromise(Promise.all(e)).andThen(Ip),Fu;(function(e){function t(i,a){return(...s)=>{try{return $n(i(...s))}catch(o){return Zr(a?a(o):o)}}}e.fromThrowable=t;function r(i){return Dp(i)}e.combine=r;function n(i){return Ip(i)}e.combineWithAllErrors=n})(Fu||(Fu={}));function $n(e){return new Wr(e)}function Zr(e){return new Er(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 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 Ap("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},Er=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 fo(this.error)}asyncAndThrough(e){return fo(this.error)}asyncMap(e){return fo(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 Ap("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},IN=Fu.fromThrowable,hx=/\{[^{}]+\}/g,px=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function mx(){return Math.random().toString(36).slice(2,11)}function vx(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:a,pathSerializer:s,headers:o,requestInitExt:l=void 0,...c}={...e};l=px()?l:void 0,t=Np(t);const f=[];async function u(p,h){const{baseUrl:g,fetch:v=n,Request:m=r,headers:y,params:E={},parseAs:S="json",querySerializer:T,bodySerializer:A=a??yx,pathSerializer:I,body:M,middleware:N=[],...j}=h||{};let R=t;g&&(R=Np(g)??t);let X=typeof i=="function"?i:$p(i);T&&(X=typeof T=="function"?T:$p({...typeof i=="object"?i:{},...T}));const U=I||s||gx,le=M===void 0?void 0:A(M,Fp(o,y,E.header)),he=Fp(le===void 0||le instanceof FormData?{}:{"Content-Type":"application/json"},o,y,E.header),H=[...f,...N],oe={redirect:"follow",...c,...j,body:le,headers:he};let W,fe,ce=new m(bx(p,{baseUrl:R,params:E,querySerializer:X,pathSerializer:U}),oe),de;for(const $ in j)$ in ce||(ce[$]=j[$]);if(H.length){W=mx(),fe=Object.freeze({baseUrl:R,fetch:v,parseAs:S,querySerializer:X,bodySerializer:A,pathSerializer:U});for(const $ of H)if($&&typeof $=="object"&&typeof $.onRequest=="function"){const ae=await $.onRequest({request:ce,schemaPath:p,params:E,options:fe,id:W});if(ae)if(ae instanceof m)ce=ae;else if(ae instanceof Response){de=ae;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($){let ae=$;if(H.length)for(let L=H.length-1;L>=0;L--){const be=H[L];if(be&&typeof be=="object"&&typeof be.onError=="function"){const G=await be.onError({request:ce,error:ae,schemaPath:p,params:E,options:fe,id:W});if(G){if(G instanceof Response){ae=void 0,de=G;break}if(G instanceof Error){ae=G;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(ae)throw ae}if(H.length)for(let $=H.length-1;$>=0;$--){const ae=H[$];if(ae&&typeof ae=="object"&&typeof ae.onResponse=="function"){const L=await ae.onResponse({request:ce,response:de,schemaPath:p,params:E,options:fe,id:W});if(L){if(!(L instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");de=L}}}}const J=de.headers.get("Content-Length");if(de.status===204||ce.method==="HEAD"||J==="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(S==="stream")return de.body;if(S==="json"&&!J){const ae=await de.text();return ae?JSON.parse(ae):void 0}return await de[S]()})(),response:de};let ee=await de.text();try{ee=JSON.parse(ee)}catch{}return{error:ee,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 ho(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 Pp(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 s=n.join(",");switch(r.style){case"form":return`${e}=${s}`;case"label":return`.${s}`;case"matrix":return`;${e}=${s}`;default:return s}}for(const s in t){const o=r.style==="deepObject"?`${e}[${s}]`:s;n.push(ho(o,t[s],r))}const a=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${a}`:a}function Mp(e,t,r){if(!Array.isArray(t))return"";if(r.explode===!1){const a={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",s=(r.allowReserved===!0?t:t.map(o=>encodeURIComponent(o))).join(a);switch(r.style){case"simple":return s;case"label":return`.${s}`;case"matrix":return`;${e}=${s}`;default:return`${e}=${s}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const a of t)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?a:encodeURIComponent(a)):i.push(ho(e,a,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function $p(e){return function(r){const n=[];if(r&&typeof r=="object")for(const i in r){const a=r[i];if(a!=null){if(Array.isArray(a)){if(a.length===0)continue;n.push(Mp(i,a,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof a=="object"){n.push(Pp(i,a,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(ho(i,a,e))}}return n.join("&")}}function gx(e,t){let r=e;for(const n of e.match(hx)??[]){let i=n.substring(1,n.length-1),a=!1,s="simple";if(i.endsWith("*")&&(a=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(s="label",i=i.substring(1)):i.startsWith(";")&&(s="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,Mp(i,o,{style:s,explode:a}));continue}if(typeof o=="object"){r=r.replace(n,Pp(i,o,{style:s,explode:a}));continue}if(s==="matrix"){r=r.replace(n,`;${ho(i,o)}`);continue}r=r.replace(n,s==="label"?`.${encodeURIComponent(o)}`:encodeURIComponent(o))}return r}function yx(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 bx(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 Fp(...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,a]of n)if(a===null)t.delete(i);else if(Array.isArray(a))for(const s of a)t.append(i,s);else a!==void 0&&t.set(i,a)}return t}function Np(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function _x(e,t){return vx({baseUrl:e,headers:{"X-Shop-Url":t}})}var wx="/api/v4/calendar",kx="/api/v4/tickets/calendar",Sx="/api/v4/auth/validate_token",Ex="/api/v4/tickets/list_and_quotas",xx="/api/v4/tickets",Tx="/api/v4/auth/sign_in",Ax="/api/v4/auth",Cx="/api/v4/orders/withdrawals",Ox="/api/v4/customer/memberships/activate",Dx="/api/v4/orders",Ix="/api/v4/customer/customer_addresses",Px="/api/v4/customer/memberships",Rp={SHOP_GUEST:10,SHOP:20},po={error:{success:!1,errors:["Not signed in"]}},Lp=iw,Mx=class{type;#e=se(Pe({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=sw(this.type),d(this.#e).currentUser=ix(this.type),d(this.#e).apiUrl=e,d(this.#e).shopDomain=t,d(this.#e).locale=r||"de",tw(d(this.#e).locale),this.#t={},d(this.#e).client=_x(e,t),d(this.#e).capacityManager=Ep(),d(this.#e).cart=ex(),d(this.#e).auth=new jf,d(this.#e).client.use(new bw(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return d(this.#e).capacityManager||(d(this.#e).capacityManager=Ep()),d(this.#e).capacityManager}get cart(){return d(this.#e).cart}get auth(){return d(this.#e).auth||(d(this.#e).auth=new jf),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{...Lp[(this.locale??"en").toLowerCase().split(/[-_]/)[0]]??Lp.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 mp(e,this.locale)}formatDate(e,t){return IE(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(Sx,"getCustomer","",{cache:5}):po}getOrders(e={}){return this.auth.data.accessToken?this.fetchAndCache(Dx,`orders-${JSON.stringify(e)}`,"",{cache:5,query:e}):po}getCustomerAddresses(){return this.auth.data.accessToken?this.fetchAndCache(Ix,"customerAddresses","",{cache:5}):po}getCustomerMemberships(){return this.auth.data.accessToken?this.fetchAndCache(Px,"customerMemberships","",{cache:5}):po}ticketsCalendar(e){return this.fetchAndCache(kx,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(wx,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(Ex,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:jt({per_page:100},e??{})})}tickets(e){return this.fetchAndCache(xx,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:jt({per_page:100},e??{})})}ticketsContent(e){return this.fetchAndCache("/api/v4/tickets/content",`ticketsContent-${JSON.stringify(e)}`,"data",{cache:300,query:jt({"ticket_ids[]":e},{per_page:100})})}signIn(e){return this.apiPost(Tx,{body:e,requiredFields:["email","password"]})}signUp(e,t=!1){e=jt({addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:t?Rp.SHOP_GUEST:Rp.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(Ax,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(Cx,{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:jt({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(Ox,{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}}})}#n(e,t,r={}){return e+JSON.stringify(t)+JSON.stringify(r)}fetchAndCache(e,t,r,n){if(n??={},n.query??={},n.cache??=1e3,n.path??={},!this.#a())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),d(this.#e)[t];const i=n.query,a=this.#n(e,i,n.path),s=!this.#t[a],o=this.#t[a]?.fetchedAt<Date.now()-n.cache*1e3;return(s||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#i(){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:jt(this.#i,{params:n}).params,bodySerializer:i=>i})}async apiCall(e,t){this.#s();const{body:r,params:n={},requiredFields:i,parseAs:a}=t,s=ox(r,i);if(Object.keys(s).length>0)return{error:{errors:s}};const o=this.client[t.method];return await o(e,{body:r,params:jt(this.#i,{params:n}).params,parseAs:a})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(t=>t.status==="fetching").length;)await uw(10)}async apiGet(e,t={},r){this.#s();const n=this.#n(e,t,r);this.#t[n]={status:"fetching",fetchedAt:Date.now()};let i=this.#i;t&&(i=jt(i,{params:{query:t}})),e&&(i=jt(i,{params:{path:r}}));const a=await this.client.GET(e,i);return this.#t[n]={status:"completed",fetchedAt:Date.now()},a.data||a}#a=()=>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.#a())throw new Error("Fetch is not possible.")}},k=new Mx;function Fi(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 $x=class _y{host;KEY;pollDuration;#e=se(Pe({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 _y(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 Ni(e){return function(t,r={pollDuration:1e3}){if(t){const n=new $x(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 Fx={urls:{},navigateTo:e=>{window.location.assign(e)},forms:{},fields:{},quantityStepper:!0},Nx=class{defaultConfig=jt(Fx,window.customOptions);override=this.defaultConfig;#e=se(Pe(this.defaultConfig));get options(){return d(this.#e)}set options(e){F(this.#e,e,!0)}constructor(){this.update()}update(){const e=jt(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=jt(this.override,e),this.update(),this}default(e){return this.defaultConfig=jt(this.defaultConfig,e),this.update(),this}},Ke=new Nx,zp=class{#e=se();get token(){return d(this.#e)}set token(e){F(this.#e,e,!0)}#t=se();get ticketSaleId(){return d(this.#t)}set ticketSaleId(e){F(this.#t,e,!0)}get order(){if(this.token)return pl(k.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return pl(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return Ke.config.urls.annualTicketPersonalizationForm?Ke.config.urls.annualTicketPersonalizationForm(this.token,e.id):k.urls.annualTicketPersonalizationForm(this.token,e.id)}},qp="go-annual-ticket-personalization",Up=Fi(qp),Rx=Ni(qp),Lx=q("<li><a> </a></li>"),zx=q('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function qx(e,t){te(t,!0);let r=_(t,"token",7);const n=new zp;Up(t.$$host,n),ve(()=>{n.token=r()});let i=P(()=>n.order);var a={details:n,get token(){return r()},set token(c){r(c),b()}},s=ie(),o=B(s),l=c=>{var f=ie(),u=B(f);Me(u,17,()=>d(i).ticket_sales,p=>p.id,(p,h)=>{var g=zx(),v=D(g),m=D(v,!0);C(v);var y=V(v,2),E=D(y,!0);C(y);var S=V(y,2),T=A=>{var I=Lx(),M=D(I),N=D(M,!0);C(M),C(I),Y((j,R)=>{pe(M,"href",j),Z(N,R)},[()=>n.goToPersonalization(d(h)),()=>k.t("ticket.annual.personalization.list.personalize.add")]),x(A,I)};ue(S,A=>{d(h).status=="not_ready_to_send"&&A(T)}),C(g),Y(A=>{pe(g,"data-ticket-sale-id",d(h).id),Z(m,d(h).title),Z(E,A)},[()=>k.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,s),re(a)}customElements.define("go-annual-ticket-personalization",ne(qx,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));var Ux={salutation:{key:"salutation",apiKey:"customer_salutation_id",type:"select",label:"user.registration.form.customer_salutation_id",placeholder:"",description:"",autocomplete:"honorific-prefix",options:()=>k.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:Xt().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:Xt().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:Xt().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:()=>k.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:()=>(k.locales??[]).map(e=>({label:k.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:Xt().date()},dateOfBirth:{key:"dateOfBirth",apiKey:"date_of_birth",type:"date",label:"user.registration.form.dateOfBirth",placeholder:"",description:"",autocomplete:"bday",validator:Xt().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:G1(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:()=>(k.payment_modes?Object.values(k.payment_modes):[]).map(e=>({value:String(e.id),label:e.name}))}};function Bx(e,t){return{...e,errors:e.errors||[],value:e.value??Vx(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){jx(this)}}}function Vx(e){return e==="checkbox"?!1:e==="file"?null:""}function jx(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 nl{static#e={};static defineForm(t){Ke.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){Ke.default({fields:t})}static{nl.defineFields(Ux)}static setRequiredApiKeys(t,r){nl.#e[t]=r}static getFormOptions(t){return Ke.config.forms[t]}static createField(t,r){const n=nl.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return Bx(n,r)}static getFormFields(t){return Zx(t)}static getFieldInit(t){return Ke.config.fields[t]}};function Zx(e){const t=Ke.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 Wx(e,t){te(t,!0);let r=_(t,"token",7),n=_(t,"ticketSaleId",7),i=null;const a=new zp;Up(t.$$host,a),ve(()=>{a.token=r(),a.ticketSaleId=n()}),Pt.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function s(){if(!i)return;const v=a.ticketSale.personalizations.length,m=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),y=Vf(v,(I,M)=>{const N=m[M-1].details;return I.push(N),I},[]);if(y.forEach(I=>{I.fields.forEach(M=>{I.validateField(M)})}),!Vf(v,(I,M)=>y[M-1].isValid,!1))return;if(a.ticketSale?.photo_mandatory==="mandatory"){const I=y.map(async(N,j)=>{const R=a.ticketSale.personalizations[j].id,X=N.fields.find(le=>le.key==="photo")?.value;if(!(X instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const U=await k.uploadPersonalizationPhoto(r(),R,X);return U.error?{ok:!1,error:U.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),M=(await Promise.all(I)).find(N=>!N.ok);if(M){i.details.apiErrors=[M.error];return}}const E={personalization:{ticket_sale_id:a.ticketSaleId,start_at:i.details.formData.start_at,personalizations:y.map((I,M)=>{const N=yw(I.formData,["email_confirmation"]);return{id:a.ticketSale?.personalizations[M].id,customer:N}})}},S=await k.finalizePersonalizations(r(),E);if(S.error){i.details.apiErrors=S.error.error?[S.error.error]:[];return}const T=Ke.config.forms.personalization?.beforeSubmit;T&&T(E);const A=Ke.config.urls.annualTicketPersonalizationFormSubmit?.(r());A&&Ke.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),E=Array.from(m.querySelectorAll("go-personalization-form"));for(;E.length<y;){const T=l.cloneNode(!0);u(T),m.insertBefore(T,c),E.push(T)}for(;E.length>y;){const T=E.pop();T&&T!==o&&T.remove()}const S=a.ticketSale?.personalizations??[];E.forEach((T,A)=>{const I=S[A];I&&(T.dataset.personalizationId=String(I.id))}),f=y}En(()=>{p(),t.$$host.addEventListener("go-submit",s),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),ve(()=>{if(!a.ticketSale)return;const v=a.ticketSale?.personalizations.length??1;v!==f&&h(v)});var g={details:a,get token(){return r()},set token(v){r(v),b()},get ticketSaleId(){return n()},set ticketSaleId(v){n(v),b()}};return re(g)}customElements.define("go-annual-ticket-personalization-form",ne(Wx,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var Hx=class{formId;form;#e=se(Pe([]));#t=P(()=>Nu(this.fields)==0);get isValid(){return d(this.#t)}set isValid(e){F(this.#t,e)}#r=se();get successMessage(){return d(this.#r)}set successMessage(e){F(this.#r,e,!0)}get formData(){function e(r){return hw(r)||cw(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(F(this.#e,[],!0),this.fields.forEach(t=>t.apiErrors=[]),Xl(e)){F(this.#e,e,!0);return}if(e.errors&&Xl(e.errors)&&F(this.#e,e.errors,!0),fw(e.error)){F(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(a=>a.apiKey===r);if(!i){console.warn(`(FormDetails.fill) Field with API key ${r} not found.`);return}if(i.type==="select"&&!i.options?.().find(a=>a.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}},Bp="go-form-details",Gx=Fi(Bp),Ri=Ni(Bp);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(([s,o])=>{typeof o=="boolean"?o&&i.setAttribute(s,""):i.setAttribute(s,o)});const a=document.createDocumentFragment();for(;e.firstChild;)a.appendChild(e.firstChild);return i.appendChild(a),e.replaceChildren(i),i}var Kx=q("<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 Yx(e,t){te(t,!0);let r=_(t,"formId",7),n=_(t,"custom",7);const i=new Hx(r(),t.$$host);Gx(t.$$host,i);async function a(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",a),i.form=f});var s={details:i,get formId(){return r()},set formId(f){r(f),b()},get custom(){return n()},set custom(f){n(f),b()}},o=ie(),l=B(o),c=f=>{var u=Kx(),p=B(u),h=V(p,2),g=V(h,2),v=D(g,!0);C(g),Y(m=>Z(v,m),[()=>k.t(Pt.getFormOptions(r())?.submitLabel||"Submit")]),x(f,u)};return ue(l,f=>{n()||f(c)}),x(e,o),re(s)}customElements.define("go-form",ne(Yx,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var Jx=q("<go-form></go-form>",2);function Qx(e,t){te(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 k.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 a={get custom(){return r()},set custom(o=!1){r(o),b()},get redirectUrl(){return n()},set redirectUrl(o=""){n(o),b()}},s=Jx();return Tn(s,"formId","passwordReset"),Y(()=>Tn(s,"custom",r())),Ta("submit",s,i),x(e,s),re(a)}customElements.define("go-password-reset",ne(Qx,{redirectUrl:{attribute:"redirect-url",type:"String"},custom:{}},[],[]));var Xx=q("<go-form></go-form>",2);function eT(e,t){te(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 a(l){const c=l.target.details,f=await k.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 s={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=Xx();return Tn(o,"formId","setPassword"),Ta("submit",o,a),x(e,o),re(s)}customElements.define("go-set-password",ne(eT,{accessToken:{attribute:"access-token",type:"String"},client:{attribute:"client",type:"String"},uid:{attribute:"uid",type:"String"}},[],[]));function tT(e,t){te(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 a=i.target.details,s=await k.signIn(a.formData);s.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=s.error.errors}return Hr(t.$$host,"go-form",{"form-id":"signIn",custom:r()}),t.$$host.addEventListener("submit",n),re({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-sign-in",ne(tT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function rT(e,t){te(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 a=i.target.details,s=await k.signUp(a.formData,!1);s.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=s.error.errors}return Hr(t.$$host,"go-form",{"form-id":"signUp",custom:r()}),t.$$host.addEventListener("submit",n),re({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-sign-up",ne(rT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function nT(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 iT(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function aT(e){return nT(iT(e),0)}function sT(e,t){const r=ei(),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)})),e.donations.forEach(i=>r.addDonation(i)),t.forEach(i=>{const a=i.attributes,s=a.uuid,o=e.items.find(l=>l.uuid===s);if(!o){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:a});return}r.addItem(oT(o,a))}),r}function oT(e,t){const r=gp(e.product)?1:aT(t),n=e.price_cents,i=e.product.price_cents===0?0:t.price_cents??n,a=i<n,s={...e.product,price_cents:i};return"dynamic_prices"in s&&(s.dynamic_prices=null),nt(s,{quantity:r,time:e.time,voucher:e.voucher,mantle:e.mantle,display:{discounted:a,reference_uuid:e.uuid,originalPrice:n}})}var lT=class{#e=se();get displayCart(){return d(this.#e)}set displayCart(e){F(this.#e,e,!0)}#t=se(!1);get preview(){return d(this.#t)}set preview(e){F(this.#t,e,!0)}get totalPriceCents(){return this.displayCart?.amountToPayCents??0}get subtotalPriceCents(){return k.cart?.totalPriceCents??0}get discountedAmountCents(){return Math.max(0,this.subtotalPriceCents-this.totalPriceCents)}get isDiscounted(){return this.discountedAmountCents>0}async calculateDisplayCart(){const e=k.cart;if(e)try{const{items:t,coupons:r}=e.orderData(),n=await k.createCart({items:t,coupons:r});if(n?.data){this.displayCart=sT(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}}},Vp="go-cart-details",uT=Fi(Vp),Li=Ni(Vp),cT=q('<span class="go-cart-item-title" data-testid="cart-item-title"> </span>');function jp(e,t){te(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(s){r(s),b()}},i=cT(),a=D(i,!0);return C(i),Y(()=>Z(a,r().product.title)),x(e,i),re(n)}ne(jp,{cartItem:{}},[],[],{mode:"open"});var dT=q('<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),fT=q('<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 Zp(e,t){te(t,!0);let r=_(t,"cartItem",7);if(!ja(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()}},a=fT(),s=B(a),o=D(s),l=D(o,!0);C(o);var c=V(o),f=D(c,!0);C(c),C(s);var u=V(s),p=h=>{var g=dT(),v=B(g),m=D(v,!0);C(v);var y=V(v),E=D(y,!0);C(y),Y((S,T)=>{Z(m,S),Z(E,T)},[()=>k.formatDate(r().time,"dayMonth"),()=>k.formatTime(r().time)]),x(h,g)};return ue(u,h=>{r().time&&h(p)}),Y(()=>{Z(l,n.event_title),Z(f,n.title)}),x(e,a),re(i)}ne(Zp,{cartItem:{}},[],[],{mode:"open"});var hT=q('<span class="go-cart-item-subtitle" data-testid="cart-item-subtitle"> </span>'),pT=q('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),mT=q('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),vT=q('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!> <!>',1);function Wp(e,t){te(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(p){r(p),b()}},i=vT(),a=B(i),s=D(a,!0);C(a);var o=V(a,2),l=p=>{var h=hT(),g=D(h,!0);C(h),Y(()=>Z(g,r().product.sub_title)),x(p,h)},c=P(()=>lo(r().product)&&r().product.sub_title);ue(o,p=>{d(c)&&p(l)});var f=V(o,2),u=p=>{var h=mT(),g=B(h),v=D(g,!0);C(g);var m=V(g,2),y=E=>{var S=pT(),T=D(S,!0);C(S),Y(A=>Z(T,A),[()=>k.formatTime(r().time)]),x(E,S)};ue(m,E=>{r().product.type==="Ticket"&&r().product.subtype==="timeslot"&&E(y)}),Y(E=>Z(v,E),[()=>k.formatDate(r().time,"dayMonth")]),x(p,h)};return ue(f,p=>{r().time&&p(u)}),Y(()=>Z(s,r().product.title)),x(e,i),re(n)}ne(Wp,{cartItem:{}},[],[],{mode:"open"});var gT=q('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),yT=q('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),bT=q('<span class="go-cart-item-custom" data-testid="cart-item-custom"> </span>'),_T=q('<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 Hp(e,t){te(t,!0);let r=_(t,"cartItem",7);const n=P(()=>r().product),i=P(()=>{if(!r().time)return null;try{return{date:k.formatDate(r().time,"short"),time:k.formatTime(r().time)}}catch{return{date:r().time,time:""}}}),a=m=>m==null?"":typeof m=="object"?JSON.stringify(m):String(m),s=P(()=>Object.entries(d(n).customs??{}).filter(([,m])=>m!=null&&m!==""));var o={get cartItem(){return r()},set cartItem(m){r(m),b()}},l=_T(),c=B(l),f=D(c,!0);C(c);var u=V(c,2),p=D(u,!0);C(u);var h=V(u,2),g=m=>{var y=yT(),E=B(y),S=D(E,!0);C(E);var T=V(E,2),A=I=>{var M=gT(),N=D(M,!0);C(M),Y(()=>Z(N,d(i).time)),x(I,M)};ue(T,I=>{d(i).time&&I(A)}),Y(()=>Z(S,d(i).date)),x(m,y)};ue(h,m=>{d(i)&&m(g)});var v=V(h,2);return Me(v,17,()=>d(s),([m,y])=>m,(m,y)=>{var E=P(()=>nb(d(y),2));let S=()=>d(E)[0],T=()=>d(E)[1];var A=bT(),I=D(A);C(A),Y(M=>Z(I,`${S()??""}: ${M??""}`),[()=>a(T())]),x(m,A)}),Y(m=>{Z(f,d(n).title),Z(p,m)},[()=>k.t("cart.item.participants",{count:d(n).participants})]),x(e,l),re(o)}ne(Hp,{cartItem:{}},[],[],{mode:"open"});function Gp(e,{min:t,max:r}){const n=e<t?Math.max(t,1):e+1;return n>r?e:n}function wT(e,{min:t,floor:r=0}){return e<=t?r:e-1}function kT(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 ST(e,{min:t,max:r,floor:n=0}){return e<0||e>r?!1:e===n||e>=t}function Kp(e,t){return Gp(e,t)>e}function Yp(e,{floor:t=0}){return e>t}var ET=q('<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 Jp(e,t){const r=vt();te(t,!0);let n=_(t,"value",7),i=_(t,"min",7),a=_(t,"max",7),s=_(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=P(()=>f()!=null),v=P(()=>Math.max(i(),1)),m=P(()=>d(g)?{min:d(v),max:a(),floor:d(v)}:{min:i(),max:a(),floor:s()}),y=P(()=>d(g)&&n()<=d(v));let E,S=se(!1);const T=P(()=>!d(y)&&!Yp(n(),d(m))),A=P(()=>!Kp(n(),d(m)));function I(J){J!==n()&&h()(J)}function M(){d(y)?f()():N()}function N(){Yp(n(),d(m))&&I(wT(n(),d(m)))}function j(){Kp(n(),d(m))&&I(Gp(n(),d(m)))}function R(){const J=parseInt(E.value,10);if(d(g)&&(!Number.isFinite(J)||J<=0)){F(S,!1),E.value=String(n()),f()();return}const ee=kT(J,d(m));F(S,!1),E.value=String(ee),I(ee)}function X(){const J=E.value.trim();F(S,!(/^\d+$/.test(J)&&ST(parseInt(J,10),d(m))))}function U(J){switch(J.key){case"ArrowUp":J.preventDefault(),j();break;case"ArrowDown":J.preventDefault(),N();break;case"Home":J.preventDefault(),I(d(m).floor);break;case"End":J.preventDefault(),I(a());break;case"Enter":J.preventDefault(),R();break}}var le={get value(){return n()},set value(J){n(J),b()},get min(){return i()},set min(J){i(J),b()},get max(){return a()},set max(J){a(J),b()},get floor(){return s()},set floor(J=0){s(J),b()},get label(){return o()},set label(J){o(J),b()},get decreaseLabel(){return l()},set decreaseLabel(J){l(J),b()},get increaseLabel(){return c()},set increaseLabel(J){c(J),b()},get onDecrementBelowMin(){return f()},set onDecrementBelowMin(J){f(J),b()},get removeAriaLabel(){return u()},set removeAriaLabel(J){u(J),b()},get removeLabel(){return p()},set removeLabel(J="✕"){p(J),b()},get onChange(){return h()},set onChange(J){h(J),b()}},he=ET(),H=D(he);let oe;var W=D(H),fe=D(W,!0);C(W),C(H);var ce=V(H,2);Ai(ce),Us(ce,J=>E=J,()=>E);var de=V(ce,2);return C(he),Y(()=>{pe(he,"aria-label",o()),oe=Et(H,1,"go-quantity-stepper-button go-quantity-stepper-decrement",null,oe,{"go-quantity-stepper-remove":d(y)}),pe(H,"title",d(y)?u():l()),pe(H,"aria-controls",r),pe(H,"aria-disabled",d(T)),Z(fe,d(y)?p():"−"),pe(ce,"id",r),pe(ce,"aria-label",o()),Bl(ce,n()),pe(ce,"aria-valuenow",n()),pe(ce,"aria-valuemin",d(m).floor),pe(ce,"aria-valuemax",a()),pe(ce,"aria-invalid",d(S)?"true":void 0),pe(de,"title",c()),pe(de,"aria-controls",r),pe(de,"aria-disabled",d(A))}),ut("click",H,M),ut("input",ce,X),ut("change",ce,R),Ta("blur",ce,R),ut("keydown",ce,U),ut("click",de,j),x(e,he),re(le)}Bt(["click","input","change","keydown"]),ne(Jp,{value:{},min:{},max:{},floor:{},label:{},decreaseLabel:{},increaseLabel:{},onDecrementBelowMin:{},removeAriaLabel:{},removeLabel:{},onChange:{}},[],[],{mode:"open"});function xT(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[mo(n)];if(t<e)return e>n?[mo(e)]:[];const i=Math.max(e,n),a=[mo(n)];for(let s=i;s<=t;s++)s!==n&&a.push(mo(s));return a}function mo(e){return{value:e,label:e.toString()}}var TT=q("<option> </option>"),AT=q('<select class="go-quantity-select"></select>');function vo(e,t){te(t,!0);let r=_(t,"value",7),n=_(t,"min",7),i=_(t,"max",7),a=_(t,"label",7),s=_(t,"floor",7,0),o=_(t,"deselectable",7,!0),l=_(t,"onDecrementBelowMin",7),c=_(t,"onChange",7);const f=P(()=>Ke.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 a()},set label(m){a(m),b()},get floor(){return s()},set floor(m=0){s(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=ie(),h=B(p),g=m=>{{let y=P(()=>o()?0:n()),E=P(()=>k.t("quantity.decrease")),S=P(()=>k.t("quantity.increase")),T=P(()=>k.t("quantity.remove")),A=P(()=>k.t("quantity.remove.label"));Jp(m,{get value(){return r()},get min(){return n()},get max(){return i()},get floor(){return d(y)},get label(){return a()},get decreaseLabel(){return d(E)},get increaseLabel(){return d(S)},get onDecrementBelowMin(){return l()},get removeAriaLabel(){return d(T)},get removeLabel(){return d(A)},get onChange(){return c()}})}},v=m=>{var y=AT();Me(y,21,()=>xT(n(),i(),{floor:o()?s():n()}),E=>E.value,(E,S)=>{var T=TT(),A=D(T,!0);C(T);var I={};Y(()=>{Mf(T,r()===d(S).value),Z(A,d(S).label),I!==(I=d(S).value)&&(T.value=(T.__value=d(S).value)??"")}),x(E,T)}),C(y),Y(()=>pe(y,"aria-label",a())),ut("change",y,E=>c()(parseInt(E.target.value,10))),x(m,y)};return ue(h,m=>{d(f)?m(g):m(v,-1)}),x(e,p),re(u)}Bt(["change"]),ne(vo,{value:{},min:{},max:{},label:{},floor:{},deselectable:{},onDecrementBelowMin:{},onChange:{}},[],[],{mode:"open"});function Qp(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 CT(e){if(Array.isArray(e))return e}function OT(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.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&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function DT(){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 IT(e,t){return CT(e)||OT(e,t)||PT(e,t)||DT()}function PT(e,t){if(e){if(typeof e=="string")return Qp(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)?Qp(e,t):void 0}}var Xp=Object.entries,em=Object.setPrototypeOf,MT=Object.isFrozen,$T=Object.getPrototypeOf,FT=Object.getOwnPropertyDescriptor,Mt=Object.freeze,mr=Object.seal,zi=Object.create,tm=typeof Reflect<"u"&&Reflect,Ru=tm.apply,Lu=tm.construct;Mt||(Mt=function(t){return t}),mr||(mr=function(t){return t}),Ru||(Ru=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];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 qi=pt(Array.prototype.forEach),NT=pt(Array.prototype.lastIndexOf),rm=pt(Array.prototype.pop),Ui=pt(Array.prototype.push),RT=pt(Array.prototype.splice),$t=Array.isArray,Za=pt(String.prototype.toLowerCase),zu=pt(String.prototype.toString),nm=pt(String.prototype.match),Bi=pt(String.prototype.replace),im=pt(String.prototype.indexOf),LT=pt(String.prototype.trim),zT=pt(Number.prototype.toString),qT=pt(Boolean.prototype.toString),am=typeof BigInt>"u"?null:pt(BigInt.prototype.toString),sm=typeof Symbol>"u"?null:pt(Symbol.prototype.toString),it=pt(Object.prototype.hasOwnProperty),Wa=pt(Object.prototype.toString),Tt=pt(RegExp.prototype.test),Ha=UT(TypeError);function pt(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 UT(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]:Za;if(em&&em(e,null),!$t(t))return e;let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const a=r(i);a!==i&&(MT(t)||(t[n]=a),i=a)}e[i]=!0}return e}function BT(e){for(let t=0;t<e.length;t++)it(e,t)||(e[t]=null);return e}function Ct(e){const t=zi(null);for(const n of Xp(e)){var r=IT(n,2);const i=r[0],a=r[1];it(e,i)&&($t(a)?t[i]=BT(a):a&&typeof a=="object"&&a.constructor===Object?t[i]=Ct(a):t[i]=a)}return t}function VT(e){switch(typeof e){case"string":return e;case"number":return zT(e);case"boolean":return qT(e);case"bigint":return am?am(e):"0";case"symbol":return sm?sm(e):"Symbol()";case"undefined":return Wa(e);case"function":case"object":{if(e===null)return Wa(e);const t=e,r=Gr(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:Wa(n)}return Wa(e)}default:return Wa(e)}}function Gr(e,t){for(;e!==null;){const n=FT(e,t);if(n){if(n.get)return pt(n.get);if(typeof n.value=="function")return pt(n.value)}e=$T(e)}function r(){return null}return r}function jT(e){try{return Tt(e,""),!0}catch{return!1}}var om=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"]),ZT=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"]),WT=Mt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),lm=Mt(["#text"]),um=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"]),cm=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"]),go=Mt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),HT=mr(/{{[\w\W]*|^[\w\W]*}}/g),GT=mr(/<%[\w\W]*|^[\w\W]*%>/g),KT=mr(/\${[\w\W]*/g),YT=mr(/^data-[\-\w.\u00B7-\uFFFF]+$/),JT=mr(/^aria-[\-\w]+$/),dm=mr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),QT=mr(/^(?:\w+script|data):/i),XT=mr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),eA=mr(/^html$/i),tA=mr(/^[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},rA=function(){return typeof window>"u"?null:window},nA=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 a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},fm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function hm(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rA();const t=ge=>hm(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 a=e.HTMLTemplateElement,s=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"),E=Gr(u,"attributes"),S=s&&s.prototype?Gr(s.prototype,"nodeType"):null,T=s&&s.prototype?Gr(s.prototype,"nodeName"):null;if(typeof a=="function"){const ge=r.createElement("template");ge.content&&ge.content.ownerDocument&&(r=ge.content.ownerDocument)}let A,I="";const M=r,N=M.implementation,j=M.createNodeIterator,R=M.createDocumentFragment,X=M.getElementsByTagName,U=n.importNode;let le=fm();t.isSupported=typeof Xp=="function"&&typeof m=="function"&&N&&N.createHTMLDocument!==void 0;const he=HT,H=GT,oe=KT,W=YT,fe=JT,ce=QT,de=XT,J=tA;let ee=dm,$=null;const ae=Ae({},[...om,...qu,...Uu,...Bu,...lm]);let L=null;const be=Ae({},[...um,...Vu,...cm,...go]);let G=Object.seal(zi(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(zi(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,_t=!0,ot=!1,Nt=!0,wt=!1,Rt=!1,ir=!1,Gt=!1,gr=!1,Pr=!1,Mr=!0,yn=!1;const $r="user-content-";let yr=!0,Xr=!1,en={},At=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 na=null;const ia=Ae({},["audio","video","img","source","image","track"]);let fs=null;const td=Ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mi="http://www.w3.org/1998/Math/MathML",aa="http://www.w3.org/2000/svg",br="http://www.w3.org/1999/xhtml";let Bn=br,rd=!1,nd=null;const MF=Ae({},[mi,aa,br],zu);let id=Ae({},["mi","mo","mn","ms","mtext"]),ad=Ae({},["annotation-xml"]);const $F=Ae({},["title","style","font","a","script"]);let hs=null;const FF=["application/xhtml+xml","text/html"],NF="text/html";let ct=null,sa=null;const RF=r.createElement("form"),ly=function(O){return O instanceof RegExp||O instanceof Function},sd=function(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(sa&&sa===O)return;(!O||typeof O!="object")&&(O={}),O=Ct(O),hs=FF.indexOf(O.PARSER_MEDIA_TYPE)===-1?NF:O.PARSER_MEDIA_TYPE,ct=hs==="application/xhtml+xml"?zu:Za,$=it(O,"ALLOWED_TAGS")&&$t(O.ALLOWED_TAGS)?Ae({},O.ALLOWED_TAGS,ct):ae,L=it(O,"ALLOWED_ATTR")&&$t(O.ALLOWED_ATTR)?Ae({},O.ALLOWED_ATTR,ct):be,nd=it(O,"ALLOWED_NAMESPACES")&&$t(O.ALLOWED_NAMESPACES)?Ae({},O.ALLOWED_NAMESPACES,zu):MF,fs=it(O,"ADD_URI_SAFE_ATTR")&&$t(O.ADD_URI_SAFE_ATTR)?Ae(Ct(td),O.ADD_URI_SAFE_ATTR,ct):td,na=it(O,"ADD_DATA_URI_TAGS")&&$t(O.ADD_DATA_URI_TAGS)?Ae(Ct(ia),O.ADD_DATA_URI_TAGS,ct):ia,At=it(O,"FORBID_CONTENTS")&&$t(O.FORBID_CONTENTS)?Ae({},O.FORBID_CONTENTS,ct):Un,w=it(O,"FORBID_TAGS")&&$t(O.FORBID_TAGS)?Ae({},O.FORBID_TAGS,ct):Ct({}),_e=it(O,"FORBID_ATTR")&&$t(O.FORBID_ATTR)?Ae({},O.FORBID_ATTR,ct):Ct({}),en=it(O,"USE_PROFILES")?O.USE_PROFILES&&typeof O.USE_PROFILES=="object"?Ct(O.USE_PROFILES):O.USE_PROFILES:!1,De=O.ALLOW_ARIA_ATTR!==!1,Le=O.ALLOW_DATA_ATTR!==!1,je=O.ALLOW_UNKNOWN_PROTOCOLS||!1,_t=O.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ot=O.SAFE_FOR_TEMPLATES||!1,Nt=O.SAFE_FOR_XML!==!1,wt=O.WHOLE_DOCUMENT||!1,Gt=O.RETURN_DOM||!1,gr=O.RETURN_DOM_FRAGMENT||!1,Pr=O.RETURN_TRUSTED_TYPE||!1,ir=O.FORCE_BODY||!1,Mr=O.SANITIZE_DOM!==!1,yn=O.SANITIZE_NAMED_PROPS||!1,yr=O.KEEP_CONTENT!==!1,Xr=O.IN_PLACE||!1,ee=jT(O.ALLOWED_URI_REGEXP)?O.ALLOWED_URI_REGEXP:dm,Bn=typeof O.NAMESPACE=="string"?O.NAMESPACE:br,id=it(O,"MATHML_TEXT_INTEGRATION_POINTS")&&O.MATHML_TEXT_INTEGRATION_POINTS&&typeof O.MATHML_TEXT_INTEGRATION_POINTS=="object"?Ct(O.MATHML_TEXT_INTEGRATION_POINTS):Ae({},["mi","mo","mn","ms","mtext"]),ad=it(O,"HTML_INTEGRATION_POINTS")&&O.HTML_INTEGRATION_POINTS&&typeof O.HTML_INTEGRATION_POINTS=="object"?Ct(O.HTML_INTEGRATION_POINTS):Ae({},["annotation-xml"]);const K=it(O,"CUSTOM_ELEMENT_HANDLING")&&O.CUSTOM_ELEMENT_HANDLING&&typeof O.CUSTOM_ELEMENT_HANDLING=="object"?Ct(O.CUSTOM_ELEMENT_HANDLING):zi(null);if(G=zi(null),it(K,"tagNameCheck")&&ly(K.tagNameCheck)&&(G.tagNameCheck=K.tagNameCheck),it(K,"attributeNameCheck")&&ly(K.attributeNameCheck)&&(G.attributeNameCheck=K.attributeNameCheck),it(K,"allowCustomizedBuiltInElements")&&typeof K.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=K.allowCustomizedBuiltInElements),ot&&(Le=!1),gr&&(Gt=!0),en&&($=Ae({},lm),L=zi(null),en.html===!0&&(Ae($,om),Ae(L,um)),en.svg===!0&&(Ae($,qu),Ae(L,Vu),Ae(L,go)),en.svgFilters===!0&&(Ae($,Uu),Ae(L,Vu),Ae(L,go)),en.mathMl===!0&&(Ae($,Bu),Ae(L,cm),Ae(L,go))),we.tagCheck=null,we.attributeCheck=null,it(O,"ADD_TAGS")&&(typeof O.ADD_TAGS=="function"?we.tagCheck=O.ADD_TAGS:$t(O.ADD_TAGS)&&($===ae&&($=Ct($)),Ae($,O.ADD_TAGS,ct))),it(O,"ADD_ATTR")&&(typeof O.ADD_ATTR=="function"?we.attributeCheck=O.ADD_ATTR:$t(O.ADD_ATTR)&&(L===be&&(L=Ct(L)),Ae(L,O.ADD_ATTR,ct))),it(O,"ADD_URI_SAFE_ATTR")&&$t(O.ADD_URI_SAFE_ATTR)&&Ae(fs,O.ADD_URI_SAFE_ATTR,ct),it(O,"FORBID_CONTENTS")&&$t(O.FORBID_CONTENTS)&&(At===Un&&(At=Ct(At)),Ae(At,O.FORBID_CONTENTS,ct)),it(O,"ADD_FORBID_CONTENTS")&&$t(O.ADD_FORBID_CONTENTS)&&(At===Un&&(At=Ct(At)),Ae(At,O.ADD_FORBID_CONTENTS,ct)),yr&&($["#text"]=!0),wt&&Ae($,["html","head","body"]),$.table&&(Ae($,["tbody"]),delete w.tbody),O.TRUSTED_TYPES_POLICY){if(typeof O.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ha('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof O.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ha('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=O.TRUSTED_TYPES_POLICY,I=A.createHTML("")}else A===void 0&&(A=nA(f,i)),A!==null&&typeof I=="string"&&(I=A.createHTML(""));(le.uponSanitizeElement.length>0||le.uponSanitizeAttribute.length>0)&&$===ae&&($=Ct($)),le.uponSanitizeAttribute.length>0&&L===be&&(L=Ct(L)),Mt&&Mt(O),sa=O},uy=Ae({},[...qu,...Uu,...ZT]),cy=Ae({},[...Bu,...WT]),LF=function(O){let K=m(O);(!K||!K.tagName)&&(K={namespaceURI:Bn,tagName:"template"});const me=Za(O.tagName),Ie=Za(K.tagName);return nd[O.namespaceURI]?O.namespaceURI===aa?K.namespaceURI===br?me==="svg":K.namespaceURI===mi?me==="svg"&&(Ie==="annotation-xml"||id[Ie]):!!uy[me]:O.namespaceURI===mi?K.namespaceURI===br?me==="math":K.namespaceURI===aa?me==="math"&&ad[Ie]:!!cy[me]:O.namespaceURI===br?K.namespaceURI===aa&&!ad[Ie]||K.namespaceURI===mi&&!id[Ie]?!1:!cy[me]&&($F[me]||!uy[me]):!!(hs==="application/xhtml+xml"&&nd[O.namespaceURI]):!1},Fr=function(O){Ui(t.removed,{element:O});try{m(O).removeChild(O)}catch{h(O)}},vi=function(O,K){try{Ui(t.removed,{attribute:K.getAttributeNode(O),from:K})}catch{Ui(t.removed,{attribute:null,from:K})}if(K.removeAttribute(O),O==="is")if(Gt||gr)try{Fr(K)}catch{}else try{K.setAttribute(O,"")}catch{}},dy=function(O){let K=null,me=null;if(ir)O="<remove></remove>"+O;else{const rt=nm(O,/^[\r\n\t ]+/);me=rt&&rt[0]}hs==="application/xhtml+xml"&&Bn===br&&(O='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+O+"</body></html>");const Ie=A?A.createHTML(O):O;if(Bn===br)try{K=new c().parseFromString(Ie,hs)}catch{}if(!K||!K.documentElement){K=N.createDocument(Bn,"template",null);try{K.documentElement.innerHTML=rd?I:Ie}catch{}}const ze=K.body||K.documentElement;return O&&me&&ze.insertBefore(r.createTextNode(me),ze.childNodes[0]||null),Bn===br?X.call(K,wt?"html":"body")[0]:wt?K.documentElement:ze},fy=function(O){return j.call(O.ownerDocument||O,O,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},hy=function(O){O.normalize();const K=j.call(O.ownerDocument||O,O,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let me=K.nextNode();for(;me;){let Ie=me.data;qi([he,H,oe],ze=>{Ie=Bi(Ie,ze," ")}),me.data=Ie,me=K.nextNode()}},el=function(O){const K=T?T(O):null;return typeof K!="string"||ct(K)!=="form"?!1:typeof O.nodeName!="string"||typeof O.textContent!="string"||typeof O.removeChild!="function"||O.attributes!==E(O)||typeof O.removeAttribute!="function"||typeof O.setAttribute!="function"||typeof O.namespaceURI!="string"||typeof O.insertBefore!="function"||typeof O.hasChildNodes!="function"||O.nodeType!==S(O)||O.childNodes!==v(O)},ps=function(O){if(!S||typeof O!="object"||O===null)return!1;try{return S(O)===Kr.documentFragment}catch{return!1}},tl=function(O){if(!S||typeof O!="object"||O===null)return!1;try{return typeof S(O)=="number"}catch{return!1}};function bn(ge,O,K){qi(ge,me=>{me.call(t,O,K,sa)})}const py=function(O){let K=null;if(bn(le.beforeSanitizeElements,O,null),el(O))return Fr(O),!0;const me=ct(O.nodeName);if(bn(le.uponSanitizeElement,O,{tagName:me,allowedTags:$}),Nt&&O.hasChildNodes()&&!tl(O.firstElementChild)&&Tt(/<[/\w!]/g,O.innerHTML)&&Tt(/<[/\w!]/g,O.textContent)||Nt&&O.namespaceURI===br&&me==="style"&&tl(O.firstElementChild)||O.nodeType===Kr.progressingInstruction||Nt&&O.nodeType===Kr.comment&&Tt(/<[/\w]/g,O.data))return Fr(O),!0;if(w[me]||!(we.tagCheck instanceof Function&&we.tagCheck(me))&&!$[me]){if(!w[me]&&vy(me)&&(G.tagNameCheck instanceof RegExp&&Tt(G.tagNameCheck,me)||G.tagNameCheck instanceof Function&&G.tagNameCheck(me)))return!1;if(yr&&!At[me]){const Ie=m(O),ze=v(O);if(ze&&Ie){const rt=ze.length;for(let Kt=rt-1;Kt>=0;--Kt){const Vn=p(ze[Kt],!0);Ie.insertBefore(Vn,g(O))}}}return Fr(O),!0}return(S?S(O):O.nodeType)===Kr.element&&!LF(O)||(me==="noscript"||me==="noembed"||me==="noframes")&&Tt(/<\/no(script|embed|frames)/i,O.innerHTML)?(Fr(O),!0):(ot&&O.nodeType===Kr.text&&(K=O.textContent,qi([he,H,oe],Ie=>{K=Bi(K,Ie," ")}),O.textContent!==K&&(Ui(t.removed,{element:O.cloneNode()}),O.textContent=K)),bn(le.afterSanitizeElements,O,null),!1)},my=function(O,K,me){if(_e[K]||Mr&&(K==="id"||K==="name")&&(me in r||me in RF))return!1;const Ie=L[K]||we.attributeCheck instanceof Function&&we.attributeCheck(K,O);if(!(Le&&!_e[K]&&Tt(W,K))){if(!(De&&Tt(fe,K))){if(!Ie||_e[K]){if(!(vy(O)&&(G.tagNameCheck instanceof RegExp&&Tt(G.tagNameCheck,O)||G.tagNameCheck instanceof Function&&G.tagNameCheck(O))&&(G.attributeNameCheck instanceof RegExp&&Tt(G.attributeNameCheck,K)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(K,O))||K==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&Tt(G.tagNameCheck,me)||G.tagNameCheck instanceof Function&&G.tagNameCheck(me))))return!1}else if(!fs[K]){if(!Tt(ee,Bi(me,de,""))){if(!((K==="src"||K==="xlink:href"||K==="href")&&O!=="script"&&im(me,"data:")===0&&na[O])){if(!(je&&!Tt(ce,Bi(me,de,"")))){if(me)return!1}}}}}}return!0},zF=Ae({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),vy=function(O){return!zF[Za(O)]&&Tt(J,O)},gy=function(O){bn(le.beforeSanitizeAttributes,O,null);const K=O.attributes;if(!K||el(O))return;const me={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0};let Ie=K.length;for(;Ie--;){const ze=K[Ie],rt=ze.name,Kt=ze.namespaceURI,Vn=ze.value,_n=ct(rt),od=Vn;let kt=rt==="value"?od:LT(od);if(me.attrName=_n,me.attrValue=kt,me.keepAttr=!0,me.forceKeepAttr=void 0,bn(le.uponSanitizeAttribute,O,me),kt=me.attrValue,yn&&(_n==="id"||_n==="name")&&im(kt,$r)!==0&&(vi(rt,O),kt=$r+kt),Nt&&Tt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,kt)){vi(rt,O);continue}if(_n==="attributename"&&nm(kt,"href")){vi(rt,O);continue}if(me.forceKeepAttr)continue;if(!me.keepAttr){vi(rt,O);continue}if(!_t&&Tt(/\/>/i,kt)){vi(rt,O);continue}ot&&qi([he,H,oe],by=>{kt=Bi(kt,by," ")});const yy=ct(O.nodeName);if(!my(yy,_n,kt)){vi(rt,O);continue}if(A&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Kt)switch(f.getAttributeType(yy,_n)){case"TrustedHTML":kt=A.createHTML(kt);break;case"TrustedScriptURL":kt=A.createScriptURL(kt);break}if(kt!==od)try{Kt?O.setAttributeNS(Kt,rt,kt):O.setAttribute(rt,kt),el(O)?Fr(O):rm(t.removed)}catch{vi(rt,O)}}bn(le.afterSanitizeAttributes,O,null)},rl=function(O){let K=null;const me=fy(O);for(bn(le.beforeSanitizeShadowDOM,O,null);K=me.nextNode();)if(bn(le.uponSanitizeShadowNode,K,null),py(K),gy(K),ps(K.content)&&rl(K.content),(S?S(K):K.nodeType)===Kr.element){const Ie=y?y(K):K.shadowRoot;ps(Ie)&&(oa(Ie),rl(Ie))}bn(le.afterSanitizeShadowDOM,O,null)},oa=function(O){const K=S?S(O):O.nodeType;if(K===Kr.element){const ze=y?y(O):O.shadowRoot;ps(ze)&&(oa(ze),rl(ze))}const me=v?v(O):O.childNodes;if(!me)return;const Ie=[];qi(me,ze=>{Ui(Ie,ze)});for(const ze of Ie)oa(ze);if(K===Kr.element){const ze=T?T(O):null;if(typeof ze=="string"&&ct(ze)==="template"){const rt=O.content;ps(rt)&&oa(rt)}}};return t.sanitize=function(ge){let O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},K=null,me=null,Ie=null,ze=null;if(rd=!ge,rd&&(ge="<!-->"),typeof ge!="string"&&!tl(ge)&&(ge=VT(ge),typeof ge!="string"))throw Ha("dirty is not a string, aborting");if(!t.isSupported)return ge;if(Rt||sd(O),t.removed=[],typeof ge=="string"&&(Xr=!1),Xr){const Vn=T?T(ge):ge.nodeName;if(typeof Vn=="string"){const _n=ct(Vn);if(!$[_n]||w[_n])throw Ha("root node is forbidden and cannot be sanitized in-place")}if(el(ge))throw Ha("root node is clobbered and cannot be sanitized in-place");oa(ge)}else if(tl(ge))K=dy("<!---->"),me=K.ownerDocument.importNode(ge,!0),me.nodeType===Kr.element&&me.nodeName==="BODY"||me.nodeName==="HTML"?K=me:K.appendChild(me),oa(me);else{if(!Gt&&!ot&&!wt&&ge.indexOf("<")===-1)return A&&Pr?A.createHTML(ge):ge;if(K=dy(ge),!K)return Gt?null:Pr?I:""}K&&ir&&Fr(K.firstChild);const rt=fy(Xr?ge:K);for(;Ie=rt.nextNode();)py(Ie),gy(Ie),ps(Ie.content)&&rl(Ie.content);if(Xr)return ot&&hy(ge),ge;if(Gt){if(ot&&hy(K),gr)for(ze=R.call(K.ownerDocument);K.firstChild;)ze.appendChild(K.firstChild);else ze=K;return(L.shadowroot||L.shadowrootmode)&&(ze=U.call(n,ze,!0)),ze}let Kt=wt?K.outerHTML:K.innerHTML;return wt&&$["!doctype"]&&K.ownerDocument&&K.ownerDocument.doctype&&K.ownerDocument.doctype.name&&Tt(eA,K.ownerDocument.doctype.name)&&(Kt="<!DOCTYPE "+K.ownerDocument.doctype.name+`>
|
|
77
|
-
`+Kt),ot&&qi([he,H,oe],Vn=>{Kt=Bi(Kt,Vn," ")}),A&&Pr?A.createHTML(Kt):Kt},t.setConfig=function(){sd(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Rt=!0},t.clearConfig=function(){sa=null,Rt=!1},t.isValidAttribute=function(ge,O,K){return sa||sd({}),my(ct(ge),ct(O),K)},t.addHook=function(ge,O){typeof O=="function"&&Ui(le[ge],O)},t.removeHook=function(ge,O){if(O!==void 0){const K=NT(le[ge],O);return K===-1?void 0:RT(le[ge],K,1)[0]}return rm(le[ge])},t.removeHooks=function(ge){le[ge]=[]},t.removeAllHooks=function(){le=fm()},t}var pm=hm(),iA=q('<span class="go-sub-ticket-description"></span>'),aA=q('<span class="go-sub-ticket-quantity"> </span>'),sA=q('<li><span class="go-sub-ticket-title"> </span> <!> <!></li>');function ju(e,t){te(t,!0);let r=_(t,"sub",7),n=_(t,"quantity",7),i=_(t,"max",23,()=>r().max_persons),a=_(t,"onChange",7),s=_(t,"preview",7,!1);const o=P(()=>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 a()},set onChange(y){a(y),b()},get preview(){return s()},set preview(y=!1){s(y),b()}},c=sA(),f=D(c),u=D(f,!0);C(f);var p=V(f,2),h=y=>{var E=iA();Ef(E,()=>pm.sanitize(r().description),!0),C(E),x(y,E)};ue(p,y=>{r().description&&y(h)});var g=V(p,2),v=y=>{var E=aA(),S=D(E,!0);C(E),Y(()=>{pe(E,"data-testid",`sub-ticket-${r().id??""}-quantity`),Z(S,n())}),x(y,E)},m=y=>{{let E=P(()=>r().title||k.t("cart.content.table.edit"));vo(y,{get value(){return n()},get min(){return r().min_persons},get max(){return i()},get label(){return d(E)},deselectable:!1,get onChange(){return a()}})}};return ue(g,y=>{s()||d(o)?y(v):y(m,-1)}),C(c),Y(()=>{Et(c,1,dr(["go-sub-ticket",d(o)&&"is-fixed",s()&&"is-preview",n()===0&&"is-empty"])),pe(c,"data-testid",`sub-ticket-${r().id??""}`),Z(u,r().title)}),x(e,c),re(l)}ne(ju,{sub:{},quantity:{},max:{},onChange:{},preview:{}},[],[],{mode:"open"});function mm(e,t){const{product:r}=e;return ja(r)?[r.event_title,e.time&&mp(e.time,t),r.title].filter(Boolean).join(" - "):r.title}var oA=q('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),lA=q('<span class="go-cart-item-price-discounted"> </span>'),uA=q('<span data-testid="cart-item-participant-count"> </span>'),cA=q('<span data-testid="cart-item-voucher-quantity"> </span>'),dA=q("<span> </span>"),fA=q('<li class="go-cart-item-remove"><button class="go-cart-remove"> </button></li>'),hA=q('<ul class="go-sub-tickets" role="list"></ul>'),pA=q('<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 vm(e,t){te(t,!0);let r=_(t,"displayItem",7),n=_(t,"displayCart",7),i=_(t,"preview",7),a=se(void 0),s=se(Pe({}));const o=P(()=>k.cart?.items.find(y=>y.uuid===(r().display?.reference_uuid??r().uuid))),l=P(()=>Vr(r().product)?r().product:null),c=ei();ve(()=>{k.cart?.items.map(y=>y.quantity),k.cart?.items.forEach(y=>y.mantle&&Object.values(y.mantle.composition)),Re(()=>{F(a,k.capacityManager.capacity(n(),r(),c),!0),F(s,d(o)?k.capacityManager.subTicketMaxes(k.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?k.cart?.deleteItem(d(o)):d(o).quantity=y}function p(y,E){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}d(o).mantle&&(d(o).mantle.composition[y]=E)}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=ie(),v=B(g),m=y=>{var E=pA(),S=B(E),T=D(S),A=D(T),I=D(A),M=G=>{Wp(G,{get cartItem(){return r()}})},N=G=>{Zp(G,{get cartItem(){return r()}})},j=G=>{jp(G,{get cartItem(){return r()}})},R=G=>{Hp(G,{get cartItem(){return r()}})};ue(I,G=>{r().product.type==="Ticket"?G(M):r().product.type==="Event"?G(N,1):r().product.type==="Coupon"?G(j,2):r().product.type==="Tour"&&G(R,3)}),C(A);var X=V(A,2),U=D(X),le=G=>{var w=oA(),_e=B(w),we=D(_e,!0);C(_e);var De=V(_e,2),Le=D(De,!0);C(De),Y((je,_t)=>{Z(we,je),Z(Le,_t)},[()=>et(r().display.originalPrice),()=>et(r().final_price_cents)]),x(G,w)},he=G=>{var w=lA(),_e=D(w,!0);C(w),Y(we=>Z(_e,we),[()=>et(r().final_price_cents)]),x(G,w)};ue(U,G=>{r().display?.discounted?G(le):G(he,-1)}),C(X);var H=V(X,2),oe=D(H),W=G=>{var w=uA(),_e=D(w,!0);C(w),Y(()=>Z(_e,r().product.participants)),x(G,w)},fe=G=>{var w=cA(),_e=D(w,!0);C(w),Y(()=>Z(_e,r().quantity)),x(G,w)},ce=G=>{var w=dA(),_e=D(w,!0);C(w),Y(()=>Z(_e,r().quantity)),x(G,w)},de=G=>{{let w=P(()=>r().quantity??0),_e=P(()=>mm(r(),k.locale));vo(G,{get value(){return d(w)},get min(){return d(a).min},get max(){return d(a).max},get label(){return d(_e)},floor:1,onChange:f,onDecrementBelowMin:u})}};ue(oe,G=>{r().product.type==="Tour"?G(W):r().voucher?.code?G(fe,1):i()?G(ce,2):G(de,-1)}),C(H);var J=V(H,2),ee=G=>{var w=fA(),_e=D(w),we=D(_e,!0);C(_e),C(w),Y((De,Le)=>{pe(_e,"aria-label",De),Z(we,Le)},[()=>k.t("cart.item.aria.removeItem"),()=>k.t("cart.item.remove")]),ut("click",_e,u),x(G,w)};ue(J,G=>{i()||G(ee)});var $=V(J,2),ae=D($,!0);C($),C(T),C(S);var L=V(S,2),be=G=>{var w=hA();Me(w,21,()=>qa(d(l)),_e=>_e.id,(_e,we)=>{{let De=P(()=>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(s)[d(we).id]},onChange:Le=>p(d(we).id,Le)})}}),C(w),Y(()=>pe(w,"aria-label",d(l).title)),x(G,w)};ue(L,G=>{d(l)&&G(be)}),Y(G=>Z(ae,G),[()=>et(r().total_price_cents)]),x(y,E)};return ue(v,y=>{d(a)&&y(m)}),x(e,g),re(h)}Bt(["click"]),ne(vm,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var mA=q('<li class="go-cart-item-remove"><button class="go-cart-remove"> </button></li>'),vA=q('<article class="go-cart-donation" data-testid="cart-donation"><ul><li class="go-cart-item-title-container"><span class="go-cart-donation-title"> </span></li> <li class="go-cart-item-price"></li> <li class="go-cart-item-count"></li> <!> <li class="go-cart-item-sum"> </li></ul></article>');function gm(e,t){te(t,!0);let r=_(t,"donation",7),n=_(t,"preview",7);const i=P(()=>k.donations?.campaigns?.find(m=>m.id===r().campaign_id));function a(){k.cart?.removeDonation(r().campaign_id,r().value)}var s={get donation(){return r()},set donation(m){r(m),b()},get preview(){return n()},set preview(m){n(m),b()}},o=vA(),l=D(o),c=D(l),f=D(c),u=D(f,!0);C(f),C(c);var p=V(c,6),h=m=>{var y=mA(),E=D(y),S=D(E,!0);C(E),C(y),Y((T,A)=>{pe(E,"aria-label",T),Z(S,A)},[()=>k.t("cart.item.aria.removeItem"),()=>k.t("cart.item.remove")]),ut("click",E,a),x(m,y)};ue(p,m=>{n()||m(h)});var g=V(p,2),v=D(g,!0);return C(g),C(l),C(o),Y((m,y)=>{Z(u,m),Z(v,y)},[()=>d(i)?.name??k.t("cart.donation.title"),()=>et(r().value)]),x(e,o),re(s)}Bt(["click"]),ne(gm,{donation:{},preview:{}},[],[],{mode:"open"});var gA=q('<li class="go-cart-header-remove"></li>'),ym=q('<li class="go-cart-item"><!></li>'),yA=q('<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 bA(e,t){te(t,!0);const r=Li(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=yA(),c=D(l),f=D(c),u=D(f),p=D(u,!0);C(u);var h=V(u,2),g=D(h,!0);C(h);var v=V(h,2),m=D(v,!0);C(v);var y=V(v,2),E=M=>{var N=gA();x(M,N)};ue(y,M=>{d(n).preview||M(E)});var S=V(y,2),T=D(S,!0);C(S),C(f),C(c);var A=V(c,2);Me(A,17,()=>d(n).displayCart.items,M=>M.uuid,(M,N)=>{var j=ym();vm(D(j),{get displayItem(){return d(N)},get displayCart(){return d(n).displayCart},get preview(){return d(n).preview}}),C(j),x(M,j)});var I=V(A,2);Me(I,17,()=>d(n).displayCart.donations,M=>M.campaign_id+"-"+M.value,(M,N)=>{var j=ym();gm(D(j),{get donation(){return d(N)},get preview(){return d(n).preview}}),C(j),x(M,j)}),C(l),Y((M,N,j,R)=>{Z(p,M),Z(g,N),Z(m,j),Z(T,R)},[()=>k.t("cart.content.table.desc"),()=>k.t("cart.content.table.price"),()=>k.t("cart.content.table.quantity"),()=>k.t("cart.content.table.total")]),x(o,l)};ue(a,o=>{d(n)&&d(n).displayCart&&(d(n).displayCart.items.length||d(n).displayCart.donations.length)&&o(s)}),x(e,i),re()}customElements.define("go-cart-items",ne(bA,{},[],[]));var _A=q('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),wA=q('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),kA=q('<ol data-testid="cart-coupons"></ol>');function SA(e,t){te(t,!0);const r=Li(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=kA();Me(l,21,()=>d(n).displayCart.coupons,c=>c.code,(c,f)=>{var u=wA();let p;var h=D(u),g=D(h),v=D(g),m=D(v,!0);C(v);var y=V(v,2),E=S=>{var T=_A(),A=D(T);C(T),Y(I=>pe(A,"aria-label",I),[()=>k.t("cart.coupons.remove")]),ut("click",A,()=>k.cart?.removeCoupon(d(f).code)),x(S,T)};ue(y,S=>{d(n).preview||S(E)}),C(g),C(h),C(u),Y(()=>{p=Et(u,1,"go-cart-coupon",null,p,{"go-cart-coupon-inactive":!d(f).applied}),Z(m,d(f).code)}),x(c,u)}),C(l),x(o,l)};ue(a,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.coupons.length>0&&o(s)}),x(e,i),re()}Bt(["click"]),customElements.define("go-cart-coupons",ne(SA,{},[],[]));var EA=q('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function xA(e,t){te(t,!0);const r=Li(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=EA(),c=D(l,!0);C(l),Y(f=>Z(c,f),[()=>et(d(n).totalPriceCents)]),x(o,l)};ue(a,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.items.length&&o(s)}),x(e,i),re()}customElements.define("go-cart-total-amount",ne(xA,{},[],[]));function TA(e,t){te(t,!0);const r=_(t,"preview",7,!1),n=new lT;uT(t.$$host,n),ve(()=>{n.preview=r()}),ve(()=>{k.cart&&(k.cart.items.map(a=>a.uuid+":"+a.quantity+":"+a.time),k.cart.coupons.map(a=>a.code).join("|"),k.cart.items.forEach(a=>a.mantle&&Object.values(a.mantle.composition)),k.cart.donations.map(a=>a.campaign_id+":"+a.value).join("|"),Re(()=>n.calculateDisplayCart()))});async function i(){const a=t.$$host.querySelectorAll("go-coupon-redemption");let s=!0;for(const o of a){const l=await o.flush?.();l&&!l.success&&(s=!1)}return s}return t.$$host.addEventListener("click",async a=>{const s=a.target.closest("go-submit");if(!s)return;const o=s.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}))}),re({get preview(){return r()},set preview(a=!1){r(a),b()}})}customElements.define("go-cart",ne(TA,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var AA=q('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function CA(e,t){te(t,!0);const r=Li(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=AA(),c=D(l,!0);C(l),Y(f=>Z(c,f),[()=>et(d(n).subtotalPriceCents)]),x(o,l)};ue(a,o=>{d(n)&&k.cart?.items.length&&o(s)}),x(e,i),re()}customElements.define("go-cart-subtotal-amount",ne(CA,{},[],[]));var OA=q('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function DA(e,t){te(t,!0);const r=Li(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=OA(),c=V(D(l),1,!0);C(l),Y(f=>Z(c,f),[()=>et(d(n).discountedAmountCents)]),x(o,l)};ue(a,o=>{d(n)&&d(n).discountedAmountCents>0&&o(s)}),x(e,i),re()}customElements.define("go-cart-discounted-amount",ne(DA,{},[],[]));function IA(e,t){te(t,!0),Hr(t.$$host,"go-if",{when:"data.cart.items.length === 0"}),re()}customElements.define("go-cart-empty",ne(IA,{},[],[]));function PA(e,t){te(t,!0);let r=P(()=>k.cart?.items.length);gt();var n=Vt();Y(()=>Z(n,d(r))),x(e,n),re()}customElements.define("go-cart-counter",ne(PA,{},[],[]));function MA(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 bm(e,t){const r=k.cart;if(!r)return;const n=e.details.fieldValue("paymentMode");r.paymentModeId=n==null?void 0:String(n);const i=await k.checkout(r.orderData());if(i.error){e.details.apiErrors=i.error;return}const a=Ke.config.forms[t]?.beforeSubmit;a&&await a(e.details.formData);const s=i.data.meta,o=Ke.config.navigateTo,l=Ke.config.urls.checkoutFailure??k.urls.checkoutFailure;if(s.status==="success"){const c=Ke.config.urls.checkoutSuccess??k.urls.checkoutSuccess;o?.(c(i.data.order.token))}else s.status==="fail"?o?.(l("")):s.payment_url?o?.(s.payment_url):s.payment_data?MA(s.payment_data):o?.(l(""))}function _m(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(!k.cart)return;const i=await k.signUp(n.details.formData,!0);if(i.error){n.details.apiErrors=i.error.errors;return}await bm(n,"checkoutGuest")})}function $A(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 bm(n,"checkoutUser")})}function FA(e,t){te(t,!0);let r=_(t,"custom",7,!1);return _m(t.$$host,r()),re({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-form",ne(FA,{custom:{}},[],[]));function NA(e,t){te(t,!0);let r=_(t,"custom",7,!1);return _m(t.$$host,r()),re({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-guest",ne(NA,{custom:{}},[],[]));function RA(e,t){te(t,!0);let r=_(t,"custom",7,!1);return $A(t.$$host,r()),re({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-user",ne(RA,{custom:{}},[],[]));var LA="TokenActions::ApplyOrderDiscount";async function zA(e){if(!k.cart)throw new Error("(go-coupon-redemption): cart not found");const t=k.cart,r=await k.asyncFetch(()=>k.getCouponSaleByBarcode(e));return r?.is_valid?r.value_action===LA?(t.addCoupon({code:e,kind:"actionToken"}),{success:!0}):r.is_voucher_for?UA(e,r):r.value_cents&&r.value_cents>0?qA(e,r.value_cents):Zu([k.t("cart.coupon.form.errors.notValid")]):Zu([k.t("cart.coupon.form.errors.notValid")])}function qA(e,t){return k.cart.addCoupon({code:e,kind:"valueVoucher",valueCents:t}),{success:!0}}async function UA(e,t){const r=e.toUpperCase();if(k.cart.coupons.some(s=>s.code===r))return{success:!0};const n=await k.asyncFetch(()=>k.tickets({"by_ticket_ids[]":[t.is_voucher_for]})),i=Array.isArray(n)?n.find(s=>s.id===t.is_voucher_for):void 0;if(!i)return Zu([k.t("cart.coupon.form.errors.error")]);const a={...i,price_cents:0};return k.cart.addItem(nt(Ua(a),{quantity:1,voucher:{code:r}})),k.cart.addCoupon({code:r,kind:"serviceVoucher"}),{success:!0}}function Zu(e){return{success:!1,errors:e}}var BA=q("<go-form></go-form>",2);function VA(e,t){te(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 zA(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 a={flush:i},s=BA();return Tn(s,"formId","couponRedemption"),Ta("submit",s,n),x(e,s),re(a)}customElements.define("go-coupon-redemption",ne(VA,{},[],["flush"]));var jA=q('<span class="go-donation-checkbox-label"></span>'),ZA=q('<span class="go-donation-checkbox-label"> </span>'),WA=q('<label class="go-donation-checkbox"><input type="checkbox" data-testid="donation-checkbox"/> <!></label>');function HA(e,t){te(t,!0);let r=_(t,"campaignId",7),n=_(t,"amountCents",7),i=_(t,"describedby",7);const a=document.createDocumentFragment();for(const y of Array.from(t.$$host.childNodes))!(y.nodeType===Node.TEXT_NODE&&y.textContent==="")&&y.nodeType!==Node.COMMENT_NODE&&a.appendChild(y);const s=Array.from(a.childNodes).some(y=>y.nodeType===Node.ELEMENT_NODE||!!y.textContent?.trim());let o=se(void 0);ve(()=>{if(!s||!d(o))return;const y=d(o);return y.appendChild(a),()=>{for(;y.firstChild;)a.appendChild(y.firstChild)}});const l=P(()=>k.donations?.campaigns?.find(y=>y.id===r())),c=P(()=>!k.currentUser?.isAuthenticated||k.currentUser?.isGuest),f=P(()=>!!d(l)&&d(l).guest_limit>0&&(n()??0)>d(l).guest_limit&&d(c)),u=P(()=>!!d(l)&&!!n()&&!!k.cart?.hasDonation(d(l).id,n()));function p(y){!d(l)||!n()||!k.cart||(y.currentTarget.checked?k.cart.addDonation({value:n(),campaign_id:d(l).id}):k.cart.removeDonation(d(l).id,n()))}var h={get campaignId(){return r()},set campaignId(y){r(y),b()},get amountCents(){return n()},set amountCents(y){n(y),b()},get describedby(){return i()},set describedby(y){i(y),b()}},g=ie(),v=B(g),m=y=>{var E=WA(),S=D(E);Ai(S);var T=V(S,2),A=M=>{var N=jA();Us(N,j=>F(o,j),()=>d(o)),x(M,N)},I=M=>{var N=ZA(),j=D(N,!0);C(N),Y(R=>Z(j,R),[()=>k.t("donations.checkbox.label",{campaign:d(l).name,amount:et(n())})]),x(M,N)};ue(T,M=>{s?M(A):M(I,-1)}),C(E),Y(()=>{Pf(S,d(u)),pe(S,"aria-describedby",i()||void 0)}),ut("change",S,p),x(y,E)};return ue(v,y=>{d(l)&&n()&&n()>0&&!d(f)&&y(m)}),x(e,g),re(h)}Bt(["change"]),customElements.define("go-donation-checkbox",ne(HA,{campaignId:{attribute:"campaign-id",type:"Number"},amountCents:{attribute:"amount-cents",type:"Number"},describedby:{attribute:"describedby",type:"String"}},[],[])),Cb();var GA=class{#e=se();get campaign(){return d(this.#e)}set campaign(e){F(this.#e,e,!0)}#t=se();get amount(){return d(this.#t)}set amount(e){F(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")||"[]");fr(t.filter(r=>r.campaign_id=e.campaign_id),r=>r.value)+e.value>this.campaign.guest_limit&&this.campaign.guest_limit>0&&(!k.currentUser?.isAuthenticated||k.currentUser.isGuest)?this.skipDonation():(t.push(e),localStorage.setItem("201600627v4donations",JSON.stringify(t)),localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",k.urls.cart()),window.location.replace(k.urls.cart()))};skipDonation=()=>{localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",k.urls.cart()),window.location.replace(k.urls.cart())}},Ot=new GA,KA=q('<img alt="logo"/>'),YA=q('<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 wm(e,t){te(t,!0);let r=_(t,"campaign",7);const n=P(()=>r().translations);var i={get campaign(){return r()},set campaign(v){r(v),b()}},a=YA();let s;var o=D(a),l=D(o),c=v=>{var m=KA();Y(y=>pe(m,"src",y),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),x(v,m)};ue(l,v=>{r().picture.thumbnail&&v(c)}),C(o);var f=V(o,2),u=D(f),p=D(u,!0);C(u);var h=V(u,2),g=D(h,!0);return C(h),C(f),C(a),Y(()=>{s=Et(a,1,"go-donation-campaign",null,s,{selected:Ot.campaign?.id===r()?.id}),Z(p,d(n)["donations.headline"]),Z(g,d(n)["donations.shop.info"])}),ut("click",a,()=>Ot.selectCampaign(r())),ut("keydown",a,v=>{v.key==="Enter"&&Ot.selectCampaign(r())}),x(e,a),re(i)}Bt(["click","keydown"]),ne(wm,{campaign:{}},[],[],{mode:"open"});var JA=q("<button> </button>"),QA=q('<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>'),XA=q('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function km(e,t){te(t,!0);const r=Ot.campaign?.guest_limit?Ot.campaign.guest_limit/100:void 0;let n=se(void 0);function i(p){Ot.amount=p,F(n,null)}function a(p){const h=document.getElementById("donationForm");h.checkValidity()?Ot.amount=p.target.valueAsNumber*100:(Ot.amount=void 0,h.reportValidity())}var s=XA(),o=D(s),l=D(o,!0);C(o);var c=V(o,2);Me(c,20,()=>Ot.campaign?.options,p=>p,(p,h)=>{var g=JA();let v;var m=D(g,!0);C(g),Y(y=>{v=Et(g,1,"btn btn-default",null,v,{selected:Ot.amount===h}),Z(m,y)},[()=>et(h)]),ut("click",g,()=>i(h)),x(p,g)}),C(c);var f=V(c,2),u=p=>{var h=QA(),g=D(h),v=D(g),m=D(v,!0);C(v);var y=V(v,2);Ai(y),C(g),C(h),Y((E,S)=>{Z(m,E),pe(y,"max",r),pe(y,"placeholder",S),Bl(y,d(n))},[()=>k.t("donations.selection.custom.label"),()=>k.t("donations.selection.custom.input.placeholder")]),ut("input",y,a),x(p,h)};ue(f,p=>{Ot.campaign?.free_donations&&p(u)}),C(s),Y(p=>Z(l,p),[()=>k.t("donations.selection.title")]),x(e,s),re()}Bt(["click","input"]),ne(km,{},[],[],{mode:"open"});var eC=q('<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>');function tC(e,t){te(t,!1),En(()=>{k.donations?.campaigns?.length==1&&Ot.selectCampaign(k.donations?.campaigns[0])}),Jl();var r=ie(),n=B(r),i=a=>{var s=eC(),o=D(s);Me(o,1,()=>k?.donations?.campaigns,v=>v.id,(v,m)=>{wm(v,{get campaign(){return d(m)}})});var l=V(o,2),c=v=>{km(v,{})};ue(l,v=>{Ot.campaign&&v(c)});var f=V(l,2),u=D(f),p=D(u,!0);C(u);var h=V(u,2),g=D(h,!0);C(h),C(f),C(s),Y((v,m)=>{Z(p,v),h.disabled=!Ot.amount,Z(g,m)},[()=>k.t("donations.actions.continueWithoutDonation"),()=>k.t("donations.actions.addToCart")]),ut("click",u,function(...v){Ot.skipDonation?.apply(this,v)}),ut("click",h,function(...v){Ot.addDonationToCart?.apply(this,v)}),x(a,s)};ue(n,a=>{k.donations&&k.donations.campaigns&&a(i)}),x(e,r),re()}Bt(["click"]),customElements.define("go-donations",ne(tC,{},[],[]));function rC(e){return typeof e=="function"}function Ga(e){return e!==null&&typeof e=="object"}var nC=["string","number","bigint","boolean"];function Wu(e){return e==null||nC.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Wu(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}var yo=Symbol("box"),Sm=Symbol("is-writable");function z(e,t){const r=P(e);return t?{[yo]:!0,[Sm]:!0,get current(){return d(r)},set current(n){t(n)}}:{[yo]:!0,get current(){return e()}}}function Em(e){return Ga(e)&&yo in e}function iC(e){return Em(e)?e:rC(e)?z(e):xr(e)}function xr(e){let t=se(Pe(e));return{[yo]:!0,[Sm]:!0,get current(){return d(t)},set current(r){F(t,r,!0)}}}function xm(...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 Tm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,aC=/\n/g,sC=/^\s*/,oC=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,lC=/^:\s*/,uC=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,cC=/^[;\s]*/,dC=/^\s+|\s+$/g,fC=`
|
|
78
|
-
`,Am="/",Cm="*",ni="",hC="comment",pC="declaration";function mC(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(
|
|
75
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const o=s[1];if(t===s[0]){a(s);continue}if(e.external){const l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){a(s);continue}}if(e.metadataRegistry.get(s[0])?.id){a(s);continue}if(o.cycle){a(s);continue}if(o.count>1&&e.reused==="ref"){a(s);continue}}}function Ih(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),y=h.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(y)):Object.assign(c,y),Object.assign(c,f),o._zod.parent===u)for(const v in c)v==="$ref"||v==="allOf"||v in f||delete c[v];if(y.$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 y in c)y==="$ref"||y==="allOf"||y in h.def&&JSON.stringify(c[y])===JSON.stringify(h.def[y])&&delete c[y]}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 a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;const s=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,s[l.defId]=l.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:Xs(t,"input",e.processors),output:Xs(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 mS=(e,t={})=>r=>{const n=Oh({...r,processors:t});return xt(e,n),Dh(n,e),Ih(n,e)},Xs=(e,t,r={})=>n=>{const{libraryOptions:i,target:a}=n??{},s=Oh({...i??{},target:a,io:t,processors:r});return xt(e,s),Dh(s,e),Ih(s,e)},vS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},gS=(e,t,r,n)=>{const i=r;i.type="string";const{minimum:a,maximum:s,format:o,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof a=="number"&&(i.minLength=a),typeof s=="number"&&(i.maxLength=s),o&&(i.format=vS[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}))])}},yS=(e,t,r,n)=>{const i=r,{minimum:a,maximum:s,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>=(a??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(s??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 a=="number"&&(i.minimum=a),p?h?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof s=="number"&&(i.maximum=s),typeof l=="number"&&(i.multipleOf=l)},bS=(e,t,r,n)=>{r.not={}},_S=(e,t,r,n)=>{},wS=(e,t,r,n)=>{const i=e._zod.def,a=Hf(i.entries);a.every(s=>typeof s=="number")&&(r.type="number"),a.every(s=>typeof s=="string")&&(r.type="string"),r.enum=a},kS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},SS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},ES=(e,t,r,n)=>{const i=r,a=e._zod.def,{minimum:s,maximum:o}=e._zod.bag;typeof s=="number"&&(i.minItems=s),typeof o=="number"&&(i.maxItems=o),i.type="array",i.items=xt(a.element,t,{...n,path:[...n.path,"items"]})},xS=(e,t,r,n)=>{const i=r,a=e._zod.def;i.type="object",i.properties={};const s=a.shape;for(const c in s)i.properties[c]=xt(s[c],t,{...n,path:[...n.path,"properties",c]});const o=new Set(Object.keys(s)),l=new Set([...o].filter(c=>{const f=a.shape[c]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));l.size>0&&(i.required=Array.from(l)),a.catchall?._zod.def.type==="never"?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=xt(a.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},TS=(e,t,r,n)=>{const i=e._zod.def,a=i.inclusive===!1,s=i.options.map((o,l)=>xt(o,t,{...n,path:[...n.path,a?"oneOf":"anyOf",l]}));a?r.oneOf=s:r.anyOf=s},AS=(e,t,r,n)=>{const i=e._zod.def,a=xt(i.left,t,{...n,path:[...n.path,"allOf",0]}),s=xt(i.right,t,{...n,path:[...n.path,"allOf",1]}),o=l=>"allOf"in l&&Object.keys(l).length===1;r.allOf=[...o(a)?a.allOf:[a],...o(s)?s.allOf:[s]]},CS=(e,t,r,n)=>{const i=e._zod.def,a=xt(i.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=i.innerType,r.nullable=!0):r.anyOf=[a,{type:"null"}]},OS=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType},DS=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},IS=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},PS=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType;let s;try{s=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},MS=(e,t,r,n)=>{const i=e._zod.def,a=i.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?a?i.out:i.in:i.out;xt(s,t,n);const o=t.seen.get(e);o.ref=s},$S=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType,r.readOnly=!0},Ph=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType},FS=Q("ZodISODateTime",(e,t)=>{V0.init(e,t),Xe.init(e,t)});function NS(e){return Wk(FS,e)}var RS=Q("ZodISODate",(e,t)=>{j0.init(e,t),Xe.init(e,t)});function LS(e){return Hk(RS,e)}var zS=Q("ZodISOTime",(e,t)=>{Z0.init(e,t),Xe.init(e,t)});function qS(e){return Gk(zS,e)}var US=Q("ZodISODuration",(e,t)=>{W0.init(e,t),Xe.init(e,t)});function BS(e){return Kk(US,e)}var VS=(e,t)=>{eh.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Fw(e,r)},flatten:{value:r=>$w(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}}})},hr=Q("ZodError",VS,{Parent:Error}),jS=su(hr),ZS=ou(hr),WS=Hs(hr),HS=Gs(hr),GS=Lw(hr),KS=zw(hr),YS=qw(hr),JS=Uw(hr),QS=Bw(hr),XS=Vw(hr),e1=jw(hr),t1=Zw(hr),Mh=new WeakMap;function Fa(e,t,r){const n=Object.getPrototypeOf(e);let i=Mh.get(n);if(i||(i=new Set,Mh.set(n,i)),!i.has(t)){i.add(t);for(const a in r){const s=r[a];Object.defineProperty(n,a,{configurable:!0,enumerable:!1,get(){const o=s.bind(this);return Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:o}),o},set(o){Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:o})}})}}}var ht=Q("ZodType",(e,t)=>(ft.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Xs(e,"input"),output:Xs(e,"output")}}),e.toJSONSchema=mS(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>jS(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>WS(e,r,n),e.parseAsync=async(r,n)=>ZS(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>HS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>GS(e,r,n),e.decode=(r,n)=>KS(e,r,n),e.encodeAsync=async(r,n)=>YS(e,r,n),e.decodeAsync=async(r,n)=>JS(e,r,n),e.safeEncode=(r,n)=>QS(e,r,n),e.safeDecode=(r,n)=>XS(e,r,n),e.safeEncodeAsync=async(r,n)=>e1(e,r,n),e.safeDecodeAsync=async(r,n)=>t1(e,r,n),Fa(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(W1(r,n))},superRefine(r,n){return this.check(H1(r,n))},overwrite(r){return this.check(Di(r))},optional(){return Uh(this)},exactOptional(){return $1(this)},nullable(){return Bh(this)},nullish(){return Uh(Bh(this))},nonoptional(r){return q1(this,r)},array(){return zh(this)},or(r){return A1([this,r])},and(r){return O1(this,r)},transform(r){return jh(this,P1(r))},default(r){return R1(this,r)},prefault(r){return z1(this,r)},catch(r){return B1(this,r)},pipe(r){return jh(this,r)},readonly(){return Z1(this)},describe(r){const n=this.clone();return $a.add(n,{description:r}),n},meta(...r){if(r.length===0)return $a.get(this);const n=this.clone();return $a.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 $a.get(e)?.description},configurable:!0}),e)),$h=Q("_ZodString",(e,t)=>{lu.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(n,i,a)=>gS(e,n,i,a);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Fa(e,"_ZodString",{regex(...n){return this.check(eS(...n))},includes(...n){return this.check(nS(...n))},startsWith(...n){return this.check(iS(...n))},endsWith(...n){return this.check(aS(...n))},min(...n){return this.check(Qs(...n))},max(...n){return this.check(Ah(...n))},length(...n){return this.check(Ch(...n))},nonempty(...n){return this.check(Qs(1,...n))},lowercase(n){return this.check(tS(n))},uppercase(n){return this.check(rS(n))},trim(){return this.check(oS())},normalize(...n){return this.check(sS(...n))},toLowerCase(){return this.check(lS())},toUpperCase(){return this.check(uS())},slugify(){return this.check(cS())}})}),r1=Q("ZodString",(e,t)=>{lu.init(e,t),$h.init(e,t),e.email=r=>e.check(xk(n1,r)),e.url=r=>e.check(Dk(i1,r)),e.jwt=r=>e.check(Zk(b1,r)),e.emoji=r=>e.check(Ik(a1,r)),e.guid=r=>e.check(Sh(Fh,r)),e.uuid=r=>e.check(Tk(eo,r)),e.uuidv4=r=>e.check(Ak(eo,r)),e.uuidv6=r=>e.check(Ck(eo,r)),e.uuidv7=r=>e.check(Ok(eo,r)),e.nanoid=r=>e.check(Pk(s1,r)),e.guid=r=>e.check(Sh(Fh,r)),e.cuid=r=>e.check(Mk(o1,r)),e.cuid2=r=>e.check($k(l1,r)),e.ulid=r=>e.check(Fk(u1,r)),e.base64=r=>e.check(Bk(v1,r)),e.base64url=r=>e.check(Vk(g1,r)),e.xid=r=>e.check(Nk(c1,r)),e.ksuid=r=>e.check(Rk(d1,r)),e.ipv4=r=>e.check(Lk(f1,r)),e.ipv6=r=>e.check(zk(h1,r)),e.cidrv4=r=>e.check(qk(p1,r)),e.cidrv6=r=>e.check(Uk(m1,r)),e.e164=r=>e.check(jk(y1,r)),e.datetime=r=>e.check(NS(r)),e.date=r=>e.check(LS(r)),e.time=r=>e.check(qS(r)),e.duration=r=>e.check(BS(r))});function Xt(e){return Ek(r1,e)}var Xe=Q("ZodStringFormat",(e,t)=>{Qe.init(e,t),$h.init(e,t)}),n1=Q("ZodEmail",(e,t)=>{$0.init(e,t),Xe.init(e,t)}),Fh=Q("ZodGUID",(e,t)=>{P0.init(e,t),Xe.init(e,t)}),eo=Q("ZodUUID",(e,t)=>{M0.init(e,t),Xe.init(e,t)}),i1=Q("ZodURL",(e,t)=>{F0.init(e,t),Xe.init(e,t)}),a1=Q("ZodEmoji",(e,t)=>{N0.init(e,t),Xe.init(e,t)}),s1=Q("ZodNanoID",(e,t)=>{R0.init(e,t),Xe.init(e,t)}),o1=Q("ZodCUID",(e,t)=>{L0.init(e,t),Xe.init(e,t)}),l1=Q("ZodCUID2",(e,t)=>{z0.init(e,t),Xe.init(e,t)}),u1=Q("ZodULID",(e,t)=>{q0.init(e,t),Xe.init(e,t)}),c1=Q("ZodXID",(e,t)=>{U0.init(e,t),Xe.init(e,t)}),d1=Q("ZodKSUID",(e,t)=>{B0.init(e,t),Xe.init(e,t)}),f1=Q("ZodIPv4",(e,t)=>{H0.init(e,t),Xe.init(e,t)}),h1=Q("ZodIPv6",(e,t)=>{G0.init(e,t),Xe.init(e,t)}),p1=Q("ZodCIDRv4",(e,t)=>{K0.init(e,t),Xe.init(e,t)}),m1=Q("ZodCIDRv6",(e,t)=>{Y0.init(e,t),Xe.init(e,t)}),v1=Q("ZodBase64",(e,t)=>{J0.init(e,t),Xe.init(e,t)}),g1=Q("ZodBase64URL",(e,t)=>{X0.init(e,t),Xe.init(e,t)}),y1=Q("ZodE164",(e,t)=>{ek.init(e,t),Xe.init(e,t)}),b1=Q("ZodJWT",(e,t)=>{rk.init(e,t),Xe.init(e,t)}),Nh=Q("ZodNumber",(e,t)=>{ch.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(n,i,a)=>yS(e,n,i,a),Fa(e,"ZodNumber",{gt(n,i){return this.check(xh(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(Eh(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(Rh(n))},safe(n){return this.check(Rh(n))},positive(n){return this.check(xh(0,n))},nonnegative(n){return this.check(du(0,n))},negative(n){return this.check(Eh(0,n))},nonpositive(n){return this.check(cu(0,n))},multipleOf(n,i){return this.check(Th(n,i))},step(n,i){return this.check(Th(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 Na(e){return Yk(Nh,e)}var _1=Q("ZodNumberFormat",(e,t)=>{nk.init(e,t),Nh.init(e,t)});function Rh(e){return Jk(_1,e)}var w1=Q("ZodUnknown",(e,t)=>{ik.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_S(e,r,n,i)});function Lh(){return Qk(w1)}var k1=Q("ZodNever",(e,t)=>{ak.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>bS(e,r,n,i)});function S1(e){return Xk(k1,e)}var E1=Q("ZodArray",(e,t)=>{sk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>ES(e,r,n,i),e.element=t.element,Fa(e,"ZodArray",{min(r,n){return this.check(Qs(r,n))},nonempty(r){return this.check(Qs(1,r))},max(r,n){return this.check(Ah(r,n))},length(r,n){return this.check(Ch(r,n))},unwrap(){return this.element}})});function zh(e,t){return dS(E1,e,t)}var x1=Q("ZodObject",(e,t)=>{lk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>xS(e,r,n,i),We(e,"shape",()=>t.shape),Fa(e,"ZodObject",{keyof(){return D1(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Lh()})},loose(){return this.clone({...this._zod.def,catchall:Lh()})},strict(){return this.clone({...this._zod.def,catchall:S1()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return Cw(this,r)},safeExtend(r){return Ow(this,r)},merge(r){return Dw(this,r)},pick(r){return Tw(this,r)},omit(r){return Aw(this,r)},partial(...r){return Iw(qh,this,r[0])},required(...r){return Pw(Vh,this,r[0])}})});function fu(e,t){return new x1({type:"object",shape:e??{},...ye(t)})}var T1=Q("ZodUnion",(e,t)=>{uk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>TS(e,r,n,i),e.options=t.options});function A1(e,t){return new T1({type:"union",options:e,...ye(t)})}var C1=Q("ZodIntersection",(e,t)=>{ck.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>AS(e,r,n,i)});function O1(e,t){return new C1({type:"intersection",left:e,right:t})}var hu=Q("ZodEnum",(e,t)=>{dk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(n,i,a)=>wS(e,n,i,a),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{const a={};for(const s of n)if(r.has(s))a[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new hu({...t,checks:[],...ye(i),entries:a})},e.exclude=(n,i)=>{const a={...t.entries};for(const s of n)if(r.has(s))delete a[s];else throw new Error(`Key ${s} not found in enum`);return new hu({...t,checks:[],...ye(i),entries:a})}});function D1(e,t){return new hu({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...ye(t)})}var I1=Q("ZodTransform",(e,t)=>{fk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>SS(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Wf(e.constructor.name);r.addIssue=a=>{if(typeof a=="string")r.issues.push(Ma(a,r.value,t));else{const s=a;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(Ma(s))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(a=>(r.value=a,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function P1(e){return new I1({type:"transform",transform:e})}var qh=Q("ZodOptional",(e,t)=>{gh.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ph(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Uh(e){return new qh({type:"optional",innerType:e})}var M1=Q("ZodExactOptional",(e,t)=>{hk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ph(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function $1(e){return new M1({type:"optional",innerType:e})}var F1=Q("ZodNullable",(e,t)=>{pk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>CS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Bh(e){return new F1({type:"nullable",innerType:e})}var N1=Q("ZodDefault",(e,t)=>{mk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>DS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function R1(e,t){return new N1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Jf(t)}})}var L1=Q("ZodPrefault",(e,t)=>{vk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>IS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function z1(e,t){return new L1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Jf(t)}})}var Vh=Q("ZodNonOptional",(e,t)=>{gk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>OS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function q1(e,t){return new Vh({type:"nonoptional",innerType:e,...ye(t)})}var U1=Q("ZodCatch",(e,t)=>{yk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>PS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function B1(e,t){return new U1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var V1=Q("ZodPipe",(e,t)=>{bk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>MS(e,r,n,i),e.in=t.in,e.out=t.out});function jh(e,t){return new V1({type:"pipe",in:e,out:t})}var j1=Q("ZodReadonly",(e,t)=>{_k.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$S(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Z1(e){return new j1({type:"readonly",innerType:e})}var Zh=Q("ZodCustom",(e,t)=>{wk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kS(e,r,n,i)});function W1(e,t={}){return fS(Zh,e,t)}function H1(e,t){return hS(e,t)}function G1(e,t={}){const r=new Zh({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 K1=fu({id:Na(),customer:fu({customer_salutation_id:Na().positive({message:"user.fieldErrors.titleRequire"}),name:Xt().min(1,{message:"user.fieldErrors.nameRequire"}),surname:Xt().min(1,{message:"user.fieldErrors.surnameRequire"}),email:Xt().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:Xt().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:Xt().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:Xt().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:Xt().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:Na().positive().default(60),language_id:Na().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),xN=fu({ticket_sale_id:Na(),start_at:Xt().date(),personalizations:zh(K1)});function pu(e,t){return e-t*Math.floor(e/t)}var Wh=1721426;function to(e,t,r,n){t=mu(e,t);let i=t-1,a=-2;return r<=2?a=0:ro(t)&&(a=-1),Wh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+a+n)}function ro(e){return e%4===0&&(e%100!==0||e%400===0)}function mu(e,t){return e==="BC"?1-t:t}function Y1(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var J1={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-Wh,n=Math.floor(r/146097),i=pu(r,146097),a=Math.floor(i/36524),s=pu(i,36524),o=Math.floor(s/1461),l=pu(s,1461),c=Math.floor(l/365),[f,u]=Y1(n*400+a*100+o*4+c+(a!==4&&c!==4?1:0)),p=t-to(f,u,1,1),h=2;t<to(f,u,3,1)?h=0:ro(u)&&(h=1);let y=Math.floor(((p+h)*12+373)/367);return new za(f,u,y,t-to(f,u,y,1)+1)}toJulianDay(e){return to(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return J1[ro(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return ro(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"}},Q1={"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=tr(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=tr(t,e.calendar),e=yu(e),t=yu(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function X1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function eE(e,t){return Dn(e,Pi(t))}var tE={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Hh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?tE[r]:oE(t),a=Math.ceil(n+1-i)%7;return a<0&&(a+=7),a}function rE(e){return Br(Date.now(),e)}function Pi(e){return cE(rE(e))}function Gh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function nE(e,t){return Kh(e)-Kh(t)}function Kh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var gu=null,iE=!1;function er(){return gu==null&&(gu=new Intl.DateTimeFormat().resolvedOptions().timeZone),gu}function Yh(){return iE}function yu(e){return e.subtract({days:e.day-1})}function aE(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var Jh=new Map,bu=new Map;function sE(e){if(Intl.Locale){let r=Jh.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&Jh.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function oE(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=sE(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&&Q1[r]||0};bu.set(e,t)}return t.firstDay}function In(e){return e=tr(e,new Ii),Qh(mu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Qh(e,t,r,n,i,a,s){let o=new Date;return o.setUTCHours(n,i,a,s),o.setUTCFullYear(e,t-1,r),o.getTime()}function Ra(e,t){if(t==="UTC")return 0;if(e>0&&t===er()&&!Yh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:a,minute:s,second:o}=ep(e,t);return Qh(r,n,i,a,s,o,0)-Math.floor(e/1e3)*1e3}var Xh=new Map;function ep(e,t){let r=Xh.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"}),Xh.set(t,r));let n=r.formatToParts(new Date(e)),i={};for(let a of n)a.type!=="literal"&&(i[a.type]=a.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 no=864e5;function lE(e,t){let r=In(e);return tp(e,t,r-Ra(r-no,t),r-Ra(r+no,t))}function tp(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>uE(e,t,i))}function uE(e,t,r){let n=ep(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===er()&&r==="compatible"&&!Yh()){n=tr(n,new Ii);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),a=Ra(i-no,t),s=Ra(i+no,t),o=tp(n,t,i-a,i-s);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-a,i-s);case"compatible":case"later":return Math.max(i-a,i-s);case"reject":throw new RangeError("No such absolute time found")}}function rp(e,t,r="compatible"){return new Date(Ur(e,t,r))}function Br(e,t){let r=Ra(e,t),n=new Date(e+r),i=n.getUTCFullYear(),a=n.getUTCMonth()+1,s=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,a,s,t,r,o,l,c,f)}function cE(e){return new za(e.calendar,e.era,e.year,e.month,e.day)}function Pn(e,t){let r=0,n=0,i=0,a=0;if("timeZone"in e)({hour:r,minute:n,second:i,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:i,millisecond:a}=t),new Mi(e.calendar,e.era,e.year,e.month,e.day,r,n,i,a)}function tr(e,t){if(X1(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 dE(e,t,r){return e instanceof Mn?e.timeZone===t?e:np(e,t):Br(Ur(e,t,r),t)}function fE(e){let t=In(e)-e.offset;return new Date(t)}function np(e,t){return tr(Br(In(e)-e.offset,t),e.calendar)}var La=36e5;function io(e,t){let r=e.copy(),n="hour"in r?vE(r,t):0;_u(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,wu(r),ip(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,hE(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 s=r.calendar.isInverseEra?.(r);r.year=i,r.month=s?1:r.calendar.getMonthsInYear(r),r.day=s?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let a=r.calendar.getMonthsInYear(r);return r.month>a&&(r.month=a,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 hE(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 ip(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)),ip(e)}function ap(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function sp(e,t){return io(e,ap(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),Xn(r),r}function ao(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),mE(r),r}function pE(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 mE(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 vE(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,pE(e)}function Su(e,t,r,n){let i=e.copy();switch(t){case"era":{let a=e.calendar.getEras(),s=a.indexOf(e.era);if(s<0)throw new Error("Invalid era: "+e.era);s=sn(s,r,0,a.length-1,n?.round),i.era=a[s],Xn(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=sn(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=sn(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":i.day=sn(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 op(e,t,r,n){let i=e.copy();switch(t){case"hour":{let a=e.hour,s=0,o=23;if(n?.hourCycle===12){let l=a>=12;s=l?12:0,o=l?23:11}i.hour=sn(a,r,s,o,n?.round);break}case"minute":i.minute=sn(e.minute,r,0,59,n?.round);break;case"second":i.second=sn(e.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=sn(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return i}function sn(e,t,r,n,i=!1){if(i){e+=Math.sign(t),e<r&&(e=n);let a=Math.abs(t);t>0?e=Math.ceil(e/a)*a:e=Math.floor(e/a)*a,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function lp(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(io(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,tr(Br(r,e.timeZone),e.calendar)}function gE(e,t){return lp(e,ap(t))}function yE(e,t,r,n){switch(t){case"hour":{let i=0,a=23;if(n?.hourCycle===12){let y=e.hour>=12;i=y?12:0,a=y?23:11}let s=Pn(e),o=tr(ao(s,{hour:i}),new Ii),l=[Ur(o,e.timeZone,"earlier"),Ur(o,e.timeZone,"later")].filter(y=>Br(y,e.timeZone).day===o.day)[0],c=tr(ao(s,{hour:a}),new Ii),f=[Ur(c,e.timeZone,"earlier"),Ur(c,e.timeZone,"later")].filter(y=>Br(y,e.timeZone).day===c.day).pop(),u=In(e)-e.offset,p=Math.floor(u/La),h=u%La;return u=sn(p,r,Math.floor(l/La),Math.floor(f/La),n?.round)*La+h,tr(Br(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return op(e,t,r,n);case"era":case"year":case"month":case"day":return tr(Br(Ur(Su(Pn(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function bE(e,t,r){let n=Pn(e),i=ao(ku(n,t),t);return i.compare(n)===0?e:tr(Br(Ur(i,e.timeZone,r),e.timeZone),e.calendar)}var _E=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,wE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,kE=/^([+-]\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)$/,SE=["hours","minutes","seconds"],TN=["years","months","weeks","days",...SE];function oo(e){let t=e.match(_E);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 za(Be(t[1],0,9999),Be(t[2],1,12),1);return r.day=Be(t[3],1,r.calendar.getDaysInMonth(r)),r}function up(e){let t=e.match(wE);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 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 cp(e,t){let r=e.match(kE);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 a=Pn(i),s;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),s=In(i)-i.offset,!lE(a,i.timeZone).includes(s))throw new Error(`Offset ${hp(i.offset)} is invalid for ${xu(i)} in ${i.timeZone}`)}else s=Ur(Pn(a),i.timeZone,t);return Br(s,i.timeZone)}function dp(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),np(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 EE(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 fp(e){let t=tr(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 xu(e){return`${fp(e)}T${EE(e)}`}function hp(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),a=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(a+=`:${String(i).padStart(2,"0")}`),a}function xE(e){return`${xu(e)}${hp(e.offset)}[${e.timeZone}]`}function Tu(e){let t=typeof e[0]=="object"?e.shift():new Ii,r;if(typeof e[0]=="string")r=e.shift();else{let s=t.getEras();r=s[s.length-1]}let n=e.shift(),i=e.shift(),a=e.shift();return[t,r,n,i,a]}var za=class ud{#e;constructor(...t){let[r,n,i,a,s]=Tu(t);this.calendar=r,this.era=n,this.year=i,this.month=a,this.day=s,Xn(this)}copy(){return this.era?new ud(this.calendar,this.era,this.year,this.month,this.day):new ud(this.calendar,this.year,this.month,this.day)}add(t){return io(this,t)}subtract(t){return sp(this,t)}set(t){return ku(this,t)}cycle(t,r,n){return Su(this,t,r,n)}toDate(t){return rp(this,t)}toString(){return fp(this)}compare(t){return Gh(this,t)}},Mi=class cd{#e;constructor(...t){let[r,n,i,a,s]=Tu(t);this.calendar=r,this.era=n,this.year=i,this.month=a,this.day=s,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 cd(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new cd(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return io(this,t)}subtract(t){return sp(this,t)}set(t){return ku(ao(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 op(this,t,r,n)}}toDate(t,r){return rp(this,t,r)}toString(){return xu(this)}compare(t){let r=Gh(this,t);return r===0?nE(this,Pn(t)):r}},Mn=class dd{#e;constructor(...t){let[r,n,i,a,s]=Tu(t),o=t.shift(),l=t.shift();this.calendar=r,this.era=n,this.year=i,this.month=a,this.day=s,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 dd(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new dd(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return lp(this,t)}subtract(t){return gE(this,t)}set(t,r){return bE(this,t,r)}cycle(t,r,n){return yE(this,t,r,n)}toDate(){return fE(this)}toString(){return xE(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-dE(t,this.timeZone).toDate().getTime()}},Au=new Map,pr=class{constructor(e,t={}){this.formatter=pp(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 CE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=OE(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}},TE={true:{ja:"h11"},false:{}};function pp(e,t={}){if(typeof t.hour12=="boolean"&&AE()){t={...t};let i=TE[String(t.hour12)][e.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=i??a,delete t.hour12}let r=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[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 AE(){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 CE(){return Ou==null&&(Ou=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Ou}function OE(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=pp(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),i=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(a=>a.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 DE={dayMonth:{month:"numeric",day:"numeric"},short:{year:"numeric",month:"numeric",day:"numeric"}};function mp(e,t){const r=dp(e,"Europe/Berlin");return new pr(t,{timeZone:r.timeZone,hour:"numeric",minute:"numeric"}).format(r.toDate())}function IE(e,t,r){const n=dp(e instanceof Date?e.toISOString():e,"Europe/Berlin");return new pr(r,{timeZone:n.timeZone,...DE[t]}).format(n.toDate())}function lo(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 qa(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 Ua(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 Ba(e,t=""){return Bf(Object.values(e).map(r=>Ua(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 Bf(Object.values(e).filter(n=>r(n)||Object.keys(n.total_capacities??{}).length===0).map(n=>Ua(n,{selectedTime:r(n)??t})),n=>n.shop_order)}function Va(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 vp=e=>fr(Object.values(e.mantle?.composition??{}));function PE(e){const t=e.quantity??0;return Vr(e.product)?t*vp(e):t}function Iu(e,t,r,n){e.clearPrecart();let i=0;for(const a of[...r.items,...t.items]){if(!lo(a.product))continue;const s=PE(a);a===n&&(i=s),e.addPrecartItemQuantity(a.product.id,s)}return i}var ME=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!lo(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,a=e.quotaManager,s=Iu(a,t,n,r),o=a.ticketCapacity(i.id,i.selectedTime,s),l=a.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}},$E=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,a=e.quotaManager,s=Iu(a,t,n,r),o=a.ticketCapacity(i.id,i.selectedTime,s),l=a.totalCapacity(i.id,i.selectedTime),c=vp(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}},FE=e=>Object.fromEntries(qa(e).map(t=>[t.id,t.max_persons]));function NE(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,a=r.quantity??0;let s=1/0;return a>0&&(Iu(e.quotaManager,t,n,r),s=Math.floor(e.quotaManager.ticketCapacity(i.id,i.selectedTime,0)/a)),Object.fromEntries(qa(i).map(o=>[o.id,Math.min(o.max_persons,(r.mantle?.composition?.[o.id]??0)+s)]))}function ja(e){return e?.type==="Event"}function RE(e){return ja(e)&&e.subtype==="scale"}function LE(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 LE(e,t,r)}var zE=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!ja(r.product))throw new Error("(getMaxQuantitySeats) impossible");const i=r.product.dateId,a=e.allSeats[i];if(!a)return console.error("(getMaxQuantity) no seats found for dateId",i),{max:0,min:0,unavailable:!0,bookedOut:!1};const s=Math.min(a.max||100,a.max_per_registration||100,a.available??100),o={max_per_registration:s,available:100,overbook:!1,...a};let l=s;o.overbook&&(l=Math.min(o.max||100,o.max_per_registration||100));const c=n.totalQuantity,f=fr(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}},qE=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 UE(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=fr(r.ticket_ids.map(a=>this.getPrecartItemQuantity(a)));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(a=>a.tickets.includes(r))),t&&(i=i.filter(a=>a.timeSlot===t)),n&&(i=i.filter(a=>a.timeSlot.startsWith(n))),i.flatMap(a=>a.tickets.map(s=>({timeslot:t,ticket:s,quota:a.quota,capacity:a.capacity,totalCapacity:a.totalCapacity})))},ticketCapacity(t,r,n=this.getPrecartItemQuantity(t)){const i=eu(this.filterBy({timeslot:r,ticketId:t}).map(a=>a.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(a=>a.timeSlot.startsWith(t.toString()));r&&(n=n.filter(a=>a.tickets.some(s=>r.includes(s))));const i=mw(n,a=>a.timeSlot);return Object.values(i).map(a=>vw(gw(a.flatMap(s=>s.tickets)).map(s=>eu(a.filter(o=>o.tickets.includes(s)),o=>o.capacity)).filter(s=>s!==null),s=>s.capacity)??a[0]).sort((a,s)=>a.timeSlot.localeCompare(s.timeSlot))}}}function BE(e){let t=0;wa(()=>{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 et(e){let t;try{t=new Intl.NumberFormat(k.locale??"de",{style:"currency",currency:k.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 gp(e){return e?.type==="Tour"}function yp(e,t){return{...e,type:"Tour",description:"",price_cents:e.totalPriceCents,tax_included:!0,vat_pct:0,instanceKey:t?.instanceKey??crypto.randomUUID(),wire:VE(e)}}function VE(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 jE(e){const{type:t,description:r,price_cents:n,tax_included:i,vat_pct:a,instanceKey:s,wire:o,...l}=e;return yp({...l,totalPriceCents:n},{instanceKey:s})}var ZE=0;function nt(e,t){const r={quantity:0,time:"",...t??{}};return Vr(e)&&(r.mantle={composition:r.mantle?.composition??Object.fromEntries(qa(e).map(n=>[n.id,n.max_persons])),key:r.mantle?.key??`mantle-${ZE++}`}),{...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}`),RE(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),gp(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 et(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 et(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return et(this.total_price_cents)}}}var AN=15*6e4;function uo(){return typeof window<"u"&&typeof localStorage<"u"}function WE(e,t){if(uo())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Mu(e){if(!uo())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 bp(e){if(uo())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}function _p(e){return{...e,description:"",tax_included:!0,type:"Coupon"}}var wp="go-cart",co=(e,t,r)=>localStorage.setItem(wp,JSON.stringify({items:e,coupons:t,donations:r,savedAt:Date.now()}));function HE(e){const t=e.product.type;switch(t){case"Ticket":return $u(e)?nt(Ua(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)?nt(Pu(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;case"Tour":return $u(e)?nt(jE(e.product),{time:e.time,quantity:e.quantity}):void 0;case"Coupon":return nt(_p(e.product),{quantity:e.quantity});default:throw new Error(`Unhandled case: ${t}`)}}function GE(e){let t=[],r=[],n=[],i;try{const a=localStorage.getItem(wp);if(!a)return[];const s=JSON.parse(a);if(Array.isArray(s))t=s,r=[],n=[];else if(typeof s=="object"&&s!==null)t=s.items||[],r=s.coupons||[],n=s.donations||[],i=s.savedAt;else throw console.dir({parsed:s,content:a}),new Error("go-cart has invalid format");return typeof i=="number"&&Date.now()-i>9e5?(e.clearItems(),e.clearCoupons(),e.clearDonations(),co([],[],[]),[]):(t.length===0?e.clearItems():e.items=t.map(HE).filter(QE),e.clearCoupons(),r.forEach(o=>e.addCoupon(typeof o=="string"?{code:o,kind:"actionToken"}:o)),e.clearDonations(),n.forEach(o=>{typeof o?.value=="number"&&typeof o?.campaign_id=="number"&&e.addDonation({value:o.value,campaign_id:o.campaign_id})}),e.items)}catch(a){return console.error(a),co([],[],[]),[]}}function KE(e){GE(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[],donations:e.donations||[]});co(e.items||[],e.coupons||[],e.donations||[]),wa(()=>{ve(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[],donations:e.donations||[]});r!==t&&(t=r,co(e.items||[],e.coupons||[],e.donations||[]))})})}var YE=e=>new Date<new Date(e),JE=e=>oo(e.slice(0,10)).compare(Pi(er()))>=0,$u=e=>e.time?e.product.subtype==="day"?JE(e.time):YE(e.time):!0,QE=e=>e!==void 0,XE=0;function ei(e,t=20){const r=Pe([]),n=Pe([]),i=Pe([]);let a=se(void 0);const s={items:r,coupons:n,donations:i,get paymentModeId(){return d(a)},set paymentModeId(o){F(a,o,!0)},uid:`cart-${XE++}`,get nonEmptyItems(){return this.items.filter(o=>o.quantity>0)},get totalPriceCents(){return Math.max(0,fr(this.items,o=>o.total_price_cents)+this.donationCents)},get donationCents(){return fr(this.donations,o=>o.value)},get totalQuantity(){return fr(this.items,o=>o.quantity)},get valueVoucherCents(){return fr(this.coupons.filter(o=>o.kind==="valueVoucher"),o=>o.valueCents??0)},get amountToPayCents(){const o=fr(this.items,l=>l.total_price_cents);return Math.max(0,o-this.valueVoucherCents)+this.donationCents},toString(){return this.uid+" > ["+this.items.map(o=>o.uuid+":"+o.quantity).join(", ")+"]"},orderData(){return{items:this.items.map(o=>({type:o.type,attributes:o.orderAttributes()})),shipping_address_id:null,comment:null,reference:null,payment_mode_id:this.paymentModeId??k.settings?.defaultPaymentModeId,coupons:this.coupons.map(o=>o.code),donations:this.donations.map(o=>({value:o.value,campaign_id:o.campaign_id})),affiliate:{},total:this.amountToPayCents}},get totalFormatted(){return et(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(o){for(let l=this.items.length-1;l>=0;l--)this.items[l].uuid===o.uuid&&this.items.splice(l,1);o?.voucher?.code&&!this.items.some(l=>l.voucher?.code===o.voucher.code)&&this.removeCoupon(o.voucher.code)},addItem(o){const l=this.items.find(c=>c.uuid===o.uuid);l?l.quantity+=o.quantity:this.items.push(o)},addItems(o){o.forEach(l=>this.addItem(l))},addCoupon(o){const l={...o,code:o.code.toUpperCase()};this.coupons.some(c=>c.code===l.code)||this.coupons.push(l)},removeCoupon(o){const l=o.toUpperCase(),c=this.coupons.findIndex(f=>f.code===l);if(c>-1){const[f]=this.coupons.splice(c,1);if(f.kind==="serviceVoucher")for(let u=this.items.length-1;u>=0;u--)this.items[u].voucher?.code===l&&this.items.splice(u,1)}},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()},hasDonation(o,l){return this.donations.some(c=>c.campaign_id===o&&c.value===l)},addDonation(o){this.hasDonation(o.campaign_id,o.value)||this.donations.push(o)},removeDonation(o,l){const c=this.donations.findIndex(f=>f.campaign_id===o&&f.value===l);c>-1&&this.donations.splice(c,1)},clearDonations(){for(;this.donations.length>0;)this.donations.pop()}};return e&&e.forEach(o=>s.addItem(nt(o))),s}function ex(){const e=Pe(ei());return KE(e),BE(e),e}var $i="go-capacity";function kp(e,t){const r=Mu($i);WE($i,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function Sp(e){const t=Mu($i);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){bp($i);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 tx(e){uo()&&window.addEventListener("storage",t=>{if(t.key===$i&&Sp(e),t.key==="go-cart"){const r=Mu("go-cart");(!r||!r.items||r.items.length===0)&&bp($i)}})}function Ep(){const e={allSeats:{},allQuotas:{},quotaManager:UE({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&kp(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&kp(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 a=t.product.subtype;switch(a){case"flat":case"scale":return"seats";default:throw new Error(`(getMaxAvailability) Unhandled case: ${a}`)}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),a={quotas:ME,mantle:$E,seats:zE,unlimited:qE}[i];if(!a)throw new Error(`(maxQuantity) impossible: ${i}`);return Re(()=>a(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"?NE(this,t,r,n):FE(r.product))}};return Sp(e),tx(e),e}function xp(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 Tp=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},rx=class extends Tp{constructor(){super()}get isLoggedIn(){try{const e=xp("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=xp("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}}},nx=class extends Tp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},ix=e=>{switch(e){case"angular":return new rx;case"jmb":return new nx;default:throw new Error("Unhandled shop type: "+e)}};function ax(e){return e==null||typeof e=="string"&&e.trim()===""}function sx(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||ax(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function ox(e,t){return sx(e,t)}var lx={withStackTrace:!1},Ap=(e,t,r=lx)=>({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(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?a(f.value):i(f.value).then(o,l)}c((n=n.apply(e,t||[])).next())})}function Cp(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 Op(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(h){return function(y){return Promise.resolve(y).then(h,u)}}function o(h,y){n[h]&&(i[h]=function(v){return new Promise(function(m,g){a.push([h,v,m,g])>1||l(h,v)})},y&&(i[h]=y(i[h])))}function l(h,y){try{c(n[h](y))}catch(v){p(a[0][3],v)}}function c(h){h.value instanceof jr?Promise.resolve(h.value.v).then(f,u):p(a[0][2],h)}function f(h){l("next",h)}function u(h){l("throw",h)}function p(h,y){h(y),a.shift(),a.length&&l(a[0][0],a[0][1])}}function ux(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,a){t[i]=e[i]?function(s){return(r=!r)?{value:jr(e[i](s)),done:!1}:a?a(s):s}:a}}function cx(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 Cp=="function"?Cp(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(s){return new Promise(function(o,l){s=e[a](s),i(o,l,s.done,s.value)})}}function i(a,s,o,l){Promise.resolve(l).then(function(c){a({value:c,done:o})},s)}}var ri=class _r{constructor(t){this._promise=t}static fromSafePromise(t){return new _r(t.then(r=>new Wr(r)))}static fromPromise(t,r){return new _r(t.then(n=>new Wr(n)).catch(n=>new Er(r(n))))}static fromThrowable(t,r){return(...n)=>new _r(ti(this,void 0,void 0,function*(){try{return new Wr(yield t(...n))}catch(i){return new Er(r?r(i):i)}}))}static combine(t){return dx(t)}static combineWithAllErrors(t){return fx(t)}map(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?new Er(r.error):new Wr(yield t(r.value))})))}andThrough(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Er(r.error);const n=yield t(r.value);return n.isErr()?new Er(n.error):new Wr(r.value)})))}andTee(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Er(r.error);try{yield t(r.value)}catch{}return new Wr(r.value)})))}orTee(t){return new _r(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 Er(r.error)})))}mapErr(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isOk()?new Wr(r.value):new Er(yield t(r.error))})))}andThen(t){return new _r(this._promise.then(r=>{if(r.isErr())return new Er(r.error);const n=t(r.value);return n instanceof _r?n._promise:n}))}orElse(t){return new _r(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 Op(this,arguments,function*(){return yield jr(yield jr(yield*ux(cx(yield jr(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return Op(this,arguments,function*(){const r=yield jr(this._promise);return r.isErr()&&(yield yield jr(fo(r.error))),yield jr(r.value)})}};function fo(e){return new ri(Promise.resolve(new Er(e)))}var CN=ri.fromPromise,ON=ri.fromSafePromise,DN=ri.fromThrowable,Dp=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},dx=e=>ri.fromSafePromise(Promise.all(e)).andThen(Dp),Ip=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},fx=e=>ri.fromSafePromise(Promise.all(e)).andThen(Ip),Fu;(function(e){function t(i,a){return(...s)=>{try{return $n(i(...s))}catch(o){return Zr(a?a(o):o)}}}e.fromThrowable=t;function r(i){return Dp(i)}e.combine=r;function n(i){return Ip(i)}e.combineWithAllErrors=n})(Fu||(Fu={}));function $n(e){return new Wr(e)}function Zr(e){return new Er(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 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 Ap("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},Er=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 fo(this.error)}asyncAndThrough(e){return fo(this.error)}asyncMap(e){return fo(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 Ap("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},IN=Fu.fromThrowable,hx=/\{[^{}]+\}/g,px=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function mx(){return Math.random().toString(36).slice(2,11)}function vx(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:a,pathSerializer:s,headers:o,requestInitExt:l=void 0,...c}={...e};l=px()?l:void 0,t=Np(t);const f=[];async function u(p,h){const{baseUrl:y,fetch:v=n,Request:m=r,headers:g,params:E={},parseAs:S="json",querySerializer:T,bodySerializer:A=a??yx,pathSerializer:I,body:M,middleware:N=[],...j}=h||{};let R=t;y&&(R=Np(y)??t);let X=typeof i=="function"?i:$p(i);T&&(X=typeof T=="function"?T:$p({...typeof i=="object"?i:{},...T}));const U=I||s||gx,le=M===void 0?void 0:A(M,Fp(o,g,E.header)),he=Fp(le===void 0||le instanceof FormData?{}:{"Content-Type":"application/json"},o,g,E.header),H=[...f,...N],oe={redirect:"follow",...c,...j,body:le,headers:he};let W,fe,ce=new m(bx(p,{baseUrl:R,params:E,querySerializer:X,pathSerializer:U}),oe),de;for(const $ in j)$ in ce||(ce[$]=j[$]);if(H.length){W=mx(),fe=Object.freeze({baseUrl:R,fetch:v,parseAs:S,querySerializer:X,bodySerializer:A,pathSerializer:U});for(const $ of H)if($&&typeof $=="object"&&typeof $.onRequest=="function"){const ae=await $.onRequest({request:ce,schemaPath:p,params:E,options:fe,id:W});if(ae)if(ae instanceof m)ce=ae;else if(ae instanceof Response){de=ae;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($){let ae=$;if(H.length)for(let L=H.length-1;L>=0;L--){const be=H[L];if(be&&typeof be=="object"&&typeof be.onError=="function"){const G=await be.onError({request:ce,error:ae,schemaPath:p,params:E,options:fe,id:W});if(G){if(G instanceof Response){ae=void 0,de=G;break}if(G instanceof Error){ae=G;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(ae)throw ae}if(H.length)for(let $=H.length-1;$>=0;$--){const ae=H[$];if(ae&&typeof ae=="object"&&typeof ae.onResponse=="function"){const L=await ae.onResponse({request:ce,response:de,schemaPath:p,params:E,options:fe,id:W});if(L){if(!(L instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");de=L}}}}const J=de.headers.get("Content-Length");if(de.status===204||ce.method==="HEAD"||J==="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(S==="stream")return de.body;if(S==="json"&&!J){const ae=await de.text();return ae?JSON.parse(ae):void 0}return await de[S]()})(),response:de};let ee=await de.text();try{ee=JSON.parse(ee)}catch{}return{error:ee,response:de}}return{request(p,h,y){return u(h,{...y,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 y=f.indexOf(h);y!==-1&&f.splice(y,1)}}}}function ho(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 Pp(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 s=n.join(",");switch(r.style){case"form":return`${e}=${s}`;case"label":return`.${s}`;case"matrix":return`;${e}=${s}`;default:return s}}for(const s in t){const o=r.style==="deepObject"?`${e}[${s}]`:s;n.push(ho(o,t[s],r))}const a=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${a}`:a}function Mp(e,t,r){if(!Array.isArray(t))return"";if(r.explode===!1){const a={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",s=(r.allowReserved===!0?t:t.map(o=>encodeURIComponent(o))).join(a);switch(r.style){case"simple":return s;case"label":return`.${s}`;case"matrix":return`;${e}=${s}`;default:return`${e}=${s}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const a of t)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?a:encodeURIComponent(a)):i.push(ho(e,a,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function $p(e){return function(r){const n=[];if(r&&typeof r=="object")for(const i in r){const a=r[i];if(a!=null){if(Array.isArray(a)){if(a.length===0)continue;n.push(Mp(i,a,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof a=="object"){n.push(Pp(i,a,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(ho(i,a,e))}}return n.join("&")}}function gx(e,t){let r=e;for(const n of e.match(hx)??[]){let i=n.substring(1,n.length-1),a=!1,s="simple";if(i.endsWith("*")&&(a=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(s="label",i=i.substring(1)):i.startsWith(";")&&(s="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,Mp(i,o,{style:s,explode:a}));continue}if(typeof o=="object"){r=r.replace(n,Pp(i,o,{style:s,explode:a}));continue}if(s==="matrix"){r=r.replace(n,`;${ho(i,o)}`);continue}r=r.replace(n,s==="label"?`.${encodeURIComponent(o)}`:encodeURIComponent(o))}return r}function yx(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 bx(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 Fp(...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,a]of n)if(a===null)t.delete(i);else if(Array.isArray(a))for(const s of a)t.append(i,s);else a!==void 0&&t.set(i,a)}return t}function Np(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function _x(e,t){return vx({baseUrl:e,headers:{"X-Shop-Url":t}})}var wx="/api/v4/calendar",kx="/api/v4/tickets/calendar",Sx="/api/v4/auth/validate_token",Ex="/api/v4/tickets/list_and_quotas",xx="/api/v4/tickets",Tx="/api/v4/auth/sign_in",Ax="/api/v4/auth",Cx="/api/v4/orders/withdrawals",Ox="/api/v4/customer/memberships/activate",Dx="/api/v4/orders",Ix="/api/v4/customer/customer_addresses",Px="/api/v4/customer/memberships",Rp={SHOP_GUEST:10,SHOP:20},po={error:{success:!1,errors:["Not signed in"]}},Lp=iw,Mx=class{type;#e=se(Pe({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=sw(this.type),d(this.#e).currentUser=ix(this.type),d(this.#e).apiUrl=e,d(this.#e).shopDomain=t,d(this.#e).locale=r||"de",tw(d(this.#e).locale),this.#t={},d(this.#e).client=_x(e,t),d(this.#e).capacityManager=Ep(),d(this.#e).cart=ex(),d(this.#e).auth=new jf,d(this.#e).client.use(new bw(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return d(this.#e).capacityManager||(d(this.#e).capacityManager=Ep()),d(this.#e).capacityManager}get cart(){return d(this.#e).cart}get auth(){return d(this.#e).auth||(d(this.#e).auth=new jf),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{...Lp[(this.locale??"en").toLowerCase().split(/[-_]/)[0]]??Lp.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 mp(e,this.locale)}formatDate(e,t){return IE(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(Sx,"getCustomer","",{cache:5}):po}getOrders(e={}){return this.auth.data.accessToken?this.fetchAndCache(Dx,`orders-${JSON.stringify(e)}`,"",{cache:5,query:e}):po}getCustomerAddresses(){return this.auth.data.accessToken?this.fetchAndCache(Ix,"customerAddresses","",{cache:5}):po}getCustomerMemberships(){return this.auth.data.accessToken?this.fetchAndCache(Px,"customerMemberships","",{cache:5}):po}ticketsCalendar(e){return this.fetchAndCache(kx,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(wx,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(Ex,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:jt({per_page:100},e??{})})}tickets(e){return this.fetchAndCache(xx,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:jt({per_page:100},e??{})})}ticketsContent(e){return this.fetchAndCache("/api/v4/tickets/content",`ticketsContent-${JSON.stringify(e)}`,"data",{cache:300,query:jt({"ticket_ids[]":e},{per_page:100})})}signIn(e){return this.apiPost(Tx,{body:e,requiredFields:["email","password"]})}signUp(e,t=!1){e=jt({addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:t?Rp.SHOP_GUEST:Rp.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(Ax,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(Cx,{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:jt({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(Ox,{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}}})}#n(e,t,r={}){return e+JSON.stringify(t)+JSON.stringify(r)}fetchAndCache(e,t,r,n){if(n??={},n.query??={},n.cache??=1e3,n.path??={},!this.#a())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),d(this.#e)[t];const i=n.query,a=this.#n(e,i,n.path),s=!this.#t[a],o=this.#t[a]?.fetchedAt<Date.now()-n.cache*1e3;return(s||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#i(){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:jt(this.#i,{params:n}).params,bodySerializer:i=>i})}async apiCall(e,t){this.#s();const{body:r,params:n={},requiredFields:i,parseAs:a}=t,s=ox(r,i);if(Object.keys(s).length>0)return{error:{errors:s}};const o=this.client[t.method];return await o(e,{body:r,params:jt(this.#i,{params:n}).params,parseAs:a})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(t=>t.status==="fetching").length;)await uw(10)}async apiGet(e,t={},r){this.#s();const n=this.#n(e,t,r);this.#t[n]={status:"fetching",fetchedAt:Date.now()};let i=this.#i;t&&(i=jt(i,{params:{query:t}})),e&&(i=jt(i,{params:{path:r}}));const a=await this.client.GET(e,i);return this.#t[n]={status:"completed",fetchedAt:Date.now()},a.data||a}#a=()=>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.#a())throw new Error("Fetch is not possible.")}},k=new Mx;function Fi(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 $x=class _y{host;KEY;pollDuration;#e=se(Pe({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 _y(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 Ni(e){return function(t,r={pollDuration:1e3}){if(t){const n=new $x(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 Fx={urls:{},navigateTo:e=>{window.location.assign(e)},forms:{},fields:{},quantityStepper:!0,quantityStepperAtMinimum:"remove"},Nx=class{defaultConfig=jt(Fx,window.customOptions);override=this.defaultConfig;#e=se(Pe(this.defaultConfig));get options(){return d(this.#e)}set options(e){F(this.#e,e,!0)}constructor(){this.update()}update(){const e=jt(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=jt(this.override,e),this.update(),this}default(e){return this.defaultConfig=jt(this.defaultConfig,e),this.update(),this}},Ge=new Nx,zp=class{#e=se();get token(){return d(this.#e)}set token(e){F(this.#e,e,!0)}#t=se();get ticketSaleId(){return d(this.#t)}set ticketSaleId(e){F(this.#t,e,!0)}get order(){if(this.token)return pl(k.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return pl(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return Ge.config.urls.annualTicketPersonalizationForm?Ge.config.urls.annualTicketPersonalizationForm(this.token,e.id):k.urls.annualTicketPersonalizationForm(this.token,e.id)}},qp="go-annual-ticket-personalization",Up=Fi(qp),Rx=Ni(qp),Lx=q("<li><a> </a></li>"),zx=q('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function qx(e,t){te(t,!0);let r=_(t,"token",7);const n=new zp;Up(t.$$host,n),ve(()=>{n.token=r()});let i=P(()=>n.order);var a={details:n,get token(){return r()},set token(c){r(c),b()}},s=ie(),o=B(s),l=c=>{var f=ie(),u=B(f);Me(u,17,()=>d(i).ticket_sales,p=>p.id,(p,h)=>{var y=zx(),v=D(y),m=D(v,!0);C(v);var g=V(v,2),E=D(g,!0);C(g);var S=V(g,2),T=A=>{var I=Lx(),M=D(I),N=D(M,!0);C(M),C(I),Y((j,R)=>{pe(M,"href",j),Z(N,R)},[()=>n.goToPersonalization(d(h)),()=>k.t("ticket.annual.personalization.list.personalize.add")]),x(A,I)};ue(S,A=>{d(h).status=="not_ready_to_send"&&A(T)}),C(y),Y(A=>{pe(y,"data-ticket-sale-id",d(h).id),Z(m,d(h).title),Z(E,A)},[()=>k.t("ticket.annual.personalization.detail.title",{count:d(h).personalizations.length})]),x(p,y)}),x(c,f)};return ue(o,c=>{d(i)&&c(l)}),x(e,s),re(a)}customElements.define("go-annual-ticket-personalization",ne(qx,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));var Ux={salutation:{key:"salutation",apiKey:"customer_salutation_id",type:"select",label:"user.registration.form.customer_salutation_id",placeholder:"",description:"",autocomplete:"honorific-prefix",options:()=>k.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:Xt().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:Xt().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:Xt().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:()=>k.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:()=>(k.locales??[]).map(e=>({label:k.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:Xt().date()},dateOfBirth:{key:"dateOfBirth",apiKey:"date_of_birth",type:"date",label:"user.registration.form.dateOfBirth",placeholder:"",description:"",autocomplete:"bday",validator:Xt().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:G1(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:()=>(k.payment_modes?Object.values(k.payment_modes):[]).map(e=>({value:String(e.id),label:e.name}))}};function Bx(e,t){return{...e,errors:e.errors||[],value:e.value??Vx(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){jx(this)}}}function Vx(e){return e==="checkbox"?!1:e==="file"?null:""}function jx(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 nl{static#e={};static defineForm(t){Ge.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){Ge.default({fields:t})}static{nl.defineFields(Ux)}static setRequiredApiKeys(t,r){nl.#e[t]=r}static getFormOptions(t){return Ge.config.forms[t]}static createField(t,r){const n=nl.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return Bx(n,r)}static getFormFields(t){return Zx(t)}static getFieldInit(t){return Ge.config.fields[t]}};function Zx(e){const t=Ge.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 Wx(e,t){te(t,!0);let r=_(t,"token",7),n=_(t,"ticketSaleId",7),i=null;const a=new zp;Up(t.$$host,a),ve(()=>{a.token=r(),a.ticketSaleId=n()}),Pt.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function s(){if(!i)return;const v=a.ticketSale.personalizations.length,m=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),g=Vf(v,(I,M)=>{const N=m[M-1].details;return I.push(N),I},[]);if(g.forEach(I=>{I.fields.forEach(M=>{I.validateField(M)})}),!Vf(v,(I,M)=>g[M-1].isValid,!1))return;if(a.ticketSale?.photo_mandatory==="mandatory"){const I=g.map(async(N,j)=>{const R=a.ticketSale.personalizations[j].id,X=N.fields.find(le=>le.key==="photo")?.value;if(!(X instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const U=await k.uploadPersonalizationPhoto(r(),R,X);return U.error?{ok:!1,error:U.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),M=(await Promise.all(I)).find(N=>!N.ok);if(M){i.details.apiErrors=[M.error];return}}const E={personalization:{ticket_sale_id:a.ticketSaleId,start_at:i.details.formData.start_at,personalizations:g.map((I,M)=>{const N=yw(I.formData,["email_confirmation"]);return{id:a.ticketSale?.personalizations[M].id,customer:N}})}},S=await k.finalizePersonalizations(r(),E);if(S.error){i.details.apiErrors=S.error.error?[S.error.error]:[];return}const T=Ge.config.forms.personalization?.beforeSubmit;T&&T(E);const A=Ge.config.urls.annualTicketPersonalizationFormSubmit?.(r());A&&Ge.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 g=Math.max(v,1),E=Array.from(m.querySelectorAll("go-personalization-form"));for(;E.length<g;){const T=l.cloneNode(!0);u(T),m.insertBefore(T,c),E.push(T)}for(;E.length>g;){const T=E.pop();T&&T!==o&&T.remove()}const S=a.ticketSale?.personalizations??[];E.forEach((T,A)=>{const I=S[A];I&&(T.dataset.personalizationId=String(I.id))}),f=g}En(()=>{p(),t.$$host.addEventListener("go-submit",s),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),ve(()=>{if(!a.ticketSale)return;const v=a.ticketSale?.personalizations.length??1;v!==f&&h(v)});var y={details:a,get token(){return r()},set token(v){r(v),b()},get ticketSaleId(){return n()},set ticketSaleId(v){n(v),b()}};return re(y)}customElements.define("go-annual-ticket-personalization-form",ne(Wx,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var Hx=class{formId;form;#e=se(Pe([]));#t=P(()=>Nu(this.fields)==0);get isValid(){return d(this.#t)}set isValid(e){F(this.#t,e)}#r=se();get successMessage(){return d(this.#r)}set successMessage(e){F(this.#r,e,!0)}get formData(){const e=["select","radio","number","paymentMode"];function t(n){const i=n.value;return hw(i)||cw(i)?i:i==="true"||i==="false"?i==="true":e.includes(n.type)&&!Number.isNaN(+i)&&i.trim()!==""?+i:i}const r=this.fields.filter(n=>n!==void 0).filter(n=>n.type!=="file").filter(n=>n.value!=="");return Object.fromEntries(r.map(n=>[n.apiKey,t(n)]))}fieldValue(e){return this.fields.find(t=>t.key===e)?.value}get apiErrors(){return d(this.#e)}set apiErrors(e){if(F(this.#e,[],!0),this.fields.forEach(t=>t.apiErrors=[]),Xl(e)){F(this.#e,e,!0);return}if(e.errors&&Xl(e.errors)&&F(this.#e,e.errors,!0),fw(e.error)){F(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(a=>a.apiKey===r);if(!i){console.warn(`(FormDetails.fill) Field with API key ${r} not found.`);return}if(i.type==="select"&&!i.options?.().find(a=>a.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}},Bp="go-form-details",Gx=Fi(Bp),Ri=Ni(Bp);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(([s,o])=>{typeof o=="boolean"?o&&i.setAttribute(s,""):i.setAttribute(s,o)});const a=document.createDocumentFragment();for(;e.firstChild;)a.appendChild(e.firstChild);return i.appendChild(a),e.replaceChildren(i),i}var Kx=q("<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 Yx(e,t){te(t,!0);let r=_(t,"formId",7),n=_(t,"custom",7);const i=new Hx(r(),t.$$host);Gx(t.$$host,i);async function a(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",a),i.form=f});var s={details:i,get formId(){return r()},set formId(f){r(f),b()},get custom(){return n()},set custom(f){n(f),b()}},o=ie(),l=B(o),c=f=>{var u=Kx(),p=B(u),h=V(p,2),y=V(h,2),v=D(y,!0);C(y),Y(m=>Z(v,m),[()=>k.t(Pt.getFormOptions(r())?.submitLabel||"Submit")]),x(f,u)};return ue(l,f=>{n()||f(c)}),x(e,o),re(s)}customElements.define("go-form",ne(Yx,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var Jx=q("<go-form></go-form>",2);function Qx(e,t){te(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 k.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 a={get custom(){return r()},set custom(o=!1){r(o),b()},get redirectUrl(){return n()},set redirectUrl(o=""){n(o),b()}},s=Jx();return Tn(s,"formId","passwordReset"),Y(()=>Tn(s,"custom",r())),Ta("submit",s,i),x(e,s),re(a)}customElements.define("go-password-reset",ne(Qx,{redirectUrl:{attribute:"redirect-url",type:"String"},custom:{}},[],[]));var Xx=q("<go-form></go-form>",2);function eT(e,t){te(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 a(l){const c=l.target.details,f=await k.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 s={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=Xx();return Tn(o,"formId","setPassword"),Ta("submit",o,a),x(e,o),re(s)}customElements.define("go-set-password",ne(eT,{accessToken:{attribute:"access-token",type:"String"},client:{attribute:"client",type:"String"},uid:{attribute:"uid",type:"String"}},[],[]));function tT(e,t){te(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 a=i.target.details,s=await k.signIn(a.formData);s.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=s.error.errors}return Hr(t.$$host,"go-form",{"form-id":"signIn",custom:r()}),t.$$host.addEventListener("submit",n),re({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-sign-in",ne(tT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function rT(e,t){te(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 a=i.target.details,s=await k.signUp(a.formData,!1);s.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=s.error.errors}return Hr(t.$$host,"go-form",{"form-id":"signUp",custom:r()}),t.$$host.addEventListener("submit",n),re({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-sign-up",ne(rT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function nT(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 iT(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function aT(e){return nT(iT(e),0)}function sT(e,t){const r=ei(),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)})),e.donations.forEach(i=>r.addDonation(i)),t.forEach(i=>{const a=i.attributes,s=a.uuid,o=e.items.find(l=>l.uuid===s);if(!o){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:a});return}r.addItem(oT(o,a))}),r}function oT(e,t){const r=gp(e.product)?1:aT(t),n=e.price_cents,i=e.product.price_cents===0?0:t.price_cents??n,a=i<n,s={...e.product,price_cents:i};return"dynamic_prices"in s&&(s.dynamic_prices=null),nt(s,{quantity:r,time:e.time,voucher:e.voucher,mantle:e.mantle,display:{discounted:a,reference_uuid:e.uuid,originalPrice:n}})}var lT=class{#e=se();get displayCart(){return d(this.#e)}set displayCart(e){F(this.#e,e,!0)}#t=se(!1);get preview(){return d(this.#t)}set preview(e){F(this.#t,e,!0)}get totalPriceCents(){return this.displayCart?.amountToPayCents??0}get subtotalPriceCents(){return k.cart?.totalPriceCents??0}get discountedAmountCents(){return Math.max(0,this.subtotalPriceCents-this.totalPriceCents)}get isDiscounted(){return this.discountedAmountCents>0}async calculateDisplayCart(){const e=k.cart;if(e)try{const{items:t,coupons:r}=e.orderData(),n=await k.createCart({items:t,coupons:r});if(n?.data){this.displayCart=sT(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}}},Vp="go-cart-details",uT=Fi(Vp),Li=Ni(Vp),cT=q('<span class="go-cart-item-title" data-testid="cart-item-title"> </span>');function jp(e,t){te(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(s){r(s),b()}},i=cT(),a=D(i,!0);return C(i),Y(()=>Z(a,r().product.title)),x(e,i),re(n)}ne(jp,{cartItem:{}},[],[],{mode:"open"});var dT=q('<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),fT=q('<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 Zp(e,t){te(t,!0);let r=_(t,"cartItem",7);if(!ja(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()}},a=fT(),s=B(a),o=D(s),l=D(o,!0);C(o);var c=V(o),f=D(c,!0);C(c),C(s);var u=V(s),p=h=>{var y=dT(),v=B(y),m=D(v,!0);C(v);var g=V(v),E=D(g,!0);C(g),Y((S,T)=>{Z(m,S),Z(E,T)},[()=>k.formatDate(r().time,"dayMonth"),()=>k.formatTime(r().time)]),x(h,y)};return ue(u,h=>{r().time&&h(p)}),Y(()=>{Z(l,n.event_title),Z(f,n.title)}),x(e,a),re(i)}ne(Zp,{cartItem:{}},[],[],{mode:"open"});var hT=q('<span class="go-cart-item-subtitle" data-testid="cart-item-subtitle"> </span>'),pT=q('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),mT=q('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),vT=q('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!> <!>',1);function Wp(e,t){te(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(p){r(p),b()}},i=vT(),a=B(i),s=D(a,!0);C(a);var o=V(a,2),l=p=>{var h=hT(),y=D(h,!0);C(h),Y(()=>Z(y,r().product.sub_title)),x(p,h)},c=P(()=>lo(r().product)&&r().product.sub_title);ue(o,p=>{d(c)&&p(l)});var f=V(o,2),u=p=>{var h=mT(),y=B(h),v=D(y,!0);C(y);var m=V(y,2),g=E=>{var S=pT(),T=D(S,!0);C(S),Y(A=>Z(T,A),[()=>k.formatTime(r().time)]),x(E,S)};ue(m,E=>{r().product.type==="Ticket"&&r().product.subtype==="timeslot"&&E(g)}),Y(E=>Z(v,E),[()=>k.formatDate(r().time,"dayMonth")]),x(p,h)};return ue(f,p=>{r().time&&p(u)}),Y(()=>Z(s,r().product.title)),x(e,i),re(n)}ne(Wp,{cartItem:{}},[],[],{mode:"open"});var gT=q('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),yT=q('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),bT=q('<span class="go-cart-item-custom" data-testid="cart-item-custom"> </span>'),_T=q('<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 Hp(e,t){te(t,!0);let r=_(t,"cartItem",7);const n=P(()=>r().product),i=P(()=>{if(!r().time)return null;try{return{date:k.formatDate(r().time,"short"),time:k.formatTime(r().time)}}catch{return{date:r().time,time:""}}}),a=m=>m==null?"":typeof m=="object"?JSON.stringify(m):String(m),s=P(()=>Object.entries(d(n).customs??{}).filter(([,m])=>m!=null&&m!==""));var o={get cartItem(){return r()},set cartItem(m){r(m),b()}},l=_T(),c=B(l),f=D(c,!0);C(c);var u=V(c,2),p=D(u,!0);C(u);var h=V(u,2),y=m=>{var g=yT(),E=B(g),S=D(E,!0);C(E);var T=V(E,2),A=I=>{var M=gT(),N=D(M,!0);C(M),Y(()=>Z(N,d(i).time)),x(I,M)};ue(T,I=>{d(i).time&&I(A)}),Y(()=>Z(S,d(i).date)),x(m,g)};ue(h,m=>{d(i)&&m(y)});var v=V(h,2);return Me(v,17,()=>d(s),([m,g])=>m,(m,g)=>{var E=P(()=>nb(d(g),2));let S=()=>d(E)[0],T=()=>d(E)[1];var A=bT(),I=D(A);C(A),Y(M=>Z(I,`${S()??""}: ${M??""}`),[()=>a(T())]),x(m,A)}),Y(m=>{Z(f,d(n).title),Z(p,m)},[()=>k.t("cart.item.participants",{count:d(n).participants})]),x(e,l),re(o)}ne(Hp,{cartItem:{}},[],[],{mode:"open"});function Gp(e,{min:t,max:r}){const n=e<t?Math.max(t,1):e+1;return n>r?e:n}function wT(e,{min:t,floor:r=0}){return e<=t?r:e-1}function kT(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 ST(e,{min:t,max:r,floor:n=0}){return e<0||e>r?!1:e===n||e>=t}function Kp(e,t){return Gp(e,t)>e}function Yp(e,{floor:t=0}){return e>t}var ET=q('<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 Jp(e,t){const r=vt();te(t,!0);let n=_(t,"value",7),i=_(t,"min",7),a=_(t,"max",7),s=_(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 y=P(()=>f()!=null),v=P(()=>Math.max(i(),1)),m=P(()=>d(y)?{min:d(v),max:a(),floor:d(v)}:{min:i(),max:a(),floor:s()}),g=P(()=>d(y)&&n()<=d(v));let E,S=se(!1);const T=P(()=>!d(g)&&!Yp(n(),d(m))),A=P(()=>!Kp(n(),d(m)));function I(J){J!==n()&&h()(J)}function M(){d(g)?f()():N()}function N(){Yp(n(),d(m))&&I(wT(n(),d(m)))}function j(){Kp(n(),d(m))&&I(Gp(n(),d(m)))}function R(){const J=parseInt(E.value,10);if(d(y)&&(!Number.isFinite(J)||J<=0)){F(S,!1),E.value=String(n()),f()();return}const ee=kT(J,d(m));F(S,!1),E.value=String(ee),I(ee)}function X(){const J=E.value.trim();F(S,!(/^\d+$/.test(J)&&ST(parseInt(J,10),d(m))))}function U(J){switch(J.key){case"ArrowUp":J.preventDefault(),j();break;case"ArrowDown":J.preventDefault(),N();break;case"Home":J.preventDefault(),I(d(m).floor);break;case"End":J.preventDefault(),I(a());break;case"Enter":J.preventDefault(),R();break}}var le={get value(){return n()},set value(J){n(J),b()},get min(){return i()},set min(J){i(J),b()},get max(){return a()},set max(J){a(J),b()},get floor(){return s()},set floor(J=0){s(J),b()},get label(){return o()},set label(J){o(J),b()},get decreaseLabel(){return l()},set decreaseLabel(J){l(J),b()},get increaseLabel(){return c()},set increaseLabel(J){c(J),b()},get onDecrementBelowMin(){return f()},set onDecrementBelowMin(J){f(J),b()},get removeAriaLabel(){return u()},set removeAriaLabel(J){u(J),b()},get removeLabel(){return p()},set removeLabel(J="✕"){p(J),b()},get onChange(){return h()},set onChange(J){h(J),b()}},he=ET(),H=D(he);let oe;var W=D(H),fe=D(W,!0);C(W),C(H);var ce=V(H,2);Ai(ce),Us(ce,J=>E=J,()=>E);var de=V(ce,2);return C(he),Y(()=>{pe(he,"aria-label",o()),oe=Et(H,1,"go-quantity-stepper-button go-quantity-stepper-decrement",null,oe,{"go-quantity-stepper-remove":d(g)}),pe(H,"title",d(g)?u():l()),pe(H,"aria-controls",r),pe(H,"aria-disabled",d(T)),Z(fe,d(g)?p():"−"),pe(ce,"id",r),pe(ce,"aria-label",o()),Bl(ce,n()),pe(ce,"aria-valuenow",n()),pe(ce,"aria-valuemin",d(m).floor),pe(ce,"aria-valuemax",a()),pe(ce,"aria-invalid",d(S)?"true":void 0),pe(de,"title",c()),pe(de,"aria-controls",r),pe(de,"aria-disabled",d(A))}),ut("click",H,M),ut("input",ce,X),ut("change",ce,R),Ta("blur",ce,R),ut("keydown",ce,U),ut("click",de,j),x(e,he),re(le)}Bt(["click","input","change","keydown"]),ne(Jp,{value:{},min:{},max:{},floor:{},label:{},decreaseLabel:{},increaseLabel:{},onDecrementBelowMin:{},removeAriaLabel:{},removeLabel:{},onChange:{}},[],[],{mode:"open"});function xT(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[mo(n)];if(t<e)return e>n?[mo(e)]:[];const i=Math.max(e,n),a=[mo(n)];for(let s=i;s<=t;s++)s!==n&&a.push(mo(s));return a}function mo(e){return{value:e,label:e.toString()}}var TT=q("<option> </option>"),AT=q('<select class="go-quantity-select"></select>');function vo(e,t){te(t,!0);let r=_(t,"value",7),n=_(t,"min",7),i=_(t,"max",7),a=_(t,"label",7),s=_(t,"floor",7,0),o=_(t,"deselectable",7,!0),l=_(t,"onDecrementBelowMin",7),c=_(t,"onChange",7);const f=P(()=>Ge.config.quantityStepper),u=P(()=>l()!=null&&Ge.config.quantityStepperAtMinimum==="disable");var p={get value(){return r()},set value(g){r(g),b()},get min(){return n()},set min(g){n(g),b()},get max(){return i()},set max(g){i(g),b()},get label(){return a()},set label(g){a(g),b()},get floor(){return s()},set floor(g=0){s(g),b()},get deselectable(){return o()},set deselectable(g=!0){o(g),b()},get onDecrementBelowMin(){return l()},set onDecrementBelowMin(g){l(g),b()},get onChange(){return c()},set onChange(g){c(g),b()}},h=ie(),y=B(h),v=g=>{{let E=P(()=>d(u)?Math.max(n(),1):o()?0:n()),S=P(()=>k.t("quantity.decrease")),T=P(()=>k.t("quantity.increase")),A=P(()=>d(u)?void 0:l()),I=P(()=>k.t("quantity.remove")),M=P(()=>k.t("quantity.remove.label"));Jp(g,{get value(){return r()},get min(){return n()},get max(){return i()},get floor(){return d(E)},get label(){return a()},get decreaseLabel(){return d(S)},get increaseLabel(){return d(T)},get onDecrementBelowMin(){return d(A)},get removeAriaLabel(){return d(I)},get removeLabel(){return d(M)},get onChange(){return c()}})}},m=g=>{var E=AT();Me(E,21,()=>xT(n(),i(),{floor:o()?s():n()}),S=>S.value,(S,T)=>{var A=TT(),I=D(A,!0);C(A);var M={};Y(()=>{Mf(A,r()===d(T).value),Z(I,d(T).label),M!==(M=d(T).value)&&(A.value=(A.__value=d(T).value)??"")}),x(S,A)}),C(E),Y(()=>pe(E,"aria-label",a())),ut("change",E,S=>c()(parseInt(S.target.value,10))),x(g,E)};return ue(y,g=>{d(f)?g(v):g(m,-1)}),x(e,h),re(p)}Bt(["change"]),ne(vo,{value:{},min:{},max:{},label:{},floor:{},deselectable:{},onDecrementBelowMin:{},onChange:{}},[],[],{mode:"open"});function Qp(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 CT(e){if(Array.isArray(e))return e}function OT(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.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&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function DT(){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 IT(e,t){return CT(e)||OT(e,t)||PT(e,t)||DT()}function PT(e,t){if(e){if(typeof e=="string")return Qp(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)?Qp(e,t):void 0}}var Xp=Object.entries,em=Object.setPrototypeOf,MT=Object.isFrozen,$T=Object.getPrototypeOf,FT=Object.getOwnPropertyDescriptor,Mt=Object.freeze,mr=Object.seal,zi=Object.create,tm=typeof Reflect<"u"&&Reflect,Ru=tm.apply,Lu=tm.construct;Mt||(Mt=function(t){return t}),mr||(mr=function(t){return t}),Ru||(Ru=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];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 qi=pt(Array.prototype.forEach),NT=pt(Array.prototype.lastIndexOf),rm=pt(Array.prototype.pop),Ui=pt(Array.prototype.push),RT=pt(Array.prototype.splice),$t=Array.isArray,Za=pt(String.prototype.toLowerCase),zu=pt(String.prototype.toString),nm=pt(String.prototype.match),Bi=pt(String.prototype.replace),im=pt(String.prototype.indexOf),LT=pt(String.prototype.trim),zT=pt(Number.prototype.toString),qT=pt(Boolean.prototype.toString),am=typeof BigInt>"u"?null:pt(BigInt.prototype.toString),sm=typeof Symbol>"u"?null:pt(Symbol.prototype.toString),it=pt(Object.prototype.hasOwnProperty),Wa=pt(Object.prototype.toString),Tt=pt(RegExp.prototype.test),Ha=UT(TypeError);function pt(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 UT(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]:Za;if(em&&em(e,null),!$t(t))return e;let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const a=r(i);a!==i&&(MT(t)||(t[n]=a),i=a)}e[i]=!0}return e}function BT(e){for(let t=0;t<e.length;t++)it(e,t)||(e[t]=null);return e}function Ct(e){const t=zi(null);for(const n of Xp(e)){var r=IT(n,2);const i=r[0],a=r[1];it(e,i)&&($t(a)?t[i]=BT(a):a&&typeof a=="object"&&a.constructor===Object?t[i]=Ct(a):t[i]=a)}return t}function VT(e){switch(typeof e){case"string":return e;case"number":return zT(e);case"boolean":return qT(e);case"bigint":return am?am(e):"0";case"symbol":return sm?sm(e):"Symbol()";case"undefined":return Wa(e);case"function":case"object":{if(e===null)return Wa(e);const t=e,r=Gr(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:Wa(n)}return Wa(e)}default:return Wa(e)}}function Gr(e,t){for(;e!==null;){const n=FT(e,t);if(n){if(n.get)return pt(n.get);if(typeof n.value=="function")return pt(n.value)}e=$T(e)}function r(){return null}return r}function jT(e){try{return Tt(e,""),!0}catch{return!1}}var om=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"]),ZT=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"]),WT=Mt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),lm=Mt(["#text"]),um=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"]),cm=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"]),go=Mt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),HT=mr(/{{[\w\W]*|^[\w\W]*}}/g),GT=mr(/<%[\w\W]*|^[\w\W]*%>/g),KT=mr(/\${[\w\W]*/g),YT=mr(/^data-[\-\w.\u00B7-\uFFFF]+$/),JT=mr(/^aria-[\-\w]+$/),dm=mr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),QT=mr(/^(?:\w+script|data):/i),XT=mr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),eA=mr(/^html$/i),tA=mr(/^[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},rA=function(){return typeof window>"u"?null:window},nA=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 a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},fm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function hm(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rA();const t=ge=>hm(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 a=e.HTMLTemplateElement,s=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"),y=Gr(u,"nextSibling"),v=Gr(u,"childNodes"),m=Gr(u,"parentNode"),g=Gr(u,"shadowRoot"),E=Gr(u,"attributes"),S=s&&s.prototype?Gr(s.prototype,"nodeType"):null,T=s&&s.prototype?Gr(s.prototype,"nodeName"):null;if(typeof a=="function"){const ge=r.createElement("template");ge.content&&ge.content.ownerDocument&&(r=ge.content.ownerDocument)}let A,I="";const M=r,N=M.implementation,j=M.createNodeIterator,R=M.createDocumentFragment,X=M.getElementsByTagName,U=n.importNode;let le=fm();t.isSupported=typeof Xp=="function"&&typeof m=="function"&&N&&N.createHTMLDocument!==void 0;const he=HT,H=GT,oe=KT,W=YT,fe=JT,ce=QT,de=XT,J=tA;let ee=dm,$=null;const ae=Ae({},[...om,...qu,...Uu,...Bu,...lm]);let L=null;const be=Ae({},[...um,...Vu,...cm,...go]);let G=Object.seal(zi(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(zi(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,_t=!0,ot=!1,Nt=!0,wt=!1,Rt=!1,ir=!1,Gt=!1,gr=!1,Pr=!1,Mr=!0,yn=!1;const $r="user-content-";let yr=!0,Xr=!1,en={},At=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 na=null;const ia=Ae({},["audio","video","img","source","image","track"]);let fs=null;const td=Ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mi="http://www.w3.org/1998/Math/MathML",aa="http://www.w3.org/2000/svg",br="http://www.w3.org/1999/xhtml";let Bn=br,rd=!1,nd=null;const MF=Ae({},[mi,aa,br],zu);let id=Ae({},["mi","mo","mn","ms","mtext"]),ad=Ae({},["annotation-xml"]);const $F=Ae({},["title","style","font","a","script"]);let hs=null;const FF=["application/xhtml+xml","text/html"],NF="text/html";let ct=null,sa=null;const RF=r.createElement("form"),ly=function(O){return O instanceof RegExp||O instanceof Function},sd=function(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(sa&&sa===O)return;(!O||typeof O!="object")&&(O={}),O=Ct(O),hs=FF.indexOf(O.PARSER_MEDIA_TYPE)===-1?NF:O.PARSER_MEDIA_TYPE,ct=hs==="application/xhtml+xml"?zu:Za,$=it(O,"ALLOWED_TAGS")&&$t(O.ALLOWED_TAGS)?Ae({},O.ALLOWED_TAGS,ct):ae,L=it(O,"ALLOWED_ATTR")&&$t(O.ALLOWED_ATTR)?Ae({},O.ALLOWED_ATTR,ct):be,nd=it(O,"ALLOWED_NAMESPACES")&&$t(O.ALLOWED_NAMESPACES)?Ae({},O.ALLOWED_NAMESPACES,zu):MF,fs=it(O,"ADD_URI_SAFE_ATTR")&&$t(O.ADD_URI_SAFE_ATTR)?Ae(Ct(td),O.ADD_URI_SAFE_ATTR,ct):td,na=it(O,"ADD_DATA_URI_TAGS")&&$t(O.ADD_DATA_URI_TAGS)?Ae(Ct(ia),O.ADD_DATA_URI_TAGS,ct):ia,At=it(O,"FORBID_CONTENTS")&&$t(O.FORBID_CONTENTS)?Ae({},O.FORBID_CONTENTS,ct):Un,w=it(O,"FORBID_TAGS")&&$t(O.FORBID_TAGS)?Ae({},O.FORBID_TAGS,ct):Ct({}),_e=it(O,"FORBID_ATTR")&&$t(O.FORBID_ATTR)?Ae({},O.FORBID_ATTR,ct):Ct({}),en=it(O,"USE_PROFILES")?O.USE_PROFILES&&typeof O.USE_PROFILES=="object"?Ct(O.USE_PROFILES):O.USE_PROFILES:!1,De=O.ALLOW_ARIA_ATTR!==!1,Le=O.ALLOW_DATA_ATTR!==!1,je=O.ALLOW_UNKNOWN_PROTOCOLS||!1,_t=O.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ot=O.SAFE_FOR_TEMPLATES||!1,Nt=O.SAFE_FOR_XML!==!1,wt=O.WHOLE_DOCUMENT||!1,Gt=O.RETURN_DOM||!1,gr=O.RETURN_DOM_FRAGMENT||!1,Pr=O.RETURN_TRUSTED_TYPE||!1,ir=O.FORCE_BODY||!1,Mr=O.SANITIZE_DOM!==!1,yn=O.SANITIZE_NAMED_PROPS||!1,yr=O.KEEP_CONTENT!==!1,Xr=O.IN_PLACE||!1,ee=jT(O.ALLOWED_URI_REGEXP)?O.ALLOWED_URI_REGEXP:dm,Bn=typeof O.NAMESPACE=="string"?O.NAMESPACE:br,id=it(O,"MATHML_TEXT_INTEGRATION_POINTS")&&O.MATHML_TEXT_INTEGRATION_POINTS&&typeof O.MATHML_TEXT_INTEGRATION_POINTS=="object"?Ct(O.MATHML_TEXT_INTEGRATION_POINTS):Ae({},["mi","mo","mn","ms","mtext"]),ad=it(O,"HTML_INTEGRATION_POINTS")&&O.HTML_INTEGRATION_POINTS&&typeof O.HTML_INTEGRATION_POINTS=="object"?Ct(O.HTML_INTEGRATION_POINTS):Ae({},["annotation-xml"]);const K=it(O,"CUSTOM_ELEMENT_HANDLING")&&O.CUSTOM_ELEMENT_HANDLING&&typeof O.CUSTOM_ELEMENT_HANDLING=="object"?Ct(O.CUSTOM_ELEMENT_HANDLING):zi(null);if(G=zi(null),it(K,"tagNameCheck")&&ly(K.tagNameCheck)&&(G.tagNameCheck=K.tagNameCheck),it(K,"attributeNameCheck")&&ly(K.attributeNameCheck)&&(G.attributeNameCheck=K.attributeNameCheck),it(K,"allowCustomizedBuiltInElements")&&typeof K.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=K.allowCustomizedBuiltInElements),ot&&(Le=!1),gr&&(Gt=!0),en&&($=Ae({},lm),L=zi(null),en.html===!0&&(Ae($,om),Ae(L,um)),en.svg===!0&&(Ae($,qu),Ae(L,Vu),Ae(L,go)),en.svgFilters===!0&&(Ae($,Uu),Ae(L,Vu),Ae(L,go)),en.mathMl===!0&&(Ae($,Bu),Ae(L,cm),Ae(L,go))),we.tagCheck=null,we.attributeCheck=null,it(O,"ADD_TAGS")&&(typeof O.ADD_TAGS=="function"?we.tagCheck=O.ADD_TAGS:$t(O.ADD_TAGS)&&($===ae&&($=Ct($)),Ae($,O.ADD_TAGS,ct))),it(O,"ADD_ATTR")&&(typeof O.ADD_ATTR=="function"?we.attributeCheck=O.ADD_ATTR:$t(O.ADD_ATTR)&&(L===be&&(L=Ct(L)),Ae(L,O.ADD_ATTR,ct))),it(O,"ADD_URI_SAFE_ATTR")&&$t(O.ADD_URI_SAFE_ATTR)&&Ae(fs,O.ADD_URI_SAFE_ATTR,ct),it(O,"FORBID_CONTENTS")&&$t(O.FORBID_CONTENTS)&&(At===Un&&(At=Ct(At)),Ae(At,O.FORBID_CONTENTS,ct)),it(O,"ADD_FORBID_CONTENTS")&&$t(O.ADD_FORBID_CONTENTS)&&(At===Un&&(At=Ct(At)),Ae(At,O.ADD_FORBID_CONTENTS,ct)),yr&&($["#text"]=!0),wt&&Ae($,["html","head","body"]),$.table&&(Ae($,["tbody"]),delete w.tbody),O.TRUSTED_TYPES_POLICY){if(typeof O.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ha('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof O.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ha('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=O.TRUSTED_TYPES_POLICY,I=A.createHTML("")}else A===void 0&&(A=nA(f,i)),A!==null&&typeof I=="string"&&(I=A.createHTML(""));(le.uponSanitizeElement.length>0||le.uponSanitizeAttribute.length>0)&&$===ae&&($=Ct($)),le.uponSanitizeAttribute.length>0&&L===be&&(L=Ct(L)),Mt&&Mt(O),sa=O},uy=Ae({},[...qu,...Uu,...ZT]),cy=Ae({},[...Bu,...WT]),LF=function(O){let K=m(O);(!K||!K.tagName)&&(K={namespaceURI:Bn,tagName:"template"});const me=Za(O.tagName),Ie=Za(K.tagName);return nd[O.namespaceURI]?O.namespaceURI===aa?K.namespaceURI===br?me==="svg":K.namespaceURI===mi?me==="svg"&&(Ie==="annotation-xml"||id[Ie]):!!uy[me]:O.namespaceURI===mi?K.namespaceURI===br?me==="math":K.namespaceURI===aa?me==="math"&&ad[Ie]:!!cy[me]:O.namespaceURI===br?K.namespaceURI===aa&&!ad[Ie]||K.namespaceURI===mi&&!id[Ie]?!1:!cy[me]&&($F[me]||!uy[me]):!!(hs==="application/xhtml+xml"&&nd[O.namespaceURI]):!1},Fr=function(O){Ui(t.removed,{element:O});try{m(O).removeChild(O)}catch{h(O)}},vi=function(O,K){try{Ui(t.removed,{attribute:K.getAttributeNode(O),from:K})}catch{Ui(t.removed,{attribute:null,from:K})}if(K.removeAttribute(O),O==="is")if(Gt||gr)try{Fr(K)}catch{}else try{K.setAttribute(O,"")}catch{}},dy=function(O){let K=null,me=null;if(ir)O="<remove></remove>"+O;else{const rt=nm(O,/^[\r\n\t ]+/);me=rt&&rt[0]}hs==="application/xhtml+xml"&&Bn===br&&(O='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+O+"</body></html>");const Ie=A?A.createHTML(O):O;if(Bn===br)try{K=new c().parseFromString(Ie,hs)}catch{}if(!K||!K.documentElement){K=N.createDocument(Bn,"template",null);try{K.documentElement.innerHTML=rd?I:Ie}catch{}}const ze=K.body||K.documentElement;return O&&me&&ze.insertBefore(r.createTextNode(me),ze.childNodes[0]||null),Bn===br?X.call(K,wt?"html":"body")[0]:wt?K.documentElement:ze},fy=function(O){return j.call(O.ownerDocument||O,O,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},hy=function(O){O.normalize();const K=j.call(O.ownerDocument||O,O,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let me=K.nextNode();for(;me;){let Ie=me.data;qi([he,H,oe],ze=>{Ie=Bi(Ie,ze," ")}),me.data=Ie,me=K.nextNode()}},el=function(O){const K=T?T(O):null;return typeof K!="string"||ct(K)!=="form"?!1:typeof O.nodeName!="string"||typeof O.textContent!="string"||typeof O.removeChild!="function"||O.attributes!==E(O)||typeof O.removeAttribute!="function"||typeof O.setAttribute!="function"||typeof O.namespaceURI!="string"||typeof O.insertBefore!="function"||typeof O.hasChildNodes!="function"||O.nodeType!==S(O)||O.childNodes!==v(O)},ps=function(O){if(!S||typeof O!="object"||O===null)return!1;try{return S(O)===Kr.documentFragment}catch{return!1}},tl=function(O){if(!S||typeof O!="object"||O===null)return!1;try{return typeof S(O)=="number"}catch{return!1}};function bn(ge,O,K){qi(ge,me=>{me.call(t,O,K,sa)})}const py=function(O){let K=null;if(bn(le.beforeSanitizeElements,O,null),el(O))return Fr(O),!0;const me=ct(O.nodeName);if(bn(le.uponSanitizeElement,O,{tagName:me,allowedTags:$}),Nt&&O.hasChildNodes()&&!tl(O.firstElementChild)&&Tt(/<[/\w!]/g,O.innerHTML)&&Tt(/<[/\w!]/g,O.textContent)||Nt&&O.namespaceURI===br&&me==="style"&&tl(O.firstElementChild)||O.nodeType===Kr.progressingInstruction||Nt&&O.nodeType===Kr.comment&&Tt(/<[/\w]/g,O.data))return Fr(O),!0;if(w[me]||!(we.tagCheck instanceof Function&&we.tagCheck(me))&&!$[me]){if(!w[me]&&vy(me)&&(G.tagNameCheck instanceof RegExp&&Tt(G.tagNameCheck,me)||G.tagNameCheck instanceof Function&&G.tagNameCheck(me)))return!1;if(yr&&!At[me]){const Ie=m(O),ze=v(O);if(ze&&Ie){const rt=ze.length;for(let Kt=rt-1;Kt>=0;--Kt){const Vn=p(ze[Kt],!0);Ie.insertBefore(Vn,y(O))}}}return Fr(O),!0}return(S?S(O):O.nodeType)===Kr.element&&!LF(O)||(me==="noscript"||me==="noembed"||me==="noframes")&&Tt(/<\/no(script|embed|frames)/i,O.innerHTML)?(Fr(O),!0):(ot&&O.nodeType===Kr.text&&(K=O.textContent,qi([he,H,oe],Ie=>{K=Bi(K,Ie," ")}),O.textContent!==K&&(Ui(t.removed,{element:O.cloneNode()}),O.textContent=K)),bn(le.afterSanitizeElements,O,null),!1)},my=function(O,K,me){if(_e[K]||Mr&&(K==="id"||K==="name")&&(me in r||me in RF))return!1;const Ie=L[K]||we.attributeCheck instanceof Function&&we.attributeCheck(K,O);if(!(Le&&!_e[K]&&Tt(W,K))){if(!(De&&Tt(fe,K))){if(!Ie||_e[K]){if(!(vy(O)&&(G.tagNameCheck instanceof RegExp&&Tt(G.tagNameCheck,O)||G.tagNameCheck instanceof Function&&G.tagNameCheck(O))&&(G.attributeNameCheck instanceof RegExp&&Tt(G.attributeNameCheck,K)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(K,O))||K==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&Tt(G.tagNameCheck,me)||G.tagNameCheck instanceof Function&&G.tagNameCheck(me))))return!1}else if(!fs[K]){if(!Tt(ee,Bi(me,de,""))){if(!((K==="src"||K==="xlink:href"||K==="href")&&O!=="script"&&im(me,"data:")===0&&na[O])){if(!(je&&!Tt(ce,Bi(me,de,"")))){if(me)return!1}}}}}}return!0},zF=Ae({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),vy=function(O){return!zF[Za(O)]&&Tt(J,O)},gy=function(O){bn(le.beforeSanitizeAttributes,O,null);const K=O.attributes;if(!K||el(O))return;const me={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0};let Ie=K.length;for(;Ie--;){const ze=K[Ie],rt=ze.name,Kt=ze.namespaceURI,Vn=ze.value,_n=ct(rt),od=Vn;let kt=rt==="value"?od:LT(od);if(me.attrName=_n,me.attrValue=kt,me.keepAttr=!0,me.forceKeepAttr=void 0,bn(le.uponSanitizeAttribute,O,me),kt=me.attrValue,yn&&(_n==="id"||_n==="name")&&im(kt,$r)!==0&&(vi(rt,O),kt=$r+kt),Nt&&Tt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,kt)){vi(rt,O);continue}if(_n==="attributename"&&nm(kt,"href")){vi(rt,O);continue}if(me.forceKeepAttr)continue;if(!me.keepAttr){vi(rt,O);continue}if(!_t&&Tt(/\/>/i,kt)){vi(rt,O);continue}ot&&qi([he,H,oe],by=>{kt=Bi(kt,by," ")});const yy=ct(O.nodeName);if(!my(yy,_n,kt)){vi(rt,O);continue}if(A&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Kt)switch(f.getAttributeType(yy,_n)){case"TrustedHTML":kt=A.createHTML(kt);break;case"TrustedScriptURL":kt=A.createScriptURL(kt);break}if(kt!==od)try{Kt?O.setAttributeNS(Kt,rt,kt):O.setAttribute(rt,kt),el(O)?Fr(O):rm(t.removed)}catch{vi(rt,O)}}bn(le.afterSanitizeAttributes,O,null)},rl=function(O){let K=null;const me=fy(O);for(bn(le.beforeSanitizeShadowDOM,O,null);K=me.nextNode();)if(bn(le.uponSanitizeShadowNode,K,null),py(K),gy(K),ps(K.content)&&rl(K.content),(S?S(K):K.nodeType)===Kr.element){const Ie=g?g(K):K.shadowRoot;ps(Ie)&&(oa(Ie),rl(Ie))}bn(le.afterSanitizeShadowDOM,O,null)},oa=function(O){const K=S?S(O):O.nodeType;if(K===Kr.element){const ze=g?g(O):O.shadowRoot;ps(ze)&&(oa(ze),rl(ze))}const me=v?v(O):O.childNodes;if(!me)return;const Ie=[];qi(me,ze=>{Ui(Ie,ze)});for(const ze of Ie)oa(ze);if(K===Kr.element){const ze=T?T(O):null;if(typeof ze=="string"&&ct(ze)==="template"){const rt=O.content;ps(rt)&&oa(rt)}}};return t.sanitize=function(ge){let O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},K=null,me=null,Ie=null,ze=null;if(rd=!ge,rd&&(ge="<!-->"),typeof ge!="string"&&!tl(ge)&&(ge=VT(ge),typeof ge!="string"))throw Ha("dirty is not a string, aborting");if(!t.isSupported)return ge;if(Rt||sd(O),t.removed=[],typeof ge=="string"&&(Xr=!1),Xr){const Vn=T?T(ge):ge.nodeName;if(typeof Vn=="string"){const _n=ct(Vn);if(!$[_n]||w[_n])throw Ha("root node is forbidden and cannot be sanitized in-place")}if(el(ge))throw Ha("root node is clobbered and cannot be sanitized in-place");oa(ge)}else if(tl(ge))K=dy("<!---->"),me=K.ownerDocument.importNode(ge,!0),me.nodeType===Kr.element&&me.nodeName==="BODY"||me.nodeName==="HTML"?K=me:K.appendChild(me),oa(me);else{if(!Gt&&!ot&&!wt&&ge.indexOf("<")===-1)return A&&Pr?A.createHTML(ge):ge;if(K=dy(ge),!K)return Gt?null:Pr?I:""}K&&ir&&Fr(K.firstChild);const rt=fy(Xr?ge:K);for(;Ie=rt.nextNode();)py(Ie),gy(Ie),ps(Ie.content)&&rl(Ie.content);if(Xr)return ot&&hy(ge),ge;if(Gt){if(ot&&hy(K),gr)for(ze=R.call(K.ownerDocument);K.firstChild;)ze.appendChild(K.firstChild);else ze=K;return(L.shadowroot||L.shadowrootmode)&&(ze=U.call(n,ze,!0)),ze}let Kt=wt?K.outerHTML:K.innerHTML;return wt&&$["!doctype"]&&K.ownerDocument&&K.ownerDocument.doctype&&K.ownerDocument.doctype.name&&Tt(eA,K.ownerDocument.doctype.name)&&(Kt="<!DOCTYPE "+K.ownerDocument.doctype.name+`>
|
|
77
|
+
`+Kt),ot&&qi([he,H,oe],Vn=>{Kt=Bi(Kt,Vn," ")}),A&&Pr?A.createHTML(Kt):Kt},t.setConfig=function(){sd(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Rt=!0},t.clearConfig=function(){sa=null,Rt=!1},t.isValidAttribute=function(ge,O,K){return sa||sd({}),my(ct(ge),ct(O),K)},t.addHook=function(ge,O){typeof O=="function"&&Ui(le[ge],O)},t.removeHook=function(ge,O){if(O!==void 0){const K=NT(le[ge],O);return K===-1?void 0:RT(le[ge],K,1)[0]}return rm(le[ge])},t.removeHooks=function(ge){le[ge]=[]},t.removeAllHooks=function(){le=fm()},t}var pm=hm(),iA=q('<span class="go-sub-ticket-description"></span>'),aA=q('<span class="go-sub-ticket-quantity"> </span>'),sA=q('<li><span class="go-sub-ticket-title"> </span> <!> <!></li>');function ju(e,t){te(t,!0);let r=_(t,"sub",7),n=_(t,"quantity",7),i=_(t,"max",23,()=>r().max_persons),a=_(t,"onChange",7),s=_(t,"preview",7,!1);const o=P(()=>r().min_persons===r().max_persons);var l={get sub(){return r()},set sub(g){r(g),b()},get quantity(){return n()},set quantity(g){n(g),b()},get max(){return i()},set max(g=r.max_persons){i(g),b()},get onChange(){return a()},set onChange(g){a(g),b()},get preview(){return s()},set preview(g=!1){s(g),b()}},c=sA(),f=D(c),u=D(f,!0);C(f);var p=V(f,2),h=g=>{var E=iA();Ef(E,()=>pm.sanitize(r().description),!0),C(E),x(g,E)};ue(p,g=>{r().description&&g(h)});var y=V(p,2),v=g=>{var E=aA(),S=D(E,!0);C(E),Y(()=>{pe(E,"data-testid",`sub-ticket-${r().id??""}-quantity`),Z(S,n())}),x(g,E)},m=g=>{{let E=P(()=>r().title||k.t("cart.content.table.edit"));vo(g,{get value(){return n()},get min(){return r().min_persons},get max(){return i()},get label(){return d(E)},deselectable:!1,get onChange(){return a()}})}};return ue(y,g=>{s()||d(o)?g(v):g(m,-1)}),C(c),Y(()=>{Et(c,1,dr(["go-sub-ticket",d(o)&&"is-fixed",s()&&"is-preview",n()===0&&"is-empty"])),pe(c,"data-testid",`sub-ticket-${r().id??""}`),Z(u,r().title)}),x(e,c),re(l)}ne(ju,{sub:{},quantity:{},max:{},onChange:{},preview:{}},[],[],{mode:"open"});function mm(e,t){const{product:r}=e;return ja(r)?[r.event_title,e.time&&mp(e.time,t),r.title].filter(Boolean).join(" - "):r.title}var oA=q('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),lA=q('<span class="go-cart-item-price-discounted"> </span>'),uA=q('<span data-testid="cart-item-participant-count"> </span>'),cA=q('<span data-testid="cart-item-voucher-quantity"> </span>'),dA=q("<span> </span>"),fA=q('<li class="go-cart-item-remove"><button class="go-cart-remove"> </button></li>'),hA=q('<ul class="go-sub-tickets" role="list"></ul>'),pA=q('<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 vm(e,t){te(t,!0);let r=_(t,"displayItem",7),n=_(t,"displayCart",7),i=_(t,"preview",7),a=se(void 0),s=se(Pe({}));const o=P(()=>k.cart?.items.find(g=>g.uuid===(r().display?.reference_uuid??r().uuid))),l=P(()=>Vr(r().product)?r().product:null),c=ei();ve(()=>{k.cart?.items.map(g=>g.quantity),k.cart?.items.forEach(g=>g.mantle&&Object.values(g.mantle.composition)),Re(()=>{F(a,k.capacityManager.capacity(n(),r(),c),!0),F(s,d(o)?k.capacityManager.subTicketMaxes(k.cart,d(o),c):{},!0)})});function f(g){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+g)}function u(){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}const g=Math.max(0,d(o).quantity-r().quantity);g===0?k.cart?.deleteItem(d(o)):d(o).quantity=g}function p(g,E){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}d(o).mantle&&(d(o).mantle.composition[g]=E)}var h={get displayItem(){return r()},set displayItem(g){r(g),b()},get displayCart(){return n()},set displayCart(g){n(g),b()},get preview(){return i()},set preview(g){i(g),b()}},y=ie(),v=B(y),m=g=>{var E=pA(),S=B(E),T=D(S),A=D(T),I=D(A),M=G=>{Wp(G,{get cartItem(){return r()}})},N=G=>{Zp(G,{get cartItem(){return r()}})},j=G=>{jp(G,{get cartItem(){return r()}})},R=G=>{Hp(G,{get cartItem(){return r()}})};ue(I,G=>{r().product.type==="Ticket"?G(M):r().product.type==="Event"?G(N,1):r().product.type==="Coupon"?G(j,2):r().product.type==="Tour"&&G(R,3)}),C(A);var X=V(A,2),U=D(X),le=G=>{var w=oA(),_e=B(w),we=D(_e,!0);C(_e);var De=V(_e,2),Le=D(De,!0);C(De),Y((je,_t)=>{Z(we,je),Z(Le,_t)},[()=>et(r().display.originalPrice),()=>et(r().final_price_cents)]),x(G,w)},he=G=>{var w=lA(),_e=D(w,!0);C(w),Y(we=>Z(_e,we),[()=>et(r().final_price_cents)]),x(G,w)};ue(U,G=>{r().display?.discounted?G(le):G(he,-1)}),C(X);var H=V(X,2),oe=D(H),W=G=>{var w=uA(),_e=D(w,!0);C(w),Y(()=>Z(_e,r().product.participants)),x(G,w)},fe=G=>{var w=cA(),_e=D(w,!0);C(w),Y(()=>Z(_e,r().quantity)),x(G,w)},ce=G=>{var w=dA(),_e=D(w,!0);C(w),Y(()=>Z(_e,r().quantity)),x(G,w)},de=G=>{{let w=P(()=>r().quantity??0),_e=P(()=>mm(r(),k.locale));vo(G,{get value(){return d(w)},get min(){return d(a).min},get max(){return d(a).max},get label(){return d(_e)},floor:1,onChange:f,onDecrementBelowMin:u})}};ue(oe,G=>{r().product.type==="Tour"?G(W):r().voucher?.code?G(fe,1):i()?G(ce,2):G(de,-1)}),C(H);var J=V(H,2),ee=G=>{var w=fA(),_e=D(w),we=D(_e,!0);C(_e),C(w),Y((De,Le)=>{pe(_e,"aria-label",De),Z(we,Le)},[()=>k.t("cart.item.aria.removeItem"),()=>k.t("cart.item.remove")]),ut("click",_e,u),x(G,w)};ue(J,G=>{i()||G(ee)});var $=V(J,2),ae=D($,!0);C($),C(T),C(S);var L=V(S,2),be=G=>{var w=hA();Me(w,21,()=>qa(d(l)),_e=>_e.id,(_e,we)=>{{let De=P(()=>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(s)[d(we).id]},onChange:Le=>p(d(we).id,Le)})}}),C(w),Y(()=>pe(w,"aria-label",d(l).title)),x(G,w)};ue(L,G=>{d(l)&&G(be)}),Y(G=>Z(ae,G),[()=>et(r().total_price_cents)]),x(g,E)};return ue(v,g=>{d(a)&&g(m)}),x(e,y),re(h)}Bt(["click"]),ne(vm,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var mA=q('<li class="go-cart-item-remove"><button class="go-cart-remove"> </button></li>'),vA=q('<article class="go-cart-donation" data-testid="cart-donation"><ul><li class="go-cart-item-title-container"><span class="go-cart-donation-title"> </span></li> <li class="go-cart-item-price"></li> <li class="go-cart-item-count"></li> <!> <li class="go-cart-item-sum"> </li></ul></article>');function gm(e,t){te(t,!0);let r=_(t,"donation",7),n=_(t,"preview",7);const i=P(()=>k.donations?.campaigns?.find(m=>m.id===r().campaign_id));function a(){k.cart?.removeDonation(r().campaign_id,r().value)}var s={get donation(){return r()},set donation(m){r(m),b()},get preview(){return n()},set preview(m){n(m),b()}},o=vA(),l=D(o),c=D(l),f=D(c),u=D(f,!0);C(f),C(c);var p=V(c,6),h=m=>{var g=mA(),E=D(g),S=D(E,!0);C(E),C(g),Y((T,A)=>{pe(E,"aria-label",T),Z(S,A)},[()=>k.t("cart.item.aria.removeItem"),()=>k.t("cart.item.remove")]),ut("click",E,a),x(m,g)};ue(p,m=>{n()||m(h)});var y=V(p,2),v=D(y,!0);return C(y),C(l),C(o),Y((m,g)=>{Z(u,m),Z(v,g)},[()=>d(i)?.name??k.t("cart.donation.title"),()=>et(r().value)]),x(e,o),re(s)}Bt(["click"]),ne(gm,{donation:{},preview:{}},[],[],{mode:"open"});var gA=q('<li class="go-cart-header-remove"></li>'),ym=q('<li class="go-cart-item"><!></li>'),yA=q('<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 bA(e,t){te(t,!0);const r=Li(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=yA(),c=D(l),f=D(c),u=D(f),p=D(u,!0);C(u);var h=V(u,2),y=D(h,!0);C(h);var v=V(h,2),m=D(v,!0);C(v);var g=V(v,2),E=M=>{var N=gA();x(M,N)};ue(g,M=>{d(n).preview||M(E)});var S=V(g,2),T=D(S,!0);C(S),C(f),C(c);var A=V(c,2);Me(A,17,()=>d(n).displayCart.items,M=>M.uuid,(M,N)=>{var j=ym();vm(D(j),{get displayItem(){return d(N)},get displayCart(){return d(n).displayCart},get preview(){return d(n).preview}}),C(j),x(M,j)});var I=V(A,2);Me(I,17,()=>d(n).displayCart.donations,M=>M.campaign_id+"-"+M.value,(M,N)=>{var j=ym();gm(D(j),{get donation(){return d(N)},get preview(){return d(n).preview}}),C(j),x(M,j)}),C(l),Y((M,N,j,R)=>{Z(p,M),Z(y,N),Z(m,j),Z(T,R)},[()=>k.t("cart.content.table.desc"),()=>k.t("cart.content.table.price"),()=>k.t("cart.content.table.quantity"),()=>k.t("cart.content.table.total")]),x(o,l)};ue(a,o=>{d(n)&&d(n).displayCart&&(d(n).displayCart.items.length||d(n).displayCart.donations.length)&&o(s)}),x(e,i),re()}customElements.define("go-cart-items",ne(bA,{},[],[]));var _A=q('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),wA=q('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),kA=q('<ol data-testid="cart-coupons"></ol>');function SA(e,t){te(t,!0);const r=Li(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=kA();Me(l,21,()=>d(n).displayCart.coupons,c=>c.code,(c,f)=>{var u=wA();let p;var h=D(u),y=D(h),v=D(y),m=D(v,!0);C(v);var g=V(v,2),E=S=>{var T=_A(),A=D(T);C(T),Y(I=>pe(A,"aria-label",I),[()=>k.t("cart.coupons.remove")]),ut("click",A,()=>k.cart?.removeCoupon(d(f).code)),x(S,T)};ue(g,S=>{d(n).preview||S(E)}),C(y),C(h),C(u),Y(()=>{p=Et(u,1,"go-cart-coupon",null,p,{"go-cart-coupon-inactive":!d(f).applied}),Z(m,d(f).code)}),x(c,u)}),C(l),x(o,l)};ue(a,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.coupons.length>0&&o(s)}),x(e,i),re()}Bt(["click"]),customElements.define("go-cart-coupons",ne(SA,{},[],[]));var EA=q('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function xA(e,t){te(t,!0);const r=Li(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=EA(),c=D(l,!0);C(l),Y(f=>Z(c,f),[()=>et(d(n).totalPriceCents)]),x(o,l)};ue(a,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.items.length&&o(s)}),x(e,i),re()}customElements.define("go-cart-total-amount",ne(xA,{},[],[]));function TA(e,t){te(t,!0);const r=_(t,"preview",7,!1),n=new lT;uT(t.$$host,n),ve(()=>{n.preview=r()}),ve(()=>{k.cart&&(k.cart.items.map(a=>a.uuid+":"+a.quantity+":"+a.time),k.cart.coupons.map(a=>a.code).join("|"),k.cart.items.forEach(a=>a.mantle&&Object.values(a.mantle.composition)),k.cart.donations.map(a=>a.campaign_id+":"+a.value).join("|"),Re(()=>n.calculateDisplayCart()))});async function i(){const a=t.$$host.querySelectorAll("go-coupon-redemption");let s=!0;for(const o of a){const l=await o.flush?.();l&&!l.success&&(s=!1)}return s}return t.$$host.addEventListener("click",async a=>{const s=a.target.closest("go-submit");if(!s)return;const o=s.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}))}),re({get preview(){return r()},set preview(a=!1){r(a),b()}})}customElements.define("go-cart",ne(TA,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var AA=q('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function CA(e,t){te(t,!0);const r=Li(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=AA(),c=D(l,!0);C(l),Y(f=>Z(c,f),[()=>et(d(n).subtotalPriceCents)]),x(o,l)};ue(a,o=>{d(n)&&k.cart?.items.length&&o(s)}),x(e,i),re()}customElements.define("go-cart-subtotal-amount",ne(CA,{},[],[]));var OA=q('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function DA(e,t){te(t,!0);const r=Li(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=OA(),c=V(D(l),1,!0);C(l),Y(f=>Z(c,f),[()=>et(d(n).discountedAmountCents)]),x(o,l)};ue(a,o=>{d(n)&&d(n).discountedAmountCents>0&&o(s)}),x(e,i),re()}customElements.define("go-cart-discounted-amount",ne(DA,{},[],[]));function IA(e,t){te(t,!0),Hr(t.$$host,"go-if",{when:"data.cart.items.length === 0"}),re()}customElements.define("go-cart-empty",ne(IA,{},[],[]));function PA(e,t){te(t,!0);let r=P(()=>k.cart?.items.length);gt();var n=Vt();Y(()=>Z(n,d(r))),x(e,n),re()}customElements.define("go-cart-counter",ne(PA,{},[],[]));function MA(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 bm(e,t){const r=k.cart;if(!r)return;const n=e.details.fieldValue("paymentMode");r.paymentModeId=n==null?void 0:String(n);const i=await k.checkout(r.orderData());if(i.error){e.details.apiErrors=i.error;return}const a=Ge.config.forms[t]?.beforeSubmit;a&&await a(e.details.formData);const s=i.data.meta,o=Ge.config.navigateTo,l=Ge.config.urls.checkoutFailure??k.urls.checkoutFailure;if(s.status==="success"){const c=Ge.config.urls.checkoutSuccess??k.urls.checkoutSuccess;o?.(c(i.data.order.token))}else s.status==="fail"?o?.(l("")):s.payment_url?o?.(s.payment_url):s.payment_data?MA(s.payment_data):o?.(l(""))}function _m(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(!k.cart)return;const i=await k.signUp(n.details.formData,!0);if(i.error){n.details.apiErrors=i.error.errors;return}await bm(n,"checkoutGuest")})}function $A(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 bm(n,"checkoutUser")})}function FA(e,t){te(t,!0);let r=_(t,"custom",7,!1);return _m(t.$$host,r()),re({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-form",ne(FA,{custom:{}},[],[]));function NA(e,t){te(t,!0);let r=_(t,"custom",7,!1);return _m(t.$$host,r()),re({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-guest",ne(NA,{custom:{}},[],[]));function RA(e,t){te(t,!0);let r=_(t,"custom",7,!1);return $A(t.$$host,r()),re({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-user",ne(RA,{custom:{}},[],[]));var LA="TokenActions::ApplyOrderDiscount";async function zA(e){if(!k.cart)throw new Error("(go-coupon-redemption): cart not found");const t=k.cart,r=await k.asyncFetch(()=>k.getCouponSaleByBarcode(e));return r?.is_valid?r.value_action===LA?(t.addCoupon({code:e,kind:"actionToken"}),{success:!0}):r.is_voucher_for?UA(e,r):r.value_cents&&r.value_cents>0?qA(e,r.value_cents):Zu([k.t("cart.coupon.form.errors.notValid")]):Zu([k.t("cart.coupon.form.errors.notValid")])}function qA(e,t){return k.cart.addCoupon({code:e,kind:"valueVoucher",valueCents:t}),{success:!0}}async function UA(e,t){const r=e.toUpperCase();if(k.cart.coupons.some(s=>s.code===r))return{success:!0};const n=await k.asyncFetch(()=>k.tickets({"by_ticket_ids[]":[t.is_voucher_for]})),i=Array.isArray(n)?n.find(s=>s.id===t.is_voucher_for):void 0;if(!i)return Zu([k.t("cart.coupon.form.errors.error")]);const a={...i,price_cents:0};return k.cart.addItem(nt(Ua(a),{quantity:1,voucher:{code:r}})),k.cart.addCoupon({code:r,kind:"serviceVoucher"}),{success:!0}}function Zu(e){return{success:!1,errors:e}}var BA=q("<go-form></go-form>",2);function VA(e,t){te(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 zA(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 a={flush:i},s=BA();return Tn(s,"formId","couponRedemption"),Ta("submit",s,n),x(e,s),re(a)}customElements.define("go-coupon-redemption",ne(VA,{},[],["flush"]));var jA=q('<span class="go-donation-checkbox-label"></span>'),ZA=q('<span class="go-donation-checkbox-label"> </span>'),WA=q('<label class="go-donation-checkbox"><input type="checkbox" data-testid="donation-checkbox"/> <!></label>');function HA(e,t){te(t,!0);let r=_(t,"campaignId",7),n=_(t,"amountCents",7),i=_(t,"describedby",7);const a=document.createDocumentFragment();for(const g of Array.from(t.$$host.childNodes))!(g.nodeType===Node.TEXT_NODE&&g.textContent==="")&&g.nodeType!==Node.COMMENT_NODE&&a.appendChild(g);const s=Array.from(a.childNodes).some(g=>g.nodeType===Node.ELEMENT_NODE||!!g.textContent?.trim());let o=se(void 0);ve(()=>{if(!s||!d(o))return;const g=d(o);return g.appendChild(a),()=>{for(;g.firstChild;)a.appendChild(g.firstChild)}});const l=P(()=>k.donations?.campaigns?.find(g=>g.id===r())),c=P(()=>!k.currentUser?.isAuthenticated||k.currentUser?.isGuest),f=P(()=>!!d(l)&&d(l).guest_limit>0&&(n()??0)>d(l).guest_limit&&d(c)),u=P(()=>!!d(l)&&!!n()&&!!k.cart?.hasDonation(d(l).id,n()));function p(g){!d(l)||!n()||!k.cart||(g.currentTarget.checked?k.cart.addDonation({value:n(),campaign_id:d(l).id}):k.cart.removeDonation(d(l).id,n()))}var h={get campaignId(){return r()},set campaignId(g){r(g),b()},get amountCents(){return n()},set amountCents(g){n(g),b()},get describedby(){return i()},set describedby(g){i(g),b()}},y=ie(),v=B(y),m=g=>{var E=WA(),S=D(E);Ai(S);var T=V(S,2),A=M=>{var N=jA();Us(N,j=>F(o,j),()=>d(o)),x(M,N)},I=M=>{var N=ZA(),j=D(N,!0);C(N),Y(R=>Z(j,R),[()=>k.t("donations.checkbox.label",{campaign:d(l).name,amount:et(n())})]),x(M,N)};ue(T,M=>{s?M(A):M(I,-1)}),C(E),Y(()=>{Pf(S,d(u)),pe(S,"aria-describedby",i()||void 0)}),ut("change",S,p),x(g,E)};return ue(v,g=>{d(l)&&n()&&n()>0&&!d(f)&&g(m)}),x(e,y),re(h)}Bt(["change"]),customElements.define("go-donation-checkbox",ne(HA,{campaignId:{attribute:"campaign-id",type:"Number"},amountCents:{attribute:"amount-cents",type:"Number"},describedby:{attribute:"describedby",type:"String"}},[],[])),Cb();var GA=class{#e=se();get campaign(){return d(this.#e)}set campaign(e){F(this.#e,e,!0)}#t=se();get amount(){return d(this.#t)}set amount(e){F(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")||"[]");fr(t.filter(r=>r.campaign_id=e.campaign_id),r=>r.value)+e.value>this.campaign.guest_limit&&this.campaign.guest_limit>0&&(!k.currentUser?.isAuthenticated||k.currentUser.isGuest)?this.skipDonation():(t.push(e),localStorage.setItem("201600627v4donations",JSON.stringify(t)),localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",k.urls.cart()),window.location.replace(k.urls.cart()))};skipDonation=()=>{localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",k.urls.cart()),window.location.replace(k.urls.cart())}},Ot=new GA,KA=q('<img alt="logo"/>'),YA=q('<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 wm(e,t){te(t,!0);let r=_(t,"campaign",7);const n=P(()=>r().translations);var i={get campaign(){return r()},set campaign(v){r(v),b()}},a=YA();let s;var o=D(a),l=D(o),c=v=>{var m=KA();Y(g=>pe(m,"src",g),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),x(v,m)};ue(l,v=>{r().picture.thumbnail&&v(c)}),C(o);var f=V(o,2),u=D(f),p=D(u,!0);C(u);var h=V(u,2),y=D(h,!0);return C(h),C(f),C(a),Y(()=>{s=Et(a,1,"go-donation-campaign",null,s,{selected:Ot.campaign?.id===r()?.id}),Z(p,d(n)["donations.headline"]),Z(y,d(n)["donations.shop.info"])}),ut("click",a,()=>Ot.selectCampaign(r())),ut("keydown",a,v=>{v.key==="Enter"&&Ot.selectCampaign(r())}),x(e,a),re(i)}Bt(["click","keydown"]),ne(wm,{campaign:{}},[],[],{mode:"open"});var JA=q("<button> </button>"),QA=q('<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>'),XA=q('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function km(e,t){te(t,!0);const r=Ot.campaign?.guest_limit?Ot.campaign.guest_limit/100:void 0;let n=se(void 0);function i(p){Ot.amount=p,F(n,null)}function a(p){const h=document.getElementById("donationForm");h.checkValidity()?Ot.amount=p.target.valueAsNumber*100:(Ot.amount=void 0,h.reportValidity())}var s=XA(),o=D(s),l=D(o,!0);C(o);var c=V(o,2);Me(c,20,()=>Ot.campaign?.options,p=>p,(p,h)=>{var y=JA();let v;var m=D(y,!0);C(y),Y(g=>{v=Et(y,1,"btn btn-default",null,v,{selected:Ot.amount===h}),Z(m,g)},[()=>et(h)]),ut("click",y,()=>i(h)),x(p,y)}),C(c);var f=V(c,2),u=p=>{var h=QA(),y=D(h),v=D(y),m=D(v,!0);C(v);var g=V(v,2);Ai(g),C(y),C(h),Y((E,S)=>{Z(m,E),pe(g,"max",r),pe(g,"placeholder",S),Bl(g,d(n))},[()=>k.t("donations.selection.custom.label"),()=>k.t("donations.selection.custom.input.placeholder")]),ut("input",g,a),x(p,h)};ue(f,p=>{Ot.campaign?.free_donations&&p(u)}),C(s),Y(p=>Z(l,p),[()=>k.t("donations.selection.title")]),x(e,s),re()}Bt(["click","input"]),ne(km,{},[],[],{mode:"open"});var eC=q('<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>');function tC(e,t){te(t,!1),En(()=>{k.donations?.campaigns?.length==1&&Ot.selectCampaign(k.donations?.campaigns[0])}),Jl();var r=ie(),n=B(r),i=a=>{var s=eC(),o=D(s);Me(o,1,()=>k?.donations?.campaigns,v=>v.id,(v,m)=>{wm(v,{get campaign(){return d(m)}})});var l=V(o,2),c=v=>{km(v,{})};ue(l,v=>{Ot.campaign&&v(c)});var f=V(l,2),u=D(f),p=D(u,!0);C(u);var h=V(u,2),y=D(h,!0);C(h),C(f),C(s),Y((v,m)=>{Z(p,v),h.disabled=!Ot.amount,Z(y,m)},[()=>k.t("donations.actions.continueWithoutDonation"),()=>k.t("donations.actions.addToCart")]),ut("click",u,function(...v){Ot.skipDonation?.apply(this,v)}),ut("click",h,function(...v){Ot.addDonationToCart?.apply(this,v)}),x(a,s)};ue(n,a=>{k.donations&&k.donations.campaigns&&a(i)}),x(e,r),re()}Bt(["click"]),customElements.define("go-donations",ne(tC,{},[],[]));function rC(e){return typeof e=="function"}function Ga(e){return e!==null&&typeof e=="object"}var nC=["string","number","bigint","boolean"];function Wu(e){return e==null||nC.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Wu(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}var yo=Symbol("box"),Sm=Symbol("is-writable");function z(e,t){const r=P(e);return t?{[yo]:!0,[Sm]:!0,get current(){return d(r)},set current(n){t(n)}}:{[yo]:!0,get current(){return e()}}}function Em(e){return Ga(e)&&yo in e}function iC(e){return Em(e)?e:rC(e)?z(e):xr(e)}function xr(e){let t=se(Pe(e));return{[yo]:!0,[Sm]:!0,get current(){return d(t)},set current(r){F(t,r,!0)}}}function xm(...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 Tm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,aC=/\n/g,sC=/^\s*/,oC=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,lC=/^:\s*/,uC=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,cC=/^[;\s]*/,dC=/^\s+|\s+$/g,fC=`
|
|
78
|
+
`,Am="/",Cm="*",ni="",hC="comment",pC="declaration";function mC(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(y){var v=y.match(aC);v&&(r+=v.length);var m=y.lastIndexOf(fC);n=~m?y.length-m:n+y.length}function a(){var y={line:r,column:n};return function(v){return v.position=new s(y),c(),v}}function s(y){this.start=y,this.end={line:r,column:n},this.source=t.source}s.prototype.content=e;function o(y){var v=new Error(t.source+":"+r+":"+n+": "+y);if(v.reason=y,v.filename=t.source,v.line=r,v.column=n,v.source=e,!t.silent)throw v}function l(y){var v=y.exec(e);if(v){var m=v[0];return i(m),e=e.slice(m.length),v}}function c(){l(sC)}function f(y){var v;for(y=y||[];v=u();)v!==!1&&y.push(v);return y}function u(){var y=a();if(!(Am!=e.charAt(0)||Cm!=e.charAt(1))){for(var v=2;ni!=e.charAt(v)&&(Cm!=e.charAt(v)||Am!=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,y({type:hC,comment:m})}}function p(){var y=a(),v=l(oC);if(v){if(u(),!l(lC))return o("property missing ':'");var m=l(uC),g=y({type:pC,property:Om(v[0].replace(Tm,ni)),value:m?Om(m[0].replace(Tm,ni)):ni});return l(cC),g}}function h(){var y=[];f(y);for(var v;v=p();)v!==!1&&(y.push(v),f(y));return y}return c(),h()}function Om(e){return e?e.replace(dC,ni):ni}function vC(e,t){let r=null;if(!e||typeof e!="string")return r;const n=mC(e),i=typeof t=="function";return n.forEach(a=>{if(a.type!=="declaration")return;const{property:s,value:o}=a;i?t(s,o,a):o&&(r=r||{},r[s]=o)}),r}var gC=/\d/,yC=["-","_","/","."];function bC(e=""){if(!gC.test(e))return e!==e.toLowerCase()}function _C(e){const t=[];let r="",n,i;for(const a of e){const s=yC.includes(a);if(s===!0){t.push(r),r="",n=void 0;continue}const o=bC(a);if(i===!1){if(n===!1&&o===!0){t.push(r),r=a,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+a,n=o;continue}}r+=a,n=o,i=s}return t.push(r),t}function Dm(e){return e?_C(e).map(t=>kC(t)).join(""):""}function wC(e){return SC(Dm(e||""))}function kC(e){return e?e[0].toUpperCase()+e.slice(1):""}function SC(e){return e?e[0].toLowerCase()+e.slice(1):""}function Ka(e){if(!e)return{};const t={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){t[Dm(n)]=i;return}if(n.startsWith("--")){t[n]=i;return}t[wC(n)]=i}return vC(e,r),t}function Ya(...e){return(...t)=>{for(const r of e)typeof r=="function"&&r(...t)}}function EC(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 xC=EC(/[A-Z]/,e=>`-${e.toLowerCase()}`);function TC(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=>`${xC(t)}: ${e[t]};`).join(`
|
|
79
79
|
`)}function Ja(e={}){return TC(e).replace(`
|
|
80
|
-
`," ")}var AC=["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"],CC=new Set(AC);function OC(e){return CC.has(e)}function Ye(...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 a=t[i],s=n[i],o=typeof a=="function",l=typeof s=="function";if(o&&OC(i))t[i]=xm(a,s);else if(o&&l)t[i]=Ya(a,s);else if(i==="class"){const c=Wu(a),f=Wu(s);c&&f?t[i]=Rs(a,s):c?t[i]=Rs(a):f&&(t[i]=Rs(s))}else if(i==="style"){const c=typeof a=="object",f=typeof s=="object",u=typeof a=="string",p=typeof s=="string";if(c&&f)t[i]={...a,...s};else if(c&&p){const h=Ka(s);t[i]={...a,...h}}else if(u&&f)t[i]={...Ka(a),...s};else if(u&&p){const h=Ka(a),
|
|
81
|
-
`," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Im={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%)"},DC=Ja(Im),Pm=typeof window<"u"?window:void 0,PN=typeof window<"u"?window.document:void 0,MN=typeof window<"u"?window.navigator:void 0,$N=typeof window<"u"?window.location:void 0;function IC(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var PC=class extends Map{#e=new Map;#t=se(0);#r=se(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?se(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.#a(),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),a=super.set(e,t),s=this.#t;if(n===void 0)n=this.#i(0),r.set(e,n),F(this.#r,super.size),zr(s);else if(i!==t){zr(n);var o=s.reactions===null?null:new Set(s.reactions);(o===null||!n.reactions?.every(l=>o.has(l)))&&zr(s)}return a}delete(e){var t=this.#e,r=t.get(e),n=super.delete(e);return r!==void 0&&(t.delete(e),F(r,-1)),n&&(F(this.#r,super.size),zr(this.#t)),n}clear(){if(super.size!==0){super.clear();var e=this.#e;F(this.#r,0);for(var t of e.values())F(t,-1);zr(this.#t),e.clear()}}#a(){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.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return d(this.#r),super.size}},MC=class{#e;#t;constructor(e={}){const{window:t=Pm,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=kl(n=>{const i=bt(t,"focusin",n),a=bt(t,"focusout",n);return()=>{i(),a()}}))}get current(){return this.#t?.(),this.#e?IC(this.#e):null}},FN=new MC;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 $b(this.#t)}get(){const e=Cd(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=Cd(this.#t);return t===void 0?e:t}set(e){return Mb(this.#t,e)}};function FC(e,t){switch(e){case"post":ve(t);break;case"pre":Dl(t);break}}function Hu(e,t,r,n={}){const{lazy:i=!1}=n;let a=!i,s=Array.isArray(e)?[]:void 0;FC(t,()=>{const o=Array.isArray(e)?e.map(c=>c()):e();if(!a){a=!0,s=o;return}const l=Re(()=>r(o,s));return s=o,l})}function Mm(e,t,r){const n=wa(()=>{let i=!1;Hu(e,t,(a,s)=>{if(i){n();return}const o=r(a,s);return i=!0,o},{lazy:!0})});ve(()=>n)}function at(e,t,r){Hu(e,"post",t,r)}function NC(e,t,r){Hu(e,"pre",t,r)}at.pre=NC;function RC(e,t){Mm(e,"post",t)}function LC(e,t){Mm(e,"pre",t)}RC.pre=LC;function $m(e){return $C(e)?e():e}var zC=class{#e={width:0,height:0};#t=!1;#r;#n;#i;#a=P(()=>(d(this.#o)?.(),this.getSize().width));#s=P(()=>(d(this.#o)?.(),this.getSize().height));#o=P(()=>{const e=$m(this.#n);if(e)return kl(t=>{if(!this.#i)return;const r=new this.#i.ResizeObserver(n=>{this.#t=!0;for(const i of n){const a=this.#r.box==="content-box"?i.contentBoxSize:i.borderBoxSize,s=Array.isArray(a)?a:[a];this.#e.width=s.reduce((o,l)=>Math.max(o,l.inlineSize),0),this.#e.height=s.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??Pm,this.#r=t,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=$m(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),a=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),s=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),o=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth);return{width:t-i-s,height:r-a-o}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return d(this.#o)?.(),this.getSize()}get width(){return d(this.#a)}get height(){return d(this.#s)}};function qC(e,t){let r,n=null;return(...i)=>new Promise(a=>{n&&n(void 0),n=a,clearTimeout(r),r=setTimeout(async()=>{const s=await e(...i);n&&(n(s),n=null)},t)})}function UC(e,t){let r=0,n=null;return(...i)=>{const a=Date.now();return r&&a-r<t?n??Promise.resolve(void 0):(r=a,n=e(...i),n)}}function Fm(e,t,r={},n){const{lazy:i=!1,once:a=!1,initialValue:s,debounce:o,throttle:l}=r;let c=se(Pe(s)),f=se(!1),u=se(void 0),p=se(Pe([]));const h=()=>{d(p).forEach(S=>S()),F(p,[],!0)},g=S=>{F(p,[...d(p),S],!0)},v=async(S,T,A=!1)=>{try{F(f,!0),F(u,void 0),h();const I=new AbortController;g(()=>I.abort());const M=await t(S,T,{data:d(c),refetching:A,onCleanup:g,signal:I.signal});return F(c,M,!0),M}catch(I){I instanceof DOMException&&I.name==="AbortError"||F(u,I,!0);return}finally{F(f,!1)}},m=o?qC(v,o):l?UC(v,l):v,y=Array.isArray(e)?e:[e];let E;return n((S,T)=>{a&&E||(E=S,m(Array.isArray(e)?S:S[0],Array.isArray(e)?T:T?.[0]))},{lazy:i}),{get current(){return d(c)},get loading(){return d(f)},get error(){return d(u)},mutate:S=>{F(c,S,!0)},refetch:S=>{const T=y.map(A=>A());return m(Array.isArray(e)?T:T[0],Array.isArray(e)?T:T[0],S??!0)}}}function BC(e,t,r){return Fm(e,t,r,(n,i)=>{const a=Array.isArray(e)?e:[e];at(()=>a.map(o=>o()),(o,l)=>{n(o,l??[])},i)})}function VC(e,t,r){return Fm(e,t,r,(n,i)=>{const a=Array.isArray(e)?e:[e],s=()=>a.map(o=>o());at.pre(s,(o,l)=>{n(o,l??[])},i)})}BC.pre=VC;function ii(e){ve(()=>()=>{e()})}function jC(e,t){return setTimeout(t,e)}function Qa(e){pf().then(e)}var ZC=1,WC=9,HC=11;function Gu(e){return Ga(e)&&e.nodeType===ZC&&typeof e.nodeName=="string"}function Nm(e){return Ga(e)&&e.nodeType===WC}function GC(e){return Ga(e)&&e.constructor?.name==="VisualViewport"}function KC(e){return Ga(e)&&e.nodeType!==void 0}function Rm(e){return KC(e)&&e.nodeType===HC&&"host"in e}function YC(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&&Rm(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function bo(e){return Nm(e)?e:GC(e)?e.document:e?.ownerDocument??document}function Lm(e){return Rm(e)?Lm(e.host):Nm(e)?e.defaultView??window:Gu(e)?e.ownerDocument?.defaultView??window:window}function JC(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var Vi=class{element;#e=P(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return d(this.#e)}set root(e){F(this.#e,e)}constructor(e){typeof e=="function"?this.element=z(e):this.element=e}getDocument=()=>bo(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>JC(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 tt(e,t){return{[D_()]:r=>Em(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 zm(e){return e?"open":"closed"}function QC(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}var XC=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 _o(e){const t=new XC(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Yu="ArrowDown",qm="ArrowLeft",Um="ArrowRight",Ju="ArrowUp",eO="Backspace",tO="Enter",NN="Escape",RN=" ",LN="Tab",zN="a",qN="P",UN="A",BN="p",ln=typeof document<"u",Bm=rO();function rO(){return ln&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Ar(e){return e instanceof HTMLElement}function ai(e){return e instanceof Element}function nO(e){return e instanceof Element||e instanceof SVGElement}function wo(e){return!Number.isNaN(Number(e))&&!Number.isNaN(Number.parseFloat(e))}function Fn(e){return e===null}function ko(e){return e.pointerType==="touch"}function iO(e){return e!==null}var aO=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.#a(e);return}const r=this.#n,n=()=>{r===this.#n&&this.#a(e)},i=()=>{if(r!==this.#n)return;const s=t.getAnimations();if(s.length===0){n();return}Promise.all(s.map(o=>o.finished)).then(()=>{n()}).catch(()=>{if(r===this.#n){if(t.getAnimations().some(o=>o.pending||o.playState!=="finished")){i();return}n()}})},a=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,i()})};if(!this.#e.afterTick.current){a();return}this.#t=window.requestAnimationFrame(()=>{this.#t=null;const s="data-starting-style";if(!t.hasAttribute(s)){a();return}this.#r=new MutationObserver(()=>{r===this.#n&&(t.hasAttribute(s)||(this.#r?.disconnect(),this.#r=null,a()))}),this.#r.observe(t,{attributes:!0,attributeFilter:[s]})})}#a(e){const t=()=>{e()};this.#e.afterTick?Qa(t):t()}},Vm=class{#e;#t;#r;#n=se(!1);#i=se(void 0);#a=!1;#s=null;constructor(e){this.#e=e,F(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new aO({ref:this.#e.ref,afterTick:this.#e.open}),ii(()=>this.#o()),at(()=>this.#e.open.current,t=>{if(!this.#a){this.#a=!0;return}if(this.#o(),!t&&this.#e.shouldSkipExitAnimation?.()){F(this.#n,!1),F(this.#i,void 0),this.#e.onComplete?.();return}if(t&&F(this.#n,!0),F(this.#i,t?"starting":"ending",!0),t&&(this.#s=window.requestAnimationFrame(()=>{this.#s=null,this.#e.open.current&&F(this.#i,void 0)})),!this.#t){t||F(this.#n,!1),F(this.#i,void 0),this.#e.onComplete?.();return}this.#r.run(()=>{t===this.#e.open.current&&(this.#e.open.current||F(this.#n,!1),F(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return d(this.#n)}get transitionStatus(){return d(this.#i)}#o(){this.#s!==null&&(window.cancelAnimationFrame(this.#s),this.#s=null)}};function xe(){}function $e(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var sO=new Ft("BitsConfig");function oO(){const e=new lO(null,{});return sO.getOr(e).opts}var lO=class{opts;constructor(e,t){const r=uO(e,t);this.opts={defaultPortalTo:r(n=>n.defaultPortalTo),defaultLocale:r(n=>n.defaultLocale)}}};function uO(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 jm(e,t){return r=>{const n=oO();return z(()=>{const i=r();if(i!==void 0)return i;const a=e(n).current;return a!==void 0?a:t})}}var Zm=jm(e=>e.defaultLocale,"en"),VN=jm(e=>e.defaultPortalTo,"body"),cO=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 bt(e,this.eventName,n,r)}};function Wm(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 Hm(e,t){return e===t||e.contains(t)}function Gm(e){return e?.ownerDocument??document}function dO(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 Km=["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] *)"],So=Km.join(","),Ym=typeof Element>"u",si=Ym?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Eo=!Ym&&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},xo=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]"):xo(t.parentNode))},fO=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Jm=function(t,r,n){if(xo(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(So));return r&&si.call(t,So)&&i.unshift(t),i=i.filter(n),i},To=function(t,r,n){for(var i=[],a=Array.from(t);a.length;){var s=a.shift();if(!xo(s,!1))if(s.tagName==="SLOT"){var o=s.assignedElements(),l=To(o.length?o:s.children,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:s,candidates:l})}else{si.call(s,So)&&n.filter(s)&&(r||!t.includes(s))&&i.push(s);var c=s.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(s),f=!xo(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(c&&f){var u=To(c===!0?s.children:c.children,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:s,candidates:u})}else a.unshift.apply(a,s.children)}}return i},Qm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Xm=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||fO(t))&&!Qm(t)?0:t.tabIndex},hO=function(t,r){var n=Xm(t);return n<0&&r&&!Qm(t)?0:n},pO=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},ev=function(t){return t.tagName==="INPUT"},mO=function(t){return ev(t)&&t.type==="hidden"},vO=function(t){return t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"})},gO=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},yO=function(t){if(!t.name)return!0;var r=t.form||Eo(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(s){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",s.message),!1}var a=gO(i,t.form);return!a||a===t},bO=function(t){return ev(t)&&t.type==="radio"},_O=function(t){return bO(t)&&!yO(t)},wO=function(t){var r,n=t&&Eo(t),i=(r=n)===null||r===void 0?void 0:r.host,a=!1;if(n&&n!==t){var s,o,l;for(a=!!((s=i)!==null&&s!==void 0&&(o=s.ownerDocument)!==null&&o!==void 0&&o.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!a&&i;){var c,f,u;n=Eo(i),i=(c=n)===null||c===void 0?void 0:c.host,a=!!((f=i)!==null&&f!==void 0&&(u=f.ownerDocument)!==null&&u!==void 0&&u.contains(i))}}return a},tv=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},kO=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 a=si.call(t,"details>summary:first-of-type")?t.parentElement:t;if(si.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var o=t.parentElement,l=Eo(t);if(o&&!o.shadowRoot&&i(o)===!0)return tv(t);t.assignedSlot?t=t.assignedSlot:!o&&l!==t.ownerDocument?t=l.host:t=o}t=s}if(wO(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return tv(t);return!1},SO=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 si.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},Ao=function(t,r){return!(r.disabled||mO(r)||kO(r,t)||vO(r)||SO(r))},Qu=function(t,r){return!(_O(r)||Xm(r)<0||!Ao(t,r))},EO=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},rv=function(t){var r=[],n=[];return t.forEach(function(i,a){var s=!!i.scopeParent,o=s?i.scopeParent:i,l=hO(o,s),c=s?rv(i.candidates):o;l===0?s?r.push.apply(r,c):r.push(o):n.push({documentOrder:a,tabIndex:l,item:i,isScope:s,content:c})}),n.sort(pO).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(r)},xO=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:EO}):n=Jm(t,r.includeContainer,Qu.bind(null,r)),rv(n)},TO=function(t,r){r=r||{};var n;return r.getShadowRoot?n=To([t],r.includeContainer,{filter:Ao.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=Jm(t,r.includeContainer,Ao.bind(null,r)),n},AO=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return si.call(t,So)===!1?!1:Qu(r,t)},CO=Km.concat("iframe:not([inert]):not([inert] *)").join(","),OO=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return si.call(t,CO)===!1?!1:Ao(r,t)};function DO(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 IO="data-context-menu-trigger",PO="data-context-menu-content",jN=new Ft("Menu.Root"),ZN=new Ft("Menu.Root | Menu.Sub"),WN=new Ft("Menu.Content"),HN=new Ft("Menu.Group | Menu.RadioGroup"),GN=new Ft("Menu.RadioGroup"),KN=new Ft("Menu.CheckboxGroup"),YN=new cO("bitsmenuopen",{bubbles:!1,cancelable:!0}),JN=_o({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 MO=class wy{static create(t){return new wy(t)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#a=void 0;#s;#o=xe;constructor(t){this.opts=t,this.#t=t.interactOutsideBehavior,this.#e=t.onInteractOutside,this.#s=t.onFocusOutside,ve(()=>{this.#a=Gm(this.opts.ref.current)});let r=xe;const n=()=>{this.#v(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),r()};at([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return jC(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.#o(),r()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Qa(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#s.current?.(t)})};#u(){return Ya(bt(this.#a,"pointerdown",Ya(this.#h,this.#f),{capture:!0}),bt(this.#a,"pointerdown",Ya(this.#p,this.#d)),bt(this.#a,"focusin",this.#l))}#c=t=>{let r=t;r.defaultPrevented&&(r=nv(t)),this.#e.current(t)};#d=Wm(t=>{if(!this.opts.ref.current){this.#o();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||NO(t,this.opts.ref.current);if(!this.#n||this.#y()||!r){this.#o();return}let n=t;if(n.defaultPrevented&&(n=nv(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#o();return}t.pointerType==="touch"?(this.#o(),this.#o=bt(this.#a,"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=FO(this.opts.ref.current))};#m=t=>this.opts.ref.current?Hm(this.opts.ref.current,t):!1;#v=Wm(()=>{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 FO(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 NO(e,t){const r=e.target;if(!nO(r))return!1;const n=!!r.closest(`[${IO}]`),i=!!t.closest(`[${PO}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:Gm(r).documentElement.contains(r)&&!Hm(t,r)&&dO(e,t)}function nv(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:(a,s)=>s==="currentTarget"?t:s==="target"?r:s==="preventDefault"?()=>{i=!0,typeof a.preventDefault=="function"&&a.preventDefault()}:s==="defaultPrevented"?i:s in a?a[s]:e[s]})}function iv(e,t){te(t,!0);let r=_(t,"interactOutsideBehavior",7,"close"),n=_(t,"onInteractOutside",7,xe),i=_(t,"onFocusOutside",7,xe),a=_(t,"id",7),s=_(t,"children",7),o=_(t,"enabled",7),l=_(t,"isValidEvent",7,()=>!1),c=_(t,"ref",7);const f=MO.create({id:z(()=>a()),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 a()},set id(g){a(g),b()},get children(){return s()},set children(g){s(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=ie(),h=B(p);return Se(h,()=>s()??qe,()=>({props:f.props})),x(e,p),re(u)}ne(iv,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;var RO=class ky{static create(t){return new ky(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new Vi(this.opts.ref);let r=xe;at(()=>t.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>bt(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=t=>{if(t.key!=="Escape"||!LO(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 LO(e){const t=[...globalThis.bitsEscapeLayers],r=t.findLast(([i,{current:a}])=>a==="close"||a==="ignore");if(r)return r[0]===e;const[n]=t[0];return n===e}function av(e,t){te(t,!0);let r=_(t,"escapeKeydownBehavior",7,"close"),n=_(t,"onEscapeKeydown",7,xe),i=_(t,"children",7),a=_(t,"enabled",7),s=_(t,"ref",7);RO.create({escapeKeydownBehavior:z(()=>r()),onEscapeKeydown:z(()=>n()),enabled:z(()=>a()),ref:s()});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 a()},set enabled(f){a(f),b()},get ref(){return s()},set ref(f){s(f),b()}},l=ie(),c=B(l);return Se(c,()=>i()??qe),x(e,l),re(o)}ne(av,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});var zO=class Sy{static instance;#e=xr([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new Sy),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)}},qO=class Ey{#e=!1;#t=null;#r=zO.getInstance();#n=[];#i;constructor(t){this.#i=t}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#a(){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.#s()}unmount(){this.#t&&(this.#a(),this.#o(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#t=null)}#s(){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()})}#o(){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=s=>{if(this.#e||!this.#r.isActiveScope(this))return;const o=s.target;if(o)if(t.contains(o))this.#r.setFocusMemory(this,o);else{const l=this.#r.getFocusMemory(this);if(l&&t.contains(l)&&OO(l))s.preventDefault(),l.focus();else{const c=this.#c(),f=this.#d()[0];(c||f||t).focus()}}},i=s=>{if(!this.#i.loop||this.#e||s.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];!s.shiftKey&&r.activeElement===c?(s.preventDefault(),l.focus()):s.shiftKey&&r.activeElement===l&&(s.preventDefault(),c.focus())};this.#n.push(bt(r,"focusin",n,{capture:!0}),bt(t,"keydown",i));const a=new MutationObserver(()=>{const s=this.#r.getFocusMemory(this);if(s&&!t.contains(s)){const o=this.#c(),l=this.#d()[0],c=o||l;c?(c.focus(),this.#r.setFocusMemory(this,c)):t.focus()}});a.observe(t,{childList:!0,subtree:!0}),this.#n.push(()=>a.disconnect())}#u(){return this.#t?xO(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#c(){return this.#u()[0]||null}#d(){return this.#t?TO(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let r=null;return at([()=>t.ref.current,()=>t.enabled.current],([n,i])=>{n&&i?(r||(r=new Ey(t)),r.mount(n)):r&&(r.unmount(),r=null)}),ii(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}};function sv(e,t){te(t,!0);let r=_(t,"enabled",7,!1),n=_(t,"trapFocus",7,!1),i=_(t,"loop",7,!1),a=_(t,"onCloseAutoFocus",7,xe),s=_(t,"onOpenAutoFocus",7,xe),o=_(t,"focusScope",7),l=_(t,"ref",7);const c=qO.use({enabled:z(()=>r()),trap:z(()=>n()),loop:i(),onCloseAutoFocus:z(()=>a()),onOpenAutoFocus:z(()=>s()),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 a()},set onCloseAutoFocus(h=xe){a(h),b()},get onOpenAutoFocus(){return s()},set onOpenAutoFocus(h=xe){s(h),b()},get focusScope(){return o()},set focusScope(h){o(h),b()},get ref(){return l()},set ref(h){l(h),b()}},u=ie(),p=B(u);return Se(p,()=>o()??qe,()=>({props:c.props})),x(e,u),re(f)}ne(sv,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"});var ov=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var UO=class xy{static create(t){return new xy(t)}opts;domContext;#e=xe;#t=!1;#r=ov;#n=ov;constructor(t){this.opts=t,this.domContext=new Vi(t.ref);let r=xe;at(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([n,i,a])=>(this.#t=n,this.#r=i,this.#n=a,n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#i()),()=>{this.#t=!1,r(),this.#o(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return Ya(bt(this.domContext.getDocument(),"pointerdown",this.#s),bt(this.domContext.getDocument(),"pointerup",xm(this.#o,this.#a)))}#a=t=>{this.#n(t)};#s=t=>{const r=this.opts.ref.current,n=t.target;!Ar(r)||!Ar(n)||!this.#t||!VO(this)||!YC(r,n)||(this.#r(t),!t.defaultPrevented&&(this.#e=BO(r,this.domContext.getDocument().body)))};#o=()=>{this.#e(),this.#e=xe}},lv=e=>e.style.userSelect||e.style.webkitUserSelect;function BO(e,t){const r=lv(t),n=lv(e);return Co(t,"none"),Co(e,"text"),()=>{Co(t,r),Co(e,n)}}function Co(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function VO(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function uv(e,t){te(t,!0);let r=_(t,"preventOverflowTextSelection",7,!0),n=_(t,"onPointerDown",7,xe),i=_(t,"onPointerUp",7,xe),a=_(t,"id",7),s=_(t,"children",7),o=_(t,"enabled",7),l=_(t,"ref",7);UO.create({id:z(()=>a()),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 a()},set id(p){a(p),b()},get children(){return s()},set children(p){s(p),b()},get enabled(){return o()},set enabled(p){o(p),b()},get ref(){return l()},set ref(p){l(p),b()}},f=ie(),u=B(f);return Se(u,()=>s()??qe),x(e,f),re(c)}ne(uv,{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 jO=class{#e;#t=0;#r=se();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),F(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,d(this.#r)===void 0&&(this.#n=wa(()=>{F(this.#r,this.#e(...e),!0)})),ve(()=>()=>{this.#i()}),d(this.#r)}},Oo=new PC,Do=se(null),ec=null,Xa=null,es=!1,cv=z(()=>{for(const e of Oo.values())if(e)return!0;return!1}),tc=null,ZO=new jO(()=>{function e(){document.body.setAttribute("style",d(Do)??""),document.body.style.removeProperty("--scrollbar-width"),Bm&&ec?.(),F(Do,null)}function t(){Xa!==null&&(window.clearTimeout(Xa),Xa=null)}function r(i,a){t(),es=!0,tc=Date.now();const s=tc,o=()=>{Xa=null,tc===s&&(dv(Oo)?es=!1:(es=!1,a()))},l=i===null?24:i;Xa=window.setTimeout(o,l)}function n(){d(Do)===null&&Oo.size===0&&!es&&F(Do,document.body.getAttribute("style"),!0)}return at(()=>cv.current,()=>{if(!cv.current)return;n(),es=!1;const i=getComputedStyle(document.documentElement),a=getComputedStyle(document.body),s=i.scrollbarGutter?.includes("stable")||a.scrollbarGutter?.includes("stable"),o=window.innerWidth-document.documentElement.clientWidth,l={padding:Number.parseInt(a.paddingRight??"0",10)+o,margin:Number.parseInt(a.marginRight??"0",10)};o>0&&!s&&(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",Bm&&(ec=bt(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),Qa(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),ii(()=>()=>{ec?.()}),{get lockMap(){return Oo},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}}),WO=class{#e=Nn();#t;#r=()=>null;#n;locked;constructor(e,t=()=>null){this.#t=e,this.#r=t,this.#n=ZO.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),dv(this.#n.lockMap))return;const r=this.#r();this.#n.scheduleCleanupIfNoNewLocks(r,()=>{this.#n.resetBodyStyle()})}))}};function dv(e){for(const[t,r]of e)if(r)return!0;return!1}function rc(e,t){te(t,!0);let r=_(t,"preventScroll",7,!0),n=_(t,"restoreScrollDelay",7,null);return r()&&new WO(r(),()=>n()),re({get preventScroll(){return r()},set preventScroll(i=!0){r(i),b()},get restoreScrollDelay(){return n()},set restoreScrollDelay(i=null){n(i),b()}})}ne(rc,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function HO(e){if(!ln||!e)return null;let t=e.querySelector("[data-bits-announcer]");const r=i=>{const a=e.createElement("div");return a.role="log",a.ariaLive=i,a.setAttribute("aria-relevant","additions"),a};if(!Ar(t)){const i=e.createElement("div");i.style.cssText=DC,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(!Ar(t))return null;const a=t.querySelector(`[aria-live="${i}"]`);return Ar(a)?a:null}}}function Io(e){const t=HO(e);function r(n,i="assertive",a=7500){if(!t||!ln||!e)return;const s=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"?s?.replaceChildren(o):s?.appendChild(o),setTimeout(()=>{o.remove()},a)}return{announce:r}}var GO={defaultValue:void 0,granularity:"day"};function fv(e){const{defaultValue:t,granularity:r,minValue:n,maxValue:i}={...GO,...e};if(Array.isArray(t)&&t.length)return t[t.length-1];if(t&&!Array.isArray(t))return t;{let a=new Date;n&&a<n.toDate(er())?a=n.toDate(er()):i&&a>i.toDate(er())&&(a=i.toDate(er()));const s=a.getFullYear(),o=a.getMonth()+1,l=a.getDate();return["hour","minute","second"].includes(r??"day")?new Mi(s,o,l,0,0,0):new za(s,o,l)}}function hv(e,t){let r;return t instanceof Mn?r=cp(e):t instanceof Mi?r=up(e):r=oo(e),r.calendar!==t.calendar?tr(r,t.calendar):r}function Wt(e,t=er()){return e instanceof Mn?e.toDate():e.toDate(t)}function KO(e){if(e instanceof za)return"date";if(e instanceof Mi)return"datetime";if(e instanceof Mn)return"zoneddatetime";throw new Error("Unknown date type")}function YO(e,t){switch(t){case"date":return oo(e);case"datetime":return up(e);case"zoneddatetime":return cp(e);default:throw new Error(`Unknown date type: ${t}`)}}function JO(e){return e instanceof Mi}function nc(e){return e instanceof Mn}function Po(e){return JO(e)||nc(e)}function ts(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 QO(e,t){return e.compare(t)>0}function pv(e,t,r){const n=Hh(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function mv(e,t,r){const n=Hh(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 Mo=["day","month","year"],$o=["hour","minute","second","dayPeriod"],vv=["literal","timeZoneName"],rs=[...Mo,...$o],gv=[...rs,...vv],XO=[...$o,...vv],QN=gv.filter(e=>e!=="literal"),XN=XO.filter(e=>e!=="literal"),eD=["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"],tD=["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 rD(e){if(yv(e))return ic[e];{const t=sD(e);return yv(t)?ic[t]:ic.en}}function ac(e,t,r){return nD(e)?rD(r)[e]:aD(e)?t:iD(e)?"––":""}function yv(e){return eD.includes(e)}function nD(e){return tD.includes(e)}function iD(e){return e==="hour"||e==="minute"||e==="second"}function aD(e){return e==="era"||e==="dayPeriod"}function sD(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function sc(e){const t=["hour","minute","second"],r=rs.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 oD(e){const{segmentValues:t,formatter:r,locale:n,dateRef:i}=e,a=Object.keys(t).reduce((o,l)=>{if(!_v(l))return o;if("hour"in t&&l==="dayPeriod"){const c=t[l];Fn(c)?o[l]=ac(l,"AM",n):o[l]=c}else o[l]=s(l);return o},{});function s(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&&kv(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 ac(o,"",n)}else{if(Fo(o)){const l=t[o],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(Fn(l))return ac(o,"",n);{const f=r.part(i.set({[o]:l}),o);return o==="year"?`${l}`:c&&f.length===1?`0${f}`:f}}return""}}return a}function lD(e){const{granularity:t,dateRef:r,formatter:n,contentObj:i,hideTimeZone:a,hourCycle:s}=e;return n.toParts(r,cD(t,s)).map(o=>["literal","dayPeriod","timeZoneName",null].includes(o.type)||!_v(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)||a)))}function uD(e){const t=oD(e);return{obj:t,arr:lD({contentObj:t,...e})}}function cD(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 bv(){return rs.reduce((e,t)=>(e[t]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},e),{})}function Fo(e){return Mo.includes(e)}function _v(e){return rs.includes(e)}function dD(e){return gv.includes(e)}function wv(e){return!ln||!e?[]:No(e).map(t=>t.dataset.segment).filter(t=>rs.includes(t))}function fD(e){const{segmentObj:t,fieldNode:r,dateRef:n}=e,i=wv(r);let a=n;for(const s of i)if("hour"in t){const o=t[s];if(Fn(o))continue;a=a.set({[s]:t[s]})}else if(Fo(s)){const o=t[s];if(Fn(o))continue;a=a.set({[s]:t[s]})}return a}function hD(e,t){const r=wv(t);for(const n of r)if("hour"in e){if(e[n]===null)return!1}else if(Fo(n)&&e[n]===null)return!1;return!0}function pD(e){return typeof e!="object"||e===null?!1:Object.entries(e).every(([t,r])=>($o.includes(t)||Mo.includes(t))&&(t==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function mD(e,t){return t||(Po(e)?"minute":"day")}function oc(e){return!!(["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Backspace"," "].includes(e)||wo(e))}function vD(e,t){if(!ln)return!1;const r=No(t);return r.length?r[0].id===e:!1}function gD(e){const{id:t,formatter:r,value:n,doc:i}=e;if(!ln)return;const a=r.selectedDate(n),s=i.getElementById(t);if(s)s.innerText=`Selected Date: ${a}`;else{const o=i.createElement("div");o.style.cssText=Ja({display:"none"}),o.id=t,o.innerText=`Selected Date: ${a}`,i.body.appendChild(o)}}function yD(e,t){if(!ln)return;const r=t.getElementById(e);r&&t.body.removeChild(r)}function kv(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 ns(e,t){const r=e.currentTarget;if(!Ar(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 bD(e,t){const r=t.indexOf(e);return r===t.length-1||r===-1?null:t[r+1]}function _D(e,t){const r=t.indexOf(e);return r===0||r===-1?null:t[r-1]}function lc(e,t){const r=No(t);return r.length?{next:bD(e,r),prev:_D(e,r)}:{next:null,prev:null}}function Sv(e,t){const r=e.currentTarget;if(!Ar(r))return;const{next:n}=lc(r,t);n&&n.focus()}function Ev(e,t){const r=e.currentTarget;if(!Ar(r))return;const{prev:n}=lc(r,t);n&&n.focus()}function is(e){return e==="ArrowRight"||e==="ArrowLeft"}function No(e){return e?Array.from(e.querySelectorAll("[data-segment]")).filter(t=>{if(!Ar(t))return!1;const r=t.dataset.segment;return r==="trigger"?!0:!(!dD(r)||r==="literal")}):[]}function wD(e){return No(e)[0]}var kD={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function xv(e){let t=e.initialLocale;function r(h){t=h}function n(){return t}function i(h,g){return new pr(t,g).format(h)}function a(h,g=!0){return Po(h)&&g?i(Wt(h),{dateStyle:"long",timeStyle:"long"}):i(Wt(h),{dateStyle:"long"})}function s(h){return typeof e.monthFormat.current!="function"&&typeof e.yearFormat.current!="function"?new pr(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(h):`${typeof e.monthFormat.current=="function"?e.monthFormat.current(h.getMonth()+1):new pr(t,{month:e.monthFormat.current}).format(h)} ${typeof e.yearFormat.current=="function"?e.yearFormat.current(h.getFullYear()):new pr(t,{year:e.yearFormat.current}).format(h)}`}function o(h){return new pr(t,{month:"long"}).format(h)}function l(h){return new pr(t,{year:"numeric"}).format(h)}function c(h,g){return nc(h)?new pr(t,{...g,timeZone:h.timeZone}).formatToParts(Wt(h)):new pr(t,g).formatToParts(Wt(h))}function f(h,g="narrow"){return new pr(t,{weekday:g}).format(h)}function u(h,g=void 0){return new pr(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,{...kD,...v}).find(y=>y.type===g);return m?m.value:""}return{setLocale:r,getLocale:n,fullMonth:o,fullYear:l,fullMonthAndYear:s,toParts:c,custom:i,part:p,dayPeriod:u,selectedDate:a,dayOfWeek:f}}function SD(e){return!(!Ar(e)||!e.hasAttribute("data-bits-day"))}function Tv(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,a=ts(t),s=Array.from({length:a},(v,m)=>t.set({day:m+1})),o=yu(t),l=aE(t),c=r!==void 0?pv(o,r,"en-US"):pv(o,0,i),f=r!==void 0?mv(l,r,"en-US"):mv(l,0,i),u=Tv(c.subtract({days:1}),o),p=Tv(l,f.add({days:1})),h=u.length+s.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 E=Array.from({length:y},(S,T)=>{const A=T+1;return m.add({days:A})});p.push(...E)}const g=u.concat(s,p);return{value:t,dates:g,weeks:DO(g,7)}}function as(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 a=1;a<t;a++){const s=r.add({months:a});i.push(uc({...n,dateObj:s}))}return i}function cc(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(t=>Ar(t)):[]}function Av(e,t){const r=e.getAttribute("data-value");r&&(t.current=hv(r,t.current))}function ED({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:a,months:s,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 Av(f,r),f.focus()}if(c<0){if(i)return;const f=s[0]?.value;if(!f)return;r.current=f.subtract({months:o}),Qa(()=>{const u=cc(n);if(!u.length)return;const p=u.length-Math.abs(c);if(Xu(p,u)){const h=u[p];return Av(h,r),h.focus()}})}if(c>=l.length){if(a)return;const f=s[0]?.value;if(!f)return;r.current=f.add({months:o}),Qa(()=>{const u=cc(n);if(!u.length)return;const p=c-l.length;if(Xu(p,u))return u[p].focus()})}}var Cv=[Yu,Ju,qm,Um],Ov=[tO," "];function xD({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!SD(i)||!Cv.includes(e.key)&&!Ov.includes(e.key))return;e.preventDefault();const a={[Yu]:7,[Ju]:-7,[qm]:-1,[Um]:1};if(Cv.includes(e.key)){const s=a[e.key];s!==void 0&&r(i,s)}if(Ov.includes(e.key)){const s=i.getAttribute("data-value");if(!s)return;t(e,hv(s,n))}}function TD({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:a,fixedWeeks:s,setPlaceholder:o}){const l=e[0]?.value;if(l)if(n)o(l.add({months:r}));else{const c=l.add({months:1}),f=as({dateObj:c,weekStartsOn:i,locale:a,fixedWeeks:s,numberOfMonths:r});o(c),t(f)}}function AD({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:a,fixedWeeks:s,setPlaceholder:o}){const l=e[0]?.value;if(l)if(n)o(l.subtract({months:r}));else{const c=l.subtract({months:1}),f=as({dateObj:c,weekStartsOn:i,locale:a,fixedWeeks:s,numberOfMonths:r});o(c),t(f)}}function CD({months:e,formatter:t,weekdayFormat:r}){if(!e.length)return[];const n=e[0].weeks[0];return n?n.map(i=>t.dayOfWeek(Wt(i),r)):[]}function OD(e){ve(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;Re(()=>{const a=e.placeholder.current;if(!a)return;const s={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(as({...s,dateObj:a}))})})}function DD({calendarNode:e,label:t,accessibleHeadingId:r}){const n=bo(e),i=n.createElement("div");i.style.cssText=Ja({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 a=n.createElement("div");return a.textContent=t,a.id=r,a.role="heading",a.ariaLevel="2",e.insertBefore(i,e.firstChild),i.appendChild(a),()=>{const s=n.getElementById(r);s&&(i.parentElement?.removeChild(i),s.remove())}}function ID({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:a,setMonths:s}){ve(()=>{e.current,Re(()=>{t().some(o=>vu(o,e.current))||s(as({weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:a.current,dateObj:e.current}))})})}function PD({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?QO(n.add({months:1}).set({day:1}),e):!1}function MD({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 $D({months:e,locale:t,formatter:r}){if(!e.length)return"";if(t!==r.getLocale()&&r.setLocale(t),e.length===1){const c=Wt(e[0].value);return`${r.fullMonthAndYear(c)}`}const n=Wt(e[0].value),i=Wt(e[e.length-1].value),a=r.fullMonth(n),s=r.fullMonth(i),o=r.fullYear(n),l=r.fullYear(i);return o===l?`${a} - ${s} ${l}`:`${a} ${o} - ${s} ${l}`}function FD({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 ND(e){const t=bo(e.target).querySelector("[data-bits-day][data-focused]");t&&(e.preventDefault(),t?.focus())}function RD(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 YO(n,i)}function LD({ref:e,placeholder:t,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:a}){function s(o){return!!(a.current(o)||n.current&&oi(o,n.current)||i.current&&oi(i.current,o))}at(()=>e.current,()=>{e.current&&t.current&&Dn(t.current,r)&&s(r)&&(t.current=RD(e.current)??r)})}function zD(e,t){return!e||!t?e:Po(e)&&Po(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}var qD=_o({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 UD(e){const t=new Date().getFullYear(),r=Math.max(e.placeholderYear,t);let n,i;if(e.minValue)n=e.minValue.year;else{const s=r-100;n=e.placeholderYear<s?e.placeholderYear-10:s}e.maxValue?i=e.maxValue.year:i=r+10,n>i&&(n=i);const a=i-n+1;return Array.from({length:a},(s,o)=>n+o)}var Cr=new Ft("Calendar.Root | RangeCalender.Root"),Dv=class Ty{static create(t){return Cr.set(new Ty(t))}opts;#e=P(()=>this.months.map(t=>t.value));get visibleMonths(){return d(this.#e)}set visibleMonths(t){F(this.#e,t)}formatter;accessibleHeadingId=Nn();domContext;attachment;#t=se(Pe([]));get months(){return d(this.#t)}set months(t){F(this.#t,t,!0)}announcer;constructor(t){this.opts=t,this.attachment=tt(this.opts.ref),this.domContext=new Vi(t.ref),this.announcer=Io(null),this.formatter=xv({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=Io(this.domContext.getDocument())}),this.months=as({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.#a(),this.#s(),this.#o(),ID({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}),OD({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),at(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),at(()=>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)}),LD({placeholder:t.placeholder,defaultPlaceholder:t.defaultPlaceholder,isDateDisabled:t.isDateDisabled,maxValue:t.maxValue,minValue:t.minValue,ref:t.ref})}setMonths(t){this.months=t}#r=P(()=>CD({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return d(this.#r)}set weekdays(t){F(this.#r,t)}#n=P(()=>Re(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return d(this.#n)}set initialPlaceholderYear(t){F(this.#n,t)}#i=P(()=>UD({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return d(this.#i)}set defaultYears(t){F(this.#i,t)}#a(){ve(()=>{if(Re(()=>this.opts.initialFocus.current)){const t=this.opts.ref.current?.querySelector("[data-focused]");t&&t.focus()}})}#s(){ve(()=>{if(this.opts.ref.current)return DD({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#o(){Dl(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){TD({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(){AD({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=P(()=>PD({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return d(this.#l)}set isNextButtonDisabled(t){F(this.#l,t)}#u=P(()=>MD({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return d(this.#u)}set isPrevButtonDisabled(t){F(this.#u,t)}#c=P(()=>{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){F(this.#c,t)}#d=P(()=>(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){F(this.#d,t)}#h=P(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return d(this.#h)}set fullCalendarLabel(t){F(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&&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 ED({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=zD(i,n),i!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(t,r){if(!t){const a=[r];return this.#p(a)?a:[r]}if(!Array.isArray(t))return;const n=t.findIndex(a=>Dn(a,r)),i=this.opts.preventDeselect.current;if(n===-1){const a=[...t,r];return this.#p(a)?a:[r]}else{if(i)return t;{const a=t.filter(s=>!Dn(s,r));if(!a.length){this.opts.placeholder.current=r;return}return a}}}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){xD({event:t,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#f=P(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return d(this.#f)}set snippetProps(t){F(this.#f,t)}getBitsAttr=t=>qD.getAttr(t);#m=P(()=>({...FD({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){F(this.#m,t)}},BD=class Ay{static create(t){return new Ay(t,Cr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref)}#e=P(()=>({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){F(this.#e,t)}},Iv=new Ft("Calendar.Cell | RangeCalendar.Cell"),VD=class Cy{static create(t){return Iv.set(new Cy(t,Cr.get()))}opts;root;#e=P(()=>Wt(this.opts.date.current));get cellDate(){return d(this.#e)}set cellDate(t){F(this.#e,t)}#t=P(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return d(this.#t)}set isUnavailable(t){F(this.#t,t)}#r=P(()=>eE(this.opts.date.current,er()));get isDateToday(){return d(this.#r)}set isDateToday(t){F(this.#r,t)}#n=P(()=>!vu(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return d(this.#n)}set isOutsideMonth(t){F(this.#n,t)}#i=P(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return d(this.#i)}set isOutsideVisibleMonths(t){F(this.#i,t)}#a=P(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return d(this.#a)}set isDisabled(t){F(this.#a,t)}#s=P(()=>Dn(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return d(this.#s)}set isFocusedDate(t){F(this.#s,t)}#o=P(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return d(this.#o)}set isSelectedDate(t){F(this.#o,t)}#l=P(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return d(this.#l)}set labelText(t){F(this.#l,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref)}#u=P(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return d(this.#u)}set snippetProps(t){F(this.#u,t)}#c=P(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return d(this.#c)}set ariaDisabled(t){F(this.#c,t)}#d=P(()=>({"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":KO(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){F(this.#d,t)}#h=P(()=>({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){F(this.#h,t)}},jD=class Oy{static create(t){return new Oy(t,Iv.get())}opts;cell;attachment;constructor(t,r){this.opts=t,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=tt(this.opts.ref)}#e=P(()=>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=P(()=>({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){F(this.#t,t)}#r=P(()=>({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){F(this.#r,t)}},ZD=class Dy{static create(t){return new Dy(t,Cr.get())}opts;root;#e=P(()=>this.root.isNextButtonDisabled);get isDisabled(){return d(this.#e)}set isDisabled(t){F(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=tt(this.opts.ref)}onclick(t){this.isDisabled||this.root.nextPage()}#t=P(()=>({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){F(this.#t,t)}},WD=class Iy{static create(t){return new Iy(t,Cr.get())}opts;root;#e=P(()=>this.root.isPrevButtonDisabled);get isDisabled(){return d(this.#e)}set isDisabled(t){F(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=tt(this.opts.ref)}onclick(t){this.isDisabled||this.root.prevPage()}#t=P(()=>({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){F(this.#t,t)}},HD=class Py{static create(t){return new Py(t,Cr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref)}#e=P(()=>({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){F(this.#e,t)}},GD=class My{static create(t){return new My(t,Cr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref)}#e=P(()=>({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){F(this.#e,t)}},KD=class $y{static create(t){return new $y(t,Cr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref)}#e=P(()=>({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){F(this.#e,t)}},YD=class Fy{static create(t){return new Fy(t,Cr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref)}#e=P(()=>({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){F(this.#e,t)}},JD=class Ny{static create(t){return new Ny(t,Cr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref)}#e=P(()=>({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){F(this.#e,t)}},QD=class Ry{static create(t){return new Ry(t,Cr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref)}#e=P(()=>({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){F(this.#e,t)}},XD=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"]),eI=q("<div><!></div>");function Pv(e,t){te(t,!0);let r=_(t,"child",7),n=_(t,"children",7),i=_(t,"id",23,Nn),a=_(t,"ref",15,null),s=_(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),E=_(t,"calendarLabel",7,"Event"),S=_(t,"disabled",7,!1),T=_(t,"readonly",7,!1),A=_(t,"minValue",7,void 0),I=_(t,"maxValue",7,void 0),M=_(t,"preventDeselect",7,!1),N=_(t,"type",7),j=_(t,"disableDaysOutsideMonth",7,!0),R=_(t,"initialFocus",7,!1),X=_(t,"maxDays",7),U=_(t,"monthFormat",7,"long"),le=_(t,"yearFormat",7,"numeric"),he=He(t,XD);const H=fv({defaultValue:s(),minValue:A(),maxValue:I()});function oe(){l()===void 0&&l(H)}oe(),at.pre(()=>l(),()=>{oe()});function W(){s()===void 0&&s(N()==="single"?void 0:[])}W(),at.pre(()=>s(),()=>{W()});const fe=Dv.create({id:z(()=>i()),ref:z(()=>a(),L=>a(L)),weekdayFormat:z(()=>f()),weekStartsOn:z(()=>u()),pagedNavigation:z(()=>p()),isDateDisabled:z(()=>h()),isDateUnavailable:z(()=>g()),fixedWeeks:z(()=>v()),numberOfMonths:z(()=>m()),locale:Zm(()=>y()),calendarLabel:z(()=>E()),readonly:z(()=>T()),disabled:z(()=>S()),minValue:z(()=>A()),maxValue:z(()=>I()),disableDaysOutsideMonth:z(()=>j()),initialFocus:z(()=>R()),maxDays:z(()=>X()),placeholder:z(()=>l(),L=>{l(L),c()(L)}),preventDeselect:z(()=>M()),value:z(()=>s(),L=>{s(L),o()(L)}),type:z(()=>N()),monthFormat:z(()=>U()),yearFormat:z(()=>le()),defaultPlaceholder:H}),ce=P(()=>Ye(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 a()},set ref(L=null){a(L),b()},get value(){return s()},set value(L){s(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 E()},set calendarLabel(L="Event"){E(L),b()},get disabled(){return S()},set disabled(L=!1){S(L),b()},get readonly(){return T()},set readonly(L=!1){T(L),b()},get minValue(){return A()},set minValue(L=void 0){A(L),b()},get maxValue(){return I()},set maxValue(L=void 0){I(L),b()},get preventDeselect(){return M()},set preventDeselect(L=!1){M(L),b()},get type(){return N()},set type(L){N(L),b()},get disableDaysOutsideMonth(){return j()},set disableDaysOutsideMonth(L=!0){j(L),b()},get initialFocus(){return R()},set initialFocus(L=!1){R(L),b()},get maxDays(){return X()},set maxDays(L){X(L),b()},get monthFormat(){return U()},set monthFormat(L="long"){U(L),b()},get yearFormat(){return le()},set yearFormat(L="numeric"){le(L),b()}},J=ie(),ee=B(J),$=L=>{var be=ie(),G=B(be);{let w=P(()=>({props:d(ce),...fe.snippetProps}));Se(G,r,()=>d(w))}x(L,be)},ae=L=>{var be=eI();Ue(be,()=>({...d(ce)}));var G=D(be);Se(G,()=>n()??qe,()=>fe.snippetProps),C(be),x(L,be)};return ue(ee,L=>{r()?L($):L(ae,-1)}),x(e,J),re(de)}ne(Pv,{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 tI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),rI=q("<div><!></div>");function dc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=He(t,tI);const l=jD.create({id:z(()=>s()),ref:z(()=>a(),v=>a(v))}),c=P(()=>Ye(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 a()},set ref(v=null){a(v),b()},get id(){return s()},set id(v=$e(r)){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),y=B(m);{let E=P(()=>({props:d(c),...l.snippetProps}));Se(y,i,()=>d(E))}x(v,m)},g=v=>{var m=rI();Ue(m,()=>({...d(c)}));var y=D(m),E=T=>{var A=ie(),I=B(A);Se(I,()=>n()??qe,()=>l.snippetProps),x(T,A)},S=T=>{var A=Vt();Y(()=>Z(A,l.cell.opts.date.current.day)),x(T,A)};ue(y,T=>{n()?T(E):T(S,-1)}),C(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),re(f)}ne(dc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var nI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),iI=q("<table><!></table>");function fc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=He(t,nI);const l=HD.create({id:z(()=>s()),ref:z(()=>a(),v=>a(v))}),c=P(()=>Ye(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 a()},set ref(v=null){a(v),b()},get id(){return s()},set id(v=$e(r)){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),y=B(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=iI();Ue(m,()=>({...d(c)}));var y=D(m);Se(y,()=>n()??qe),C(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),re(f)}ne(fc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var aI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),sI=q("<tbody><!></tbody>");function hc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=He(t,aI);const l=GD.create({id:z(()=>s()),ref:z(()=>a(),v=>a(v))}),c=P(()=>Ye(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 a()},set ref(v=null){a(v),b()},get id(){return s()},set id(v=$e(r)){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),y=B(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=sI();Ue(m,()=>({...d(c)}));var y=D(m);Se(y,()=>n()??qe),C(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),re(f)}ne(hc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var oI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]),lI=q("<td><!></td>");function pc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=_(t,"date",7),l=_(t,"month",7),c=He(t,oI);const f=VD.create({id:z(()=>s()),ref:z(()=>a(),y=>a(y)),date:z(()=>o()),month:z(()=>l())}),u=P(()=>Ye(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 a()},set ref(y=null){a(y),b()},get id(){return s()},set id(y=$e(r)){s(y),b()},get date(){return o()},set date(y){o(y),b()},get month(){return l()},set month(y){l(y),b()}},h=ie(),g=B(h),v=y=>{var E=ie(),S=B(E);{let T=P(()=>({props:d(u),...f.snippetProps}));Se(S,i,()=>d(T))}x(y,E)},m=y=>{var E=lI();Ue(E,()=>({...d(u)}));var S=D(E);Se(S,()=>n()??qe,()=>f.snippetProps),C(E),x(y,E)};return ue(g,y=>{i()?y(v):y(m,-1)}),x(e,h),re(p)}ne(pc,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var uI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),cI=q("<thead><!></thead>");function mc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=He(t,uI);const l=KD.create({id:z(()=>s()),ref:z(()=>a(),v=>a(v))}),c=P(()=>Ye(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 a()},set ref(v=null){a(v),b()},get id(){return s()},set id(v=$e(r)){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),y=B(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=cI();Ue(m,()=>({...d(c)}));var y=D(m);Se(y,()=>n()??qe),C(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),re(f)}ne(mc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var dI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),fI=q("<th><!></th>");function vc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=He(t,dI);const l=JD.create({id:z(()=>s()),ref:z(()=>a(),v=>a(v))}),c=P(()=>Ye(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 a()},set ref(v=null){a(v),b()},get id(){return s()},set id(v=$e(r)){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),y=B(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=fI();Ue(m,()=>({...d(c)}));var y=D(m);Se(y,()=>n()??qe),C(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),re(f)}ne(vc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var hI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),pI=q("<tr><!></tr>");function ss(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=He(t,hI);const l=YD.create({id:z(()=>s()),ref:z(()=>a(),v=>a(v))}),c=P(()=>Ye(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 a()},set ref(v=null){a(v),b()},get id(){return s()},set id(v=$e(r)){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),y=B(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=pI();Ue(m,()=>({...d(c)}));var y=D(m);Se(y,()=>n()??qe),C(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),re(f)}ne(ss,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var mI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),vI=q("<header><!></header>");function gc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=He(t,mI);const l=QD.create({id:z(()=>s()),ref:z(()=>a(),v=>a(v))}),c=P(()=>Ye(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 a()},set ref(v=null){a(v),b()},get id(){return s()},set id(v=$e(r)){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),y=B(m);Se(y,i,()=>({props:d(c)})),x(v,m)},g=v=>{var m=vI();Ue(m,()=>({...d(c)}));var y=D(m);Se(y,()=>n()??qe),C(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),re(f)}ne(gc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var gI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),yI=q("<div><!></div>");function yc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=He(t,gI);const l=BD.create({id:z(()=>s()),ref:z(()=>a(),v=>a(v))}),c=P(()=>Ye(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 a()},set ref(v=null){a(v),b()},get id(){return s()},set id(v=$e(r)){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),y=B(m);Se(y,i,()=>({props:d(c),headingValue:l.root.headingValue})),x(v,m)},g=v=>{var m=yI();Ue(m,()=>({...d(c)}));var y=D(m),E=T=>{var A=ie(),I=B(A);Se(I,()=>n()??qe,()=>({headingValue:l.root.headingValue})),x(T,A)},S=T=>{var A=Vt();Y(()=>Z(A,l.root.headingValue)),x(T,A)};ue(y,T=>{n()?T(E):T(S,-1)}),C(m),x(v,m)};return ue(p,v=>{i()?v(h):v(g,-1)}),x(e,u),re(f)}ne(yc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var bI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),_I=q("<button><!></button>");function bc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"id",23,()=>$e(r)),s=_(t,"ref",15,null),o=_(t,"tabindex",7,0),l=He(t,bI);const c=ZD.create({id:z(()=>a()),ref:z(()=>s(),m=>s(m))}),f=P(()=>Ye(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 a()},set id(m=$e(r)){a(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get tabindex(){return o()},set tabindex(m=0){o(m),b()}},p=ie(),h=B(p),g=m=>{var y=ie(),E=B(y);Se(E,i,()=>({props:d(f)})),x(m,y)},v=m=>{var y=_I();Ue(y,()=>({...d(f)}));var E=D(y);Se(E,()=>n()??qe),C(y),x(m,y)};return ue(h,m=>{i()?m(g):m(v,-1)}),x(e,p),re(u)}ne(bc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var wI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),kI=q("<button><!></button>");function _c(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"id",23,()=>$e(r)),s=_(t,"ref",15,null),o=_(t,"tabindex",7,0),l=He(t,wI);const c=WD.create({id:z(()=>a()),ref:z(()=>s(),m=>s(m))}),f=P(()=>Ye(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 a()},set id(m=$e(r)){a(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get tabindex(){return o()},set tabindex(m=0){o(m),b()}},p=ie(),h=B(p),g=m=>{var y=ie(),E=B(y);Se(E,i,()=>({props:d(f)})),x(m,y)},v=m=>{var y=kI();Ue(y,()=>({...d(f)}));var E=D(y);Se(E,()=>n()??qe),C(y),x(m,y)};return ue(h,m=>{i()?m(g):m(v,-1)}),x(e,p),re(u)}ne(_c,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var SI=new Set(["$$slots","$$events","$$legacy","$$host","value"]),Mv=q("<input/>");function $v(e,t){te(t,!0);let r=_(t,"value",15),n=He(t,SI);const i=P(()=>Ye(n,{"aria-hidden":"true",tabindex:-1,style:{...Im,position:"absolute",top:"0",left:"0"}}));var a={get value(){return r()},set value(f){r(f),b()}},s=ie(),o=B(s),l=f=>{var u=Mv();Ue(u,()=>({...d(i),value:r()}),void 0,void 0,void 0,void 0,!0),x(f,u)},c=f=>{var u=Mv();Ue(u,()=>({...d(i)}),void 0,void 0,void 0,void 0,!0),qs(u,r),x(f,u)};return ue(o,f=>{d(i).type==="checkbox"?f(l):f(c,-1)}),x(e,s),re(a)}ne($v,{value:{}},[],[],{mode:"open"});var EI=["top","right","bottom","left"],Rn=Math.min,rr=Math.max,Ro=Math.round,Lo=Math.floor,Yr=e=>({x:e,y:e}),xI={left:"right",right:"left",bottom:"top",top:"bottom"};function wc(e,t,r){return rr(e,Rn(t,r))}function un(e,t){return typeof e=="function"?e(t):e}function cn(e){return e.split("-")[0]}function ji(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 TI(e,t,r){r===void 0&&(r=!1);const n=ji(e),i=Ec(e),a=Sc(i);let s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=zo(s)),[s,zo(s)]}function AI(e){const t=zo(e);return[xc(e),t,xc(t)]}function xc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Fv=["left","right"],Nv=["right","left"],CI=["top","bottom"],OI=["bottom","top"];function DI(e,t,r){switch(e){case"top":case"bottom":return r?t?Nv:Fv:t?Fv:Nv;case"left":case"right":return t?CI:OI;default:return[]}}function II(e,t,r,n){const i=ji(e);let a=DI(cn(e),r==="start",n);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(xc)))),a}function zo(e){const t=cn(e);return xI[t]+e.slice(t.length)}function PI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Rv(e){return typeof e!="number"?PI(e):{top:e,right:e,bottom:e,left:e}}function qo(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 Lv(e,t,r){let{reference:n,floating:i}=e;const a=Jr(t),s=Ec(t),o=Sc(s),l=cn(t),c=a==="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(ji(t)){case"start":h[s]-=p*(r&&c?-1:1);break;case"end":h[s]+=p*(r&&c?-1:1);break}return h}async function MI(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:a,rects:s,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=un(t,e),g=Rv(h),v=o[p?u==="floating"?"reference":"floating":u],m=qo(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(v)))==null||r?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(o.floating)),boundary:c,rootBoundary:f,strategy:l})),y=u==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(o.floating)),S=await(a.isElement==null?void 0:a.isElement(E))?await(a.getScale==null?void 0:a.getScale(E))||{x:1,y:1}:{x:1,y:1},T=qo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:E,strategy:l}):y);return{top:(m.top-T.top+g.top)/S.y,bottom:(T.bottom-m.bottom+g.bottom)/S.y,left:(m.left-T.left+g.left)/S.x,right:(T.right-m.right+g.right)/S.x}}var $I=50,FI=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=r,o=s.detectOverflow?s:{...s,detectOverflow:MI},l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:u}=Lv(c,n,l),p=n,h=0;const g={};for(let v=0;v<a.length;v++){const m=a[v];if(!m)continue;const{name:y,fn:E}=m,{x:S,y:T,data:A,reset:I}=await E({x:f,y:u,initialPlacement:n,placement:p,strategy:i,middlewareData:g,rects:c,platform:o,elements:{reference:e,floating:t}});f=S??f,u=T??u,g[y]={...g[y],...A},I&&h<$I&&(h++,typeof I=="object"&&(I.placement&&(p=I.placement),I.rects&&(c=I.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):I.rects),{x:f,y:u}=Lv(c,p,l)),v=-1)}return{x:f,y:u,placement:p,strategy:i,middlewareData:g}},NI=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:a,platform:s,elements:o,middlewareData:l}=t,{element:c,padding:f=0}=un(e,t)||{};if(c==null)return{};const u=Rv(f),p={x:r,y:n},h=Ec(i),g=Sc(h),v=await s.getDimensions(c),m=h==="y",y=m?"top":"left",E=m?"bottom":"right",S=m?"clientHeight":"clientWidth",T=a.reference[g]+a.reference[h]-p[h]-a.floating[g],A=p[h]-a.reference[h],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let M=I?I[S]:0;(!M||!await(s.isElement==null?void 0:s.isElement(I)))&&(M=o.floating[S]||a.floating[g]);const N=T/2-A/2,j=M/2-v[g]/2-1,R=Rn(u[y],j),X=Rn(u[E],j),U=R,le=M-v[g]-X,he=M/2-v[g]/2+N,H=wc(U,he,le),oe=!l.arrow&&ji(i)!=null&&he!==H&&a.reference[g]/2-(he<U?R:X)-v[g]/2<0,W=oe?he<U?he-U:he-le:0;return{[h]:p[h]+W,data:{[h]:H,centerOffset:he-H-W,...oe&&{alignmentOffset:W}},reset:oe}}}),RI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:a,rects:s,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=a.arrow)!=null&&r.alignmentOffset)return{};const y=cn(i),E=Jr(o),S=cn(o)===o,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),A=p||(S||!v?[zo(o)]:AI(o)),I=g!=="none";!p&&I&&A.push(...II(o,v,g,T));const M=[o,...A],N=await l.detectOverflow(t,m),j=[];let R=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&j.push(N[y]),u){const he=TI(i,s,T);j.push(N[he[0]],N[he[1]])}if(R=[...R,{placement:i,overflows:j}],!j.every(he=>he<=0)){var X,U;const he=(((X=a.flip)==null?void 0:X.index)||0)+1,H=M[he];if(H&&(!(u==="alignment"&&E!==Jr(H))||R.every(W=>Jr(W.placement)===E?W.overflows[0]>0:!0)))return{data:{index:he,overflows:R},reset:{placement:H}};let oe=(U=R.filter(W=>W.overflows[0]<=0).sort((W,fe)=>W.overflows[1]-fe.overflows[1])[0])==null?void 0:U.placement;if(!oe)switch(h){case"bestFit":{var le;const W=(le=R.filter(fe=>{if(I){const ce=Jr(fe.placement);return ce===E||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];W&&(oe=W);break}case"initialPlacement":oe=o;break}if(i!==oe)return{reset:{placement:oe}}}return{}}}};function zv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qv(e){return EI.some(t=>e[t]>=0)}var LI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...a}=un(e,t);switch(i){case"referenceHidden":{const s=zv(await n.detectOverflow(t,{...a,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:qv(s)}}}case"escaped":{const s=zv(await n.detectOverflow(t,{...a,altBoundary:!0}),r.floating);return{data:{escapedOffsets:s,escaped:qv(s)}}}default:return{}}}}},Uv=new Set(["left","top"]);async function zI(e,t){const{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=cn(r),o=ji(r),l=Jr(r)==="y",c=Uv.has(s)?-1:1,f=a&&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 qI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:a,placement:s,middlewareData:o}=t,l=await zI(t,e);return s===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:s}}}}},UI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:a}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:l={fn:y=>{let{x:E,y:S}=y;return{x:E,y:S}}},...c}=un(e,t),f={x:r,y:n},u=await a.detectOverflow(t,c),p=Jr(cn(i)),h=kc(p);let g=f[h],v=f[p];if(s){const y=h==="y"?"top":"left",E=h==="y"?"bottom":"right",S=g+u[y],T=g-u[E];g=wc(S,g,T)}if(o){const y=p==="y"?"top":"left",E=p==="y"?"bottom":"right",S=v+u[y],T=v-u[E];v=wc(S,v,T)}const m=l.fn({...t,[h]:g,[p]:v});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[h]:s,[p]:o}}}}}},BI=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:a,middlewareData:s}=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 S=p==="y"?"height":"width",T=a.reference[p]-a.floating[S]+m.mainAxis,A=a.reference[p]+a.reference[S]-m.mainAxis;h<T?h=T:h>A&&(h=A)}if(c){var y,E;const S=p==="y"?"width":"height",T=Uv.has(cn(i)),A=a.reference[u]-a.floating[S]+(T&&((y=s.offset)==null?void 0:y[u])||0)+(T?0:m.crossAxis),I=a.reference[u]+a.reference[S]+(T?0:((E=s.offset)==null?void 0:E[u])||0)-(T?m.crossAxis:0);g<A?g=A:g>I&&(g=I)}return{[p]:h,[u]:g}}}},VI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:a,platform:s,elements:o}=t,{apply:l=()=>{},...c}=un(e,t),f=await s.detectOverflow(t,c),u=cn(i),p=ji(i),h=Jr(i)==="y",{width:g,height:v}=a.floating;let m,y;u==="top"||u==="bottom"?(m=u,y=p===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(y=u,m=p==="end"?"top":"bottom");const E=v-f.top-f.bottom,S=g-f.left-f.right,T=Rn(v-f[m],E),A=Rn(g-f[y],S),I=!t.middlewareData.shift;let M=T,N=A;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=S),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(M=E),I&&!p){const R=rr(f.left,0),X=rr(f.right,0),U=rr(f.top,0),le=rr(f.bottom,0);h?N=g-2*(R!==0||X!==0?R+X:rr(f.left,f.right)):M=v-2*(U!==0||le!==0?U+le:rr(f.top,f.bottom))}await l({...t,availableWidth:N,availableHeight:M});const j=await s.getDimensions(o.floating);return g!==j.width||v!==j.height?{reset:{rects:!0}}:{}}}};function Uo(){return typeof window<"u"}function Zi(e){return Bv(e)?(e.nodeName||"").toLowerCase():"#document"}function nr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qr(e){var t;return(t=(Bv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Bv(e){return Uo()?e instanceof Node||e instanceof nr(e).Node:!1}function Or(e){return Uo()?e instanceof Element||e instanceof nr(e).Element:!1}function dn(e){return Uo()?e instanceof HTMLElement||e instanceof nr(e).HTMLElement:!1}function Vv(e){return!Uo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof nr(e).ShadowRoot}function os(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Dr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function jI(e){return/^(table|td|th)$/.test(Zi(e))}function Bo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var ZI=/transform|translate|scale|rotate|perspective|filter/,WI=/paint|layout|strict|content/,li=e=>!!e&&e!=="none",Tc;function Ac(e){const t=Or(e)?Dr(e):e;return li(t.transform)||li(t.translate)||li(t.scale)||li(t.rotate)||li(t.perspective)||!Cc()&&(li(t.backdropFilter)||li(t.filter))||ZI.test(t.willChange||"")||WI.test(t.contain||"")}function HI(e){let t=Ln(e);for(;dn(t)&&!Wi(t);){if(Ac(t))return t;if(Bo(t))return null;t=Ln(t)}return null}function Cc(){return Tc==null&&(Tc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Tc}function Wi(e){return/^(html|body|#document)$/.test(Zi(e))}function Dr(e){return nr(e).getComputedStyle(e)}function Vo(e){return Or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ln(e){if(Zi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vv(e)&&e.host||Qr(e);return Vv(t)?t.host:t}function jv(e){const t=Ln(e);return Wi(t)?e.ownerDocument?e.ownerDocument.body:e.body:dn(t)&&os(t)?t:jv(t)}function ls(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=jv(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),s=nr(i);if(a){const o=Oc(s);return t.concat(s,s.visualViewport||[],os(i)?i:[],o&&r?ls(o):[])}else return t.concat(i,ls(i,[],r))}function Oc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zv(e){const t=Dr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=dn(e),a=i?e.offsetWidth:r,s=i?e.offsetHeight:n,o=Ro(r)!==a||Ro(n)!==s;return o&&(r=a,n=s),{width:r,height:n,$:o}}function Dc(e){return Or(e)?e:e.contextElement}function Hi(e){const t=Dc(e);if(!dn(t))return Yr(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=Zv(t);let s=(a?Ro(r.width):r.width)/n,o=(a?Ro(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!o||!Number.isFinite(o))&&(o=1),{x:s,y:o}}var GI=Yr(0);function Wv(e){const t=nr(e);return!Cc()||!t.visualViewport?GI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function KI(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==nr(e)?!1:t}function ui(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=Dc(e);let s=Yr(1);t&&(n?Or(n)&&(s=Hi(n)):s=Hi(e));const o=KI(a,r,n)?Wv(a):Yr(0);let l=(i.left+o.x)/s.x,c=(i.top+o.y)/s.y,f=i.width/s.x,u=i.height/s.y;if(a){const p=nr(a),h=n&&Or(n)?nr(n):n;let g=p,v=Oc(g);for(;v&&n&&h!==g;){const m=Hi(v),y=v.getBoundingClientRect(),E=Dr(v),S=y.left+(v.clientLeft+parseFloat(E.paddingLeft))*m.x,T=y.top+(v.clientTop+parseFloat(E.paddingTop))*m.y;l*=m.x,c*=m.y,f*=m.x,u*=m.y,l+=S,c+=T,g=nr(v),v=Oc(g)}}return qo({width:f,height:u,x:l,y:c})}function jo(e,t){const r=Vo(e).scrollLeft;return t?t.left+r:ui(Qr(e)).left+r}function Hv(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-jo(e,r),y:r.top+t.scrollTop}}function YI(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",s=Qr(n),o=t?Bo(t.floating):!1;if(n===s||o&&a)return r;let l={scrollLeft:0,scrollTop:0},c=Yr(1);const f=Yr(0),u=dn(n);if((u||!u&&!a)&&((Zi(n)!=="body"||os(s))&&(l=Vo(n)),u)){const h=ui(n);c=Hi(n),f.x=h.x+n.clientLeft,f.y=h.y+n.clientTop}const p=s&&!u&&!a?Hv(s,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 JI(e){return Array.from(e.getClientRects())}function QI(e){const t=Qr(e),r=Vo(e),n=e.ownerDocument.body,i=rr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=rr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+jo(e);const o=-r.scrollTop;return Dr(n).direction==="rtl"&&(s+=rr(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:o}}var Gv=25;function XI(e,t){const r=nr(e),n=Qr(e),i=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,o=0,l=0;if(i){a=i.width,s=i.height;const f=Cc();(!f||f&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}const c=jo(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<=Gv&&(a-=g)}else c<=Gv&&(a+=c);return{width:a,height:s,x:o,y:l}}function eP(e,t){const r=ui(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=dn(e)?Hi(e):Yr(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:n*a.y}}function Kv(e,t,r){let n;if(t==="viewport")n=XI(e,r);else if(t==="document")n=QI(Qr(e));else if(Or(t))n=eP(t,r);else{const i=Wv(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return qo(n)}function Yv(e,t){const r=Ln(e);return r===t||!Or(r)||Wi(r)?!1:Dr(r).position==="fixed"||Yv(r,t)}function tP(e,t){const r=t.get(e);if(r)return r;let n=ls(e,[],!1).filter(o=>Or(o)&&Zi(o)!=="body"),i=null;const a=Dr(e).position==="fixed";let s=a?Ln(e):e;for(;Or(s)&&!Wi(s);){const o=Dr(s),l=Ac(s);!l&&o.position==="fixed"&&(i=null),(a?!l&&!i:!l&&o.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||os(s)&&!l&&Yv(e,s))?n=n.filter(c=>c!==s):i=o,s=Ln(s)}return t.set(e,n),n}function rP(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const a=[...r==="clippingAncestors"?Bo(t)?[]:tP(t,this._c):[].concat(r),n],s=Kv(t,a[0],i);let o=s.top,l=s.right,c=s.bottom,f=s.left;for(let u=1;u<a.length;u++){const p=Kv(t,a[u],i);o=rr(p.top,o),l=Rn(p.right,l),c=Rn(p.bottom,c),f=rr(p.left,f)}return{width:l-f,height:c-o,x:f,y:o}}function nP(e){const{width:t,height:r}=Zv(e);return{width:t,height:r}}function iP(e,t,r){const n=dn(t),i=Qr(t),a=r==="fixed",s=ui(e,!0,a,t);let o={scrollLeft:0,scrollTop:0};const l=Yr(0);function c(){l.x=jo(i)}if(n||!n&&!a)if((Zi(t)!=="body"||os(i))&&(o=Vo(t)),n){const u=ui(t,!0,a,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else i&&c();a&&!n&&i&&c();const f=i&&!n&&!a?Hv(i,o):Yr(0);return{x:s.left+o.scrollLeft-l.x-f.x,y:s.top+o.scrollTop-l.y-f.y,width:s.width,height:s.height}}function Ic(e){return Dr(e).position==="static"}function Jv(e,t){if(!dn(e)||Dr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Qr(e)===r&&(r=r.ownerDocument.body),r}function Qv(e,t){const r=nr(e);if(Bo(e))return r;if(!dn(e)){let i=Ln(e);for(;i&&!Wi(i);){if(Or(i)&&!Ic(i))return i;i=Ln(i)}return r}let n=Jv(e,t);for(;n&&jI(n)&&Ic(n);)n=Jv(n,t);return n&&Wi(n)&&Ic(n)&&!Ac(n)?r:n||HI(e)||r}var aP=async function(e){const t=this.getOffsetParent||Qv,r=this.getDimensions,n=await r(e.floating);return{reference:iP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function sP(e){return Dr(e).direction==="rtl"}var oP={convertOffsetParentRelativeRectToViewportRelativeRect:YI,getDocumentElement:Qr,getClippingRect:rP,getOffsetParent:Qv,getElementRects:aP,getClientRects:JI,getDimensions:nP,getScale:Hi,isElement:Or,isRTL:sP};function Xv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lP(e,t){let r=null,n;const i=Qr(e);function a(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null}function s(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:f,top:u,width:p,height:h}=c;if(o||t(),!p||!h)return;const g=Lo(u),v=Lo(i.clientWidth-(f+p)),m=Lo(i.clientHeight-(u+h)),y=Lo(f),E={rootMargin:-g+"px "+-v+"px "+-m+"px "+-y+"px",threshold:rr(0,Rn(1,l))||1};let S=!0;function T(A){const I=A[0].intersectionRatio;if(I!==l){if(!S)return s();I?s(!1,I):n=setTimeout(()=>{s(!1,1e-7)},1e3)}I===1&&!Xv(c,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(T,{...E,root:i.ownerDocument})}catch{r=new IntersectionObserver(T,E)}r.observe(e)}return s(!0),a}function uP(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Dc(e),f=i||a?[...c?ls(c):[],...t?ls(t):[]]:[];f.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const u=c&&o?lP(c,r):null;let p=-1,h=null;s&&(h=new ResizeObserver(y=>{let[E]=y;E&&E.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=h)==null||S.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&&!Xv(v,y)&&r(),v=y,g=requestAnimationFrame(m)}return r(),()=>{var y;f.forEach(E=>{i&&E.removeEventListener("scroll",r),a&&E.removeEventListener("resize",r)}),u?.(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(g)}}var cP=qI,dP=UI,fP=RI,hP=VI,pP=LI,mP=NI,vP=BI,gP=(e,t,r)=>{const n=new Map,i={platform:oP,...r},a={...i.platform,_c:n};return FI(e,t,{...i,platform:a})};function ci(e){return typeof e=="function"?e():e}function eg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tg(e,t){const r=eg(e);return Math.round(t*r)/r}function rg(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 yP(e){const t=e.whileElementsMounted,r=P(()=>ci(e.open)??!0),n=P(()=>ci(e.middleware)),i=P(()=>ci(e.transform)??!0),a=P(()=>ci(e.placement)??"bottom"),s=P(()=>ci(e.strategy)??"absolute"),o=P(()=>ci(e.sideOffset)??0),l=P(()=>ci(e.alignOffset)??0),c=e.reference;let f=se(0),u=se(0);const p=xr(null);let h=se(Pe(d(s))),g=se(Pe(d(a))),v=se(Pe({})),m=se(!1),y=!1,E=0;const S=P(()=>{const R=p.current?tg(p.current,d(f)):d(f),X=p.current?tg(p.current,d(u)):d(u);return d(i)?{position:d(h),left:"0",top:"0",transform:`translate(${R}px, ${X}px)`,...p.current&&eg(p.current)>=1.5&&{willChange:"transform"}}:{position:d(h),left:`${R}px`,top:`${X}px`}});let T;function A(){if(c.current===null||p.current===null)return;const R=c.current,X=p.current,U=++E;gP(R,X,{middleware:d(n),placement:d(a),strategy:d(s)}).then(le=>{if(U===E&&!(c.current!==R||p.current!==X)){if(bP(R)){F(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(f,le.x,!0),F(u,le.y,!0),F(h,le.strategy,!0),F(g,le.placement,!0),F(v,le.middlewareData,!0),F(m,!0)}})}function I(){typeof T=="function"&&(T(),T=void 0),E++}function M(){if(I(),t===void 0){A();return}d(r)&&(c.current===null||p.current===null||(T=t(c.current,p.current,A)))}function N(){!d(r)&&p.current===null&&F(m,!1)}function j(){return[d(n),d(a),d(s),d(o),d(l),d(r)]}return ve(()=>{t===void 0&&d(r)&&A()}),ve(M),ve(()=>{if(t!==void 0){if(j(),!d(r)){y=!1;return}if(!d(m)){y=!1;return}if(!y){y=!0;return}A()}}),ve(N),ve(()=>I),{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(S)},get update(){return A}}}function bP(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var _P={top:"bottom",right:"left",bottom:"top",left:"right"},Pc=new Ft("Floating.Root"),ng=new Ft("Floating.Content"),Mc=new Ft("Floating.Root"),wP=class fd{static create(t=!1){return t?Mc.set(new fd):Pc.set(new fd)}anchorNode=xr(null);customAnchorNode=xr(null);triggerNode=xr(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})}},kP=class hd{static create(t,r=!1){return r?ng.set(new hd(t,Mc.get())):ng.set(new hd(t,Pc.get()))}opts;root;contentRef=xr(null);wrapperRef=xr(null);arrowRef=xr(null);contentAttachment=tt(this.contentRef);wrapperAttachment=tt(this.wrapperRef);arrowAttachment=tt(this.arrowRef);arrowId=xr(Nn());#e=P(()=>{if(typeof this.opts.style=="string")return Ka(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new zC(()=>this.arrowRef.current??void 0);#n=P(()=>this.#r?.width??0);#i=P(()=>this.#r?.height??0);#a=P(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#s=P(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#o=P(()=>d(this.#s).length>0);get hasExplicitBoundaries(){return d(this.#o)}set hasExplicitBoundaries(t){F(this.#o,t)}#l=P(()=>({padding:this.opts.collisionPadding.current,boundary:d(this.#s).filter(iO),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return d(this.#l)}set detectOverflowOptions(t){F(this.#l,t)}#u=se(void 0);#c=se(void 0);#d=se(void 0);#h=se(void 0);#p=P(()=>[cP({mainAxis:this.opts.sideOffset.current+d(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&dP({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?vP():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&fP({...this.detectOverflowOptions}),hP({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:n})=>{const{width:i,height:a}=t.reference;F(this.#u,r,!0),F(this.#c,n,!0),F(this.#d,i,!0),F(this.#h,a,!0)}}),this.arrowRef.current&&mP({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),EP({arrowWidth:d(this.#n),arrowHeight:d(this.#i)}),this.opts.hideWhenDetached.current&&pP({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return d(this.#p)}set middleware(t){F(this.#p,t)}floating;#f=P(()=>xP(this.floating.placement));get placedSide(){return d(this.#f)}set placedSide(t){F(this.#f,t)}#m=P(()=>TP(this.floating.placement));get placedAlign(){return d(this.#m)}set placedAlign(t){F(this.#m,t)}#v=P(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return d(this.#v)}set arrowX(t){F(this.#v,t)}#y=P(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return d(this.#y)}set arrowY(t){F(this.#y,t)}#w=P(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return d(this.#w)}set cannotCenterArrow(t){F(this.#w,t)}#_=se();get contentZIndex(){return d(this.#_)}set contentZIndex(t){F(this.#_,t,!0)}#g=P(()=>_P[this.placedSide]);get arrowBaseSide(){return d(this.#g)}set arrowBaseSide(t){F(this.#g,t)}#k=P(()=>({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){F(this.#k,t)}#b=P(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Ja({...d(this.#e)}),...this.contentAttachment}));get props(){return d(this.#b)}set props(t){F(this.#b,t)}#S=P(()=>({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){F(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),at(()=>t.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=yP({strategy:()=>this.opts.strategy.current,placement:()=>d(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>uP(...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()}),at(()=>this.contentRef.current,n=>{if(!n||!this.opts.enabled.current)return;const i=Lm(n),a=i.requestAnimationFrame(()=>{if(this.contentRef.current!==n||!this.opts.enabled.current)return;const s=i.getComputedStyle(n).zIndex;s!==this.contentZIndex&&(this.contentZIndex=s)});return()=>{i.cancelAnimationFrame(a)}}),ve(()=>{this.floating.floating.current=this.wrapperRef.current})}},SP=class pd{static create(t,r=!1){return r?new pd(t,Mc.get()):new pd(t,Pc.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=iC(t.virtualEl.current):r.triggerNode=t.ref}};function EP(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,s=a?0:e.arrowWidth,o=a?0:e.arrowHeight,[l,c]=$c(r),f={start:"0%",center:"50%",end:"100%"}[c],u=(i.arrow?.x??0)+s/2,p=(i.arrow?.y??0)+o/2;let h="",g="";return l==="bottom"?(h=a?f:`${u}px`,g=`${-o}px`):l==="top"?(h=a?f:`${u}px`,g=`${n.floating.height+o}px`):l==="right"?(h=`${-o}px`,g=a?f:`${p}px`):l==="left"&&(h=`${n.floating.width+o}px`,g=a?f:`${p}px`),{data:{x:h,y:g}}}}}function $c(e){const[t,r="center"]=e.split("-");return[t,r]}function xP(e){return $c(e)[0]}function TP(e){return $c(e)[1]}function ig(e,t){te(t,!0);let r=_(t,"children",7),n=_(t,"tooltip",7,!1);wP.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()}},a=ie(),s=B(a);return Se(s,()=>r()??qe),x(e,a),re(i)}ne(ig,{children:{},tooltip:{}},[],[],{mode:"open"});function ag(e,t){te(t,!0);let r=_(t,"id",7),n=_(t,"children",7),i=_(t,"virtualEl",7),a=_(t,"ref",7),s=_(t,"tooltip",7,!1);SP.create({id:z(()=>r()),virtualEl:z(()=>i()),ref:a()},s());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 a()},set ref(f){a(f),b()},get tooltip(){return s()},set tooltip(f=!1){s(f),b()}},l=ie(),c=B(l);return Se(c,()=>n()??qe),x(e,l),re(o)}ne(ag,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function sg(e,t){te(t,!0);let r=_(t,"content",7),n=_(t,"side",7,"bottom"),i=_(t,"sideOffset",7,0),a=_(t,"align",7,"center"),s=_(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"),E=_(t,"style",23,()=>({})),S=_(t,"wrapperId",23,Nn),T=_(t,"customAnchor",7,null),A=_(t,"enabled",7),I=_(t,"tooltip",7,!1);const M=kP.create({side:z(()=>n()),sideOffset:z(()=>i()),align:z(()=>a()),alignOffset:z(()=>s()),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(()=>E()),enabled:z(()=>A()),wrapperId:z(()=>S()),customAnchor:z(()=>T())},I()),N=P(()=>Ye(M.wrapperProps,{style:{pointerEvents:"auto"}}));var j={get content(){return r()},set content(U){r(U),b()},get side(){return n()},set side(U="bottom"){n(U),b()},get sideOffset(){return i()},set sideOffset(U=0){i(U),b()},get align(){return a()},set align(U="center"){a(U),b()},get alignOffset(){return s()},set alignOffset(U=0){s(U),b()},get id(){return o()},set id(U){o(U),b()},get arrowPadding(){return l()},set arrowPadding(U=0){l(U),b()},get avoidCollisions(){return c()},set avoidCollisions(U=!0){c(U),b()},get collisionBoundary(){return f()},set collisionBoundary(U=[]){f(U),b()},get collisionPadding(){return u()},set collisionPadding(U=0){u(U),b()},get hideWhenDetached(){return p()},set hideWhenDetached(U=!1){p(U),b()},get onPlaced(){return h()},set onPlaced(U=()=>{}){h(U),b()},get sticky(){return g()},set sticky(U="partial"){g(U),b()},get updatePositionStrategy(){return v()},set updatePositionStrategy(U="optimized"){v(U),b()},get strategy(){return m()},set strategy(U="fixed"){m(U),b()},get dir(){return y()},set dir(U="ltr"){y(U),b()},get style(){return E()},set style(U={}){E(U),b()},get wrapperId(){return S()},set wrapperId(U=Nn()){S(U),b()},get customAnchor(){return T()},set customAnchor(U=null){T(U),b()},get enabled(){return A()},set enabled(U){A(U),b()},get tooltip(){return I()},set tooltip(U=!1){I(U),b()}},R=ie(),X=B(R);return Se(X,()=>r()??qe,()=>({props:M.props,wrapperProps:d(N)})),x(e,R),re(j)}ne(sg,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function og(e,t){te(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()}},a=ie(),s=B(a);return Se(s,()=>r()??qe,()=>({props:{},wrapperProps:{}})),x(e,a),re(i)}ne(og,{content:{},onPlaced:{}},[],[],{mode:"open"});var AP=new Set(["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);function lg(e,t){te(t,!0);let r=_(t,"content",7),n=_(t,"isStatic",7,!1),i=_(t,"onPlaced",7),a=He(t,AP);var s={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=ie(),l=B(o),c=u=>{og(u,{get content(){return r()},get onPlaced(){return i()}})},f=u=>{sg(u,An({get content(){return r()},get onPlaced(){return i()}},()=>a))};return ue(l,u=>{n()?u(c):u(f,-1)}),x(e,o),re(s)}ne(lg,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var CP=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"]),OP=q("<!> <!>",1);function Fc(e,t){te(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),a=_(t,"preventOverflowTextSelection",7),s=_(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),E=_(t,"hideWhenDetached",7),S=_(t,"updatePositionStrategy",7),T=_(t,"strategy",7),A=_(t,"dir",7),I=_(t,"preventScroll",7),M=_(t,"wrapperId",7),N=_(t,"style",7),j=_(t,"onPlaced",7),R=_(t,"onInteractOutside",7),X=_(t,"onCloseAutoFocus",7),U=_(t,"onOpenAutoFocus",7),le=_(t,"onFocusOutside",7),he=_(t,"interactOutsideBehavior",7,"close"),H=_(t,"loop",7),oe=_(t,"trapFocus",7,!0),W=_(t,"isValidEvent",7,()=>!1),fe=_(t,"customAnchor",7,null),ce=_(t,"isStatic",7,!1),de=_(t,"enabled",7),J=_(t,"ref",7),ee=_(t,"tooltip",7,!1),$=_(t,"contentPointerEvents",7,"auto"),ae=He(t,CP);const L=P(()=>I()??!0),be=P(()=>T()??(d(L)?"fixed":"absolute"));var G={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 a()},set preventOverflowTextSelection(w){a(w),b()},get id(){return s()},set id(w){s(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 E()},set hideWhenDetached(w){E(w),b()},get updatePositionStrategy(){return S()},set updatePositionStrategy(w){S(w),b()},get strategy(){return T()},set strategy(w){T(w),b()},get dir(){return A()},set dir(w){A(w),b()},get preventScroll(){return I()},set preventScroll(w){I(w),b()},get wrapperId(){return M()},set wrapperId(w){M(w),b()},get style(){return N()},set style(w){N(w),b()},get onPlaced(){return j()},set onPlaced(w){j(w),b()},get onInteractOutside(){return R()},set onInteractOutside(w){R(w),b()},get onCloseAutoFocus(){return X()},set onCloseAutoFocus(w){X(w),b()},get onOpenAutoFocus(){return U()},set onOpenAutoFocus(w){U(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 H()},set loop(w){H(w),b()},get trapFocus(){return oe()},set trapFocus(w=!0){oe(w),b()},get isValidEvent(){return W()},set isValidEvent(w=()=>!1){W(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 J()},set ref(w){J(w),b()},get tooltip(){return ee()},set tooltip(w=!1){ee(w),b()},get contentPointerEvents(){return $()},set contentPointerEvents(w="auto"){$(w),b()}};return lg(e,{get isStatic(){return ce()},get id(){return s()},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 E()},get updatePositionStrategy(){return S()},get strategy(){return d(be)},get dir(){return A()},get wrapperId(){return M()},get style(){return N()},get onPlaced(){return j()},get customAnchor(){return fe()},get enabled(){return de()},get tooltip(){return ee()},content:(_e,we)=>{let De=()=>we?.().props,Le=()=>we?.().wrapperProps;var je=OP(),_t=B(je),ot=Rt=>{rc(Rt,{get preventScroll(){return d(L)}})},Nt=Rt=>{rc(Rt,{get preventScroll(){return d(L)}})};ue(_t,Rt=>{t.forceMount&&de()?Rt(ot):t.forceMount||Rt(Nt,1)});var wt=V(_t,2);sv(wt,{get onOpenAutoFocus(){return U()},get onCloseAutoFocus(){return X()},get loop(){return H()},get enabled(){return de()},get trapFocus(){return oe()},get forceMount(){return t.forceMount},get ref(){return J()},focusScope:(ir,Gt)=>{let gr=()=>Gt?.().props;av(ir,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return de()},get ref(){return J()},children:(Pr,Mr)=>{iv(Pr,{get id(){return s()},get onInteractOutside(){return R()},get onFocusOutside(){return le()},get interactOutsideBehavior(){return he()},get isValidEvent(){return W()},get enabled(){return de()},get ref(){return J()},children:($r,yr)=>{let Xr=()=>yr?.().props;uv($r,{get id(){return s()},get preventOverflowTextSelection(){return a()},get onPointerDown(){return o()},get onPointerUp(){return l()},get enabled(){return de()},get ref(){return J()},children:(en,At)=>{var Un=ie(),na=B(Un);{let ia=P(()=>({props:Ye(ae,De(),Xr(),gr(),{style:{pointerEvents:$()}}),wrapperProps:Le()}));Se(na,()=>r()??qe,()=>d(ia))}x(en,Un)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),x(_e,je)},$$slots:{content:!0}}),re(G)}ne(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 DP=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 ug(e,t){te(t,!0);let r=_(t,"popper",7),n=_(t,"open",7),i=_(t,"onEscapeKeydown",7),a=_(t,"escapeKeydownBehavior",7),s=_(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),E=_(t,"sticky",7),S=_(t,"hideWhenDetached",7),T=_(t,"updatePositionStrategy",7),A=_(t,"strategy",7),I=_(t,"dir",7),M=_(t,"preventScroll",7),N=_(t,"wrapperId",7),j=_(t,"style",7),R=_(t,"onPlaced",7),X=_(t,"onInteractOutside",7),U=_(t,"onCloseAutoFocus",7),le=_(t,"onOpenAutoFocus",7),he=_(t,"onFocusOutside",7),H=_(t,"interactOutsideBehavior",7,"close"),oe=_(t,"loop",7),W=_(t,"trapFocus",7,!0),fe=_(t,"isValidEvent",7,()=>!1),ce=_(t,"customAnchor",7,null),de=_(t,"isStatic",7,!1),J=_(t,"ref",7),ee=_(t,"shouldRender",7),$=He(t,DP);var ae={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 a()},set escapeKeydownBehavior(w){a(w),b()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(w){s(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 E()},set sticky(w){E(w),b()},get hideWhenDetached(){return S()},set hideWhenDetached(w){S(w),b()},get updatePositionStrategy(){return T()},set updatePositionStrategy(w){T(w),b()},get strategy(){return A()},set strategy(w){A(w),b()},get dir(){return I()},set dir(w){I(w),b()},get preventScroll(){return M()},set preventScroll(w){M(w),b()},get wrapperId(){return N()},set wrapperId(w){N(w),b()},get style(){return j()},set style(w){j(w),b()},get onPlaced(){return R()},set onPlaced(w){R(w),b()},get onInteractOutside(){return X()},set onInteractOutside(w){X(w),b()},get onCloseAutoFocus(){return U()},set onCloseAutoFocus(w){U(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 H()},set interactOutsideBehavior(w="close"){H(w),b()},get loop(){return oe()},set loop(w){oe(w),b()},get trapFocus(){return W()},set trapFocus(w=!0){W(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 J()},set ref(w){J(w),b()},get shouldRender(){return ee()},set shouldRender(w){ee(w),b()}},L=ie(),be=B(L),G=w=>{Fc(w,An({get popper(){return r()},get onEscapeKeydown(){return i()},get escapeKeydownBehavior(){return a()},get preventOverflowTextSelection(){return s()},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 E()},get hideWhenDetached(){return S()},get updatePositionStrategy(){return T()},get strategy(){return A()},get dir(){return I()},get preventScroll(){return M()},get wrapperId(){return N()},get style(){return j()},get onPlaced(){return R()},get customAnchor(){return ce()},get isStatic(){return de()},get enabled(){return n()},get onInteractOutside(){return X()},get onCloseAutoFocus(){return U()},get onOpenAutoFocus(){return le()},get interactOutsideBehavior(){return H()},get loop(){return oe()},get trapFocus(){return W()},get isValidEvent(){return fe()},get onFocusOutside(){return he()},forceMount:!1,get ref(){return J()}},()=>$))};return ue(be,w=>{ee()&&w(G)}),x(e,L),re(ae)}ne(ug,{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 IP=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 cg(e,t){te(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),a=_(t,"preventOverflowTextSelection",7),s=_(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),E=_(t,"hideWhenDetached",7),S=_(t,"updatePositionStrategy",7),T=_(t,"strategy",7),A=_(t,"dir",7),I=_(t,"preventScroll",7),M=_(t,"wrapperId",7),N=_(t,"style",7),j=_(t,"onPlaced",7),R=_(t,"onInteractOutside",7),X=_(t,"onCloseAutoFocus",7),U=_(t,"onOpenAutoFocus",7),le=_(t,"onFocusOutside",7),he=_(t,"interactOutsideBehavior",7,"close"),H=_(t,"loop",7),oe=_(t,"trapFocus",7,!0),W=_(t,"isValidEvent",7,()=>!1),fe=_(t,"customAnchor",7,null),ce=_(t,"isStatic",7,!1),de=_(t,"enabled",7),J=He(t,IP);var ee={get popper(){return r()},set popper($){r($),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown($){n($),b()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior($){i($),b()},get preventOverflowTextSelection(){return a()},set preventOverflowTextSelection($){a($),b()},get id(){return s()},set id($){s($),b()},get onPointerDown(){return o()},set onPointerDown($){o($),b()},get onPointerUp(){return l()},set onPointerUp($){l($),b()},get side(){return c()},set side($){c($),b()},get sideOffset(){return f()},set sideOffset($){f($),b()},get align(){return u()},set align($){u($),b()},get alignOffset(){return p()},set alignOffset($){p($),b()},get arrowPadding(){return h()},set arrowPadding($){h($),b()},get avoidCollisions(){return g()},set avoidCollisions($){g($),b()},get collisionBoundary(){return v()},set collisionBoundary($){v($),b()},get collisionPadding(){return m()},set collisionPadding($){m($),b()},get sticky(){return y()},set sticky($){y($),b()},get hideWhenDetached(){return E()},set hideWhenDetached($){E($),b()},get updatePositionStrategy(){return S()},set updatePositionStrategy($){S($),b()},get strategy(){return T()},set strategy($){T($),b()},get dir(){return A()},set dir($){A($),b()},get preventScroll(){return I()},set preventScroll($){I($),b()},get wrapperId(){return M()},set wrapperId($){M($),b()},get style(){return N()},set style($){N($),b()},get onPlaced(){return j()},set onPlaced($){j($),b()},get onInteractOutside(){return R()},set onInteractOutside($){R($),b()},get onCloseAutoFocus(){return X()},set onCloseAutoFocus($){X($),b()},get onOpenAutoFocus(){return U()},set onOpenAutoFocus($){U($),b()},get onFocusOutside(){return le()},set onFocusOutside($){le($),b()},get interactOutsideBehavior(){return he()},set interactOutsideBehavior($="close"){he($),b()},get loop(){return H()},set loop($){H($),b()},get trapFocus(){return oe()},set trapFocus($=!0){oe($),b()},get isValidEvent(){return W()},set isValidEvent($=()=>!1){W($),b()},get customAnchor(){return fe()},set customAnchor($=null){fe($),b()},get isStatic(){return ce()},set isStatic($=!1){ce($),b()},get enabled(){return de()},set enabled($){de($),b()}};return Fc(e,An({get popper(){return r()},get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get preventOverflowTextSelection(){return a()},get id(){return s()},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 E()},get updatePositionStrategy(){return S()},get strategy(){return T()},get dir(){return A()},get preventScroll(){return I()},get wrapperId(){return M()},get style(){return N()},get onPlaced(){return j()},get customAnchor(){return fe()},get isStatic(){return ce()},get enabled(){return de()},get onInteractOutside(){return R()},get onCloseAutoFocus(){return X()},get onOpenAutoFocus(){return U()},get interactOutsideBehavior(){return he()},get loop(){return H()},get trapFocus(){return oe()},get isValidEvent(){return W()},get onFocusOutside(){return le()}},()=>J,{forceMount:!0})),re(ee)}ne(cg,{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 Zo=_o({component:"date-field",parts:["input","label","segment"]}),Gi={day:{min:1,max:e=>{const t=e.segmentValues.month,r=e.value.current??e.placeholder.current;return ts(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(Wt(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||kv(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"),PP=class Ly{static create(t,r){return zn.set(new Ly(t,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Nn();formatter;initialSegments;#e=se();get segmentValues(){return d(this.#e)}set segmentValues(t){F(this.#e,t,!0)}announcer;#t=P(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return d(this.#t)}set readonlySegmentsSet(t){F(this.#t,t)}segmentStates=bv();#r=se(null);#n=se(null);#i=se(null);get descriptionNode(){return d(this.#i)}set descriptionNode(t){F(this.#i,t,!0)}#a=se(null);get validationNode(){return d(this.#a)}set validationNode(t){F(this.#a,t,!0)}states=bv();#s=se(null);get dayPeriodNode(){return d(this.#s)}set dayPeriodNode(t){F(this.#s,t,!0)}rangeRoot=void 0;#o=se("");get name(){return d(this.#o)}set name(t){F(this.#o,t,!0)}domContext=new Vi(()=>null);constructor(t,r){this.rangeRoot=r,this.value=t.value,this.placeholder=r?r.opts.placeholder:t.placeholder,this.validate=r?xr(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=xv({initialLocale:this.locale.current,monthFormat:z(()=>"long"),yearFormat:z(()=>"numeric")}),this.initialSegments=sc(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=Io(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=sc(this.inferredGranularity)})}),En(()=>{this.announcer=Io(this.domContext.getDocument())}),ii(()=>{r||yD(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&&gD({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=sc(this.inferredGranularity))}),at(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(t){this.name=t}setFieldNode(t){F(this.#r,t,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:d(this.#r)}setLabelNode(t){F(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=Mo.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 a=4-`${i}`.length;if(a>0)return[n,`${"0".repeat(a)}${i}`]}return[n,`${i}`]});if("hour"in t){const n=$o.map(a=>{if(a==="dayPeriod")return this.states.dayPeriod.updating?[a,this.states.dayPeriod.updating]:[a,this.formatter.dayPeriod(Wt(t))];if(a==="hour"){if(this.states.hour.updating)return[a,this.states.hour.updating];if(t[a]!==void 0&&t[a]<10)return[a,`0${t[a]}`];if(t[a]===0&&this.dayPeriodNode)return[a,"12"]}else if(a==="minute"){if(this.states.minute.updating)return[a,this.states.minute.updating];if(t[a]!==void 0&&t[a]<10)return[a,`0${t[a]}`]}else if(a==="second"){if(this.states.second.updating)return[a,this.states.second.updating];if(t[a]!==void 0&&t[a]<10)return[a,`0${t[a]}`]}return[a,`${t[a]}`]}),i=[...r,...n];this.segmentValues=Object.fromEntries(i),this.#l();return}this.segmentValues=Object.fromEntries(r)}#u=P(()=>{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){F(this.#u,t)}#c=P(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return d(this.#c)}set isInvalid(t){F(this.#c,t)}#d=P(()=>{const t=this.granularity.current;return t||mD(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return d(this.#d)}set inferredGranularity(t){F(this.#d,t)}#h=P(()=>this.value.current!==void 0?this.value.current:this.placeholder.current);get dateRef(){return d(this.#h)}set dateRef(t){F(this.#h,t)}#p=P(()=>uD({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){F(this.#p,t)}#f=P(()=>this.allSegmentContent.arr);get segmentContents(){return d(this.#f)}set segmentContents(t){F(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,a=this.readonlySegmentsSet;if(n||i||a.has(t))return;const s=this.segmentValues;let o=s;const l=this.placeholder.current;if(pD(s)){const c=s[t],f=r;if(t==="month"){const u=f(c);if(this.states.month.updating=u,u!==null&&s.day!==null){const p=ts(Wt(l.set({month:Number.parseInt(u)})));Number.parseInt(s.day)>p&&(s.day=`${p}`)}o={...s,[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&&(s.hour=`${h-12}`):u==="PM"&&h<12&&(s.hour=`${h+12}`)}o={...s,[t]:u}}else if(t==="hour"){const u=f(c);if(this.states.hour.updating=u,u!==null&&s.dayPeriod!==null){const p=this.formatter.dayPeriod(Wt(l.set({hour:Number.parseInt(u)})),this.hourCycle.current);(p==="AM"||p==="PM")&&(s.dayPeriod=p)}o={...s,[t]:u}}else if(t==="minute"){const u=f(c);this.states.minute.updating=u,o={...s,[t]:u}}else if(t==="second"){const u=f(c);this.states.second.updating=u,o={...s,[t]:u}}else if(t==="year"){const u=f(c);this.states.year.updating=u,o={...s,[t]:u}}else if(t==="day"){const u=f(c);this.states.day.updating=u,o={...s,[t]:u}}else{const u=f(c);o={...s,[t]:u}}}else if(Fo(t)){const c=s[t],f=r,u=f(c);if(t==="month"&&u!==null&&s.day!==null){this.states.month.updating=u;const p=ts(Wt(l.set({month:Number.parseInt(u)})));Number.parseInt(s.day)>p&&(s.day=`${p}`),o={...s,[t]:u}}else if(t==="year"){const p=f(c);this.states.year.updating=p,o={...s,[t]:p}}else if(t==="day"){const p=f(c);this.states.day.updating=p,o={...s,[t]:p}}else o={...s,[t]:u}}this.segmentValues=o,hD(o,d(this.#r))?this.setValue(fD({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}`,[Zo.segment]:""};if(t==="literal")return i;const a=this.descriptionNode?.id,s=vD(r,d(this.#r))&&a,o=this.errorMessageId?.current,l=s?`${a} ${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}}},MP=class zy{static create(t){return new zy(t,zn.get())}opts;root;domContext;attachment;constructor(t,r){this.opts=t,this.root=r,this.domContext=new Vi(t.ref),this.root.domContext=this.domContext,this.attachment=tt(t.ref,n=>this.root.setFieldNode(n)),at(()=>this.opts.name.current,n=>{this.root.setName(n)})}#e=P(()=>{if(ln&&this.domContext.getElementById(this.root.descriptionId))return this.root.descriptionId});#t=P(()=>({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),[Zo.input]:"",...this.attachment}));get props(){return d(this.#t)}set props(t){F(this.#t,t)}},$P=class qy{static create(){return new qy(zn.get())}root;#e=P(()=>this.root.name!=="");get shouldRender(){return d(this.#e)}set shouldRender(t){F(this.#e,t)}#t=P(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return d(this.#t)}set isoValue(t){F(this.#t,t)}constructor(t){this.root=t}#r=P(()=>({name:this.root.name,value:this.isoValue,required:this.root.required.current}));get props(){return d(this.#r)}set props(t){F(this.#r,t)}},FP=class Uy{static create(t){return new Uy(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=tt(t.ref,n=>this.root.setLabelNode(n))}onclick(t){if(this.root.disabled.current)return;const r=wD(this.root.getFieldNode());r&&r.focus()}#e=P(()=>({id:this.opts.id.current,"data-invalid":Ve(this.root.isInvalid),"data-disabled":Ve(this.root.disabled.current),[Zo.label]:"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#e)}set props(t){F(this.#e,t)}},Ki=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=tt(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.#a(t);return}if(wo(e.key)){this.#s(e);return}if(Lc(e.key)){this.#o(e);return}is(e.key)&&ns(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)})}#a(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=Number.parseInt(e.key);let r=!1;const n=this.#e(),i=Math.floor(n/10),a=t===0,s=this.part;this.root.updateSegment(this.part,o=>{if(s in this.root.states&&this.root.states[s].hasLeftFocus&&(o=null,this.root.states[s].hasLeftFocus=!1),o===null)return a?(s in this.root.states&&(this.root.states[s].lastKeyZero=!0),this.announcer.announce("0"),"0"):(s in this.root.states&&(this.root.states[s].lastKeyZero||t>i)&&(r=!0),s in this.root.states&&(this.root.states[s].lastKeyZero=!1),r&&String(t).length===1?(this.announcer.announce(t),`0${t}`):`${t}`);if(s in this.root.states&&this.root.states[s].lastKeyZero)return t!==0?(r=!0,this.root.states[s].lastKeyZero=!1,`0${t}`):this.part==="hour"&&t===0&&this.root.hourCycle.current===24?(r=!0,this.root.states[s].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&t===0?(r=!0,this.root.states[s].lastKeyZero=!1,"00"):o;const l=Number.parseInt(o+t.toString());return l>n?(r=!0,`0${t}`):(r=!0,`${l}`)}),r&&Sv(e,this.root.getFieldNode())}#o(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 a=Number.parseInt(i.slice(0,-1));return this.announcer.announce(this.#r(a)),`${a}`}),r&&Ev(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],a=this.#t(),s=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":a,"aria-valuemax":s,"aria-valuenow":i,"aria-valuetext":o}}#l=P(()=>({...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){F(this.#l,e)}},NP=class extends Ki{#e=[];#t=0;constructor(e,t){super(e,t,"year",Gi.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(wo(e.key)){this.#i(e);return}if(Lc(e.key)){this.#a(e);return}is(e.key)&&ns(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(),a=Number.parseInt(i);if(String(a).length<4)return this.#t>0&&this.#e.length<=this.#t&&i.length<=4?(this.announcer.announce(a),i):(this.announcer.announce(a),dg(a));this.announcer.announce(a),t=!0;const s=`${a}`;return s.length>4?s.slice(0,4):s}),(this.#e.length===4||this.#e.length===this.#t)&&(t=!0),t&&Sv(e,this.root.getFieldNode())}#a(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&&Ev(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?dg(Number.parseInt(t)):t)}},RP=class extends Ki{constructor(e,t){super(e,t,"day",Gi.day)}},LP=class extends Ki{constructor(e,t){super(e,t,"month",Gi.month)}},zP=class extends Ki{constructor(e,t){super(e,t,"hour",Gi.hour)}onkeydown(e){if(wo(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)}},qP=class extends Ki{constructor(e,t){super(e,t,"minute",Gi.minute)}},UP=class extends Ki{constructor(e,t){super(e,t,"second",Gi.second)}},BP=class By{static create(t){return new By(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=tt(t.ref,n=>this.root.dayPeriodNode=n)}onkeydown(t){if(!(t.ctrlKey||t.metaKey||this.root.disabled.current)&&(t.key!=="Tab"&&t.preventDefault(),!!WP(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}),is(t.key)&&ns(t,this.root.getFieldNode())}}#t=P(()=>{const t=this.root.segmentValues;if(!("dayPeriod"in t))return;const r=0,n=12,i=t.dayPeriod==="AM"?0:12,a=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":a,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){F(this.#t,t)}},VP=class Vy{static create(t){return new Vy(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(t.ref)}#e=P(()=>({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){F(this.#e,t)}},jP=class jy{static create(t){return new jy(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=tt(t.ref)}onkeydown(t){t.key!=="Tab"&&t.preventDefault(),!this.root.disabled.current&&is(t.key)&&ns(t,this.root.getFieldNode())}#e=P(()=>({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){F(this.#e,t)}},ZP=class{static create(e,t){const r=zn.get();switch(e){case"day":return new RP(t,r);case"month":return new LP(t,r);case"year":return new NP(t,r);case"hour":return new zP(t,r);case"minute":return new qP(t,r);case"second":return new UP(t,r);case"dayPeriod":return new BP(t,r);case"literal":return new VP(t,r);case"timeZoneName":return new jP(t,r)}}};function WP(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===eO}function dg(e){const t=4-String(e).length;return`${"0".repeat(t)}${e}`}function fg(e,t){te(t,!1);const r=$P.create();Jl();var n=ie(),i=B(n),a=s=>{$v(s,An(()=>r.props))};ue(i,s=>{r.shouldRender&&s(a)}),x(e,n),re()}ne(fg,{},[],[],{mode:"open"});var HP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]),GP=q("<div><!></div>"),KP=q("<!> <!>",1);function hg(e,t){const r=vt();te(t,!0);let n=_(t,"id",23,()=>$e(r)),i=_(t,"ref",15,null),a=_(t,"name",7,""),s=_(t,"children",7),o=_(t,"child",7),l=He(t,HP);const c=MP.create({id:z(()=>n()),ref:z(()=>i(),m=>i(m)),name:z(()=>a())}),f=P(()=>Ye(l,c.props));var u={get id(){return n()},set id(m=$e(r)){n(m),b()},get ref(){return i()},set ref(m=null){i(m),b()},get name(){return a()},set name(m=""){a(m),b()},get children(){return s()},set children(m){s(m),b()},get child(){return o()},set child(m){o(m),b()}},p=KP(),h=B(p),g=m=>{var y=ie(),E=B(y);Se(E,o,()=>({props:d(f),segments:c.root.segmentContents})),x(m,y)},v=m=>{var y=GP();Ue(y,()=>({...d(f)}));var E=D(y);Se(E,()=>s()??qe,()=>({segments:c.root.segmentContents})),C(y),x(m,y)};return ue(h,m=>{o()?m(g):m(v,-1)}),fg(V(h,2),{}),x(e,p),re(u)}ne(hg,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var YP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]),JP=q("<div><!></div>");function pg(e,t){const r=vt();te(t,!0);let n=_(t,"id",23,()=>$e(r)),i=_(t,"ref",15,null),a=_(t,"children",7),s=_(t,"child",7),o=He(t,YP);const l=FP.create({id:z(()=>n()),ref:z(()=>i(),v=>i(v))}),c=P(()=>Ye(o,l.props));var f={get id(){return n()},set id(v=$e(r)){n(v),b()},get ref(){return i()},set ref(v=null){i(v),b()},get children(){return a()},set children(v){a(v),b()},get child(){return s()},set child(v){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),y=B(m);Se(y,s,()=>({props:d(c)})),x(v,m)},g=v=>{var m=JP();Ue(m,()=>({...d(c)}));var y=D(m);Se(y,()=>a()??qe),C(m),x(v,m)};return ue(p,v=>{s()?v(h):v(g,-1)}),x(e,u),re(f)}ne(pg,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var QP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]),XP=q("<span><!></span>");function mg(e,t){const r=vt();te(t,!0);let n=_(t,"id",23,()=>$e(r)),i=_(t,"ref",15,null),a=_(t,"children",7),s=_(t,"child",7),o=_(t,"part",7),l=He(t,QP);const c=ZP.create(o(),{id:z(()=>n()),ref:z(()=>i(),m=>i(m))}),f=P(()=>Ye(l,c.props));var u={get id(){return n()},set id(m=$e(r)){n(m),b()},get ref(){return i()},set ref(m=null){i(m),b()},get children(){return a()},set children(m){a(m),b()},get child(){return s()},set child(m){s(m),b()},get part(){return o()},set part(m){o(m),b()}},p=ie(),h=B(p),g=m=>{var y=ie(),E=B(y);Se(E,s,()=>({props:d(f)})),x(m,y)},v=m=>{var y=XP();Ue(y,()=>({...d(f)}));var E=D(y);Se(E,()=>a()??qe),C(y),x(m,y)};return ue(h,m=>{s()?m(g):m(v,-1)}),x(e,p),re(u)}ne(mg,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});var vg=new Ft("DatePicker.Root"),eM=class Zy{static create(t){return vg.set(new Zy(t))}opts;constructor(t){this.opts=t}};function zc(e,t){const[r,n]=e;let i=!1;const a=t.length;for(let s=0,o=a-1;s<a;o=s++){const[l,c]=t[s]??[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 gg(e,t){const r=e.left+e.width/2,n=e.top+e.height/2,i=t.left+t.width/2,a=t.top+t.height/2,s=i-r,o=a-n;return Math.abs(s)>Math.abs(o)?s>0?"right":"left":o>0?"bottom":"top"}var tM=class{#e;#t;#r;#n=null;#i=null;#a=[];#s=null;#o=null;#l=null;#u(){this.#o!==null&&(cancelAnimationFrame(this.#o),this.#o=null)}#c(){this.#u(),this.#o=requestAnimationFrame(()=>{this.#o=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,at([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#s=null,this.#f();return}this.#s&&this.#s!==r&&this.#f(),this.#s=r;const a=bo(r),s=u=>{this.#p([u.clientX,u.clientY],r,n)},o=u=>{const p=u.relatedTarget;if(ai(p)&&n.contains(p))return;const h=this.#e.ignoredTargets?.()??[];ai(p)&&h.some(g=>g===p||g.contains(p))||(this.#a=ai(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;ai(p)&&r.contains(p)||(this.#n=[u.clientX,u.clientY],this.#i="trigger",this.#c())};return[bt(a,"pointermove",s),bt(r,"pointerleave",o),bt(r,"pointerenter",l),bt(n,"pointerenter",c),bt(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.#a.length>0)for(const l of this.#a){const c=l.getBoundingClientRect();if(qc(e,c))return;const f=gg(n,c),u=this.#m(n,c,f);if(u&&zc(e,u))return}const a=gg(n,i),s=this.#m(n,i,a);if(s&&zc(e,s))return;const o=this.#i==="content"?i:n;zc(e,this.#v(this.#n,o,a,this.#i))||(this.#f(),this.#e.onPointerExit())}#f(){this.#n=null,this.#i=null,this.#a=[],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,[a,s]=e;switch(n==="trigger"?this.#y(r):r){case"top":return[[a-i,s+i],[a+i,s+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case"bottom":return[[a-i,s-i],[a+i,s-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case"left":return[[a+i,s-i],[a+i,s+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case"right":return[[a-i,s-i],[a-i,s+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=_o({component:"popover",parts:["root","trigger","content","close","overlay"]}),Bc=new Ft("Popover.Root"),rM=class Wy{static create(t){return Bc.set(new Wy(t))}opts;#e=se(null);get contentNode(){return d(this.#e)}set contentNode(t){F(this.#e,t,!0)}contentPresence;#t=se(null);get triggerNode(){return d(this.#t)}set triggerNode(t){F(this.#t,t,!0)}#r=se(null);get overlayNode(){return d(this.#r)}set overlayNode(t){F(this.#r,t,!0)}overlayPresence;#n=se(!1);get openedViaHover(){return d(this.#n)}set openedViaHover(t){F(this.#n,t,!0)}#i=se(!1);get hasInteractedWithContent(){return d(this.#i)}set hasInteractedWithContent(t){F(this.#i,t,!0)}#a=se(!1);get hoverCooldown(){return d(this.#a)}set hoverCooldown(t){F(this.#a,t,!0)}#s=se(0);get closeDelay(){return d(this.#s)}set closeDelay(t){F(this.#s,t,!0)}#o=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new Vm({ref:z(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new Vm({ref:z(()=>this.overlayNode),open:this.opts.open}),at(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#u())})}setDomContext(t){this.#l=t}#u(){this.#o!==null&&this.#l&&(this.#l.clearTimeout(this.#o),this.#o=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.#o=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#o=null},this.closeDelay))))}cancelDelayedClose(){this.#u()}markInteraction(){this.hasInteractedWithContent=!0,this.#u()}},nM=class Hy{static create(t){return new Hy(t,Bc.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=se(!1);constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new Vi(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),at(()=>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)}#a(){this.#n(),this.#i()}onpointerenter(t){if(this.opts.disabled.current||!this.opts.openOnHover.current||ko(t)||(F(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&&(ko(t)||(F(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#a(),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.#a(),this.root.toggleOpen())}#s(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=P(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Tr(this.root.opts.open.current),"data-state":zm(this.root.opts.open.current),"aria-controls":this.#s(),[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.#o)}set props(t){F(this.#o,t)}},iM=class Gy{static create(t){return new Gy(t,Bc.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(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 tM({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;ai(r)&&AO(r)&&this.root.markInteraction()}onpointerenter(t){ko(t)||this.root.cancelDelayedClose()}onpointerleave(t){ko(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!ai(t.target))return;const r=t.target.closest(Uc.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(ai(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=P(()=>({open:this.root.opts.open.current}));get snippetProps(){return d(this.#e)}set snippetProps(t){F(this.#e,t)}#t=P(()=>({id:this.opts.id.current,tabindex:-1,"data-state":zm(this.root.opts.open.current),...QC(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){F(this.#t,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}};function yg(e,t){te(t,!0);let r=_(t,"open",15,!1),n=_(t,"onOpenChange",7,xe),i=_(t,"onOpenChangeComplete",7,xe),a=_(t,"value",15),s=_(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,()=>[]),E=_(t,"hourCycle",7),S=_(t,"locale",7),T=_(t,"hideTimeZone",7,!1),A=_(t,"required",7,!1),I=_(t,"calendarLabel",7,"Event"),M=_(t,"disableDaysOutsideMonth",7,!0),N=_(t,"preventDeselect",7,!1),j=_(t,"pagedNavigation",7,!1),R=_(t,"weekStartsOn",7),X=_(t,"weekdayFormat",7,"narrow"),U=_(t,"isDateDisabled",7,()=>!1),le=_(t,"fixedWeeks",7,!1),he=_(t,"numberOfMonths",7,1),H=_(t,"closeOnDateSelect",7,!0),oe=_(t,"initialFocus",7,!1),W=_(t,"errorMessageId",7),fe=_(t,"children",7),ce=_(t,"monthFormat",7,"long"),de=_(t,"yearFormat",7,"numeric");const J=fv({granularity:m(),defaultValue:a(),minValue:p(),maxValue:h()});function ee(){o()===void 0&&o(J)}ee(),at.pre(()=>o(),()=>{ee()});function $(){H()&&r(!1)}const ae=eM.create({open:z(()=>r(),w=>{r(w),n()(w)}),value:z(()=>a(),w=>{a(w),s()(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(()=>E()),locale:Zm(()=>S()),hideTimeZone:z(()=>T()),required:z(()=>A()),calendarLabel:z(()=>I()),disableDaysOutsideMonth:z(()=>M()),preventDeselect:z(()=>N()),pagedNavigation:z(()=>j()),weekStartsOn:z(()=>R()),weekdayFormat:z(()=>X()),isDateDisabled:z(()=>U()),fixedWeeks:z(()=>le()),numberOfMonths:z(()=>he()),initialFocus:z(()=>oe()),onDateSelect:z(()=>$),defaultPlaceholder:J,monthFormat:z(()=>ce()),yearFormat:z(()=>de())});rM.create({open:ae.opts.open,onOpenChangeComplete:z(()=>i())}),PP.create({value:ae.opts.value,disabled:ae.opts.disabled,readonly:ae.opts.readonly,readonlySegments:ae.opts.readonlySegments,validate:z(()=>f()),onInvalid:z(()=>u()),minValue:ae.opts.minValue,maxValue:ae.opts.maxValue,granularity:ae.opts.granularity,hideTimeZone:ae.opts.hideTimeZone,hourCycle:ae.opts.hourCycle,locale:ae.opts.locale,required:ae.opts.required,placeholder:ae.opts.placeholder,errorMessageId:z(()=>W()),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 a()},set value(w){a(w),b()},get onValueChange(){return s()},set onValueChange(w=xe){s(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 E()},set hourCycle(w){E(w),b()},get locale(){return S()},set locale(w){S(w),b()},get hideTimeZone(){return T()},set hideTimeZone(w=!1){T(w),b()},get required(){return A()},set required(w=!1){A(w),b()},get calendarLabel(){return I()},set calendarLabel(w="Event"){I(w),b()},get disableDaysOutsideMonth(){return M()},set disableDaysOutsideMonth(w=!0){M(w),b()},get preventDeselect(){return N()},set preventDeselect(w=!1){N(w),b()},get pagedNavigation(){return j()},set pagedNavigation(w=!1){j(w),b()},get weekStartsOn(){return R()},set weekStartsOn(w){R(w),b()},get weekdayFormat(){return X()},set weekdayFormat(w="narrow"){X(w),b()},get isDateDisabled(){return U()},set isDateDisabled(w=()=>!1){U(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 H()},set closeOnDateSelect(w=!0){H(w),b()},get initialFocus(){return oe()},set initialFocus(w=!1){oe(w),b()},get errorMessageId(){return W()},set errorMessageId(w){W(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=ie(),G=B(be);return Fe(G,()=>ig,(w,_e)=>{_e(w,{children:(we,De)=>{var Le=ie(),je=B(Le);Se(je,()=>fe()??qe),x(we,Le)},$$slots:{default:!0}})}),x(e,be),re(L)}ne(yg,{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 aM=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]),sM=q("<div><!></div>");function bg(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"id",23,()=>$e(r)),s=_(t,"ref",15,null),o=He(t,aM);const l=vg.get(),c=Dv.create({id:z(()=>a()),ref:z(()=>s(),m=>s(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=P(()=>Ye(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 a()},set id(m=$e(r)){a(m),b()},get ref(){return s()},set ref(m=null){s(m),b()}},p=ie(),h=B(p),g=m=>{var y=ie(),E=B(y);{let S=P(()=>({props:d(f),...c.snippetProps}));Se(E,i,()=>d(S))}x(m,y)},v=m=>{var y=sM();Ue(y,()=>({...d(f)}));var E=D(y);Se(E,()=>n()??qe,()=>c.snippetProps),C(y),x(m,y)};return ue(h,m=>{i()?m(g):m(v,-1)}),x(e,p),re(u)}ne(bg,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var oM=new Set(["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]),_g=q("<div><div><!></div></div>");function wg(e,t){const r=vt();te(t,!0);let n=_(t,"child",7),i=_(t,"children",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(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,oM);const y=iM.create({id:z(()=>s()),ref:z(()=>a(),R=>a(R)),onInteractOutside:z(()=>u()),onEscapeKeydown:z(()=>f()),customAnchor:z(()=>g())}),E=P(()=>Ye(m,y.props)),S=P(()=>p()&&y.shouldTrapFocus);function T(R){y.shouldTrapFocus||R.preventDefault(),l()(R)}var A={get child(){return n()},set child(R){n(R),b()},get children(){return i()},set children(R){i(R),b()},get ref(){return a()},set ref(R=null){a(R),b()},get id(){return s()},set id(R=$e(r)){s(R),b()},get forceMount(){return o()},set forceMount(R=!1){o(R),b()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(R=xe){l(R),b()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(R=xe){c(R),b()},get onEscapeKeydown(){return f()},set onEscapeKeydown(R=xe){f(R),b()},get onInteractOutside(){return u()},set onInteractOutside(R=xe){u(R),b()},get trapFocus(){return p()},set trapFocus(R=!0){p(R),b()},get preventScroll(){return h()},set preventScroll(R=!1){h(R),b()},get customAnchor(){return g()},set customAnchor(R=null){g(R),b()},get style(){return v()},set style(R){v(R),b()}},I=ie(),M=B(I),N=R=>{cg(R,An(()=>d(E),()=>y.popperProps,{get ref(){return y.opts.ref},get enabled(){return y.root.opts.open.current},get id(){return s()},get trapFocus(){return d(S)},get preventScroll(){return h()},loop:!0,forceMount:!0,get customAnchor(){return g()},onOpenAutoFocus:T,get onCloseAutoFocus(){return c()},get shouldRender(){return y.shouldRender},popper:(U,le)=>{let he=()=>le?.().props,H=()=>le?.().wrapperProps;const oe=P(()=>Ye(he(),{style:rg("popover")},{style:v()}));var W=ie(),fe=B(W),ce=J=>{var ee=ie(),$=B(ee);{let ae=P(()=>({props:d(oe),wrapperProps:H(),...y.snippetProps}));Se($,n,()=>d(ae))}x(J,ee)},de=J=>{var ee=_g();Ue(ee,()=>({...H()}));var $=D(ee);Ue($,()=>({...d(oe)}));var ae=D($);Se(ae,()=>i()??qe),C($),C(ee),x(J,ee)};ue(fe,J=>{n()?J(ce):J(de,-1)}),x(U,W)},$$slots:{popper:!0}}))},j=R=>{ug(R,An(()=>d(E),()=>y.popperProps,{get ref(){return y.opts.ref},get open(){return y.root.opts.open.current},get id(){return s()},get trapFocus(){return d(S)},get preventScroll(){return h()},loop:!0,forceMount:!1,get customAnchor(){return g()},onOpenAutoFocus:T,get onCloseAutoFocus(){return c()},get shouldRender(){return y.shouldRender},popper:(U,le)=>{let he=()=>le?.().props,H=()=>le?.().wrapperProps;const oe=P(()=>Ye(he(),{style:rg("popover")},{style:v()}));var W=ie(),fe=B(W),ce=J=>{var ee=ie(),$=B(ee);{let ae=P(()=>({props:d(oe),wrapperProps:H(),...y.snippetProps}));Se($,n,()=>d(ae))}x(J,ee)},de=J=>{var ee=_g();Ue(ee,()=>({...H()}));var $=D(ee);Ue($,()=>({...d(oe)}));var ae=D($);Se(ae,()=>i()??qe),C($),C(ee),x(J,ee)};ue(fe,J=>{n()?J(ce):J(de,-1)}),x(U,W)},$$slots:{popper:!0}}))};return ue(M,R=>{o()?R(N):o()||R(j,1)}),x(e,I),re(A)}ne(wg,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:"open"});var lM=new Set(["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);function kg(e,t){te(t,!0);let r=_(t,"ref",15,null),n=_(t,"onOpenAutoFocus",7),i=He(t,lM);const a=P(()=>Ye({onOpenAutoFocus:n()},{onOpenAutoFocus:ND}));var s={get ref(){return r()},set ref(o=null){r(o),b()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(o){n(o),b()}};return wg(e,An(()=>d(a),()=>i,{get ref(){return r()},set ref(o){r(o)}})),re(s)}ne(kg,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var uM=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),cM=q("<button><!></button>");function Sg(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"id",23,()=>$e(r)),s=_(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,uM);const h=nM.create({id:z(()=>a()),ref:z(()=>s(),m=>s(m)),disabled:z(()=>!!l()),openOnHover:z(()=>c()),openDelay:z(()=>f()),closeDelay:z(()=>u())}),g=P(()=>Ye(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 a()},set id(m=$e(r)){a(m),b()},get ref(){return s()},set ref(m=null){s(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 ag(e,{get id(){return a()},get ref(){return h.opts.ref},children:(m,y)=>{var E=ie(),S=B(E),T=I=>{var M=ie(),N=B(M);Se(N,i,()=>({props:d(g)})),x(I,M)},A=I=>{var M=cM();Ue(M,()=>({...d(g)}));var N=D(M);Se(N,()=>n()??qe),C(M),x(I,M)};ue(S,I=>{i()?I(T):I(A,-1)}),x(m,E)},$$slots:{default:!0}}),re(v)}ne(Sg,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});var dM=new Set(["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function Eg(e,t){te(t,!0);let r=_(t,"ref",15,null),n=_(t,"onkeydown",7),i=He(t,dM);function a(l){if(is(l.key)){const c=l.currentTarget.closest(Zo.selector("input"));if(!c)return;ns(l,c)}}const s=P(()=>Ye({onkeydown:n()},{onkeydown:a}));var o={get ref(){return r()},set ref(l=null){r(l),b()},get onkeydown(){return n()},set onkeydown(l){n(l),b()}};return Sg(e,An(()=>i,{"data-segment":"trigger"},()=>d(s),{get ref(){return r()},set ref(l){r(l)}})),re(o)}ne(Eg,{ref:{},onkeydown:{}},[],[],{mode:"open"});var Vc=q("<!> <!>",1),xg=q("<!> <!> <!>",1);function Tg(e,t){te(t,!0);let r=_(t,"dateString",15),n=_(t,"labelClass",7),i=_(t,"inputClass",7),a=_(t,"labelText",7),s=se(Pe(Pi(er())));const o="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);ve(()=>{r(d(s).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 a()},set labelText(u){a(u),b()}},c=ie(),f=B(c);{let u=P(()=>k.locale||"de");Fe(f,()=>yg,(p,h)=>{h(p,{get locale(){return d(u)},weekStartsOn:1,isDateDisabled:g=>g.compare(Pi(er()))<0,get value(){return d(s)},set value(g){F(s,g,!0)},children:(g,v)=>{var m=xg(),y=B(m);Fe(y,()=>pg,(T,A)=>{A(T,{get id(){return o},get class(){return`go-datepicker-label ${n()??""}`},children:(I,M)=>{var N=ie(),j=B(N),R=X=>{var U=ie(),le=B(U);Se(le,a),x(X,U)};ue(j,X=>{a()&&X(R)}),x(I,N)},$$slots:{default:!0}})});var E=V(y,2);{const T=(A,I)=>{let M=()=>I?.().segments;var N=Vc(),j=B(N);Me(j,17,M,an,(X,U)=>{let le=()=>d(U).part,he=()=>d(U).value;var H=ie(),oe=B(H);Fe(oe,()=>mg,(W,fe)=>{fe(W,{get part(){return le()},children:(ce,de)=>{gt();var J=Vt();Y(()=>Z(J,he())),x(ce,J)},$$slots:{default:!0}})}),x(X,H)});var R=V(j,2);Fe(R,()=>Eg,(X,U)=>{U(X,{get"aria-labelledby"(){return o},class:"go-calendar-button"})}),x(A,N)};Fe(E,()=>hg,(A,I)=>{I(A,{get class(){return`go-datepicker-input ${i()??""}`},children:T,$$slots:{default:!0}})})}var S=V(E,2);Fe(S,()=>kg,(T,A)=>{A(T,{children:(I,M)=>{var N=ie(),j=B(N);{const R=(X,U)=>{let le=()=>U?.().months,he=()=>U?.().weekdays;var H=Vc(),oe=B(H);Fe(oe,()=>gc,(fe,ce)=>{ce(fe,{children:(de,J)=>{var ee=xg(),$=B(ee);Fe($,()=>_c,(be,G)=>{G(be,{class:"go-datepicker-previous"})});var ae=V($,2);Fe(ae,()=>yc,(be,G)=>{G(be,{class:"go-datepicker-selected-month"})});var L=V(ae,2);Fe(L,()=>bc,(be,G)=>{G(be,{class:"go-datepicker-next"})}),x(de,ee)},$$slots:{default:!0}})});var W=V(oe,2);Me(W,16,le,fe=>fe,(fe,ce)=>{var de=ie(),J=B(de);Fe(J,()=>fc,(ee,$)=>{$(ee,{children:(ae,L)=>{var be=Vc(),G=B(be);Fe(G,()=>mc,(_e,we)=>{we(_e,{children:(De,Le)=>{var je=ie(),_t=B(je);Fe(_t,()=>ss,(ot,Nt)=>{Nt(ot,{children:(wt,Rt)=>{var ir=ie(),Gt=B(ir);Me(Gt,17,he,an,(gr,Pr)=>{var Mr=ie(),yn=B(Mr);Fe(yn,()=>vc,($r,yr)=>{yr($r,{children:(Xr,en)=>{gt();var At=Vt();Y(()=>Z(At,d(Pr))),x(Xr,At)},$$slots:{default:!0}})}),x(gr,Mr)}),x(wt,ir)},$$slots:{default:!0}})}),x(De,je)},$$slots:{default:!0}})});var w=V(G,2);Fe(w,()=>hc,(_e,we)=>{we(_e,{children:(De,Le)=>{var je=ie(),_t=B(je);Me(_t,16,()=>ce.weeks,ot=>ot,(ot,Nt)=>{var wt=ie(),Rt=B(wt);Fe(Rt,()=>ss,(ir,Gt)=>{Gt(ir,{children:(gr,Pr)=>{var Mr=ie(),yn=B(Mr);Me(yn,16,()=>Nt,$r=>$r,($r,yr,Xr,en)=>{var At=ie(),Un=B(At);Fe(Un,()=>pc,(na,ia)=>{ia(na,{get date(){return yr},get month(){return ce.value},children:(fs,td)=>{var mi=ie(),aa=B(mi);Fe(aa,()=>dc,(br,Bn)=>{Bn(br,{})}),x(fs,mi)},$$slots:{default:!0}})}),x($r,At)}),x(gr,Mr)},$$slots:{default:!0}})}),x(ot,wt)}),x(De,je)},$$slots:{default:!0}})}),x(ae,be)},$$slots:{default:!0}})}),x(fe,de)}),x(X,H)};Fe(j,()=>bg,(X,U)=>{U(X,{children:R,$$slots:{default:!0}})})}x(I,N)},$$slots:{default:!0}})}),x(g,m)},$$slots:{default:!0}})})}return x(e,c),re(l)}ne(Tg,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var fM=new Set(["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]),hM=q('<span class="go-field-star" aria-hidden="true">*</span>'),pM=q(" <!>",1),mM=q("<label><!></label> <input/>",1),vM=q("<label><!></label> <textarea></textarea>",1),gM=q('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),yM=q("<label><!></label> <input/> <!>",1),bM=q('<label><input/> <span class="go-checkbox-label"><!></span></label>'),_M=q('<img src="" alt=""/> <option> </option>',1),wM=q('<option disabled="" hidden="" selected=""> </option> <!>',1),kM=q("<!>",1),SM=q("<label><!></label> <select><!></select>",1),EM=q('<img style="width: 60px" aria-hidden="true"/>'),xM=q('<span class="go-payment-mode-icons"></span>'),TM=q('<span class="go-payment-mode-name"> </span>'),AM=q('<label><input type="radio"/> <!></label>'),CM=q('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),OM=q("<label> <input/></label>"),DM=q("<fieldset><legend><!></legend> <!></fieldset>");function Ag(e,t){te(t,!0);const r=H=>{gt();var oe=pM(),W=B(oe),fe=V(W),ce=de=>{var J=hM();x(de,J)};ue(fe,de=>{u().required&&de(ce)}),Y(()=>Z(W,`${d(N)??""} `)),x(H,oe)},n=H=>{var oe=mM(),W=B(oe);r(D(W)),C(W);var fe=V(W,2);Ue(fe,()=>({...d(M),...m,class:g(),placeholder:u().placeholder,type:u().type,name:u().key}),void 0,void 0,void 0,void 0,!0),Y(()=>{Et(W,1,dr(h())),pe(W,"for",d(A))}),qs(fe,()=>u().value,ce=>u(u().value=ce,!0)),x(H,oe)},i=H=>{var oe=vM(),W=B(oe);r(D(W)),C(W);var fe=V(W,2);i_(fe),Ue(fe,()=>({...d(M),...m,class:g(),placeholder:u().placeholder,name:u().key})),Y(()=>{Et(W,1,dr(h())),pe(W,"for",d(A))}),qs(fe,()=>u().value,ce=>u(u().value=ce,!0)),x(H,oe)},a=H=>{var oe=yM(),W=B(oe);r(D(W)),C(W);var fe=V(W,2),ce=ee=>{const $=ee.currentTarget.files;u(u().value=$&&$[0]?$[0]:null,!0),d(E)?d(E).validateField(u()):u().validate()};Ue(fe,()=>({...d(M),...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),J=ee=>{var $=gM(),ae=D($),L=V(ae,2),be=D(L,!0);C(L),C($),Y(G=>{pe($,"data-field-preview",u().key),pe(ae,"src",d(R)),pe(ae,"alt",G),Z(be,u().value.name)},[()=>k.t("forms.file.preview_alt")||"User uploaded photo"]),x(ee,$)};ue(de,ee=>{d(R)&&u().value instanceof File&&ee(J)}),Y(()=>{Et(W,1,dr(h())),pe(W,"for",d(A))}),x(H,oe)},s=H=>{var oe=bM(),W=D(oe);Ue(W,()=>({...d(M),...m,name:u().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var fe=V(W,2);r(D(fe)),C(fe),C(oe),Y(()=>{Et(oe,1,dr(h())),pe(oe,"for",d(A))}),K_(W,()=>u().value===!0,ce=>{u(u().value=ce,!0)}),x(H,oe)},o=H=>{var oe=SM(),W=B(oe);r(D(W)),C(W);var fe=V(W,2);Ue(fe,()=>({...d(M),...m,name:u().key,class:g()})),H_(fe,()=>{var ce=D(fe),de=kM(),J=B(de),ee=$=>{var ae=wM(),L=B(ae),be=D(L,!0);C(L),L.value=L.__value="";var G=V(L,2);Me(G,17,()=>u().options(),w=>w.value,(w,_e)=>{var we=_M(),De=V(B(we),2),Le=D(De,!0);C(De);var je={};Y(()=>{Z(Le,d(_e).label),je!==(je=d(_e).value)&&(De.value=(De.__value=d(_e).value)??"")}),x(w,we)}),Y(w=>Z(be,w),[()=>k.t("common.choose")]),x($,ae)};ue(J,$=>{u().options&&$(ee)}),x(ce,de)}),Y(()=>{Et(W,1,dr(h())),pe(W,"for",d(A))}),z_(fe,()=>u().value,ce=>u(u().value=ce,!0)),x(H,oe)},l=H=>{Tg(H,{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=H=>{const oe=P(()=>k.payment_modes?Object.values(k.payment_modes):[]);var W=CM(),fe=D(W);r(D(fe)),C(fe);var ce=V(fe,2);Me(ce,17,()=>d(oe),de=>de.id,(de,J)=>{var ee=AM(),$=D(ee);Ai($);var ae=V($,2),L=G=>{var w=xM();Me(w,20,()=>d(J).icons,_e=>_e,(_e,we)=>{const De=P(()=>j+we+".svg");var Le=EM();Y(()=>{Et(Le,1,dr(we)),pe(Le,"src",d(De)),pe(Le,"alt",we+" icon")}),x(_e,Le)}),C(w),x(G,w)},be=G=>{var w=TM(),_e=D(w,!0);C(w),Y(()=>Z(_e,d(J).name)),x(G,w)};ue(ae,G=>{d(J).icons.length>0?G(L):G(be,-1)}),C(ee),Y((G,w,_e)=>{pe($,"name",u().key),Bl($,G),Pf($,w),pe($,"hidden",d(oe).length===1),pe($,"aria-label",_e)},[()=>String(d(J).id),()=>u().value===String(d(J).id),()=>k.t(`cart.paymentMode.ariaLabel.${d(J).name.toLowerCase()}`)]),ut("change",$,()=>{u(u().value=String(d(J).id),!0)}),x(de,ee)}),C(W),Y(()=>{pe(W,"aria-required",u().required),pe(W,"aria-invalid",u().errors.length>0)}),x(H,W)},f=H=>{var oe=DM(),W=D(oe);r(D(W)),C(W);var fe=V(W,2),ce=de=>{var J=ie(),ee=B(J);Me(ee,17,()=>u().options(),$=>$.value,($,ae)=>{var L=OM(),be=D(L),G=V(be);Ue(G,()=>({...d(M),...m,class:g(),type:"radio"}),void 0,void 0,void 0,void 0,!0),C(L),Y(()=>{Et(L,1,dr(h())),pe(L,"for",d(A)+d(ae).value),Z(be,`${d(ae).label??""} `)}),qs(G,()=>u().value,w=>u(u().value=w,!0)),x($,L)}),x(de,J)};ue(fe,de=>{u().options&&de(ce)}),C(oe),x(H,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,fM);const y=Ri(v()),E=P(()=>y.value),S={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:s,select:o,radio:f,date:l,file:a,textarea:i,paymentMode:c},T=P(()=>S[u().type]);let A=P(()=>t.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function I(){u().type!=="checkbox"&&u().value&&(d(E)?d(E).validateField(u()):u().validate())}const M=P(()=>({id:d(A),"aria-describedby":p(),"aria-required":u().required,"aria-invalid":u().errors.length>0,autocomplete:u().autocomplete,onblur:I}));let N=P(()=>k.t(u().label)||u().label);const j="https://cdn.shop.platform.gomus.de/";ve(()=>{if(u().type!=="paymentMode")return;const H=k.payment_modes?Object.values(k.payment_modes):[];H.length===1&&u().value===""&&u(u().value=String(H[0].id),!0)});let R=se(null);ve(()=>{const H=u().value;if(H instanceof File&&H.type.startsWith("image/")){const oe=URL.createObjectURL(H);return F(R,oe,!0),()=>{URL.revokeObjectURL(oe),F(R,null)}}F(R,null)});var X={get field(){return u()},set field(H){u(H),b()},get describedByIds(){return p()},set describedByIds(H){p(H),b()},get labelClass(){return h()},set labelClass(H){h(H),b()},get inputClass(){return g()},set inputClass(H){g(H),b()},get host(){return v()},set host(H){v(H),b()}},U=ie(),le=B(U),he=H=>{var oe=ie(),W=B(oe);Se(W,()=>d(T)),x(H,oe)};return ue(le,H=>{d(T)&&H(he)}),x(e,U),re(X)}Bt(["change"]),ne(Ag,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var IM=q("<span> </span>"),PM=q("<li> </li>"),MM=q('<ul class="go-field-errors"></ul>'),$M=q("<!> <!> <!>",1);function FM(e,t){te(t,!0);let r=_(t,"key",7),n=_(t,"required",7,!1),i=_(t,"labelClass",7),a=_(t,"inputClass",7),s=se(Pe(Pt.createField(r(),n())));const o=Ri(t.$$host),l=P(()=>o.value),c=()=>d(s);let f=P(()=>d(s)?[...d(s).errors,...d(s).apiErrors].map(M=>k.t(M)):[]),u=P(()=>d(s)?.description),p=P(()=>d(f).length>0),h=P(()=>`go-description-${r()}-${Math.floor(Math.random()*100)}`),g=P(()=>`go-errors-${r()}-${Math.floor(Math.random()*100)}`),v=P(()=>[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(s)&&(d(s).mounted=!0,d(s).value,Re(()=>{d(s)?.errors.length&&d(l).validateField(d(s))}))});var m={getField:c,get key(){return r()},set key(M){r(M),b()},get required(){return n()},set required(M=!1){n(M),b()},get labelClass(){return i()},set labelClass(M){i(M),b()},get inputClass(){return a()},set inputClass(M){a(M),b()}},y=$M(),E=B(y);Ag(E,{get describedByIds(){return d(v)},get labelClass(){return i()},get inputClass(){return a()},host:t.$$host,get field(){return d(s)},set field(M){F(s,M,!0)}});var S=V(E,2),T=M=>{var N=IM(),j=D(N,!0);C(N),Y(()=>{pe(N,"id",d(h)),Z(j,d(s).description)}),x(M,N)};ue(S,M=>{d(u)&&M(T)});var A=V(S,2),I=M=>{var N=MM();Me(N,21,()=>d(f),an,(j,R)=>{var X=PM(),U=D(X,!0);C(X),Y(()=>Z(U,d(R))),x(j,X)}),C(N),Y(()=>pe(N,"id",d(g))),x(M,N)};return ue(A,M=>{d(p)&&M(I)}),x(e,y),re(m)}customElements.define("go-field",ne(FM,{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 NM=q("<go-field></go-field>",2);function RM(e,t){te(t,!0);let r=Ri(t.$$host),n=P(()=>r.value),i=P(()=>d(n)?Pt.getFormFields(d(n)?.formId):[]);var a=ie(),s=B(a);Me(s,17,()=>d(i),o=>o.key,(o,l)=>{var c=NM();Y(()=>Tn(c,"key",d(l).key)),Y(()=>Tn(c,"required",d(l).required)),x(o,c)}),x(e,a),re()}customElements.define("go-all-fields",ne(RM,{},[],[]));var LM=q('<p aria-hidden="true"> </p>'),zM=q("<li> </li>"),qM=q('<ul class="go-error-feedback-api-errors"></ul>'),UM=q('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function BM(e,t){te(t,!0);const r=Ri(t.$$host),n=P(()=>r.value);ve(()=>{d(n)?.form?.addEventListener("go-after-validation",()=>{F(s,Nu(d(n)?.fields),!0)})});let i=se(0);setInterval(()=>{F(i,Nu(d(n)?.fields)||0,!0)},100);let a=P(()=>d(i)+(d(n)?.apiErrors?.length||0)),s=se(-1);ve(()=>{t.$$host.classList.toggle("is-invalid",d(a)>0),t.$$host.classList.toggle("go-feedback",!0),t.$$host.setAttribute("data-num-errors",d(a).toString())});var o=UM(),l=D(o),c=D(l),f=m=>{var y=Vt();Y(E=>Z(y,E),[()=>k.t("forms.errorSummary",{count:d(s)})]),x(m,y)};ue(c,m=>{d(s)>0&&m(f)}),C(l);var u=V(l,2),p=m=>{var y=LM(),E=D(y,!0);C(y),Y(S=>Z(E,S),[()=>k.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=qM();Me(y,21,()=>d(n)?.apiErrors,an,(E,S)=>{var T=zM(),A=D(T,!0);C(T),Y(()=>Z(A,d(S))),x(E,T)}),C(y),x(m,y)},v=P(()=>d(n)&&Xl(d(n).apiErrors)&&d(n).apiErrors.length>0);ue(h,m=>{d(v)&&m(g)}),C(o),x(e,o),re()}customElements.define("go-errors-feedback",ne(BM,{},[],[]));var VM=q('<div class="go-form-feedback"><!></div>');function jM(e,t){var r=VM(),n=D(r);$_(n,t,"default",{},null),C(r),x(e,r)}customElements.define("go-form-feedback",ne(jM,{},["default"],[]));function ZM(e,t){te(t,!0);let r=_(t,"buttonClass",7,"");return En(()=>{Hr(t.$$host,"button",{type:"submit",class:r()})}),re({get buttonClass(){return r()},set buttonClass(n=""){r(n),b()}})}customElements.define("go-submit",ne(ZM,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var WM=q('<div aria-live="assertive"> </div>');function HM(e,t){te(t,!0);const r=Ri(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=WM();let c;var f=D(l,!0);C(l),Y(()=>{c=Et(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":d(n).successMessage}),Z(f,d(n)?.successMessage)}),x(o,l)};ue(a,o=>{d(n)?.successMessage&&o(s)}),x(e,i),re()}customElements.define("go-success-feedback",ne(HM,{},[],[]));var vr="INUMBER",Yi="IOP1",Ji="IOP2",Qi="IOP3",fn="IVAR",di="IVARNAME",Xi="IFUNCALL",Wo="IFUNDEF",Ht="IEXPR",jc="IEXPREVAL",fi="IMEMBER",Ho="IENDSTATEMENT",ea="IARRAY";function Ne(e,t){this.type=e,this.value=t??0}Ne.prototype.toString=function(){switch(this.type){case vr:case Yi:case Ji:case Qi:case fn:case di:case Ho:return this.value;case Xi:return"CALL "+this.value;case Wo:return"DEF "+this.value;case ea:return"ARRAY "+this.value;case fi:return"."+this.value;default:return"Invalid Instruction"}};function Go(e){return new Ne(Yi,e)}function hn(e){return new Ne(Ji,e)}function Cg(e){return new Ne(Qi,e)}function Zc(e,t,r,n,i){for(var a=[],s=[],o,l,c,f,u=0;u<e.length;u++){var p=e[u],h=p.type;if(h===vr||h===di)Array.isArray(p.value)?a.push.apply(a,Zc(p.value.map(function(g){return new Ne(vr,g)}).concat(new Ne(ea,p.value.length)),t,r,n,i)):a.push(p);else if(h===fn&&i.hasOwnProperty(p.value))p=new Ne(vr,i[p.value]),a.push(p);else if(h===Ji&&a.length>1)l=a.pop(),o=a.pop(),f=r[p.value],p=new Ne(vr,f(o.value,l.value)),a.push(p);else if(h===Qi&&a.length>2)c=a.pop(),l=a.pop(),o=a.pop(),p.value==="?"?a.push(o.value?l.value:c.value):(f=n[p.value],p=new Ne(vr,f(o.value,l.value,c.value)),a.push(p));else if(h===Yi&&a.length>0)o=a.pop(),f=t[p.value],p=new Ne(vr,f(o.value)),a.push(p);else if(h===Ht){for(;a.length>0;)s.push(a.shift());s.push(new Ne(Ht,Zc(p.value,t,r,n,i)))}else if(h===fi&&a.length>0)o=a.pop(),a.push(new Ne(vr,o.value[p.value]));else{for(;a.length>0;)s.push(a.shift());s.push(p)}}for(;a.length>0;)s.push(a.shift());return s}function Og(e,t,r){for(var n=[],i=0;i<e.length;i++){var a=e[i],s=a.type;if(s===fn&&a.value===t)for(var o=0;o<r.tokens.length;o++){var l=r.tokens[o],c;l.type===Yi?c=Go(l.value):l.type===Ji?c=hn(l.value):l.type===Qi?c=Cg(l.value):c=new Ne(l.type,l.value),n.push(c)}else s===Ht?n.push(new Ne(Ht,Og(a.value,t,r))):n.push(a)}return n}function hi(e,t,r){var n=[],i,a,s,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===vr||h===di)n.push(p.value);else if(h===Ji)a=n.pop(),i=n.pop(),p.value==="and"?n.push(i?!!hi(a,t,r):!1):p.value==="or"?n.push(i?!0:!!hi(a,t,r)):p.value==="="?(o=t.binaryOps[p.value],n.push(o(i,hi(a,t,r),r))):(o=t.binaryOps[p.value],n.push(o(pn(i,r),pn(a,r))));else if(h===Qi)s=n.pop(),a=n.pop(),i=n.pop(),p.value==="?"?n.push(hi(i?a:s,t,r)):(o=t.ternaryOps[p.value],n.push(o(pn(i,r),pn(a,r),pn(s,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===Yi)i=n.pop(),o=t.unaryOps[p.value],n.push(o(pn(i,r)));else if(h===Xi){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===Wo)n.push((function(){for(var v=n.pop(),m=[],y=p.value;y-- >0;)m.unshift(n.pop());var E=n.pop(),S=function(){for(var T=Object.assign({},r),A=0,I=m.length;A<I;A++)T[m[A]]=arguments[A];return hi(v,t,T)};return Object.defineProperty(S,"name",{value:E,writable:!1}),r[E]=S,S})());else if(h===Ht)n.push(GM(p,t));else if(h===jc)n.push(p);else if(h===fi)i=n.pop(),n.push(i[p.value]);else if(h===Ho)n.pop();else if(h===ea){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 GM(e,t,r){return Wc(e)?e:{type:jc,value:function(n){return hi(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,a,s,o,l,c=0;c<e.length;c++){var f=e[c],u=f.type;if(u===vr)typeof f.value=="number"&&f.value<0?r.push("("+f.value+")"):Array.isArray(f.value)?r.push("["+f.value.map(Dg).join(", ")+"]"):r.push(Dg(f.value));else if(u===Ji)i=r.pop(),n=r.pop(),s=f.value,t?s==="^"?r.push("Math.pow("+n+", "+i+")"):s==="and"?r.push("(!!"+n+" && !!"+i+")"):s==="or"?r.push("(!!"+n+" || !!"+i+")"):s==="||"?r.push("(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }(("+n+"),("+i+")))"):s==="=="?r.push("("+n+" === "+i+")"):s==="!="?r.push("("+n+" !== "+i+")"):s==="["?r.push(n+"[("+i+") | 0]"):r.push("("+n+" "+s+" "+i+")"):s==="["?r.push(n+"["+i+"]"):r.push("("+n+" "+s+" "+i+")");else if(u===Qi)if(a=r.pop(),i=r.pop(),n=r.pop(),s=f.value,s==="?")r.push("("+n+" ? "+i+" : "+a+")");else throw new Error("invalid Expression");else if(u===fn||u===di)r.push(f.value);else if(u===Yi)n=r.pop(),s=f.value,s==="-"||s==="+"?r.push("("+s+n+")"):t?s==="not"?r.push("(!"+n+")"):s==="!"?r.push("fac("+n+")"):r.push(s+"("+n+")"):s==="!"?r.push("("+n+"!)"):r.push("("+s+" "+n+")");else if(u===Xi){for(l=f.value,o=[];l-- >0;)o.unshift(r.pop());s=r.pop(),r.push(s+"("+o.join(", ")+")")}else if(u===Wo){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===ea){for(l=f.value,o=[];l-- >0;)o.unshift(r.pop());r.push("["+o.join(", ")+"]")}else if(u===Ht)r.push("("+Hc(f.value,t)+")");else if(u!==Ho)throw new Error("invalid Expression")}return r.length>1&&(t?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function Dg(e){return typeof e=="string"?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}function ta(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,a=0;a<e.length;a++){var s=e[a];s.type===fn||s.type===di?!n&&!ta(t,s.value)?t.push(s.value):(i!==null&&(ta(t,i)||t.push(i)),i=s.value):s.type===fi&&n&&i!==null?i+="."+s.value:s.type===Ht?Gc(s.value,t,r):i!==null&&(ta(t,i)||t.push(i),i=null)}i!==null&&!ta(t,i)&&t.push(i)}function Ir(e,t){this.tokens=e,this.parser=t,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.functions=t.functions}Ir.prototype.simplify=function(e){return e=e||{},new Ir(Zc(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,e),this.parser)},Ir.prototype.substitute=function(e,t){return t instanceof Ir||(t=this.parser.parse(String(t))),new Ir(Og(this.tokens,e,t),this.parser)},Ir.prototype.evaluate=function(e){return e=e||{},hi(this.tokens,this,e)},Ir.prototype.toString=function(){return Hc(this.tokens,!1)},Ir.prototype.symbols=function(e){e=e||{};var t=[];return Gc(this.tokens,t,e),t},Ir.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)})},Ir.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 us="TEOF",Ge="TOP",Ko="TNUMBER",Ig="TSTRING",mn="TPAREN",ra="TBRACKET",Yo="TCOMMA",Kc="TNAME",Yc="TSEMICOLON";function Pg(e,t,r){this.type=e,this.value=t,this.index=r}Pg.prototype.toString=function(){return this.type+": "+this.value};function st(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}st.prototype.newToken=function(e,t,r){return new Pg(e,t,r??this.pos)},st.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},st.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},st.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(us,"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)+'"')},st.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(Ig,this.unescape(i),t),e=!0;break}n=this.expression.indexOf(r,n+1)}return e},st.prototype.isParen=function(){var e=this.expression.charAt(this.pos);return e==="("||e===")"?(this.current=this.newToken(mn,e),this.pos++,!0):!1},st.prototype.isBracket=function(){var e=this.expression.charAt(this.pos);return(e==="["||e==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(ra,e),this.pos++,!0):!1},st.prototype.isComma=function(){return this.expression.charAt(this.pos)===","?(this.current=this.newToken(Yo,","),this.pos++,!0):!1},st.prototype.isSemicolon=function(){return this.expression.charAt(this.pos)===";"?(this.current=this.newToken(Yc,";"),this.pos++,!0):!1},st.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(Ko,this.consts[n]),this.pos+=n.length,!0}return!1},st.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},st.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},st.prototype.isWhitespace=function(){for(var e=!1,t=this.expression.charAt(this.pos);(t===" "||t===" "||t===`
|
|
80
|
+
`," ")}var AC=["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"],CC=new Set(AC);function OC(e){return CC.has(e)}function Ye(...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 a=t[i],s=n[i],o=typeof a=="function",l=typeof s=="function";if(o&&OC(i))t[i]=xm(a,s);else if(o&&l)t[i]=Ya(a,s);else if(i==="class"){const c=Wu(a),f=Wu(s);c&&f?t[i]=Rs(a,s):c?t[i]=Rs(a):f&&(t[i]=Rs(s))}else if(i==="style"){const c=typeof a=="object",f=typeof s=="object",u=typeof a=="string",p=typeof s=="string";if(c&&f)t[i]={...a,...s};else if(c&&p){const h=Ka(s);t[i]={...a,...h}}else if(u&&f)t[i]={...Ka(a),...s};else if(u&&p){const h=Ka(a),y=Ka(s);t[i]={...h,...y}}else c?t[i]=a:f?t[i]=s:u?t[i]=a:p&&(t[i]=s)}else t[i]=s!==void 0?s:a}for(const i of Object.getOwnPropertySymbols(n)){const a=t[i],s=n[i];t[i]=s!==void 0?s:a}}}return typeof t.style=="object"&&(t.style=Ja(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 Im={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%)"},DC=Ja(Im),Pm=typeof window<"u"?window:void 0,PN=typeof window<"u"?window.document:void 0,MN=typeof window<"u"?window.navigator:void 0,$N=typeof window<"u"?window.location:void 0;function IC(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var PC=class extends Map{#e=new Map;#t=se(0);#r=se(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?se(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.#a(),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),a=super.set(e,t),s=this.#t;if(n===void 0)n=this.#i(0),r.set(e,n),F(this.#r,super.size),zr(s);else if(i!==t){zr(n);var o=s.reactions===null?null:new Set(s.reactions);(o===null||!n.reactions?.every(l=>o.has(l)))&&zr(s)}return a}delete(e){var t=this.#e,r=t.get(e),n=super.delete(e);return r!==void 0&&(t.delete(e),F(r,-1)),n&&(F(this.#r,super.size),zr(this.#t)),n}clear(){if(super.size!==0){super.clear();var e=this.#e;F(this.#r,0);for(var t of e.values())F(t,-1);zr(this.#t),e.clear()}}#a(){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.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return d(this.#r),super.size}},MC=class{#e;#t;constructor(e={}){const{window:t=Pm,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=kl(n=>{const i=bt(t,"focusin",n),a=bt(t,"focusout",n);return()=>{i(),a()}}))}get current(){return this.#t?.(),this.#e?IC(this.#e):null}},FN=new MC;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 $b(this.#t)}get(){const e=Cd(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=Cd(this.#t);return t===void 0?e:t}set(e){return Mb(this.#t,e)}};function FC(e,t){switch(e){case"post":ve(t);break;case"pre":Dl(t);break}}function Hu(e,t,r,n={}){const{lazy:i=!1}=n;let a=!i,s=Array.isArray(e)?[]:void 0;FC(t,()=>{const o=Array.isArray(e)?e.map(c=>c()):e();if(!a){a=!0,s=o;return}const l=Re(()=>r(o,s));return s=o,l})}function Mm(e,t,r){const n=wa(()=>{let i=!1;Hu(e,t,(a,s)=>{if(i){n();return}const o=r(a,s);return i=!0,o},{lazy:!0})});ve(()=>n)}function at(e,t,r){Hu(e,"post",t,r)}function NC(e,t,r){Hu(e,"pre",t,r)}at.pre=NC;function RC(e,t){Mm(e,"post",t)}function LC(e,t){Mm(e,"pre",t)}RC.pre=LC;function $m(e){return $C(e)?e():e}var zC=class{#e={width:0,height:0};#t=!1;#r;#n;#i;#a=P(()=>(d(this.#o)?.(),this.getSize().width));#s=P(()=>(d(this.#o)?.(),this.getSize().height));#o=P(()=>{const e=$m(this.#n);if(e)return kl(t=>{if(!this.#i)return;const r=new this.#i.ResizeObserver(n=>{this.#t=!0;for(const i of n){const a=this.#r.box==="content-box"?i.contentBoxSize:i.borderBoxSize,s=Array.isArray(a)?a:[a];this.#e.width=s.reduce((o,l)=>Math.max(o,l.inlineSize),0),this.#e.height=s.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??Pm,this.#r=t,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=$m(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),a=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),s=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),o=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth);return{width:t-i-s,height:r-a-o}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return d(this.#o)?.(),this.getSize()}get width(){return d(this.#a)}get height(){return d(this.#s)}};function qC(e,t){let r,n=null;return(...i)=>new Promise(a=>{n&&n(void 0),n=a,clearTimeout(r),r=setTimeout(async()=>{const s=await e(...i);n&&(n(s),n=null)},t)})}function UC(e,t){let r=0,n=null;return(...i)=>{const a=Date.now();return r&&a-r<t?n??Promise.resolve(void 0):(r=a,n=e(...i),n)}}function Fm(e,t,r={},n){const{lazy:i=!1,once:a=!1,initialValue:s,debounce:o,throttle:l}=r;let c=se(Pe(s)),f=se(!1),u=se(void 0),p=se(Pe([]));const h=()=>{d(p).forEach(S=>S()),F(p,[],!0)},y=S=>{F(p,[...d(p),S],!0)},v=async(S,T,A=!1)=>{try{F(f,!0),F(u,void 0),h();const I=new AbortController;y(()=>I.abort());const M=await t(S,T,{data:d(c),refetching:A,onCleanup:y,signal:I.signal});return F(c,M,!0),M}catch(I){I instanceof DOMException&&I.name==="AbortError"||F(u,I,!0);return}finally{F(f,!1)}},m=o?qC(v,o):l?UC(v,l):v,g=Array.isArray(e)?e:[e];let E;return n((S,T)=>{a&&E||(E=S,m(Array.isArray(e)?S:S[0],Array.isArray(e)?T:T?.[0]))},{lazy:i}),{get current(){return d(c)},get loading(){return d(f)},get error(){return d(u)},mutate:S=>{F(c,S,!0)},refetch:S=>{const T=g.map(A=>A());return m(Array.isArray(e)?T:T[0],Array.isArray(e)?T:T[0],S??!0)}}}function BC(e,t,r){return Fm(e,t,r,(n,i)=>{const a=Array.isArray(e)?e:[e];at(()=>a.map(o=>o()),(o,l)=>{n(o,l??[])},i)})}function VC(e,t,r){return Fm(e,t,r,(n,i)=>{const a=Array.isArray(e)?e:[e],s=()=>a.map(o=>o());at.pre(s,(o,l)=>{n(o,l??[])},i)})}BC.pre=VC;function ii(e){ve(()=>()=>{e()})}function jC(e,t){return setTimeout(t,e)}function Qa(e){pf().then(e)}var ZC=1,WC=9,HC=11;function Gu(e){return Ga(e)&&e.nodeType===ZC&&typeof e.nodeName=="string"}function Nm(e){return Ga(e)&&e.nodeType===WC}function GC(e){return Ga(e)&&e.constructor?.name==="VisualViewport"}function KC(e){return Ga(e)&&e.nodeType!==void 0}function Rm(e){return KC(e)&&e.nodeType===HC&&"host"in e}function YC(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&&Rm(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function bo(e){return Nm(e)?e:GC(e)?e.document:e?.ownerDocument??document}function Lm(e){return Rm(e)?Lm(e.host):Nm(e)?e.defaultView??window:Gu(e)?e.ownerDocument?.defaultView??window:window}function JC(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var Vi=class{element;#e=P(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return d(this.#e)}set root(e){F(this.#e,e)}constructor(e){typeof e=="function"?this.element=z(e):this.element=e}getDocument=()=>bo(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>JC(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 tt(e,t){return{[D_()]:r=>Em(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 zm(e){return e?"open":"closed"}function QC(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}var XC=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 _o(e){const t=new XC(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Yu="ArrowDown",qm="ArrowLeft",Um="ArrowRight",Ju="ArrowUp",eO="Backspace",tO="Enter",NN="Escape",RN=" ",LN="Tab",zN="a",qN="P",UN="A",BN="p",ln=typeof document<"u",Bm=rO();function rO(){return ln&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Ar(e){return e instanceof HTMLElement}function ai(e){return e instanceof Element}function nO(e){return e instanceof Element||e instanceof SVGElement}function wo(e){return!Number.isNaN(Number(e))&&!Number.isNaN(Number.parseFloat(e))}function Fn(e){return e===null}function ko(e){return e.pointerType==="touch"}function iO(e){return e!==null}var aO=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.#a(e);return}const r=this.#n,n=()=>{r===this.#n&&this.#a(e)},i=()=>{if(r!==this.#n)return;const s=t.getAnimations();if(s.length===0){n();return}Promise.all(s.map(o=>o.finished)).then(()=>{n()}).catch(()=>{if(r===this.#n){if(t.getAnimations().some(o=>o.pending||o.playState!=="finished")){i();return}n()}})},a=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,i()})};if(!this.#e.afterTick.current){a();return}this.#t=window.requestAnimationFrame(()=>{this.#t=null;const s="data-starting-style";if(!t.hasAttribute(s)){a();return}this.#r=new MutationObserver(()=>{r===this.#n&&(t.hasAttribute(s)||(this.#r?.disconnect(),this.#r=null,a()))}),this.#r.observe(t,{attributes:!0,attributeFilter:[s]})})}#a(e){const t=()=>{e()};this.#e.afterTick?Qa(t):t()}},Vm=class{#e;#t;#r;#n=se(!1);#i=se(void 0);#a=!1;#s=null;constructor(e){this.#e=e,F(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new aO({ref:this.#e.ref,afterTick:this.#e.open}),ii(()=>this.#o()),at(()=>this.#e.open.current,t=>{if(!this.#a){this.#a=!0;return}if(this.#o(),!t&&this.#e.shouldSkipExitAnimation?.()){F(this.#n,!1),F(this.#i,void 0),this.#e.onComplete?.();return}if(t&&F(this.#n,!0),F(this.#i,t?"starting":"ending",!0),t&&(this.#s=window.requestAnimationFrame(()=>{this.#s=null,this.#e.open.current&&F(this.#i,void 0)})),!this.#t){t||F(this.#n,!1),F(this.#i,void 0),this.#e.onComplete?.();return}this.#r.run(()=>{t===this.#e.open.current&&(this.#e.open.current||F(this.#n,!1),F(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return d(this.#n)}get transitionStatus(){return d(this.#i)}#o(){this.#s!==null&&(window.cancelAnimationFrame(this.#s),this.#s=null)}};function xe(){}function $e(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var sO=new Ft("BitsConfig");function oO(){const e=new lO(null,{});return sO.getOr(e).opts}var lO=class{opts;constructor(e,t){const r=uO(e,t);this.opts={defaultPortalTo:r(n=>n.defaultPortalTo),defaultLocale:r(n=>n.defaultLocale)}}};function uO(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 jm(e,t){return r=>{const n=oO();return z(()=>{const i=r();if(i!==void 0)return i;const a=e(n).current;return a!==void 0?a:t})}}var Zm=jm(e=>e.defaultLocale,"en"),VN=jm(e=>e.defaultPortalTo,"body"),cO=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 bt(e,this.eventName,n,r)}};function Wm(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 Hm(e,t){return e===t||e.contains(t)}function Gm(e){return e?.ownerDocument??document}function dO(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 Km=["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] *)"],So=Km.join(","),Ym=typeof Element>"u",si=Ym?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Eo=!Ym&&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},xo=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]"):xo(t.parentNode))},fO=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Jm=function(t,r,n){if(xo(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(So));return r&&si.call(t,So)&&i.unshift(t),i=i.filter(n),i},To=function(t,r,n){for(var i=[],a=Array.from(t);a.length;){var s=a.shift();if(!xo(s,!1))if(s.tagName==="SLOT"){var o=s.assignedElements(),l=To(o.length?o:s.children,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:s,candidates:l})}else{si.call(s,So)&&n.filter(s)&&(r||!t.includes(s))&&i.push(s);var c=s.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(s),f=!xo(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(c&&f){var u=To(c===!0?s.children:c.children,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:s,candidates:u})}else a.unshift.apply(a,s.children)}}return i},Qm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Xm=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||fO(t))&&!Qm(t)?0:t.tabIndex},hO=function(t,r){var n=Xm(t);return n<0&&r&&!Qm(t)?0:n},pO=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},ev=function(t){return t.tagName==="INPUT"},mO=function(t){return ev(t)&&t.type==="hidden"},vO=function(t){return t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"})},gO=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},yO=function(t){if(!t.name)return!0;var r=t.form||Eo(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(s){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",s.message),!1}var a=gO(i,t.form);return!a||a===t},bO=function(t){return ev(t)&&t.type==="radio"},_O=function(t){return bO(t)&&!yO(t)},wO=function(t){var r,n=t&&Eo(t),i=(r=n)===null||r===void 0?void 0:r.host,a=!1;if(n&&n!==t){var s,o,l;for(a=!!((s=i)!==null&&s!==void 0&&(o=s.ownerDocument)!==null&&o!==void 0&&o.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!a&&i;){var c,f,u;n=Eo(i),i=(c=n)===null||c===void 0?void 0:c.host,a=!!((f=i)!==null&&f!==void 0&&(u=f.ownerDocument)!==null&&u!==void 0&&u.contains(i))}}return a},tv=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},kO=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 a=si.call(t,"details>summary:first-of-type")?t.parentElement:t;if(si.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var o=t.parentElement,l=Eo(t);if(o&&!o.shadowRoot&&i(o)===!0)return tv(t);t.assignedSlot?t=t.assignedSlot:!o&&l!==t.ownerDocument?t=l.host:t=o}t=s}if(wO(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return tv(t);return!1},SO=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 si.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},Ao=function(t,r){return!(r.disabled||mO(r)||kO(r,t)||vO(r)||SO(r))},Qu=function(t,r){return!(_O(r)||Xm(r)<0||!Ao(t,r))},EO=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},rv=function(t){var r=[],n=[];return t.forEach(function(i,a){var s=!!i.scopeParent,o=s?i.scopeParent:i,l=hO(o,s),c=s?rv(i.candidates):o;l===0?s?r.push.apply(r,c):r.push(o):n.push({documentOrder:a,tabIndex:l,item:i,isScope:s,content:c})}),n.sort(pO).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(r)},xO=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:EO}):n=Jm(t,r.includeContainer,Qu.bind(null,r)),rv(n)},TO=function(t,r){r=r||{};var n;return r.getShadowRoot?n=To([t],r.includeContainer,{filter:Ao.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=Jm(t,r.includeContainer,Ao.bind(null,r)),n},AO=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return si.call(t,So)===!1?!1:Qu(r,t)},CO=Km.concat("iframe:not([inert]):not([inert] *)").join(","),OO=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return si.call(t,CO)===!1?!1:Ao(r,t)};function DO(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 IO="data-context-menu-trigger",PO="data-context-menu-content",jN=new Ft("Menu.Root"),ZN=new Ft("Menu.Root | Menu.Sub"),WN=new Ft("Menu.Content"),HN=new Ft("Menu.Group | Menu.RadioGroup"),GN=new Ft("Menu.RadioGroup"),KN=new Ft("Menu.CheckboxGroup"),YN=new cO("bitsmenuopen",{bubbles:!1,cancelable:!0}),JN=_o({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 MO=class wy{static create(t){return new wy(t)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#a=void 0;#s;#o=xe;constructor(t){this.opts=t,this.#t=t.interactOutsideBehavior,this.#e=t.onInteractOutside,this.#s=t.onFocusOutside,ve(()=>{this.#a=Gm(this.opts.ref.current)});let r=xe;const n=()=>{this.#v(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),r()};at([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return jC(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.#o(),r()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Qa(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#s.current?.(t)})};#u(){return Ya(bt(this.#a,"pointerdown",Ya(this.#h,this.#f),{capture:!0}),bt(this.#a,"pointerdown",Ya(this.#p,this.#d)),bt(this.#a,"focusin",this.#l))}#c=t=>{let r=t;r.defaultPrevented&&(r=nv(t)),this.#e.current(t)};#d=Wm(t=>{if(!this.opts.ref.current){this.#o();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||NO(t,this.opts.ref.current);if(!this.#n||this.#y()||!r){this.#o();return}let n=t;if(n.defaultPrevented&&(n=nv(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#o();return}t.pointerType==="touch"?(this.#o(),this.#o=bt(this.#a,"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=FO(this.opts.ref.current))};#m=t=>this.opts.ref.current?Hm(this.opts.ref.current,t):!1;#v=Wm(()=>{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 FO(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 NO(e,t){const r=e.target;if(!nO(r))return!1;const n=!!r.closest(`[${IO}]`),i=!!t.closest(`[${PO}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:Gm(r).documentElement.contains(r)&&!Hm(t,r)&&dO(e,t)}function nv(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:(a,s)=>s==="currentTarget"?t:s==="target"?r:s==="preventDefault"?()=>{i=!0,typeof a.preventDefault=="function"&&a.preventDefault()}:s==="defaultPrevented"?i:s in a?a[s]:e[s]})}function iv(e,t){te(t,!0);let r=_(t,"interactOutsideBehavior",7,"close"),n=_(t,"onInteractOutside",7,xe),i=_(t,"onFocusOutside",7,xe),a=_(t,"id",7),s=_(t,"children",7),o=_(t,"enabled",7),l=_(t,"isValidEvent",7,()=>!1),c=_(t,"ref",7);const f=MO.create({id:z(()=>a()),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(y="close"){r(y),b()},get onInteractOutside(){return n()},set onInteractOutside(y=xe){n(y),b()},get onFocusOutside(){return i()},set onFocusOutside(y=xe){i(y),b()},get id(){return a()},set id(y){a(y),b()},get children(){return s()},set children(y){s(y),b()},get enabled(){return o()},set enabled(y){o(y),b()},get isValidEvent(){return l()},set isValidEvent(y=()=>!1){l(y),b()},get ref(){return c()},set ref(y){c(y),b()}},p=ie(),h=B(p);return Se(h,()=>s()??qe,()=>({props:f.props})),x(e,p),re(u)}ne(iv,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;var RO=class ky{static create(t){return new ky(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new Vi(this.opts.ref);let r=xe;at(()=>t.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>bt(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=t=>{if(t.key!=="Escape"||!LO(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 LO(e){const t=[...globalThis.bitsEscapeLayers],r=t.findLast(([i,{current:a}])=>a==="close"||a==="ignore");if(r)return r[0]===e;const[n]=t[0];return n===e}function av(e,t){te(t,!0);let r=_(t,"escapeKeydownBehavior",7,"close"),n=_(t,"onEscapeKeydown",7,xe),i=_(t,"children",7),a=_(t,"enabled",7),s=_(t,"ref",7);RO.create({escapeKeydownBehavior:z(()=>r()),onEscapeKeydown:z(()=>n()),enabled:z(()=>a()),ref:s()});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 a()},set enabled(f){a(f),b()},get ref(){return s()},set ref(f){s(f),b()}},l=ie(),c=B(l);return Se(c,()=>i()??qe),x(e,l),re(o)}ne(av,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});var zO=class Sy{static instance;#e=xr([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new Sy),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)}},qO=class Ey{#e=!1;#t=null;#r=zO.getInstance();#n=[];#i;constructor(t){this.#i=t}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#a(){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.#s()}unmount(){this.#t&&(this.#a(),this.#o(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#t=null)}#s(){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()})}#o(){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=s=>{if(this.#e||!this.#r.isActiveScope(this))return;const o=s.target;if(o)if(t.contains(o))this.#r.setFocusMemory(this,o);else{const l=this.#r.getFocusMemory(this);if(l&&t.contains(l)&&OO(l))s.preventDefault(),l.focus();else{const c=this.#c(),f=this.#d()[0];(c||f||t).focus()}}},i=s=>{if(!this.#i.loop||this.#e||s.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];!s.shiftKey&&r.activeElement===c?(s.preventDefault(),l.focus()):s.shiftKey&&r.activeElement===l&&(s.preventDefault(),c.focus())};this.#n.push(bt(r,"focusin",n,{capture:!0}),bt(t,"keydown",i));const a=new MutationObserver(()=>{const s=this.#r.getFocusMemory(this);if(s&&!t.contains(s)){const o=this.#c(),l=this.#d()[0],c=o||l;c?(c.focus(),this.#r.setFocusMemory(this,c)):t.focus()}});a.observe(t,{childList:!0,subtree:!0}),this.#n.push(()=>a.disconnect())}#u(){return this.#t?xO(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#c(){return this.#u()[0]||null}#d(){return this.#t?TO(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let r=null;return at([()=>t.ref.current,()=>t.enabled.current],([n,i])=>{n&&i?(r||(r=new Ey(t)),r.mount(n)):r&&(r.unmount(),r=null)}),ii(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}};function sv(e,t){te(t,!0);let r=_(t,"enabled",7,!1),n=_(t,"trapFocus",7,!1),i=_(t,"loop",7,!1),a=_(t,"onCloseAutoFocus",7,xe),s=_(t,"onOpenAutoFocus",7,xe),o=_(t,"focusScope",7),l=_(t,"ref",7);const c=qO.use({enabled:z(()=>r()),trap:z(()=>n()),loop:i(),onCloseAutoFocus:z(()=>a()),onOpenAutoFocus:z(()=>s()),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 a()},set onCloseAutoFocus(h=xe){a(h),b()},get onOpenAutoFocus(){return s()},set onOpenAutoFocus(h=xe){s(h),b()},get focusScope(){return o()},set focusScope(h){o(h),b()},get ref(){return l()},set ref(h){l(h),b()}},u=ie(),p=B(u);return Se(p,()=>o()??qe,()=>({props:c.props})),x(e,u),re(f)}ne(sv,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"});var ov=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var UO=class xy{static create(t){return new xy(t)}opts;domContext;#e=xe;#t=!1;#r=ov;#n=ov;constructor(t){this.opts=t,this.domContext=new Vi(t.ref);let r=xe;at(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([n,i,a])=>(this.#t=n,this.#r=i,this.#n=a,n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#i()),()=>{this.#t=!1,r(),this.#o(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return Ya(bt(this.domContext.getDocument(),"pointerdown",this.#s),bt(this.domContext.getDocument(),"pointerup",xm(this.#o,this.#a)))}#a=t=>{this.#n(t)};#s=t=>{const r=this.opts.ref.current,n=t.target;!Ar(r)||!Ar(n)||!this.#t||!VO(this)||!YC(r,n)||(this.#r(t),!t.defaultPrevented&&(this.#e=BO(r,this.domContext.getDocument().body)))};#o=()=>{this.#e(),this.#e=xe}},lv=e=>e.style.userSelect||e.style.webkitUserSelect;function BO(e,t){const r=lv(t),n=lv(e);return Co(t,"none"),Co(e,"text"),()=>{Co(t,r),Co(e,n)}}function Co(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function VO(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function uv(e,t){te(t,!0);let r=_(t,"preventOverflowTextSelection",7,!0),n=_(t,"onPointerDown",7,xe),i=_(t,"onPointerUp",7,xe),a=_(t,"id",7),s=_(t,"children",7),o=_(t,"enabled",7),l=_(t,"ref",7);UO.create({id:z(()=>a()),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 a()},set id(p){a(p),b()},get children(){return s()},set children(p){s(p),b()},get enabled(){return o()},set enabled(p){o(p),b()},get ref(){return l()},set ref(p){l(p),b()}},f=ie(),u=B(f);return Se(u,()=>s()??qe),x(e,f),re(c)}ne(uv,{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 jO=class{#e;#t=0;#r=se();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),F(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,d(this.#r)===void 0&&(this.#n=wa(()=>{F(this.#r,this.#e(...e),!0)})),ve(()=>()=>{this.#i()}),d(this.#r)}},Oo=new PC,Do=se(null),ec=null,Xa=null,es=!1,cv=z(()=>{for(const e of Oo.values())if(e)return!0;return!1}),tc=null,ZO=new jO(()=>{function e(){document.body.setAttribute("style",d(Do)??""),document.body.style.removeProperty("--scrollbar-width"),Bm&&ec?.(),F(Do,null)}function t(){Xa!==null&&(window.clearTimeout(Xa),Xa=null)}function r(i,a){t(),es=!0,tc=Date.now();const s=tc,o=()=>{Xa=null,tc===s&&(dv(Oo)?es=!1:(es=!1,a()))},l=i===null?24:i;Xa=window.setTimeout(o,l)}function n(){d(Do)===null&&Oo.size===0&&!es&&F(Do,document.body.getAttribute("style"),!0)}return at(()=>cv.current,()=>{if(!cv.current)return;n(),es=!1;const i=getComputedStyle(document.documentElement),a=getComputedStyle(document.body),s=i.scrollbarGutter?.includes("stable")||a.scrollbarGutter?.includes("stable"),o=window.innerWidth-document.documentElement.clientWidth,l={padding:Number.parseInt(a.paddingRight??"0",10)+o,margin:Number.parseInt(a.marginRight??"0",10)};o>0&&!s&&(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",Bm&&(ec=bt(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),Qa(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),ii(()=>()=>{ec?.()}),{get lockMap(){return Oo},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}}),WO=class{#e=Nn();#t;#r=()=>null;#n;locked;constructor(e,t=()=>null){this.#t=e,this.#r=t,this.#n=ZO.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),dv(this.#n.lockMap))return;const r=this.#r();this.#n.scheduleCleanupIfNoNewLocks(r,()=>{this.#n.resetBodyStyle()})}))}};function dv(e){for(const[t,r]of e)if(r)return!0;return!1}function rc(e,t){te(t,!0);let r=_(t,"preventScroll",7,!0),n=_(t,"restoreScrollDelay",7,null);return r()&&new WO(r(),()=>n()),re({get preventScroll(){return r()},set preventScroll(i=!0){r(i),b()},get restoreScrollDelay(){return n()},set restoreScrollDelay(i=null){n(i),b()}})}ne(rc,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function HO(e){if(!ln||!e)return null;let t=e.querySelector("[data-bits-announcer]");const r=i=>{const a=e.createElement("div");return a.role="log",a.ariaLive=i,a.setAttribute("aria-relevant","additions"),a};if(!Ar(t)){const i=e.createElement("div");i.style.cssText=DC,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(!Ar(t))return null;const a=t.querySelector(`[aria-live="${i}"]`);return Ar(a)?a:null}}}function Io(e){const t=HO(e);function r(n,i="assertive",a=7500){if(!t||!ln||!e)return;const s=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"?s?.replaceChildren(o):s?.appendChild(o),setTimeout(()=>{o.remove()},a)}return{announce:r}}var GO={defaultValue:void 0,granularity:"day"};function fv(e){const{defaultValue:t,granularity:r,minValue:n,maxValue:i}={...GO,...e};if(Array.isArray(t)&&t.length)return t[t.length-1];if(t&&!Array.isArray(t))return t;{let a=new Date;n&&a<n.toDate(er())?a=n.toDate(er()):i&&a>i.toDate(er())&&(a=i.toDate(er()));const s=a.getFullYear(),o=a.getMonth()+1,l=a.getDate();return["hour","minute","second"].includes(r??"day")?new Mi(s,o,l,0,0,0):new za(s,o,l)}}function hv(e,t){let r;return t instanceof Mn?r=cp(e):t instanceof Mi?r=up(e):r=oo(e),r.calendar!==t.calendar?tr(r,t.calendar):r}function Wt(e,t=er()){return e instanceof Mn?e.toDate():e.toDate(t)}function KO(e){if(e instanceof za)return"date";if(e instanceof Mi)return"datetime";if(e instanceof Mn)return"zoneddatetime";throw new Error("Unknown date type")}function YO(e,t){switch(t){case"date":return oo(e);case"datetime":return up(e);case"zoneddatetime":return cp(e);default:throw new Error(`Unknown date type: ${t}`)}}function JO(e){return e instanceof Mi}function nc(e){return e instanceof Mn}function Po(e){return JO(e)||nc(e)}function ts(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 QO(e,t){return e.compare(t)>0}function pv(e,t,r){const n=Hh(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function mv(e,t,r){const n=Hh(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 Mo=["day","month","year"],$o=["hour","minute","second","dayPeriod"],vv=["literal","timeZoneName"],rs=[...Mo,...$o],gv=[...rs,...vv],XO=[...$o,...vv],QN=gv.filter(e=>e!=="literal"),XN=XO.filter(e=>e!=="literal"),eD=["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"],tD=["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 rD(e){if(yv(e))return ic[e];{const t=sD(e);return yv(t)?ic[t]:ic.en}}function ac(e,t,r){return nD(e)?rD(r)[e]:aD(e)?t:iD(e)?"––":""}function yv(e){return eD.includes(e)}function nD(e){return tD.includes(e)}function iD(e){return e==="hour"||e==="minute"||e==="second"}function aD(e){return e==="era"||e==="dayPeriod"}function sD(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function sc(e){const t=["hour","minute","second"],r=rs.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 oD(e){const{segmentValues:t,formatter:r,locale:n,dateRef:i}=e,a=Object.keys(t).reduce((o,l)=>{if(!_v(l))return o;if("hour"in t&&l==="dayPeriod"){const c=t[l];Fn(c)?o[l]=ac(l,"AM",n):o[l]=c}else o[l]=s(l);return o},{});function s(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&&kv(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 ac(o,"",n)}else{if(Fo(o)){const l=t[o],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(Fn(l))return ac(o,"",n);{const f=r.part(i.set({[o]:l}),o);return o==="year"?`${l}`:c&&f.length===1?`0${f}`:f}}return""}}return a}function lD(e){const{granularity:t,dateRef:r,formatter:n,contentObj:i,hideTimeZone:a,hourCycle:s}=e;return n.toParts(r,cD(t,s)).map(o=>["literal","dayPeriod","timeZoneName",null].includes(o.type)||!_v(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)||a)))}function uD(e){const t=oD(e);return{obj:t,arr:lD({contentObj:t,...e})}}function cD(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 bv(){return rs.reduce((e,t)=>(e[t]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},e),{})}function Fo(e){return Mo.includes(e)}function _v(e){return rs.includes(e)}function dD(e){return gv.includes(e)}function wv(e){return!ln||!e?[]:No(e).map(t=>t.dataset.segment).filter(t=>rs.includes(t))}function fD(e){const{segmentObj:t,fieldNode:r,dateRef:n}=e,i=wv(r);let a=n;for(const s of i)if("hour"in t){const o=t[s];if(Fn(o))continue;a=a.set({[s]:t[s]})}else if(Fo(s)){const o=t[s];if(Fn(o))continue;a=a.set({[s]:t[s]})}return a}function hD(e,t){const r=wv(t);for(const n of r)if("hour"in e){if(e[n]===null)return!1}else if(Fo(n)&&e[n]===null)return!1;return!0}function pD(e){return typeof e!="object"||e===null?!1:Object.entries(e).every(([t,r])=>($o.includes(t)||Mo.includes(t))&&(t==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function mD(e,t){return t||(Po(e)?"minute":"day")}function oc(e){return!!(["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Backspace"," "].includes(e)||wo(e))}function vD(e,t){if(!ln)return!1;const r=No(t);return r.length?r[0].id===e:!1}function gD(e){const{id:t,formatter:r,value:n,doc:i}=e;if(!ln)return;const a=r.selectedDate(n),s=i.getElementById(t);if(s)s.innerText=`Selected Date: ${a}`;else{const o=i.createElement("div");o.style.cssText=Ja({display:"none"}),o.id=t,o.innerText=`Selected Date: ${a}`,i.body.appendChild(o)}}function yD(e,t){if(!ln)return;const r=t.getElementById(e);r&&t.body.removeChild(r)}function kv(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 ns(e,t){const r=e.currentTarget;if(!Ar(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 bD(e,t){const r=t.indexOf(e);return r===t.length-1||r===-1?null:t[r+1]}function _D(e,t){const r=t.indexOf(e);return r===0||r===-1?null:t[r-1]}function lc(e,t){const r=No(t);return r.length?{next:bD(e,r),prev:_D(e,r)}:{next:null,prev:null}}function Sv(e,t){const r=e.currentTarget;if(!Ar(r))return;const{next:n}=lc(r,t);n&&n.focus()}function Ev(e,t){const r=e.currentTarget;if(!Ar(r))return;const{prev:n}=lc(r,t);n&&n.focus()}function is(e){return e==="ArrowRight"||e==="ArrowLeft"}function No(e){return e?Array.from(e.querySelectorAll("[data-segment]")).filter(t=>{if(!Ar(t))return!1;const r=t.dataset.segment;return r==="trigger"?!0:!(!dD(r)||r==="literal")}):[]}function wD(e){return No(e)[0]}var kD={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function xv(e){let t=e.initialLocale;function r(h){t=h}function n(){return t}function i(h,y){return new pr(t,y).format(h)}function a(h,y=!0){return Po(h)&&y?i(Wt(h),{dateStyle:"long",timeStyle:"long"}):i(Wt(h),{dateStyle:"long"})}function s(h){return typeof e.monthFormat.current!="function"&&typeof e.yearFormat.current!="function"?new pr(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(h):`${typeof e.monthFormat.current=="function"?e.monthFormat.current(h.getMonth()+1):new pr(t,{month:e.monthFormat.current}).format(h)} ${typeof e.yearFormat.current=="function"?e.yearFormat.current(h.getFullYear()):new pr(t,{year:e.yearFormat.current}).format(h)}`}function o(h){return new pr(t,{month:"long"}).format(h)}function l(h){return new pr(t,{year:"numeric"}).format(h)}function c(h,y){return nc(h)?new pr(t,{...y,timeZone:h.timeZone}).formatToParts(Wt(h)):new pr(t,y).formatToParts(Wt(h))}function f(h,y="narrow"){return new pr(t,{weekday:y}).format(h)}function u(h,y=void 0){return new pr(t,{hour:"numeric",minute:"numeric",hourCycle:y===24?"h23":void 0}).formatToParts(h).find(v=>v.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function p(h,y,v={}){const m=c(h,{...kD,...v}).find(g=>g.type===y);return m?m.value:""}return{setLocale:r,getLocale:n,fullMonth:o,fullYear:l,fullMonthAndYear:s,toParts:c,custom:i,part:p,dayPeriod:u,selectedDate:a,dayOfWeek:f}}function SD(e){return!(!Ar(e)||!e.hasAttribute("data-bits-day"))}function Tv(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,a=ts(t),s=Array.from({length:a},(v,m)=>t.set({day:m+1})),o=yu(t),l=aE(t),c=r!==void 0?pv(o,r,"en-US"):pv(o,0,i),f=r!==void 0?mv(l,r,"en-US"):mv(l,0,i),u=Tv(c.subtract({days:1}),o),p=Tv(l,f.add({days:1})),h=u.length+s.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 g=v;p.length===0&&(g=v-1,p.push(m));const E=Array.from({length:g},(S,T)=>{const A=T+1;return m.add({days:A})});p.push(...E)}const y=u.concat(s,p);return{value:t,dates:y,weeks:DO(y,7)}}function as(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 a=1;a<t;a++){const s=r.add({months:a});i.push(uc({...n,dateObj:s}))}return i}function cc(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(t=>Ar(t)):[]}function Av(e,t){const r=e.getAttribute("data-value");r&&(t.current=hv(r,t.current))}function ED({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:a,months:s,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 Av(f,r),f.focus()}if(c<0){if(i)return;const f=s[0]?.value;if(!f)return;r.current=f.subtract({months:o}),Qa(()=>{const u=cc(n);if(!u.length)return;const p=u.length-Math.abs(c);if(Xu(p,u)){const h=u[p];return Av(h,r),h.focus()}})}if(c>=l.length){if(a)return;const f=s[0]?.value;if(!f)return;r.current=f.add({months:o}),Qa(()=>{const u=cc(n);if(!u.length)return;const p=c-l.length;if(Xu(p,u))return u[p].focus()})}}var Cv=[Yu,Ju,qm,Um],Ov=[tO," "];function xD({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!SD(i)||!Cv.includes(e.key)&&!Ov.includes(e.key))return;e.preventDefault();const a={[Yu]:7,[Ju]:-7,[qm]:-1,[Um]:1};if(Cv.includes(e.key)){const s=a[e.key];s!==void 0&&r(i,s)}if(Ov.includes(e.key)){const s=i.getAttribute("data-value");if(!s)return;t(e,hv(s,n))}}function TD({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:a,fixedWeeks:s,setPlaceholder:o}){const l=e[0]?.value;if(l)if(n)o(l.add({months:r}));else{const c=l.add({months:1}),f=as({dateObj:c,weekStartsOn:i,locale:a,fixedWeeks:s,numberOfMonths:r});o(c),t(f)}}function AD({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:a,fixedWeeks:s,setPlaceholder:o}){const l=e[0]?.value;if(l)if(n)o(l.subtract({months:r}));else{const c=l.subtract({months:1}),f=as({dateObj:c,weekStartsOn:i,locale:a,fixedWeeks:s,numberOfMonths:r});o(c),t(f)}}function CD({months:e,formatter:t,weekdayFormat:r}){if(!e.length)return[];const n=e[0].weeks[0];return n?n.map(i=>t.dayOfWeek(Wt(i),r)):[]}function OD(e){ve(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;Re(()=>{const a=e.placeholder.current;if(!a)return;const s={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(as({...s,dateObj:a}))})})}function DD({calendarNode:e,label:t,accessibleHeadingId:r}){const n=bo(e),i=n.createElement("div");i.style.cssText=Ja({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 a=n.createElement("div");return a.textContent=t,a.id=r,a.role="heading",a.ariaLevel="2",e.insertBefore(i,e.firstChild),i.appendChild(a),()=>{const s=n.getElementById(r);s&&(i.parentElement?.removeChild(i),s.remove())}}function ID({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:a,setMonths:s}){ve(()=>{e.current,Re(()=>{t().some(o=>vu(o,e.current))||s(as({weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:a.current,dateObj:e.current}))})})}function PD({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?QO(n.add({months:1}).set({day:1}),e):!1}function MD({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 $D({months:e,locale:t,formatter:r}){if(!e.length)return"";if(t!==r.getLocale()&&r.setLocale(t),e.length===1){const c=Wt(e[0].value);return`${r.fullMonthAndYear(c)}`}const n=Wt(e[0].value),i=Wt(e[e.length-1].value),a=r.fullMonth(n),s=r.fullMonth(i),o=r.fullYear(n),l=r.fullYear(i);return o===l?`${a} - ${s} ${l}`:`${a} ${o} - ${s} ${l}`}function FD({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 ND(e){const t=bo(e.target).querySelector("[data-bits-day][data-focused]");t&&(e.preventDefault(),t?.focus())}function RD(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 YO(n,i)}function LD({ref:e,placeholder:t,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:a}){function s(o){return!!(a.current(o)||n.current&&oi(o,n.current)||i.current&&oi(i.current,o))}at(()=>e.current,()=>{e.current&&t.current&&Dn(t.current,r)&&s(r)&&(t.current=RD(e.current)??r)})}function zD(e,t){return!e||!t?e:Po(e)&&Po(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}var qD=_o({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 UD(e){const t=new Date().getFullYear(),r=Math.max(e.placeholderYear,t);let n,i;if(e.minValue)n=e.minValue.year;else{const s=r-100;n=e.placeholderYear<s?e.placeholderYear-10:s}e.maxValue?i=e.maxValue.year:i=r+10,n>i&&(n=i);const a=i-n+1;return Array.from({length:a},(s,o)=>n+o)}var Cr=new Ft("Calendar.Root | RangeCalender.Root"),Dv=class Ty{static create(t){return Cr.set(new Ty(t))}opts;#e=P(()=>this.months.map(t=>t.value));get visibleMonths(){return d(this.#e)}set visibleMonths(t){F(this.#e,t)}formatter;accessibleHeadingId=Nn();domContext;attachment;#t=se(Pe([]));get months(){return d(this.#t)}set months(t){F(this.#t,t,!0)}announcer;constructor(t){this.opts=t,this.attachment=tt(this.opts.ref),this.domContext=new Vi(t.ref),this.announcer=Io(null),this.formatter=xv({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=Io(this.domContext.getDocument())}),this.months=as({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.#a(),this.#s(),this.#o(),ID({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}),OD({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),at(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),at(()=>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)}),LD({placeholder:t.placeholder,defaultPlaceholder:t.defaultPlaceholder,isDateDisabled:t.isDateDisabled,maxValue:t.maxValue,minValue:t.minValue,ref:t.ref})}setMonths(t){this.months=t}#r=P(()=>CD({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return d(this.#r)}set weekdays(t){F(this.#r,t)}#n=P(()=>Re(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return d(this.#n)}set initialPlaceholderYear(t){F(this.#n,t)}#i=P(()=>UD({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return d(this.#i)}set defaultYears(t){F(this.#i,t)}#a(){ve(()=>{if(Re(()=>this.opts.initialFocus.current)){const t=this.opts.ref.current?.querySelector("[data-focused]");t&&t.focus()}})}#s(){ve(()=>{if(this.opts.ref.current)return DD({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#o(){Dl(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){TD({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(){AD({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=P(()=>PD({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return d(this.#l)}set isNextButtonDisabled(t){F(this.#l,t)}#u=P(()=>MD({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return d(this.#u)}set isPrevButtonDisabled(t){F(this.#u,t)}#c=P(()=>{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){F(this.#c,t)}#d=P(()=>(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){F(this.#d,t)}#h=P(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return d(this.#h)}set fullCalendarLabel(t){F(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&&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 ED({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=zD(i,n),i!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(t,r){if(!t){const a=[r];return this.#p(a)?a:[r]}if(!Array.isArray(t))return;const n=t.findIndex(a=>Dn(a,r)),i=this.opts.preventDeselect.current;if(n===-1){const a=[...t,r];return this.#p(a)?a:[r]}else{if(i)return t;{const a=t.filter(s=>!Dn(s,r));if(!a.length){this.opts.placeholder.current=r;return}return a}}}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){xD({event:t,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#f=P(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return d(this.#f)}set snippetProps(t){F(this.#f,t)}getBitsAttr=t=>qD.getAttr(t);#m=P(()=>({...FD({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){F(this.#m,t)}},BD=class Ay{static create(t){return new Ay(t,Cr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref)}#e=P(()=>({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){F(this.#e,t)}},Iv=new Ft("Calendar.Cell | RangeCalendar.Cell"),VD=class Cy{static create(t){return Iv.set(new Cy(t,Cr.get()))}opts;root;#e=P(()=>Wt(this.opts.date.current));get cellDate(){return d(this.#e)}set cellDate(t){F(this.#e,t)}#t=P(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return d(this.#t)}set isUnavailable(t){F(this.#t,t)}#r=P(()=>eE(this.opts.date.current,er()));get isDateToday(){return d(this.#r)}set isDateToday(t){F(this.#r,t)}#n=P(()=>!vu(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return d(this.#n)}set isOutsideMonth(t){F(this.#n,t)}#i=P(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return d(this.#i)}set isOutsideVisibleMonths(t){F(this.#i,t)}#a=P(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return d(this.#a)}set isDisabled(t){F(this.#a,t)}#s=P(()=>Dn(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return d(this.#s)}set isFocusedDate(t){F(this.#s,t)}#o=P(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return d(this.#o)}set isSelectedDate(t){F(this.#o,t)}#l=P(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return d(this.#l)}set labelText(t){F(this.#l,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref)}#u=P(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return d(this.#u)}set snippetProps(t){F(this.#u,t)}#c=P(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return d(this.#c)}set ariaDisabled(t){F(this.#c,t)}#d=P(()=>({"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":KO(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){F(this.#d,t)}#h=P(()=>({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){F(this.#h,t)}},jD=class Oy{static create(t){return new Oy(t,Iv.get())}opts;cell;attachment;constructor(t,r){this.opts=t,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=tt(this.opts.ref)}#e=P(()=>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=P(()=>({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){F(this.#t,t)}#r=P(()=>({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){F(this.#r,t)}},ZD=class Dy{static create(t){return new Dy(t,Cr.get())}opts;root;#e=P(()=>this.root.isNextButtonDisabled);get isDisabled(){return d(this.#e)}set isDisabled(t){F(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=tt(this.opts.ref)}onclick(t){this.isDisabled||this.root.nextPage()}#t=P(()=>({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){F(this.#t,t)}},WD=class Iy{static create(t){return new Iy(t,Cr.get())}opts;root;#e=P(()=>this.root.isPrevButtonDisabled);get isDisabled(){return d(this.#e)}set isDisabled(t){F(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=tt(this.opts.ref)}onclick(t){this.isDisabled||this.root.prevPage()}#t=P(()=>({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){F(this.#t,t)}},HD=class Py{static create(t){return new Py(t,Cr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref)}#e=P(()=>({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){F(this.#e,t)}},GD=class My{static create(t){return new My(t,Cr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref)}#e=P(()=>({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){F(this.#e,t)}},KD=class $y{static create(t){return new $y(t,Cr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref)}#e=P(()=>({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){F(this.#e,t)}},YD=class Fy{static create(t){return new Fy(t,Cr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref)}#e=P(()=>({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){F(this.#e,t)}},JD=class Ny{static create(t){return new Ny(t,Cr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref)}#e=P(()=>({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){F(this.#e,t)}},QD=class Ry{static create(t){return new Ry(t,Cr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref)}#e=P(()=>({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){F(this.#e,t)}},XD=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"]),eI=q("<div><!></div>");function Pv(e,t){te(t,!0);let r=_(t,"child",7),n=_(t,"children",7),i=_(t,"id",23,Nn),a=_(t,"ref",15,null),s=_(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),y=_(t,"isDateUnavailable",7,()=>!1),v=_(t,"fixedWeeks",7,!1),m=_(t,"numberOfMonths",7,1),g=_(t,"locale",7),E=_(t,"calendarLabel",7,"Event"),S=_(t,"disabled",7,!1),T=_(t,"readonly",7,!1),A=_(t,"minValue",7,void 0),I=_(t,"maxValue",7,void 0),M=_(t,"preventDeselect",7,!1),N=_(t,"type",7),j=_(t,"disableDaysOutsideMonth",7,!0),R=_(t,"initialFocus",7,!1),X=_(t,"maxDays",7),U=_(t,"monthFormat",7,"long"),le=_(t,"yearFormat",7,"numeric"),he=He(t,XD);const H=fv({defaultValue:s(),minValue:A(),maxValue:I()});function oe(){l()===void 0&&l(H)}oe(),at.pre(()=>l(),()=>{oe()});function W(){s()===void 0&&s(N()==="single"?void 0:[])}W(),at.pre(()=>s(),()=>{W()});const fe=Dv.create({id:z(()=>i()),ref:z(()=>a(),L=>a(L)),weekdayFormat:z(()=>f()),weekStartsOn:z(()=>u()),pagedNavigation:z(()=>p()),isDateDisabled:z(()=>h()),isDateUnavailable:z(()=>y()),fixedWeeks:z(()=>v()),numberOfMonths:z(()=>m()),locale:Zm(()=>g()),calendarLabel:z(()=>E()),readonly:z(()=>T()),disabled:z(()=>S()),minValue:z(()=>A()),maxValue:z(()=>I()),disableDaysOutsideMonth:z(()=>j()),initialFocus:z(()=>R()),maxDays:z(()=>X()),placeholder:z(()=>l(),L=>{l(L),c()(L)}),preventDeselect:z(()=>M()),value:z(()=>s(),L=>{s(L),o()(L)}),type:z(()=>N()),monthFormat:z(()=>U()),yearFormat:z(()=>le()),defaultPlaceholder:H}),ce=P(()=>Ye(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 a()},set ref(L=null){a(L),b()},get value(){return s()},set value(L){s(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 y()},set isDateUnavailable(L=()=>!1){y(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 g()},set locale(L){g(L),b()},get calendarLabel(){return E()},set calendarLabel(L="Event"){E(L),b()},get disabled(){return S()},set disabled(L=!1){S(L),b()},get readonly(){return T()},set readonly(L=!1){T(L),b()},get minValue(){return A()},set minValue(L=void 0){A(L),b()},get maxValue(){return I()},set maxValue(L=void 0){I(L),b()},get preventDeselect(){return M()},set preventDeselect(L=!1){M(L),b()},get type(){return N()},set type(L){N(L),b()},get disableDaysOutsideMonth(){return j()},set disableDaysOutsideMonth(L=!0){j(L),b()},get initialFocus(){return R()},set initialFocus(L=!1){R(L),b()},get maxDays(){return X()},set maxDays(L){X(L),b()},get monthFormat(){return U()},set monthFormat(L="long"){U(L),b()},get yearFormat(){return le()},set yearFormat(L="numeric"){le(L),b()}},J=ie(),ee=B(J),$=L=>{var be=ie(),G=B(be);{let w=P(()=>({props:d(ce),...fe.snippetProps}));Se(G,r,()=>d(w))}x(L,be)},ae=L=>{var be=eI();Ue(be,()=>({...d(ce)}));var G=D(be);Se(G,()=>n()??qe,()=>fe.snippetProps),C(be),x(L,be)};return ue(ee,L=>{r()?L($):L(ae,-1)}),x(e,J),re(de)}ne(Pv,{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 tI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),rI=q("<div><!></div>");function dc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=He(t,tI);const l=jD.create({id:z(()=>s()),ref:z(()=>a(),v=>a(v))}),c=P(()=>Ye(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 a()},set ref(v=null){a(v),b()},get id(){return s()},set id(v=$e(r)){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),g=B(m);{let E=P(()=>({props:d(c),...l.snippetProps}));Se(g,i,()=>d(E))}x(v,m)},y=v=>{var m=rI();Ue(m,()=>({...d(c)}));var g=D(m),E=T=>{var A=ie(),I=B(A);Se(I,()=>n()??qe,()=>l.snippetProps),x(T,A)},S=T=>{var A=Vt();Y(()=>Z(A,l.cell.opts.date.current.day)),x(T,A)};ue(g,T=>{n()?T(E):T(S,-1)}),C(m),x(v,m)};return ue(p,v=>{i()?v(h):v(y,-1)}),x(e,u),re(f)}ne(dc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var nI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),iI=q("<table><!></table>");function fc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=He(t,nI);const l=HD.create({id:z(()=>s()),ref:z(()=>a(),v=>a(v))}),c=P(()=>Ye(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 a()},set ref(v=null){a(v),b()},get id(){return s()},set id(v=$e(r)){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),g=B(m);Se(g,i,()=>({props:d(c)})),x(v,m)},y=v=>{var m=iI();Ue(m,()=>({...d(c)}));var g=D(m);Se(g,()=>n()??qe),C(m),x(v,m)};return ue(p,v=>{i()?v(h):v(y,-1)}),x(e,u),re(f)}ne(fc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var aI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),sI=q("<tbody><!></tbody>");function hc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=He(t,aI);const l=GD.create({id:z(()=>s()),ref:z(()=>a(),v=>a(v))}),c=P(()=>Ye(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 a()},set ref(v=null){a(v),b()},get id(){return s()},set id(v=$e(r)){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),g=B(m);Se(g,i,()=>({props:d(c)})),x(v,m)},y=v=>{var m=sI();Ue(m,()=>({...d(c)}));var g=D(m);Se(g,()=>n()??qe),C(m),x(v,m)};return ue(p,v=>{i()?v(h):v(y,-1)}),x(e,u),re(f)}ne(hc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var oI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]),lI=q("<td><!></td>");function pc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=_(t,"date",7),l=_(t,"month",7),c=He(t,oI);const f=VD.create({id:z(()=>s()),ref:z(()=>a(),g=>a(g)),date:z(()=>o()),month:z(()=>l())}),u=P(()=>Ye(c,f.props));var p={get children(){return n()},set children(g){n(g),b()},get child(){return i()},set child(g){i(g),b()},get ref(){return a()},set ref(g=null){a(g),b()},get id(){return s()},set id(g=$e(r)){s(g),b()},get date(){return o()},set date(g){o(g),b()},get month(){return l()},set month(g){l(g),b()}},h=ie(),y=B(h),v=g=>{var E=ie(),S=B(E);{let T=P(()=>({props:d(u),...f.snippetProps}));Se(S,i,()=>d(T))}x(g,E)},m=g=>{var E=lI();Ue(E,()=>({...d(u)}));var S=D(E);Se(S,()=>n()??qe,()=>f.snippetProps),C(E),x(g,E)};return ue(y,g=>{i()?g(v):g(m,-1)}),x(e,h),re(p)}ne(pc,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var uI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),cI=q("<thead><!></thead>");function mc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=He(t,uI);const l=KD.create({id:z(()=>s()),ref:z(()=>a(),v=>a(v))}),c=P(()=>Ye(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 a()},set ref(v=null){a(v),b()},get id(){return s()},set id(v=$e(r)){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),g=B(m);Se(g,i,()=>({props:d(c)})),x(v,m)},y=v=>{var m=cI();Ue(m,()=>({...d(c)}));var g=D(m);Se(g,()=>n()??qe),C(m),x(v,m)};return ue(p,v=>{i()?v(h):v(y,-1)}),x(e,u),re(f)}ne(mc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var dI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),fI=q("<th><!></th>");function vc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=He(t,dI);const l=JD.create({id:z(()=>s()),ref:z(()=>a(),v=>a(v))}),c=P(()=>Ye(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 a()},set ref(v=null){a(v),b()},get id(){return s()},set id(v=$e(r)){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),g=B(m);Se(g,i,()=>({props:d(c)})),x(v,m)},y=v=>{var m=fI();Ue(m,()=>({...d(c)}));var g=D(m);Se(g,()=>n()??qe),C(m),x(v,m)};return ue(p,v=>{i()?v(h):v(y,-1)}),x(e,u),re(f)}ne(vc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var hI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),pI=q("<tr><!></tr>");function ss(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=He(t,hI);const l=YD.create({id:z(()=>s()),ref:z(()=>a(),v=>a(v))}),c=P(()=>Ye(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 a()},set ref(v=null){a(v),b()},get id(){return s()},set id(v=$e(r)){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),g=B(m);Se(g,i,()=>({props:d(c)})),x(v,m)},y=v=>{var m=pI();Ue(m,()=>({...d(c)}));var g=D(m);Se(g,()=>n()??qe),C(m),x(v,m)};return ue(p,v=>{i()?v(h):v(y,-1)}),x(e,u),re(f)}ne(ss,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var mI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),vI=q("<header><!></header>");function gc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=He(t,mI);const l=QD.create({id:z(()=>s()),ref:z(()=>a(),v=>a(v))}),c=P(()=>Ye(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 a()},set ref(v=null){a(v),b()},get id(){return s()},set id(v=$e(r)){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),g=B(m);Se(g,i,()=>({props:d(c)})),x(v,m)},y=v=>{var m=vI();Ue(m,()=>({...d(c)}));var g=D(m);Se(g,()=>n()??qe),C(m),x(v,m)};return ue(p,v=>{i()?v(h):v(y,-1)}),x(e,u),re(f)}ne(gc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var gI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),yI=q("<div><!></div>");function yc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(r)),o=He(t,gI);const l=BD.create({id:z(()=>s()),ref:z(()=>a(),v=>a(v))}),c=P(()=>Ye(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 a()},set ref(v=null){a(v),b()},get id(){return s()},set id(v=$e(r)){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),g=B(m);Se(g,i,()=>({props:d(c),headingValue:l.root.headingValue})),x(v,m)},y=v=>{var m=yI();Ue(m,()=>({...d(c)}));var g=D(m),E=T=>{var A=ie(),I=B(A);Se(I,()=>n()??qe,()=>({headingValue:l.root.headingValue})),x(T,A)},S=T=>{var A=Vt();Y(()=>Z(A,l.root.headingValue)),x(T,A)};ue(g,T=>{n()?T(E):T(S,-1)}),C(m),x(v,m)};return ue(p,v=>{i()?v(h):v(y,-1)}),x(e,u),re(f)}ne(yc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var bI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),_I=q("<button><!></button>");function bc(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"id",23,()=>$e(r)),s=_(t,"ref",15,null),o=_(t,"tabindex",7,0),l=He(t,bI);const c=ZD.create({id:z(()=>a()),ref:z(()=>s(),m=>s(m))}),f=P(()=>Ye(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 a()},set id(m=$e(r)){a(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get tabindex(){return o()},set tabindex(m=0){o(m),b()}},p=ie(),h=B(p),y=m=>{var g=ie(),E=B(g);Se(E,i,()=>({props:d(f)})),x(m,g)},v=m=>{var g=_I();Ue(g,()=>({...d(f)}));var E=D(g);Se(E,()=>n()??qe),C(g),x(m,g)};return ue(h,m=>{i()?m(y):m(v,-1)}),x(e,p),re(u)}ne(bc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var wI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),kI=q("<button><!></button>");function _c(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"id",23,()=>$e(r)),s=_(t,"ref",15,null),o=_(t,"tabindex",7,0),l=He(t,wI);const c=WD.create({id:z(()=>a()),ref:z(()=>s(),m=>s(m))}),f=P(()=>Ye(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 a()},set id(m=$e(r)){a(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get tabindex(){return o()},set tabindex(m=0){o(m),b()}},p=ie(),h=B(p),y=m=>{var g=ie(),E=B(g);Se(E,i,()=>({props:d(f)})),x(m,g)},v=m=>{var g=kI();Ue(g,()=>({...d(f)}));var E=D(g);Se(E,()=>n()??qe),C(g),x(m,g)};return ue(h,m=>{i()?m(y):m(v,-1)}),x(e,p),re(u)}ne(_c,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var SI=new Set(["$$slots","$$events","$$legacy","$$host","value"]),Mv=q("<input/>");function $v(e,t){te(t,!0);let r=_(t,"value",15),n=He(t,SI);const i=P(()=>Ye(n,{"aria-hidden":"true",tabindex:-1,style:{...Im,position:"absolute",top:"0",left:"0"}}));var a={get value(){return r()},set value(f){r(f),b()}},s=ie(),o=B(s),l=f=>{var u=Mv();Ue(u,()=>({...d(i),value:r()}),void 0,void 0,void 0,void 0,!0),x(f,u)},c=f=>{var u=Mv();Ue(u,()=>({...d(i)}),void 0,void 0,void 0,void 0,!0),qs(u,r),x(f,u)};return ue(o,f=>{d(i).type==="checkbox"?f(l):f(c,-1)}),x(e,s),re(a)}ne($v,{value:{}},[],[],{mode:"open"});var EI=["top","right","bottom","left"],Rn=Math.min,rr=Math.max,Ro=Math.round,Lo=Math.floor,Yr=e=>({x:e,y:e}),xI={left:"right",right:"left",bottom:"top",top:"bottom"};function wc(e,t,r){return rr(e,Rn(t,r))}function un(e,t){return typeof e=="function"?e(t):e}function cn(e){return e.split("-")[0]}function ji(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 TI(e,t,r){r===void 0&&(r=!1);const n=ji(e),i=Ec(e),a=Sc(i);let s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=zo(s)),[s,zo(s)]}function AI(e){const t=zo(e);return[xc(e),t,xc(t)]}function xc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Fv=["left","right"],Nv=["right","left"],CI=["top","bottom"],OI=["bottom","top"];function DI(e,t,r){switch(e){case"top":case"bottom":return r?t?Nv:Fv:t?Fv:Nv;case"left":case"right":return t?CI:OI;default:return[]}}function II(e,t,r,n){const i=ji(e);let a=DI(cn(e),r==="start",n);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(xc)))),a}function zo(e){const t=cn(e);return xI[t]+e.slice(t.length)}function PI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Rv(e){return typeof e!="number"?PI(e):{top:e,right:e,bottom:e,left:e}}function qo(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 Lv(e,t,r){let{reference:n,floating:i}=e;const a=Jr(t),s=Ec(t),o=Sc(s),l=cn(t),c=a==="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(ji(t)){case"start":h[s]-=p*(r&&c?-1:1);break;case"end":h[s]+=p*(r&&c?-1:1);break}return h}async function MI(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:a,rects:s,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=un(t,e),y=Rv(h),v=o[p?u==="floating"?"reference":"floating":u],m=qo(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(v)))==null||r?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(o.floating)),boundary:c,rootBoundary:f,strategy:l})),g=u==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(o.floating)),S=await(a.isElement==null?void 0:a.isElement(E))?await(a.getScale==null?void 0:a.getScale(E))||{x:1,y:1}:{x:1,y:1},T=qo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:E,strategy:l}):g);return{top:(m.top-T.top+y.top)/S.y,bottom:(T.bottom-m.bottom+y.bottom)/S.y,left:(m.left-T.left+y.left)/S.x,right:(T.right-m.right+y.right)/S.x}}var $I=50,FI=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=r,o=s.detectOverflow?s:{...s,detectOverflow:MI},l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:u}=Lv(c,n,l),p=n,h=0;const y={};for(let v=0;v<a.length;v++){const m=a[v];if(!m)continue;const{name:g,fn:E}=m,{x:S,y:T,data:A,reset:I}=await E({x:f,y:u,initialPlacement:n,placement:p,strategy:i,middlewareData:y,rects:c,platform:o,elements:{reference:e,floating:t}});f=S??f,u=T??u,y[g]={...y[g],...A},I&&h<$I&&(h++,typeof I=="object"&&(I.placement&&(p=I.placement),I.rects&&(c=I.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):I.rects),{x:f,y:u}=Lv(c,p,l)),v=-1)}return{x:f,y:u,placement:p,strategy:i,middlewareData:y}},NI=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:a,platform:s,elements:o,middlewareData:l}=t,{element:c,padding:f=0}=un(e,t)||{};if(c==null)return{};const u=Rv(f),p={x:r,y:n},h=Ec(i),y=Sc(h),v=await s.getDimensions(c),m=h==="y",g=m?"top":"left",E=m?"bottom":"right",S=m?"clientHeight":"clientWidth",T=a.reference[y]+a.reference[h]-p[h]-a.floating[y],A=p[h]-a.reference[h],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let M=I?I[S]:0;(!M||!await(s.isElement==null?void 0:s.isElement(I)))&&(M=o.floating[S]||a.floating[y]);const N=T/2-A/2,j=M/2-v[y]/2-1,R=Rn(u[g],j),X=Rn(u[E],j),U=R,le=M-v[y]-X,he=M/2-v[y]/2+N,H=wc(U,he,le),oe=!l.arrow&&ji(i)!=null&&he!==H&&a.reference[y]/2-(he<U?R:X)-v[y]/2<0,W=oe?he<U?he-U:he-le:0;return{[h]:p[h]+W,data:{[h]:H,centerOffset:he-H-W,...oe&&{alignmentOffset:W}},reset:oe}}}),RI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:a,rects:s,initialPlacement:o,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...m}=un(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const g=cn(i),E=Jr(o),S=cn(o)===o,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),A=p||(S||!v?[zo(o)]:AI(o)),I=y!=="none";!p&&I&&A.push(...II(o,v,y,T));const M=[o,...A],N=await l.detectOverflow(t,m),j=[];let R=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&j.push(N[g]),u){const he=TI(i,s,T);j.push(N[he[0]],N[he[1]])}if(R=[...R,{placement:i,overflows:j}],!j.every(he=>he<=0)){var X,U;const he=(((X=a.flip)==null?void 0:X.index)||0)+1,H=M[he];if(H&&(!(u==="alignment"&&E!==Jr(H))||R.every(W=>Jr(W.placement)===E?W.overflows[0]>0:!0)))return{data:{index:he,overflows:R},reset:{placement:H}};let oe=(U=R.filter(W=>W.overflows[0]<=0).sort((W,fe)=>W.overflows[1]-fe.overflows[1])[0])==null?void 0:U.placement;if(!oe)switch(h){case"bestFit":{var le;const W=(le=R.filter(fe=>{if(I){const ce=Jr(fe.placement);return ce===E||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];W&&(oe=W);break}case"initialPlacement":oe=o;break}if(i!==oe)return{reset:{placement:oe}}}return{}}}};function zv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qv(e){return EI.some(t=>e[t]>=0)}var LI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...a}=un(e,t);switch(i){case"referenceHidden":{const s=zv(await n.detectOverflow(t,{...a,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:qv(s)}}}case"escaped":{const s=zv(await n.detectOverflow(t,{...a,altBoundary:!0}),r.floating);return{data:{escapedOffsets:s,escaped:qv(s)}}}default:return{}}}}},Uv=new Set(["left","top"]);async function zI(e,t){const{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=cn(r),o=ji(r),l=Jr(r)==="y",c=Uv.has(s)?-1:1,f=a&&l?-1:1,u=un(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:y}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return o&&typeof y=="number"&&(h=o==="end"?y*-1:y),l?{x:h*f,y:p*c}:{x:p*c,y:h*f}}var qI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:a,placement:s,middlewareData:o}=t,l=await zI(t,e);return s===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:s}}}}},UI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:a}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:l={fn:g=>{let{x:E,y:S}=g;return{x:E,y:S}}},...c}=un(e,t),f={x:r,y:n},u=await a.detectOverflow(t,c),p=Jr(cn(i)),h=kc(p);let y=f[h],v=f[p];if(s){const g=h==="y"?"top":"left",E=h==="y"?"bottom":"right",S=y+u[g],T=y-u[E];y=wc(S,y,T)}if(o){const g=p==="y"?"top":"left",E=p==="y"?"bottom":"right",S=v+u[g],T=v-u[E];v=wc(S,v,T)}const m=l.fn({...t,[h]:y,[p]:v});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[h]:s,[p]:o}}}}}},BI=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:a,middlewareData:s}=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],y=f[u];const v=un(o,t),m=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const S=p==="y"?"height":"width",T=a.reference[p]-a.floating[S]+m.mainAxis,A=a.reference[p]+a.reference[S]-m.mainAxis;h<T?h=T:h>A&&(h=A)}if(c){var g,E;const S=p==="y"?"width":"height",T=Uv.has(cn(i)),A=a.reference[u]-a.floating[S]+(T&&((g=s.offset)==null?void 0:g[u])||0)+(T?0:m.crossAxis),I=a.reference[u]+a.reference[S]+(T?0:((E=s.offset)==null?void 0:E[u])||0)-(T?m.crossAxis:0);y<A?y=A:y>I&&(y=I)}return{[p]:h,[u]:y}}}},VI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:a,platform:s,elements:o}=t,{apply:l=()=>{},...c}=un(e,t),f=await s.detectOverflow(t,c),u=cn(i),p=ji(i),h=Jr(i)==="y",{width:y,height:v}=a.floating;let m,g;u==="top"||u==="bottom"?(m=u,g=p===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(g=u,m=p==="end"?"top":"bottom");const E=v-f.top-f.bottom,S=y-f.left-f.right,T=Rn(v-f[m],E),A=Rn(y-f[g],S),I=!t.middlewareData.shift;let M=T,N=A;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=S),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(M=E),I&&!p){const R=rr(f.left,0),X=rr(f.right,0),U=rr(f.top,0),le=rr(f.bottom,0);h?N=y-2*(R!==0||X!==0?R+X:rr(f.left,f.right)):M=v-2*(U!==0||le!==0?U+le:rr(f.top,f.bottom))}await l({...t,availableWidth:N,availableHeight:M});const j=await s.getDimensions(o.floating);return y!==j.width||v!==j.height?{reset:{rects:!0}}:{}}}};function Uo(){return typeof window<"u"}function Zi(e){return Bv(e)?(e.nodeName||"").toLowerCase():"#document"}function nr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qr(e){var t;return(t=(Bv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Bv(e){return Uo()?e instanceof Node||e instanceof nr(e).Node:!1}function Or(e){return Uo()?e instanceof Element||e instanceof nr(e).Element:!1}function dn(e){return Uo()?e instanceof HTMLElement||e instanceof nr(e).HTMLElement:!1}function Vv(e){return!Uo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof nr(e).ShadowRoot}function os(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Dr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function jI(e){return/^(table|td|th)$/.test(Zi(e))}function Bo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var ZI=/transform|translate|scale|rotate|perspective|filter/,WI=/paint|layout|strict|content/,li=e=>!!e&&e!=="none",Tc;function Ac(e){const t=Or(e)?Dr(e):e;return li(t.transform)||li(t.translate)||li(t.scale)||li(t.rotate)||li(t.perspective)||!Cc()&&(li(t.backdropFilter)||li(t.filter))||ZI.test(t.willChange||"")||WI.test(t.contain||"")}function HI(e){let t=Ln(e);for(;dn(t)&&!Wi(t);){if(Ac(t))return t;if(Bo(t))return null;t=Ln(t)}return null}function Cc(){return Tc==null&&(Tc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Tc}function Wi(e){return/^(html|body|#document)$/.test(Zi(e))}function Dr(e){return nr(e).getComputedStyle(e)}function Vo(e){return Or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ln(e){if(Zi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vv(e)&&e.host||Qr(e);return Vv(t)?t.host:t}function jv(e){const t=Ln(e);return Wi(t)?e.ownerDocument?e.ownerDocument.body:e.body:dn(t)&&os(t)?t:jv(t)}function ls(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=jv(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),s=nr(i);if(a){const o=Oc(s);return t.concat(s,s.visualViewport||[],os(i)?i:[],o&&r?ls(o):[])}else return t.concat(i,ls(i,[],r))}function Oc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zv(e){const t=Dr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=dn(e),a=i?e.offsetWidth:r,s=i?e.offsetHeight:n,o=Ro(r)!==a||Ro(n)!==s;return o&&(r=a,n=s),{width:r,height:n,$:o}}function Dc(e){return Or(e)?e:e.contextElement}function Hi(e){const t=Dc(e);if(!dn(t))return Yr(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=Zv(t);let s=(a?Ro(r.width):r.width)/n,o=(a?Ro(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!o||!Number.isFinite(o))&&(o=1),{x:s,y:o}}var GI=Yr(0);function Wv(e){const t=nr(e);return!Cc()||!t.visualViewport?GI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function KI(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==nr(e)?!1:t}function ui(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=Dc(e);let s=Yr(1);t&&(n?Or(n)&&(s=Hi(n)):s=Hi(e));const o=KI(a,r,n)?Wv(a):Yr(0);let l=(i.left+o.x)/s.x,c=(i.top+o.y)/s.y,f=i.width/s.x,u=i.height/s.y;if(a){const p=nr(a),h=n&&Or(n)?nr(n):n;let y=p,v=Oc(y);for(;v&&n&&h!==y;){const m=Hi(v),g=v.getBoundingClientRect(),E=Dr(v),S=g.left+(v.clientLeft+parseFloat(E.paddingLeft))*m.x,T=g.top+(v.clientTop+parseFloat(E.paddingTop))*m.y;l*=m.x,c*=m.y,f*=m.x,u*=m.y,l+=S,c+=T,y=nr(v),v=Oc(y)}}return qo({width:f,height:u,x:l,y:c})}function jo(e,t){const r=Vo(e).scrollLeft;return t?t.left+r:ui(Qr(e)).left+r}function Hv(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-jo(e,r),y:r.top+t.scrollTop}}function YI(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",s=Qr(n),o=t?Bo(t.floating):!1;if(n===s||o&&a)return r;let l={scrollLeft:0,scrollTop:0},c=Yr(1);const f=Yr(0),u=dn(n);if((u||!u&&!a)&&((Zi(n)!=="body"||os(s))&&(l=Vo(n)),u)){const h=ui(n);c=Hi(n),f.x=h.x+n.clientLeft,f.y=h.y+n.clientTop}const p=s&&!u&&!a?Hv(s,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 JI(e){return Array.from(e.getClientRects())}function QI(e){const t=Qr(e),r=Vo(e),n=e.ownerDocument.body,i=rr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=rr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+jo(e);const o=-r.scrollTop;return Dr(n).direction==="rtl"&&(s+=rr(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:o}}var Gv=25;function XI(e,t){const r=nr(e),n=Qr(e),i=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,o=0,l=0;if(i){a=i.width,s=i.height;const f=Cc();(!f||f&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}const c=jo(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,y=Math.abs(n.clientWidth-u.clientWidth-h);y<=Gv&&(a-=y)}else c<=Gv&&(a+=c);return{width:a,height:s,x:o,y:l}}function eP(e,t){const r=ui(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=dn(e)?Hi(e):Yr(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:n*a.y}}function Kv(e,t,r){let n;if(t==="viewport")n=XI(e,r);else if(t==="document")n=QI(Qr(e));else if(Or(t))n=eP(t,r);else{const i=Wv(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return qo(n)}function Yv(e,t){const r=Ln(e);return r===t||!Or(r)||Wi(r)?!1:Dr(r).position==="fixed"||Yv(r,t)}function tP(e,t){const r=t.get(e);if(r)return r;let n=ls(e,[],!1).filter(o=>Or(o)&&Zi(o)!=="body"),i=null;const a=Dr(e).position==="fixed";let s=a?Ln(e):e;for(;Or(s)&&!Wi(s);){const o=Dr(s),l=Ac(s);!l&&o.position==="fixed"&&(i=null),(a?!l&&!i:!l&&o.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||os(s)&&!l&&Yv(e,s))?n=n.filter(c=>c!==s):i=o,s=Ln(s)}return t.set(e,n),n}function rP(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const a=[...r==="clippingAncestors"?Bo(t)?[]:tP(t,this._c):[].concat(r),n],s=Kv(t,a[0],i);let o=s.top,l=s.right,c=s.bottom,f=s.left;for(let u=1;u<a.length;u++){const p=Kv(t,a[u],i);o=rr(p.top,o),l=Rn(p.right,l),c=Rn(p.bottom,c),f=rr(p.left,f)}return{width:l-f,height:c-o,x:f,y:o}}function nP(e){const{width:t,height:r}=Zv(e);return{width:t,height:r}}function iP(e,t,r){const n=dn(t),i=Qr(t),a=r==="fixed",s=ui(e,!0,a,t);let o={scrollLeft:0,scrollTop:0};const l=Yr(0);function c(){l.x=jo(i)}if(n||!n&&!a)if((Zi(t)!=="body"||os(i))&&(o=Vo(t)),n){const u=ui(t,!0,a,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else i&&c();a&&!n&&i&&c();const f=i&&!n&&!a?Hv(i,o):Yr(0);return{x:s.left+o.scrollLeft-l.x-f.x,y:s.top+o.scrollTop-l.y-f.y,width:s.width,height:s.height}}function Ic(e){return Dr(e).position==="static"}function Jv(e,t){if(!dn(e)||Dr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Qr(e)===r&&(r=r.ownerDocument.body),r}function Qv(e,t){const r=nr(e);if(Bo(e))return r;if(!dn(e)){let i=Ln(e);for(;i&&!Wi(i);){if(Or(i)&&!Ic(i))return i;i=Ln(i)}return r}let n=Jv(e,t);for(;n&&jI(n)&&Ic(n);)n=Jv(n,t);return n&&Wi(n)&&Ic(n)&&!Ac(n)?r:n||HI(e)||r}var aP=async function(e){const t=this.getOffsetParent||Qv,r=this.getDimensions,n=await r(e.floating);return{reference:iP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function sP(e){return Dr(e).direction==="rtl"}var oP={convertOffsetParentRelativeRectToViewportRelativeRect:YI,getDocumentElement:Qr,getClippingRect:rP,getOffsetParent:Qv,getElementRects:aP,getClientRects:JI,getDimensions:nP,getScale:Hi,isElement:Or,isRTL:sP};function Xv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lP(e,t){let r=null,n;const i=Qr(e);function a(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null}function s(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:f,top:u,width:p,height:h}=c;if(o||t(),!p||!h)return;const y=Lo(u),v=Lo(i.clientWidth-(f+p)),m=Lo(i.clientHeight-(u+h)),g=Lo(f),E={rootMargin:-y+"px "+-v+"px "+-m+"px "+-g+"px",threshold:rr(0,Rn(1,l))||1};let S=!0;function T(A){const I=A[0].intersectionRatio;if(I!==l){if(!S)return s();I?s(!1,I):n=setTimeout(()=>{s(!1,1e-7)},1e3)}I===1&&!Xv(c,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(T,{...E,root:i.ownerDocument})}catch{r=new IntersectionObserver(T,E)}r.observe(e)}return s(!0),a}function uP(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Dc(e),f=i||a?[...c?ls(c):[],...t?ls(t):[]]:[];f.forEach(g=>{i&&g.addEventListener("scroll",r,{passive:!0}),a&&g.addEventListener("resize",r)});const u=c&&o?lP(c,r):null;let p=-1,h=null;s&&(h=new ResizeObserver(g=>{let[E]=g;E&&E.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),r()}),c&&!l&&h.observe(c),t&&h.observe(t));let y,v=l?ui(e):null;l&&m();function m(){const g=ui(e);v&&!Xv(v,g)&&r(),v=g,y=requestAnimationFrame(m)}return r(),()=>{var g;f.forEach(E=>{i&&E.removeEventListener("scroll",r),a&&E.removeEventListener("resize",r)}),u?.(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(y)}}var cP=qI,dP=UI,fP=RI,hP=VI,pP=LI,mP=NI,vP=BI,gP=(e,t,r)=>{const n=new Map,i={platform:oP,...r},a={...i.platform,_c:n};return FI(e,t,{...i,platform:a})};function ci(e){return typeof e=="function"?e():e}function eg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tg(e,t){const r=eg(e);return Math.round(t*r)/r}function rg(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 yP(e){const t=e.whileElementsMounted,r=P(()=>ci(e.open)??!0),n=P(()=>ci(e.middleware)),i=P(()=>ci(e.transform)??!0),a=P(()=>ci(e.placement)??"bottom"),s=P(()=>ci(e.strategy)??"absolute"),o=P(()=>ci(e.sideOffset)??0),l=P(()=>ci(e.alignOffset)??0),c=e.reference;let f=se(0),u=se(0);const p=xr(null);let h=se(Pe(d(s))),y=se(Pe(d(a))),v=se(Pe({})),m=se(!1),g=!1,E=0;const S=P(()=>{const R=p.current?tg(p.current,d(f)):d(f),X=p.current?tg(p.current,d(u)):d(u);return d(i)?{position:d(h),left:"0",top:"0",transform:`translate(${R}px, ${X}px)`,...p.current&&eg(p.current)>=1.5&&{willChange:"transform"}}:{position:d(h),left:`${R}px`,top:`${X}px`}});let T;function A(){if(c.current===null||p.current===null)return;const R=c.current,X=p.current,U=++E;gP(R,X,{middleware:d(n),placement:d(a),strategy:d(s)}).then(le=>{if(U===E&&!(c.current!==R||p.current!==X)){if(bP(R)){F(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(f,le.x,!0),F(u,le.y,!0),F(h,le.strategy,!0),F(y,le.placement,!0),F(v,le.middlewareData,!0),F(m,!0)}})}function I(){typeof T=="function"&&(T(),T=void 0),E++}function M(){if(I(),t===void 0){A();return}d(r)&&(c.current===null||p.current===null||(T=t(c.current,p.current,A)))}function N(){!d(r)&&p.current===null&&F(m,!1)}function j(){return[d(n),d(a),d(s),d(o),d(l),d(r)]}return ve(()=>{t===void 0&&d(r)&&A()}),ve(M),ve(()=>{if(t!==void 0){if(j(),!d(r)){g=!1;return}if(!d(m)){g=!1;return}if(!g){g=!0;return}A()}}),ve(N),ve(()=>I),{floating:p,reference:c,get strategy(){return d(h)},get placement(){return d(y)},get middlewareData(){return d(v)},get isPositioned(){return d(m)},get floatingStyles(){return d(S)},get update(){return A}}}function bP(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var _P={top:"bottom",right:"left",bottom:"top",left:"right"},Pc=new Ft("Floating.Root"),ng=new Ft("Floating.Content"),Mc=new Ft("Floating.Root"),wP=class fd{static create(t=!1){return t?Mc.set(new fd):Pc.set(new fd)}anchorNode=xr(null);customAnchorNode=xr(null);triggerNode=xr(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})}},kP=class hd{static create(t,r=!1){return r?ng.set(new hd(t,Mc.get())):ng.set(new hd(t,Pc.get()))}opts;root;contentRef=xr(null);wrapperRef=xr(null);arrowRef=xr(null);contentAttachment=tt(this.contentRef);wrapperAttachment=tt(this.wrapperRef);arrowAttachment=tt(this.arrowRef);arrowId=xr(Nn());#e=P(()=>{if(typeof this.opts.style=="string")return Ka(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new zC(()=>this.arrowRef.current??void 0);#n=P(()=>this.#r?.width??0);#i=P(()=>this.#r?.height??0);#a=P(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#s=P(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#o=P(()=>d(this.#s).length>0);get hasExplicitBoundaries(){return d(this.#o)}set hasExplicitBoundaries(t){F(this.#o,t)}#l=P(()=>({padding:this.opts.collisionPadding.current,boundary:d(this.#s).filter(iO),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return d(this.#l)}set detectOverflowOptions(t){F(this.#l,t)}#u=se(void 0);#c=se(void 0);#d=se(void 0);#h=se(void 0);#p=P(()=>[cP({mainAxis:this.opts.sideOffset.current+d(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&dP({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?vP():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&fP({...this.detectOverflowOptions}),hP({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:n})=>{const{width:i,height:a}=t.reference;F(this.#u,r,!0),F(this.#c,n,!0),F(this.#d,i,!0),F(this.#h,a,!0)}}),this.arrowRef.current&&mP({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),EP({arrowWidth:d(this.#n),arrowHeight:d(this.#i)}),this.opts.hideWhenDetached.current&&pP({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return d(this.#p)}set middleware(t){F(this.#p,t)}floating;#f=P(()=>xP(this.floating.placement));get placedSide(){return d(this.#f)}set placedSide(t){F(this.#f,t)}#m=P(()=>TP(this.floating.placement));get placedAlign(){return d(this.#m)}set placedAlign(t){F(this.#m,t)}#v=P(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return d(this.#v)}set arrowX(t){F(this.#v,t)}#y=P(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return d(this.#y)}set arrowY(t){F(this.#y,t)}#w=P(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return d(this.#w)}set cannotCenterArrow(t){F(this.#w,t)}#_=se();get contentZIndex(){return d(this.#_)}set contentZIndex(t){F(this.#_,t,!0)}#g=P(()=>_P[this.placedSide]);get arrowBaseSide(){return d(this.#g)}set arrowBaseSide(t){F(this.#g,t)}#k=P(()=>({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){F(this.#k,t)}#b=P(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Ja({...d(this.#e)}),...this.contentAttachment}));get props(){return d(this.#b)}set props(t){F(this.#b,t)}#S=P(()=>({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){F(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),at(()=>t.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=yP({strategy:()=>this.opts.strategy.current,placement:()=>d(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>uP(...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()}),at(()=>this.contentRef.current,n=>{if(!n||!this.opts.enabled.current)return;const i=Lm(n),a=i.requestAnimationFrame(()=>{if(this.contentRef.current!==n||!this.opts.enabled.current)return;const s=i.getComputedStyle(n).zIndex;s!==this.contentZIndex&&(this.contentZIndex=s)});return()=>{i.cancelAnimationFrame(a)}}),ve(()=>{this.floating.floating.current=this.wrapperRef.current})}},SP=class pd{static create(t,r=!1){return r?new pd(t,Mc.get()):new pd(t,Pc.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=iC(t.virtualEl.current):r.triggerNode=t.ref}};function EP(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,s=a?0:e.arrowWidth,o=a?0:e.arrowHeight,[l,c]=$c(r),f={start:"0%",center:"50%",end:"100%"}[c],u=(i.arrow?.x??0)+s/2,p=(i.arrow?.y??0)+o/2;let h="",y="";return l==="bottom"?(h=a?f:`${u}px`,y=`${-o}px`):l==="top"?(h=a?f:`${u}px`,y=`${n.floating.height+o}px`):l==="right"?(h=`${-o}px`,y=a?f:`${p}px`):l==="left"&&(h=`${n.floating.width+o}px`,y=a?f:`${p}px`),{data:{x:h,y}}}}}function $c(e){const[t,r="center"]=e.split("-");return[t,r]}function xP(e){return $c(e)[0]}function TP(e){return $c(e)[1]}function ig(e,t){te(t,!0);let r=_(t,"children",7),n=_(t,"tooltip",7,!1);wP.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()}},a=ie(),s=B(a);return Se(s,()=>r()??qe),x(e,a),re(i)}ne(ig,{children:{},tooltip:{}},[],[],{mode:"open"});function ag(e,t){te(t,!0);let r=_(t,"id",7),n=_(t,"children",7),i=_(t,"virtualEl",7),a=_(t,"ref",7),s=_(t,"tooltip",7,!1);SP.create({id:z(()=>r()),virtualEl:z(()=>i()),ref:a()},s());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 a()},set ref(f){a(f),b()},get tooltip(){return s()},set tooltip(f=!1){s(f),b()}},l=ie(),c=B(l);return Se(c,()=>n()??qe),x(e,l),re(o)}ne(ag,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function sg(e,t){te(t,!0);let r=_(t,"content",7),n=_(t,"side",7,"bottom"),i=_(t,"sideOffset",7,0),a=_(t,"align",7,"center"),s=_(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,()=>{}),y=_(t,"sticky",7,"partial"),v=_(t,"updatePositionStrategy",7,"optimized"),m=_(t,"strategy",7,"fixed"),g=_(t,"dir",7,"ltr"),E=_(t,"style",23,()=>({})),S=_(t,"wrapperId",23,Nn),T=_(t,"customAnchor",7,null),A=_(t,"enabled",7),I=_(t,"tooltip",7,!1);const M=kP.create({side:z(()=>n()),sideOffset:z(()=>i()),align:z(()=>a()),alignOffset:z(()=>s()),id:z(()=>o()),arrowPadding:z(()=>l()),avoidCollisions:z(()=>c()),collisionBoundary:z(()=>f()),collisionPadding:z(()=>u()),hideWhenDetached:z(()=>p()),onPlaced:z(()=>h()),sticky:z(()=>y()),updatePositionStrategy:z(()=>v()),strategy:z(()=>m()),dir:z(()=>g()),style:z(()=>E()),enabled:z(()=>A()),wrapperId:z(()=>S()),customAnchor:z(()=>T())},I()),N=P(()=>Ye(M.wrapperProps,{style:{pointerEvents:"auto"}}));var j={get content(){return r()},set content(U){r(U),b()},get side(){return n()},set side(U="bottom"){n(U),b()},get sideOffset(){return i()},set sideOffset(U=0){i(U),b()},get align(){return a()},set align(U="center"){a(U),b()},get alignOffset(){return s()},set alignOffset(U=0){s(U),b()},get id(){return o()},set id(U){o(U),b()},get arrowPadding(){return l()},set arrowPadding(U=0){l(U),b()},get avoidCollisions(){return c()},set avoidCollisions(U=!0){c(U),b()},get collisionBoundary(){return f()},set collisionBoundary(U=[]){f(U),b()},get collisionPadding(){return u()},set collisionPadding(U=0){u(U),b()},get hideWhenDetached(){return p()},set hideWhenDetached(U=!1){p(U),b()},get onPlaced(){return h()},set onPlaced(U=()=>{}){h(U),b()},get sticky(){return y()},set sticky(U="partial"){y(U),b()},get updatePositionStrategy(){return v()},set updatePositionStrategy(U="optimized"){v(U),b()},get strategy(){return m()},set strategy(U="fixed"){m(U),b()},get dir(){return g()},set dir(U="ltr"){g(U),b()},get style(){return E()},set style(U={}){E(U),b()},get wrapperId(){return S()},set wrapperId(U=Nn()){S(U),b()},get customAnchor(){return T()},set customAnchor(U=null){T(U),b()},get enabled(){return A()},set enabled(U){A(U),b()},get tooltip(){return I()},set tooltip(U=!1){I(U),b()}},R=ie(),X=B(R);return Se(X,()=>r()??qe,()=>({props:M.props,wrapperProps:d(N)})),x(e,R),re(j)}ne(sg,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function og(e,t){te(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()}},a=ie(),s=B(a);return Se(s,()=>r()??qe,()=>({props:{},wrapperProps:{}})),x(e,a),re(i)}ne(og,{content:{},onPlaced:{}},[],[],{mode:"open"});var AP=new Set(["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);function lg(e,t){te(t,!0);let r=_(t,"content",7),n=_(t,"isStatic",7,!1),i=_(t,"onPlaced",7),a=He(t,AP);var s={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=ie(),l=B(o),c=u=>{og(u,{get content(){return r()},get onPlaced(){return i()}})},f=u=>{sg(u,An({get content(){return r()},get onPlaced(){return i()}},()=>a))};return ue(l,u=>{n()?u(c):u(f,-1)}),x(e,o),re(s)}ne(lg,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var CP=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"]),OP=q("<!> <!>",1);function Fc(e,t){te(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),a=_(t,"preventOverflowTextSelection",7),s=_(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),y=_(t,"avoidCollisions",7),v=_(t,"collisionBoundary",7),m=_(t,"collisionPadding",7),g=_(t,"sticky",7),E=_(t,"hideWhenDetached",7),S=_(t,"updatePositionStrategy",7),T=_(t,"strategy",7),A=_(t,"dir",7),I=_(t,"preventScroll",7),M=_(t,"wrapperId",7),N=_(t,"style",7),j=_(t,"onPlaced",7),R=_(t,"onInteractOutside",7),X=_(t,"onCloseAutoFocus",7),U=_(t,"onOpenAutoFocus",7),le=_(t,"onFocusOutside",7),he=_(t,"interactOutsideBehavior",7,"close"),H=_(t,"loop",7),oe=_(t,"trapFocus",7,!0),W=_(t,"isValidEvent",7,()=>!1),fe=_(t,"customAnchor",7,null),ce=_(t,"isStatic",7,!1),de=_(t,"enabled",7),J=_(t,"ref",7),ee=_(t,"tooltip",7,!1),$=_(t,"contentPointerEvents",7,"auto"),ae=He(t,CP);const L=P(()=>I()??!0),be=P(()=>T()??(d(L)?"fixed":"absolute"));var G={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 a()},set preventOverflowTextSelection(w){a(w),b()},get id(){return s()},set id(w){s(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 y()},set avoidCollisions(w){y(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 g()},set sticky(w){g(w),b()},get hideWhenDetached(){return E()},set hideWhenDetached(w){E(w),b()},get updatePositionStrategy(){return S()},set updatePositionStrategy(w){S(w),b()},get strategy(){return T()},set strategy(w){T(w),b()},get dir(){return A()},set dir(w){A(w),b()},get preventScroll(){return I()},set preventScroll(w){I(w),b()},get wrapperId(){return M()},set wrapperId(w){M(w),b()},get style(){return N()},set style(w){N(w),b()},get onPlaced(){return j()},set onPlaced(w){j(w),b()},get onInteractOutside(){return R()},set onInteractOutside(w){R(w),b()},get onCloseAutoFocus(){return X()},set onCloseAutoFocus(w){X(w),b()},get onOpenAutoFocus(){return U()},set onOpenAutoFocus(w){U(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 H()},set loop(w){H(w),b()},get trapFocus(){return oe()},set trapFocus(w=!0){oe(w),b()},get isValidEvent(){return W()},set isValidEvent(w=()=>!1){W(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 J()},set ref(w){J(w),b()},get tooltip(){return ee()},set tooltip(w=!1){ee(w),b()},get contentPointerEvents(){return $()},set contentPointerEvents(w="auto"){$(w),b()}};return lg(e,{get isStatic(){return ce()},get id(){return s()},get side(){return c()},get sideOffset(){return f()},get align(){return u()},get alignOffset(){return p()},get arrowPadding(){return h()},get avoidCollisions(){return y()},get collisionBoundary(){return v()},get collisionPadding(){return m()},get sticky(){return g()},get hideWhenDetached(){return E()},get updatePositionStrategy(){return S()},get strategy(){return d(be)},get dir(){return A()},get wrapperId(){return M()},get style(){return N()},get onPlaced(){return j()},get customAnchor(){return fe()},get enabled(){return de()},get tooltip(){return ee()},content:(_e,we)=>{let De=()=>we?.().props,Le=()=>we?.().wrapperProps;var je=OP(),_t=B(je),ot=Rt=>{rc(Rt,{get preventScroll(){return d(L)}})},Nt=Rt=>{rc(Rt,{get preventScroll(){return d(L)}})};ue(_t,Rt=>{t.forceMount&&de()?Rt(ot):t.forceMount||Rt(Nt,1)});var wt=V(_t,2);sv(wt,{get onOpenAutoFocus(){return U()},get onCloseAutoFocus(){return X()},get loop(){return H()},get enabled(){return de()},get trapFocus(){return oe()},get forceMount(){return t.forceMount},get ref(){return J()},focusScope:(ir,Gt)=>{let gr=()=>Gt?.().props;av(ir,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return de()},get ref(){return J()},children:(Pr,Mr)=>{iv(Pr,{get id(){return s()},get onInteractOutside(){return R()},get onFocusOutside(){return le()},get interactOutsideBehavior(){return he()},get isValidEvent(){return W()},get enabled(){return de()},get ref(){return J()},children:($r,yr)=>{let Xr=()=>yr?.().props;uv($r,{get id(){return s()},get preventOverflowTextSelection(){return a()},get onPointerDown(){return o()},get onPointerUp(){return l()},get enabled(){return de()},get ref(){return J()},children:(en,At)=>{var Un=ie(),na=B(Un);{let ia=P(()=>({props:Ye(ae,De(),Xr(),gr(),{style:{pointerEvents:$()}}),wrapperProps:Le()}));Se(na,()=>r()??qe,()=>d(ia))}x(en,Un)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),x(_e,je)},$$slots:{content:!0}}),re(G)}ne(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 DP=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 ug(e,t){te(t,!0);let r=_(t,"popper",7),n=_(t,"open",7),i=_(t,"onEscapeKeydown",7),a=_(t,"escapeKeydownBehavior",7),s=_(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),y=_(t,"arrowPadding",7),v=_(t,"avoidCollisions",7),m=_(t,"collisionBoundary",7),g=_(t,"collisionPadding",7),E=_(t,"sticky",7),S=_(t,"hideWhenDetached",7),T=_(t,"updatePositionStrategy",7),A=_(t,"strategy",7),I=_(t,"dir",7),M=_(t,"preventScroll",7),N=_(t,"wrapperId",7),j=_(t,"style",7),R=_(t,"onPlaced",7),X=_(t,"onInteractOutside",7),U=_(t,"onCloseAutoFocus",7),le=_(t,"onOpenAutoFocus",7),he=_(t,"onFocusOutside",7),H=_(t,"interactOutsideBehavior",7,"close"),oe=_(t,"loop",7),W=_(t,"trapFocus",7,!0),fe=_(t,"isValidEvent",7,()=>!1),ce=_(t,"customAnchor",7,null),de=_(t,"isStatic",7,!1),J=_(t,"ref",7),ee=_(t,"shouldRender",7),$=He(t,DP);var ae={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 a()},set escapeKeydownBehavior(w){a(w),b()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(w){s(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 y()},set arrowPadding(w){y(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 g()},set collisionPadding(w){g(w),b()},get sticky(){return E()},set sticky(w){E(w),b()},get hideWhenDetached(){return S()},set hideWhenDetached(w){S(w),b()},get updatePositionStrategy(){return T()},set updatePositionStrategy(w){T(w),b()},get strategy(){return A()},set strategy(w){A(w),b()},get dir(){return I()},set dir(w){I(w),b()},get preventScroll(){return M()},set preventScroll(w){M(w),b()},get wrapperId(){return N()},set wrapperId(w){N(w),b()},get style(){return j()},set style(w){j(w),b()},get onPlaced(){return R()},set onPlaced(w){R(w),b()},get onInteractOutside(){return X()},set onInteractOutside(w){X(w),b()},get onCloseAutoFocus(){return U()},set onCloseAutoFocus(w){U(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 H()},set interactOutsideBehavior(w="close"){H(w),b()},get loop(){return oe()},set loop(w){oe(w),b()},get trapFocus(){return W()},set trapFocus(w=!0){W(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 J()},set ref(w){J(w),b()},get shouldRender(){return ee()},set shouldRender(w){ee(w),b()}},L=ie(),be=B(L),G=w=>{Fc(w,An({get popper(){return r()},get onEscapeKeydown(){return i()},get escapeKeydownBehavior(){return a()},get preventOverflowTextSelection(){return s()},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 y()},get avoidCollisions(){return v()},get collisionBoundary(){return m()},get collisionPadding(){return g()},get sticky(){return E()},get hideWhenDetached(){return S()},get updatePositionStrategy(){return T()},get strategy(){return A()},get dir(){return I()},get preventScroll(){return M()},get wrapperId(){return N()},get style(){return j()},get onPlaced(){return R()},get customAnchor(){return ce()},get isStatic(){return de()},get enabled(){return n()},get onInteractOutside(){return X()},get onCloseAutoFocus(){return U()},get onOpenAutoFocus(){return le()},get interactOutsideBehavior(){return H()},get loop(){return oe()},get trapFocus(){return W()},get isValidEvent(){return fe()},get onFocusOutside(){return he()},forceMount:!1,get ref(){return J()}},()=>$))};return ue(be,w=>{ee()&&w(G)}),x(e,L),re(ae)}ne(ug,{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 IP=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 cg(e,t){te(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),a=_(t,"preventOverflowTextSelection",7),s=_(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),y=_(t,"avoidCollisions",7),v=_(t,"collisionBoundary",7),m=_(t,"collisionPadding",7),g=_(t,"sticky",7),E=_(t,"hideWhenDetached",7),S=_(t,"updatePositionStrategy",7),T=_(t,"strategy",7),A=_(t,"dir",7),I=_(t,"preventScroll",7),M=_(t,"wrapperId",7),N=_(t,"style",7),j=_(t,"onPlaced",7),R=_(t,"onInteractOutside",7),X=_(t,"onCloseAutoFocus",7),U=_(t,"onOpenAutoFocus",7),le=_(t,"onFocusOutside",7),he=_(t,"interactOutsideBehavior",7,"close"),H=_(t,"loop",7),oe=_(t,"trapFocus",7,!0),W=_(t,"isValidEvent",7,()=>!1),fe=_(t,"customAnchor",7,null),ce=_(t,"isStatic",7,!1),de=_(t,"enabled",7),J=He(t,IP);var ee={get popper(){return r()},set popper($){r($),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown($){n($),b()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior($){i($),b()},get preventOverflowTextSelection(){return a()},set preventOverflowTextSelection($){a($),b()},get id(){return s()},set id($){s($),b()},get onPointerDown(){return o()},set onPointerDown($){o($),b()},get onPointerUp(){return l()},set onPointerUp($){l($),b()},get side(){return c()},set side($){c($),b()},get sideOffset(){return f()},set sideOffset($){f($),b()},get align(){return u()},set align($){u($),b()},get alignOffset(){return p()},set alignOffset($){p($),b()},get arrowPadding(){return h()},set arrowPadding($){h($),b()},get avoidCollisions(){return y()},set avoidCollisions($){y($),b()},get collisionBoundary(){return v()},set collisionBoundary($){v($),b()},get collisionPadding(){return m()},set collisionPadding($){m($),b()},get sticky(){return g()},set sticky($){g($),b()},get hideWhenDetached(){return E()},set hideWhenDetached($){E($),b()},get updatePositionStrategy(){return S()},set updatePositionStrategy($){S($),b()},get strategy(){return T()},set strategy($){T($),b()},get dir(){return A()},set dir($){A($),b()},get preventScroll(){return I()},set preventScroll($){I($),b()},get wrapperId(){return M()},set wrapperId($){M($),b()},get style(){return N()},set style($){N($),b()},get onPlaced(){return j()},set onPlaced($){j($),b()},get onInteractOutside(){return R()},set onInteractOutside($){R($),b()},get onCloseAutoFocus(){return X()},set onCloseAutoFocus($){X($),b()},get onOpenAutoFocus(){return U()},set onOpenAutoFocus($){U($),b()},get onFocusOutside(){return le()},set onFocusOutside($){le($),b()},get interactOutsideBehavior(){return he()},set interactOutsideBehavior($="close"){he($),b()},get loop(){return H()},set loop($){H($),b()},get trapFocus(){return oe()},set trapFocus($=!0){oe($),b()},get isValidEvent(){return W()},set isValidEvent($=()=>!1){W($),b()},get customAnchor(){return fe()},set customAnchor($=null){fe($),b()},get isStatic(){return ce()},set isStatic($=!1){ce($),b()},get enabled(){return de()},set enabled($){de($),b()}};return Fc(e,An({get popper(){return r()},get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get preventOverflowTextSelection(){return a()},get id(){return s()},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 y()},get collisionBoundary(){return v()},get collisionPadding(){return m()},get sticky(){return g()},get hideWhenDetached(){return E()},get updatePositionStrategy(){return S()},get strategy(){return T()},get dir(){return A()},get preventScroll(){return I()},get wrapperId(){return M()},get style(){return N()},get onPlaced(){return j()},get customAnchor(){return fe()},get isStatic(){return ce()},get enabled(){return de()},get onInteractOutside(){return R()},get onCloseAutoFocus(){return X()},get onOpenAutoFocus(){return U()},get interactOutsideBehavior(){return he()},get loop(){return H()},get trapFocus(){return oe()},get isValidEvent(){return W()},get onFocusOutside(){return le()}},()=>J,{forceMount:!0})),re(ee)}ne(cg,{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 Zo=_o({component:"date-field",parts:["input","label","segment"]}),Gi={day:{min:1,max:e=>{const t=e.segmentValues.month,r=e.value.current??e.placeholder.current;return ts(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(Wt(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||kv(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"),PP=class Ly{static create(t,r){return zn.set(new Ly(t,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Nn();formatter;initialSegments;#e=se();get segmentValues(){return d(this.#e)}set segmentValues(t){F(this.#e,t,!0)}announcer;#t=P(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return d(this.#t)}set readonlySegmentsSet(t){F(this.#t,t)}segmentStates=bv();#r=se(null);#n=se(null);#i=se(null);get descriptionNode(){return d(this.#i)}set descriptionNode(t){F(this.#i,t,!0)}#a=se(null);get validationNode(){return d(this.#a)}set validationNode(t){F(this.#a,t,!0)}states=bv();#s=se(null);get dayPeriodNode(){return d(this.#s)}set dayPeriodNode(t){F(this.#s,t,!0)}rangeRoot=void 0;#o=se("");get name(){return d(this.#o)}set name(t){F(this.#o,t,!0)}domContext=new Vi(()=>null);constructor(t,r){this.rangeRoot=r,this.value=t.value,this.placeholder=r?r.opts.placeholder:t.placeholder,this.validate=r?xr(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=xv({initialLocale:this.locale.current,monthFormat:z(()=>"long"),yearFormat:z(()=>"numeric")}),this.initialSegments=sc(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=Io(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=sc(this.inferredGranularity)})}),En(()=>{this.announcer=Io(this.domContext.getDocument())}),ii(()=>{r||yD(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&&gD({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=sc(this.inferredGranularity))}),at(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(t){this.name=t}setFieldNode(t){F(this.#r,t,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:d(this.#r)}setLabelNode(t){F(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=Mo.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 a=4-`${i}`.length;if(a>0)return[n,`${"0".repeat(a)}${i}`]}return[n,`${i}`]});if("hour"in t){const n=$o.map(a=>{if(a==="dayPeriod")return this.states.dayPeriod.updating?[a,this.states.dayPeriod.updating]:[a,this.formatter.dayPeriod(Wt(t))];if(a==="hour"){if(this.states.hour.updating)return[a,this.states.hour.updating];if(t[a]!==void 0&&t[a]<10)return[a,`0${t[a]}`];if(t[a]===0&&this.dayPeriodNode)return[a,"12"]}else if(a==="minute"){if(this.states.minute.updating)return[a,this.states.minute.updating];if(t[a]!==void 0&&t[a]<10)return[a,`0${t[a]}`]}else if(a==="second"){if(this.states.second.updating)return[a,this.states.second.updating];if(t[a]!==void 0&&t[a]<10)return[a,`0${t[a]}`]}return[a,`${t[a]}`]}),i=[...r,...n];this.segmentValues=Object.fromEntries(i),this.#l();return}this.segmentValues=Object.fromEntries(r)}#u=P(()=>{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){F(this.#u,t)}#c=P(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return d(this.#c)}set isInvalid(t){F(this.#c,t)}#d=P(()=>{const t=this.granularity.current;return t||mD(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return d(this.#d)}set inferredGranularity(t){F(this.#d,t)}#h=P(()=>this.value.current!==void 0?this.value.current:this.placeholder.current);get dateRef(){return d(this.#h)}set dateRef(t){F(this.#h,t)}#p=P(()=>uD({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){F(this.#p,t)}#f=P(()=>this.allSegmentContent.arr);get segmentContents(){return d(this.#f)}set segmentContents(t){F(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,a=this.readonlySegmentsSet;if(n||i||a.has(t))return;const s=this.segmentValues;let o=s;const l=this.placeholder.current;if(pD(s)){const c=s[t],f=r;if(t==="month"){const u=f(c);if(this.states.month.updating=u,u!==null&&s.day!==null){const p=ts(Wt(l.set({month:Number.parseInt(u)})));Number.parseInt(s.day)>p&&(s.day=`${p}`)}o={...s,[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&&(s.hour=`${h-12}`):u==="PM"&&h<12&&(s.hour=`${h+12}`)}o={...s,[t]:u}}else if(t==="hour"){const u=f(c);if(this.states.hour.updating=u,u!==null&&s.dayPeriod!==null){const p=this.formatter.dayPeriod(Wt(l.set({hour:Number.parseInt(u)})),this.hourCycle.current);(p==="AM"||p==="PM")&&(s.dayPeriod=p)}o={...s,[t]:u}}else if(t==="minute"){const u=f(c);this.states.minute.updating=u,o={...s,[t]:u}}else if(t==="second"){const u=f(c);this.states.second.updating=u,o={...s,[t]:u}}else if(t==="year"){const u=f(c);this.states.year.updating=u,o={...s,[t]:u}}else if(t==="day"){const u=f(c);this.states.day.updating=u,o={...s,[t]:u}}else{const u=f(c);o={...s,[t]:u}}}else if(Fo(t)){const c=s[t],f=r,u=f(c);if(t==="month"&&u!==null&&s.day!==null){this.states.month.updating=u;const p=ts(Wt(l.set({month:Number.parseInt(u)})));Number.parseInt(s.day)>p&&(s.day=`${p}`),o={...s,[t]:u}}else if(t==="year"){const p=f(c);this.states.year.updating=p,o={...s,[t]:p}}else if(t==="day"){const p=f(c);this.states.day.updating=p,o={...s,[t]:p}}else o={...s,[t]:u}}this.segmentValues=o,hD(o,d(this.#r))?this.setValue(fD({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}`,[Zo.segment]:""};if(t==="literal")return i;const a=this.descriptionNode?.id,s=vD(r,d(this.#r))&&a,o=this.errorMessageId?.current,l=s?`${a} ${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}}},MP=class zy{static create(t){return new zy(t,zn.get())}opts;root;domContext;attachment;constructor(t,r){this.opts=t,this.root=r,this.domContext=new Vi(t.ref),this.root.domContext=this.domContext,this.attachment=tt(t.ref,n=>this.root.setFieldNode(n)),at(()=>this.opts.name.current,n=>{this.root.setName(n)})}#e=P(()=>{if(ln&&this.domContext.getElementById(this.root.descriptionId))return this.root.descriptionId});#t=P(()=>({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),[Zo.input]:"",...this.attachment}));get props(){return d(this.#t)}set props(t){F(this.#t,t)}},$P=class qy{static create(){return new qy(zn.get())}root;#e=P(()=>this.root.name!=="");get shouldRender(){return d(this.#e)}set shouldRender(t){F(this.#e,t)}#t=P(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return d(this.#t)}set isoValue(t){F(this.#t,t)}constructor(t){this.root=t}#r=P(()=>({name:this.root.name,value:this.isoValue,required:this.root.required.current}));get props(){return d(this.#r)}set props(t){F(this.#r,t)}},FP=class Uy{static create(t){return new Uy(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=tt(t.ref,n=>this.root.setLabelNode(n))}onclick(t){if(this.root.disabled.current)return;const r=wD(this.root.getFieldNode());r&&r.focus()}#e=P(()=>({id:this.opts.id.current,"data-invalid":Ve(this.root.isInvalid),"data-disabled":Ve(this.root.disabled.current),[Zo.label]:"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#e)}set props(t){F(this.#e,t)}},Ki=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=tt(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.#a(t);return}if(wo(e.key)){this.#s(e);return}if(Lc(e.key)){this.#o(e);return}is(e.key)&&ns(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)})}#a(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=Number.parseInt(e.key);let r=!1;const n=this.#e(),i=Math.floor(n/10),a=t===0,s=this.part;this.root.updateSegment(this.part,o=>{if(s in this.root.states&&this.root.states[s].hasLeftFocus&&(o=null,this.root.states[s].hasLeftFocus=!1),o===null)return a?(s in this.root.states&&(this.root.states[s].lastKeyZero=!0),this.announcer.announce("0"),"0"):(s in this.root.states&&(this.root.states[s].lastKeyZero||t>i)&&(r=!0),s in this.root.states&&(this.root.states[s].lastKeyZero=!1),r&&String(t).length===1?(this.announcer.announce(t),`0${t}`):`${t}`);if(s in this.root.states&&this.root.states[s].lastKeyZero)return t!==0?(r=!0,this.root.states[s].lastKeyZero=!1,`0${t}`):this.part==="hour"&&t===0&&this.root.hourCycle.current===24?(r=!0,this.root.states[s].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&t===0?(r=!0,this.root.states[s].lastKeyZero=!1,"00"):o;const l=Number.parseInt(o+t.toString());return l>n?(r=!0,`0${t}`):(r=!0,`${l}`)}),r&&Sv(e,this.root.getFieldNode())}#o(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 a=Number.parseInt(i.slice(0,-1));return this.announcer.announce(this.#r(a)),`${a}`}),r&&Ev(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],a=this.#t(),s=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":a,"aria-valuemax":s,"aria-valuenow":i,"aria-valuetext":o}}#l=P(()=>({...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){F(this.#l,e)}},NP=class extends Ki{#e=[];#t=0;constructor(e,t){super(e,t,"year",Gi.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(wo(e.key)){this.#i(e);return}if(Lc(e.key)){this.#a(e);return}is(e.key)&&ns(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(),a=Number.parseInt(i);if(String(a).length<4)return this.#t>0&&this.#e.length<=this.#t&&i.length<=4?(this.announcer.announce(a),i):(this.announcer.announce(a),dg(a));this.announcer.announce(a),t=!0;const s=`${a}`;return s.length>4?s.slice(0,4):s}),(this.#e.length===4||this.#e.length===this.#t)&&(t=!0),t&&Sv(e,this.root.getFieldNode())}#a(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&&Ev(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?dg(Number.parseInt(t)):t)}},RP=class extends Ki{constructor(e,t){super(e,t,"day",Gi.day)}},LP=class extends Ki{constructor(e,t){super(e,t,"month",Gi.month)}},zP=class extends Ki{constructor(e,t){super(e,t,"hour",Gi.hour)}onkeydown(e){if(wo(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)}},qP=class extends Ki{constructor(e,t){super(e,t,"minute",Gi.minute)}},UP=class extends Ki{constructor(e,t){super(e,t,"second",Gi.second)}},BP=class By{static create(t){return new By(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=tt(t.ref,n=>this.root.dayPeriodNode=n)}onkeydown(t){if(!(t.ctrlKey||t.metaKey||this.root.disabled.current)&&(t.key!=="Tab"&&t.preventDefault(),!!WP(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}),is(t.key)&&ns(t,this.root.getFieldNode())}}#t=P(()=>{const t=this.root.segmentValues;if(!("dayPeriod"in t))return;const r=0,n=12,i=t.dayPeriod==="AM"?0:12,a=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":a,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){F(this.#t,t)}},VP=class Vy{static create(t){return new Vy(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(t.ref)}#e=P(()=>({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){F(this.#e,t)}},jP=class jy{static create(t){return new jy(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=tt(t.ref)}onkeydown(t){t.key!=="Tab"&&t.preventDefault(),!this.root.disabled.current&&is(t.key)&&ns(t,this.root.getFieldNode())}#e=P(()=>({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){F(this.#e,t)}},ZP=class{static create(e,t){const r=zn.get();switch(e){case"day":return new RP(t,r);case"month":return new LP(t,r);case"year":return new NP(t,r);case"hour":return new zP(t,r);case"minute":return new qP(t,r);case"second":return new UP(t,r);case"dayPeriod":return new BP(t,r);case"literal":return new VP(t,r);case"timeZoneName":return new jP(t,r)}}};function WP(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===eO}function dg(e){const t=4-String(e).length;return`${"0".repeat(t)}${e}`}function fg(e,t){te(t,!1);const r=$P.create();Jl();var n=ie(),i=B(n),a=s=>{$v(s,An(()=>r.props))};ue(i,s=>{r.shouldRender&&s(a)}),x(e,n),re()}ne(fg,{},[],[],{mode:"open"});var HP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]),GP=q("<div><!></div>"),KP=q("<!> <!>",1);function hg(e,t){const r=vt();te(t,!0);let n=_(t,"id",23,()=>$e(r)),i=_(t,"ref",15,null),a=_(t,"name",7,""),s=_(t,"children",7),o=_(t,"child",7),l=He(t,HP);const c=MP.create({id:z(()=>n()),ref:z(()=>i(),m=>i(m)),name:z(()=>a())}),f=P(()=>Ye(l,c.props));var u={get id(){return n()},set id(m=$e(r)){n(m),b()},get ref(){return i()},set ref(m=null){i(m),b()},get name(){return a()},set name(m=""){a(m),b()},get children(){return s()},set children(m){s(m),b()},get child(){return o()},set child(m){o(m),b()}},p=KP(),h=B(p),y=m=>{var g=ie(),E=B(g);Se(E,o,()=>({props:d(f),segments:c.root.segmentContents})),x(m,g)},v=m=>{var g=GP();Ue(g,()=>({...d(f)}));var E=D(g);Se(E,()=>s()??qe,()=>({segments:c.root.segmentContents})),C(g),x(m,g)};return ue(h,m=>{o()?m(y):m(v,-1)}),fg(V(h,2),{}),x(e,p),re(u)}ne(hg,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var YP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]),JP=q("<div><!></div>");function pg(e,t){const r=vt();te(t,!0);let n=_(t,"id",23,()=>$e(r)),i=_(t,"ref",15,null),a=_(t,"children",7),s=_(t,"child",7),o=He(t,YP);const l=FP.create({id:z(()=>n()),ref:z(()=>i(),v=>i(v))}),c=P(()=>Ye(o,l.props));var f={get id(){return n()},set id(v=$e(r)){n(v),b()},get ref(){return i()},set ref(v=null){i(v),b()},get children(){return a()},set children(v){a(v),b()},get child(){return s()},set child(v){s(v),b()}},u=ie(),p=B(u),h=v=>{var m=ie(),g=B(m);Se(g,s,()=>({props:d(c)})),x(v,m)},y=v=>{var m=JP();Ue(m,()=>({...d(c)}));var g=D(m);Se(g,()=>a()??qe),C(m),x(v,m)};return ue(p,v=>{s()?v(h):v(y,-1)}),x(e,u),re(f)}ne(pg,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var QP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]),XP=q("<span><!></span>");function mg(e,t){const r=vt();te(t,!0);let n=_(t,"id",23,()=>$e(r)),i=_(t,"ref",15,null),a=_(t,"children",7),s=_(t,"child",7),o=_(t,"part",7),l=He(t,QP);const c=ZP.create(o(),{id:z(()=>n()),ref:z(()=>i(),m=>i(m))}),f=P(()=>Ye(l,c.props));var u={get id(){return n()},set id(m=$e(r)){n(m),b()},get ref(){return i()},set ref(m=null){i(m),b()},get children(){return a()},set children(m){a(m),b()},get child(){return s()},set child(m){s(m),b()},get part(){return o()},set part(m){o(m),b()}},p=ie(),h=B(p),y=m=>{var g=ie(),E=B(g);Se(E,s,()=>({props:d(f)})),x(m,g)},v=m=>{var g=XP();Ue(g,()=>({...d(f)}));var E=D(g);Se(E,()=>a()??qe),C(g),x(m,g)};return ue(h,m=>{s()?m(y):m(v,-1)}),x(e,p),re(u)}ne(mg,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});var vg=new Ft("DatePicker.Root"),eM=class Zy{static create(t){return vg.set(new Zy(t))}opts;constructor(t){this.opts=t}};function zc(e,t){const[r,n]=e;let i=!1;const a=t.length;for(let s=0,o=a-1;s<a;o=s++){const[l,c]=t[s]??[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 gg(e,t){const r=e.left+e.width/2,n=e.top+e.height/2,i=t.left+t.width/2,a=t.top+t.height/2,s=i-r,o=a-n;return Math.abs(s)>Math.abs(o)?s>0?"right":"left":o>0?"bottom":"top"}var tM=class{#e;#t;#r;#n=null;#i=null;#a=[];#s=null;#o=null;#l=null;#u(){this.#o!==null&&(cancelAnimationFrame(this.#o),this.#o=null)}#c(){this.#u(),this.#o=requestAnimationFrame(()=>{this.#o=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,at([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#s=null,this.#f();return}this.#s&&this.#s!==r&&this.#f(),this.#s=r;const a=bo(r),s=u=>{this.#p([u.clientX,u.clientY],r,n)},o=u=>{const p=u.relatedTarget;if(ai(p)&&n.contains(p))return;const h=this.#e.ignoredTargets?.()??[];ai(p)&&h.some(y=>y===p||y.contains(p))||(this.#a=ai(p)&&h.length>0?h.filter(y=>p.contains(y)):[],this.#n=[u.clientX,u.clientY],this.#i="content",this.#c())},l=()=>{this.#f()},c=()=>{this.#f()},f=u=>{const p=u.relatedTarget;ai(p)&&r.contains(p)||(this.#n=[u.clientX,u.clientY],this.#i="trigger",this.#c())};return[bt(a,"pointermove",s),bt(r,"pointerleave",o),bt(r,"pointerenter",l),bt(n,"pointerenter",c),bt(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.#a.length>0)for(const l of this.#a){const c=l.getBoundingClientRect();if(qc(e,c))return;const f=gg(n,c),u=this.#m(n,c,f);if(u&&zc(e,u))return}const a=gg(n,i),s=this.#m(n,i,a);if(s&&zc(e,s))return;const o=this.#i==="content"?i:n;zc(e,this.#v(this.#n,o,a,this.#i))||(this.#f(),this.#e.onPointerExit())}#f(){this.#n=null,this.#i=null,this.#a=[],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,[a,s]=e;switch(n==="trigger"?this.#y(r):r){case"top":return[[a-i,s+i],[a+i,s+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case"bottom":return[[a-i,s-i],[a+i,s-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case"left":return[[a+i,s-i],[a+i,s+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case"right":return[[a-i,s-i],[a-i,s+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=_o({component:"popover",parts:["root","trigger","content","close","overlay"]}),Bc=new Ft("Popover.Root"),rM=class Wy{static create(t){return Bc.set(new Wy(t))}opts;#e=se(null);get contentNode(){return d(this.#e)}set contentNode(t){F(this.#e,t,!0)}contentPresence;#t=se(null);get triggerNode(){return d(this.#t)}set triggerNode(t){F(this.#t,t,!0)}#r=se(null);get overlayNode(){return d(this.#r)}set overlayNode(t){F(this.#r,t,!0)}overlayPresence;#n=se(!1);get openedViaHover(){return d(this.#n)}set openedViaHover(t){F(this.#n,t,!0)}#i=se(!1);get hasInteractedWithContent(){return d(this.#i)}set hasInteractedWithContent(t){F(this.#i,t,!0)}#a=se(!1);get hoverCooldown(){return d(this.#a)}set hoverCooldown(t){F(this.#a,t,!0)}#s=se(0);get closeDelay(){return d(this.#s)}set closeDelay(t){F(this.#s,t,!0)}#o=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new Vm({ref:z(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new Vm({ref:z(()=>this.overlayNode),open:this.opts.open}),at(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#u())})}setDomContext(t){this.#l=t}#u(){this.#o!==null&&this.#l&&(this.#l.clearTimeout(this.#o),this.#o=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.#o=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#o=null},this.closeDelay))))}cancelDelayedClose(){this.#u()}markInteraction(){this.hasInteractedWithContent=!0,this.#u()}},nM=class Hy{static create(t){return new Hy(t,Bc.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=se(!1);constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new Vi(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),at(()=>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)}#a(){this.#n(),this.#i()}onpointerenter(t){if(this.opts.disabled.current||!this.opts.openOnHover.current||ko(t)||(F(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&&(ko(t)||(F(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#a(),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.#a(),this.root.toggleOpen())}#s(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=P(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Tr(this.root.opts.open.current),"data-state":zm(this.root.opts.open.current),"aria-controls":this.#s(),[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.#o)}set props(t){F(this.#o,t)}},iM=class Gy{static create(t){return new Gy(t,Bc.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=tt(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 tM({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;ai(r)&&AO(r)&&this.root.markInteraction()}onpointerenter(t){ko(t)||this.root.cancelDelayedClose()}onpointerleave(t){ko(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!ai(t.target))return;const r=t.target.closest(Uc.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(ai(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=P(()=>({open:this.root.opts.open.current}));get snippetProps(){return d(this.#e)}set snippetProps(t){F(this.#e,t)}#t=P(()=>({id:this.opts.id.current,tabindex:-1,"data-state":zm(this.root.opts.open.current),...QC(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){F(this.#t,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}};function yg(e,t){te(t,!0);let r=_(t,"open",15,!1),n=_(t,"onOpenChange",7,xe),i=_(t,"onOpenChangeComplete",7,xe),a=_(t,"value",15),s=_(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),y=_(t,"disabled",7,!1),v=_(t,"readonly",7,!1),m=_(t,"granularity",7),g=_(t,"readonlySegments",23,()=>[]),E=_(t,"hourCycle",7),S=_(t,"locale",7),T=_(t,"hideTimeZone",7,!1),A=_(t,"required",7,!1),I=_(t,"calendarLabel",7,"Event"),M=_(t,"disableDaysOutsideMonth",7,!0),N=_(t,"preventDeselect",7,!1),j=_(t,"pagedNavigation",7,!1),R=_(t,"weekStartsOn",7),X=_(t,"weekdayFormat",7,"narrow"),U=_(t,"isDateDisabled",7,()=>!1),le=_(t,"fixedWeeks",7,!1),he=_(t,"numberOfMonths",7,1),H=_(t,"closeOnDateSelect",7,!0),oe=_(t,"initialFocus",7,!1),W=_(t,"errorMessageId",7),fe=_(t,"children",7),ce=_(t,"monthFormat",7,"long"),de=_(t,"yearFormat",7,"numeric");const J=fv({granularity:m(),defaultValue:a(),minValue:p(),maxValue:h()});function ee(){o()===void 0&&o(J)}ee(),at.pre(()=>o(),()=>{ee()});function $(){H()&&r(!1)}const ae=eM.create({open:z(()=>r(),w=>{r(w),n()(w)}),value:z(()=>a(),w=>{a(w),s()(w)}),placeholder:z(()=>o(),w=>{o(w),l()(w)}),isDateUnavailable:z(()=>c()),minValue:z(()=>p()),maxValue:z(()=>h()),disabled:z(()=>y()),readonly:z(()=>v()),granularity:z(()=>m()),readonlySegments:z(()=>g()),hourCycle:z(()=>E()),locale:Zm(()=>S()),hideTimeZone:z(()=>T()),required:z(()=>A()),calendarLabel:z(()=>I()),disableDaysOutsideMonth:z(()=>M()),preventDeselect:z(()=>N()),pagedNavigation:z(()=>j()),weekStartsOn:z(()=>R()),weekdayFormat:z(()=>X()),isDateDisabled:z(()=>U()),fixedWeeks:z(()=>le()),numberOfMonths:z(()=>he()),initialFocus:z(()=>oe()),onDateSelect:z(()=>$),defaultPlaceholder:J,monthFormat:z(()=>ce()),yearFormat:z(()=>de())});rM.create({open:ae.opts.open,onOpenChangeComplete:z(()=>i())}),PP.create({value:ae.opts.value,disabled:ae.opts.disabled,readonly:ae.opts.readonly,readonlySegments:ae.opts.readonlySegments,validate:z(()=>f()),onInvalid:z(()=>u()),minValue:ae.opts.minValue,maxValue:ae.opts.maxValue,granularity:ae.opts.granularity,hideTimeZone:ae.opts.hideTimeZone,hourCycle:ae.opts.hourCycle,locale:ae.opts.locale,required:ae.opts.required,placeholder:ae.opts.placeholder,errorMessageId:z(()=>W()),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 a()},set value(w){a(w),b()},get onValueChange(){return s()},set onValueChange(w=xe){s(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 y()},set disabled(w=!1){y(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 g()},set readonlySegments(w=[]){g(w),b()},get hourCycle(){return E()},set hourCycle(w){E(w),b()},get locale(){return S()},set locale(w){S(w),b()},get hideTimeZone(){return T()},set hideTimeZone(w=!1){T(w),b()},get required(){return A()},set required(w=!1){A(w),b()},get calendarLabel(){return I()},set calendarLabel(w="Event"){I(w),b()},get disableDaysOutsideMonth(){return M()},set disableDaysOutsideMonth(w=!0){M(w),b()},get preventDeselect(){return N()},set preventDeselect(w=!1){N(w),b()},get pagedNavigation(){return j()},set pagedNavigation(w=!1){j(w),b()},get weekStartsOn(){return R()},set weekStartsOn(w){R(w),b()},get weekdayFormat(){return X()},set weekdayFormat(w="narrow"){X(w),b()},get isDateDisabled(){return U()},set isDateDisabled(w=()=>!1){U(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 H()},set closeOnDateSelect(w=!0){H(w),b()},get initialFocus(){return oe()},set initialFocus(w=!1){oe(w),b()},get errorMessageId(){return W()},set errorMessageId(w){W(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=ie(),G=B(be);return Fe(G,()=>ig,(w,_e)=>{_e(w,{children:(we,De)=>{var Le=ie(),je=B(Le);Se(je,()=>fe()??qe),x(we,Le)},$$slots:{default:!0}})}),x(e,be),re(L)}ne(yg,{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 aM=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]),sM=q("<div><!></div>");function bg(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"id",23,()=>$e(r)),s=_(t,"ref",15,null),o=He(t,aM);const l=vg.get(),c=Dv.create({id:z(()=>a()),ref:z(()=>s(),m=>s(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=P(()=>Ye(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 a()},set id(m=$e(r)){a(m),b()},get ref(){return s()},set ref(m=null){s(m),b()}},p=ie(),h=B(p),y=m=>{var g=ie(),E=B(g);{let S=P(()=>({props:d(f),...c.snippetProps}));Se(E,i,()=>d(S))}x(m,g)},v=m=>{var g=sM();Ue(g,()=>({...d(f)}));var E=D(g);Se(E,()=>n()??qe,()=>c.snippetProps),C(g),x(m,g)};return ue(h,m=>{i()?m(y):m(v,-1)}),x(e,p),re(u)}ne(bg,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var oM=new Set(["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]),_g=q("<div><div><!></div></div>");function wg(e,t){const r=vt();te(t,!0);let n=_(t,"child",7),i=_(t,"children",7),a=_(t,"ref",15,null),s=_(t,"id",23,()=>$e(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),y=_(t,"customAnchor",7,null),v=_(t,"style",7),m=He(t,oM);const g=iM.create({id:z(()=>s()),ref:z(()=>a(),R=>a(R)),onInteractOutside:z(()=>u()),onEscapeKeydown:z(()=>f()),customAnchor:z(()=>y())}),E=P(()=>Ye(m,g.props)),S=P(()=>p()&&g.shouldTrapFocus);function T(R){g.shouldTrapFocus||R.preventDefault(),l()(R)}var A={get child(){return n()},set child(R){n(R),b()},get children(){return i()},set children(R){i(R),b()},get ref(){return a()},set ref(R=null){a(R),b()},get id(){return s()},set id(R=$e(r)){s(R),b()},get forceMount(){return o()},set forceMount(R=!1){o(R),b()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(R=xe){l(R),b()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(R=xe){c(R),b()},get onEscapeKeydown(){return f()},set onEscapeKeydown(R=xe){f(R),b()},get onInteractOutside(){return u()},set onInteractOutside(R=xe){u(R),b()},get trapFocus(){return p()},set trapFocus(R=!0){p(R),b()},get preventScroll(){return h()},set preventScroll(R=!1){h(R),b()},get customAnchor(){return y()},set customAnchor(R=null){y(R),b()},get style(){return v()},set style(R){v(R),b()}},I=ie(),M=B(I),N=R=>{cg(R,An(()=>d(E),()=>g.popperProps,{get ref(){return g.opts.ref},get enabled(){return g.root.opts.open.current},get id(){return s()},get trapFocus(){return d(S)},get preventScroll(){return h()},loop:!0,forceMount:!0,get customAnchor(){return y()},onOpenAutoFocus:T,get onCloseAutoFocus(){return c()},get shouldRender(){return g.shouldRender},popper:(U,le)=>{let he=()=>le?.().props,H=()=>le?.().wrapperProps;const oe=P(()=>Ye(he(),{style:rg("popover")},{style:v()}));var W=ie(),fe=B(W),ce=J=>{var ee=ie(),$=B(ee);{let ae=P(()=>({props:d(oe),wrapperProps:H(),...g.snippetProps}));Se($,n,()=>d(ae))}x(J,ee)},de=J=>{var ee=_g();Ue(ee,()=>({...H()}));var $=D(ee);Ue($,()=>({...d(oe)}));var ae=D($);Se(ae,()=>i()??qe),C($),C(ee),x(J,ee)};ue(fe,J=>{n()?J(ce):J(de,-1)}),x(U,W)},$$slots:{popper:!0}}))},j=R=>{ug(R,An(()=>d(E),()=>g.popperProps,{get ref(){return g.opts.ref},get open(){return g.root.opts.open.current},get id(){return s()},get trapFocus(){return d(S)},get preventScroll(){return h()},loop:!0,forceMount:!1,get customAnchor(){return y()},onOpenAutoFocus:T,get onCloseAutoFocus(){return c()},get shouldRender(){return g.shouldRender},popper:(U,le)=>{let he=()=>le?.().props,H=()=>le?.().wrapperProps;const oe=P(()=>Ye(he(),{style:rg("popover")},{style:v()}));var W=ie(),fe=B(W),ce=J=>{var ee=ie(),$=B(ee);{let ae=P(()=>({props:d(oe),wrapperProps:H(),...g.snippetProps}));Se($,n,()=>d(ae))}x(J,ee)},de=J=>{var ee=_g();Ue(ee,()=>({...H()}));var $=D(ee);Ue($,()=>({...d(oe)}));var ae=D($);Se(ae,()=>i()??qe),C($),C(ee),x(J,ee)};ue(fe,J=>{n()?J(ce):J(de,-1)}),x(U,W)},$$slots:{popper:!0}}))};return ue(M,R=>{o()?R(N):o()||R(j,1)}),x(e,I),re(A)}ne(wg,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:"open"});var lM=new Set(["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);function kg(e,t){te(t,!0);let r=_(t,"ref",15,null),n=_(t,"onOpenAutoFocus",7),i=He(t,lM);const a=P(()=>Ye({onOpenAutoFocus:n()},{onOpenAutoFocus:ND}));var s={get ref(){return r()},set ref(o=null){r(o),b()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(o){n(o),b()}};return wg(e,An(()=>d(a),()=>i,{get ref(){return r()},set ref(o){r(o)}})),re(s)}ne(kg,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var uM=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),cM=q("<button><!></button>");function Sg(e,t){const r=vt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),a=_(t,"id",23,()=>$e(r)),s=_(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,uM);const h=nM.create({id:z(()=>a()),ref:z(()=>s(),m=>s(m)),disabled:z(()=>!!l()),openOnHover:z(()=>c()),openDelay:z(()=>f()),closeDelay:z(()=>u())}),y=P(()=>Ye(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 a()},set id(m=$e(r)){a(m),b()},get ref(){return s()},set ref(m=null){s(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 ag(e,{get id(){return a()},get ref(){return h.opts.ref},children:(m,g)=>{var E=ie(),S=B(E),T=I=>{var M=ie(),N=B(M);Se(N,i,()=>({props:d(y)})),x(I,M)},A=I=>{var M=cM();Ue(M,()=>({...d(y)}));var N=D(M);Se(N,()=>n()??qe),C(M),x(I,M)};ue(S,I=>{i()?I(T):I(A,-1)}),x(m,E)},$$slots:{default:!0}}),re(v)}ne(Sg,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});var dM=new Set(["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function Eg(e,t){te(t,!0);let r=_(t,"ref",15,null),n=_(t,"onkeydown",7),i=He(t,dM);function a(l){if(is(l.key)){const c=l.currentTarget.closest(Zo.selector("input"));if(!c)return;ns(l,c)}}const s=P(()=>Ye({onkeydown:n()},{onkeydown:a}));var o={get ref(){return r()},set ref(l=null){r(l),b()},get onkeydown(){return n()},set onkeydown(l){n(l),b()}};return Sg(e,An(()=>i,{"data-segment":"trigger"},()=>d(s),{get ref(){return r()},set ref(l){r(l)}})),re(o)}ne(Eg,{ref:{},onkeydown:{}},[],[],{mode:"open"});var Vc=q("<!> <!>",1),xg=q("<!> <!> <!>",1);function Tg(e,t){te(t,!0);let r=_(t,"dateString",15),n=_(t,"labelClass",7),i=_(t,"inputClass",7),a=_(t,"labelText",7),s=se(Pe(Pi(er())));const o="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);ve(()=>{r(d(s).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 a()},set labelText(u){a(u),b()}},c=ie(),f=B(c);{let u=P(()=>k.locale||"de");Fe(f,()=>yg,(p,h)=>{h(p,{get locale(){return d(u)},weekStartsOn:1,isDateDisabled:y=>y.compare(Pi(er()))<0,get value(){return d(s)},set value(y){F(s,y,!0)},children:(y,v)=>{var m=xg(),g=B(m);Fe(g,()=>pg,(T,A)=>{A(T,{get id(){return o},get class(){return`go-datepicker-label ${n()??""}`},children:(I,M)=>{var N=ie(),j=B(N),R=X=>{var U=ie(),le=B(U);Se(le,a),x(X,U)};ue(j,X=>{a()&&X(R)}),x(I,N)},$$slots:{default:!0}})});var E=V(g,2);{const T=(A,I)=>{let M=()=>I?.().segments;var N=Vc(),j=B(N);Me(j,17,M,an,(X,U)=>{let le=()=>d(U).part,he=()=>d(U).value;var H=ie(),oe=B(H);Fe(oe,()=>mg,(W,fe)=>{fe(W,{get part(){return le()},children:(ce,de)=>{gt();var J=Vt();Y(()=>Z(J,he())),x(ce,J)},$$slots:{default:!0}})}),x(X,H)});var R=V(j,2);Fe(R,()=>Eg,(X,U)=>{U(X,{get"aria-labelledby"(){return o},class:"go-calendar-button"})}),x(A,N)};Fe(E,()=>hg,(A,I)=>{I(A,{get class(){return`go-datepicker-input ${i()??""}`},children:T,$$slots:{default:!0}})})}var S=V(E,2);Fe(S,()=>kg,(T,A)=>{A(T,{children:(I,M)=>{var N=ie(),j=B(N);{const R=(X,U)=>{let le=()=>U?.().months,he=()=>U?.().weekdays;var H=Vc(),oe=B(H);Fe(oe,()=>gc,(fe,ce)=>{ce(fe,{children:(de,J)=>{var ee=xg(),$=B(ee);Fe($,()=>_c,(be,G)=>{G(be,{class:"go-datepicker-previous"})});var ae=V($,2);Fe(ae,()=>yc,(be,G)=>{G(be,{class:"go-datepicker-selected-month"})});var L=V(ae,2);Fe(L,()=>bc,(be,G)=>{G(be,{class:"go-datepicker-next"})}),x(de,ee)},$$slots:{default:!0}})});var W=V(oe,2);Me(W,16,le,fe=>fe,(fe,ce)=>{var de=ie(),J=B(de);Fe(J,()=>fc,(ee,$)=>{$(ee,{children:(ae,L)=>{var be=Vc(),G=B(be);Fe(G,()=>mc,(_e,we)=>{we(_e,{children:(De,Le)=>{var je=ie(),_t=B(je);Fe(_t,()=>ss,(ot,Nt)=>{Nt(ot,{children:(wt,Rt)=>{var ir=ie(),Gt=B(ir);Me(Gt,17,he,an,(gr,Pr)=>{var Mr=ie(),yn=B(Mr);Fe(yn,()=>vc,($r,yr)=>{yr($r,{children:(Xr,en)=>{gt();var At=Vt();Y(()=>Z(At,d(Pr))),x(Xr,At)},$$slots:{default:!0}})}),x(gr,Mr)}),x(wt,ir)},$$slots:{default:!0}})}),x(De,je)},$$slots:{default:!0}})});var w=V(G,2);Fe(w,()=>hc,(_e,we)=>{we(_e,{children:(De,Le)=>{var je=ie(),_t=B(je);Me(_t,16,()=>ce.weeks,ot=>ot,(ot,Nt)=>{var wt=ie(),Rt=B(wt);Fe(Rt,()=>ss,(ir,Gt)=>{Gt(ir,{children:(gr,Pr)=>{var Mr=ie(),yn=B(Mr);Me(yn,16,()=>Nt,$r=>$r,($r,yr,Xr,en)=>{var At=ie(),Un=B(At);Fe(Un,()=>pc,(na,ia)=>{ia(na,{get date(){return yr},get month(){return ce.value},children:(fs,td)=>{var mi=ie(),aa=B(mi);Fe(aa,()=>dc,(br,Bn)=>{Bn(br,{})}),x(fs,mi)},$$slots:{default:!0}})}),x($r,At)}),x(gr,Mr)},$$slots:{default:!0}})}),x(ot,wt)}),x(De,je)},$$slots:{default:!0}})}),x(ae,be)},$$slots:{default:!0}})}),x(fe,de)}),x(X,H)};Fe(j,()=>bg,(X,U)=>{U(X,{children:R,$$slots:{default:!0}})})}x(I,N)},$$slots:{default:!0}})}),x(y,m)},$$slots:{default:!0}})})}return x(e,c),re(l)}ne(Tg,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var fM=new Set(["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]),hM=q('<span class="go-field-star" aria-hidden="true">*</span>'),pM=q(" <!>",1),mM=q("<label><!></label> <input/>",1),vM=q("<label><!></label> <textarea></textarea>",1),gM=q('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),yM=q("<label><!></label> <input/> <!>",1),bM=q('<label><input/> <span class="go-checkbox-label"><!></span></label>'),_M=q('<img src="" alt=""/> <option> </option>',1),wM=q('<option disabled="" hidden="" selected=""> </option> <!>',1),kM=q("<!>",1),SM=q("<label><!></label> <select><!></select>",1),EM=q('<img style="width: 60px" aria-hidden="true"/>'),xM=q('<span class="go-payment-mode-icons"></span>'),TM=q('<span class="go-payment-mode-name"> </span>'),AM=q('<label><input type="radio"/> <!></label>'),CM=q('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),OM=q("<label> <input/></label>"),DM=q("<fieldset><legend><!></legend> <!></fieldset>");function Ag(e,t){te(t,!0);const r=H=>{gt();var oe=pM(),W=B(oe),fe=V(W),ce=de=>{var J=hM();x(de,J)};ue(fe,de=>{u().required&&de(ce)}),Y(()=>Z(W,`${d(N)??""} `)),x(H,oe)},n=H=>{var oe=mM(),W=B(oe);r(D(W)),C(W);var fe=V(W,2);Ue(fe,()=>({...d(M),...m,class:y(),placeholder:u().placeholder,type:u().type,name:u().key}),void 0,void 0,void 0,void 0,!0),Y(()=>{Et(W,1,dr(h())),pe(W,"for",d(A))}),qs(fe,()=>u().value,ce=>u(u().value=ce,!0)),x(H,oe)},i=H=>{var oe=vM(),W=B(oe);r(D(W)),C(W);var fe=V(W,2);i_(fe),Ue(fe,()=>({...d(M),...m,class:y(),placeholder:u().placeholder,name:u().key})),Y(()=>{Et(W,1,dr(h())),pe(W,"for",d(A))}),qs(fe,()=>u().value,ce=>u(u().value=ce,!0)),x(H,oe)},a=H=>{var oe=yM(),W=B(oe);r(D(W)),C(W);var fe=V(W,2),ce=ee=>{const $=ee.currentTarget.files;u(u().value=$&&$[0]?$[0]:null,!0),d(E)?d(E).validateField(u()):u().validate()};Ue(fe,()=>({...d(M),...m,class:y(),type:"file",accept:"image/*",name:u().key,onchange:ce}),void 0,void 0,void 0,void 0,!0);var de=V(fe,2),J=ee=>{var $=gM(),ae=D($),L=V(ae,2),be=D(L,!0);C(L),C($),Y(G=>{pe($,"data-field-preview",u().key),pe(ae,"src",d(R)),pe(ae,"alt",G),Z(be,u().value.name)},[()=>k.t("forms.file.preview_alt")||"User uploaded photo"]),x(ee,$)};ue(de,ee=>{d(R)&&u().value instanceof File&&ee(J)}),Y(()=>{Et(W,1,dr(h())),pe(W,"for",d(A))}),x(H,oe)},s=H=>{var oe=bM(),W=D(oe);Ue(W,()=>({...d(M),...m,name:u().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var fe=V(W,2);r(D(fe)),C(fe),C(oe),Y(()=>{Et(oe,1,dr(h())),pe(oe,"for",d(A))}),K_(W,()=>u().value===!0,ce=>{u(u().value=ce,!0)}),x(H,oe)},o=H=>{var oe=SM(),W=B(oe);r(D(W)),C(W);var fe=V(W,2);Ue(fe,()=>({...d(M),...m,name:u().key,class:y()})),H_(fe,()=>{var ce=D(fe),de=kM(),J=B(de),ee=$=>{var ae=wM(),L=B(ae),be=D(L,!0);C(L),L.value=L.__value="";var G=V(L,2);Me(G,17,()=>u().options(),w=>w.value,(w,_e)=>{var we=_M(),De=V(B(we),2),Le=D(De,!0);C(De);var je={};Y(()=>{Z(Le,d(_e).label),je!==(je=d(_e).value)&&(De.value=(De.__value=d(_e).value)??"")}),x(w,we)}),Y(w=>Z(be,w),[()=>k.t("common.choose")]),x($,ae)};ue(J,$=>{u().options&&$(ee)}),x(ce,de)}),Y(()=>{Et(W,1,dr(h())),pe(W,"for",d(A))}),z_(fe,()=>u().value,ce=>u(u().value=ce,!0)),x(H,oe)},l=H=>{Tg(H,{get labelClass(){return h()},get inputClass(){return y()},get labelText(){return r},get dateString(){return u().value},set dateString(oe){u(u().value=oe,!0)}})},c=H=>{const oe=P(()=>k.payment_modes?Object.values(k.payment_modes):[]);var W=CM(),fe=D(W);r(D(fe)),C(fe);var ce=V(fe,2);Me(ce,17,()=>d(oe),de=>de.id,(de,J)=>{var ee=AM(),$=D(ee);Ai($);var ae=V($,2),L=G=>{var w=xM();Me(w,20,()=>d(J).icons,_e=>_e,(_e,we)=>{const De=P(()=>j+we+".svg");var Le=EM();Y(()=>{Et(Le,1,dr(we)),pe(Le,"src",d(De)),pe(Le,"alt",we+" icon")}),x(_e,Le)}),C(w),x(G,w)},be=G=>{var w=TM(),_e=D(w,!0);C(w),Y(()=>Z(_e,d(J).name)),x(G,w)};ue(ae,G=>{d(J).icons.length>0?G(L):G(be,-1)}),C(ee),Y((G,w,_e)=>{pe($,"name",u().key),Bl($,G),Pf($,w),pe($,"hidden",d(oe).length===1),pe($,"aria-label",_e)},[()=>String(d(J).id),()=>u().value===String(d(J).id),()=>k.t(`cart.paymentMode.ariaLabel.${d(J).name.toLowerCase()}`)]),ut("change",$,()=>{u(u().value=String(d(J).id),!0)}),x(de,ee)}),C(W),Y(()=>{pe(W,"aria-required",u().required),pe(W,"aria-invalid",u().errors.length>0)}),x(H,W)},f=H=>{var oe=DM(),W=D(oe);r(D(W)),C(W);var fe=V(W,2),ce=de=>{var J=ie(),ee=B(J);Me(ee,17,()=>u().options(),$=>$.value,($,ae)=>{var L=OM(),be=D(L),G=V(be);Ue(G,()=>({...d(M),...m,class:y(),type:"radio"}),void 0,void 0,void 0,void 0,!0),C(L),Y(()=>{Et(L,1,dr(h())),pe(L,"for",d(A)+d(ae).value),Z(be,`${d(ae).label??""} `)}),qs(G,()=>u().value,w=>u(u().value=w,!0)),x($,L)}),x(de,J)};ue(fe,de=>{u().options&&de(ce)}),C(oe),x(H,oe)};let u=_(t,"field",15),p=_(t,"describedByIds",7),h=_(t,"labelClass",7),y=_(t,"inputClass",7),v=_(t,"host",7),m=He(t,fM);const g=Ri(v()),E=P(()=>g.value),S={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:s,select:o,radio:f,date:l,file:a,textarea:i,paymentMode:c},T=P(()=>S[u().type]);let A=P(()=>t.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function I(){u().type!=="checkbox"&&u().value&&(d(E)?d(E).validateField(u()):u().validate())}const M=P(()=>({id:d(A),"aria-describedby":p(),"aria-required":u().required,"aria-invalid":u().errors.length>0,autocomplete:u().autocomplete,onblur:I}));let N=P(()=>k.t(u().label)||u().label);const j="https://cdn.shop.platform.gomus.de/";ve(()=>{if(u().type!=="paymentMode")return;const H=k.payment_modes?Object.values(k.payment_modes):[];H.length===1&&u().value===""&&u(u().value=String(H[0].id),!0)});let R=se(null);ve(()=>{const H=u().value;if(H instanceof File&&H.type.startsWith("image/")){const oe=URL.createObjectURL(H);return F(R,oe,!0),()=>{URL.revokeObjectURL(oe),F(R,null)}}F(R,null)});var X={get field(){return u()},set field(H){u(H),b()},get describedByIds(){return p()},set describedByIds(H){p(H),b()},get labelClass(){return h()},set labelClass(H){h(H),b()},get inputClass(){return y()},set inputClass(H){y(H),b()},get host(){return v()},set host(H){v(H),b()}},U=ie(),le=B(U),he=H=>{var oe=ie(),W=B(oe);Se(W,()=>d(T)),x(H,oe)};return ue(le,H=>{d(T)&&H(he)}),x(e,U),re(X)}Bt(["change"]),ne(Ag,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var IM=q("<span> </span>"),PM=q("<li> </li>"),MM=q('<ul class="go-field-errors"></ul>'),$M=q("<!> <!> <!>",1);function FM(e,t){te(t,!0);let r=_(t,"key",7),n=_(t,"required",7,!1),i=_(t,"labelClass",7),a=_(t,"inputClass",7),s=se(Pe(Pt.createField(r(),n())));const o=Ri(t.$$host),l=P(()=>o.value),c=()=>d(s);let f=P(()=>d(s)?[...d(s).errors,...d(s).apiErrors].map(M=>k.t(M)):[]),u=P(()=>d(s)?.description),p=P(()=>d(f).length>0),h=P(()=>`go-description-${r()}-${Math.floor(Math.random()*100)}`),y=P(()=>`go-errors-${r()}-${Math.floor(Math.random()*100)}`),v=P(()=>[d(u)&&d(h),d(p)&&d(y)].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(s)&&(d(s).mounted=!0,d(s).value,Re(()=>{d(s)?.errors.length&&d(l).validateField(d(s))}))});var m={getField:c,get key(){return r()},set key(M){r(M),b()},get required(){return n()},set required(M=!1){n(M),b()},get labelClass(){return i()},set labelClass(M){i(M),b()},get inputClass(){return a()},set inputClass(M){a(M),b()}},g=$M(),E=B(g);Ag(E,{get describedByIds(){return d(v)},get labelClass(){return i()},get inputClass(){return a()},host:t.$$host,get field(){return d(s)},set field(M){F(s,M,!0)}});var S=V(E,2),T=M=>{var N=IM(),j=D(N,!0);C(N),Y(()=>{pe(N,"id",d(h)),Z(j,d(s).description)}),x(M,N)};ue(S,M=>{d(u)&&M(T)});var A=V(S,2),I=M=>{var N=MM();Me(N,21,()=>d(f),an,(j,R)=>{var X=PM(),U=D(X,!0);C(X),Y(()=>Z(U,d(R))),x(j,X)}),C(N),Y(()=>pe(N,"id",d(y))),x(M,N)};return ue(A,M=>{d(p)&&M(I)}),x(e,g),re(m)}customElements.define("go-field",ne(FM,{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 NM=q("<go-field></go-field>",2);function RM(e,t){te(t,!0);let r=Ri(t.$$host),n=P(()=>r.value),i=P(()=>d(n)?Pt.getFormFields(d(n)?.formId):[]);var a=ie(),s=B(a);Me(s,17,()=>d(i),o=>o.key,(o,l)=>{var c=NM();Y(()=>Tn(c,"key",d(l).key)),Y(()=>Tn(c,"required",d(l).required)),x(o,c)}),x(e,a),re()}customElements.define("go-all-fields",ne(RM,{},[],[]));var LM=q('<p aria-hidden="true"> </p>'),zM=q("<li> </li>"),qM=q('<ul class="go-error-feedback-api-errors"></ul>'),UM=q('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function BM(e,t){te(t,!0);const r=Ri(t.$$host),n=P(()=>r.value);ve(()=>{d(n)?.form?.addEventListener("go-after-validation",()=>{F(s,Nu(d(n)?.fields),!0)})});let i=se(0);setInterval(()=>{F(i,Nu(d(n)?.fields)||0,!0)},100);let a=P(()=>d(i)+(d(n)?.apiErrors?.length||0)),s=se(-1);ve(()=>{t.$$host.classList.toggle("is-invalid",d(a)>0),t.$$host.classList.toggle("go-feedback",!0),t.$$host.setAttribute("data-num-errors",d(a).toString())});var o=UM(),l=D(o),c=D(l),f=m=>{var g=Vt();Y(E=>Z(g,E),[()=>k.t("forms.errorSummary",{count:d(s)})]),x(m,g)};ue(c,m=>{d(s)>0&&m(f)}),C(l);var u=V(l,2),p=m=>{var g=LM(),E=D(g,!0);C(g),Y(S=>Z(E,S),[()=>k.t("forms.errorSummary",{count:d(i)})]),x(m,g)};ue(u,m=>{d(i)>0&&m(p)});var h=V(u,2),y=m=>{var g=qM();Me(g,21,()=>d(n)?.apiErrors,an,(E,S)=>{var T=zM(),A=D(T,!0);C(T),Y(()=>Z(A,d(S))),x(E,T)}),C(g),x(m,g)},v=P(()=>d(n)&&Xl(d(n).apiErrors)&&d(n).apiErrors.length>0);ue(h,m=>{d(v)&&m(y)}),C(o),x(e,o),re()}customElements.define("go-errors-feedback",ne(BM,{},[],[]));var VM=q('<div class="go-form-feedback"><!></div>');function jM(e,t){var r=VM(),n=D(r);$_(n,t,"default",{},null),C(r),x(e,r)}customElements.define("go-form-feedback",ne(jM,{},["default"],[]));function ZM(e,t){te(t,!0);let r=_(t,"buttonClass",7,"");return En(()=>{Hr(t.$$host,"button",{type:"submit",class:r()})}),re({get buttonClass(){return r()},set buttonClass(n=""){r(n),b()}})}customElements.define("go-submit",ne(ZM,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var WM=q('<div aria-live="assertive"> </div>');function HM(e,t){te(t,!0);const r=Ri(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=WM();let c;var f=D(l,!0);C(l),Y(()=>{c=Et(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":d(n).successMessage}),Z(f,d(n)?.successMessage)}),x(o,l)};ue(a,o=>{d(n)?.successMessage&&o(s)}),x(e,i),re()}customElements.define("go-success-feedback",ne(HM,{},[],[]));var vr="INUMBER",Yi="IOP1",Ji="IOP2",Qi="IOP3",fn="IVAR",di="IVARNAME",Xi="IFUNCALL",Wo="IFUNDEF",Ht="IEXPR",jc="IEXPREVAL",fi="IMEMBER",Ho="IENDSTATEMENT",ea="IARRAY";function Ne(e,t){this.type=e,this.value=t??0}Ne.prototype.toString=function(){switch(this.type){case vr:case Yi:case Ji:case Qi:case fn:case di:case Ho:return this.value;case Xi:return"CALL "+this.value;case Wo:return"DEF "+this.value;case ea:return"ARRAY "+this.value;case fi:return"."+this.value;default:return"Invalid Instruction"}};function Go(e){return new Ne(Yi,e)}function hn(e){return new Ne(Ji,e)}function Cg(e){return new Ne(Qi,e)}function Zc(e,t,r,n,i){for(var a=[],s=[],o,l,c,f,u=0;u<e.length;u++){var p=e[u],h=p.type;if(h===vr||h===di)Array.isArray(p.value)?a.push.apply(a,Zc(p.value.map(function(y){return new Ne(vr,y)}).concat(new Ne(ea,p.value.length)),t,r,n,i)):a.push(p);else if(h===fn&&i.hasOwnProperty(p.value))p=new Ne(vr,i[p.value]),a.push(p);else if(h===Ji&&a.length>1)l=a.pop(),o=a.pop(),f=r[p.value],p=new Ne(vr,f(o.value,l.value)),a.push(p);else if(h===Qi&&a.length>2)c=a.pop(),l=a.pop(),o=a.pop(),p.value==="?"?a.push(o.value?l.value:c.value):(f=n[p.value],p=new Ne(vr,f(o.value,l.value,c.value)),a.push(p));else if(h===Yi&&a.length>0)o=a.pop(),f=t[p.value],p=new Ne(vr,f(o.value)),a.push(p);else if(h===Ht){for(;a.length>0;)s.push(a.shift());s.push(new Ne(Ht,Zc(p.value,t,r,n,i)))}else if(h===fi&&a.length>0)o=a.pop(),a.push(new Ne(vr,o.value[p.value]));else{for(;a.length>0;)s.push(a.shift());s.push(p)}}for(;a.length>0;)s.push(a.shift());return s}function Og(e,t,r){for(var n=[],i=0;i<e.length;i++){var a=e[i],s=a.type;if(s===fn&&a.value===t)for(var o=0;o<r.tokens.length;o++){var l=r.tokens[o],c;l.type===Yi?c=Go(l.value):l.type===Ji?c=hn(l.value):l.type===Qi?c=Cg(l.value):c=new Ne(l.type,l.value),n.push(c)}else s===Ht?n.push(new Ne(Ht,Og(a.value,t,r))):n.push(a)}return n}function hi(e,t,r){var n=[],i,a,s,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===vr||h===di)n.push(p.value);else if(h===Ji)a=n.pop(),i=n.pop(),p.value==="and"?n.push(i?!!hi(a,t,r):!1):p.value==="or"?n.push(i?!0:!!hi(a,t,r)):p.value==="="?(o=t.binaryOps[p.value],n.push(o(i,hi(a,t,r),r))):(o=t.binaryOps[p.value],n.push(o(pn(i,r),pn(a,r))));else if(h===Qi)s=n.pop(),a=n.pop(),i=n.pop(),p.value==="?"?n.push(hi(i?a:s,t,r)):(o=t.ternaryOps[p.value],n.push(o(pn(i,r),pn(a,r),pn(s,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 y=r[p.value];if(y!==void 0)n.push(y);else throw new Error("undefined variable: "+p.value)}else if(h===Yi)i=n.pop(),o=t.unaryOps[p.value],n.push(o(pn(i,r)));else if(h===Xi){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===Wo)n.push((function(){for(var v=n.pop(),m=[],g=p.value;g-- >0;)m.unshift(n.pop());var E=n.pop(),S=function(){for(var T=Object.assign({},r),A=0,I=m.length;A<I;A++)T[m[A]]=arguments[A];return hi(v,t,T)};return Object.defineProperty(S,"name",{value:E,writable:!1}),r[E]=S,S})());else if(h===Ht)n.push(GM(p,t));else if(h===jc)n.push(p);else if(h===fi)i=n.pop(),n.push(i[p.value]);else if(h===Ho)n.pop();else if(h===ea){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 GM(e,t,r){return Wc(e)?e:{type:jc,value:function(n){return hi(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,a,s,o,l,c=0;c<e.length;c++){var f=e[c],u=f.type;if(u===vr)typeof f.value=="number"&&f.value<0?r.push("("+f.value+")"):Array.isArray(f.value)?r.push("["+f.value.map(Dg).join(", ")+"]"):r.push(Dg(f.value));else if(u===Ji)i=r.pop(),n=r.pop(),s=f.value,t?s==="^"?r.push("Math.pow("+n+", "+i+")"):s==="and"?r.push("(!!"+n+" && !!"+i+")"):s==="or"?r.push("(!!"+n+" || !!"+i+")"):s==="||"?r.push("(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }(("+n+"),("+i+")))"):s==="=="?r.push("("+n+" === "+i+")"):s==="!="?r.push("("+n+" !== "+i+")"):s==="["?r.push(n+"[("+i+") | 0]"):r.push("("+n+" "+s+" "+i+")"):s==="["?r.push(n+"["+i+"]"):r.push("("+n+" "+s+" "+i+")");else if(u===Qi)if(a=r.pop(),i=r.pop(),n=r.pop(),s=f.value,s==="?")r.push("("+n+" ? "+i+" : "+a+")");else throw new Error("invalid Expression");else if(u===fn||u===di)r.push(f.value);else if(u===Yi)n=r.pop(),s=f.value,s==="-"||s==="+"?r.push("("+s+n+")"):t?s==="not"?r.push("(!"+n+")"):s==="!"?r.push("fac("+n+")"):r.push(s+"("+n+")"):s==="!"?r.push("("+n+"!)"):r.push("("+s+" "+n+")");else if(u===Xi){for(l=f.value,o=[];l-- >0;)o.unshift(r.pop());s=r.pop(),r.push(s+"("+o.join(", ")+")")}else if(u===Wo){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===ea){for(l=f.value,o=[];l-- >0;)o.unshift(r.pop());r.push("["+o.join(", ")+"]")}else if(u===Ht)r.push("("+Hc(f.value,t)+")");else if(u!==Ho)throw new Error("invalid Expression")}return r.length>1&&(t?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function Dg(e){return typeof e=="string"?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}function ta(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,a=0;a<e.length;a++){var s=e[a];s.type===fn||s.type===di?!n&&!ta(t,s.value)?t.push(s.value):(i!==null&&(ta(t,i)||t.push(i)),i=s.value):s.type===fi&&n&&i!==null?i+="."+s.value:s.type===Ht?Gc(s.value,t,r):i!==null&&(ta(t,i)||t.push(i),i=null)}i!==null&&!ta(t,i)&&t.push(i)}function Ir(e,t){this.tokens=e,this.parser=t,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.functions=t.functions}Ir.prototype.simplify=function(e){return e=e||{},new Ir(Zc(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,e),this.parser)},Ir.prototype.substitute=function(e,t){return t instanceof Ir||(t=this.parser.parse(String(t))),new Ir(Og(this.tokens,e,t),this.parser)},Ir.prototype.evaluate=function(e){return e=e||{},hi(this.tokens,this,e)},Ir.prototype.toString=function(){return Hc(this.tokens,!1)},Ir.prototype.symbols=function(e){e=e||{};var t=[];return Gc(this.tokens,t,e),t},Ir.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)})},Ir.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 us="TEOF",Ke="TOP",Ko="TNUMBER",Ig="TSTRING",mn="TPAREN",ra="TBRACKET",Yo="TCOMMA",Kc="TNAME",Yc="TSEMICOLON";function Pg(e,t,r){this.type=e,this.value=t,this.index=r}Pg.prototype.toString=function(){return this.type+": "+this.value};function st(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}st.prototype.newToken=function(e,t,r){return new Pg(e,t,r??this.pos)},st.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},st.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},st.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(us,"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)+'"')},st.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(Ig,this.unescape(i),t),e=!0;break}n=this.expression.indexOf(r,n+1)}return e},st.prototype.isParen=function(){var e=this.expression.charAt(this.pos);return e==="("||e===")"?(this.current=this.newToken(mn,e),this.pos++,!0):!1},st.prototype.isBracket=function(){var e=this.expression.charAt(this.pos);return(e==="["||e==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(ra,e),this.pos++,!0):!1},st.prototype.isComma=function(){return this.expression.charAt(this.pos)===","?(this.current=this.newToken(Yo,","),this.pos++,!0):!1},st.prototype.isSemicolon=function(){return this.expression.charAt(this.pos)===";"?(this.current=this.newToken(Yc,";"),this.pos++,!0):!1},st.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(Ko,this.consts[n]),this.pos+=n.length,!0}return!1},st.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(Ke,n),this.pos+=n.length,!0}return!1},st.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},st.prototype.isWhitespace=function(){for(var e=!1,t=this.expression.charAt(this.pos);(t===" "||t===" "||t===`
|
|
82
82
|
`||t==="\r")&&(e=!0,this.pos++,!(this.pos>=this.expression.length));)t=this.expression.charAt(this.pos);return e};var KM=/^[0-9a-f]{4}$/i;st.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);KM.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 a=e.indexOf("\\",t);r+=e.substring(t,a<0?e.length:a),t=a}return r},st.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},st.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 a=this.expression.charAt(e);if(r.test(a))e++,n=!0;else break}return n&&(this.current=this.newToken(Ko,parseInt(this.expression.substring(i,e),t)),this.pos=e),n},st.prototype.isNumber=function(){for(var e=!1,t=this.pos,r=t,n=t,i=!1,a=!1,s;t<this.expression.length&&(s=this.expression.charAt(t),s>="0"&&s<="9"||!i&&s===".");)s==="."?i=!0:a=!0,t++,e=a;if(e&&(n=t),s==="e"||s==="E"){t++;for(var o=!0,l=!1;t<this.expression.length;){if(s=this.expression.charAt(t),o&&(s==="+"||s==="-"))o=!1;else if(s>="0"&&s<="9")l=!0,o=!1;else break;t++}l||(t=n)}return e?(this.current=this.newToken(Ko,parseFloat(this.expression.substring(r,t))),this.pos=t):this.pos=n,e},st.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(
|
|
84
|
-
`,r+1);while(r>=0&&r<this.pos);return{line:e,column:t}},st.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)};function Je(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}Je.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},Je.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?ta(t,e.value):typeof t=="function"?t(e):e.value===t},Je.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},Je.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},Je.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},Je.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))}},Je.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 Ne(fn,this.current.value));else if(this.accept(Ko))e.push(new Ne(vr,this.current.value));else if(this.accept(Ig))e.push(new Ne(vr,this.current.value));else if(this.accept(mn,"("))this.parseExpression(e),this.expect(mn,")");else if(this.accept(ra,"["))if(this.accept(ra,"]"))e.push(new Ne(ea,0));else{var n=this.parseArrayList(e);e.push(new Ne(ea,n))}else throw new Error("unexpected "+this.nextToken)},Je.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},Je.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},Je.prototype.parseUntilEndStatement=function(e,t){return this.accept(Yc)?(this.nextToken&&this.nextToken.type!==us&&!(this.nextToken.type===mn&&this.nextToken.value===")")&&t.push(new Ne(Ho)),this.nextToken.type!==us&&this.parseExpression(t),e.push(new Ne(Ht,t)),!0):!1},Je.prototype.parseArrayList=function(e){for(var t=0;!this.accept(ra,"]");)for(this.parseExpression(e),++t;this.accept(Yo);)this.parseExpression(e),++t;return t},Je.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(Ge,"=");){var t=e.pop(),r=[],n=e.length-1;if(t.type===Xi){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,a=t.value+1;i<a;i++){var s=n-i;e[s].type===fn&&(e[s]=new Ne(di,e[s].value))}this.parseVariableAssignmentExpression(r),e.push(new Ne(Ht,r)),e.push(new Ne(Wo,t.value));continue}if(t.type!==fn&&t.type!==fi)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),e.push(new Ne(di,t.value)),e.push(new Ne(Ht,r)),e.push(hn("="))}},Je.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 Ne(Ht,t)),e.push(new Ne(Ht,r)),e.push(Cg("?"))}},Je.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(Ge,"or");){var t=[];this.parseAndExpression(t),e.push(new Ne(Ht,t)),e.push(hn("or"))}},Je.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(Ge,"and");){var t=[];this.parseComparison(t),e.push(new Ne(Ht,t)),e.push(hn("and"))}};var YM=["==","!=","<","<=",">=",">","in"];Je.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(Ge,YM);){var t=this.current;this.parseAddSub(e),e.push(hn(t.value))}};var JM=["+","-","||"];Je.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(Ge,JM);){var t=this.current;this.parseTerm(e),e.push(hn(t.value))}};var QM=["*","/","%"];Je.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(Ge,QM);){var t=this.current;this.parseFactor(e),e.push(hn(t.value))}},Je.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===Yo||this.nextToken.type===us||this.nextToken.type===mn&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var n=this.current;this.parseFactor(e),e.push(Go(n.value))}else this.parseExponential(e)},Je.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(Ge,"^");)this.parseFactor(e),e.push(hn("^"))},Je.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(Ge,"!");)e.push(Go("!"))},Je.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function r(a){return a.value in t}if(this.accept(Ge,r)){var n=this.current;this.parseAtom(e),e.push(Go(n.value))}else for(this.parseMemberExpression(e);this.accept(mn,"(");)if(this.accept(mn,")"))e.push(new Ne(Xi,0));else{var i=this.parseArgumentList(e);e.push(new Ne(Xi,i))}},Je.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(mn,")");)for(this.parseExpression(e),++t;this.accept(Yo);)this.parseExpression(e),++t;return t},Je.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(Ge,".")||this.accept(ra,"[");){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 Ne(fi,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(ra,"]"),e.push(hn("["))}else throw new Error("unexpected symbol: "+t.value)}};function XM(e,t){return Number(e)+Number(t)}function e2(e,t){return e-t}function t2(e,t){return e*t}function r2(e,t){return e/t}function n2(e,t){return e%t}function i2(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function a2(e,t){return e===t}function s2(e,t){return e!==t}function o2(e,t){return e>t}function l2(e,t){return e<t}function u2(e,t){return e>=t}function c2(e,t){return e<=t}function d2(e,t){return!!(e&&t)}function f2(e,t){return!!(e||t)}function h2(e,t){return ta(t,e)}function p2(e){return(Math.exp(e)-Math.exp(-e))/2}function m2(e){return(Math.exp(e)+Math.exp(-e))/2}function v2(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function g2(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function y2(e){return Math.log(e+Math.sqrt(e*e-1))}function b2(e){return Math.log((1+e)/(1-e))/2}function Mg(e){return Math.log(e)*Math.LOG10E}function _2(e){return-e}function w2(e){return!e}function k2(e){return e<0?Math.ceil(e):Math.floor(e)}function S2(e){return Math.random()*(e||1)}function $g(e){return Qc(e+1)}function E2(e){return isFinite(e)&&e===Math.round(e)}var x2=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(E2(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 a=e*e,s=a*e,o=s*e,l=o*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*a)-139/(51840*s)-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+x2+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function T2(e){return Array.isArray(e)?e.length:String(e).length}function Fg(){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 Ng(e,t,r){return e?t:r}function A2(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 C2(e,t,r){return r&&(r[e]=t),t}function O2(e,t){return e[t|0]}function D2(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function I2(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function P2(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 M2(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,a){return e(n,i,a)},t)}function $2(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 F2(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 N2(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function R2(e){return(e>0)-(e<0)||+e}var Rg=1/3;function L2(e){return e<0?-Math.pow(-e,Rg):Math.pow(e,Rg)}function z2(e){return Math.exp(e)-1}function q2(e){return Math.log(1+e)}function U2(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||p2,cosh:Math.cosh||m2,tanh:Math.tanh||v2,asinh:Math.asinh||g2,acosh:Math.acosh||y2,atanh:Math.atanh||b2,sqrt:Math.sqrt,cbrt:Math.cbrt||L2,log:Math.log,log2:Math.log2||U2,ln:Math.log,lg:Math.log10||Mg,log10:Math.log10||Mg,expm1:Math.expm1||z2,log1p:Math.log1p||q2,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||k2,"-":_2,"+":Number,exp:Math.exp,not:w2,length:T2,"!":$g,sign:Math.sign||R2},this.binaryOps={"+":XM,"-":e2,"*":t2,"/":r2,"%":n2,"^":Math.pow,"||":i2,"==":a2,"!=":s2,">":o2,"<":l2,">=":u2,"<=":c2,and:d2,or:f2,in:h2,"=":C2,"[":O2},this.ternaryOps={"?":Ng},this.functions={random:S2,fac:$g,min:I2,max:D2,hypot:Math.hypot||Fg,pyt:Math.hypot||Fg,pow:Math.pow,atan2:Math.atan2,if:Ng,gamma:Qc,roundTo:A2,map:P2,fold:M2,filter:$2,indexOf:F2,join:N2},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}pi.prototype.parse=function(e){var t=[],r=new Je(this,new st(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(us,"EOF"),new Ir(t,this)},pi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var Lg=new pi;pi.parse=function(e){return Lg.parse(e)},pi.evaluate=function(e,t){return Lg.parse(e).evaluate(t)};var zg={"+":"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 B2(e){return zg.hasOwnProperty(e)?zg[e]:e}pi.prototype.isOperatorEnabled=function(e){var t=B2(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var V2=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,j2=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,Z2=/(__optional\("[^"]+"\))\.length\b/g,W2=new pi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),qg=new Map;function H2(e){return e.replace(V2,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace(j2,(t,r)=>`__length(${r})`).replace(Z2,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function G2(e){const t=qg.get(e);if(t)return t;const r=W2.parse(H2(e));return qg.set(e,r),r}function K2(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,a)=>{if(i!=null)return i[a]},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=G2(e);for(const i of n.symbols()){if(r[i]!==void 0)continue;const a=globalThis[i];typeof a=="function"&&(r[i]=a)}return n.evaluate(r)}catch(n){console.error(`Error while evaluating when (${e}) in go-if: ${n.message}`)}}var Ug=["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","tour"],Y2=7200*1e3;function Xc(e,{id:t,quantity:r,time:n}){if(!(r>0))throw new Error("(go.cart.addItem) 'quantity' must be a positive number");if(!e)throw new Error(`(go.cart.addItem) ticket ${t} not available (sold out or unknown)`);const i=nt(e,{quantity:r,time:n??e.selectedTime}),{max:a}=k.capacityManager.capacity(k.cart,i,ei());if(r>a)throw new Error(`(go.cart.addItem) only ${a} left for ticket ${t}`);return k.cart.addItem(i),i.uuid}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 k.asyncFetch(()=>k.ticketsContent(r))??[],i=new Map(n.map(a=>[a.id,a.content]));for(const a of t){if(typeof a.id!="number")continue;const s=i.get(a.id);s&&(a.content=s)}}catch{}}function Jo(e,t){k.capacityManager.addQuotas(t),e.timeslotTicketIds=[...e.timeslotTicketIds,...Object.values(t).flatMap(r=>r.ticket_ids)]}function Qo(e,t,r){const n=Date.parse(r);return e.filter(i=>{const a=i.start_time.slice(0,10),s=Date.parse(i.start_time);return a===t&&s>=n&&s<=n+Y2&&(i.seats?.available??0)>0})}async function Xo(e){if(!e?.selectedDate)return;const{quotas:t}=await k.asyncFetch(()=>k.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}));Jo(e,t)}async function Bg(e,t){const{tickets:r,quotas:n}=await k.asyncFetch(()=>k.ticketsAndQuotas({by_bookable:!0,by_ticket_type:"time_slot",...e}));return k.capacityManager.addQuotas(n),Ba(Va(r,t),t)}var J2={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 addToCart(e){const{id:t,quantity:r,time:n}=e;if(!n)throw new Error("(go.cart.addItem) ticket:timeslot requires a 'time'");const i=(await Bg({valid_at:n.slice(0,10),"by_ticket_ids[]":[t]},n))[0];return Xc(i,{id:t,quantity:r,time:n})},async loadTimeslots(e){if(!e?.selectedDate)return;const{quotas:t}=await k.asyncFetch(()=>k.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}));Jo(e,t)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTimeslot)return;const r=await Bg({valid_at:t.selectedDate.toString(),"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},t.selectedTimeslot);await vn(e,r);for(const n of r)e.preCart.addItem(nt(n,{time:t.selectedTime}))}};async function Vg(e){const{tickets:t,quotas:r}=await k.asyncFetch(()=>k.ticketsAndQuotas({by_bookable:!0,"by_ticket_types[]":["normal"],...e}));return k.capacityManager.addQuotas(r),Du(t)}var Q2={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async addToCart(e){const{id:t,quantity:r,date:n}=e;if(!n)throw new Error("(go.cart.addItem) ticket:day requires a 'date'");const i=(await Vg({valid_at:n,"by_ticket_ids[]":[t]}))[0];return Xc(i,{id:t,quantity:r})},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate)return;const r=await Vg({valid_at:t.selectedDate.toString(),"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});await vn(e,r);for(const n of r)e.preCart.addItem(nt(n,{time:n.selectedTime}))}};async function jg(e){const t=await k.asyncFetch(()=>k.tickets({by_bookable:!0,"by_ticket_types[]":["annual"],...e}));return Object.values(t).map(r=>Ua(r))}var X2={name:"ticket:annual",calendarEndpoint:null,apiToken:"annual",requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async addToCart(e){const{id:t,quantity:r}=e,n=(await jg({"by_ticket_ids[]":[t]}))[0];return Xc(n,{id:t,quantity:r})},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t)return;const r=await jg({"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds});await vn(e,r);for(const n of r)e.preCart.addItem(nt(n))}},e$={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 k.asyncFetch(()=>k.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await k.asyncFetch(()=>k.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_bookable:!0,valid_at:e.selectedDate.toString()}));Jo(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await k.asyncFetch(()=>k.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await k.asyncFetch(()=>k.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_bookable:!0,valid_at:t.selectedDate.toString()}));k.capacityManager.addQuotas(i);const a=Ba(Va(n,t.selectedTime),t.selectedTime);await vn(e,a);for(const s of a)e.preCart.addItem(nt(s,{time:t.selectedTime}))}},t$={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 k.asyncFetch(()=>k.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await k.asyncFetch(()=>k.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:t.selectedDate.toString()}));k.capacityManager.addQuotas(i);const a=Du(n);await vn(e,a);for(const s of a)e.preCart.addItem(nt(s,{time:s.selectedTime}))}},r$={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 k.asyncFetch(()=>k.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await k.asyncFetch(()=>k.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:e.selectedDate.toString()}));Jo(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate||!t.selectedTimeslot)return;const r=await k.asyncFetch(()=>k.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await k.asyncFetch(()=>k.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:t.selectedDate.toString()}));k.capacityManager.addQuotas(i);const a=Ba(Va(n,t.selectedTime),t.selectedTime);await vn(e,a);for(const s of a)e.preCart.addItem(nt(s,{time:t.selectedTime}))}},n$={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 k.asyncFetch(()=>k.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(nt(i,{time:r.start_time}))}r.seats&&k.capacityManager.addSeats(r.id,r.seats)}}},i$={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Xo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Qo(await k.asyncFetch(()=>k.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 k.asyncFetch(()=>k.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:a,quotas:s}=await k.asyncFetch(()=>k.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_bookable:!0,valid_at:n.start_time.slice(0,10)}));k.capacityManager.addQuotas(s);const o=Ba(Va(a,n.start_time),n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(nt(l,{time:n.start_time}))}}},a$={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Xo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Qo(await k.asyncFetch(()=>k.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 k.asyncFetch(()=>k.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:a,quotas:s}=await k.asyncFetch(()=>k.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:n.start_time.slice(0,10)}));k.capacityManager.addQuotas(s);const o=Du(a,n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(nt(l,{time:l.selectedTime}))}}},s$={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Xo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Qo(await k.asyncFetch(()=>k.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 k.asyncFetch(()=>k.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:a,quotas:s}=await k.asyncFetch(()=>k.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:n.start_time.slice(0,10)}));k.capacityManager.addQuotas(s);const o=Ba(Va(a,n.start_time),n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(nt(l,{time:n.start_time}))}}},o$={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Xo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Qo(await k.asyncFetch(()=>k.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 a=n?i.prices.filter(s=>s.title?.includes(n)):i.prices;for(const s of a){const o=Pu(s,i.id,{event_title:i.event_title});e.preCart.addItem(nt(o,{time:i.start_time}))}i.seats&&k.capacityManager.addSeats(i.id,i.seats)}}},l$={name:"coupon",calendarEndpoint:null,requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,loadTimeslots:async()=>{},async loadProducts(e){const t=await k.asyncFetch(()=>k.getCoupons());for(const r of t??[])e.preCart.addItem(nt(_p(r)))}},u$=["id","time","participants","languageId","totalPriceCents","title"],c$={name:"tour",calendarEndpoint:null,requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async loadProducts(){},async addToCart(e){const t=e;for(const a of u$)if(t[a]==null||t[a]==="")throw new Error(`(go.cart.addItem) tour '${a}' is required`);if(!(t.participants>0))throw new Error("(go.cart.addItem) tour 'participants' must be a positive number");if(t.quantities){const a=fr(Object.values(t.quantities));if(a!==t.participants)throw new Error(`(go.cart.addItem) tour 'quantities' must sum to 'participants' (${a} !== ${t.participants})`)}const{time:r,...n}=t,i=nt(yp(n),{quantity:1,time:r});return k.cart.addItem(i),i.uuid}},d$={"ticket:timeslot":J2,"ticket:day":Q2,"ticket:annual":X2,"event:admission":e$,"event:admission:day":t$,"event:admission:timeslot":r$,"event:price":n$,"events:admission":i$,"events:admission:day":a$,"events:admission:timeslot":s$,"events:price":o$,coupon:l$,tour:c$};function qn(e){const t=d$[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${Ug.join(", ")}`),t}var Zg=Ug,f$=0,h$=class{uid=f$++;#e=se();get filters(){return d(this.#e)}set filters(e){F(this.#e,e,!0)}#t=se();get eventIds(){return d(this.#t)}set eventIds(e){F(this.#t,e,!0)}#r=se();get museumIds(){return d(this.#r)}set museumIds(e){F(this.#r,e,!0)}#n=se();get exhibitionIds(){return d(this.#n)}set exhibitionIds(e){F(this.#n,e,!0)}#i=se();get ticketIds(){return d(this.#i)}set ticketIds(e){F(this.#i,e,!0)}#a=se();get ticketGroupIds(){return d(this.#a)}set ticketGroupIds(e){F(this.#a,e,!0)}#s=se();get selectedDate(){return d(this.#s)}set selectedDate(e){F(this.#s,e,!0)}#o=se();get selectedTimeslot(){return d(this.#o)}set selectedTimeslot(e){F(this.#o,e,!0)}timeslotTicketIds=[];#l=P(()=>this.selectedTimeslot);get selectedTime(){return d(this.#l)}set selectedTime(e){F(this.#l,e)}#u=se(Pe([]));get ticketSegments(){return d(this.#u)}set ticketSegments(e){F(this.#u,e,!0)}#c=P(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return d(this.#c)}set preCarts(e){F(this.#c,e)}#d=se();get timeslotDetails(){return d(this.#d)}set timeslotDetails(e){F(this.#d,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>qn(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>qn(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>qn(e).isTicketsVisible(this))}},Wg="go-ticket-selection",p$=Fi(Wg),gn=Ni(Wg);function m$(e,t){te(t,!0);let r=_(t,"when",7),n=_(t,"then",7,"show");const i=gn(t.$$host),a=P(()=>i.value),s=Rx(t.$$host),o=P(()=>s.value),l=Ri(t.$$host),c=P(()=>l.value),f=Li(t.$$host),u=P(()=>f.value),p=k.auth;let h=P(()=>({ticketSelection:d(a),personalizationDetails:d(o),formData:d(c)?.formData,cart:k.cart,cartView:d(u),auth:{isAuthenticated:p.isAuthenticated(),isLoggedIn:p.isLoggedIn(),isGuest:p.isGuest()}}));const g=S=>{F(h,S)},v=()=>d(h);let m=P(()=>K2(r(),d(h))),y=null;ve(()=>{const S=t.$$host;if(d(m)&&n()==="show")y&&(S.appendChild(y),y=null);else if(!y&&S.childNodes.length>0)for(y=document.createDocumentFragment();S.firstChild;)y.appendChild(S.firstChild)});var E={_setData:g,_getData:v,get when(){return r()},set when(S){r(S),b()},get then(){return n()},set then(S="show"){n(S),b()}};return re(E)}customElements.define("go-if",ne(m$,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function Hg(e,t){te(t,!0);let r=_(t,"apiUrl",7),n=_(t,"shopDomain",7),i=_(t,"locale",7);return i(i()||localStorage.getItem("lang")||"en"),ve(()=>{(n()!==k.shopDomain||r()!==k.apiUrl||i()!==k.locale)&&(k.load(r(),n(),i()),console.warn("shop loaded due to prop change"))}),re({get apiUrl(){return r()},set apiUrl(a){r(a),b()},get shopDomain(){return n()},set shopDomain(a){n(a),b()},get locale(){return i()},set locale(a){i(a),b()}})}customElements.define("gomus-init",ne(Hg,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function v$(e,t){te(t,!0);let r=_(t,"apiDomain",7),n=_(t,"shopDomain",7),i=_(t,"locale",7),a=`https://${r()}`;var s={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 Hg(e,{get apiUrl(){return a},get shopDomain(){return n()},get locale(){return i()}}),re(s)}customElements.define("go-init",ne(v$,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function g$(e,t){te(t,!0);const r=_(t,"to",7),n=P(()=>Ke.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",a=>{if(a.preventDefault(),!Ke.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}Ke.config.navigateTo(Ke.config.urls[r()]())}),re({get to(){return r()},set to(a){r(a),b()}})}customElements.define("go-link",ne(g$,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));function y$(e,t){te(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 a=i.target.details;(await k.activateMembership(a.formData)).response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=[k.t("membership.activation.form.errors.requestFailed")]}return Hr(t.$$host,"go-form",{"form-id":"membershipActivation",custom:r()}),t.$$host.addEventListener("submit",n),re({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-membership-activation",ne(y$,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));var b$=class{#e=se();get token(){return d(this.#e)}set token(e){F(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return pl(k.order(this.token))}downloadLink(e,t){if(this.order?.is_valid)switch(e.type){case"Event":return`${k.apiUrl}/api/v4/orders/${this.order.id}/events/${e.attributes.id}.pdf?locale=${k.locale}&token=${this.token}`;case"Coupon":return`${k.apiUrl}/api/v4/orders/${this.order.id}/coupons/${e.attributes.id}.pdf?locale=${k.locale}&token=${this.token}`;case"Ticket":return e.attributes.ticket_type==="annual"&&!e.attributes.is_voucher?Ke.config.urls.annualTicketPersonalizationList?Ke.config.urls.annualTicketPersonalizationList(this.token):k.urls?.annualTicketPersonalizationList(this.token):`${k.apiUrl}/api/v4/orders/${this.order.id}/tickets/${e.attributes.id}.pdf?locale=${k.locale}&token=${this.token}&barcode_id=${t}`;default:break}}},Gg="go-order-details",_$=Fi(Gg),Kg=Ni(Gg);function w$(e,t){te(t,!0);let r=_(t,"token",7);const n=new b$(r());_$(t.$$host,n);let i;ve(()=>{n.token=r();const s=k.cart;!s||i===r()||(i=r(),Re(()=>{s.clearItems(),s.clearCoupons(),s.clearDonations(),k.auth.isGuest()&&k.auth.signOut()}))});var a={orderDetails:n,get token(){return r()},set token(s){r(s),b()}};return re(a)}customElements.define("go-order",ne(w$,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var k$=q('<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <br/> <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></ul></article></li>');function Yg(e,t){te(t,!0);let r=_(t,"item",7),n=_(t,"orderDetails",7);const i=P(()=>r().attributes.value_cents>0?r().attributes.value_cents:r().price_cents);var a={get item(){return r()},set item(E){r(E),b()},get orderDetails(){return n()},set orderDetails(E){n(E),b()}},s=k$(),o=D(s),l=D(o),c=D(l),f=D(c,!0);C(c);var u=V(c,2),p=D(u),h=D(p,!0);C(p);var g=V(p,4),v=D(g,!0);C(g),C(u);var m=V(u,2),y=D(m,!0);return C(m),gt(2),C(l),C(o),C(s),Y((E,S,T)=>{Z(f,r().attributes.quantity),Z(h,r().attributes.title),pe(g,"href",E),Z(v,S),Z(y,T)},[()=>n().downloadLink(r()),()=>k.t("common.download"),()=>et(d(i))]),x(e,s),re(a)}ne(Yg,{item:{},orderDetails:{}},[],[],{mode:"open"});var S$=q('<li class="go-order-breakdown-donation"><article><ul><li class="go-order-breakdown-count">1</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){te(t,!0);let r=_(t,"donation",7);const n=P(()=>k.donations?.campaigns?.find(h=>h.id===r().donation_campaign_id));var i={get donation(){return r()},set donation(h){r(h),b()}},a=S$(),s=D(a),o=D(s),l=V(D(o),2),c=D(l),f=D(c,!0);C(c),C(l);var u=V(l,2),p=D(u,!0);return C(u),gt(2),C(o),C(s),C(a),Y((h,g)=>{Z(f,h),Z(p,g)},[()=>d(n)?.name??k.t("common.table.donation"),()=>et(r().donation_cents)]),x(e,a),re(i)}ne(Jg,{donation:{}},[],[],{mode:"open"});var E$=q('<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),x$=q('<br/> <span class="go-order-item-quantities"> </span>',1),T$=q('<a aria-label="iCal link"> </a>'),A$=q('<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 Qg(e,t){te(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()}},a=A$(),s=D(a),o=D(s),l=V(D(o),2),c=D(l),f=D(c,!0);C(c);var u=V(c,2),p=A=>{var I=E$(),M=B(I),N=D(M,!0);C(M);var j=V(M,2),R=D(j,!0);C(j),Y((X,U)=>{Z(N,X),Z(R,U)},[()=>k.formatDate(r().attributes.start_time,"dayMonth"),()=>k.formatTime(r().attributes.start_time)]),x(A,I)};ue(u,A=>{r().attributes.start_time&&A(p)});var h=V(u,2);Me(h,17,()=>r().attributes.quantities,A=>A.id,(A,I)=>{var M=x$(),N=V(B(M),2),j=D(N);C(N),Y(()=>Z(j,`${d(I).quantity??""} x ${d(I).title??""}`)),x(A,M)});var g=V(h,2),v=D(g,!0);C(g),C(l);var m=V(l,2),y=D(m,!0);C(m);var E=V(m,4),S=D(E),T=A=>{var I=T$(),M=D(I,!0);C(I),Y(N=>{pe(I,"href",k.apiUrl+r().attributes.ical_url),Z(M,N)},[()=>k.t("common.calendar")]),x(A,I)};return ue(S,A=>{r().attributes.ical_url&&A(T)}),C(E),C(o),C(s),C(a),Y((A,I,M)=>{Z(f,r().attributes.title),pe(g,"href",A),Z(v,I),Z(y,M)},[()=>n().downloadLink(r()),()=>k.t("common.download"),()=>et(r().price_cents)]),x(e,a),re(i)}ne(Qg,{item:{},orderDetails:{}},[],[],{mode:"open"});var C$=q('<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 Xg(e,t){te(t,!0);let r=_(t,"item",7);var n={get item(){return r()},set item(g){r(g),b()}},i=C$(),a=D(i),s=D(a),o=D(s),l=D(o,!0);C(o);var c=V(o,2),f=D(c),u=D(f,!0);C(f),C(c);var p=V(c,2),h=D(p,!0);return C(p),gt(2),C(s),C(a),C(i),Y(g=>{Z(l,r().attributes.quantity),Z(u,r().attributes.title),Z(h,g)},[()=>et(r().price_cents)]),x(e,i),re(n)}ne(Xg,{item:{}},[],[],{mode:"open"});var ey=q('<span class="go-order-item-subtitle" data-testid="order-item-subtitle"> </span>'),O$=q('<br/> <span class="go-order-item-quantities" data-testid="order-sub-ticket"> </span>',1),D$=q('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),I$=q('<span class="go-cart-item-date"> </span>'),P$=q('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),M$=q('<br/> <a class="go-ticket-personalization"> </a>',1),$$=q('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),F$=q('<a aria-label="iCal link"> </a>'),N$=q('<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>'),R$=q('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),L$=q('<a class="go-ticket-personalization"> </a>'),z$=q('<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 ty(e,t){te(t,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${k.locale}.svg`;let n=_(t,"item",7),i=_(t,"orderDetails",7);const a=P(()=>(n().attributes.sub_ticket_sales??[]).filter(u=>u.quantity>0));var s={get item(){return n()},set item(u){n(u),b()},get orderDetails(){return i()},set orderDetails(u){i(u),b()}},o=ie(),l=B(o),c=u=>{var p=ie(),h=B(p);Me(h,17,()=>({length:n().attributes.quantity}),an,(g,v,m)=>{var y=N$(),E=D(y),S=D(E),T=D(S);T.textContent="1";var A=V(T,2),I=D(A),M=D(I,!0);C(I);var N=V(I,2),j=ee=>{var $=ey(),ae=D($,!0);C($),Y(()=>Z(ae,n().attributes.sub_title)),x(ee,$)};ue(N,ee=>{n().attributes.sub_title&&ee(j)});var R=V(N,2);Me(R,17,()=>d(a),ee=>ee.id,(ee,$)=>{var ae=O$(),L=V(B(ae),2),be=D(L);C(L),Y(()=>Z(be,`${d($).quantity??""} x ${d($).title??""}`)),x(ee,ae)});var X=V(R,2),U=ee=>{const $=P(()=>n().attributes.barcodes[m]?.id);var ae=P$(),L=B(ae),be=we=>{var De=D$(),Le=B(De),je=D(Le,!0);C(Le);var _t=V(Le,2),ot=D(_t,!0);C(_t),Y((Nt,wt)=>{Z(je,Nt),Z(ot,wt)},[()=>k.formatDate(n().attributes.start_time,"dayMonth"),()=>k.formatTime(n().attributes.start_time)]),x(we,De)},G=we=>{var De=I$(),Le=D(De,!0);C(De),Y(je=>Z(Le,je),[()=>k.formatDate(n().attributes.start_time,"dayMonth")]),x(we,De)};ue(L,we=>{n().attributes.ticket_type==="time_slot"?we(be):n().attributes.ticket_type==="normal"&&we(G,1)});var w=V(L,4),_e=D(w,!0);C(w),Y((we,De)=>{pe(w,"href",we),Z(_e,De)},[()=>i().downloadLink(n(),d($)),()=>k.t("common.download")]),x(ee,ae)},le=ee=>{var $=M$(),ae=V(B($),2),L=D(ae,!0);C(ae),Y((be,G)=>{pe(ae,"href",be),Z(L,G)},[()=>i().downloadLink(n()),()=>k.t("common.personalize")]),x(ee,$)};ue(X,ee=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?ee(U):ee(le,-1)}),C(A);var he=V(A,2),H=D(he,!0);C(he);var oe=V(he,2),W=D(oe),fe=ee=>{var $=$$(),ae=D($);C($),Y(()=>{pe($,"href",k.apiUrl+n().attributes.barcodes[m]?.passbook_url),pe(ae,"src",r)}),x(ee,$)};ue(W,ee=>{n().attributes.barcodes[m]&&n().attributes.barcodes[m]?.passbook_url&&ee(fe)}),C(oe);var ce=V(oe,2),de=D(ce),J=ee=>{var $=F$(),ae=D($,!0);C($),Y(L=>{pe($,"href",k.apiUrl+n().attributes.ical_url),Z(ae,L)},[()=>k.t("common.calendar")]),x(ee,$)};ue(de,ee=>{n().attributes.ical_url&&ee(J)}),C(ce),C(S),C(E),C(y),Y(ee=>{Z(M,n().attributes.title),Z(H,ee)},[()=>et(n().price_cents)]),x(g,y)}),x(u,p)},f=u=>{var p=z$(),h=D(p),g=D(h),v=D(g),m=D(v,!0);C(v);var y=V(v,2),E=D(y),S=D(E,!0);C(E);var T=V(E,2),A=X=>{var U=ey(),le=D(U,!0);C(U),Y(()=>Z(le,n().attributes.sub_title)),x(X,U)};ue(T,X=>{n().attributes.sub_title&&X(A)});var I=V(T,2),M=X=>{var U=R$(),le=D(U,!0);C(U),Y((he,H)=>{pe(U,"href",he),Z(le,H)},[()=>i().downloadLink(n()),()=>k.t("common.download")]),x(X,U)},N=X=>{var U=L$(),le=D(U,!0);C(U),Y((he,H)=>{pe(U,"href",he),Z(le,H)},[()=>i().downloadLink(n()),()=>k.t("common.personalize")]),x(X,U)};ue(I,X=>{n().attributes.is_voucher?X(M):X(N,-1)}),C(y);var j=V(y,2),R=D(j,!0);C(j),gt(2),C(g),C(h),C(p),Y(X=>{Z(m,n().attributes.quantity),Z(S,n().attributes.title),Z(R,X)},[()=>et(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),re(s)}ne(ty,{item:{},orderDetails:{}},[],[],{mode:"open"});var q$=q('<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),U$=q('<br/> <span class="go-order-item-quantities"> </span>',1),B$=q('<a aria-label="iCal link"> </a>'),V$=q('<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 ry(e,t){te(t,!0);let r=_(t,"item",7);const n=P(()=>(r().attributes.prices??[]).filter(A=>A.title&&A.quantity!=null));var i={get item(){return r()},set item(A){r(A),b()}},a=V$(),s=D(a),o=D(s),l=V(D(o),2),c=D(l),f=D(c,!0);C(c);var u=V(c,2),p=D(u,!0);C(u);var h=V(u,2),g=A=>{var I=q$(),M=B(I),N=D(M,!0);C(M);var j=V(M,2),R=D(j,!0);C(j),Y((X,U)=>{Z(N,X),Z(R,U)},[()=>k.formatDate(r().attributes.start_time,"dayMonth"),()=>k.formatTime(r().attributes.start_time)]),x(A,I)};ue(h,A=>{r().attributes.start_time&&A(g)});var v=V(h,2);Me(v,17,()=>d(n),A=>A.title,(A,I)=>{var M=U$(),N=V(B(M),2),j=D(N);C(N),Y(()=>Z(j,`${d(I).quantity??""} x ${d(I).title??""}`)),x(A,M)}),C(l);var m=V(l,2),y=D(m,!0);C(m);var E=V(m,4),S=D(E),T=A=>{var I=B$(),M=D(I,!0);C(I),Y(N=>{pe(I,"href",k.apiUrl+r().attributes.ical_url),Z(M,N)},[()=>k.t("common.calendar")]),x(A,I)};return ue(S,A=>{r().attributes.ical_url&&A(T)}),C(E),C(o),C(s),C(a),Y((A,I)=>{Z(f,r().attributes.title),Z(p,A),Z(y,I)},[()=>k.t("cart.item.participants",{count:r().attributes.participants}),()=>et(r().price_cents)]),x(e,a),re(i)}ne(ry,{item:{}},[],[],{mode:"open"});var j$=q('<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 Z$(e,t){te(t,!0);const r=Kg(t.$$host),n=P(()=>r.value);let i=P(()=>d(n)?.order);var a=ie(),s=B(a),o=l=>{var c=j$(),f=D(c),u=D(f),p=D(u),h=D(p,!0);C(p);var g=V(p,2),v=D(g,!0);C(g);var m=V(g,2),y=D(m,!0);C(m),gt(2),C(u),C(f);var E=V(f,2);Me(E,17,()=>d(i).items,N=>N.id,(N,j)=>{var R=ie(),X=B(R),U=W=>{ty(W,{get item(){return d(j)},get orderDetails(){return d(n)}})},le=W=>{Qg(W,{get item(){return d(j)},get orderDetails(){return d(n)}})},he=W=>{ry(W,{get item(){return d(j)}})},H=W=>{Yg(W,{get item(){return d(j)},get orderDetails(){return d(n)}})},oe=W=>{Xg(W,{get item(){return d(j)}})};ue(X,W=>{d(j).type==="Ticket"?W(U):d(j).type==="Event"?W(le,1):d(j).type==="Tour"?W(he,2):d(j).type==="Coupon"?W(H,3):d(j).type==="Merchandise"&&W(oe,4)}),x(N,R)});var S=V(E,2);Me(S,17,()=>d(i).donations??[],N=>N.id,(N,j)=>{Jg(N,{get donation(){return d(j)}})});var T=V(S,2),A=D(T),I=V(D(A),4),M=D(I,!0);C(I),gt(2),C(A),C(T),C(c),Y((N,j,R,X)=>{Z(h,N),Z(v,j),Z(y,R),Z(M,X)},[()=>k.t("common.table.count"),()=>k.t("common.table.product"),()=>k.t("common.table.price"),()=>k.t("common.table.total",{value:et(d(i).total_price_cents)})]),x(l,c)};ue(s,l=>{d(i)&&d(n)&&l(o)}),x(e,a),re()}customElements.define("go-order-breakdown",ne(Z$,{},[],[]));function W$(e,t){te(t,!0);const r=Kg(t.$$host),n=P(()=>r.value);let i=P(()=>d(n)?.order);gt();var a=Vt();Y(()=>Z(a,d(i)?.id)),x(e,a),re()}customElements.define("go-order-invoice-id",ne(W$,{},[],[]));var H$=q("<go-form></go-form>",2);function G$(e,t){te(t,!1),Pt.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const a=i.target.details,s=await k.updatePassword(a.formData);s.data?(a.successMessage=k.t("user.passwordSuccess.desc.title"),a.apiErrors=[]):a.apiErrors=s.error?.errors||s.error||s.errors}Jl();var n=H$();Tn(n,"formId","passwordResetForm"),Ta("submit",n,r),x(e,n),re()}customElements.define("go-profile-password",ne(G$,{},[],[]));var K$=q("<go-form></go-form>",2);function Y$(e,t){te(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=se(void 0);const n=P(()=>k.getCustomer()),i=P(()=>d(n)&&"data"in d(n)?d(n).data:void 0);En(async()=>{await k.waitForAllFetches(),await Ql(()=>d(r).details),await Ql(()=>d(i)),d(r).details.fill(d(i))});var a=K$();Tn(a,"formId","accountDetailsForm"),Us(a,s=>F(r,s),()=>d(r)),x(e,a),re()}customElements.define("go-profile-details",ne(Y$,{},[],[]));var J$=q('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function Q$(e,t){te(t,!0);const r=P(()=>k.getCustomer()),n=P(()=>d(r)&&"data"in d(r)?d(r).data:void 0);var i=ie(),a=B(i),s=l=>{var c=J$(),f=B(c),u=D(f);C(f);var p=V(f,2),h=D(p,!0);C(p),Y(()=>{Z(u,`${d(n).name??""}
|
|
85
|
-
${d(n).surname??""}`),Z(h,d(n).email)}),x(l,c)},o=l=>{var c=Vt();Y(f=>Z(c,f),[()=>k.t("user.login.desc.text")]),x(l,c)};ue(a,l=>{d(n)?l(s):l(o,-1)}),x(e,i),re()}customElements.define("go-profile-overview",ne(Q$,{},[],[]));function X$(e,t){te(t,!0);function r(h){if(!h)return;const g=[];for(const v of h.split(",")){const m=v.trim();m&&(Zg.includes(m)?g.push(m):console.warn(`[go-ticket-selection] Unknown filter "${m}". Valid filters: ${Zg.join(", ")}`))}return g.length?g:void 0}let n=_(t,"filters",7),i=_(t,"eventIds",7),a=_(t,"museumIds",7),s=_(t,"exhibitionIds",7),o=_(t,"selectedDate",7),l=_(t,"selectedTimeslot",7),c=_(t,"ticketIds",7),f=_(t,"ticketGroupIds",7);const u=new h$;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(a()),u.exhibitionIds=on(s()),u.ticketIds=on(c()),u.ticketGroupIds=on(f()),u.selectedTimeslot=l(),o()&&(u.selectedDate=oo(o()))}),ve(()=>{u.selectedDate&&Re(()=>{o(u.selectedDate.toString())})}),ve(()=>{u.selectedTimeslot,Re(()=>{l(u.selectedTimeslot)})}),p$(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 a()},set museumIds(h){a(h),b()},get exhibitionIds(){return s()},set exhibitionIds(h){s(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 re(p)}customElements.define("go-ticket-selection",ne(X$,{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 eF(e,t){te(t,!0);const r=gn(t.$$host),n=P(()=>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)}),re()}customElements.define("go-tickets",ne(eF,{},[],[]));function tF(e,t){te(t,!0);const r=gn(t.$$host),n=P(()=>r.value),i=P(()=>fr(d(n)?.preCarts||[],s=>s.items.length)),a=P(()=>!d(n)?.isTicketsVisible||d(n)?.isTicketsVisible&&d(i)===0);ve(()=>{t.$$host.style.display=d(a)?"block":"none",t.$$host.classList.toggle("is-hidden",!d(a)),t.$$host.classList.toggle("is-visible",d(a))}),re()}customElements.define("go-tickets-empty",ne(tF,{},[],[]));function rF(e,t){te(t,!0);const r=gn(t.$$host),n=P(()=>r.value);let i=P(()=>fr(d(n)?.preCarts||[],s=>s.totalPriceCents));gt();var a=Vt();Y(s=>Z(a,s),[()=>et(d(i))]),x(e,a),re()}customElements.define("go-tickets-sum",ne(rF,{},[],[]));var nF=class{#e;get ticketSelectionDetails(){return d(this.#e)}set ticketSelectionDetails(e){F(this.#e,e)}#t=se(Pe(ei()));get preCart(){return d(this.#t)}set preCart(e){F(this.#t,e,!0)}#r=se();get filters(){return d(this.#r)}set filters(e){F(this.#r,e,!0)}#n=se();get dateId(){return d(this.#n)}set dateId(e){F(this.#n,e,!0)}#i=se();get limit(){return d(this.#i)}set limit(e){F(this.#i,e,!0)}#a=se();get query(){return d(this.#a)}set query(e){F(this.#a,e,!0)}#s=se(Pe([]));get ticketGroupIds(){return d(this.#s)}set ticketGroupIds(e){F(this.#s,e,!0)}#o=se(Pe([]));get languageIds(){return d(this.#o)}set languageIds(e){F(this.#o,e,!0)}#l=se(Pe([]));get catchWordIds(){return d(this.#l)}set catchWordIds(e){F(this.#l,e,!0)}#u=se(Pe([]));get museumIds(){return d(this.#u)}set museumIds(e){F(this.#u,e,!0)}#c=se(!1);get withContent(){return d(this.#c)}set withContent(e){F(this.#c,e,!0)}constructor(e,t){this.filters=e===void 0?void 0:Array.isArray(e)?e:[e],this.#e=P(()=>t.value)}get effectiveFilters(){return this.filters?.length?this.filters:this.ticketSelectionDetails?.filters??[]}clear(){this.preCart=ei([])}toString(){return JSON.stringify({filters:this.effectiveFilters,preCart:this.preCart.toString()})}async loadTickets(){this.preCart=ei();const e=this.effectiveFilters.filter(t=>t!=="custom");await Promise.all(e.map(t=>qn(t).loadProducts(this)))}},ny="go-ticket-segment",iF=Fi(ny),ed=Ni(ny);function aF(e,t){te(t,!0);const r=_(t,"filters",7),n=_(t,"dateId",7),i=_(t,"query",7),a=_(t,"limit",7),s=_(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 E=y.split(",").map(S=>S.trim()).filter(Boolean);return E.length?E:void 0}const p=gn(t.$$host),h=p.value,g=new nF(u(r()),p);iF(t.$$host,g),ve(()=>{g.filters=u(r()),g.dateId=n(),g.query=i(),g.limit=a(),g.ticketGroupIds=on(s()),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=P(()=>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 a()},set limit(y){a(y),b()},get ticketGroupIds(){return s()},set ticketGroupIds(y){s(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 re(m)}customElements.define("go-ticket-segment",ne(aF,{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 sF(e,t){te(t,!0);const r=gn(t.$$host).value,n=ed(t.$$host).value,i=P(()=>n?.preCart.items.length),a=P(()=>!r?.isTicketsVisible||r?.isTicketsVisible&&d(i)===0);ve(()=>{t.$$host.style.display=d(a)?"block":"none",t.$$host.classList.toggle("is-hidden",!d(a)),t.$$host.classList.toggle("is-visible",d(a))}),re()}customElements.define("go-ticket-segment-empty",ne(sF,{},[],[]));var oF=q('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),lF=q('<span class="go-tickets-item-subtitle" data-testid="ticket-subtitle"> </span>'),uF=q('<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>'),cF=q('<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>'),dF=q('<ul class="go-sub-tickets" role="list"></ul>'),fF=q('<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 iy(e,t){const r=vt();te(t,!0);const n=S=>{var T=oF(),A=B(T),I=D(A);C(A);var M=V(A,2),N=D(M,!0);C(M),Y(j=>{Z(I,`${a().product.event_title??""} - ${j??""}`),Z(N,a().product.title)},[()=>k.formatTime(a().time)]),x(S,T)},i=S=>{gt();var T=Vt();Y(()=>Z(T,a().product.title)),x(S,T)};let a=_(t,"item",7),s=_(t,"details",7),o=se(void 0),l=se(Pe({}));const c=P(()=>Vr(a().product)?a().product:null);let f=se(!1);const u=P(()=>a().product?.content?.reduction_reason),p=`go-ticket-info-${r}`;ve(()=>{s().preCart.items.map(S=>S.quantity),s().preCart.items.forEach(S=>S.mantle&&Object.values(S.mantle.composition)),k.cart?.items.map(S=>S.quantity),k.cart?.items.forEach(S=>S.mantle&&Object.values(S.mantle.composition)),Re(()=>{F(o,k.capacityManager.capacity(k.cart,a(),s().preCart),!0),F(l,k.capacityManager.subTicketMaxes(k.cart,a(),s().preCart),!0)})});function h(S,T){a().mantle&&(a().mantle.composition[S]=T)}let g=i;ja(a().product)&&(g=n);var v={get item(){return a()},set item(S){a(S),b()},get details(){return s()},set details(S){s(S),b()}},m=ie(),y=B(m),E=S=>{var T=fF(),A=D(T),I=D(A),M=D(I),N=D(M);g(N);var j=V(N,2),R=ee=>{var $=lF(),ae=D($,!0);C($),Y(()=>Z(ae,a().product.sub_title)),x(ee,$)};ue(j,ee=>{a().product.sub_title&&ee(R)}),C(M);var X=V(M,2),U=ee=>{var $=uF(),ae=D($);C($),Y(L=>{Et(ae,1,dr(["go-ticket-info-icon",d(f)&&"is-active"])),pe(ae,"aria-expanded",d(f)),pe(ae,"aria-controls",p),pe(ae,"aria-label",L)},[()=>k.t("ticket.list.additionalInfo")]),ut("click",ae,()=>F(f,!d(f))),x(ee,$)};ue(X,ee=>{d(u)&&ee(U)});var le=V(X,2);Ef(le,()=>pm.sanitize(a().product.description),!0),C(le);var he=V(le,2),H=ee=>{var $=cF(),ae=D($,!0);C($),Y(L=>{pe($,"id",p),pe($,"hidden",!d(f)),Z(ae,L)},[()=>k.t(d(u))]),x(ee,$)};ue(he,ee=>{d(u)&&ee(H)});var oe=V(he,2),W=D(oe,!0);C(oe);var fe=V(oe,2),ce=D(fe);{let ee=P(()=>mm(a(),k.locale));vo(ce,{get value(){return a().quantity},get min(){return d(o).min},get max(){return d(o).max},get label(){return d(ee)},onChange:$=>a().quantity=$})}C(fe),C(I),C(A);var de=V(A,2),J=ee=>{var $=dF();Me($,21,()=>qa(d(c)),ae=>ae.id,(ae,L)=>{{let be=P(()=>a().mantle?.composition?.[d(L).id]??0);ju(ae,{get sub(){return d(L)},get quantity(){return d(be)},get max(){return d(l)[d(L).id]},onChange:G=>h(d(L).id,G)})}}),C($),Y(()=>pe($,"aria-label",d(c).title)),x(ee,$)};ue(de,ee=>{d(c)&&a().quantity>0&&ee(J)}),C(T),Y(()=>{Et(A,1,dr(["go-tickets-item",d(o).bookedOut&&"is-booked-out"])),pe(A,"data-testid",a().uuid),Z(W,a().price_formatted)}),x(S,T)};return ue(y,S=>{d(o)&&!d(o).unavailable&&S(E)}),x(e,m),re(v)}Bt(["click"]),ne(iy,{item:{},details:{}},[],[],{mode:"open"});var hF=q('<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 pF(e,t){te(t,!0);const r=ed(t.$$host),n=P(()=>r.value),i=P(()=>d(n)?.preCart?.items.length&&d(n)?.preCart?.items.length>0);var a=ie(),s=B(a),o=l=>{var c=hF(),f=D(c),u=D(f),p=D(u),h=D(p,!0);C(p);var g=V(p,2),v=D(g,!0);C(g);var m=V(g,2),y=D(m,!0);C(m);var E=V(m,2),S=D(E,!0);C(E),C(u),C(f);var T=V(f,2);Me(T,17,()=>d(n).preCart.items,A=>A.uuid,(A,I)=>{iy(A,{get item(){return d(I)},get details(){return d(n)}})}),C(c),Y((A,I,M,N)=>{Z(h,A),Z(v,I),Z(y,M),Z(S,N)},[()=>k.t("product.detail.table.title"),()=>k.t("product.detail.table.desc"),()=>k.t("product.detail.table.price"),()=>k.t("product.detail.table.quantity")]),x(l,c)};ue(s,l=>{d(i)&&d(n)&&l(o)}),x(e,a),re()}customElements.define("go-ticket-segment-body",ne(pF,{},[],[]));function mF(e,t){te(t,!0);const r=ed(t.$$host),n=P(()=>r.value);gt();var i=Vt();Y(()=>Z(i,d(n)?.preCart.totalFormatted)),x(e,i),re()}customElements.define("go-ticket-segment-sum",ne(mF,{},[],[]));var vF=class{#e;get tsd(){return d(this.#e)}set tsd(e){F(this.#e,e)}#t=se(Pe([]));get timeslots(){return d(this.#t)}set timeslots(e){F(this.#t,e,!0)}constructor(e){e&&(this.#e=P(()=>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=k.capacityManager.quotaManager;t.clearPrecart();for(const r of k.cart?.items??[]){const n=r.product;lo(n)&&t.setPrecartItemQuantity(n.id,r.quantity??0)}this.timeslots=t.timeslotsOn(e,this.tsd?.timeslotTicketIds).map(r=>({...r,startAt:r.timeSlot,timeFormatted:k.formatTime(r.timeSlot),available:r.capacity>0}))}},gF=q('<li><label> <input type="radio" name="timeslot"/></label></li>'),yF=q('<ul data-testid="timeslots"></ul>');function bF(e,t){te(t,!0);const r=[],n=new vF(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=>qn(h).loadTimeslots(f))),n.recalculateCapacities()})}),ve(()=>{k.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}))},a=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 s={details:n},o=ie(),l=B(o),c=f=>{var u=yF();Me(u,20,()=>n.timeslots,p=>p,(p,h)=>{const g=P(()=>h.totalCapacity===0),v=P(()=>!d(g)&&h.capacity===0),m=P(()=>d(g)||d(v)||!h.available),y=P(()=>n.tsd?.selectedTimeslot===h.startAt);var E=gF(),S=D(E),T=D(S),A=V(T);Ai(A);var I;C(S),C(E),Y(()=>{Et(E,1,dr({"go-timeslot":!0,"is-unavailable":d(g),"is-sold-out":d(v),"is-disabled":d(m),"is-selected":d(y)})),Z(T,`${h.timeFormatted??""} `),A.disabled=d(m),pe(A,"aria-disabled",d(m)),I!==(I=h.startAt)&&(A.value=(A.__value=h.startAt)??"")}),ut("change",A,a),G_(r,[],A,()=>(h.startAt,n.tsd.selectedTimeslot),M=>n.tsd.selectedTimeslot=M),x(p,E)}),C(u),x(f,u)};return ue(l,f=>{n.tsd?.isTimeslotsVisible&&f(c)}),x(e,o),re(s)}Bt(["change"]),customElements.define("go-timeslots",ne(bF,{},[],["details"]));function _F(e){return typeof e=="string"?`'${e}'`:e==null?String(e):pw(e)?"a Promise — the callback must be synchronous":`a ${typeof e}`}var wF=class{#e=se();get details(){return d(this.#e)}set details(e){F(this.#e,e,!0)}#t=se(Pe(Pi(er())));get startAt(){return d(this.#t)}set startAt(e){F(this.#t,e,!0)}#r=se(void 0);get selected(){return d(this.#r)}set selected(e){F(this.#r,e,!0)}#n=se();get availabilityOverride(){return d(this.#n)}set availabilityOverride(e){F(this.#n,e,!0)}#i=[];get endpoint(){return(this.details?.filters?.map(e=>qn(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.#a();if(!r)return t;let n;try{n=r(e.toString(),t)}catch(i){return this.#s("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.#s("returned",`[go-calendar] the availability-override callback must return 'available', 'sold_out', 'unavailable' or 'pass_through', got ${_F(n)} — using the gomus default instead.`),t)}#a(){const e=this.availabilityOverride;if(typeof e=="function")return e;if(!e)return;const t=globalThis[e];if(typeof t=="function")return t;this.#s(`unresolved:${e}`,`[go-calendar] availability-override="${e}" does not resolve to a function on window — using the gomus defaults.`,console.warn)}#s(e,t,r=console.error){this.#i.includes(e)||(this.#i.push(e),r(t))}isDateDisabled(e){return e.compare(Pi(er()))<0||this.availability(e)==="unavailable"}isDateUnavailable(e){return this.availability(e)==="sold_out"}get apiFilters(){return this.details?.filters?.map(e=>qn(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})]}#o(e){return this.fetchPeriod().reduce((t,r)=>Object.assign(t,e(this.params(r))),{})}eventsDates(){return this.#o(e=>k.calendar(e))}ticketsDates(){return this.#o(e=>k.ticketsCalendar(e))}},kF=q("<!> <!> <!>",1),SF=q("<div> </div>"),ay=q("<!> <!>",1),EF=q('<div data-calendar-wrapper=""><!></div>');function sy(e,t){te(t,!0);let r=_(t,"calendarClass",7),n=se(void 0);const i=r();ve(()=>{d(n)?.dispatchEvent(new CustomEvent("go-date-select",{detail:{selected:r().selected},bubbles:!0}))});var a={details:i,get calendarClass(){return r()},set calendarClass(l){r(l),b()}},s=EF(),o=D(s);{const l=(c,f)=>{let u=()=>f?.().months,p=()=>f?.().weekdays;var h=ay(),g=B(h);Fe(g,()=>gc,(m,y)=>{y(m,{children:(E,S)=>{var T=kF(),A=B(T);Fe(A,()=>_c,(N,j)=>{j(N,{class:"go-calendar-prev-button",children:(R,X)=>{gt();var U=Vt("Prev");x(R,U)},$$slots:{default:!0}})});var I=V(A,2);Fe(I,()=>yc,(N,j)=>{j(N,{class:"go-calendar-heading"})});var M=V(I,2);Fe(M,()=>bc,(N,j)=>{j(N,{class:"go-calendar-next-button",children:(R,X)=>{gt();var U=Vt("Next");x(R,U)},$$slots:{default:!0}})}),x(E,T)},$$slots:{default:!0}})});var v=V(g,2);Me(v,17,u,an,(m,y)=>{var E=ie(),S=B(E);Fe(S,()=>fc,(T,A)=>{A(T,{class:"go-calendar-grid",children:(I,M)=>{var N=ay(),j=B(N);Fe(j,()=>mc,(X,U)=>{U(X,{class:"go-calendar-grid-head",children:(le,he)=>{var H=ie(),oe=B(H);Fe(oe,()=>ss,(W,fe)=>{fe(W,{class:"go-calendar-grid-row",children:(ce,de)=>{var J=ie(),ee=B(J);Me(ee,17,p,an,($,ae,L,be)=>{var G=ie(),w=B(G);Fe(w,()=>vc,(_e,we)=>{we(_e,{children:(De,Le)=>{var je=SF(),_t=D(je,!0);C(je),Y(ot=>Z(_t,ot),[()=>d(ae).slice(0,2)]),x(De,je)},$$slots:{default:!0}})}),x($,G)}),x(ce,J)},$$slots:{default:!0}})}),x(le,H)},$$slots:{default:!0}})});var R=V(j,2);Fe(R,()=>hc,(X,U)=>{U(X,{class:"go-calendar-grid-body",children:(le,he)=>{var H=ie(),oe=B(H);Me(oe,17,()=>d(y).weeks,an,(W,fe,ce,de)=>{var J=ie(),ee=B(J);Fe(ee,()=>ss,($,ae)=>{ae($,{class:"go-calendar-grid-row",children:(L,be)=>{var G=ie(),w=B(G);Me(w,17,()=>d(fe),an,(_e,we,De,Le)=>{var je=ie(),_t=B(je);Fe(_t,()=>pc,(ot,Nt)=>{Nt(ot,{get date(){return d(we)},get month(){return d(y).value},class:"go-calendar-cell",children:(wt,Rt)=>{var ir=ie(),Gt=B(ir);{let gr=P(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(d(we)),"is-disabled":r().isDateDisabled(d(we)),"is-selected":r().selected?.compare(d(we))===0}));Fe(Gt,()=>dc,(Pr,Mr)=>{Mr(Pr,{get class(){return d(gr)},children:(yn,$r)=>{gt();var yr=Vt();Y(()=>Z(yr,d(we).day)),x(yn,yr)},$$slots:{default:!0}})})}x(wt,ir)},$$slots:{default:!0}})}),x(_e,je)}),x(L,G)},$$slots:{default:!0}})}),x(W,J)}),x(le,H)},$$slots:{default:!0}})}),x(I,N)},$$slots:{default:!0}})}),x(m,E)}),x(c,h)};Fe(o,()=>Pv,(c,f)=>{f(c,{weekdayFormat:"long",fixedWeeks:!0,preventDeselect:!0,type:"single",get locale(){return k.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 C(s),Us(s,l=>F(n,l),()=>d(n)),x(e,s),re(a)}ne(sy,{calendarClass:{}},[],["details"],{mode:"open"});function xF(e,t){te(t,!0);let r=_(t,"availabilityOverride",7);const n=new wF,i=n,a=gn(t.$$host),s=P(()=>a.value);ve(()=>{n.details=d(s),n.availabilityOverride=r()}),t.$$host.addEventListener("go-date-select",u=>{d(s)&&(d(s).selectedDate=u.detail.selected,d(s).selectedTimeslot=void 0)});var o={details:i,get availabilityOverride(){return r()},set availabilityOverride(u){r(u),b()}},l=ie(),c=B(l),f=u=>{sy(u,{get calendarClass(){return n}})};return ue(c,u=>{d(s)?.isCalendarVisible&&u(f)}),x(e,l),re(o)}customElements.define("go-calendar",ne(xF,{availabilityOverride:{attribute:"availability-override",type:"String"}},[],["details"]));var TF=class{#e;get ticketSelectionDetails(){return d(this.#e)}set ticketSelectionDetails(e){F(this.#e,e)}constructor(e){e&&(this.#e=P(()=>e.value))}addToCart(){if(!k.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 nt(n.product,{quantity:n.quantity,time:i,mantle:n.mantle&&{composition:{...n.mantle.composition}}})}));k.cart.addItems(t),e.forEach(r=>r.items.forEach(n=>n.quantity=0)),Ke.config.urls.cart&&Ke.config.navigateTo(Ke.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(e=>e.items.some(t=>t.quantity>0)):!1}},AF=q('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function CF(e,t){te(t,!0);const r=new TF(gn(t.$$host));var n={details:r},i=AF(),a=D(i,!0);return C(i),Y((s,o,l)=>{i.disabled=s,pe(i,"data-x",o),Z(a,l)},[()=>!r.anyTicketsSelected(),()=>!r.anyTicketsSelected(),()=>k.t("common.actions.cart")]),ut("click",i,()=>r.addToCart()),x(e,i),re(n)}Bt(["click"]),customElements.define("go-add-to-cart-button",ne(CF,{},[],["details"]));function OF(e,t){te(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 a=i.target.details,s=await k.withdrawal(a.formData);s.response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=s.error?.errors??[k.t("withdrawal.form.errors.requestFailed")]}return Hr(t.$$host,"go-form",{"form-id":"withdrawal",custom:r()}),t.$$host.addEventListener("submit",n),re({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-withdrawal-form",ne(OF,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));async function DF({filter:e,...t}){if(!k.cart)throw new Error("(go.cart.addItem) shop not initialized — call go.init first");const r=qn(e);if(!r?.addToCart)throw new Error(`(go.cart.addItem) filter '${e}' cannot add to the cart`);return r.addToCart(t)}var cs=null;async function ds(){if(cs)return cs;if(!k.client)throw new Error("[go] Shop not initialized — call go.init({ shop, api, locale }) first.")}var IF=e=>e.split(".").reduce((t,r)=>t?.[r],oy);async function PF(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=IF(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=oy,t&&(t._queue=null)}var oy={loaded:!0,config:e=>{Ke.define(e)},init:async e=>{try{cs=k.load("https://"+e.api,e.shop,e.locale),await cs}catch(t){throw cs=null,t}},api:{getCustomer:async()=>(await ds(),k.asyncFetch(()=>k.getCustomer())),getOrders:async e=>(await ds(),k.asyncFetch(()=>k.getOrders(e))),getCustomerAddresses:async()=>(await ds(),k.asyncFetch(()=>k.getCustomerAddresses())),getCustomerMemberships:async()=>(await ds(),k.asyncFetch(()=>k.getCustomerMemberships()))},cart:{addItem:async e=>(await ds(),DF(e))}};(async()=>await PF(window))()})();
|
|
83
|
+
`;break;case"r":r+="\r";break;case"t":r+=" ";break;case"u":var i=e.substring(t+1,t+5);KM.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 a=e.indexOf("\\",t);r+=e.substring(t,a<0?e.length:a),t=a}return r},st.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},st.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 a=this.expression.charAt(e);if(r.test(a))e++,n=!0;else break}return n&&(this.current=this.newToken(Ko,parseInt(this.expression.substring(i,e),t)),this.pos=e),n},st.prototype.isNumber=function(){for(var e=!1,t=this.pos,r=t,n=t,i=!1,a=!1,s;t<this.expression.length&&(s=this.expression.charAt(t),s>="0"&&s<="9"||!i&&s===".");)s==="."?i=!0:a=!0,t++,e=a;if(e&&(n=t),s==="e"||s==="E"){t++;for(var o=!0,l=!1;t<this.expression.length;){if(s=this.expression.charAt(t),o&&(s==="+"||s==="-"))o=!1;else if(s>="0"&&s<="9")l=!0,o=!1;else break;t++}l||(t=n)}return e?(this.current=this.newToken(Ko,parseFloat(this.expression.substring(r,t))),this.pos=t):this.pos=n,e},st.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(Ke,t);else if(t==="∙"||t==="•")this.current=this.newToken(Ke,"*");else if(t===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ke,">="),this.pos++):this.current=this.newToken(Ke,">");else if(t==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ke,"<="),this.pos++):this.current=this.newToken(Ke,"<");else if(t==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(Ke,"||"),this.pos++;else return!1;else if(t==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ke,"=="),this.pos++):this.current=this.newToken(Ke,t);else if(t==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ke,"!="),this.pos++):this.current=this.newToken(Ke,t);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=e,!1)},st.prototype.isOperatorEnabled=function(e){return this.parser.isOperatorEnabled(e)},st.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}},st.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)};function Je(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}Je.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},Je.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?ta(t,e.value):typeof t=="function"?t(e):e.value===t},Je.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},Je.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},Je.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},Je.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))}},Je.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.accept(Kc)||this.accept(Ke,r))e.push(new Ne(fn,this.current.value));else if(this.accept(Ko))e.push(new Ne(vr,this.current.value));else if(this.accept(Ig))e.push(new Ne(vr,this.current.value));else if(this.accept(mn,"("))this.parseExpression(e),this.expect(mn,")");else if(this.accept(ra,"["))if(this.accept(ra,"]"))e.push(new Ne(ea,0));else{var n=this.parseArrayList(e);e.push(new Ne(ea,n))}else throw new Error("unexpected "+this.nextToken)},Je.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},Je.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},Je.prototype.parseUntilEndStatement=function(e,t){return this.accept(Yc)?(this.nextToken&&this.nextToken.type!==us&&!(this.nextToken.type===mn&&this.nextToken.value===")")&&t.push(new Ne(Ho)),this.nextToken.type!==us&&this.parseExpression(t),e.push(new Ne(Ht,t)),!0):!1},Je.prototype.parseArrayList=function(e){for(var t=0;!this.accept(ra,"]");)for(this.parseExpression(e),++t;this.accept(Yo);)this.parseExpression(e),++t;return t},Je.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(Ke,"=");){var t=e.pop(),r=[],n=e.length-1;if(t.type===Xi){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,a=t.value+1;i<a;i++){var s=n-i;e[s].type===fn&&(e[s]=new Ne(di,e[s].value))}this.parseVariableAssignmentExpression(r),e.push(new Ne(Ht,r)),e.push(new Ne(Wo,t.value));continue}if(t.type!==fn&&t.type!==fi)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),e.push(new Ne(di,t.value)),e.push(new Ne(Ht,r)),e.push(hn("="))}},Je.prototype.parseConditionalExpression=function(e){for(this.parseOrExpression(e);this.accept(Ke,"?");){var t=[],r=[];this.parseConditionalExpression(t),this.expect(Ke,":"),this.parseConditionalExpression(r),e.push(new Ne(Ht,t)),e.push(new Ne(Ht,r)),e.push(Cg("?"))}},Je.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(Ke,"or");){var t=[];this.parseAndExpression(t),e.push(new Ne(Ht,t)),e.push(hn("or"))}},Je.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(Ke,"and");){var t=[];this.parseComparison(t),e.push(new Ne(Ht,t)),e.push(hn("and"))}};var YM=["==","!=","<","<=",">=",">","in"];Je.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(Ke,YM);){var t=this.current;this.parseAddSub(e),e.push(hn(t.value))}};var JM=["+","-","||"];Je.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(Ke,JM);){var t=this.current;this.parseTerm(e),e.push(hn(t.value))}};var QM=["*","/","%"];Je.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(Ke,QM);){var t=this.current;this.parseFactor(e),e.push(hn(t.value))}},Je.prototype.parseFactor=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.save(),this.accept(Ke,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===Yo||this.nextToken.type===us||this.nextToken.type===mn&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var n=this.current;this.parseFactor(e),e.push(Go(n.value))}else this.parseExponential(e)},Je.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(Ke,"^");)this.parseFactor(e),e.push(hn("^"))},Je.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(Ke,"!");)e.push(Go("!"))},Je.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function r(a){return a.value in t}if(this.accept(Ke,r)){var n=this.current;this.parseAtom(e),e.push(Go(n.value))}else for(this.parseMemberExpression(e);this.accept(mn,"(");)if(this.accept(mn,")"))e.push(new Ne(Xi,0));else{var i=this.parseArgumentList(e);e.push(new Ne(Xi,i))}},Je.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(mn,")");)for(this.parseExpression(e),++t;this.accept(Yo);)this.parseExpression(e),++t;return t},Je.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(Ke,".")||this.accept(ra,"[");){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 Ne(fi,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(ra,"]"),e.push(hn("["))}else throw new Error("unexpected symbol: "+t.value)}};function XM(e,t){return Number(e)+Number(t)}function e2(e,t){return e-t}function t2(e,t){return e*t}function r2(e,t){return e/t}function n2(e,t){return e%t}function i2(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function a2(e,t){return e===t}function s2(e,t){return e!==t}function o2(e,t){return e>t}function l2(e,t){return e<t}function u2(e,t){return e>=t}function c2(e,t){return e<=t}function d2(e,t){return!!(e&&t)}function f2(e,t){return!!(e||t)}function h2(e,t){return ta(t,e)}function p2(e){return(Math.exp(e)-Math.exp(-e))/2}function m2(e){return(Math.exp(e)+Math.exp(-e))/2}function v2(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function g2(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function y2(e){return Math.log(e+Math.sqrt(e*e-1))}function b2(e){return Math.log((1+e)/(1-e))/2}function Mg(e){return Math.log(e)*Math.LOG10E}function _2(e){return-e}function w2(e){return!e}function k2(e){return e<0?Math.ceil(e):Math.floor(e)}function S2(e){return Math.random()*(e||1)}function $g(e){return Qc(e+1)}function E2(e){return isFinite(e)&&e===Math.round(e)}var x2=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(E2(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 a=e*e,s=a*e,o=s*e,l=o*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*a)-139/(51840*s)-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+x2+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function T2(e){return Array.isArray(e)?e.length:String(e).length}function Fg(){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 Ng(e,t,r){return e?t:r}function A2(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 C2(e,t,r){return r&&(r[e]=t),t}function O2(e,t){return e[t|0]}function D2(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function I2(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function P2(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 M2(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,a){return e(n,i,a)},t)}function $2(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 F2(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 N2(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function R2(e){return(e>0)-(e<0)||+e}var Rg=1/3;function L2(e){return e<0?-Math.pow(-e,Rg):Math.pow(e,Rg)}function z2(e){return Math.exp(e)-1}function q2(e){return Math.log(1+e)}function U2(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||p2,cosh:Math.cosh||m2,tanh:Math.tanh||v2,asinh:Math.asinh||g2,acosh:Math.acosh||y2,atanh:Math.atanh||b2,sqrt:Math.sqrt,cbrt:Math.cbrt||L2,log:Math.log,log2:Math.log2||U2,ln:Math.log,lg:Math.log10||Mg,log10:Math.log10||Mg,expm1:Math.expm1||z2,log1p:Math.log1p||q2,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||k2,"-":_2,"+":Number,exp:Math.exp,not:w2,length:T2,"!":$g,sign:Math.sign||R2},this.binaryOps={"+":XM,"-":e2,"*":t2,"/":r2,"%":n2,"^":Math.pow,"||":i2,"==":a2,"!=":s2,">":o2,"<":l2,">=":u2,"<=":c2,and:d2,or:f2,in:h2,"=":C2,"[":O2},this.ternaryOps={"?":Ng},this.functions={random:S2,fac:$g,min:I2,max:D2,hypot:Math.hypot||Fg,pyt:Math.hypot||Fg,pow:Math.pow,atan2:Math.atan2,if:Ng,gamma:Qc,roundTo:A2,map:P2,fold:M2,filter:$2,indexOf:F2,join:N2},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}pi.prototype.parse=function(e){var t=[],r=new Je(this,new st(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(us,"EOF"),new Ir(t,this)},pi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var Lg=new pi;pi.parse=function(e){return Lg.parse(e)},pi.evaluate=function(e,t){return Lg.parse(e).evaluate(t)};var zg={"+":"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 B2(e){return zg.hasOwnProperty(e)?zg[e]:e}pi.prototype.isOperatorEnabled=function(e){var t=B2(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var V2=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,j2=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,Z2=/(__optional\("[^"]+"\))\.length\b/g,W2=new pi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),qg=new Map;function H2(e){return e.replace(V2,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace(j2,(t,r)=>`__length(${r})`).replace(Z2,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function G2(e){const t=qg.get(e);if(t)return t;const r=W2.parse(H2(e));return qg.set(e,r),r}function K2(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,a)=>{if(i!=null)return i[a]},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=G2(e);for(const i of n.symbols()){if(r[i]!==void 0)continue;const a=globalThis[i];typeof a=="function"&&(r[i]=a)}return n.evaluate(r)}catch(n){console.error(`Error while evaluating when (${e}) in go-if: ${n.message}`)}}var Ug=["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","tour"],Y2=7200*1e3;function Xc(e,{id:t,quantity:r,time:n}){if(!(r>0))throw new Error("(go.cart.addItem) 'quantity' must be a positive number");if(!e)throw new Error(`(go.cart.addItem) ticket ${t} not available (sold out or unknown)`);const i=nt(e,{quantity:r,time:n??e.selectedTime}),{max:a}=k.capacityManager.capacity(k.cart,i,ei());if(r>a)throw new Error(`(go.cart.addItem) only ${a} left for ticket ${t}`);return k.cart.addItem(i),i.uuid}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 k.asyncFetch(()=>k.ticketsContent(r))??[],i=new Map(n.map(a=>[a.id,a.content]));for(const a of t){if(typeof a.id!="number")continue;const s=i.get(a.id);s&&(a.content=s)}}catch{}}function Jo(e,t){k.capacityManager.addQuotas(t),e.timeslotTicketIds=[...e.timeslotTicketIds,...Object.values(t).flatMap(r=>r.ticket_ids)]}function Qo(e,t,r){const n=Date.parse(r);return e.filter(i=>{const a=i.start_time.slice(0,10),s=Date.parse(i.start_time);return a===t&&s>=n&&s<=n+Y2&&(i.seats?.available??0)>0})}async function Xo(e){if(!e?.selectedDate)return;const{quotas:t}=await k.asyncFetch(()=>k.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}));Jo(e,t)}async function Bg(e,t){const{tickets:r,quotas:n}=await k.asyncFetch(()=>k.ticketsAndQuotas({by_bookable:!0,by_ticket_type:"time_slot",...e}));return k.capacityManager.addQuotas(n),Ba(Va(r,t),t)}var J2={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 addToCart(e){const{id:t,quantity:r,time:n}=e;if(!n)throw new Error("(go.cart.addItem) ticket:timeslot requires a 'time'");const i=(await Bg({valid_at:n.slice(0,10),"by_ticket_ids[]":[t]},n))[0];return Xc(i,{id:t,quantity:r,time:n})},async loadTimeslots(e){if(!e?.selectedDate)return;const{quotas:t}=await k.asyncFetch(()=>k.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}));Jo(e,t)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTimeslot)return;const r=await Bg({valid_at:t.selectedDate.toString(),"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},t.selectedTimeslot);await vn(e,r);for(const n of r)e.preCart.addItem(nt(n,{time:t.selectedTime}))}};async function Vg(e){const{tickets:t,quotas:r}=await k.asyncFetch(()=>k.ticketsAndQuotas({by_bookable:!0,"by_ticket_types[]":["normal"],...e}));return k.capacityManager.addQuotas(r),Du(t)}var Q2={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async addToCart(e){const{id:t,quantity:r,date:n}=e;if(!n)throw new Error("(go.cart.addItem) ticket:day requires a 'date'");const i=(await Vg({valid_at:n,"by_ticket_ids[]":[t]}))[0];return Xc(i,{id:t,quantity:r})},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate)return;const r=await Vg({valid_at:t.selectedDate.toString(),"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});await vn(e,r);for(const n of r)e.preCart.addItem(nt(n,{time:n.selectedTime}))}};async function jg(e){const t=await k.asyncFetch(()=>k.tickets({by_bookable:!0,"by_ticket_types[]":["annual"],...e}));return Object.values(t).map(r=>Ua(r))}var X2={name:"ticket:annual",calendarEndpoint:null,apiToken:"annual",requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async addToCart(e){const{id:t,quantity:r}=e,n=(await jg({"by_ticket_ids[]":[t]}))[0];return Xc(n,{id:t,quantity:r})},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t)return;const r=await jg({"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds});await vn(e,r);for(const n of r)e.preCart.addItem(nt(n))}},e$={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 k.asyncFetch(()=>k.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await k.asyncFetch(()=>k.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_bookable:!0,valid_at:e.selectedDate.toString()}));Jo(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await k.asyncFetch(()=>k.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await k.asyncFetch(()=>k.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_bookable:!0,valid_at:t.selectedDate.toString()}));k.capacityManager.addQuotas(i);const a=Ba(Va(n,t.selectedTime),t.selectedTime);await vn(e,a);for(const s of a)e.preCart.addItem(nt(s,{time:t.selectedTime}))}},t$={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 k.asyncFetch(()=>k.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await k.asyncFetch(()=>k.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:t.selectedDate.toString()}));k.capacityManager.addQuotas(i);const a=Du(n);await vn(e,a);for(const s of a)e.preCart.addItem(nt(s,{time:s.selectedTime}))}},r$={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 k.asyncFetch(()=>k.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await k.asyncFetch(()=>k.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:e.selectedDate.toString()}));Jo(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate||!t.selectedTimeslot)return;const r=await k.asyncFetch(()=>k.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await k.asyncFetch(()=>k.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:t.selectedDate.toString()}));k.capacityManager.addQuotas(i);const a=Ba(Va(n,t.selectedTime),t.selectedTime);await vn(e,a);for(const s of a)e.preCart.addItem(nt(s,{time:t.selectedTime}))}},n$={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 k.asyncFetch(()=>k.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(nt(i,{time:r.start_time}))}r.seats&&k.capacityManager.addSeats(r.id,r.seats)}}},i$={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Xo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Qo(await k.asyncFetch(()=>k.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 k.asyncFetch(()=>k.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:a,quotas:s}=await k.asyncFetch(()=>k.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_bookable:!0,valid_at:n.start_time.slice(0,10)}));k.capacityManager.addQuotas(s);const o=Ba(Va(a,n.start_time),n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(nt(l,{time:n.start_time}))}}},a$={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Xo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Qo(await k.asyncFetch(()=>k.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 k.asyncFetch(()=>k.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:a,quotas:s}=await k.asyncFetch(()=>k.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:n.start_time.slice(0,10)}));k.capacityManager.addQuotas(s);const o=Du(a,n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(nt(l,{time:l.selectedTime}))}}},s$={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Xo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Qo(await k.asyncFetch(()=>k.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 k.asyncFetch(()=>k.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:a,quotas:s}=await k.asyncFetch(()=>k.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:n.start_time.slice(0,10)}));k.capacityManager.addQuotas(s);const o=Ba(Va(a,n.start_time),n.start_time);await vn(e,o);for(const l of o)e.preCart.addItem(nt(l,{time:n.start_time}))}}},o$={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Xo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Qo(await k.asyncFetch(()=>k.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 a=n?i.prices.filter(s=>s.title?.includes(n)):i.prices;for(const s of a){const o=Pu(s,i.id,{event_title:i.event_title});e.preCart.addItem(nt(o,{time:i.start_time}))}i.seats&&k.capacityManager.addSeats(i.id,i.seats)}}},l$={name:"coupon",calendarEndpoint:null,requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,loadTimeslots:async()=>{},async loadProducts(e){const t=await k.asyncFetch(()=>k.getCoupons());for(const r of t??[])e.preCart.addItem(nt(_p(r)))}},u$=["id","time","participants","languageId","totalPriceCents","title"],c$={name:"tour",calendarEndpoint:null,requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async loadProducts(){},async addToCart(e){const t=e;for(const a of u$)if(t[a]==null||t[a]==="")throw new Error(`(go.cart.addItem) tour '${a}' is required`);if(!(t.participants>0))throw new Error("(go.cart.addItem) tour 'participants' must be a positive number");if(t.quantities){const a=fr(Object.values(t.quantities));if(a!==t.participants)throw new Error(`(go.cart.addItem) tour 'quantities' must sum to 'participants' (${a} !== ${t.participants})`)}const{time:r,...n}=t,i=nt(yp(n),{quantity:1,time:r});return k.cart.addItem(i),i.uuid}},d$={"ticket:timeslot":J2,"ticket:day":Q2,"ticket:annual":X2,"event:admission":e$,"event:admission:day":t$,"event:admission:timeslot":r$,"event:price":n$,"events:admission":i$,"events:admission:day":a$,"events:admission:timeslot":s$,"events:price":o$,coupon:l$,tour:c$};function qn(e){const t=d$[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${Ug.join(", ")}`),t}var Zg=Ug,f$=0,h$=class{uid=f$++;#e=se();get filters(){return d(this.#e)}set filters(e){F(this.#e,e,!0)}#t=se();get eventIds(){return d(this.#t)}set eventIds(e){F(this.#t,e,!0)}#r=se();get museumIds(){return d(this.#r)}set museumIds(e){F(this.#r,e,!0)}#n=se();get exhibitionIds(){return d(this.#n)}set exhibitionIds(e){F(this.#n,e,!0)}#i=se();get ticketIds(){return d(this.#i)}set ticketIds(e){F(this.#i,e,!0)}#a=se();get ticketGroupIds(){return d(this.#a)}set ticketGroupIds(e){F(this.#a,e,!0)}#s=se();get selectedDate(){return d(this.#s)}set selectedDate(e){F(this.#s,e,!0)}#o=se();get selectedTimeslot(){return d(this.#o)}set selectedTimeslot(e){F(this.#o,e,!0)}timeslotTicketIds=[];#l=P(()=>this.selectedTimeslot);get selectedTime(){return d(this.#l)}set selectedTime(e){F(this.#l,e)}#u=se(Pe([]));get ticketSegments(){return d(this.#u)}set ticketSegments(e){F(this.#u,e,!0)}#c=P(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return d(this.#c)}set preCarts(e){F(this.#c,e)}#d=se();get timeslotDetails(){return d(this.#d)}set timeslotDetails(e){F(this.#d,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>qn(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>qn(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>qn(e).isTicketsVisible(this))}},Wg="go-ticket-selection",p$=Fi(Wg),gn=Ni(Wg);function m$(e,t){te(t,!0);let r=_(t,"when",7),n=_(t,"then",7,"show");const i=gn(t.$$host),a=P(()=>i.value),s=Rx(t.$$host),o=P(()=>s.value),l=Ri(t.$$host),c=P(()=>l.value),f=Li(t.$$host),u=P(()=>f.value),p=k.auth;let h=P(()=>({ticketSelection:d(a),personalizationDetails:d(o),formData:d(c)?.formData,cart:k.cart,cartView:d(u),auth:{isAuthenticated:p.isAuthenticated(),isLoggedIn:p.isLoggedIn(),isGuest:p.isGuest()}}));const y=S=>{F(h,S)},v=()=>d(h);let m=P(()=>K2(r(),d(h))),g=null;ve(()=>{const S=t.$$host;if(d(m)&&n()==="show")g&&(S.appendChild(g),g=null);else if(!g&&S.childNodes.length>0)for(g=document.createDocumentFragment();S.firstChild;)g.appendChild(S.firstChild)});var E={_setData:y,_getData:v,get when(){return r()},set when(S){r(S),b()},get then(){return n()},set then(S="show"){n(S),b()}};return re(E)}customElements.define("go-if",ne(m$,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function Hg(e,t){te(t,!0);let r=_(t,"apiUrl",7),n=_(t,"shopDomain",7),i=_(t,"locale",7);return i(i()||localStorage.getItem("lang")||"en"),ve(()=>{(n()!==k.shopDomain||r()!==k.apiUrl||i()!==k.locale)&&(k.load(r(),n(),i()),console.warn("shop loaded due to prop change"))}),re({get apiUrl(){return r()},set apiUrl(a){r(a),b()},get shopDomain(){return n()},set shopDomain(a){n(a),b()},get locale(){return i()},set locale(a){i(a),b()}})}customElements.define("gomus-init",ne(Hg,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function v$(e,t){te(t,!0);let r=_(t,"apiDomain",7),n=_(t,"shopDomain",7),i=_(t,"locale",7),a=`https://${r()}`;var s={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 Hg(e,{get apiUrl(){return a},get shopDomain(){return n()},get locale(){return i()}}),re(s)}customElements.define("go-init",ne(v$,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function g$(e,t){te(t,!0);const r=_(t,"to",7),n=P(()=>Ge.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",a=>{if(a.preventDefault(),!Ge.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}Ge.config.navigateTo(Ge.config.urls[r()]())}),re({get to(){return r()},set to(a){r(a),b()}})}customElements.define("go-link",ne(g$,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));function y$(e,t){te(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 a=i.target.details;(await k.activateMembership(a.formData)).response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=[k.t("membership.activation.form.errors.requestFailed")]}return Hr(t.$$host,"go-form",{"form-id":"membershipActivation",custom:r()}),t.$$host.addEventListener("submit",n),re({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-membership-activation",ne(y$,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));var b$=class{#e=se();get token(){return d(this.#e)}set token(e){F(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return pl(k.order(this.token))}downloadLink(e,t){if(this.order?.is_valid)switch(e.type){case"Event":return`${k.apiUrl}/api/v4/orders/${this.order.id}/events/${e.attributes.id}.pdf?locale=${k.locale}&token=${this.token}`;case"Coupon":return`${k.apiUrl}/api/v4/orders/${this.order.id}/coupons/${e.attributes.id}.pdf?locale=${k.locale}&token=${this.token}`;case"Ticket":return e.attributes.ticket_type==="annual"&&!e.attributes.is_voucher?Ge.config.urls.annualTicketPersonalizationList?Ge.config.urls.annualTicketPersonalizationList(this.token):k.urls?.annualTicketPersonalizationList(this.token):`${k.apiUrl}/api/v4/orders/${this.order.id}/tickets/${e.attributes.id}.pdf?locale=${k.locale}&token=${this.token}&barcode_id=${t}`;default:break}}},Gg="go-order-details",_$=Fi(Gg),Kg=Ni(Gg);function w$(e,t){te(t,!0);let r=_(t,"token",7);const n=new b$(r());_$(t.$$host,n);let i;ve(()=>{n.token=r();const s=k.cart;!s||i===r()||(i=r(),Re(()=>{s.clearItems(),s.clearCoupons(),s.clearDonations(),k.auth.isGuest()&&k.auth.signOut()}))});var a={orderDetails:n,get token(){return r()},set token(s){r(s),b()}};return re(a)}customElements.define("go-order",ne(w$,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var k$=q('<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <br/> <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></ul></article></li>');function Yg(e,t){te(t,!0);let r=_(t,"item",7),n=_(t,"orderDetails",7);const i=P(()=>r().attributes.value_cents>0?r().attributes.value_cents:r().price_cents);var a={get item(){return r()},set item(E){r(E),b()},get orderDetails(){return n()},set orderDetails(E){n(E),b()}},s=k$(),o=D(s),l=D(o),c=D(l),f=D(c,!0);C(c);var u=V(c,2),p=D(u),h=D(p,!0);C(p);var y=V(p,4),v=D(y,!0);C(y),C(u);var m=V(u,2),g=D(m,!0);return C(m),gt(2),C(l),C(o),C(s),Y((E,S,T)=>{Z(f,r().attributes.quantity),Z(h,r().attributes.title),pe(y,"href",E),Z(v,S),Z(g,T)},[()=>n().downloadLink(r()),()=>k.t("common.download"),()=>et(d(i))]),x(e,s),re(a)}ne(Yg,{item:{},orderDetails:{}},[],[],{mode:"open"});var S$=q('<li class="go-order-breakdown-donation"><article><ul><li class="go-order-breakdown-count">1</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){te(t,!0);let r=_(t,"donation",7);const n=P(()=>k.donations?.campaigns?.find(h=>h.id===r().donation_campaign_id));var i={get donation(){return r()},set donation(h){r(h),b()}},a=S$(),s=D(a),o=D(s),l=V(D(o),2),c=D(l),f=D(c,!0);C(c),C(l);var u=V(l,2),p=D(u,!0);return C(u),gt(2),C(o),C(s),C(a),Y((h,y)=>{Z(f,h),Z(p,y)},[()=>d(n)?.name??k.t("common.table.donation"),()=>et(r().donation_cents)]),x(e,a),re(i)}ne(Jg,{donation:{}},[],[],{mode:"open"});var E$=q('<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),x$=q('<br/> <span class="go-order-item-quantities"> </span>',1),T$=q('<a aria-label="iCal link"> </a>'),A$=q('<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 Qg(e,t){te(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()}},a=A$(),s=D(a),o=D(s),l=V(D(o),2),c=D(l),f=D(c,!0);C(c);var u=V(c,2),p=A=>{var I=E$(),M=B(I),N=D(M,!0);C(M);var j=V(M,2),R=D(j,!0);C(j),Y((X,U)=>{Z(N,X),Z(R,U)},[()=>k.formatDate(r().attributes.start_time,"dayMonth"),()=>k.formatTime(r().attributes.start_time)]),x(A,I)};ue(u,A=>{r().attributes.start_time&&A(p)});var h=V(u,2);Me(h,17,()=>r().attributes.quantities,A=>A.id,(A,I)=>{var M=x$(),N=V(B(M),2),j=D(N);C(N),Y(()=>Z(j,`${d(I).quantity??""} x ${d(I).title??""}`)),x(A,M)});var y=V(h,2),v=D(y,!0);C(y),C(l);var m=V(l,2),g=D(m,!0);C(m);var E=V(m,4),S=D(E),T=A=>{var I=T$(),M=D(I,!0);C(I),Y(N=>{pe(I,"href",k.apiUrl+r().attributes.ical_url),Z(M,N)},[()=>k.t("common.calendar")]),x(A,I)};return ue(S,A=>{r().attributes.ical_url&&A(T)}),C(E),C(o),C(s),C(a),Y((A,I,M)=>{Z(f,r().attributes.title),pe(y,"href",A),Z(v,I),Z(g,M)},[()=>n().downloadLink(r()),()=>k.t("common.download"),()=>et(r().price_cents)]),x(e,a),re(i)}ne(Qg,{item:{},orderDetails:{}},[],[],{mode:"open"});var C$=q('<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 Xg(e,t){te(t,!0);let r=_(t,"item",7);var n={get item(){return r()},set item(y){r(y),b()}},i=C$(),a=D(i),s=D(a),o=D(s),l=D(o,!0);C(o);var c=V(o,2),f=D(c),u=D(f,!0);C(f),C(c);var p=V(c,2),h=D(p,!0);return C(p),gt(2),C(s),C(a),C(i),Y(y=>{Z(l,r().attributes.quantity),Z(u,r().attributes.title),Z(h,y)},[()=>et(r().price_cents)]),x(e,i),re(n)}ne(Xg,{item:{}},[],[],{mode:"open"});var ey=q('<span class="go-order-item-subtitle" data-testid="order-item-subtitle"> </span>'),O$=q('<br/> <span class="go-order-item-quantities" data-testid="order-sub-ticket"> </span>',1),D$=q('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),I$=q('<span class="go-cart-item-date"> </span>'),P$=q('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),M$=q('<br/> <a class="go-ticket-personalization"> </a>',1),$$=q('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),F$=q('<a aria-label="iCal link"> </a>'),N$=q('<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>'),R$=q('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),L$=q('<a class="go-ticket-personalization"> </a>'),z$=q('<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 ty(e,t){te(t,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${k.locale}.svg`;let n=_(t,"item",7),i=_(t,"orderDetails",7);const a=P(()=>(n().attributes.sub_ticket_sales??[]).filter(u=>u.quantity>0));var s={get item(){return n()},set item(u){n(u),b()},get orderDetails(){return i()},set orderDetails(u){i(u),b()}},o=ie(),l=B(o),c=u=>{var p=ie(),h=B(p);Me(h,17,()=>({length:n().attributes.quantity}),an,(y,v,m)=>{var g=N$(),E=D(g),S=D(E),T=D(S);T.textContent="1";var A=V(T,2),I=D(A),M=D(I,!0);C(I);var N=V(I,2),j=ee=>{var $=ey(),ae=D($,!0);C($),Y(()=>Z(ae,n().attributes.sub_title)),x(ee,$)};ue(N,ee=>{n().attributes.sub_title&&ee(j)});var R=V(N,2);Me(R,17,()=>d(a),ee=>ee.id,(ee,$)=>{var ae=O$(),L=V(B(ae),2),be=D(L);C(L),Y(()=>Z(be,`${d($).quantity??""} x ${d($).title??""}`)),x(ee,ae)});var X=V(R,2),U=ee=>{const $=P(()=>n().attributes.barcodes[m]?.id);var ae=P$(),L=B(ae),be=we=>{var De=D$(),Le=B(De),je=D(Le,!0);C(Le);var _t=V(Le,2),ot=D(_t,!0);C(_t),Y((Nt,wt)=>{Z(je,Nt),Z(ot,wt)},[()=>k.formatDate(n().attributes.start_time,"dayMonth"),()=>k.formatTime(n().attributes.start_time)]),x(we,De)},G=we=>{var De=I$(),Le=D(De,!0);C(De),Y(je=>Z(Le,je),[()=>k.formatDate(n().attributes.start_time,"dayMonth")]),x(we,De)};ue(L,we=>{n().attributes.ticket_type==="time_slot"?we(be):n().attributes.ticket_type==="normal"&&we(G,1)});var w=V(L,4),_e=D(w,!0);C(w),Y((we,De)=>{pe(w,"href",we),Z(_e,De)},[()=>i().downloadLink(n(),d($)),()=>k.t("common.download")]),x(ee,ae)},le=ee=>{var $=M$(),ae=V(B($),2),L=D(ae,!0);C(ae),Y((be,G)=>{pe(ae,"href",be),Z(L,G)},[()=>i().downloadLink(n()),()=>k.t("common.personalize")]),x(ee,$)};ue(X,ee=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?ee(U):ee(le,-1)}),C(A);var he=V(A,2),H=D(he,!0);C(he);var oe=V(he,2),W=D(oe),fe=ee=>{var $=$$(),ae=D($);C($),Y(()=>{pe($,"href",k.apiUrl+n().attributes.barcodes[m]?.passbook_url),pe(ae,"src",r)}),x(ee,$)};ue(W,ee=>{n().attributes.barcodes[m]&&n().attributes.barcodes[m]?.passbook_url&&ee(fe)}),C(oe);var ce=V(oe,2),de=D(ce),J=ee=>{var $=F$(),ae=D($,!0);C($),Y(L=>{pe($,"href",k.apiUrl+n().attributes.ical_url),Z(ae,L)},[()=>k.t("common.calendar")]),x(ee,$)};ue(de,ee=>{n().attributes.ical_url&&ee(J)}),C(ce),C(S),C(E),C(g),Y(ee=>{Z(M,n().attributes.title),Z(H,ee)},[()=>et(n().price_cents)]),x(y,g)}),x(u,p)},f=u=>{var p=z$(),h=D(p),y=D(h),v=D(y),m=D(v,!0);C(v);var g=V(v,2),E=D(g),S=D(E,!0);C(E);var T=V(E,2),A=X=>{var U=ey(),le=D(U,!0);C(U),Y(()=>Z(le,n().attributes.sub_title)),x(X,U)};ue(T,X=>{n().attributes.sub_title&&X(A)});var I=V(T,2),M=X=>{var U=R$(),le=D(U,!0);C(U),Y((he,H)=>{pe(U,"href",he),Z(le,H)},[()=>i().downloadLink(n()),()=>k.t("common.download")]),x(X,U)},N=X=>{var U=L$(),le=D(U,!0);C(U),Y((he,H)=>{pe(U,"href",he),Z(le,H)},[()=>i().downloadLink(n()),()=>k.t("common.personalize")]),x(X,U)};ue(I,X=>{n().attributes.is_voucher?X(M):X(N,-1)}),C(g);var j=V(g,2),R=D(j,!0);C(j),gt(2),C(y),C(h),C(p),Y(X=>{Z(m,n().attributes.quantity),Z(S,n().attributes.title),Z(R,X)},[()=>et(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),re(s)}ne(ty,{item:{},orderDetails:{}},[],[],{mode:"open"});var q$=q('<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),U$=q('<br/> <span class="go-order-item-quantities"> </span>',1),B$=q('<a aria-label="iCal link"> </a>'),V$=q('<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 ry(e,t){te(t,!0);let r=_(t,"item",7);const n=P(()=>(r().attributes.prices??[]).filter(A=>A.title&&A.quantity!=null));var i={get item(){return r()},set item(A){r(A),b()}},a=V$(),s=D(a),o=D(s),l=V(D(o),2),c=D(l),f=D(c,!0);C(c);var u=V(c,2),p=D(u,!0);C(u);var h=V(u,2),y=A=>{var I=q$(),M=B(I),N=D(M,!0);C(M);var j=V(M,2),R=D(j,!0);C(j),Y((X,U)=>{Z(N,X),Z(R,U)},[()=>k.formatDate(r().attributes.start_time,"dayMonth"),()=>k.formatTime(r().attributes.start_time)]),x(A,I)};ue(h,A=>{r().attributes.start_time&&A(y)});var v=V(h,2);Me(v,17,()=>d(n),A=>A.title,(A,I)=>{var M=U$(),N=V(B(M),2),j=D(N);C(N),Y(()=>Z(j,`${d(I).quantity??""} x ${d(I).title??""}`)),x(A,M)}),C(l);var m=V(l,2),g=D(m,!0);C(m);var E=V(m,4),S=D(E),T=A=>{var I=B$(),M=D(I,!0);C(I),Y(N=>{pe(I,"href",k.apiUrl+r().attributes.ical_url),Z(M,N)},[()=>k.t("common.calendar")]),x(A,I)};return ue(S,A=>{r().attributes.ical_url&&A(T)}),C(E),C(o),C(s),C(a),Y((A,I)=>{Z(f,r().attributes.title),Z(p,A),Z(g,I)},[()=>k.t("cart.item.participants",{count:r().attributes.participants}),()=>et(r().price_cents)]),x(e,a),re(i)}ne(ry,{item:{}},[],[],{mode:"open"});var j$=q('<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 Z$(e,t){te(t,!0);const r=Kg(t.$$host),n=P(()=>r.value);let i=P(()=>d(n)?.order);var a=ie(),s=B(a),o=l=>{var c=j$(),f=D(c),u=D(f),p=D(u),h=D(p,!0);C(p);var y=V(p,2),v=D(y,!0);C(y);var m=V(y,2),g=D(m,!0);C(m),gt(2),C(u),C(f);var E=V(f,2);Me(E,17,()=>d(i).items,N=>N.id,(N,j)=>{var R=ie(),X=B(R),U=W=>{ty(W,{get item(){return d(j)},get orderDetails(){return d(n)}})},le=W=>{Qg(W,{get item(){return d(j)},get orderDetails(){return d(n)}})},he=W=>{ry(W,{get item(){return d(j)}})},H=W=>{Yg(W,{get item(){return d(j)},get orderDetails(){return d(n)}})},oe=W=>{Xg(W,{get item(){return d(j)}})};ue(X,W=>{d(j).type==="Ticket"?W(U):d(j).type==="Event"?W(le,1):d(j).type==="Tour"?W(he,2):d(j).type==="Coupon"?W(H,3):d(j).type==="Merchandise"&&W(oe,4)}),x(N,R)});var S=V(E,2);Me(S,17,()=>d(i).donations??[],N=>N.id,(N,j)=>{Jg(N,{get donation(){return d(j)}})});var T=V(S,2),A=D(T),I=V(D(A),4),M=D(I,!0);C(I),gt(2),C(A),C(T),C(c),Y((N,j,R,X)=>{Z(h,N),Z(v,j),Z(g,R),Z(M,X)},[()=>k.t("common.table.count"),()=>k.t("common.table.product"),()=>k.t("common.table.price"),()=>k.t("common.table.total",{value:et(d(i).total_price_cents)})]),x(l,c)};ue(s,l=>{d(i)&&d(n)&&l(o)}),x(e,a),re()}customElements.define("go-order-breakdown",ne(Z$,{},[],[]));function W$(e,t){te(t,!0);const r=Kg(t.$$host),n=P(()=>r.value);let i=P(()=>d(n)?.order);gt();var a=Vt();Y(()=>Z(a,d(i)?.id)),x(e,a),re()}customElements.define("go-order-invoice-id",ne(W$,{},[],[]));var H$=q("<go-form></go-form>",2);function G$(e,t){te(t,!1),Pt.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const a=i.target.details,s=await k.updatePassword(a.formData);s.data?(a.successMessage=k.t("user.passwordSuccess.desc.title"),a.apiErrors=[]):a.apiErrors=s.error?.errors||s.error||s.errors}Jl();var n=H$();Tn(n,"formId","passwordResetForm"),Ta("submit",n,r),x(e,n),re()}customElements.define("go-profile-password",ne(G$,{},[],[]));var K$=q("<go-form></go-form>",2);function Y$(e,t){te(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=se(void 0);const n=P(()=>k.getCustomer()),i=P(()=>d(n)&&"data"in d(n)?d(n).data:void 0);En(async()=>{await k.waitForAllFetches(),await Ql(()=>d(r).details),await Ql(()=>d(i)),d(r).details.fill(d(i))});var a=K$();Tn(a,"formId","accountDetailsForm"),Us(a,s=>F(r,s),()=>d(r)),x(e,a),re()}customElements.define("go-profile-details",ne(Y$,{},[],[]));var J$=q('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function Q$(e,t){te(t,!0);const r=P(()=>k.getCustomer()),n=P(()=>d(r)&&"data"in d(r)?d(r).data:void 0);var i=ie(),a=B(i),s=l=>{var c=J$(),f=B(c),u=D(f);C(f);var p=V(f,2),h=D(p,!0);C(p),Y(()=>{Z(u,`${d(n).name??""}
|
|
85
|
+
${d(n).surname??""}`),Z(h,d(n).email)}),x(l,c)},o=l=>{var c=Vt();Y(f=>Z(c,f),[()=>k.t("user.login.desc.text")]),x(l,c)};ue(a,l=>{d(n)?l(s):l(o,-1)}),x(e,i),re()}customElements.define("go-profile-overview",ne(Q$,{},[],[]));function X$(e,t){te(t,!0);function r(h){if(!h)return;const y=[];for(const v of h.split(",")){const m=v.trim();m&&(Zg.includes(m)?y.push(m):console.warn(`[go-ticket-selection] Unknown filter "${m}". Valid filters: ${Zg.join(", ")}`))}return y.length?y:void 0}let n=_(t,"filters",7),i=_(t,"eventIds",7),a=_(t,"museumIds",7),s=_(t,"exhibitionIds",7),o=_(t,"selectedDate",7),l=_(t,"selectedTimeslot",7),c=_(t,"ticketIds",7),f=_(t,"ticketGroupIds",7);const u=new h$;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(a()),u.exhibitionIds=on(s()),u.ticketIds=on(c()),u.ticketGroupIds=on(f()),u.selectedTimeslot=l(),o()&&(u.selectedDate=oo(o()))}),ve(()=>{u.selectedDate&&Re(()=>{o(u.selectedDate.toString())})}),ve(()=>{u.selectedTimeslot,Re(()=>{l(u.selectedTimeslot)})}),p$(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 a()},set museumIds(h){a(h),b()},get exhibitionIds(){return s()},set exhibitionIds(h){s(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 re(p)}customElements.define("go-ticket-selection",ne(X$,{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 eF(e,t){te(t,!0);const r=gn(t.$$host),n=P(()=>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)}),re()}customElements.define("go-tickets",ne(eF,{},[],[]));function tF(e,t){te(t,!0);const r=gn(t.$$host),n=P(()=>r.value),i=P(()=>fr(d(n)?.preCarts||[],s=>s.items.length)),a=P(()=>!d(n)?.isTicketsVisible||d(n)?.isTicketsVisible&&d(i)===0);ve(()=>{t.$$host.style.display=d(a)?"block":"none",t.$$host.classList.toggle("is-hidden",!d(a)),t.$$host.classList.toggle("is-visible",d(a))}),re()}customElements.define("go-tickets-empty",ne(tF,{},[],[]));function rF(e,t){te(t,!0);const r=gn(t.$$host),n=P(()=>r.value);let i=P(()=>fr(d(n)?.preCarts||[],s=>s.totalPriceCents));gt();var a=Vt();Y(s=>Z(a,s),[()=>et(d(i))]),x(e,a),re()}customElements.define("go-tickets-sum",ne(rF,{},[],[]));var nF=class{#e;get ticketSelectionDetails(){return d(this.#e)}set ticketSelectionDetails(e){F(this.#e,e)}#t=se(Pe(ei()));get preCart(){return d(this.#t)}set preCart(e){F(this.#t,e,!0)}#r=se();get filters(){return d(this.#r)}set filters(e){F(this.#r,e,!0)}#n=se();get dateId(){return d(this.#n)}set dateId(e){F(this.#n,e,!0)}#i=se();get limit(){return d(this.#i)}set limit(e){F(this.#i,e,!0)}#a=se();get query(){return d(this.#a)}set query(e){F(this.#a,e,!0)}#s=se(Pe([]));get ticketGroupIds(){return d(this.#s)}set ticketGroupIds(e){F(this.#s,e,!0)}#o=se(Pe([]));get languageIds(){return d(this.#o)}set languageIds(e){F(this.#o,e,!0)}#l=se(Pe([]));get catchWordIds(){return d(this.#l)}set catchWordIds(e){F(this.#l,e,!0)}#u=se(Pe([]));get museumIds(){return d(this.#u)}set museumIds(e){F(this.#u,e,!0)}#c=se(!1);get withContent(){return d(this.#c)}set withContent(e){F(this.#c,e,!0)}constructor(e,t){this.filters=e===void 0?void 0:Array.isArray(e)?e:[e],this.#e=P(()=>t.value)}get effectiveFilters(){return this.filters?.length?this.filters:this.ticketSelectionDetails?.filters??[]}clear(){this.preCart=ei([])}toString(){return JSON.stringify({filters:this.effectiveFilters,preCart:this.preCart.toString()})}async loadTickets(){this.preCart=ei();const e=this.effectiveFilters.filter(t=>t!=="custom");await Promise.all(e.map(t=>qn(t).loadProducts(this)))}},ny="go-ticket-segment",iF=Fi(ny),ed=Ni(ny);function aF(e,t){te(t,!0);const r=_(t,"filters",7),n=_(t,"dateId",7),i=_(t,"query",7),a=_(t,"limit",7),s=_(t,"ticketGroupIds",7),o=_(t,"languageIds",7),l=_(t,"catchWordIds",7),c=_(t,"museumIds",7),f=_(t,"withContent",7);function u(g){if(!g)return;const E=g.split(",").map(S=>S.trim()).filter(Boolean);return E.length?E:void 0}const p=gn(t.$$host),h=p.value,y=new nF(u(r()),p);iF(t.$$host,y),ve(()=>{y.filters=u(r()),y.dateId=n(),y.query=i(),y.limit=a(),y.ticketGroupIds=on(s()),y.languageIds=on(o()),y.catchWordIds=on(l()),y.museumIds=on(c()),y.withContent=!!f()}),ve(()=>{y.dateId,y.filters,y.ticketGroupIds,y.museumIds,y.languageIds,y.catchWordIds,y.query,y.limit,y.withContent,h?.filters,h?.selectedTimeslot,h?.selectedTime,h?.selectedDate,h?.museumIds,Re(()=>{y.loadTickets()})}),ve(()=>{h&&Re(()=>h?.addTicketSegment(y))});const v=P(()=>y.preCart.items.length);ve(()=>{t.$$host.classList.toggle("is-empty",d(v)===0)});var m={details:y,get filters(){return r()},set filters(g){r(g),b()},get dateId(){return n()},set dateId(g){n(g),b()},get query(){return i()},set query(g){i(g),b()},get limit(){return a()},set limit(g){a(g),b()},get ticketGroupIds(){return s()},set ticketGroupIds(g){s(g),b()},get languageIds(){return o()},set languageIds(g){o(g),b()},get catchWordIds(){return l()},set catchWordIds(g){l(g),b()},get museumIds(){return c()},set museumIds(g){c(g),b()},get withContent(){return f()},set withContent(g){f(g),b()}};return re(m)}customElements.define("go-ticket-segment",ne(aF,{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 sF(e,t){te(t,!0);const r=gn(t.$$host).value,n=ed(t.$$host).value,i=P(()=>n?.preCart.items.length),a=P(()=>!r?.isTicketsVisible||r?.isTicketsVisible&&d(i)===0);ve(()=>{t.$$host.style.display=d(a)?"block":"none",t.$$host.classList.toggle("is-hidden",!d(a)),t.$$host.classList.toggle("is-visible",d(a))}),re()}customElements.define("go-ticket-segment-empty",ne(sF,{},[],[]));var oF=q('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),lF=q('<span class="go-tickets-item-subtitle" data-testid="ticket-subtitle"> </span>'),uF=q('<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>'),cF=q('<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>'),dF=q('<ul class="go-sub-tickets" role="list"></ul>'),fF=q('<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 iy(e,t){const r=vt();te(t,!0);const n=S=>{var T=oF(),A=B(T),I=D(A);C(A);var M=V(A,2),N=D(M,!0);C(M),Y(j=>{Z(I,`${a().product.event_title??""} - ${j??""}`),Z(N,a().product.title)},[()=>k.formatTime(a().time)]),x(S,T)},i=S=>{gt();var T=Vt();Y(()=>Z(T,a().product.title)),x(S,T)};let a=_(t,"item",7),s=_(t,"details",7),o=se(void 0),l=se(Pe({}));const c=P(()=>Vr(a().product)?a().product:null);let f=se(!1);const u=P(()=>a().product?.content?.reduction_reason),p=`go-ticket-info-${r}`;ve(()=>{s().preCart.items.map(S=>S.quantity),s().preCart.items.forEach(S=>S.mantle&&Object.values(S.mantle.composition)),k.cart?.items.map(S=>S.quantity),k.cart?.items.forEach(S=>S.mantle&&Object.values(S.mantle.composition)),Re(()=>{F(o,k.capacityManager.capacity(k.cart,a(),s().preCart),!0),F(l,k.capacityManager.subTicketMaxes(k.cart,a(),s().preCart),!0)})});function h(S,T){a().mantle&&(a().mantle.composition[S]=T)}let y=i;ja(a().product)&&(y=n);var v={get item(){return a()},set item(S){a(S),b()},get details(){return s()},set details(S){s(S),b()}},m=ie(),g=B(m),E=S=>{var T=fF(),A=D(T),I=D(A),M=D(I),N=D(M);y(N);var j=V(N,2),R=ee=>{var $=lF(),ae=D($,!0);C($),Y(()=>Z(ae,a().product.sub_title)),x(ee,$)};ue(j,ee=>{a().product.sub_title&&ee(R)}),C(M);var X=V(M,2),U=ee=>{var $=uF(),ae=D($);C($),Y(L=>{Et(ae,1,dr(["go-ticket-info-icon",d(f)&&"is-active"])),pe(ae,"aria-expanded",d(f)),pe(ae,"aria-controls",p),pe(ae,"aria-label",L)},[()=>k.t("ticket.list.additionalInfo")]),ut("click",ae,()=>F(f,!d(f))),x(ee,$)};ue(X,ee=>{d(u)&&ee(U)});var le=V(X,2);Ef(le,()=>pm.sanitize(a().product.description),!0),C(le);var he=V(le,2),H=ee=>{var $=cF(),ae=D($,!0);C($),Y(L=>{pe($,"id",p),pe($,"hidden",!d(f)),Z(ae,L)},[()=>k.t(d(u))]),x(ee,$)};ue(he,ee=>{d(u)&&ee(H)});var oe=V(he,2),W=D(oe,!0);C(oe);var fe=V(oe,2),ce=D(fe);{let ee=P(()=>mm(a(),k.locale));vo(ce,{get value(){return a().quantity},get min(){return d(o).min},get max(){return d(o).max},get label(){return d(ee)},onChange:$=>a().quantity=$})}C(fe),C(I),C(A);var de=V(A,2),J=ee=>{var $=dF();Me($,21,()=>qa(d(c)),ae=>ae.id,(ae,L)=>{{let be=P(()=>a().mantle?.composition?.[d(L).id]??0);ju(ae,{get sub(){return d(L)},get quantity(){return d(be)},get max(){return d(l)[d(L).id]},onChange:G=>h(d(L).id,G)})}}),C($),Y(()=>pe($,"aria-label",d(c).title)),x(ee,$)};ue(de,ee=>{d(c)&&a().quantity>0&&ee(J)}),C(T),Y(()=>{Et(A,1,dr(["go-tickets-item",d(o).bookedOut&&"is-booked-out"])),pe(A,"data-testid",a().uuid),Z(W,a().price_formatted)}),x(S,T)};return ue(g,S=>{d(o)&&!d(o).unavailable&&S(E)}),x(e,m),re(v)}Bt(["click"]),ne(iy,{item:{},details:{}},[],[],{mode:"open"});var hF=q('<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 pF(e,t){te(t,!0);const r=ed(t.$$host),n=P(()=>r.value),i=P(()=>d(n)?.preCart?.items.length&&d(n)?.preCart?.items.length>0);var a=ie(),s=B(a),o=l=>{var c=hF(),f=D(c),u=D(f),p=D(u),h=D(p,!0);C(p);var y=V(p,2),v=D(y,!0);C(y);var m=V(y,2),g=D(m,!0);C(m);var E=V(m,2),S=D(E,!0);C(E),C(u),C(f);var T=V(f,2);Me(T,17,()=>d(n).preCart.items,A=>A.uuid,(A,I)=>{iy(A,{get item(){return d(I)},get details(){return d(n)}})}),C(c),Y((A,I,M,N)=>{Z(h,A),Z(v,I),Z(g,M),Z(S,N)},[()=>k.t("product.detail.table.title"),()=>k.t("product.detail.table.desc"),()=>k.t("product.detail.table.price"),()=>k.t("product.detail.table.quantity")]),x(l,c)};ue(s,l=>{d(i)&&d(n)&&l(o)}),x(e,a),re()}customElements.define("go-ticket-segment-body",ne(pF,{},[],[]));function mF(e,t){te(t,!0);const r=ed(t.$$host),n=P(()=>r.value);gt();var i=Vt();Y(()=>Z(i,d(n)?.preCart.totalFormatted)),x(e,i),re()}customElements.define("go-ticket-segment-sum",ne(mF,{},[],[]));var vF=class{#e;get tsd(){return d(this.#e)}set tsd(e){F(this.#e,e)}#t=se(Pe([]));get timeslots(){return d(this.#t)}set timeslots(e){F(this.#t,e,!0)}constructor(e){e&&(this.#e=P(()=>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=k.capacityManager.quotaManager;t.clearPrecart();for(const r of k.cart?.items??[]){const n=r.product;lo(n)&&t.setPrecartItemQuantity(n.id,r.quantity??0)}this.timeslots=t.timeslotsOn(e,this.tsd?.timeslotTicketIds).map(r=>({...r,startAt:r.timeSlot,timeFormatted:k.formatTime(r.timeSlot),available:r.capacity>0}))}},gF=q('<li><label> <input type="radio" name="timeslot"/></label></li>'),yF=q('<ul data-testid="timeslots"></ul>');function bF(e,t){te(t,!0);const r=[],n=new vF(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=>qn(h).loadTimeslots(f))),n.recalculateCapacities()})}),ve(()=>{k.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}))},a=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 s={details:n},o=ie(),l=B(o),c=f=>{var u=yF();Me(u,20,()=>n.timeslots,p=>p,(p,h)=>{const y=P(()=>h.totalCapacity===0),v=P(()=>!d(y)&&h.capacity===0),m=P(()=>d(y)||d(v)||!h.available),g=P(()=>n.tsd?.selectedTimeslot===h.startAt);var E=gF(),S=D(E),T=D(S),A=V(T);Ai(A);var I;C(S),C(E),Y(()=>{Et(E,1,dr({"go-timeslot":!0,"is-unavailable":d(y),"is-sold-out":d(v),"is-disabled":d(m),"is-selected":d(g)})),Z(T,`${h.timeFormatted??""} `),A.disabled=d(m),pe(A,"aria-disabled",d(m)),I!==(I=h.startAt)&&(A.value=(A.__value=h.startAt)??"")}),ut("change",A,a),G_(r,[],A,()=>(h.startAt,n.tsd.selectedTimeslot),M=>n.tsd.selectedTimeslot=M),x(p,E)}),C(u),x(f,u)};return ue(l,f=>{n.tsd?.isTimeslotsVisible&&f(c)}),x(e,o),re(s)}Bt(["change"]),customElements.define("go-timeslots",ne(bF,{},[],["details"]));function _F(e){return typeof e=="string"?`'${e}'`:e==null?String(e):pw(e)?"a Promise — the callback must be synchronous":`a ${typeof e}`}var wF=class{#e=se();get details(){return d(this.#e)}set details(e){F(this.#e,e,!0)}#t=se(Pe(Pi(er())));get startAt(){return d(this.#t)}set startAt(e){F(this.#t,e,!0)}#r=se(void 0);get selected(){return d(this.#r)}set selected(e){F(this.#r,e,!0)}#n=se();get availabilityOverride(){return d(this.#n)}set availabilityOverride(e){F(this.#n,e,!0)}#i=[];get endpoint(){return(this.details?.filters?.map(e=>qn(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.#a();if(!r)return t;let n;try{n=r(e.toString(),t)}catch(i){return this.#s("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.#s("returned",`[go-calendar] the availability-override callback must return 'available', 'sold_out', 'unavailable' or 'pass_through', got ${_F(n)} — using the gomus default instead.`),t)}#a(){const e=this.availabilityOverride;if(typeof e=="function")return e;if(!e)return;const t=globalThis[e];if(typeof t=="function")return t;this.#s(`unresolved:${e}`,`[go-calendar] availability-override="${e}" does not resolve to a function on window — using the gomus defaults.`,console.warn)}#s(e,t,r=console.error){this.#i.includes(e)||(this.#i.push(e),r(t))}isDateDisabled(e){return e.compare(Pi(er()))<0||this.availability(e)==="unavailable"}isDateUnavailable(e){return this.availability(e)==="sold_out"}get apiFilters(){return this.details?.filters?.map(e=>qn(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})]}#o(e){return this.fetchPeriod().reduce((t,r)=>Object.assign(t,e(this.params(r))),{})}eventsDates(){return this.#o(e=>k.calendar(e))}ticketsDates(){return this.#o(e=>k.ticketsCalendar(e))}},kF=q("<!> <!> <!>",1),SF=q("<div> </div>"),ay=q("<!> <!>",1),EF=q('<div data-calendar-wrapper=""><!></div>');function sy(e,t){te(t,!0);let r=_(t,"calendarClass",7),n=se(void 0);const i=r();ve(()=>{d(n)?.dispatchEvent(new CustomEvent("go-date-select",{detail:{selected:r().selected},bubbles:!0}))});var a={details:i,get calendarClass(){return r()},set calendarClass(l){r(l),b()}},s=EF(),o=D(s);{const l=(c,f)=>{let u=()=>f?.().months,p=()=>f?.().weekdays;var h=ay(),y=B(h);Fe(y,()=>gc,(m,g)=>{g(m,{children:(E,S)=>{var T=kF(),A=B(T);Fe(A,()=>_c,(N,j)=>{j(N,{class:"go-calendar-prev-button",children:(R,X)=>{gt();var U=Vt("Prev");x(R,U)},$$slots:{default:!0}})});var I=V(A,2);Fe(I,()=>yc,(N,j)=>{j(N,{class:"go-calendar-heading"})});var M=V(I,2);Fe(M,()=>bc,(N,j)=>{j(N,{class:"go-calendar-next-button",children:(R,X)=>{gt();var U=Vt("Next");x(R,U)},$$slots:{default:!0}})}),x(E,T)},$$slots:{default:!0}})});var v=V(y,2);Me(v,17,u,an,(m,g)=>{var E=ie(),S=B(E);Fe(S,()=>fc,(T,A)=>{A(T,{class:"go-calendar-grid",children:(I,M)=>{var N=ay(),j=B(N);Fe(j,()=>mc,(X,U)=>{U(X,{class:"go-calendar-grid-head",children:(le,he)=>{var H=ie(),oe=B(H);Fe(oe,()=>ss,(W,fe)=>{fe(W,{class:"go-calendar-grid-row",children:(ce,de)=>{var J=ie(),ee=B(J);Me(ee,17,p,an,($,ae,L,be)=>{var G=ie(),w=B(G);Fe(w,()=>vc,(_e,we)=>{we(_e,{children:(De,Le)=>{var je=SF(),_t=D(je,!0);C(je),Y(ot=>Z(_t,ot),[()=>d(ae).slice(0,2)]),x(De,je)},$$slots:{default:!0}})}),x($,G)}),x(ce,J)},$$slots:{default:!0}})}),x(le,H)},$$slots:{default:!0}})});var R=V(j,2);Fe(R,()=>hc,(X,U)=>{U(X,{class:"go-calendar-grid-body",children:(le,he)=>{var H=ie(),oe=B(H);Me(oe,17,()=>d(g).weeks,an,(W,fe,ce,de)=>{var J=ie(),ee=B(J);Fe(ee,()=>ss,($,ae)=>{ae($,{class:"go-calendar-grid-row",children:(L,be)=>{var G=ie(),w=B(G);Me(w,17,()=>d(fe),an,(_e,we,De,Le)=>{var je=ie(),_t=B(je);Fe(_t,()=>pc,(ot,Nt)=>{Nt(ot,{get date(){return d(we)},get month(){return d(g).value},class:"go-calendar-cell",children:(wt,Rt)=>{var ir=ie(),Gt=B(ir);{let gr=P(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(d(we)),"is-disabled":r().isDateDisabled(d(we)),"is-selected":r().selected?.compare(d(we))===0}));Fe(Gt,()=>dc,(Pr,Mr)=>{Mr(Pr,{get class(){return d(gr)},children:(yn,$r)=>{gt();var yr=Vt();Y(()=>Z(yr,d(we).day)),x(yn,yr)},$$slots:{default:!0}})})}x(wt,ir)},$$slots:{default:!0}})}),x(_e,je)}),x(L,G)},$$slots:{default:!0}})}),x(W,J)}),x(le,H)},$$slots:{default:!0}})}),x(I,N)},$$slots:{default:!0}})}),x(m,E)}),x(c,h)};Fe(o,()=>Pv,(c,f)=>{f(c,{weekdayFormat:"long",fixedWeeks:!0,preventDeselect:!0,type:"single",get locale(){return k.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 C(s),Us(s,l=>F(n,l),()=>d(n)),x(e,s),re(a)}ne(sy,{calendarClass:{}},[],["details"],{mode:"open"});function xF(e,t){te(t,!0);let r=_(t,"availabilityOverride",7);const n=new wF,i=n,a=gn(t.$$host),s=P(()=>a.value);ve(()=>{n.details=d(s),n.availabilityOverride=r()}),t.$$host.addEventListener("go-date-select",u=>{d(s)&&(d(s).selectedDate=u.detail.selected,d(s).selectedTimeslot=void 0)});var o={details:i,get availabilityOverride(){return r()},set availabilityOverride(u){r(u),b()}},l=ie(),c=B(l),f=u=>{sy(u,{get calendarClass(){return n}})};return ue(c,u=>{d(s)?.isCalendarVisible&&u(f)}),x(e,l),re(o)}customElements.define("go-calendar",ne(xF,{availabilityOverride:{attribute:"availability-override",type:"String"}},[],["details"]));var TF=class{#e;get ticketSelectionDetails(){return d(this.#e)}set ticketSelectionDetails(e){F(this.#e,e)}constructor(e){e&&(this.#e=P(()=>e.value))}addToCart(){if(!k.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 nt(n.product,{quantity:n.quantity,time:i,mantle:n.mantle&&{composition:{...n.mantle.composition}}})}));k.cart.addItems(t),e.forEach(r=>r.items.forEach(n=>n.quantity=0)),Ge.config.urls.cart&&Ge.config.navigateTo(Ge.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(e=>e.items.some(t=>t.quantity>0)):!1}},AF=q('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function CF(e,t){te(t,!0);const r=new TF(gn(t.$$host));var n={details:r},i=AF(),a=D(i,!0);return C(i),Y((s,o,l)=>{i.disabled=s,pe(i,"data-x",o),Z(a,l)},[()=>!r.anyTicketsSelected(),()=>!r.anyTicketsSelected(),()=>k.t("common.actions.cart")]),ut("click",i,()=>r.addToCart()),x(e,i),re(n)}Bt(["click"]),customElements.define("go-add-to-cart-button",ne(CF,{},[],["details"]));function OF(e,t){te(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 a=i.target.details,s=await k.withdrawal(a.formData);s.response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=s.error?.errors??[k.t("withdrawal.form.errors.requestFailed")]}return Hr(t.$$host,"go-form",{"form-id":"withdrawal",custom:r()}),t.$$host.addEventListener("submit",n),re({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-withdrawal-form",ne(OF,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));async function DF({filter:e,...t}){if(!k.cart)throw new Error("(go.cart.addItem) shop not initialized — call go.init first");const r=qn(e);if(!r?.addToCart)throw new Error(`(go.cart.addItem) filter '${e}' cannot add to the cart`);return r.addToCart(t)}var cs=null;async function ds(){if(cs)return cs;if(!k.client)throw new Error("[go] Shop not initialized — call go.init({ shop, api, locale }) first.")}var IF=e=>e.split(".").reduce((t,r)=>t?.[r],oy);async function PF(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=IF(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=oy,t&&(t._queue=null)}var oy={loaded:!0,config:e=>{Ge.define(e)},init:async e=>{try{cs=k.load("https://"+e.api,e.shop,e.locale),await cs}catch(t){throw cs=null,t}},api:{getCustomer:async()=>(await ds(),k.asyncFetch(()=>k.getCustomer())),getOrders:async e=>(await ds(),k.asyncFetch(()=>k.getOrders(e))),getCustomerAddresses:async()=>(await ds(),k.asyncFetch(()=>k.getCustomerAddresses())),getCustomerMemberships:async()=>(await ds(),k.asyncFetch(()=>k.getCustomerMemberships()))},cart:{addItem:async e=>(await ds(),DF(e))}};(async()=>await PF(window))()})();
|