@gomusdev/web-components 3.3.5 → 3.4.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
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.4.1 (2026-06-15)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* **cart:** restore selectedTime from localStorage
|
|
8
|
+
|
|
9
|
+
## 3.4.0 (2026-06-15)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **go-audit-docs:** add Phase 2 checkup pass; lean-length guidance
|
|
14
|
+
* **go-audit-docs:** align doc tables via Prettier
|
|
15
|
+
* **go-audit-docs:** faster audits — linter, batch review, parallel readers
|
|
16
|
+
* **go-audit-docs:** invalidate done when a doc or its source changes
|
|
17
|
+
* **go-changelog:** add maintainer skill for the integrator changelog
|
|
18
|
+
* **go-changelog:** finalize the Unreleased changelog entry on release
|
|
19
|
+
* **go-mr:** add pre-MR skill (gates, open MR, drive to green)
|
|
20
|
+
* **skill-generator:** assemble changelog + migration into the bundle
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* **go-changelog:** use MDX comment in to-be-released entry
|
|
25
|
+
* **skill-generator:** drop internal leaks from the filters table
|
|
26
|
+
* **skill-generator:** repair crash + stop duplicating component docs
|
|
27
|
+
|
|
3
28
|
## 3.3.5 (2026-06-09)
|
|
4
29
|
|
|
5
30
|
### Bug Fixes
|
|
@@ -11308,7 +11308,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
11308
11308
|
switch (type) {
|
|
11309
11309
|
case "Ticket":
|
|
11310
11310
|
if (!isStillValid(cartItem)) return;
|
|
11311
|
-
const ticket = createUITicket(cartItem.product);
|
|
11311
|
+
const ticket = createUITicket(cartItem.product, { selectedTime: cartItem.product.selectedTime });
|
|
11312
11312
|
return createCartItem(ticket, { time: cartItem.time, quantity: cartItem.quantity });
|
|
11313
11313
|
case "Event":
|
|
11314
11314
|
if (!isStillValid(cartItem)) return;
|
|
@@ -11308,7 +11308,7 @@ function generateCartItem(cartItem) {
|
|
|
11308
11308
|
switch (type) {
|
|
11309
11309
|
case "Ticket":
|
|
11310
11310
|
if (!isStillValid(cartItem)) return;
|
|
11311
|
-
const ticket = createUITicket(cartItem.product);
|
|
11311
|
+
const ticket = createUITicket(cartItem.product, { selectedTime: cartItem.product.selectedTime });
|
|
11312
11312
|
return createCartItem(ticket, { time: cartItem.time, quantity: cartItem.quantity });
|
|
11313
11313
|
case "Event":
|
|
11314
11314
|
if (!isStillValid(cartItem)) return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var Fy=gr=>{throw TypeError(gr)};var o$=(gr,Cr,Bn)=>Cr.has(gr)||Fy("Cannot "+Bn);var Ry=(gr,Cr,Bn)=>(o$(gr,Cr,"read from private field"),Bn?Bn.call(gr):Cr.get(gr)),Ly=(gr,Cr,Bn)=>Cr.has(gr)?Fy("Cannot add the same private member more than once"):Cr instanceof WeakSet?Cr.add(gr):Cr.set(gr,Bn);(function(){"use strict";var Gl;typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const Cr=1,Bn=2,kf=4,zy=8,Zy=16,Vy=1,Uy=2,By=4,jy=8,qy=16,Wy=1,Hy=2,Sf="[",na="[!",ec="]",_i={},gt=Symbol(),Ky="http://www.w3.org/1999/xhtml",xf="@attach",tc=!1;var ia=Array.isArray,Gy=Array.prototype.indexOf,Ki=Array.prototype.includes,sa=Array.from,oa=Object.keys,aa=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,Ef=Object.getOwnPropertyDescriptors,Tf=Object.prototype,Yy=Array.prototype,la=Object.getPrototypeOf,Af=Object.isExtensible;function zs(t){return typeof t=="function"}const Ue=()=>{};function Jy(t){return t()}function rc(t){for(var e=0;e<t.length;e++)t[e]()}function Cf(){var t,e,r=new Promise((n,i)=>{t=n,e=i});return{promise:r,resolve:t,reject:e}}const _t=2,ca=4,Zs=8,nc=1<<24,pn=16,Or=32,jn=64,ic=128,vr=512,vt=1024,Pt=2048,mn=4096,ar=8192,gn=16384,ua=32768,qn=65536,Of=1<<17,Df=1<<18,bi=1<<19,If=1<<20,vn=1<<25,wi=32768,sc=1<<21,oc=1<<22,Wn=1<<23,qr=Symbol("$state"),ac=Symbol("legacy props"),Qy=Symbol(""),Gi=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},da=3,Hn=8;function Pf(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Xy(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function e_(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function t_(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function r_(t){throw new Error("https://svelte.dev/e/effect_orphan")}function n_(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function i_(){throw new Error("https://svelte.dev/e/hydration_failed")}function s_(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function o_(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function a_(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function l_(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function c_(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function Vs(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function u_(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function d_(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let xe=!1;function Mt(t){xe=t}let Pe;function bt(t){if(t===null)throw Vs(),_i;return Pe=t}function yn(){return bt(Ir(Pe))}function I(t){if(xe){if(Ir(Pe)!==null)throw Vs(),_i;Pe=t}}function $t(t=1){if(xe){for(var e=t,r=Pe;e--;)r=Ir(r);Pe=r}}function fa(t=!0){for(var e=0,r=Pe;;){if(r.nodeType===Hn){var n=r.data;if(n===ec){if(e===0)return r;e-=1}else(n===Sf||n===na)&&(e+=1)}var i=Ir(r);t&&r.remove(),r=i}}function Mf(t){if(!t||t.nodeType!==Hn)throw Vs(),_i;return t.data}function $f(t){return t===this.v}function f_(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Nf(t){return!f_(t,this.v)}let Yi=!1,h_=!1;function p_(){Yi=!0}const m_=[];function lc(t,e=!1,r=!1){return ha(t,new Map,"",m_,null,r)}function ha(t,e,r,n,i=null,s=!1){if(typeof t=="object"&&t!==null){var o=e.get(t);if(o!==void 0)return o;if(t instanceof Map)return new Map(t);if(t instanceof Set)return new Set(t);if(ia(t)){var a=Array(t.length);e.set(t,a),i!==null&&e.set(i,a);for(var l=0;l<t.length;l+=1){var c=t[l];l in t&&(a[l]=ha(c,e,r,n,null,s))}return a}if(la(t)===Tf){a={},e.set(t,a),i!==null&&e.set(i,a);for(var u in t)a[u]=ha(t[u],e,r,n,null,s);return a}if(t instanceof Date)return structuredClone(t);if(typeof t.toJSON=="function"&&!s)return ha(t.toJSON(),e,r,n,t)}if(t instanceof EventTarget)return t;try{return structuredClone(t)}catch{return t}}let rt=null;function Ji(t){rt=t}function Ff(t){return cc().get(t)}function g_(t,e){return cc().set(t,e),e}function v_(t){return cc().has(t)}function te(t,e=!1,r){rt={p:rt,i:!1,c:null,e:null,s:t,x:null,l:Yi&&!e?{s:null,u:null,$:[]}:null}}function re(t){var e=rt,r=e.e;if(r!==null){e.e=null;for(var n of r)lh(n)}return t!==void 0&&(e.x=t),e.i=!0,rt=e.p,t??{}}function Us(){return!Yi||rt!==null&&rt.l===null}function cc(t){return rt===null&&Pf(),rt.c??=new Map(y_(rt)||void 0)}function y_(t){let e=t.p;for(;e!==null;){const r=e.c;if(r!==null)return r;e=e.p}return null}let ki=[];function Rf(){var t=ki;ki=[],rc(t)}function lr(t){if(ki.length===0&&!Bs){var e=ki;queueMicrotask(()=>{e===ki&&Rf()})}ki.push(t)}function __(){for(;ki.length>0;)Rf()}function Lf(t){var e=$e;if(e===null)return Me.f|=Wn,t;if((e.f&ua)===0){if((e.f&ic)===0)throw t;e.b.error(t)}else Qi(t,e)}function Qi(t,e){for(;e!==null;){if((e.f&ic)!==0)try{e.b.error(t);return}catch(r){t=r}e=e.parent}throw t}const b_=-7169;function ht(t,e){t.f=t.f&b_|e}function uc(t){(t.f&vr)!==0||t.deps===null?ht(t,vt):ht(t,mn)}function zf(t){if(t!==null)for(const e of t)(e.f&_t)===0||(e.f&wi)===0||(e.f^=wi,zf(e.deps))}function Zf(t,e,r){(t.f&Pt)!==0?e.add(t):(t.f&mn)!==0&&r.add(t),zf(t.deps),ht(t,vt)}const pa=new Set;let Ze=null,ma=null,Dr=null,cr=[],ga=null,dc=!1,Bs=!1;class _n{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#n=0;#i=null;#s=new Set;#a=new Set;skipped_effects=new Set;is_fork=!1;#o=!1;is_deferred(){return this.is_fork||this.#n>0}process(e){cr=[],this.apply();var r=[],n=[];for(const i of e)this.#l(i,r,n);if(this.is_deferred()){this.#c(n),this.#c(r);for(const i of this.skipped_effects)qf(i)}else{for(const i of this.#e)i();this.#e.clear(),this.#r===0&&this.#d(),ma=this,Ze=null,Uf(n),Uf(r),ma=null,this.#i?.resolve()}Dr=null}#l(e,r,n){e.f^=vt;for(var i=e.first,s=null;i!==null;){var o=i.f,a=(o&(Or|jn))!==0,l=a&&(o&vt)!==0,c=l||(o&ar)!==0||this.skipped_effects.has(i);if(!c&&i.fn!==null){a?i.f^=vt:s!==null&&(o&(ca|Zs|nc))!==0?s.b.defer_effect(i):(o&ca)!==0?r.push(i):Ws(i)&&((o&pn)!==0&&this.#a.add(i),Hs(i));var u=i.first;if(u!==null){i=u;continue}}var d=i.parent;for(i=i.next;i===null&&d!==null;)d===s&&(s=null),i=d.next,d=d.parent}}#c(e){for(var r=0;r<e.length;r+=1)Zf(e[r],this.#s,this.#a)}capture(e,r){r!==gt&&!this.previous.has(e)&&this.previous.set(e,r),(e.f&Wn)===0&&(this.current.set(e,e.v),Dr?.set(e,e.v))}activate(){Ze=this,this.apply()}deactivate(){Ze===this&&(Ze=null,Dr=null)}flush(){if(this.activate(),cr.length>0){if(Vf(),Ze!==null&&Ze!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const e of this.#t)e(this);this.#t.clear()}#d(){if(pa.size>1){this.previous.clear();var e=Dr,r=!0;for(const i of pa){if(i===this){r=!1;continue}const s=[];for(const[a,l]of this.current){if(i.current.has(a))if(r&&l!==i.current.get(a))i.current.set(a,l);else continue;s.push(a)}if(s.length===0)continue;const o=[...i.current.keys()].filter(a=>!this.current.has(a));if(o.length>0){var n=cr;cr=[];const a=new Set,l=new Map;for(const c of s)Bf(c,o,a,l);if(cr.length>0){Ze=i,i.apply();for(const c of cr)i.#l(c,[],[]);i.deactivate()}cr=n}}Ze=null,Dr=e}this.committed=!0,pa.delete(this)}increment(e){this.#r+=1,e&&(this.#n+=1)}decrement(e){this.#r-=1,e&&(this.#n-=1),!this.#o&&(this.#o=!0,lr(()=>{this.#o=!1,this.is_deferred()?cr.length>0&&this.flush():this.revive()}))}revive(){for(const e of this.#s)this.#a.delete(e),ht(e,Pt),wn(e);for(const e of this.#a)ht(e,mn),wn(e);this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#i??=Cf()).promise}static ensure(){if(Ze===null){const e=Ze=new _n;pa.add(Ze),Bs||lr(()=>{Ze===e&&e.flush()})}return Ze}apply(){}}function y(t){var e=Bs;Bs=!0;try{for(var r;;){if(__(),cr.length===0&&(Ze?.flush(),cr.length===0))return ga=null,r;Vf()}}finally{Bs=e}}function Vf(){dc=!0;var t=null;try{for(var e=0;cr.length>0;){var r=_n.ensure();if(e++>1e3){var n,i;w_()}r.process(cr),Kn.clear()}}finally{dc=!1,ga=null}}function w_(){try{n_()}catch(t){Qi(t,ga)}}let bn=null;function Uf(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&(gn|ar))===0&&Ws(n)&&(bn=new Set,Hs(n),n.deps===null&&n.first===null&&n.nodes===null&&(n.teardown===null&&n.ac===null?hh(n):n.fn=null),bn?.size>0)){Kn.clear();for(const i of bn){if((i.f&(gn|ar))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)bn.has(o)&&(bn.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&(gn|ar))===0&&Hs(l)}}bn.clear()}}bn=null}}function Bf(t,e,r,n){if(!r.has(t)&&(r.add(t),t.reactions!==null))for(const i of t.reactions){const s=i.f;(s&_t)!==0?Bf(i,e,r,n):(s&(oc|pn))!==0&&(s&Pt)===0&&jf(i,e,n)&&(ht(i,Pt),wn(i))}}function jf(t,e,r){const n=r.get(t);if(n!==void 0)return n;if(t.deps!==null)for(const i of t.deps){if(Ki.call(e,i))return!0;if((i.f&_t)!==0&&jf(i,e,r))return r.set(i,!0),!0}return r.set(t,!1),!1}function wn(t){for(var e=ga=t;e.parent!==null;){e=e.parent;var r=e.f;if(dc&&e===$e&&(r&pn)!==0&&(r&Df)===0)return;if((r&(jn|Or))!==0){if((r&vt)===0)return;e.f^=vt}}cr.push(e)}function qf(t){if(!((t.f&Or)!==0&&(t.f&vt)!==0)){ht(t,vt);for(var e=t.first;e!==null;)qf(e),e=e.next}}function fc(t){let e=0,r=Gn(0),n;return()=>{_c()&&(h(r),es(()=>(e===0&&(n=Ge(()=>t(()=>Wr(r)))),e+=1,()=>{lr(()=>{e-=1,e===0&&(n?.(),n=void 0,Wr(r))})})))}}var k_=qn|bi|ic;function S_(t,e,r){new x_(t,e,r)}class x_{parent;is_pending=!1;#e;#t=xe?Pe:null;#r;#n;#i;#s=null;#a=null;#o=null;#l=null;#c=null;#d=0;#u=0;#f=!1;#h=!1;#p=new Set;#m=new Set;#g=null;#v=fc(()=>(this.#g=Gn(this.#d),()=>{this.#g=null}));constructor(e,r,n){this.#e=e,this.#r=r,this.#n=n,this.parent=$e.b,this.is_pending=!!this.#r.pending,this.#i=qs(()=>{if($e.b=this,xe){const s=this.#t;yn(),s.nodeType===Hn&&s.data===na?this.#_():(this.#y(),this.#u===0&&(this.is_pending=!1))}else{var i=this.#k();try{this.#s=Kt(()=>n(i))}catch(s){this.error(s)}this.#u>0?this.#w():this.is_pending=!1}return()=>{this.#c?.remove()}},k_),xe&&(this.#e=Pe)}#y(){try{this.#s=Kt(()=>this.#n(this.#e))}catch(e){this.error(e)}}#_(){const e=this.#r.pending;e&&(this.#a=Kt(()=>e(this.#e)),lr(()=>{var r=this.#k();this.#s=this.#b(()=>(_n.ensure(),Kt(()=>this.#n(r)))),this.#u>0?this.#w():(Si(this.#a,()=>{this.#a=null}),this.is_pending=!1)}))}#k(){var e=this.#e;return this.is_pending&&(this.#c=Ht(),this.#e.before(this.#c),e=this.#c),e}defer_effect(e){Zf(e,this.#p,this.#m)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#b(e){var r=$e,n=Me,i=rt;br(this.#i),Gt(this.#i),Ji(this.#i.ctx);try{return e()}catch(s){return Lf(s),null}finally{br(r),Gt(n),Ji(i)}}#w(){const e=this.#r.pending;this.#s!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#c),gh(this.#s,this.#l)),this.#a===null&&(this.#a=Kt(()=>e(this.#e)))}#S(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e);return}if(this.#u+=e,this.#u===0){this.is_pending=!1;for(const r of this.#p)ht(r,Pt),wn(r);for(const r of this.#m)ht(r,mn),wn(r);this.#p.clear(),this.#m.clear(),this.#a&&Si(this.#a,()=>{this.#a=null}),this.#l&&(this.#e.before(this.#l),this.#l=null)}}update_pending_count(e){this.#S(e),this.#d+=e,!(!this.#g||this.#f)&&(this.#f=!0,lr(()=>{this.#f=!1,this.#g&&Xi(this.#g,this.#d)}))}get_effect_pending(){return this.#v(),h(this.#g)}error(e){var r=this.#r.onerror;let n=this.#r.failed;if(this.#h||!r&&!n)throw e;this.#s&&(yt(this.#s),this.#s=null),this.#a&&(yt(this.#a),this.#a=null),this.#o&&(yt(this.#o),this.#o=null),xe&&(bt(this.#t),$t(),bt(fa()));var i=!1,s=!1;const o=()=>{if(i){d_();return}i=!0,s&&c_(),_n.ensure(),this.#d=0,this.#o!==null&&Si(this.#o,()=>{this.#o=null}),this.is_pending=this.has_pending_snippet(),this.#s=this.#b(()=>(this.#h=!1,Kt(()=>this.#n(this.#e)))),this.#u>0?this.#w():this.is_pending=!1};lr(()=>{try{s=!0,r?.(e,o),s=!1}catch(a){Qi(a,this.#i&&this.#i.parent)}n&&(this.#o=this.#b(()=>{_n.ensure(),this.#h=!0;try{return Kt(()=>{n(this.#e,()=>e,()=>o)})}catch(a){return Qi(a,this.#i.parent),null}finally{this.#h=!1}}))})}}function Wf(t,e,r,n){const i=Us()?js:pc;var s=t.filter(f=>!f.settled);if(r.length===0&&s.length===0){n(e.map(i));return}var o=Ze,a=$e,l=E_(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(f=>f.promise)):null;function u(f){l();try{n(f)}catch(p){(a.f&gn)===0&&Qi(p,a)}o?.deactivate(),hc()}if(r.length===0){c.then(()=>u(e.map(i)));return}function d(){l(),Promise.all(r.map(f=>T_(f))).then(f=>u([...e.map(i),...f])).catch(f=>Qi(f,a))}c?c.then(d):d()}function E_(){var t=$e,e=Me,r=rt,n=Ze;return function(s=!0){br(t),Gt(e),Ji(r),s&&n?.activate()}}function hc(){br(null),Gt(null),Ji(null)}function js(t){var e=_t|Pt,r=Me!==null&&(Me.f&_t)!==0?Me:null;return $e!==null&&($e.f|=bi),{ctx:rt,deps:null,effects:null,equals:$f,f:e,fn:t,reactions:null,rv:0,v:gt,wv:0,parent:r??$e,ac:null}}function T_(t,e,r){let n=$e;n===null&&Xy();var i=n.b,s=void 0,o=Gn(gt),a=!Me,l=new Map;return $_(()=>{var c=Cf();s=c.promise;try{Promise.resolve(t()).then(c.resolve,c.reject).then(()=>{u===Ze&&u.committed&&u.deactivate(),hc()})}catch(p){c.reject(p),hc()}var u=Ze;if(a){var d=i.is_rendered();i.update_pending_count(1),u.increment(d),l.get(u)?.reject(Gi),l.delete(u),l.set(u,c)}const f=(p,v=void 0)=>{if(u.activate(),v)v!==Gi&&(o.f|=Wn,Xi(o,v));else{(o.f&Wn)!==0&&(o.f^=Wn),Xi(o,p);for(const[g,m]of l){if(l.delete(g),g===u)break;m.reject(Gi)}}a&&(i.update_pending_count(-1),u.decrement(d))};c.promise.then(f,p=>f(null,p||"unknown"))}),_a(()=>{for(const c of l.values())c.reject(Gi)}),new Promise(c=>{function u(d){function f(){d===s?c(o):u(s)}d.then(f,f)}u(s)})}function C(t){const e=js(t);return yh(e),e}function pc(t){const e=js(t);return e.equals=Nf,e}function Hf(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)yt(e[r])}}function A_(t){for(var e=t.parent;e!==null;){if((e.f&_t)===0)return(e.f&gn)===0?e:null;e=e.parent}return null}function mc(t){var e,r=$e;br(A_(t));try{t.f&=~wi,Hf(t),e=Sh(t)}finally{br(r)}return e}function Kf(t){var e=mc(t);if(!t.equals(e)&&(t.wv=wh(),(!Ze?.is_fork||t.deps===null)&&(t.v=e,t.deps===null))){ht(t,vt);return}Yn||(Dr!==null?(_c()||Ze?.is_fork)&&Dr.set(t,e):uc(t))}let gc=new Set;const Kn=new Map;let Gf=!1;function Gn(t,e){var r={f:0,v:t,reactions:null,equals:$f,rv:0,wv:0};return r}function le(t,e){const r=Gn(t);return yh(r),r}function Yf(t,e=!1,r=!0){const n=Gn(t);return e||(n.equals=Nf),Yi&&r&&rt!==null&&rt.l!==null&&(rt.l.s??=[]).push(n),n}function M(t,e,r=!1){Me!==null&&(!Pr||(Me.f&Of)!==0)&&Us()&&(Me.f&(_t|pn|oc|Of))!==0&&(wr===null||!Ki.call(wr,t))&&l_();let n=r?Be(e):e;return Xi(t,n)}function Xi(t,e){if(!t.equals(e)){var r=t.v;Yn?Kn.set(t,e):Kn.set(t,r),t.v=e;var n=_n.ensure();if(n.capture(t,r),(t.f&_t)!==0){const i=t;(t.f&Pt)!==0&&mc(i),uc(i)}t.wv=wh(),Jf(t,Pt),Us()&&$e!==null&&($e.f&vt)!==0&&($e.f&(Or|jn))===0&&(kr===null?F_([t]):kr.push(t)),!n.is_fork&&gc.size>0&&!Gf&&C_()}return e}function C_(){Gf=!1;for(const t of gc)(t.f&vt)!==0&&ht(t,mn),Ws(t)&&Hs(t);gc.clear()}function Wr(t){M(t,t.v+1)}function Jf(t,e){var r=t.reactions;if(r!==null)for(var n=Us(),i=r.length,s=0;s<i;s++){var o=r[s],a=o.f;if(!(!n&&o===$e)){var l=(a&Pt)===0;if(l&&ht(o,e),(a&_t)!==0){var c=o;Dr?.delete(c),(a&wi)===0&&(a&vr&&(o.f|=wi),Jf(c,mn))}else l&&((a&pn)!==0&&bn!==null&&bn.add(o),wn(o))}}}function Be(t){if(typeof t!="object"||t===null||qr in t)return t;const e=la(t);if(e!==Tf&&e!==Yy)return t;var r=new Map,n=ia(t),i=le(0),s=kn,o=a=>{if(kn===s)return a();var l=Me,c=kn;Gt(null),bh(s);var u=a();return Gt(l),bh(c),u};return n&&r.set("length",le(t.length)),new Proxy(t,{defineProperty(a,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&o_();var u=r.get(l);return u===void 0?u=o(()=>{var d=le(c.value);return r.set(l,d),d}):M(u,c.value,!0),!0},deleteProperty(a,l){var c=r.get(l);if(c===void 0){if(l in a){const u=o(()=>le(gt));r.set(l,u),Wr(i)}}else M(c,gt),Wr(i);return!0},get(a,l,c){if(l===qr)return t;var u=r.get(l),d=l in a;if(u===void 0&&(!d||hn(a,l)?.writable)&&(u=o(()=>{var p=Be(d?a[l]:gt),v=le(p);return v}),r.set(l,u)),u!==void 0){var f=h(u);return f===gt?void 0:f}return Reflect.get(a,l,c)},getOwnPropertyDescriptor(a,l){var c=Reflect.getOwnPropertyDescriptor(a,l);if(c&&"value"in c){var u=r.get(l);u&&(c.value=h(u))}else if(c===void 0){var d=r.get(l),f=d?.v;if(d!==void 0&&f!==gt)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return c},has(a,l){if(l===qr)return!0;var c=r.get(l),u=c!==void 0&&c.v!==gt||Reflect.has(a,l);if(c!==void 0||$e!==null&&(!u||hn(a,l)?.writable)){c===void 0&&(c=o(()=>{var f=u?Be(a[l]):gt,p=le(f);return p}),r.set(l,c));var d=h(c);if(d===gt)return!1}return u},set(a,l,c,u){var d=r.get(l),f=l in a;if(n&&l==="length")for(var p=c;p<d.v;p+=1){var v=r.get(p+"");v!==void 0?M(v,gt):p in a&&(v=o(()=>le(gt)),r.set(p+"",v))}if(d===void 0)(!f||hn(a,l)?.writable)&&(d=o(()=>le(void 0)),M(d,Be(c)),r.set(l,d));else{f=d.v!==gt;var g=o(()=>Be(c));M(d,g)}var m=Reflect.getOwnPropertyDescriptor(a,l);if(m?.set&&m.set.call(u,c),!f){if(n&&typeof l=="string"){var b=r.get("length"),k=Number(l);Number.isInteger(k)&&k>=b.v&&M(b,k+1)}Wr(i)}return!0},ownKeys(a){h(i);var l=Reflect.ownKeys(a).filter(d=>{var f=r.get(d);return f===void 0||f.v!==gt});for(var[c,u]of r)u.v!==gt&&!(c in a)&&l.push(c);return l},setPrototypeOf(){a_()}})}function Qf(t){try{if(t!==null&&typeof t=="object"&&qr in t)return t[qr]}catch{}return t}function Xf(t,e){return Object.is(Qf(t),Qf(e))}var eh,th,rh,nh;function vc(){if(eh===void 0){eh=window,th=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;rh=hn(e,"firstChild").get,nh=hn(e,"nextSibling").get,Af(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Af(r)&&(r.__t=void 0)}}function Ht(t=""){return document.createTextNode(t)}function yr(t){return rh.call(t)}function Ir(t){return nh.call(t)}function $(t,e){if(!xe)return yr(t);var r=yr(Pe);if(r===null)r=Pe.appendChild(Ht());else if(e&&r.nodeType!==da){var n=Ht();return r?.before(n),bt(n),n}return bt(r),r}function L(t,e=!1){if(!xe){var r=yr(t);return r instanceof Comment&&r.data===""?Ir(r):r}if(e&&Pe?.nodeType!==da){var n=Ht();return Pe?.before(n),bt(n),n}return Pe}function ee(t,e=1,r=!1){let n=xe?Pe:t;for(var i;e--;)i=n,n=Ir(n);if(!xe)return n;if(r&&n?.nodeType!==da){var s=Ht();return n===null?i?.after(s):n.before(s),bt(s),s}return bt(n),n}function yc(t){t.textContent=""}function ih(){return!1}function O_(t=""){return document.createComment(t)}function D_(t,e){if(e){const r=document.body;t.autofocus=!0,lr(()=>{document.activeElement===r&&t.focus()})}}function I_(t){xe&&yr(t)!==null&&yc(t)}let sh=!1;function oh(){sh||(sh=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function va(t){var e=Me,r=$e;Gt(null),br(null);try{return t()}finally{Gt(e),br(r)}}function ya(t,e,r,n=r){t.addEventListener(e,()=>va(r));const i=t.__on_r;i?t.__on_r=()=>{i(),n(!0)}:t.__on_r=()=>n(!0),oh()}function ah(t){$e===null&&(Me===null&&r_(),t_()),Yn&&e_()}function P_(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function _r(t,e,r){var n=$e;n!==null&&(n.f&ar)!==0&&(t|=ar);var i={ctx:rt,deps:null,nodes:null,f:t|Pt|vr,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};if(r)try{Hs(i),i.f|=ua}catch(a){throw yt(i),a}else e!==null&&wn(i);var s=i;if(r&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&bi)===0&&(s=s.first,(t&pn)!==0&&(t&qn)!==0&&s!==null&&(s.f|=qn)),s!==null&&(s.parent=n,n!==null&&P_(s,n),Me!==null&&(Me.f&_t)!==0&&(t&jn)===0)){var o=Me;(o.effects??=[]).push(s)}return i}function _c(){return Me!==null&&!Pr}function _a(t){const e=_r(Zs,null,!1);return ht(e,vt),e.teardown=t,e}function _e(t){ah();var e=$e.f,r=!Me&&(e&Or)!==0&&(e&ua)===0;if(r){var n=rt;(n.e??=[]).push(t)}else return lh(t)}function lh(t){return _r(ca|If,t,!1)}function bc(t){return ah(),_r(Zs|If,t,!0)}function ba(t){_n.ensure();const e=_r(jn|bi,t,!0);return()=>{yt(e)}}function M_(t){_n.ensure();const e=_r(jn|bi,t,!0);return(r={})=>new Promise(n=>{r.outro?Si(e,()=>{yt(e),n(void 0)}):(yt(e),n(void 0))})}function wa(t){return _r(ca,t,!1)}function $_(t){return _r(oc|bi,t,!0)}function es(t,e=0){return _r(Zs|e,t,!0)}function ce(t,e=[],r=[],n=[]){Wf(n,e,r,i=>{_r(Zs,()=>t(...i.map(h)),!0)})}function qs(t,e=0){var r=_r(pn|e,t,!0);return r}function ch(t,e=0){var r=_r(nc|e,t,!0);return r}function Kt(t){return _r(Or|bi,t,!0)}function uh(t){var e=t.teardown;if(e!==null){const r=Yn,n=Me;vh(!0),Gt(null);try{e.call(null)}finally{vh(r),Gt(n)}}}function dh(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&va(()=>{i.abort(Gi)});var n=r.next;(r.f&jn)!==0?r.parent=null:yt(r,e),r=n}}function N_(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&Or)===0&&yt(e),e=r}}function yt(t,e=!0){var r=!1;(e||(t.f&Df)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(fh(t.nodes.start,t.nodes.end),r=!0),dh(t,e&&!r),Sa(t,0),ht(t,gn);var n=t.nodes&&t.nodes.t;if(n!==null)for(const s of n)s.stop();uh(t);var i=t.parent;i!==null&&i.first!==null&&hh(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=null}function fh(t,e){for(;t!==null;){var r=t===e?null:Ir(t);t.remove(),t=r}}function hh(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Si(t,e,r=!0){var n=[];ph(t,n,!0);var i=()=>{r&&yt(t),e&&e()},s=n.length;if(s>0){var o=()=>--s||i();for(var a of n)a.out(o)}else i()}function ph(t,e,r){if((t.f&ar)===0){t.f^=ar;var n=t.nodes&&t.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&e.push(a);for(var i=t.first;i!==null;){var s=i.next,o=(i.f&qn)!==0||(i.f&Or)!==0&&(t.f&pn)!==0;ph(i,e,o?r:!1),i=s}}}function wc(t){mh(t,!0)}function mh(t,e){if((t.f&ar)!==0){t.f^=ar,(t.f&vt)===0&&(ht(t,Pt),wn(t));for(var r=t.first;r!==null;){var n=r.next,i=(r.f&qn)!==0||(r.f&Or)!==0;mh(r,i?e:!1),r=n}var s=t.nodes&&t.nodes.t;if(s!==null)for(const o of s)(o.is_global||e)&&o.in()}}function gh(t,e){if(t.nodes)for(var r=t.nodes.start,n=t.nodes.end;r!==null;){var i=r===n?null:Ir(r);e.append(r),r=i}}let ka=!1,Yn=!1;function vh(t){Yn=t}let Me=null,Pr=!1;function Gt(t){Me=t}let $e=null;function br(t){$e=t}let wr=null;function yh(t){Me!==null&&(wr===null?wr=[t]:wr.push(t))}let Yt=null,ur=0,kr=null;function F_(t){kr=t}let _h=1,xi=0,kn=xi;function bh(t){kn=t}function wh(){return++_h}function Ws(t){var e=t.f;if((e&Pt)!==0)return!0;if(e&_t&&(t.f&=~wi),(e&mn)!==0){for(var r=t.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(Ws(s)&&Kf(s),s.wv>t.wv)return!0}(e&vr)!==0&&Dr===null&&ht(t,vt)}return!1}function kh(t,e,r=!0){var n=t.reactions;if(n!==null&&!(wr!==null&&Ki.call(wr,t)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&_t)!==0?kh(s,e,!1):e===s&&(r?ht(s,Pt):(s.f&vt)!==0&&ht(s,mn),wn(s))}}function Sh(t){var e=Yt,r=ur,n=kr,i=Me,s=wr,o=rt,a=Pr,l=kn,c=t.f;Yt=null,ur=0,kr=null,Me=(c&(Or|jn))===0?t:null,wr=null,Ji(t.ctx),Pr=!1,kn=++xi,t.ac!==null&&(va(()=>{t.ac.abort(Gi)}),t.ac=null);try{t.f|=sc;var u=t.fn,d=u(),f=t.deps,p=Ze?.is_fork;if(Yt!==null){var v;if(p||Sa(t,ur),f!==null&&ur>0)for(f.length=ur+Yt.length,v=0;v<Yt.length;v++)f[ur+v]=Yt[v];else t.deps=f=Yt;if(_c()&&(t.f&vr)!==0)for(v=ur;v<f.length;v++)(f[v].reactions??=[]).push(t)}else!p&&f!==null&&ur<f.length&&(Sa(t,ur),f.length=ur);if(Us()&&kr!==null&&!Pr&&f!==null&&(t.f&(_t|mn|Pt))===0)for(v=0;v<kr.length;v++)kh(kr[v],t);if(i!==null&&i!==t){if(xi++,i.deps!==null)for(let g=0;g<r;g+=1)i.deps[g].rv=xi;if(e!==null)for(const g of e)g.rv=xi;kr!==null&&(n===null?n=kr:n.push(...kr))}return(t.f&Wn)!==0&&(t.f^=Wn),d}catch(g){return Lf(g)}finally{t.f^=sc,Yt=e,ur=r,kr=n,Me=i,wr=s,Ji(o),Pr=a,kn=l}}function R_(t,e){let r=e.reactions;if(r!==null){var n=Gy.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(e.f&_t)!==0&&(Yt===null||!Ki.call(Yt,e))){var s=e;(s.f&vr)!==0&&(s.f^=vr,s.f&=~wi),uc(s),Hf(s),Sa(s,0)}}function Sa(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)R_(t,r[n])}function Hs(t){var e=t.f;if((e&gn)===0){ht(t,vt);var r=$e,n=ka;$e=t,ka=!0;try{(e&(pn|nc))!==0?N_(t):dh(t),uh(t);var i=Sh(t);t.teardown=typeof i=="function"?i:null,t.wv=_h;var s;tc&&h_&&(t.f&Pt)!==0&&t.deps}finally{ka=n,$e=r}}}async function xh(){await Promise.resolve(),y()}function h(t){var e=t.f,r=(e&_t)!==0;if(Me!==null&&!Pr){var n=$e!==null&&($e.f&gn)!==0;if(!n&&(wr===null||!Ki.call(wr,t))){var i=Me.deps;if((Me.f&sc)!==0)t.rv<xi&&(t.rv=xi,Yt===null&&i!==null&&i[ur]===t?ur++:Yt===null?Yt=[t]:Yt.push(t));else{(Me.deps??=[]).push(t);var s=t.reactions;s===null?t.reactions=[Me]:Ki.call(s,Me)||s.push(Me)}}}if(Yn&&Kn.has(t))return Kn.get(t);if(r){var o=t;if(Yn){var a=o.v;return((o.f&vt)===0&&o.reactions!==null||Th(o))&&(a=mc(o)),Kn.set(o,a),a}var l=(o.f&vr)===0&&!Pr&&Me!==null&&(ka||(Me.f&vr)!==0),c=o.deps===null;Ws(o)&&(l&&(o.f|=vr),Kf(o)),l&&!c&&Eh(o)}if(Dr?.has(t))return Dr.get(t);if((t.f&Wn)!==0)throw t.v;return t.v}function Eh(t){if(t.deps!==null){t.f|=vr;for(const e of t.deps)(e.reactions??=[]).push(t),(e.f&_t)!==0&&(e.f&vr)===0&&Eh(e)}}function Th(t){if(t.v===gt)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(Kn.has(e)||(e.f&_t)!==0&&Th(e))return!0;return!1}function Ge(t){var e=Pr;try{return Pr=!0,t()}finally{Pr=e}}function L_(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(qr in t)kc(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&qr in r&&kc(r)}}}function kc(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let n in t)try{kc(t[n],e)}catch{}const r=la(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=Ef(r);for(let i in n){const s=n[i].get;if(s)try{s.call(t)}catch{}}}}}const Ah=new Set,Sc=new Set;function xc(t,e,r,n={}){function i(s){if(n.capture||Ks.call(e,s),!s.cancelBubble)return va(()=>r?.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?lr(()=>{e.addEventListener(t,i,n)}):e.addEventListener(t,i,n),i}function wt(t,e,r,n={}){var i=xc(e,t,r,n);return()=>{t.removeEventListener(e,i,n)}}function Ec(t,e,r,n,i){var s={capture:n,passive:i},o=xc(t,e,r,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&_a(()=>{e.removeEventListener(t,o,s)})}function Hr(t){for(var e=0;e<t.length;e++)Ah.add(t[e]);for(var r of Sc)r(t)}let Ch=null;function Ks(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;Ch=t;var o=0,a=Ch===t&&t.__root;if(a){var l=i.indexOf(a);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var c=i.indexOf(e);if(c===-1)return;l<=c&&(o=l)}if(s=i[o]||t.target,s!==e){aa(t,"currentTarget",{configurable:!0,get(){return s||r}});var u=Me,d=$e;Gt(null),br(null);try{for(var f,p=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var g=s["__"+n];g!=null&&(!s.disabled||t.target===s)&&g.call(s,t)}catch(m){f?p.push(m):f=m}if(t.cancelBubble||v===e||v===null)break;s=v}if(f){for(let m of p)queueMicrotask(()=>{throw m});throw f}}finally{t.__root=e,delete t.currentTarget,Gt(u),br(d)}}}function Oh(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Kr(t,e){var r=$e;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function q(t,e){var r=(e&Wy)!==0,n=(e&Hy)!==0,i,s=!t.startsWith("<!>");return()=>{if(xe)return Kr(Pe,null),Pe;i===void 0&&(i=Oh(s?t:"<!>"+t),r||(i=yr(i)));var o=n||th?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=yr(o),l=o.lastChild;Kr(a,l)}else Kr(o,o);return o}}function Jt(t=""){if(!xe){var e=Ht(t+"");return Kr(e,e),e}var r=Pe;return r.nodeType!==da&&(r.before(r=Ht()),bt(r)),Kr(r,r),r}function H(){if(xe)return Kr(Pe,null),Pe;var t=document.createDocumentFragment(),e=document.createComment(""),r=Ht();return t.append(e,r),Kr(e,r),t}function w(t,e){if(xe){var r=$e;((r.f&ua)===0||r.nodes.end===null)&&(r.nodes.end=Pe),yn();return}t!==null&&t.before(e)}function kt(){if(xe&&Pe&&Pe.nodeType===Hn&&Pe.textContent?.startsWith("$")){const t=Pe.textContent.substring(1);return yn(),t}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function z_(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const Z_=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function V_(t){return Z_.includes(t)}const U_={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function B_(t){return t=t.toLowerCase(),U_[t]??t}const j_=["touchstart","touchmove"];function q_(t){return j_.includes(t)}function se(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=r+"")}function Dh(t,e){return Ih(t,e)}function W_(t,e){vc(),e.intro=e.intro??!1;const r=e.target,n=xe,i=Pe;try{for(var s=yr(r);s&&(s.nodeType!==Hn||s.data!==Sf);)s=Ir(s);if(!s)throw _i;Mt(!0),bt(s);const o=Ih(t,{...e,anchor:s});return Mt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
2
2
|
`).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==_i&&console.warn("Failed to hydrate: ",o),e.recover===!1&&i_(),vc(),yc(r),Mt(!1),Dh(t,e)}finally{Mt(n),bt(i)}}const ts=new Map;function Ih(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:o=!0}){vc();var a=new Set,l=d=>{for(var f=0;f<d.length;f++){var p=d[f];if(!a.has(p)){a.add(p);var v=q_(p);e.addEventListener(p,Ks,{passive:v});var g=ts.get(p);g===void 0?(document.addEventListener(p,Ks,{passive:v}),ts.set(p,1)):ts.set(p,g+1)}}};l(sa(Ah)),Sc.add(l);var c=void 0,u=M_(()=>{var d=r??e.appendChild(Ht());return S_(d,{pending:()=>{}},f=>{if(s){te({});var p=rt;p.c=s}if(i&&(n.$$events=i),xe&&Kr(f,null),c=t(f,n)||{},xe&&($e.nodes.end=Pe,Pe===null||Pe.nodeType!==Hn||Pe.data!==ec))throw Vs(),_i;s&&re()}),()=>{for(var f of a){e.removeEventListener(f,Ks);var p=ts.get(f);--p===0?(document.removeEventListener(f,Ks),ts.delete(f)):ts.set(f,p)}Sc.delete(l),d!==r&&d.parentNode?.removeChild(d)}});return Tc.set(c,u),c}let Tc=new WeakMap;function H_(t,e){const r=Tc.get(t);return r?(Tc.delete(t),r(e)):Promise.resolve()}class Ac{anchor;#e=new Map;#t=new Map;#r=new Map;#n=new Set;#i=!0;constructor(e,r=!0){this.anchor=e,this.#i=r}#s=()=>{var e=Ze;if(this.#e.has(e)){var r=this.#e.get(e),n=this.#t.get(r);if(n)wc(n),this.#n.delete(r);else{var i=this.#r.get(r);i&&(this.#t.set(r,i.effect),this.#r.delete(r),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,o]of this.#e){if(this.#e.delete(s),s===e)break;const a=this.#r.get(o);a&&(yt(a.effect),this.#r.delete(o))}for(const[s,o]of this.#t){if(s===r||this.#n.has(s))continue;const a=()=>{if(Array.from(this.#e.values()).includes(s)){var c=document.createDocumentFragment();gh(o,c),c.append(Ht()),this.#r.set(s,{effect:o,fragment:c})}else yt(o);this.#n.delete(s),this.#t.delete(s)};this.#i||!n?(this.#n.add(s),Si(o,a,!1)):a()}}};#a=e=>{this.#e.delete(e);const r=Array.from(this.#e.values());for(const[n,i]of this.#r)r.includes(n)||(yt(i.effect),this.#r.delete(n))};ensure(e,r){var n=Ze,i=ih();if(r&&!this.#t.has(e)&&!this.#r.has(e))if(i){var s=document.createDocumentFragment(),o=Ht();s.append(o),this.#r.set(e,{effect:Kt(()=>r(o)),fragment:s})}else this.#t.set(e,Kt(()=>r(this.anchor)));if(this.#e.set(n,e),i){for(const[a,l]of this.#t)a===e?n.skipped_effects.delete(l):n.skipped_effects.add(l);for(const[a,l]of this.#r)a===e?n.skipped_effects.delete(l.effect):n.skipped_effects.add(l.effect);n.oncommit(this.#s),n.ondiscard(this.#a)}else xe&&(this.anchor=Pe),this.#s()}}function ke(t,e,...r){var n=new Ac(t);qs(()=>{const i=e()??null;n.ensure(i,i&&(s=>i(s,...r)))},qn)}function Sn(t){rt===null&&Pf(),Yi&&rt.l!==null?K_(rt).m.push(t):_e(()=>{const e=Ge(t);if(typeof e=="function")return e})}function K_(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}function G_(){return Symbol(xf)}function de(t,e,r=!1){xe&&yn();var n=new Ac(t),i=r?qn:0;function s(o,a){if(xe){const c=Mf(t)===na;if(o===c){var l=fa();bt(l),n.anchor=l,Mt(!1),n.ensure(o,a),Mt(!0);return}}n.ensure(o,a)}qs(()=>{var o=!1;e((a,l=!0)=>{o=!0,s(l,a)}),o||s(!1,null)},i)}function Gr(t,e){return e}function Y_(t,e,r){for(var n=[],i=e.length,s,o=e.length,a=0;a<i;a++){let d=e[a];Si(d,()=>{if(s){if(s.pending.delete(d),s.done.add(d),s.pending.size===0){var f=t.outrogroups;Cc(sa(s.done)),f.delete(s),f.size===0&&(t.outrogroups=null)}}else o-=1},!1)}if(o===0){var l=n.length===0&&r!==null;if(l){var c=r,u=c.parentNode;yc(u),u.append(c),t.items.clear()}Cc(e,!l)}else s={pending:new Set(e),done:new Set},(t.outrogroups??=new Set).add(s)}function Cc(t,e=!0){for(var r=0;r<t.length;r++)yt(t[r],e)}var Ph;function Ke(t,e,r,n,i,s=null){var o=t,a=new Map,l=(e&kf)!==0;if(l){var c=t;o=xe?bt(yr(c)):c.appendChild(Ht())}xe&&yn();var u=null,d=pc(()=>{var b=r();return ia(b)?b:b==null?[]:sa(b)}),f,p=!0;function v(){m.fallback=u,J_(m,f,o,e,n),u!==null&&(f.length===0?(u.f&vn)===0?wc(u):(u.f^=vn,Ys(u,null,o)):Si(u,()=>{u=null}))}var g=qs(()=>{f=h(d);var b=f.length;let k=!1;if(xe){var D=Mf(o)===na;D!==(b===0)&&(o=fa(),bt(o),Mt(!1),k=!0)}for(var T=new Set,P=Ze,A=ih(),O=0;O<b;O+=1){xe&&Pe.nodeType===Hn&&Pe.data===ec&&(o=Pe,k=!0,Mt(!1));var F=f[O],N=n(F,O),j=p?null:a.get(N);j?(j.v&&Xi(j.v,F),j.i&&Xi(j.i,O),A&&P.skipped_effects.delete(j.e)):(j=Q_(a,p?o:Ph??=Ht(),F,N,O,i,e,r),p||(j.e.f|=vn),a.set(N,j)),T.add(N)}if(b===0&&s&&!u&&(p?u=Kt(()=>s(o)):(u=Kt(()=>s(Ph??=Ht())),u.f|=vn)),xe&&b>0&&bt(fa()),!p)if(A){for(const[G,Z]of a)T.has(G)||P.skipped_effects.add(Z.e);P.oncommit(v),P.ondiscard(()=>{})}else v();k&&Mt(!0),h(d)}),m={effect:g,items:a,outrogroups:null,fallback:u};p=!1,xe&&(o=Pe)}function Gs(t){for(;t!==null&&(t.f&Or)===0;)t=t.next;return t}function J_(t,e,r,n,i){var s=(n&zy)!==0,o=e.length,a=t.items,l=Gs(t.effect.first),c,u=null,d,f=[],p=[],v,g,m,b;if(s)for(b=0;b<o;b+=1)v=e[b],g=i(v,b),m=a.get(g).e,(m.f&vn)===0&&(m.nodes?.a?.measure(),(d??=new Set).add(m));for(b=0;b<o;b+=1){if(v=e[b],g=i(v,b),m=a.get(g).e,t.outrogroups!==null)for(const j of t.outrogroups)j.pending.delete(m),j.done.delete(m);if((m.f&vn)!==0)if(m.f^=vn,m===l)Ys(m,null,r);else{var k=u?u.next:l;m===t.effect.last&&(t.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),Jn(t,u,m),Jn(t,m,k),Ys(m,k,r),u=m,f=[],p=[],l=Gs(u.next);continue}if((m.f&ar)!==0&&(wc(m),s&&(m.nodes?.a?.unfix(),(d??=new Set).delete(m))),m!==l){if(c!==void 0&&c.has(m)){if(f.length<p.length){var D=p[0],T;u=D.prev;var P=f[0],A=f[f.length-1];for(T=0;T<f.length;T+=1)Ys(f[T],D,r);for(T=0;T<p.length;T+=1)c.delete(p[T]);Jn(t,P.prev,A.next),Jn(t,u,P),Jn(t,A,D),l=D,u=A,b-=1,f=[],p=[]}else c.delete(m),Ys(m,l,r),Jn(t,m.prev,m.next),Jn(t,m,u===null?t.effect.first:u.next),Jn(t,u,m),u=m;continue}for(f=[],p=[];l!==null&&l!==m;)(c??=new Set).add(l),p.push(l),l=Gs(l.next);if(l===null)continue}(m.f&vn)===0&&f.push(m),u=m,l=Gs(m.next)}if(t.outrogroups!==null){for(const j of t.outrogroups)j.pending.size===0&&(Cc(sa(j.done)),t.outrogroups?.delete(j));t.outrogroups.size===0&&(t.outrogroups=null)}if(l!==null||c!==void 0){var O=[];if(c!==void 0)for(m of c)(m.f&ar)===0&&O.push(m);for(;l!==null;)(l.f&ar)===0&&l!==t.fallback&&O.push(l),l=Gs(l.next);var F=O.length;if(F>0){var N=(n&kf)!==0&&o===0?r:null;if(s){for(b=0;b<F;b+=1)O[b].nodes?.a?.measure();for(b=0;b<F;b+=1)O[b].nodes?.a?.fix()}Y_(t,O,N)}}s&&lr(()=>{if(d!==void 0)for(m of d)m.nodes?.a?.apply()})}function Q_(t,e,r,n,i,s,o,a){var l=(o&Cr)!==0?(o&Zy)===0?Yf(r,!1,!1):Gn(r):null,c=(o&Bn)!==0?Gn(i):null;return{v:l,i:c,e:Kt(()=>(s(e,l??r,c??i,a),()=>{t.delete(n)}))}}function Ys(t,e,r){if(t.nodes)for(var n=t.nodes.start,i=t.nodes.end,s=e&&(e.f&vn)===0?e.nodes.start:r;n!==null;){var o=Ir(n);if(s.before(n),n===i)return;n=o}}function Jn(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function X_(t,e,r=!1,n=!1,i=!1){var s=t,o="";ce(()=>{var a=$e;if(o===(o=e()??"")){xe&&yn();return}if(a.nodes!==null&&(fh(a.nodes.start,a.nodes.end),a.nodes=null),o!==""){if(xe){Pe.data;for(var l=yn(),c=l;l!==null&&(l.nodeType!==Hn||l.data!=="");)c=l,l=Ir(l);if(l===null)throw Vs(),_i;Kr(Pe,c),s=bt(l);return}var u=o+"";r?u=`<svg>${u}</svg>`:n&&(u=`<math>${u}</math>`);var d=Oh(u);if((r||n)&&(d=yr(d)),Kr(yr(d),d.lastChild),r||n)for(;yr(d);)s.before(yr(d));else s.before(d)}})}function eb(t,e,r,n,i){xe&&yn();var s=e.$$slots?.[r],o=!1;s===!0&&(s=e.children,o=!0),s===void 0||s(t,o?()=>n:n)}function Le(t,e,r){xe&&yn();var n=new Ac(t);qs(()=>{var i=e()??null;n.ensure(i,i&&(s=>r(s,i)))},qn)}function tb(t,e){var r=void 0,n;ch(()=>{r!==(r=e())&&(n&&(yt(n),n=null),r&&(n=Kt(()=>{wa(()=>r(t))})))})}function Mh(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=Mh(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function xa(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=Mh(t))&&(n&&(n+=" "),n+=e);return n}function Yr(t){return typeof t=="object"?xa(t):t??""}const $h=[...`
|
|
3
|
-
\r\f \v\uFEFF`];function rb(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var i in r)if(r[i])n=n?n+" "+i:i;else if(n.length)for(var s=i.length,o=0;(o=n.indexOf(i,o))>=0;){var a=o+s;(o===0||$h.includes(n[o-1]))&&(a===n.length||$h.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function Nh(t,e=!1){var r=e?" !important;":";",n="";for(var i in t){var s=t[i];s!=null&&s!==""&&(n+=" "+i+": "+s+r)}return n}function Oc(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function nb(t,e){if(e){var r="",n,i;if(Array.isArray(e)?(n=e[0],i=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,o=0,a=!1,l=[];n&&l.push(...Object.keys(n).map(Oc)),i&&l.push(...Object.keys(i).map(Oc));var c=0,u=-1;const g=t.length;for(var d=0;d<g;d++){var f=t[d];if(a?f==="/"&&t[d-1]==="*"&&(a=!1):s?s===f&&(s=!1):f==="/"&&t[d+1]==="*"?a=!0:f==='"'||f==="'"?s=f:f==="("?o++:f===")"&&o--,!a&&s===!1&&o===0){if(f===":"&&u===-1)u=d;else if(f===";"||d===g-1){if(u!==-1){var p=Oc(t.substring(c,u).trim());if(!l.includes(p)){f!==";"&&d++;var v=t.substring(c,d).trim();r+=" "+v+";"}}c=d+1,u=-1}}}}return n&&(r+=Nh(n)),i&&(r+=Nh(i,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function Qt(t,e,r,n,i,s){var o=t.__className;if(xe||o!==r||o===void 0){var a=rb(r,n,s);(!xe||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a)),t.__className=r}else if(s&&i!==s)for(var l in s){var c=!!s[l];(i==null||c!==!!i[l])&&t.classList.toggle(l,c)}return s}function Dc(t,e={},r,n){for(var i in r){var s=r[i];e[i]!==s&&(r[i]==null?t.style.removeProperty(i):t.style.setProperty(i,s,n))}}function ib(t,e,r,n){var i=t.__style;if(xe||i!==e){var s=nb(e,n);(!xe||s!==t.getAttribute("style"))&&(s==null?t.removeAttribute("style"):t.style.cssText=s),t.__style=e}else n&&(Array.isArray(n)?(Dc(t,r?.[0],n[0]),Dc(t,r?.[1],n[1],"important")):Dc(t,r,n));return n}function Ea(t,e,r=!1){if(t.multiple){if(e==null)return;if(!ia(e))return u_();for(var n of t.options)n.selected=e.includes(Js(n));return}for(n of t.options){var i=Js(n);if(Xf(i,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function Fh(t){var e=new MutationObserver(()=>{Ea(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),_a(()=>{e.disconnect()})}function sb(t,e,r=e){var n=new WeakSet,i=!0;ya(t,"change",s=>{var o=s?"[selected]":":checked",a;if(t.multiple)a=[].map.call(t.querySelectorAll(o),Js);else{var l=t.querySelector(o)??t.querySelector("option:not([disabled])");a=l&&Js(l)}r(a),Ze!==null&&n.add(Ze)}),wa(()=>{var s=e();if(t===document.activeElement){var o=ma??Ze;if(n.has(o))return}if(Ea(t,s,i),i&&s===void 0){var a=t.querySelector(":checked");a!==null&&(s=Js(a),r(s))}t.__value=s,i=!1}),Fh(t)}function Js(t){return"__value"in t?t.__value:t.value}const Qs=Symbol("class"),Xs=Symbol("style"),Rh=Symbol("is custom element"),Lh=Symbol("is html");function Ta(t){if(xe){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;Te(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var i=t.checked;Te(t,"checked",null),t.checked=i}}};t.__on_r=r,lr(r),oh()}}function zh(t,e){var r=Aa(t);r.value===(r.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!=="PROGRESS")||(t.value=e??"")}function ob(t,e){var r=Aa(t);r.checked!==(r.checked=e??void 0)&&(t.checked=e)}function Ic(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Te(t,e,r,n){var i=Aa(t);xe&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||i[e]!==(i[e]=r)&&(e==="loading"&&(t[Qy]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Mc(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function Ei(t,e,r){var n=Me,i=$e;let s=xe;xe&&Mt(!1),Gt(null),br(null);try{e!=="style"&&(Pc.has(t.getAttribute("is")||t.nodeName)||!customElements||customElements.get(t.getAttribute("is")||t.tagName.toLowerCase())?Mc(t).includes(e):r&&typeof r=="object")?t[e]=r:Te(t,e,r==null?r:String(r))}finally{Gt(n),br(i),s&&Mt(!0)}}function ab(t,e,r,n,i=!1,s=!1){if(xe&&i&&t.tagName==="INPUT"){var o=t,a=o.type==="checkbox"?"defaultChecked":"defaultValue";a in r||Ta(o)}var l=Aa(t),c=l[Rh],u=!l[Lh];let d=xe&&c;d&&Mt(!1);var f=e||{},p=t.tagName==="OPTION";for(var v in e)v in r||(r[v]=null);r.class?r.class=Yr(r.class):r[Qs]&&(r.class=null),r[Xs]&&(r.style??=null);var g=Mc(t);for(const A in r){let O=r[A];if(p&&A==="value"&&O==null){t.value=t.__value="",f[A]=O;continue}if(A==="class"){var m=t.namespaceURI==="http://www.w3.org/1999/xhtml";Qt(t,m,O,n,e?.[Qs],r[Qs]),f[A]=O,f[Qs]=r[Qs];continue}if(A==="style"){ib(t,O,e?.[Xs],r[Xs]),f[A]=O,f[Xs]=r[Xs];continue}var b=f[A];if(!(O===b&&!(O===void 0&&t.hasAttribute(A)))){f[A]=O;var k=A[0]+A[1];if(k!=="$$")if(k==="on"){const F={},N="$$"+A;let j=A.slice(2);var D=V_(j);if(z_(j)&&(j=j.slice(0,-7),F.capture=!0),!D&&b){if(O!=null)continue;t.removeEventListener(j,f[N],F),f[N]=null}if(O!=null)if(D)t[`__${j}`]=O,Hr([j]);else{let G=function(Z){f[A].call(this,Z)};f[N]=xc(j,t,G,F)}else D&&(t[`__${j}`]=void 0)}else if(A==="style")Te(t,A,O);else if(A==="autofocus")D_(t,!!O);else if(!c&&(A==="__value"||A==="value"&&O!=null))t.value=t.__value=O;else if(A==="selected"&&p)Ic(t,O);else{var T=A;u||(T=B_(T));var P=T==="defaultValue"||T==="defaultChecked";if(O==null&&!c&&!P)if(l[A]=null,T==="value"||T==="checked"){let F=t;const N=e===void 0;if(T==="value"){let j=F.defaultValue;F.removeAttribute(T),F.defaultValue=j,F.value=F.__value=N?j:null}else{let j=F.defaultChecked;F.removeAttribute(T),F.defaultChecked=j,F.checked=N?j:!1}}else t.removeAttribute(A);else P||g.includes(T)&&(c||typeof O!="string")?(t[T]=O,T in l&&(l[T]=gt)):typeof O!="function"&&Te(t,T,O)}}}return d&&Mt(!0),f}function je(t,e,r=[],n=[],i=[],s,o=!1,a=!1){Wf(i,r,n,l=>{var c=void 0,u={},d=t.nodeName==="SELECT",f=!1;if(ch(()=>{var v=e(...l.map(h)),g=ab(t,c,v,s,o,a);f&&d&&"value"in v&&Ea(t,v.value);for(let b of Object.getOwnPropertySymbols(u))v[b]||yt(u[b]);for(let b of Object.getOwnPropertySymbols(v)){var m=v[b];b.description===xf&&(!c||m!==c[b])&&(u[b]&&yt(u[b]),u[b]=Kt(()=>tb(t,()=>m))),g[b]=m}c=g}),d){var p=t;wa(()=>{Ea(p,c.value,!0),Fh(p)})}f=!0})}function Aa(t){return t.__attributes??={[Rh]:t.nodeName.includes("-"),[Lh]:t.namespaceURI===Ky}}var Pc=new Map;function Mc(t){var e=t.getAttribute("is")||t.nodeName,r=Pc.get(e);if(r)return r;Pc.set(e,r=[]);for(var n,i=t,s=Element.prototype;s!==i;){n=Ef(i);for(var o in n)n[o].set&&r.push(o);i=la(i)}return r}let $c=null;function lb(){if($c===null){var t=document.createElement("select");t.innerHTML="<option><span>t</span></option>",$c=t.firstChild?.firstChild?.nodeType===1}return $c}function cb(t,e){var r=xe;lb()||(Mt(!1),t.textContent="",t.append(O_("")));try{e()}finally{r&&(xe?I(t):(Mt(!0),bt(t)))}}function Ca(t,e,r=e){var n=new WeakSet;ya(t,"input",async i=>{var s=i?t.defaultValue:t.value;if(s=Fc(t)?Rc(s):s,r(s),Ze!==null&&n.add(Ze),await xh(),s!==(s=e())){var o=t.selectionStart,a=t.selectionEnd,l=t.value.length;if(t.value=s??"",a!==null){var c=t.value.length;o===a&&a===l&&c>l?(t.selectionStart=c,t.selectionEnd=c):(t.selectionStart=o,t.selectionEnd=Math.min(a,c))}}}),(xe&&t.defaultValue!==t.value||Ge(e)==null&&t.value)&&(r(Fc(t)?Rc(t.value):t.value),Ze!==null&&n.add(Ze)),es(()=>{var i=e();if(t===document.activeElement){var s=ma??Ze;if(n.has(s))return}Fc(t)&&i===Rc(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}const Nc=new Set;function ub(t,e,r,n,i=n){var s=r.getAttribute("type")==="checkbox",o=t;let a=!1;if(e!==null)for(var l of e)o=o[l]??=[];o.push(r),ya(r,"change",()=>{var c=r.__value;s&&(c=Zh(o,c,r.checked)),i(c)},()=>i(s?[]:null)),es(()=>{var c=n();if(xe&&r.defaultChecked!==r.checked){a=!0;return}s?(c=c||[],r.checked=c.includes(r.__value)):r.checked=Xf(r.__value,c)}),_a(()=>{var c=o.indexOf(r);c!==-1&&o.splice(c,1)}),Nc.has(o)||(Nc.add(o),lr(()=>{o.sort((c,u)=>c.compareDocumentPosition(u)===4?-1:1),Nc.delete(o)})),lr(()=>{if(a){var c;if(s)c=Zh(o,c,r.checked);else{var u=o.find(d=>d.checked);c=u?.__value}i(c)}})}function db(t,e,r=e){ya(t,"change",n=>{var i=n?t.defaultChecked:t.checked;r(i)}),(xe&&t.defaultChecked!==t.checked||Ge(e)==null)&&r(t.checked),es(()=>{var n=e();t.checked=!!n})}function Zh(t,e,r){for(var n=new Set,i=0;i<t.length;i+=1)t[i].checked&&n.add(t[i].__value);return r||n.delete(e),Array.from(n)}function Fc(t){var e=t.type;return e==="number"||e==="range"}function Rc(t){return t===""?null:+t}function Vh(t,e){return t===e||t?.[qr]===e}function Uh(t={},e,r,n){return wa(()=>{var i,s;return es(()=>{i=s,s=[],Ge(()=>{t!==r(...s)&&(e(t,...s),i&&Vh(r(...i),t)&&e(null,...i))})}),()=>{lr(()=>{s&&Vh(r(...s),t)&&e(null,...s)})}}),t}function Lc(t=!1){const e=rt,r=e.l.u;if(!r)return;let n=()=>L_(e.s);if(t){let i=0,s={};const o=js(()=>{let a=!1;const l=e.s;for(const c in l)l[c]!==s[c]&&(s[c]=l[c],a=!0);return a&&i++,i});n=()=>h(o)}r.b.length&&bc(()=>{Bh(e,n),rc(r.b)}),_e(()=>{const i=Ge(()=>r.m.map(Jy));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&_e(()=>{Bh(e,n),rc(r.a)})}function Bh(t,e){if(t.l.s)for(const r of t.l.s)h(r);e()}let Oa=!1;function fb(t){var e=Oa;try{return Oa=!1,[t(),Oa]}finally{Oa=e}}const hb={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Je(t,e,r){return new Proxy({props:t,exclude:e},hb)}const pb={get(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(zs(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n)return n[e]}},set(t,e,r){let n=t.props.length;for(;n--;){let i=t.props[n];zs(i)&&(i=i());const s=hn(i,e);if(s&&s.set)return s.set(r),!0}return!1},getOwnPropertyDescriptor(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(zs(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const i=hn(n,e);return i&&!i.configurable&&(i.configurable=!0),i}}},has(t,e){if(e===qr||e===ac)return!1;for(let r of t.props)if(zs(r)&&(r=r()),r!=null&&e in r)return!0;return!1},ownKeys(t){const e=[];for(let r of t.props)if(zs(r)&&(r=r()),!!r){for(const n in r)e.includes(n)||e.push(n);for(const n of Object.getOwnPropertySymbols(r))e.includes(n)||e.push(n)}return e}};function Qn(...t){return new Proxy({props:t},pb)}function _(t,e,r,n){var i=!Yi||(r&Uy)!==0,s=(r&jy)!==0,o=(r&qy)!==0,a=n,l=!0,c=()=>(l&&(l=!1,a=o?Ge(n):n),a),u;if(s){var d=qr in t||ac in t;u=hn(t,e)?.set??(d&&e in t?D=>t[e]=D:void 0)}var f,p=!1;s?[f,p]=fb(()=>t[e]):f=t[e],f===void 0&&n!==void 0&&(f=c(),u&&(i&&s_(),u(f)));var v;if(i?v=()=>{var D=t[e];return D===void 0?c():(l=!0,D)}:v=()=>{var D=t[e];return D!==void 0&&(a=void 0),D===void 0?a:D},i&&(r&By)===0)return v;if(u){var g=t.$$legacy;return(function(D,T){return arguments.length>0?((!i||!T||g||p)&&u(T?v():D),D):v()})}var m=!1,b=((r&Vy)!==0?js:pc)(()=>(m=!1,v()));s&&h(b);var k=$e;return(function(D,T){if(arguments.length>0){const P=T?h(b):i&&s?Be(D):D;return M(b,P),m=!0,a!==void 0&&(a=P),D}return Yn&&m||(k.f&gn)!==0?b.v:h(b)})}function mb(t){return new gb(t)}class gb{#e;#t;constructor(e){var r=new Map,n=(s,o)=>{var a=Yf(o,!1,!1);return r.set(s,a),a};const i=new Proxy({...e.props||{},$$events:{}},{get(s,o){return h(r.get(o)??n(o,Reflect.get(s,o)))},has(s,o){return o===ac?!0:(h(r.get(o)??n(o,Reflect.get(s,o))),Reflect.has(s,o))},set(s,o,a){return M(r.get(o)??n(o,a),a),Reflect.set(s,o,a)}});this.#t=(e.hydrate?W_:Dh)(e.component,{target:e.target,anchor:e.anchor,props:i,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&y(),this.#e=i.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||aa(this,s,{get(){return this.#t[s]},set(o){this.#t[s]=o},enumerable:!0});this.#t.$set=s=>{Object.assign(i,s)},this.#t.$destroy=()=>{H_(this.#t)}}$set(e){this.#t.$set(e)}$on(e,r){this.#e[e]=this.#e[e]||[];const n=(...i)=>r.call(this,...i);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(i=>i!==n)}}$destroy(){this.#t.$destroy()}}let jh;typeof HTMLElement=="function"&&(jh=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(t,e,r){super(),this.$$ctor=t,this.$$s=e,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),w(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=vb(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Da(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=mb({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=ba(()=>{es(()=>{this.$$r=!0;for(const n of oa(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Da(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Da(t,r,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return oa(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Da(t,e,r,n){const i=r[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function vb(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function ne(t,e,r,n,i,s){let o=class extends jh{constructor(){super(t,r,i),this.$$p_d=e}static get observedAttributes(){return oa(e).map(a=>(e[a].attribute||a).toLowerCase())}};return oa(e).forEach(a=>{aa(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=Da(a,l,e),this.$$d[a]=l;var c=this.$$c;if(c){var u=hn(c,a)?.get;u?c[a]=l:c.$set({[a]:l})}}})}),n.forEach(a=>{aa(o.prototype,a,{get(){return this.$$c?.[a]}})}),t.element=o,o}const qh={account:()=>"/#/user/account",annualTickets:()=>"/#/tickets/annual",checkoutFailure:t=>`/#/checkout/failure?payment_error=${t}`,checkoutSuccess:t=>`/#/checkout/success?ORDERID=${t}`,checkoutForm:()=>"/#/checkout",coupons:()=>"/#/coupons",combiTickets:()=>"/#/tickets/combi",combiTicketGroup:t=>"/#/tickets/combi?group="+t,dayTickets:()=>"/#/tickets/day",eventGroup:bb,event:t=>"/#/product/event/"+t,events:()=>"/#/products/events",exhibition:t=>"/#/exhibition/"+t,exhibitions:()=>"/#/exhibitions",home:()=>"/#/start",login:()=>"/#/login",merchandise:t=>"/#/merchandise/detail/"+t,merchandises:()=>"/#/merchandise/list",museum:t=>"/#/museum/"+t,museums:()=>"/#/museums",publicTours:()=>"/#/products/public-tours",register:()=>"/#/registration",tickets:()=>"/#/tickets/filters",ticketGroup:t=>"/#/tickets/filters?group="+t,tour:t=>"/#/product/tour/"+t,tours:()=>"/#/products/tours",toursGroup:wb,cart:()=>"/#/cart",annualTicketPersonalizationForm:(t,e)=>`/#/tickets/annual/personalisation/${t}/${e}`,annualTicketPersonalizationList:t=>`/#/tickets/annual/personalisation/${t}`,annualTicketPersonalizationFormSubmit:t=>`/#/tickets/annual/personalisation/${t}`},yb={...qh,checkoutSuccess:t=>`/checkout/success/?token=${t}`,checkoutFailure:t=>`/checkout/failure?error=${t}`};function _b(t){return t==="angular"?qh:yb}function bb(t){return`/#/products/events?category_id=${(S.settings?.multipleEventsMenuItems.event_groups[t]||[]).join("&category_id=")}`}function wb(t){return`/#/products/tours?category_id=${(S.settings?.multipleToursMenuItems.tour_groups[t]||[]).join("&category_id=")}`}function kb(t){return new Promise(e=>setTimeout(e,t))}function Wh(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}function Sb(t){return typeof t=="boolean"}function zc(t,e=1e3){return new Promise((r,n)=>{const i=Date.now(),s=20,o=()=>{try{const a=t();if(a){r(a);return}if(Date.now()-i>=e){n(new Error("Timeout reached without truthy value"));return}setTimeout(o,s)}catch(a){n(a)}};o()})}const Zc=Array.isArray,Hh=t=>!!t&&t.constructor===Object,xb=t=>typeof t=="string"||t instanceof String,Eb=t=>{try{return Number(t)===t}catch{return!1}},Tb=(t,e)=>t.reduce((r,n)=>{const i=e(n);return r[i]||(r[i]=[]),r[i].push(n),r},{}),Kh=(t,e)=>!t||(t.length??0)===0?null:t.reduce(e);function Ti(t,e){return(t||[]).reduce((r,n)=>r+(e?e(n):n),0)}const Ab=(t,e,r=!1)=>{if(!t)return[];const n=(s,o)=>e(s)-e(o),i=(s,o)=>e(o)-e(s);return t.slice().sort(r===!0?i:n)};function Cb(t,e){const r=e??(n=>n);return Kh(t,(n,i)=>r(n)>r(i)?n:i)}function Vc(t,e){const r=e??(n=>n);return Kh(t,(n,i)=>r(n)<r(i)?n:i)}const Ob=(t,e)=>{const r=t.reduce((n,i)=>{const s=i;return n[s]||(n[s]=i),n},{});return Object.values(r)},Gh=(t,e,r)=>{let n=r;for(let i=1;i<=t;i++)n=e(n,i);return n},Db=(t,e)=>t?!e||e.length===0?t:e.reduce((r,n)=>(delete r[n],r),{...t}):{},dr=(t,e)=>!t||!e?t??e??{}:Object.entries({...t,...e}).reduce((r,[n,i])=>({...r,[n]:Hh(t[n])?dr(t[n],i):i}),{});class Yh{#e={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.#e.uid!==""}isLoggedIn(){return!!(this.#e.uid&&Wh(this.#e.uid))}isGuest(){return!!(this.#e.uid&&!Wh(this.#e.uid))}signOut(){this.#e.uid="",this.#e.client="",this.#e.accessToken="",this.#e.expiry=0,this.save()}signIn(e){this.#e.uid=e.uid,this.#e.client=e.client,this.#e.accessToken=e.accessToken,this.#e.expiry=e.expiry,this.save()}get data(){return this.#e.expiry<Math.floor(Date.now()/1e3)&&this.signOut(),this.#e}toString(){return JSON.stringify(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 r=JSON.parse(e);if(!(Hh(r)&&"uid"in r&&"client"in r&&"accessToken"in r&&"expiry"in r))throw new Error(`(Auth.loadFromString) invalid auth json ${e}`);this.signIn(r)}}class Ib{constructor(e){this.auth=e}onRequest({request:e}){const{uid:r,client:n,accessToken:i,expiry:s}=this.auth.data,o=e.headers;r&&!o.has("uid")&&o.set("uid",r),n&&!o.has("client")&&o.set("client",n),i&&!o.has("access-token")&&o.set("access-token",i),s&&!o.has("expiry")&&o.set("expiry",String(s)),i&&!o.has("token-type")&&o.set("token-type","Bearer")}onResponse({response:e}){const r=e.headers.get("access-token"),n=e.headers.get("client"),i=e.headers.get("uid"),s=parseInt(e.headers.get("expiry")||"");return r&&n&&i&&s&&this.auth.signIn({uid:i,client:n,accessToken:r,expiry:s}),e}}var Ne;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{const s={};for(const o of i)s[o]=o;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(const a of s)o[a]=i[a];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},t.find=(i,s)=>{for(const o of i)if(s(o))return o},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Ne||(Ne={}));var Uc;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Uc||(Uc={}));const he=Ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xn=t=>{switch(typeof t){case"undefined":return he.undefined;case"string":return he.string;case"number":return isNaN(t)?he.nan:he.number;case"boolean":return he.boolean;case"function":return he.function;case"bigint":return he.bigint;case"symbol":return he.symbol;case"object":return Array.isArray(t)?he.array:t===null?he.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?he.promise:typeof Map<"u"&&t instanceof Map?he.map:typeof Set<"u"&&t instanceof Set?he.set:typeof Date<"u"&&t instanceof Date?he.date:he.object;default:return he.unknown}},ie=Ne.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Pb=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class fr extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const r=e||function(s){return s.message},n={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(r(o))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return i(this),n}static assert(e){if(!(e instanceof fr))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ne.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}fr.create=t=>new fr(t);const rs=(t,e)=>{let r;switch(t.code){case ie.invalid_type:t.received===he.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case ie.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Ne.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ne.joinValues(t.keys,", ")}`;break;case ie.invalid_union:r="Invalid input";break;case ie.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ne.joinValues(t.options)}`;break;case ie.invalid_enum_value:r=`Invalid enum value. Expected ${Ne.joinValues(t.options)}, received '${t.received}'`;break;case ie.invalid_arguments:r="Invalid function arguments";break;case ie.invalid_return_type:r="Invalid function return type";break;case ie.invalid_date:r="Invalid date";break;case ie.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Ne.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case ie.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case ie.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case ie.custom:r="Invalid input";break;case ie.invalid_intersection_types:r="Intersection results could not be merged";break;case ie.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case ie.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ne.assertNever(t)}return{message:r}};let Jh=rs;function Mb(t){Jh=t}function Ia(){return Jh}const Pa=t=>{const{data:e,path:r,errorMaps:n,issueData:i}=t,s=[...r,...i.path||[]],o={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let a="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)a=c(o,{data:e,defaultError:a}).message;return{...i,path:s,message:a}},$b=[];function fe(t,e){const r=Ia(),n=Pa({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===rs?void 0:rs].filter(i=>!!i)});t.common.issues.push(n)}class Ct{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const i of r){if(i.status==="aborted")return Ee;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const i of r){const s=await i.key,o=await i.value;n.push({key:s,value:o})}return Ct.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const i of r){const{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return Ee;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[s.value]=o.value)}return{status:e.value,value:n}}}const Ee=Object.freeze({status:"aborted"}),ns=t=>({status:"dirty",value:t}),Nt=t=>({status:"valid",value:t}),Bc=t=>t.status==="aborted",jc=t=>t.status==="dirty",eo=t=>t.status==="valid",to=t=>typeof Promise<"u"&&t instanceof Promise;function Ma(t,e,r,n){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Qh(t,e,r,n,i){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,r),r}typeof SuppressedError=="function"&&SuppressedError;var ve;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(ve||(ve={}));var ro,no;class Jr{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Xh=(t,e)=>{if(eo(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new fr(t.common.issues);return this._error=r,this._error}}};function Ce(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,a)=>{var l,c;const{message:u}=t;return o.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??n)!==null&&l!==void 0?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??r)!==null&&c!==void 0?c:a.defaultError}},description:i}}let De=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Xn(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Xn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ct,ctx:{common:e.parent.common,data:e.data,parsedType:Xn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(to(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;const i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xn(e)},s=this._parseSync({data:e,path:i.path,parent:i});return Xh(i,s)}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xn(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(to(i)?i:Promise.resolve(i));return Xh(n,s)}refine(e,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{const o=e(i),a=()=>s.addIssue({code:ie.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Mr({schema:this,typeName:Se.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Xr.create(this,this._def)}nullable(){return ni.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Oi.create(this,this._def)}promise(){return ls.create(this,this._def)}or(e){return ao.create([this,e],this._def)}and(e){return lo.create(this,e,this._def)}transform(e){return new Mr({...Ce(this._def),schema:this,typeName:Se.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new po({...Ce(this._def),innerType:this,defaultValue:r,typeName:Se.ZodDefault})}brand(){return new Hc({typeName:Se.ZodBranded,type:this,...Ce(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new mo({...Ce(this._def),innerType:this,catchValue:r,typeName:Se.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return go.create(this,e)}readonly(){return vo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const Nb=/^c[^\s-]{8,}$/i,Fb=/^[0-9a-z]+$/,Rb=/^[0-9A-HJKMNP-TV-Z]{26}$/,Lb=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,zb=/^[a-z0-9_-]{21}$/i,Zb=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Vb=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ub="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let qc;const Bb=/^(?:(?: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])$/,jb=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,qb=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ep="((\\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])))",Wb=new RegExp(`^${ep}$`);function tp(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Hb(t){return new RegExp(`^${tp(t)}$`)}function rp(t){let e=`${ep}T${tp(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Kb(t,e){return!!((e==="v4"||!e)&&Bb.test(t)||(e==="v6"||!e)&&jb.test(t))}let is=class ra extends De{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==he.string){const s=this._getOrReturnCtx(e);return fe(s,{code:ie.invalid_type,expected:he.string,received:s.parsedType}),Ee}const n=new Ct;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const o=e.data.length>s.value,a=e.data.length<s.value;(o||a)&&(i=this._getOrReturnCtx(e,i),o?fe(i,{code:ie.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&fe(i,{code:ie.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")Vb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"email",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")qc||(qc=new RegExp(Ub,"u")),qc.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"emoji",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")Lb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"uuid",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")zb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"nanoid",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")Nb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"cuid",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")Fb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"cuid2",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")Rb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"ulid",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),fe(i,{validation:"url",code:ie.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"regex",code:ie.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?rp(s).test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?Wb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?Hb(s).test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?Zb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"duration",code:ie.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?Kb(e.data,s.version)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"ip",code:ie.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?qb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"base64",code:ie.invalid_string,message:s.message}),n.dirty()):Ne.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:ie.invalid_string,...ve.errToObj(n)})}_addCheck(e){return new ra({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ve.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ve.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ve.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ve.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ve.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ve.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ve.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ve.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ve.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ve.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...ve.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...ve.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...ve.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...ve.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...ve.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...ve.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...ve.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...ve.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...ve.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...ve.errToObj(r)})}nonempty(e){return this.min(1,ve.errToObj(e))}trim(){return new ra({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ra({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ra({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};is.create=t=>{var e;return new is({checks:[],typeName:Se.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...Ce(t)})};function Gb(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,s=parseInt(t.toFixed(i).replace(".","")),o=parseInt(e.toFixed(i).replace(".",""));return s%o/Math.pow(10,i)}class ei extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==he.number){const s=this._getOrReturnCtx(e);return fe(s,{code:ie.invalid_type,expected:he.number,received:s.parsedType}),Ee}let n;const i=new Ct;for(const s of this._def.checks)s.kind==="int"?Ne.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?Gb(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.not_finite,message:s.message}),i.dirty()):Ne.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ve.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ve.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ve.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ve.toString(r))}setLimit(e,r,n,i){return new ei({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ve.toString(i)}]})}_addCheck(e){return new ei({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ve.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ve.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ve.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ve.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ve.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ve.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ve.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ve.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ve.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ne.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}ei.create=t=>new ei({checks:[],typeName:Se.ZodNumber,coerce:t?.coerce||!1,...Ce(t)});class ti extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==he.bigint){const s=this._getOrReturnCtx(e);return fe(s,{code:ie.invalid_type,expected:he.bigint,received:s.parsedType}),Ee}let n;const i=new Ct;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Ne.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ve.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ve.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ve.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ve.toString(r))}setLimit(e,r,n,i){return new ti({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ve.toString(i)}]})}_addCheck(e){return new ti({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ve.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ve.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ve.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ve.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ve.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}ti.create=t=>{var e;return new ti({checks:[],typeName:Se.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...Ce(t)})};class io extends De{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==he.boolean){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.boolean,received:n.parsedType}),Ee}return Nt(e.data)}}io.create=t=>new io({typeName:Se.ZodBoolean,coerce:t?.coerce||!1,...Ce(t)});class Ai extends De{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==he.date){const s=this._getOrReturnCtx(e);return fe(s,{code:ie.invalid_type,expected:he.date,received:s.parsedType}),Ee}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return fe(s,{code:ie.invalid_date}),Ee}const n=new Ct;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Ne.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ai({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:ve.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ve.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}Ai.create=t=>new Ai({checks:[],coerce:t?.coerce||!1,typeName:Se.ZodDate,...Ce(t)});class $a extends De{_parse(e){if(this._getType(e)!==he.symbol){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.symbol,received:n.parsedType}),Ee}return Nt(e.data)}}$a.create=t=>new $a({typeName:Se.ZodSymbol,...Ce(t)});class so extends De{_parse(e){if(this._getType(e)!==he.undefined){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.undefined,received:n.parsedType}),Ee}return Nt(e.data)}}so.create=t=>new so({typeName:Se.ZodUndefined,...Ce(t)});class oo extends De{_parse(e){if(this._getType(e)!==he.null){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.null,received:n.parsedType}),Ee}return Nt(e.data)}}oo.create=t=>new oo({typeName:Se.ZodNull,...Ce(t)});class ss extends De{constructor(){super(...arguments),this._any=!0}_parse(e){return Nt(e.data)}}ss.create=t=>new ss({typeName:Se.ZodAny,...Ce(t)});class Ci extends De{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Nt(e.data)}}Ci.create=t=>new Ci({typeName:Se.ZodUnknown,...Ce(t)});class xn extends De{_parse(e){const r=this._getOrReturnCtx(e);return fe(r,{code:ie.invalid_type,expected:he.never,received:r.parsedType}),Ee}}xn.create=t=>new xn({typeName:Se.ZodNever,...Ce(t)});class Na extends De{_parse(e){if(this._getType(e)!==he.undefined){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.void,received:n.parsedType}),Ee}return Nt(e.data)}}Na.create=t=>new Na({typeName:Se.ZodVoid,...Ce(t)});let Oi=class Xl extends De{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==he.array)return fe(r,{code:ie.invalid_type,expected:he.array,received:r.parsedType}),Ee;if(i.exactLength!==null){const o=r.data.length>i.exactLength.value,a=r.data.length<i.exactLength.value;(o||a)&&(fe(r,{code:o?ie.too_big:ie.too_small,minimum:a?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(fe(r,{code:ie.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(fe(r,{code:ie.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>i.type._parseAsync(new Jr(r,o,r.path,a)))).then(o=>Ct.mergeArray(n,o));const s=[...r.data].map((o,a)=>i.type._parseSync(new Jr(r,o,r.path,a)));return Ct.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new Xl({...this._def,minLength:{value:e,message:ve.toString(r)}})}max(e,r){return new Xl({...this._def,maxLength:{value:e,message:ve.toString(r)}})}length(e,r){return new Xl({...this._def,exactLength:{value:e,message:ve.toString(r)}})}nonempty(e){return this.min(1,e)}};Oi.create=(t,e)=>new Oi({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Se.ZodArray,...Ce(e)});function os(t){if(t instanceof ot){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Xr.create(os(n))}return new ot({...t._def,shape:()=>e})}else return t instanceof Oi?new Oi({...t._def,type:os(t.element)}):t instanceof Xr?Xr.create(os(t.unwrap())):t instanceof ni?ni.create(os(t.unwrap())):t instanceof Qr?Qr.create(t.items.map(e=>os(e))):t}class ot extends De{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=Ne.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==he.object){const c=this._getOrReturnCtx(e);return fe(c,{code:ie.invalid_type,expected:he.object,received:c.parsedType}),Ee}const{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof xn&&this._def.unknownKeys==="strip"))for(const c in i.data)o.includes(c)||a.push(c);const l=[];for(const c of o){const u=s[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Jr(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof xn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")a.length>0&&(fe(i,{code:ie.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Jr(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>Ct.mergeObjectSync(n,c)):Ct.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return ve.errToObj,new ot({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,s,o,a;const l=(o=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=ve.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ot({...this._def,unknownKeys:"strip"})}passthrough(){return new ot({...this._def,unknownKeys:"passthrough"})}extend(e){return new ot({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ot({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Se.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new ot({...this._def,catchall:e})}pick(e){const r={};return Ne.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new ot({...this._def,shape:()=>r})}omit(e){const r={};return Ne.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new ot({...this._def,shape:()=>r})}deepPartial(){return os(this)}partial(e){const r={};return Ne.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new ot({...this._def,shape:()=>r})}required(e){const r={};return Ne.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Xr;)s=s._def.innerType;r[n]=s}}),new ot({...this._def,shape:()=>r})}keyof(){return np(Ne.objectKeys(this.shape))}}ot.create=(t,e)=>new ot({shape:()=>t,unknownKeys:"strip",catchall:xn.create(),typeName:Se.ZodObject,...Ce(e)}),ot.strictCreate=(t,e)=>new ot({shape:()=>t,unknownKeys:"strict",catchall:xn.create(),typeName:Se.ZodObject,...Ce(e)}),ot.lazycreate=(t,e)=>new ot({shape:t,unknownKeys:"strip",catchall:xn.create(),typeName:Se.ZodObject,...Ce(e)});let ao=class extends De{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function i(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(a=>new fr(a.ctx.common.issues));return fe(r,{code:ie.invalid_union,unionErrors:o}),Ee}if(r.common.async)return Promise.all(n.map(async s=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let s;const o=[];for(const l of n){const c={...r,common:{...r.common,issues:[]},parent:null},u=l._parseSync({data:r.data,path:r.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(l=>new fr(l));return fe(r,{code:ie.invalid_union,unionErrors:a}),Ee}}get options(){return this._def.options}};ao.create=(t,e)=>new ao({options:t,typeName:Se.ZodUnion,...Ce(e)});const En=t=>t instanceof uo?En(t.schema):t instanceof Mr?En(t.innerType()):t instanceof fo?[t.value]:t instanceof ri?t.options:t instanceof ho?Ne.objectValues(t.enum):t instanceof po?En(t._def.innerType):t instanceof so?[void 0]:t instanceof oo?[null]:t instanceof Xr?[void 0,...En(t.unwrap())]:t instanceof ni?[null,...En(t.unwrap())]:t instanceof Hc||t instanceof vo?En(t.unwrap()):t instanceof mo?En(t._def.innerType):[];class Fa extends De{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==he.object)return fe(r,{code:ie.invalid_type,expected:he.object,received:r.parsedType}),Ee;const n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(fe(r,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ee)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const i=new Map;for(const s of r){const o=En(s.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of o){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,s)}}return new Fa({typeName:Se.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Ce(n)})}}function Wc(t,e){const r=Xn(t),n=Xn(e);if(t===e)return{valid:!0,data:t};if(r===he.object&&n===he.object){const i=Ne.objectKeys(e),s=Ne.objectKeys(t).filter(a=>i.indexOf(a)!==-1),o={...t,...e};for(const a of s){const l=Wc(t[a],e[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(r===he.array&&n===he.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const o=t[s],a=e[s],l=Wc(o,a);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return r===he.date&&n===he.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}let lo=class extends De{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),i=(s,o)=>{if(Bc(s)||Bc(o))return Ee;const a=Wc(s.value,o.value);return a.valid?((jc(s)||jc(o))&&r.dirty(),{status:r.value,value:a.data}):(fe(n,{code:ie.invalid_intersection_types}),Ee)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};lo.create=(t,e,r)=>new lo({left:t,right:e,typeName:Se.ZodIntersection,...Ce(r)});class Qr extends De{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==he.array)return fe(n,{code:ie.invalid_type,expected:he.array,received:n.parsedType}),Ee;if(n.data.length<this._def.items.length)return fe(n,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ee;!this._def.rest&&n.data.length>this._def.items.length&&(fe(n,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...n.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Jr(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(s).then(o=>Ct.mergeArray(r,o)):Ct.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new Qr({...this._def,rest:e})}}Qr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qr({items:t,typeName:Se.ZodTuple,rest:null,...Ce(e)})};class co extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==he.object)return fe(n,{code:ie.invalid_type,expected:he.object,received:n.parsedType}),Ee;const i=[],s=this._def.keyType,o=this._def.valueType;for(const a in n.data)i.push({key:s._parse(new Jr(n,a,n.path,a)),value:o._parse(new Jr(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Ct.mergeObjectAsync(r,i):Ct.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof De?new co({keyType:e,valueType:r,typeName:Se.ZodRecord,...Ce(n)}):new co({keyType:is.create(),valueType:e,typeName:Se.ZodRecord,...Ce(r)})}}class Ra extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==he.map)return fe(n,{code:ie.invalid_type,expected:he.map,received:n.parsedType}),Ee;const i=this._def.keyType,s=this._def.valueType,o=[...n.data.entries()].map(([a,l],c)=>({key:i._parse(new Jr(n,a,n.path,[c,"key"])),value:s._parse(new Jr(n,l,n.path,[c,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Ee;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(c.value,u.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Ee;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(c.value,u.value)}return{status:r.value,value:a}}}}Ra.create=(t,e,r)=>new Ra({valueType:e,keyType:t,typeName:Se.ZodMap,...Ce(r)});class Di extends De{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==he.set)return fe(n,{code:ie.invalid_type,expected:he.set,received:n.parsedType}),Ee;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(fe(n,{code:ie.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(fe(n,{code:ie.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const s=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Ee;u.status==="dirty"&&r.dirty(),c.add(u.value)}return{status:r.value,value:c}}const a=[...n.data.values()].map((l,c)=>s._parse(new Jr(n,l,n.path,c)));return n.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(e,r){return new Di({...this._def,minSize:{value:e,message:ve.toString(r)}})}max(e,r){return new Di({...this._def,maxSize:{value:e,message:ve.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Di.create=(t,e)=>new Di({valueType:t,minSize:null,maxSize:null,typeName:Se.ZodSet,...Ce(e)});class as extends De{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==he.function)return fe(r,{code:ie.invalid_type,expected:he.function,received:r.parsedType}),Ee;function n(a,l){return Pa({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ia(),rs].filter(c=>!!c),issueData:{code:ie.invalid_arguments,argumentsError:l}})}function i(a,l){return Pa({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ia(),rs].filter(c=>!!c),issueData:{code:ie.invalid_return_type,returnTypeError:l}})}const s={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof ls){const a=this;return Nt(async function(...l){const c=new fr([]),u=await a._def.args.parseAsync(l,s).catch(p=>{throw c.addIssue(n(l,p)),c}),d=await Reflect.apply(o,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(p=>{throw c.addIssue(i(d,p)),c})})}else{const a=this;return Nt(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new fr([n(l,c.error)]);const u=Reflect.apply(o,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new fr([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new as({...this._def,args:Qr.create(e).rest(Ci.create())})}returns(e){return new as({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new as({args:e||Qr.create([]).rest(Ci.create()),returns:r||Ci.create(),typeName:Se.ZodFunction,...Ce(n)})}}class uo extends De{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}uo.create=(t,e)=>new uo({getter:t,typeName:Se.ZodLazy,...Ce(e)});class fo extends De{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return fe(r,{received:r.data,code:ie.invalid_literal,expected:this._def.value}),Ee}return{status:"valid",value:e.data}}get value(){return this._def.value}}fo.create=(t,e)=>new fo({value:t,typeName:Se.ZodLiteral,...Ce(e)});function np(t,e){return new ri({values:t,typeName:Se.ZodEnum,...Ce(e)})}class ri extends De{constructor(){super(...arguments),ro.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return fe(r,{expected:Ne.joinValues(n),received:r.parsedType,code:ie.invalid_type}),Ee}if(Ma(this,ro)||Qh(this,ro,new Set(this._def.values)),!Ma(this,ro).has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return fe(r,{received:r.data,code:ie.invalid_enum_value,options:n}),Ee}return Nt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return ri.create(e,{...this._def,...r})}exclude(e,r=this._def){return ri.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}ro=new WeakMap,ri.create=np;class ho extends De{constructor(){super(...arguments),no.set(this,void 0)}_parse(e){const r=Ne.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==he.string&&n.parsedType!==he.number){const i=Ne.objectValues(r);return fe(n,{expected:Ne.joinValues(i),received:n.parsedType,code:ie.invalid_type}),Ee}if(Ma(this,no)||Qh(this,no,new Set(Ne.getValidEnumValues(this._def.values))),!Ma(this,no).has(e.data)){const i=Ne.objectValues(r);return fe(n,{received:n.data,code:ie.invalid_enum_value,options:i}),Ee}return Nt(e.data)}get enum(){return this._def.values}}no=new WeakMap,ho.create=(t,e)=>new ho({values:t,typeName:Se.ZodNativeEnum,...Ce(e)});class ls extends De{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==he.promise&&r.common.async===!1)return fe(r,{code:ie.invalid_type,expected:he.promise,received:r.parsedType}),Ee;const n=r.parsedType===he.promise?r.data:Promise.resolve(r.data);return Nt(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ls.create=(t,e)=>new ls({type:t,typeName:Se.ZodPromise,...Ce(e)});class Mr extends De{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Se.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:o=>{fe(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const o=i.transform(n.data,s);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return Ee;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?Ee:l.status==="dirty"||r.value==="dirty"?ns(l.value):l});{if(r.value==="aborted")return Ee;const a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?Ee:a.status==="dirty"||r.value==="dirty"?ns(a.value):a}}if(i.type==="refinement"){const o=a=>{const l=i.refinement(a,s);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Ee:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Ee:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!eo(o))return o;const a=i.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>eo(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:r.value,value:a})):o);Ne.assertNever(i)}}Mr.create=(t,e,r)=>new Mr({schema:t,typeName:Se.ZodEffects,effect:e,...Ce(r)}),Mr.createWithPreprocess=(t,e,r)=>new Mr({schema:e,effect:{type:"preprocess",transform:t},typeName:Se.ZodEffects,...Ce(r)});let Xr=class extends De{_parse(e){return this._getType(e)===he.undefined?Nt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Xr.create=(t,e)=>new Xr({innerType:t,typeName:Se.ZodOptional,...Ce(e)});let ni=class extends De{_parse(e){return this._getType(e)===he.null?Nt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ni.create=(t,e)=>new ni({innerType:t,typeName:Se.ZodNullable,...Ce(e)});let po=class extends De{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===he.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};po.create=(t,e)=>new po({innerType:t,typeName:Se.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ce(e)});let mo=class extends De{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return to(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new fr(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new fr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};mo.create=(t,e)=>new mo({innerType:t,typeName:Se.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ce(e)});class La extends De{_parse(e){if(this._getType(e)!==he.nan){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.nan,received:n.parsedType}),Ee}return{status:"valid",value:e.data}}}La.create=t=>new La({typeName:Se.ZodNaN,...Ce(t)});const Yb=Symbol("zod_brand");class Hc extends De{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class go extends De{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Ee:s.status==="dirty"?(r.dirty(),ns(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Ee:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new go({in:e,out:r,typeName:Se.ZodPipeline})}}let vo=class extends De{_parse(e){const r=this._def.innerType._parse(e),n=i=>(eo(i)&&(i.value=Object.freeze(i.value)),i);return to(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};vo.create=(t,e)=>new vo({innerType:t,typeName:Se.ZodReadonly,...Ce(e)});function ip(t,e={},r){return t?ss.create().superRefine((n,i)=>{var s,o;if(!t(n)){const a=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,l=(o=(s=a.fatal)!==null&&s!==void 0?s:r)!==null&&o!==void 0?o:!0,c=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...c,fatal:l})}}):ss.create()}const Jb={object:ot.lazycreate};var Se;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Se||(Se={}));const Qb=(t,e={message:`Input not instance of ${t.name}`})=>ip(r=>r instanceof t,e),sp=is.create,op=ei.create,Xb=La.create,ew=ti.create,ap=io.create,tw=Ai.create,rw=$a.create,nw=so.create,iw=oo.create,sw=ss.create,ow=Ci.create,aw=xn.create,lw=Na.create,cw=Oi.create,uw=ot.create,dw=ot.strictCreate,fw=ao.create,hw=Fa.create,pw=lo.create,mw=Qr.create,gw=co.create,vw=Ra.create,yw=Di.create,_w=as.create,bw=uo.create,ww=fo.create,kw=ri.create,Sw=ho.create,xw=ls.create,lp=Mr.create,Ew=Xr.create,Tw=ni.create,Aw=Mr.createWithPreprocess,Cw=go.create;var St=Object.freeze({__proto__:null,defaultErrorMap:rs,setErrorMap:Mb,getErrorMap:Ia,makeIssue:Pa,EMPTY_PATH:$b,addIssueToContext:fe,ParseStatus:Ct,INVALID:Ee,DIRTY:ns,OK:Nt,isAborted:Bc,isDirty:jc,isValid:eo,isAsync:to,get util(){return Ne},get objectUtil(){return Uc},ZodParsedType:he,getParsedType:Xn,ZodType:De,datetimeRegex:rp,ZodString:is,ZodNumber:ei,ZodBigInt:ti,ZodBoolean:io,ZodDate:Ai,ZodSymbol:$a,ZodUndefined:so,ZodNull:oo,ZodAny:ss,ZodUnknown:Ci,ZodNever:xn,ZodVoid:Na,ZodArray:Oi,ZodObject:ot,ZodUnion:ao,ZodDiscriminatedUnion:Fa,ZodIntersection:lo,ZodTuple:Qr,ZodRecord:co,ZodMap:Ra,ZodSet:Di,ZodFunction:as,ZodLazy:uo,ZodLiteral:fo,ZodEnum:ri,ZodNativeEnum:ho,ZodPromise:ls,ZodEffects:Mr,ZodTransformer:Mr,ZodOptional:Xr,ZodNullable:ni,ZodDefault:po,ZodCatch:mo,ZodNaN:La,BRAND:Yb,ZodBranded:Hc,ZodPipeline:go,ZodReadonly:vo,custom:ip,Schema:De,ZodSchema:De,late:Jb,get ZodFirstPartyTypeKind(){return Se},coerce:{string:(t=>is.create({...t,coerce:!0})),number:(t=>ei.create({...t,coerce:!0})),boolean:(t=>io.create({...t,coerce:!0})),bigint:(t=>ti.create({...t,coerce:!0})),date:(t=>Ai.create({...t,coerce:!0}))},any:sw,array:cw,bigint:ew,boolean:ap,date:tw,discriminatedUnion:hw,effect:lp,enum:kw,function:_w,instanceof:Qb,intersection:pw,lazy:bw,literal:ww,map:vw,nan:Xb,nativeEnum:Sw,never:aw,null:iw,nullable:Tw,number:op,object:uw,oboolean:()=>ap().optional(),onumber:()=>op().optional(),optional:Ew,ostring:()=>sp().optional(),pipeline:Cw,preprocess:Aw,promise:xw,record:gw,set:yw,strictObject:dw,string:sp,symbol:rw,transformer:lp,tuple:mw,undefined:nw,union:fw,unknown:ow,void:lw,NEVER:Ee,ZodIssueCode:ie,quotelessJson:Pb,ZodError:fr});const Ow=St.object({id:St.number(),customer:St.object({customer_salutation_id:St.number().positive({message:"user.fieldErrors.titleRequire"}),name:St.string().min(1,{message:"user.fieldErrors.nameRequire"}),surname:St.string().min(1,{message:"user.fieldErrors.surnameRequire"}),email:St.string().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:St.string().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:St.string().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:St.string().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:St.string().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:St.number().positive().default(60),language_id:St.number().positive({message:"user.fieldErrors.languageRequire"}).default(1)})});St.object({ticket_sale_id:St.number(),start_at:St.string().date(),personalizations:St.array(Ow)});function Kc(t,e){return t-e*Math.floor(t/e)}const cp=1721426;function za(t,e,r,n){e=Gc(t,e);let i=e-1,s=-2;return r<=2?s=0:Za(e)&&(s=-1),cp-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function Za(t){return t%4===0&&(t%100!==0||t%400===0)}function Gc(t,e){return t==="BC"?1-e:e}function Dw(t){let e="AD";return t<=0&&(e="BC",t=1-t),[e,t]}const Iw={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]};class cs{fromJulianDay(e){let r=e,n=r-cp,i=Math.floor(n/146097),s=Kc(n,146097),o=Math.floor(s/36524),a=Kc(s,36524),l=Math.floor(a/1461),c=Kc(a,1461),u=Math.floor(c/365),d=i*400+o*100+l*4+u+(o!==4&&u!==4?1:0),[f,p]=Dw(d),v=r-za(f,p,1,1),g=2;r<za(f,p,3,1)?g=0:Za(p)&&(g=1);let m=Math.floor(((v+g)*12+373)/367),b=r-za(f,p,m,1)+1;return new ai(f,p,m,b)}toJulianDay(e){return za(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return Iw[Za(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return Za(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"}}const Pw={"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 ii(t,e){return e=hr(e,t.calendar),t.era===e.era&&t.year===e.year&&t.month===e.month&&t.day===e.day}function Yc(t,e){return e=hr(e,t.calendar),t=Qc(t),e=Qc(e),t.era===e.era&&t.year===e.year&&t.month===e.month}function Mw(t,e){return t.isEqual?.(e)??e.isEqual?.(t)??t.identifier===e.identifier}function $w(t,e){return ii(t,Ii(e))}function up(t,e,r){let n=t.calendar.toJulianDay(t),i=zw(e),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function Nw(t){return tn(Date.now(),t)}function Ii(t){return Uw(Nw(t))}function dp(t,e){return t.calendar.toJulianDay(t)-e.calendar.toJulianDay(e)}function fp(t,e){return hp(t)-hp(e)}function hp(t){return t.hour*36e5+t.minute*6e4+t.second*1e3+t.millisecond}let Jc=null,Fw=!1;function Xt(){return Jc==null&&(Jc=new Intl.DateTimeFormat().resolvedOptions().timeZone),Jc}function pp(){return Fw}function Qc(t){return t.subtract({days:t.day-1})}function Rw(t){return t.add({days:t.calendar.getDaysInMonth(t)-t.day})}const mp=new Map,Xc=new Map;function Lw(t){if(Intl.Locale){let r=mp.get(t);return r||(r=new Intl.Locale(t).maximize().region,r&&mp.set(t,r)),r}let e=t.split("-")[1];return e==="u"?void 0:e}function zw(t){let e=Xc.get(t);if(!e){if(Intl.Locale){let n=new Intl.Locale(t);if("getWeekInfo"in n&&(e=n.getWeekInfo(),e))return Xc.set(t,e),e.firstDay}let r=Lw(t);if(t.includes("-fw-")){let n=t.split("-fw-")[1].split("-")[0];n==="mon"?e={firstDay:1}:n==="tue"?e={firstDay:2}:n==="wed"?e={firstDay:3}:n==="thu"?e={firstDay:4}:n==="fri"?e={firstDay:5}:n==="sat"?e={firstDay:6}:e={firstDay:0}}else t.includes("-ca-iso8601")?e={firstDay:1}:e={firstDay:r&&Pw[r]||0};Xc.set(t,e)}return e.firstDay}function si(t){t=hr(t,new cs);let e=Gc(t.era,t.year);return gp(e,t.month,t.day,t.hour,t.minute,t.second,t.millisecond)}function gp(t,e,r,n,i,s,o){let a=new Date;return a.setUTCHours(n,i,s,o),a.setUTCFullYear(t,e-1,r),a.getTime()}function yo(t,e){if(e==="UTC")return 0;if(t>0&&e===Xt()&&!pp())return new Date(t).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:o,second:a}=yp(t,e);return gp(r,n,i,s,o,a,0)-Math.floor(t/1e3)*1e3}const vp=new Map;function yp(t,e){let r=vp.get(e);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),vp.set(e,r));let n=r.formatToParts(new Date(t)),i={};for(let s of n)s.type!=="literal"&&(i[s.type]=s.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const Va=864e5;function Zw(t,e){let r=si(t),n=r-yo(r-Va,e),i=r-yo(r+Va,e);return _p(t,e,n,i)}function _p(t,e,r,n){return(r===n?[r]:[r,n]).filter(s=>Vw(t,e,s))}function Vw(t,e,r){let n=yp(r,e);return t.year===n.year&&t.month===n.month&&t.day===n.day&&t.hour===n.hour&&t.minute===n.minute&&t.second===n.second}function en(t,e,r="compatible"){let n=oi(t);if(e==="UTC")return si(n);if(e===Xt()&&r==="compatible"&&!pp()){n=hr(n,new cs);let l=new Date,c=Gc(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=si(n),s=yo(i-Va,e),o=yo(i+Va,e),a=_p(n,e,i-s,i-o);if(a.length===1)return a[0];if(a.length>1)switch(r){case"compatible":case"earlier":return a[0];case"later":return a[a.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(i-s,i-o);case"compatible":case"later":return Math.max(i-s,i-o);case"reject":throw new RangeError("No such absolute time found")}}function bp(t,e,r="compatible"){return new Date(en(t,e,r))}function tn(t,e){let r=yo(t,e),n=new Date(t+r),i=n.getUTCFullYear(),s=n.getUTCMonth()+1,o=n.getUTCDate(),a=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),u=n.getUTCMilliseconds();return new $r(i<1?"BC":"AD",i<1?-i+1:i,s,o,e,r,a,l,c,u)}function Uw(t){return new ai(t.calendar,t.era,t.year,t.month,t.day)}function oi(t,e){let r=0,n=0,i=0,s=0;if("timeZone"in t)({hour:r,minute:n,second:i,millisecond:s}=t);else if("hour"in t&&!e)return t;return e&&({hour:r,minute:n,second:i,millisecond:s}=e),new An(t.calendar,t.era,t.year,t.month,t.day,r,n,i,s)}function Bw(t){return new cu(t.hour,t.minute,t.second,t.millisecond)}function hr(t,e){if(Mw(t.calendar,e))return t;let r=e.fromJulianDay(t.calendar.toJulianDay(t)),n=t.copy();return n.calendar=e,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,Pi(n),n}function jw(t,e,r){if(t instanceof $r)return t.timeZone===e?t:wp(t,e);let n=en(t,e,r);return tn(n,e)}function qw(t){let e=si(t)-t.offset;return new Date(e)}function wp(t,e){let r=si(t)-t.offset;return hr(tn(r,e),t.calendar)}const _o=36e5;function Ua(t,e){let r=t.copy(),n="hour"in r?Ep(r,e):0;eu(r,e.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,t),r.month+=e.months||0,tu(r),kp(r),r.day+=(e.weeks||0)*7,r.day+=e.days||0,r.day+=n,Ww(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 o=r.calendar.isInverseEra?.(r);r.year=i,r.month=o?1:r.calendar.getMonthsInYear(r),r.day=o?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function eu(t,e){t.calendar.isInverseEra?.(t)&&(e=-e),t.year+=e}function tu(t){for(;t.month<1;)eu(t,-1),t.month+=t.calendar.getMonthsInYear(t);let e=0;for(;t.month>(e=t.calendar.getMonthsInYear(t));)t.month-=e,eu(t,1)}function Ww(t){for(;t.day<1;)t.month--,tu(t),t.day+=t.calendar.getDaysInMonth(t);for(;t.day>t.calendar.getDaysInMonth(t);)t.day-=t.calendar.getDaysInMonth(t),t.month++,tu(t)}function kp(t){t.month=Math.max(1,Math.min(t.calendar.getMonthsInYear(t),t.month)),t.day=Math.max(1,Math.min(t.calendar.getDaysInMonth(t),t.day))}function Pi(t){t.calendar.constrainDate&&t.calendar.constrainDate(t),t.year=Math.max(1,Math.min(t.calendar.getYearsInEra(t),t.year)),kp(t)}function ru(t){let e={};for(let r in t)typeof t[r]=="number"&&(e[r]=-t[r]);return e}function Sp(t,e){return Ua(t,ru(e))}function nu(t,e){let r=t.copy();return e.era!=null&&(r.era=e.era),e.year!=null&&(r.year=e.year),e.month!=null&&(r.month=e.month),e.day!=null&&(r.day=e.day),Pi(r),r}function bo(t,e){let r=t.copy();return e.hour!=null&&(r.hour=e.hour),e.minute!=null&&(r.minute=e.minute),e.second!=null&&(r.second=e.second),e.millisecond!=null&&(r.millisecond=e.millisecond),xp(r),r}function Hw(t){t.second+=Math.floor(t.millisecond/1e3),t.millisecond=Ba(t.millisecond,1e3),t.minute+=Math.floor(t.second/60),t.second=Ba(t.second,60),t.hour+=Math.floor(t.minute/60),t.minute=Ba(t.minute,60);let e=Math.floor(t.hour/24);return t.hour=Ba(t.hour,24),e}function xp(t){t.millisecond=Math.max(0,Math.min(t.millisecond,1e3)),t.second=Math.max(0,Math.min(t.second,59)),t.minute=Math.max(0,Math.min(t.minute,59)),t.hour=Math.max(0,Math.min(t.hour,23))}function Ba(t,e){let r=t%e;return r<0&&(r+=e),r}function Ep(t,e){return t.hour+=e.hours||0,t.minute+=e.minutes||0,t.second+=e.seconds||0,t.millisecond+=e.milliseconds||0,Hw(t)}function Tp(t,e){let r=t.copy();return Ep(r,e),r}function Kw(t,e){return Tp(t,ru(e))}function iu(t,e,r,n){let i=t.copy();switch(e){case"era":{let s=t.calendar.getEras(),o=s.indexOf(t.era);if(o<0)throw new Error("Invalid era: "+t.era);o=Tn(o,r,0,s.length-1,n?.round),i.era=s[o],Pi(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=Tn(t.year,r,-1/0,9999,n?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,t);break;case"month":i.month=Tn(t.month,r,1,t.calendar.getMonthsInYear(t),n?.round);break;case"day":i.day=Tn(t.day,r,1,t.calendar.getDaysInMonth(t),n?.round);break;default:throw new Error("Unsupported field "+e)}return t.calendar.balanceDate&&t.calendar.balanceDate(i),Pi(i),i}function su(t,e,r,n){let i=t.copy();switch(e){case"hour":{let s=t.hour,o=0,a=23;if(n?.hourCycle===12){let l=s>=12;o=l?12:0,a=l?23:11}i.hour=Tn(s,r,o,a,n?.round);break}case"minute":i.minute=Tn(t.minute,r,0,59,n?.round);break;case"second":i.second=Tn(t.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=Tn(t.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+e)}return i}function Tn(t,e,r,n,i=!1){if(i){t+=Math.sign(e),t<r&&(t=n);let s=Math.abs(e);e>0?t=Math.ceil(t/s)*s:t=Math.floor(t/s)*s,t>n&&(t=r)}else t+=e,t<r?t=n-(r-t-1):t>n&&(t=r+(t-n-1));return t}function Ap(t,e){let r;if(e.years!=null&&e.years!==0||e.months!=null&&e.months!==0||e.weeks!=null&&e.weeks!==0||e.days!=null&&e.days!==0){let i=Ua(oi(t),{years:e.years,months:e.months,weeks:e.weeks,days:e.days});r=en(i,t.timeZone)}else r=si(t)-t.offset;r+=e.milliseconds||0,r+=(e.seconds||0)*1e3,r+=(e.minutes||0)*6e4,r+=(e.hours||0)*36e5;let n=tn(r,t.timeZone);return hr(n,t.calendar)}function Gw(t,e){return Ap(t,ru(e))}function Yw(t,e,r,n){switch(e){case"hour":{let i=0,s=23;if(n?.hourCycle===12){let v=t.hour>=12;i=v?12:0,s=v?23:11}let o=oi(t),a=hr(bo(o,{hour:i}),new cs),l=[en(a,t.timeZone,"earlier"),en(a,t.timeZone,"later")].filter(v=>tn(v,t.timeZone).day===a.day)[0],c=hr(bo(o,{hour:s}),new cs),u=[en(c,t.timeZone,"earlier"),en(c,t.timeZone,"later")].filter(v=>tn(v,t.timeZone).day===c.day).pop(),d=si(t)-t.offset,f=Math.floor(d/_o),p=d%_o;return d=Tn(f,r,Math.floor(l/_o),Math.floor(u/_o),n?.round)*_o+p,hr(tn(d,t.timeZone),t.calendar)}case"minute":case"second":case"millisecond":return su(t,e,r,n);case"era":case"year":case"month":case"day":{let i=iu(oi(t),e,r,n),s=en(i,t.timeZone);return hr(tn(s,t.timeZone),t.calendar)}default:throw new Error("Unsupported field "+e)}}function Jw(t,e,r){let n=oi(t),i=bo(nu(n,e),e);if(i.compare(n)===0)return t;let s=en(i,t.timeZone,r);return hr(tn(s,t.timeZone),t.calendar)}const Qw=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Xw=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,e0=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,ou=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function ja(t){let e=t.match(Qw);if(!e)throw ou.test(t)?new Error(`Invalid ISO 8601 date string: ${t}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+t);let r=new ai(qe(e[1],0,9999),qe(e[2],1,12),1);return r.day=qe(e[3],1,r.calendar.getDaysInMonth(r)),r}function Cp(t){let e=t.match(Xw);if(!e)throw ou.test(t)?new Error(`Invalid ISO 8601 date time string: ${t}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+t);let r=qe(e[1],-9999,9999),n=r<1?"BC":"AD",i=new An(n,r<1?-r+1:r,qe(e[2],1,12),1,e[4]?qe(e[4],0,23):0,e[5]?qe(e[5],0,59):0,e[6]?qe(e[6],0,59):0,e[7]?qe(e[7],0,1/0)*1e3:0);return i.day=qe(e[3],0,i.calendar.getDaysInMonth(i)),i}function Op(t,e){let r=t.match(e0);if(!r)throw new Error("Invalid ISO 8601 date time string: "+t);let n=qe(r[1],-9999,9999),i=n<1?"BC":"AD",s=new $r(i,n<1?-n+1:n,qe(r[2],1,12),1,r[11],0,r[4]?qe(r[4],0,23):0,r[5]?qe(r[5],0,59):0,r[6]?qe(r[6],0,59):0,r[7]?qe(r[7],0,1/0)*1e3:0);s.day=qe(r[3],0,s.calendar.getDaysInMonth(s));let o=oi(s),a;if(r[8]){let l=qe(r[8],-23,23);if(s.offset=Math.sign(l)*(Math.abs(l)*36e5+qe(r[9]??"0",0,59)*6e4+qe(r[10]??"0",0,59)*1e3),a=si(s)-s.offset,!Zw(o,s.timeZone).includes(a))throw new Error(`Offset ${Pp(s.offset)} is invalid for ${au(s)} in ${s.timeZone}`)}else a=en(oi(o),s.timeZone,e);return tn(a,s.timeZone)}function t0(t,e){let r=t.match(ou);if(!r)throw new Error("Invalid ISO 8601 date time string: "+t);let n=qe(r[1],-9999,9999),i=n<1?"BC":"AD",s=new $r(i,n<1?-n+1:n,qe(r[2],1,12),1,e,0,r[4]?qe(r[4],0,23):0,r[5]?qe(r[5],0,59):0,r[6]?qe(r[6],0,59):0,r[7]?qe(r[7],0,1/0)*1e3:0);return s.day=qe(r[3],0,s.calendar.getDaysInMonth(s)),r[8]&&(s.offset=qe(r[8],-23,23)*36e5+qe(r[9]??"0",0,59)*6e4),wp(s,e)}function qe(t,e,r){let n=Number(t);if(n<e||n>r)throw new RangeError(`Value out of range: ${e} <= ${n} <= ${r}`);return n}function Dp(t){return`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}:${String(t.second).padStart(2,"0")}${t.millisecond?String(t.millisecond/1e3).slice(1):""}`}function Ip(t){let e=hr(t,new cs),r;return e.era==="BC"?r=e.year===1?"0000":"-"+String(Math.abs(1-e.year)).padStart(6,"00"):r=String(e.year).padStart(4,"0"),`${r}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`}function au(t){return`${Ip(t)}T${Dp(t)}`}function Pp(t){let e=Math.sign(t)<0?"-":"+";t=Math.abs(t);let r=Math.floor(t/36e5),n=Math.floor(t%36e5/6e4),i=Math.floor(t%36e5%6e4/1e3),s=`${e}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(s+=`:${String(i).padStart(2,"0")}`),s}function r0(t){return`${au(t)}${Pp(t.offset)}[${t.timeZone}]`}function lu(t){let e=typeof t[0]=="object"?t.shift():new cs,r;if(typeof t[0]=="string")r=t.shift();else{let o=e.getEras();r=o[o.length-1]}let n=t.shift(),i=t.shift(),s=t.shift();return[e,r,n,i,s]}class ai{#e;constructor(...e){let[r,n,i,s,o]=lu(e);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,Pi(this)}copy(){return this.era?new ai(this.calendar,this.era,this.year,this.month,this.day):new ai(this.calendar,this.year,this.month,this.day)}add(e){return Ua(this,e)}subtract(e){return Sp(this,e)}set(e){return nu(this,e)}cycle(e,r,n){return iu(this,e,r,n)}toDate(e){return bp(this,e)}toString(){return Ip(this)}compare(e){return dp(this,e)}}class cu{#e;constructor(e=0,r=0,n=0,i=0){this.hour=e,this.minute=r,this.second=n,this.millisecond=i,xp(this)}copy(){return new cu(this.hour,this.minute,this.second,this.millisecond)}add(e){return Tp(this,e)}subtract(e){return Kw(this,e)}set(e){return bo(this,e)}cycle(e,r,n){return su(this,e,r,n)}toString(){return Dp(this)}compare(e){return fp(this,e)}}class An{#e;constructor(...e){let[r,n,i,s,o]=lu(e);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Pi(this)}copy(){return this.era?new An(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new An(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return Ua(this,e)}subtract(e){return Sp(this,e)}set(e){return nu(bo(this,e),e)}cycle(e,r,n){switch(e){case"era":case"year":case"month":case"day":return iu(this,e,r,n);default:return su(this,e,r,n)}}toDate(e,r){return bp(this,e,r)}toString(){return au(this)}compare(e){let r=dp(this,e);return r===0?fp(this,oi(e)):r}}class $r{#e;constructor(...e){let[r,n,i,s,o]=lu(e),a=e.shift(),l=e.shift();this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,this.timeZone=a,this.offset=l,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Pi(this)}copy(){return this.era?new $r(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new $r(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return Ap(this,e)}subtract(e){return Gw(this,e)}set(e,r){return Jw(this,e,r)}cycle(e,r,n){return Yw(this,e,r,n)}toDate(){return qw(this)}toString(){return r0(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-jw(e,this.timeZone).toDate().getTime()}}let uu=new Map;class rn{constructor(e,r={}){this.formatter=Mp(e,r),this.options=r}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,r);if(r<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(r)}`}formatRangeToParts(e,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,r);if(r<e)throw new RangeError("End date must be >= start date");let n=this.formatter.formatToParts(e),i=this.formatter.formatToParts(r);return[...n.map(s=>({...s,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(s=>({...s,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return s0()&&(this.resolvedHourCycle||(this.resolvedHourCycle=o0(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}}const n0={true:{ja:"h11"},false:{}};function Mp(t,e={}){if(typeof e.hour12=="boolean"&&i0()){e={...e};let i=n0[String(e.hour12)][t.split("-")[0]],s=e.hour12?"h12":"h23";e.hourCycle=i??s,delete e.hour12}let r=t+(e?Object.entries(e).sort((i,s)=>i[0]<s[0]?-1:1).join():"");if(uu.has(r))return uu.get(r);let n=new Intl.DateTimeFormat(t,e);return uu.set(r,n),n}let du=null;function i0(){return du==null&&(du=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),du}let fu=null;function s0(){return fu==null&&(fu=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),fu}function o0(t,e){if(!e.timeStyle&&!e.hour)return;t=t.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),t+=(t.includes("-u-")?"":"-u")+"-nu-latn";let r=Mp(t,{...e,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(s=>s.type==="hour").value,10),i=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(s=>s.type==="hour").value,10);if(n===0&&i===23)return"h23";if(n===24&&i===23)return"h24";if(n===0&&i===11)return"h11";if(n===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}function wo(t){return Bw(t0(t,"Europe/Berlin")).toString().slice(0,-3)}function ko(t,e={weekday:"long",year:"numeric",month:"long",day:"numeric"},r="de"){return e={...e},new Date(t).toLocaleDateString(r,e)}function qa(t){if(t===void 0)throw Error("priceCents is required");return new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(t/100)}let a0=1;function $p(t){return t.type==="Ticket"}function Wa(t,e){return{...t,uid:a0++,selectedTime:e?.selectedTime??"",type:"Ticket",subtype:{time_slot:"timeslot",normal:"day",annual:"annual"}[t.ticket_type],shop_order:t.shop_order??0}}function li(t,e=""){return Ab(Object.values(t).map(r=>Wa(r,{selectedTime:e})),r=>r.shop_order)}function ci(t,e=""){let r=Object.entries(t);return e!==""&&(r=r.filter(([,n])=>n.total_capacities?.[e]&&n.total_capacities[e]>0)),Object.fromEntries(r)}const l0=function(t,e,r,n){if(t.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!$p(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,s=t.quotaManager;s.clearPrecart();for(const l of[...n.items,...e.items]){const c=l.product;$p(c)&&s.setPrecartItemQuantity(c.id,l.quantity)}const o=s.ticketCapacity(i.id,i.selectedTime),a=s.totalCapacity(i.id,i.selectedTime);return{max:Math.min(i.max_persons||100,o),min:i.min_persons||0,bookedOut:o===0,unavailable:a===0}};function So(t){return t.type==="Event"}function c0(t){return So(t)&&t.subtype==="scale"}let u0=1;function d0(t,e,r){const n={type:"Event",id:e,tax_included:!0,...t};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=t.title||"",r.price_description=t.description||""}return{uid:u0++,dateId:e,minAvailableCapacity:0,selectedTime:"",...r,...n,...t,type:"Event",subtype:t.scale_price_id===void 0?"flat":"scale"}}function hu(t,e,r){return d0(t,e,r)}const f0=function(t,e,r,n){if(t.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!So(r.product))throw new Error("(getMaxQuantitySeats) impossible");const s=r.product.dateId,o=t.allSeats[s];if(!o)return console.error("(getMaxQuantity) no seats found for dateId",s),{max:0,min:0,unavailable:!0,bookedOut:!1};const a=Math.min(o.max||100,o.max_per_registration||100,o.available??100),l={max_per_registration:a,available:100,overbook:!1,...o};let c=a;l.overbook&&(c=Math.min(l.max||100,l.max_per_registration||100));const u=n.totalQuantity,d=Ti(e.items.filter(v=>n.items.some(g=>g.uuid===v.uuid)),v=>v.quantity),f=Math.max(c-d-u+r.quantity,0);return{max:f,min:l.min??0,unavailable:l.available===0,bookedOut:f===0}},h0=function(t,e,r,n){if(t.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 p0(t){return{apiData:t,_timeslots:[],addQuotas(n){this._timeslots=[],this.apiData={...this.apiData,...n}},precart:{},clearPrecart(){this.precart={},this._timeslots=[]},setPrecartItemQuantity(n,i){this.precart[n]=i,this._timeslots=[]},getPrecartItemQuantity(n){return this.precart[n]??0},timeslots(){return this._timeslots.length===0&&(this._timeslots=Object.entries(this.apiData).flatMap(([n,i])=>Object.keys(i.capacities).map(s=>{const o=Ti(i.ticket_ids.map(a=>this.getPrecartItemQuantity(a)));return{timeSlot:s,quota:n,capacity:i.capacities[s]-o,tickets:i.ticket_ids,totalCapacity:i.total_capacities[s]}}))),this._timeslots},filterBy({timeslot:n,ticketId:i,date:s}={}){let o=this.timeslots();return i&&(o=o.filter(a=>a.tickets.includes(i))),n&&(o=o.filter(a=>a.timeSlot===n)),s&&(o=o.filter(a=>a.timeSlot.startsWith(s))),o.flatMap(a=>a.tickets.map(l=>({timeslot:n,ticket:l,quota:a.quota,capacity:a.capacity,totalCapacity:a.totalCapacity})))},ticketCapacity(n,i){return(Vc(this.filterBy({timeslot:i,ticketId:n}).map(o=>o.capacity))??0)+this.getPrecartItemQuantity(n)},totalCapacity(n,i){return Vc(this.filterBy({timeslot:i,ticketId:n}).map(o=>o.totalCapacity))??0},timeslotsOn(n){const i=this.timeslots().filter(a=>a.timeSlot.startsWith(n.toString())),s=Tb(i,a=>a.timeSlot);return Object.values(s).map(a=>{const c=Ob(a.flatMap(u=>u.tickets)).map(u=>Vc(a.filter(d=>d.tickets.includes(u)),d=>d.capacity)).filter(u=>u!==null);return Cb(c,u=>u.capacity)??a[0]}).sort((a,l)=>a.timeSlot.localeCompare(l.timeSlot))}}}function m0(t){let e=0;ba(()=>{_e(()=>{if(t.items.length===e)return;const r=t.items.length>e?"go-cart-item-added":"go-cart-item-removed";e=t.items.length,document.dispatchEvent(new CustomEvent(r,{detail:t.items.length}))})})}function xt(t,e){return{...{quantity:0,time:"",...e??{}},type:t.type,product:t,orderAttributes(){const n={shipped_with_merchandise_id:null,shipping_mode:"email",id:this.product.id};switch(t.type){case"Ticket":return{...n,time:this.time,quantity:this.quantity};case"Event":switch(t.subtype){case"flat":return{...n,quantity:this.quantity};case"scale":return{...n,quantities:{[t.scale_price_id]:this.quantity}};default:const s=t;throw new Error(`(orderAttributes) Unhandled Event subtype: ${s}`)}default:const i=t;throw new Error(`(orderAttributes) Unhandled product type: ${i}`)}},get uuid(){return this.type+"-"+this.product.id+this.subUId},get subUId(){const n=[];return this.time&&n.push(`time: ${this.time}`),c0(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),this.display?.discounted&&n.push("discounted"),n.length>0?` (${n.join(", ")})`:""},toString(){return this.uuid+":"+this.quantity},get price_cents(){return this.time&&this.product.dynamic_prices?.[this.time]!=null?this.product.dynamic_prices[this.time]:this.product.price_cents},get price_formatted(){return Sr(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 Sr(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return Sr(this.total_price_cents)}}}function g0(t){const e=t.product.type;switch(e){case"Ticket":if(!Np(t))return;const r=Wa(t.product);return xt(r,{time:t.time,quantity:t.quantity});case"Event":if(!Np(t))return;const n=hu(t.product,t.id);return xt(n,{time:t.time,quantity:t.quantity});default:const i=e;throw new Error(`Unhandled case: ${i}`)}}function v0(t){let e=[],r=[];try{const n=localStorage.getItem("go-cart");if(!n)return[];const i=JSON.parse(n);if(Array.isArray(i))e=i,r=[];else if(typeof i=="object"&&i!==null)e=i.items||[],r=i.coupons||[];else throw console.dir({parsed:i,content:n}),new Error("go-cart has invalid format");return e.length===0?t.clearItems():t.items=e.map(g0).filter(w0),t.clearCoupons(),r.forEach(s=>t.addCoupon(s)),t.items}catch(n){return console.error(n),localStorage.setItem("go-cart",JSON.stringify({items:[],coupons:[]})),[]}}function y0(t){v0(t);let e=JSON.stringify({items:t.items||[],coupons:t.coupons||[]});localStorage.setItem("go-cart",e),ba(()=>{_e(()=>{const r=JSON.stringify({items:t.items||[],coupons:t.coupons||[]});r!==e&&(e=r,localStorage.setItem("go-cart",r))})})}const _0=t=>{const e=new Date,r=new Date(t);return e<r},b0=t=>ja(t.slice(0,10)).compare(Ii(Xt()))>=0,Np=t=>t.time?t.product.subtype==="day"?b0(t.time):_0(t.time):!0,w0=t=>t!==void 0;let k0=0;function us(t,e=20){const r=Be([]),n=Be([]),s={items:r,coupons:n,paymentModeId:void 0,uid:`cart-${k0++}`,get nonEmptyItems(){return this.items.filter(o=>o.quantity>0)},get totalPriceCents(){return Math.max(0,Ti(this.items,o=>o.total_price_cents))},get totalQuantity(){return Ti(this.items,o=>o.quantity)},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??S.settings?.defaultPaymentModeId,coupons:this.coupons,donations:[],affiliate:{},total:this.totalPriceCents}},get totalFormatted(){return Sr(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(o){for(let a=this.items.length-1;a>=0;a--)this.items[a].uuid===o.uuid&&this.items.splice(a,1)},addItem(o){const a=this.items.find(l=>l.uuid===o.uuid);a?a.quantity+=o.quantity:this.items.push(o)},addItems(o){o.forEach(a=>this.addItem(a))},addCoupon(o){this.coupons.includes(o)||this.coupons.push(o)},removeCoupon(o){const a=this.coupons.indexOf(o);a>-1&&this.coupons.splice(a,1)},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()}};return t&&t.forEach(o=>s.addItem(xt(o))),s}function Sr(t){return t=t??0,new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(t/100)}function S0(){const t=Be(us());return y0(t),m0(t),t}function Ha(){return typeof window<"u"&&typeof localStorage<"u"}function x0(t,e){if(Ha())try{localStorage.setItem(t,JSON.stringify(e))}catch(r){console.warn(`Failed to save to localStorage (${t}):`,r)}}function pu(t){if(!Ha())return null;try{const e=localStorage.getItem(t);return e?JSON.parse(e):null}catch(e){return console.warn(`Failed to load from localStorage (${t}):`,e),null}}function E0(t){if(Ha())try{localStorage.removeItem(t)}catch(e){console.warn(`Failed to remove from localStorage (${t}):`,e)}}const xo="go-capacity";function Fp(t,e){const r=pu(xo),n={allSeats:{...r?.allSeats||{},...t},allQuotas:{...r?.allQuotas||{},...e}};x0(xo,n)}function Rp(t){const e=pu(xo);if(e){if(e.allSeats)for(const r in e.allSeats){const n=parseInt(r);t.addSeats(n,e.allSeats[n],!1)}e.allQuotas&&t.addQuotas(e.allQuotas,!1)}}function T0(t){Ha()&&window.addEventListener("storage",e=>{if(e.key===xo&&Rp(t),e.key==="go-cart"){const r=pu("go-cart");(!r||!r.items||r.items.length===0)&&E0(xo)}})}function Lp(){const t={allSeats:{},allQuotas:{},quotaManager:p0({}),addQuotas(e,r=!0){this.allQuotas={...this.allQuotas,...e},this.quotaManager.addQuotas(e),r&&Fp(this.allSeats,this.allQuotas)},addSeats(e,r,n=!0){this.allSeats[e]=r,n&&Fp(this.allSeats,this.allQuotas)},capacityPolicy(e){const r=e.product.type;switch(r){case"Ticket":const i=e.product.subtype;switch(i){case"timeslot":case"event:ticket":case"day":return"quotas";case"annual":return"unlimited";default:const l=i;throw new Error(`(getMaxAvailability) Unhandled case: ${l}`)}case"Event":const o=e.product.subtype;switch(o){case"flat":case"scale":return"seats";default:const l=o;throw new Error(`(getMaxAvailability) Unhandled case: ${l}`)}default:const a=r;throw new Error(`(getMaxAvailability) Unhandled case: ${a}`)}},capacity(e,r,n){const i=this.capacityPolicy(r),s={quotas:l0,seats:f0,unlimited:h0}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Ge(()=>s(this,e,r,n))}};return Rp(t),T0(t),t}function zp(t){if(typeof document>"u")return;const r=`; ${document.cookie}`.split(`; ${t}=`);if(r.length===2){const n=r.pop()?.split(";").shift();return n?decodeURIComponent(n):void 0}}class Zp{get isAuthenticated(){return this.isLoggedIn||this.isGuest}}class A0 extends Zp{constructor(){super()}get isLoggedIn(){try{const e=zp("auth_headers");if(!e)return!1;const r=JSON.parse(e),n=Math.floor(Date.now()/1e3);return!r["access-token"]||parseInt(r.expiry,10)<n?!1:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r.uid)}catch{return!1}}get isGuest(){if(this.isLoggedIn)return!1;try{const e=zp("auth_headers");if(!e)return!0;const r=JSON.parse(e);return typeof r.uid=="string"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r.uid)}catch{return!0}}}class C0 extends Zp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}}const O0=t=>{switch(t){case"angular":return new A0;case"jmb":return new C0;default:let e=t;throw new Error("Unhandled shop type: "+e)}};function D0(t){return t==null||typeof t=="string"&&t.trim()===""}function I0(t,e){const r={};if(!e||e.length===0)return r;for(const n of e)(!(n in t)||D0(t[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function P0(t,e){return I0(t,e)}const M0={withStackTrace:!1},Vp=(t,e,r=M0)=>{const n=e.isOk()?{type:"Ok",value:e.value}:{type:"Err",value:e.error},i=r.withStackTrace?new Error().stack:void 0;return{data:n,message:t,stack:i}};function ds(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):i(u.value).then(a,l)}c((n=n.apply(t,[])).next())})}function Up(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Mi(t){return this instanceof Mi?(this.v=t,this):new Mi(t)}function $0(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(f){n[f]&&(i[f]=function(p){return new Promise(function(v,g){s.push([f,p,v,g])>1||a(f,p)})})}function a(f,p){try{l(n[f](p))}catch(v){d(s[0][3],v)}}function l(f){f.value instanceof Mi?Promise.resolve(f.value.v).then(c,u):d(s[0][2],f)}function c(f){a("next",f)}function u(f){a("throw",f)}function d(f,p){f(p),s.shift(),s.length&&a(s[0][0],s[0][1])}}function N0(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:Mi(t[i](o)),done:i==="return"}:s?s(o):o}:s}}function F0(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Up=="function"?Up(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,l){o=t[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}}class Ft{constructor(e){this._promise=e}static fromSafePromise(e){const r=e.then(n=>new On(n));return new Ft(r)}static fromPromise(e,r){const n=e.then(i=>new On(i)).catch(i=>new nn(r(i)));return new Ft(n)}static fromThrowable(e,r){return(...n)=>new Ft(ds(this,void 0,void 0,function*(){try{return new On(yield e(...n))}catch(i){return new nn(r?r(i):i)}}))}static combine(e){return R0(e)}static combineWithAllErrors(e){return L0(e)}map(e){return new Ft(this._promise.then(r=>ds(this,void 0,void 0,function*(){return r.isErr()?new nn(r.error):new On(yield e(r.value))})))}andThrough(e){return new Ft(this._promise.then(r=>ds(this,void 0,void 0,function*(){if(r.isErr())return new nn(r.error);const n=yield e(r.value);return n.isErr()?new nn(n.error):new On(r.value)})))}andTee(e){return new Ft(this._promise.then(r=>ds(this,void 0,void 0,function*(){if(r.isErr())return new nn(r.error);try{yield e(r.value)}catch{}return new On(r.value)})))}mapErr(e){return new Ft(this._promise.then(r=>ds(this,void 0,void 0,function*(){return r.isOk()?new On(r.value):new nn(yield e(r.error))})))}andThen(e){return new Ft(this._promise.then(r=>{if(r.isErr())return new nn(r.error);const n=e(r.value);return n instanceof Ft?n._promise:n}))}orElse(e){return new Ft(this._promise.then(r=>ds(this,void 0,void 0,function*(){return r.isErr()?e(r.error):new On(r.value)})))}match(e,r){return this._promise.then(n=>n.match(e,r))}unwrapOr(e){return this._promise.then(r=>r.unwrapOr(e))}safeUnwrap(){return $0(this,arguments,function*(){return yield Mi(yield Mi(yield*N0(F0(yield Mi(this._promise.then(r=>r.safeUnwrap()))))))})}then(e,r){return this._promise.then(e,r)}}const mu=t=>new Ft(Promise.resolve(new nn(t))),Bp=t=>{let e=$i([]);for(const r of t)if(r.isErr()){e=Cn(r.error);break}else e.map(n=>n.push(r.value));return e},R0=t=>Ft.fromSafePromise(Promise.all(t)).andThen(Bp),jp=t=>{let e=$i([]);for(const r of t)r.isErr()&&e.isErr()?e.error.push(r.error):r.isErr()&&e.isOk()?e=Cn([r.error]):r.isOk()&&e.isOk()&&e.value.push(r.value);return e},L0=t=>Ft.fromSafePromise(Promise.all(t)).andThen(jp);var gu;(function(t){function e(i,s){return(...o)=>{try{const a=i(...o);return $i(a)}catch(a){return Cn(s?s(a):a)}}}t.fromThrowable=e;function r(i){return Bp(i)}t.combine=r;function n(i){return jp(i)}t.combineWithAllErrors=n})(gu||(gu={}));const $i=t=>new On(t);function Cn(t){return new nn(t)}class On{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return $i(e(this.value))}mapErr(e){return $i(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map(r=>this.value)}andTee(e){try{e(this.value)}catch{}return $i(this.value)}orElse(e){return $i(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return Ft.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,r){return e(this.value)}safeUnwrap(){const e=this.value;return(function*(){return e})()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw Vp("Called `_unsafeUnwrapErr` on an Ok",this,e)}}class nn{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return Cn(this.error)}mapErr(e){return Cn(e(this.error))}andThrough(e){return Cn(this.error)}andTee(e){return Cn(this.error)}andThen(e){return Cn(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return mu(this.error)}asyncAndThrough(e){return mu(this.error)}asyncMap(e){return mu(this.error)}unwrapOr(e){return e}match(e,r){return r(this.error)}safeUnwrap(){const e=this.error;return(function*(){throw yield Cn(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw Vp("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}}gu.fromThrowable;const z0=/\{[^{}]+\}/g;function Z0(){return Math.random().toString(36).slice(2,11)}function V0(t){let{baseUrl:e="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:s,headers:o,...a}={...t};e=Kp(e);const l=[];async function c(u,d){const{baseUrl:f,fetch:p=n,Request:v=r,headers:g,params:m={},parseAs:b="json",querySerializer:k,bodySerializer:D=s??B0,body:T,...P}=d||{};f&&(e=Kp(f));let A=typeof i=="function"?i:Hp(i);k&&(A=typeof k=="function"?k:Hp({...typeof i=="object"?i:{},...k}));const O=T===void 0?void 0:D(T),F=O===void 0||O instanceof FormData?{}:{"Content-Type":"application/json"},N={redirect:"follow",...a,...P,body:O,headers:q0(F,o,g,m.header)};let j,G,Z=new r(j0(u,{baseUrl:e,params:m,querySerializer:A}),N);for(const K in P)K in Z||(Z[K]=P[K]);if(l.length){j=Z0(),G=Object.freeze({baseUrl:e,fetch:p,parseAs:b,querySerializer:A,bodySerializer:D});for(const K of l)if(K&&typeof K=="object"&&typeof K.onRequest=="function"){const J=await K.onRequest({request:Z,schemaPath:u,params:m,options:G,id:j});if(J){if(!(J instanceof r))throw new Error("onRequest: must return new Request() when modifying the request");Z=J}}}let ue=await p(Z);if(l.length)for(let K=l.length-1;K>=0;K--){const J=l[K];if(J&&typeof J=="object"&&typeof J.onResponse=="function"){const B=await J.onResponse({request:Z,response:ue,schemaPath:u,params:m,options:G,id:j});if(B){if(!(B instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");ue=B}}}if(ue.status===204||ue.headers.get("Content-Length")==="0")return ue.ok?{data:{},response:ue}:{error:{},response:ue};if(ue.ok)return b==="stream"?{data:ue.body,response:ue}:{data:await ue[b](),response:ue};let me=await ue.text();try{me=JSON.parse(me)}catch{}return{error:me,response:ue}}return{GET(u,d){return c(u,{...d,method:"GET"})},PUT(u,d){return c(u,{...d,method:"PUT"})},POST(u,d){return c(u,{...d,method:"POST"})},DELETE(u,d){return c(u,{...d,method:"DELETE"})},OPTIONS(u,d){return c(u,{...d,method:"OPTIONS"})},HEAD(u,d){return c(u,{...d,method:"HEAD"})},PATCH(u,d){return c(u,{...d,method:"PATCH"})},TRACE(u,d){return c(u,{...d,method:"TRACE"})},use(...u){for(const d of u)if(d){if(typeof d!="object"||!("onRequest"in d||"onResponse"in d))throw new Error("Middleware must be an object with one of `onRequest()` or `onResponse()`");l.push(d)}},eject(...u){for(const d of u){const f=l.indexOf(d);f!==-1&&l.splice(f,1)}}}}function Ka(t,e,r){if(e==null)return"";if(typeof e=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${r?.allowReserved===!0?e:encodeURIComponent(e)}`}function qp(t,e,r){if(!e||typeof e!="object")return"";const n=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if(r.style!=="deepObject"&&r.explode===!1){for(const a in e)n.push(a,r.allowReserved===!0?e[a]:encodeURIComponent(e[a]));const o=n.join(",");switch(r.style){case"form":return`${t}=${o}`;case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;default:return o}}for(const o in e){const a=r.style==="deepObject"?`${t}[${o}]`:o;n.push(Ka(a,e[o],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function Wp(t,e,r){if(!Array.isArray(e))return"";if(r.explode===!1){const s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",o=(r.allowReserved===!0?e:e.map(a=>encodeURIComponent(a))).join(s);switch(r.style){case"simple":return o;case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;default:return`${t}=${o}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const s of e)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?s:encodeURIComponent(s)):i.push(Ka(t,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function Hp(t){return function(r){const n=[];if(r&&typeof r=="object")for(const i in r){const s=r[i];if(s!=null){if(Array.isArray(s)){n.push(Wp(i,s,{style:"form",explode:!0,...t?.array,allowReserved:t?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(qp(i,s,{style:"deepObject",explode:!0,...t?.object,allowReserved:t?.allowReserved||!1}));continue}n.push(Ka(i,s,t))}}return n.join("&")}}function U0(t,e){let r=t;for(const n of t.match(z0)??[]){let i=n.substring(1,n.length-1),s=!1,o="simple";if(i.endsWith("*")&&(s=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(o="label",i=i.substring(1)):i.startsWith(";")&&(o="matrix",i=i.substring(1)),!e||e[i]===void 0||e[i]===null)continue;const a=e[i];if(Array.isArray(a)){r=r.replace(n,Wp(i,a,{style:o,explode:s}));continue}if(typeof a=="object"){r=r.replace(n,qp(i,a,{style:o,explode:s}));continue}if(o==="matrix"){r=r.replace(n,`;${Ka(i,a)}`);continue}r=r.replace(n,o==="label"?`.${encodeURIComponent(a)}`:encodeURIComponent(a))}return r}function B0(t){return t instanceof FormData?t:JSON.stringify(t)}function j0(t,e){let r=`${e.baseUrl}${t}`;e.params?.path&&(r=U0(r,e.params.path));let n=e.querySerializer(e.params.query??{});return n.startsWith("?")&&(n=n.substring(1)),n&&(r+=`?${n}`),r}function q0(...t){const e=new Headers;for(const r of t){if(!r||typeof r!="object")continue;const n=r instanceof Headers?r.entries():Object.entries(r);for(const[i,s]of n)if(s===null)e.delete(i);else if(Array.isArray(s))for(const o of s)e.append(i,o);else s!==void 0&&e.set(i,s)}return e}function Kp(t){return t.endsWith("/")?t.substring(0,t.length-1):t}function W0(t,e){return V0({baseUrl:t,headers:{"X-Shop-Url":e}})}const H0="/api/v4/calendar",K0="/api/v4/tickets/calendar",G0="/api/v4/auth/validate_token",Y0="/api/v4/tickets/list_and_quotas",J0="/api/v4/tickets",Q0="/api/v4/auth/sign_in",X0="/api/v4/auth",ek="/api/v4/orders/withdrawals",Gp={SHOP_GUEST:10,SHOP:20};class tk{constructor(e,r,n,i="angular"){this.type=i,e&&r&&n&&this.load(e,r,n,i)}#e=le(Be({customerSalutations:[],countries:[],locales:[]}));#t={};async load(e,r,n,i="angular"){(e.includes("jmb-staging.gomus.de")||e.includes("jmb.gomus.de"))&&(this.type="jmb"),h(this.#e).urls=_b(this.type),h(this.#e).currentUser=O0(this.type),h(this.#e).apiUrl=e,h(this.#e).shopDomain=r,h(this.#e).locale=n||"de",this.#t={},h(this.#e).client=W0(e,r),h(this.#e).capacityManager=Lp(),h(this.#e).cart=S0(),h(this.#e).auth=new Yh,h(this.#e).client.use(new Ib(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return h(this.#e).capacityManager||(h(this.#e).capacityManager=Lp()),h(this.#e).capacityManager}get cart(){return h(this.#e).cart}get auth(){return h(this.#e).auth||(h(this.#e).auth=new Yh),h(this.#e).auth}get currentUser(){return h(this.#e).currentUser}get slug(){return this.shopDomain?.match(/^(?:https?:\/\/)?([^.-]+)/)?.[1]}get client(){return h(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 this.shop?.translations}get currency(){return this.shop?.config.currency}t(e,r){return this.translate(e,r)}translate(e,r){if(!this.translations?.[e])return e;let n=this.translations[e];if(r&&n)for(const[i,s]of Object.entries(r))n=n.replace(`{{${i}}}`,s);return n||""}get apiUrl(){return h(this.#e).apiUrl}get shopDomain(){return h(this.#e).shopDomain}get baseUrl(){return"https://"+this.shopDomain}get locale(){return h(this.#e).locale}get shop(){return this.fetchAndCache("/api/v4/shop","shop","shop")}get _data(){return h(this.#e)}validateToken(){return this.fetchAndCache(G0,"validateToken","",{cache:5})}ticketsCalendar(e){return this.fetchAndCache(K0,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(H0,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(Y0,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:e})}tickets(e){return this.fetchAndCache(J0,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:e})}signIn(e){return this.apiPost(Q0,{body:e,requiredFields:["email","password"]})}signUp(e,r=!1){const n={addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:r?Gp.SHOP_GUEST:Gp.SHOP};e=dr(n,e);let i=["name","surname","email","email_confirmation","terms"];return r||i.push("password","password_confirmation"),this.apiPost(X0,{body:e,requiredFields:i})}withdrawal(e){const r={...e,order_id:String(e.order_id)};return r.note||delete r.note,this.apiPost(ek,{body:r,requiredFields:["order_id","first_name","last_name","email"],parseAs:"text"})}getDates(e){return this.fetchAndCache("/api/v4/dates",`dates-${JSON.stringify(e)}`,"dates",{query: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"]})}checkout(e){return this.apiPost("/api/v4/orders",{body:e,requiredFields:["items","total"]})}#r=null;async createCart(e){const r=JSON.stringify({items:e.items??[],coupons:e.coupons??[]});if(this.#r?.key===r)return this.#r.result;const n=await this.apiPost("/api/v4/cart",{body:e,requiredFields:["items"]});return this.#r={key:r,result:n},n}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,r){return this.apiPost("/api/v4/annual/personalization/finalize",{body:r,params:{query:{token:e}}})}uploadPersonalizationPhoto(e,r,n){const i=new FormData;return i.append("file",n),this.apiUpload("/api/v4/annual/personalizations/{id}/upload",{body:i,params:{path:{id:r},query:{token:e}}})}fetchAndCache(e,r,n,i){if(i??={},i.query??={},i.cache??=1e3,i.path??={},!this.#i())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),h(this.#e)[r];const s=dr({per_page:1e3},i.query),o=e+JSON.stringify(s),a=!this.#t[o],l=this.#t[o]?.fetchedAt<Date.now()-i.cache*1e3;return(a||l)&&this.apiGet(e,s,i.path).then(c=>{c&&(h(this.#e)[r]=n===""?c:c[n])}),h(this.#e)[r]}get museums(){return this.fetchAndCache("/api/v4/museums","museums","museums")}get exhibitions(){return this.fetchAndCache("/api/v4/exhibitions","exhibitions","exhibitions")}getEvent(e){return this.fetchAndCache(`/api/v4/events/${e}`,`single_event_${e}`,"event")}getTicketCapacities(e,r){return this.apiPost("/api/v4/tickets/capacities",{body:{date:e,ticket_ids:r},requiredFields:["date","ticket_ids"]})}getCouponSaleByBarcode(e){return this.fetchAndCache(`/api/v4/coupon_sales/barcode/${e}`,`coupon_sale_barcode_${e}`,"coupon_sale")}getEventDetailsOnDate(e,r){return this.fetchAndCache(`/api/v4/events/${e}/dates/${r}`,`/api/v4/events/${e}/dates/${r}`,"date")}get events(){return this.fetchAndCache("/api/v4/events","events","events")}get upcomingEvents(){return this.fetchAndCache("/api/v4/events","events","events",{query:{by_bookable:!0,with_bookings_in_future:1}})}get tours(){return this.fetchAndCache("/api/v4/tours","tours","tours")}get merchandises(){return this.fetchAndCache("/api/v4/merchandises","merchandises","merchandises")}get customerSalutations(){return this.fetchAndCache("/api/v3/customer_salutations","customerSalutations","customer_salutations")}get countries(){return this.fetchAndCache("/api/v3/countries","countries","countries")}get locales(){return this.fetchAndCache("/api/v4/locales","locales","locales_options")}get urls(){return h(this.#e).urls}get#n(){return{params:{query:{locale:this.locale},header:{"X-Shop-Url":this.shopDomain}}}}async apiPost(e,r){return this.apiCall(e,{method:"POST",...r})}async apiPut(e,r){return this.apiCall(e,{method:"PUT",...r})}async apiDELETE(e,r){return this.apiCall(e,{method:"DELETE",...r})}async apiUpload(e,r){this.#s();const{body:n,params:i={}}=r;return await this.client.POST(e,{body:n,params:dr(this.#n,{params:i}).params,bodySerializer:o=>o})}async apiCall(e,r){this.#s();const{body:n,params:i={},requiredFields:s,parseAs:o}=r,a=P0(n,s);if(Object.keys(a).length>0)return{error:{errors:a}};const l=this.client[r.method];return await l(e,{body:n,params:dr(this.#n,{params:i}).params,parseAs:o})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(r=>r.status==="fetching").length;)await kb(10)}async apiGet(e,r={},n){this.#s();const i=e+JSON.stringify(r);this.#t[i]={status:"fetching",fetchedAt:Date.now()};let s=this.#n;r&&(s=dr(s,{params:{query:r}})),e&&(s=dr(s,{params:{path:n}}));const o=await this.client.GET(e,s);return this.#t[i]={status:"completed",fetchedAt:Date.now()},o.data||o}#i=()=>this.apiUrl!==void 0&&this.shopDomain!==void 0&&this.locale!==void 0&&this.client!==void 0;#s=()=>{if(this.apiUrl===void 0)throw new Error("Public API URL is not set");if(this.shopDomain===void 0)throw new Error("Shop Domain (X-Shop-Url) is not set");if(this.locale===void 0)throw new Error("Locale is not set");if(this.client===void 0)throw new Error("client is not set");if(!this.#i())throw new Error("Fetch is not possible.")}}const S=new tk;function fs(t){return function(e,r){if(e)e.addEventListener(t,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.")}}class vu{constructor(e,r,n=1e3){this.host=e,this.KEY=r,this.pollDuration=n}#e=le(Be({value:void 0}));error=!1;static static(e){const r=new vu(null,null);return r.value=e,r}load(){zc(()=>(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 h(this.#e).value}set value(e){h(this.#e).value=e}}function hs(t){return function(e,r={pollDuration:1e3}){if(e){const n=new vu(e,t,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.")}}let rk={urls:{},navigateTo:t=>{window.location.assign(t)},forms:{},fields:{}};class nk{defaultConfig=dr(rk,window.customOptions);override=this.defaultConfig;#e=le(Be({}));get options(){return h(this.#e)}set options(e){M(this.#e,e,!0)}constructor(){this.update()}update(){const e=dr(this.defaultConfig,this.override);e.forms=Object.keys({...this.defaultConfig.forms,...this.override.forms}).reduce((r,n)=>(r[n]={...this.defaultConfig.forms[n],...this.override.forms[n]},r),{}),this.options=e}get config(){return this.options}define(e){return this.override=dr(this.override,e),this.update(),this}default(e){return this.defaultConfig=dr(this.defaultConfig,e),this.update(),this}}const at=new nk;class Yp{#e=le();get token(){return h(this.#e)}set token(e){M(this.#e,e,!0)}#t=le();get ticketSaleId(){return h(this.#t)}set ticketSaleId(e){M(this.#t,e,!0)}get order(){return this.token?lc(S.annualOrder(this.token)):void 0}get ticketSale(){if(this.ticketSaleId)return lc(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return at.config.urls.annualTicketPersonalizationForm?at.config.urls.annualTicketPersonalizationForm(this.token,e.id):S.urls.annualTicketPersonalizationForm(this.token,e.id)}}const Jp="go-annual-ticket-personalization",Qp=fs(Jp),ik=hs(Jp);var sk=q("<li><a> </a></li>"),ok=q('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function ak(t,e){te(e,!0);let r=_(e,"token",7);const n=new Yp;Qp(e.$$host,n),_e(()=>{n.token=r()});let i=C(()=>n.order);var s={details:n,get token(){return r()},set token(c){r(c),y()}},o=H(),a=L(o);{var l=c=>{var u=H(),d=L(u);Ke(d,17,()=>h(i).ticket_sales,f=>f.id,(f,p)=>{var v=ok(),g=$(v),m=$(g,!0);I(g);var b=ee(g,2),k=$(b,!0);I(b);var D=ee(b,2);{var T=P=>{var A=sk(),O=$(A),F=$(O,!0);I(O),I(A),ce((N,j)=>{Te(O,"href",N),se(F,j)},[()=>n.goToPersonalization(h(p)),()=>S.t("ticket.annual.personalization.list.personalize.add")]),w(P,A)};de(D,P=>{h(p).status=="not_ready_to_send"&&P(T)})}I(v),ce(P=>{Te(v,"data-ticket-sale-id",h(p).id),se(m,h(p).title),se(k,P)},[()=>S.t("ticket.annual.personalization.detail.title",{count:h(p).personalizations.length})]),w(f,v)}),w(c,u)};de(a,c=>{h(i)&&c(l)})}return w(t,o),re(s)}customElements.define("go-annual-ticket-personalization",ne(ak,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));function Q(t,e,r){function n(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,l);const c=o.prototype,u=Object.keys(c);for(let d=0;d<u.length;d++){const f=u[d];f in a||(a[f]=c[f].bind(a))}}const i=r?.Parent??Object;class s extends i{}Object.defineProperty(s,"name",{value:t});function o(a){var l;const c=r?.Parent?new s:this;n(c,a),(l=c._zod).deferred??(l.deferred=[]);for(const u of c._zod.deferred)u();return c}return Object.defineProperty(o,"init",{value:n}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}class ps extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Xp extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const lk={};function Ni(t){return lk}function yu(t,e){return typeof e=="bigint"?e.toString():e}function _u(t){return t==null}function bu(t){const e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}const em=Symbol("evaluating");function Ye(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==em)return n===void 0&&(n=em,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function ck(...t){const e={};for(const r of t){const n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function uk(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const tm="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function rm(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function wu(t){if(rm(t)===!1)return!1;const e=t.constructor;if(e===void 0||typeof e!="function")return!0;const r=e.prototype;return!(rm(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function nm(t){return wu(t)?{...t}:Array.isArray(t)?[...t]:t}function ku(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function dk(t,e,r){const n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function Oe(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function ms(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function fk(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function Ga(t){return typeof t=="string"?t:t?.message}function Fi(t,e,r){const n={...t,path:t.path??[]};if(!t.message){const i=Ga(t.inst?._zod.def?.error?.(t))??Ga(e?.error?.(t))??Ga(r.customError?.(t))??Ga(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}function Su(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Eo(...t){const[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}const im=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,yu,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},sm=Q("$ZodError",im),om=Q("$ZodError",im,{Parent:Error});function hk(t,e=r=>r.message){const r={},n=[];for(const i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function pk(t,e=r=>r.message){const r={_errors:[]},n=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>n({issues:o}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)r._errors.push(e(s));else{let o=r,a=0;for(;a<s.path.length;){const l=s.path[a];a===s.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(e(s))):o[l]=o[l]||{_errors:[]},o=o[l],a++}}};return n(t),r}const xu=t=>(e,r,n,i)=>{const s=n?Object.assign(n,{async:!1}):{async:!1},o=e._zod.run({value:r,issues:[]},s);if(o instanceof Promise)throw new ps;if(o.issues.length){const a=new(i?.Err??t)(o.issues.map(l=>Fi(l,s,Ni())));throw tm(a,i?.callee),a}return o.value},Eu=t=>async(e,r,n,i)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let o=e._zod.run({value:r,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new(i?.Err??t)(o.issues.map(l=>Fi(l,s,Ni())));throw tm(a,i?.callee),a}return o.value},Ya=t=>(e,r,n)=>{const i=n?{...n,async:!1}:{async:!1},s=e._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new ps;return s.issues.length?{success:!1,error:new(t??sm)(s.issues.map(o=>Fi(o,i,Ni())))}:{success:!0,data:s.value}},mk=Ya(om),Ja=t=>async(e,r,n)=>{const i=n?Object.assign(n,{async:!0}):{async:!0};let s=e._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new t(s.issues.map(o=>Fi(o,i,Ni())))}:{success:!0,data:s.value}},gk=Ja(om),vk=t=>(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return xu(t)(e,r,i)},yk=t=>(e,r,n)=>xu(t)(e,r,n),_k=t=>async(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Eu(t)(e,r,i)},bk=t=>async(e,r,n)=>Eu(t)(e,r,n),wk=t=>(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Ya(t)(e,r,i)},kk=t=>(e,r,n)=>Ya(t)(e,r,n),Sk=t=>async(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Ja(t)(e,r,i)},xk=t=>async(e,r,n)=>Ja(t)(e,r,n),Ek=/^[cC][^\s-]{8,}$/,Tk=/^[0-9a-z]+$/,Ak=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ck=/^[0-9a-vA-V]{20}$/,Ok=/^[A-Za-z0-9]{27}$/,Dk=/^[a-zA-Z0-9_-]{21}$/,Ik=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Pk=/^([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})$/,am=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[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)$/,Mk=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$k="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Nk(){return new RegExp($k,"u")}const Fk=/^(?:(?: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])$/,Rk=/^(([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}|:))$/,Lk=/^((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])$/,zk=/^(([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])$/,Zk=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,lm=/^[A-Za-z0-9_-]*$/,Vk=/^\+[1-9]\d{6,14}$/,cm="(?:(?:\\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])))",Uk=new RegExp(`^${cm}$`);function um(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Bk(t){return new RegExp(`^${um(t)}$`)}function jk(t){const e=um({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${e}(?:${r.join("|")})`;return new RegExp(`^${cm}T(?:${n})$`)}const qk=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},Wk=/^[^A-Z]*$/,Hk=/^[^a-z]*$/,sn=Q("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Kk=Q("$ZodCheckMaxLength",(t,e)=>{var r;sn.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!_u(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{const i=n.value;if(i.length<=e.maximum)return;const o=Su(i);n.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Gk=Q("$ZodCheckMinLength",(t,e)=>{var r;sn.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!_u(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{const i=n.value;if(i.length>=e.minimum)return;const o=Su(i);n.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Yk=Q("$ZodCheckLengthEquals",(t,e)=>{var r;sn.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!_u(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=n=>{const i=n.value,s=i.length;if(s===e.length)return;const o=Su(i),a=s>e.length;n.issues.push({origin:o,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),Qa=Q("$ZodCheckStringFormat",(t,e)=>{var r,n;sn.init(t,e),t._zod.onattach.push(i=>{const s=i._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),Jk=Q("$ZodCheckRegex",(t,e)=>{Qa.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Qk=Q("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Wk),Qa.init(t,e)}),Xk=Q("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Hk),Qa.init(t,e)}),eS=Q("$ZodCheckIncludes",(t,e)=>{sn.init(t,e);const r=ku(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),tS=Q("$ZodCheckStartsWith",(t,e)=>{sn.init(t,e);const r=new RegExp(`^${ku(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),rS=Q("$ZodCheckEndsWith",(t,e)=>{sn.init(t,e);const r=new RegExp(`.*${ku(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}}),nS=Q("$ZodCheckOverwrite",(t,e)=>{sn.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}}),iS={major:4,minor:3,patch:6},Rt=Q("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=iS;const n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(const i of n)for(const s of i._zod.onattach)s(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const i=(o,a,l)=>{let c=ms(o),u;for(const d of a){if(d._zod.def.when){if(!d._zod.def.when(o))continue}else if(c)continue;const f=o.issues.length,p=d._zod.check(o);if(p instanceof Promise&&l?.async===!1)throw new ps;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,o.issues.length!==f&&(c||(c=ms(o,f)))});else{if(o.issues.length===f)continue;c||(c=ms(o,f))}}return u?u.then(()=>o):o},s=(o,a,l)=>{if(ms(o))return o.aborted=!0,o;const c=i(a,n,l);if(c instanceof Promise){if(l.async===!1)throw new ps;return c.then(u=>t._zod.parse(u,l))}return t._zod.parse(c,l)};t._zod.run=(o,a)=>{if(a.skipChecks)return t._zod.parse(o,a);if(a.direction==="backward"){const c=t._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(u=>s(u,o,a)):s(c,o,a)}const l=t._zod.parse(o,a);if(l instanceof Promise){if(a.async===!1)throw new ps;return l.then(c=>i(c,n,a))}return i(l,n,a)}}Ye(t,"~standard",()=>({validate:i=>{try{const s=mk(t,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return gk(t,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),Tu=Q("$ZodString",(t,e)=>{Rt.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??qk(t._zod.bag),t._zod.parse=(r,n)=>{if(e.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:t}),r}}),nt=Q("$ZodStringFormat",(t,e)=>{Qa.init(t,e),Tu.init(t,e)}),sS=Q("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Pk),nt.init(t,e)}),oS=Q("$ZodUUID",(t,e)=>{if(e.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=am(n))}else e.pattern??(e.pattern=am());nt.init(t,e)}),aS=Q("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Mk),nt.init(t,e)}),lS=Q("$ZodURL",(t,e)=>{nt.init(t,e),t._zod.check=r=>{try{const n=r.value.trim(),i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),cS=Q("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Nk()),nt.init(t,e)}),uS=Q("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Dk),nt.init(t,e)}),dS=Q("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Ek),nt.init(t,e)}),fS=Q("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Tk),nt.init(t,e)}),hS=Q("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Ak),nt.init(t,e)}),pS=Q("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Ck),nt.init(t,e)}),mS=Q("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Ok),nt.init(t,e)}),gS=Q("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=jk(e)),nt.init(t,e)}),vS=Q("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Uk),nt.init(t,e)}),yS=Q("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Bk(e)),nt.init(t,e)}),_S=Q("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Ik),nt.init(t,e)}),bS=Q("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Fk),nt.init(t,e),t._zod.bag.format="ipv4"}),wS=Q("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Rk),nt.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),kS=Q("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Lk),nt.init(t,e)}),SS=Q("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=zk),nt.init(t,e),t._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[i,s]=n;if(!s)throw new Error;const o=Number(s);if(`${o}`!==s)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function dm(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const xS=Q("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Zk),nt.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{dm(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function ES(t){if(!lm.test(t))return!1;const e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return dm(r)}const TS=Q("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=lm),nt.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{ES(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),AS=Q("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Vk),nt.init(t,e)});function CS(t,e=null){try{const r=t.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||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}const OS=Q("$ZodJWT",(t,e)=>{nt.init(t,e),t._zod.check=r=>{CS(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}});function fm(t,e,r){t.issues.length&&e.issues.push(...fk(r,t.issues)),e.value[r]=t.value}const DS=Q("$ZodArray",(t,e)=>{Rt.init(t,e),t._zod.parse=(r,n)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);const s=[];for(let o=0;o<i.length;o++){const a=i[o],l=e.element._zod.run({value:a,issues:[]},n);l instanceof Promise?s.push(l.then(c=>fm(c,r,o))):fm(l,r,o)}return s.length?Promise.all(s).then(()=>r):r}});function hm(t,e,r,n){for(const s of t)if(s.issues.length===0)return e.value=s.value,e;const i=t.filter(s=>!ms(s));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(s=>s.issues.map(o=>Fi(o,n,Ni())))}),e)}const IS=Q("$ZodUnion",(t,e)=>{Rt.init(t,e),Ye(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Ye(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Ye(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),Ye(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){const i=e.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>bu(s.source)).join("|")})$`)}});const r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,s)=>{if(r)return n(i,s);let o=!1;const a=[];for(const l of e.options){const c=l._zod.run({value:i.value,issues:[]},s);if(c instanceof Promise)a.push(c),o=!0;else{if(c.issues.length===0)return c;a.push(c)}}return o?Promise.all(a).then(l=>hm(l,i,t,s)):hm(a,i,t,s)}}),PS=Q("$ZodIntersection",(t,e)=>{Rt.init(t,e),t._zod.parse=(r,n)=>{const i=r.value,s=e.left._zod.run({value:i,issues:[]},n),o=e.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([l,c])=>pm(r,l,c)):pm(r,s,o)}});function Au(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(wu(t)&&wu(e)){const r=Object.keys(e),n=Object.keys(t).filter(s=>r.indexOf(s)!==-1),i={...t,...e};for(const s of n){const o=Au(t[s],e[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};i[s]=o.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<t.length;n++){const i=t[n],s=e[n],o=Au(i,s);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function pm(t,e,r){const n=new Map;let i;for(const a of e.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(const l of a.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else t.issues.push(a);for(const a of r.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else t.issues.push(a);const s=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&i&&t.issues.push({...i,keys:s}),ms(t))return t;const o=Au(e.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return t.value=o.data,t}const MS=Q("$ZodTransform",(t,e)=>{Rt.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Xp(t.constructor.name);const i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(o=>(r.value=o,r));if(i instanceof Promise)throw new ps;return r.value=i,r}});function mm(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}const gm=Q("$ZodOptional",(t,e)=>{Rt.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Ye(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Ye(t._zod,"pattern",()=>{const r=e.innerType._zod.pattern;return r?new RegExp(`^(${bu(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>mm(s,r.value)):mm(i,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,n)}}),$S=Q("$ZodExactOptional",(t,e)=>{gm.init(t,e),Ye(t._zod,"values",()=>e.innerType._zod.values),Ye(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,n)=>e.innerType._zod.run(r,n)}),NS=Q("$ZodNullable",(t,e)=>{Rt.init(t,e),Ye(t._zod,"optin",()=>e.innerType._zod.optin),Ye(t._zod,"optout",()=>e.innerType._zod.optout),Ye(t._zod,"pattern",()=>{const r=e.innerType._zod.pattern;return r?new RegExp(`^(${bu(r.source)}|null)$`):void 0}),Ye(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),FS=Q("$ZodDefault",(t,e)=>{Rt.init(t,e),t._zod.optin="optional",Ye(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);if(r.value===void 0)return r.value=e.defaultValue,r;const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>vm(s,e)):vm(i,e)}});function vm(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}const RS=Q("$ZodPrefault",(t,e)=>{Rt.init(t,e),t._zod.optin="optional",Ye(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),LS=Q("$ZodNonOptional",(t,e)=>{Rt.init(t,e),Ye(t._zod,"values",()=>{const r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>ym(s,t)):ym(i,t)}});function ym(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}const zS=Q("$ZodCatch",(t,e)=>{Rt.init(t,e),Ye(t._zod,"optin",()=>e.innerType._zod.optin),Ye(t._zod,"optout",()=>e.innerType._zod.optout),Ye(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.value,s.issues.length&&(r.value=e.catchValue({...r,error:{issues:s.issues.map(o=>Fi(o,n,Ni()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(s=>Fi(s,n,Ni()))},input:r.value}),r.issues=[]),r)}}),ZS=Q("$ZodPipe",(t,e)=>{Rt.init(t,e),Ye(t._zod,"values",()=>e.in._zod.values),Ye(t._zod,"optin",()=>e.in._zod.optin),Ye(t._zod,"optout",()=>e.out._zod.optout),Ye(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=e.out._zod.run(r,n);return s instanceof Promise?s.then(o=>Xa(o,e.in,n)):Xa(s,e.in,n)}const i=e.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Xa(s,e.out,n)):Xa(i,e.out,n)}});function Xa(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}const VS=Q("$ZodReadonly",(t,e)=>{Rt.init(t,e),Ye(t._zod,"propValues",()=>e.innerType._zod.propValues),Ye(t._zod,"values",()=>e.innerType._zod.values),Ye(t._zod,"optin",()=>e.innerType?._zod?.optin),Ye(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(_m):_m(i)}});function _m(t){return t.value=Object.freeze(t.value),t}const US=Q("$ZodCustom",(t,e)=>{sn.init(t,e),Rt.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{const n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(s=>bm(s,r,n,t));bm(i,r,n,t)}});function bm(t,e,r,n){if(!t){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),e.issues.push(Eo(i))}}var wm;class BS{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){const n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){const r=e._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function jS(){return new BS}(wm=globalThis).__zod_globalRegistry??(wm.__zod_globalRegistry=jS());const To=globalThis.__zod_globalRegistry;function qS(t,e){return new t({type:"string",...Oe(e)})}function WS(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...Oe(e)})}function km(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...Oe(e)})}function HS(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...Oe(e)})}function KS(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Oe(e)})}function GS(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Oe(e)})}function YS(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Oe(e)})}function JS(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...Oe(e)})}function QS(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...Oe(e)})}function XS(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...Oe(e)})}function ex(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...Oe(e)})}function tx(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...Oe(e)})}function rx(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...Oe(e)})}function nx(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...Oe(e)})}function ix(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...Oe(e)})}function sx(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...Oe(e)})}function ox(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...Oe(e)})}function ax(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Oe(e)})}function lx(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Oe(e)})}function cx(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...Oe(e)})}function ux(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...Oe(e)})}function dx(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...Oe(e)})}function fx(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...Oe(e)})}function hx(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Oe(e)})}function px(t,e){return new t({type:"string",format:"date",check:"string_format",...Oe(e)})}function mx(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...Oe(e)})}function gx(t,e){return new t({type:"string",format:"duration",check:"string_format",...Oe(e)})}function Sm(t,e){return new Kk({check:"max_length",...Oe(e),maximum:t})}function el(t,e){return new Gk({check:"min_length",...Oe(e),minimum:t})}function xm(t,e){return new Yk({check:"length_equals",...Oe(e),length:t})}function vx(t,e){return new Jk({check:"string_format",format:"regex",...Oe(e),pattern:t})}function yx(t){return new Qk({check:"string_format",format:"lowercase",...Oe(t)})}function _x(t){return new Xk({check:"string_format",format:"uppercase",...Oe(t)})}function bx(t,e){return new eS({check:"string_format",format:"includes",...Oe(e),includes:t})}function wx(t,e){return new tS({check:"string_format",format:"starts_with",...Oe(e),prefix:t})}function kx(t,e){return new rS({check:"string_format",format:"ends_with",...Oe(e),suffix:t})}function gs(t){return new nS({check:"overwrite",tx:t})}function Sx(t){return gs(e=>e.normalize(t))}function xx(){return gs(t=>t.trim())}function Ex(){return gs(t=>t.toLowerCase())}function Tx(){return gs(t=>t.toUpperCase())}function Ax(){return gs(t=>uk(t))}function Cx(t,e,r){return new t({type:"array",element:e,...Oe(r)})}function Ox(t,e,r){return new t({type:"custom",check:"custom",fn:e,...Oe(r)})}function Dx(t){const e=Ix(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Eo(n,r.value,e._zod.def));else{const i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),i.continue??(i.continue=!e._zod.def.abort),r.issues.push(Eo(i))}},t(r.value,r)));return e}function Ix(t,e){const r=new sn({check:"custom",...Oe(e)});return r._zod.check=t,r}function Em(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??To,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function Lt(t,e,r={path:[],schemaPath:[]}){var n;const i=t._zod.def,s=e.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;const o={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,o);const a=t._zod.toJSONSchema?.();if(a)o.schema=a;else{const u={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,o.schema,u);else{const f=o.schema,p=e.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(t,e,f,u)}const d=t._zod.parent;d&&(o.ref||(o.ref=d),Lt(d,e,u),e.seen.get(d).isParent=!0)}const l=e.metadataRegistry.get(t);return l&&Object.assign(o.schema,l),e.io==="input"&&zt(t)&&(delete o.schema.examples,delete o.schema.default),e.io==="input"&&o.schema._prefault&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,e.seen.get(t).schema}function Tm(t,e){const r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const o of t.seen.entries()){const a=t.metadataRegistry.get(o[0])?.id;if(a){const l=n.get(a);if(l&&l!==o[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,o[0])}}const i=o=>{const a=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const d=t.external.registry.get(o[0])?.id,f=t.external.uri??(v=>v);if(d)return{ref:f(d)};const p=o[1].defId??o[1].schema.id??`schema${t.counter++}`;return o[1].defId=p,{defId:p,ref:`${f("__shared")}#/${a}/${p}`}}if(o[1]===r)return{ref:"#"};const c=`#/${a}/`,u=o[1].schema.id??`__schema${t.counter++}`;return{defId:u,ref:c+u}},s=o=>{if(o[1].schema.$ref)return;const a=o[1],{ref:l,defId:c}=i(o);a.def={...a.schema},c&&(a.defId=c);const u=a.schema;for(const d in u)delete u[d];u.$ref=l};if(t.cycles==="throw")for(const o of t.seen.entries()){const a=o[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
3
|
+
\r\f \v\uFEFF`];function rb(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var i in r)if(r[i])n=n?n+" "+i:i;else if(n.length)for(var s=i.length,o=0;(o=n.indexOf(i,o))>=0;){var a=o+s;(o===0||$h.includes(n[o-1]))&&(a===n.length||$h.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function Nh(t,e=!1){var r=e?" !important;":";",n="";for(var i in t){var s=t[i];s!=null&&s!==""&&(n+=" "+i+": "+s+r)}return n}function Oc(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function nb(t,e){if(e){var r="",n,i;if(Array.isArray(e)?(n=e[0],i=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,o=0,a=!1,l=[];n&&l.push(...Object.keys(n).map(Oc)),i&&l.push(...Object.keys(i).map(Oc));var c=0,u=-1;const g=t.length;for(var d=0;d<g;d++){var f=t[d];if(a?f==="/"&&t[d-1]==="*"&&(a=!1):s?s===f&&(s=!1):f==="/"&&t[d+1]==="*"?a=!0:f==='"'||f==="'"?s=f:f==="("?o++:f===")"&&o--,!a&&s===!1&&o===0){if(f===":"&&u===-1)u=d;else if(f===";"||d===g-1){if(u!==-1){var p=Oc(t.substring(c,u).trim());if(!l.includes(p)){f!==";"&&d++;var v=t.substring(c,d).trim();r+=" "+v+";"}}c=d+1,u=-1}}}}return n&&(r+=Nh(n)),i&&(r+=Nh(i,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function Qt(t,e,r,n,i,s){var o=t.__className;if(xe||o!==r||o===void 0){var a=rb(r,n,s);(!xe||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a)),t.__className=r}else if(s&&i!==s)for(var l in s){var c=!!s[l];(i==null||c!==!!i[l])&&t.classList.toggle(l,c)}return s}function Dc(t,e={},r,n){for(var i in r){var s=r[i];e[i]!==s&&(r[i]==null?t.style.removeProperty(i):t.style.setProperty(i,s,n))}}function ib(t,e,r,n){var i=t.__style;if(xe||i!==e){var s=nb(e,n);(!xe||s!==t.getAttribute("style"))&&(s==null?t.removeAttribute("style"):t.style.cssText=s),t.__style=e}else n&&(Array.isArray(n)?(Dc(t,r?.[0],n[0]),Dc(t,r?.[1],n[1],"important")):Dc(t,r,n));return n}function Ea(t,e,r=!1){if(t.multiple){if(e==null)return;if(!ia(e))return u_();for(var n of t.options)n.selected=e.includes(Js(n));return}for(n of t.options){var i=Js(n);if(Xf(i,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function Fh(t){var e=new MutationObserver(()=>{Ea(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),_a(()=>{e.disconnect()})}function sb(t,e,r=e){var n=new WeakSet,i=!0;ya(t,"change",s=>{var o=s?"[selected]":":checked",a;if(t.multiple)a=[].map.call(t.querySelectorAll(o),Js);else{var l=t.querySelector(o)??t.querySelector("option:not([disabled])");a=l&&Js(l)}r(a),Ze!==null&&n.add(Ze)}),wa(()=>{var s=e();if(t===document.activeElement){var o=ma??Ze;if(n.has(o))return}if(Ea(t,s,i),i&&s===void 0){var a=t.querySelector(":checked");a!==null&&(s=Js(a),r(s))}t.__value=s,i=!1}),Fh(t)}function Js(t){return"__value"in t?t.__value:t.value}const Qs=Symbol("class"),Xs=Symbol("style"),Rh=Symbol("is custom element"),Lh=Symbol("is html");function Ta(t){if(xe){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;Te(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var i=t.checked;Te(t,"checked",null),t.checked=i}}};t.__on_r=r,lr(r),oh()}}function zh(t,e){var r=Aa(t);r.value===(r.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!=="PROGRESS")||(t.value=e??"")}function ob(t,e){var r=Aa(t);r.checked!==(r.checked=e??void 0)&&(t.checked=e)}function Ic(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Te(t,e,r,n){var i=Aa(t);xe&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||i[e]!==(i[e]=r)&&(e==="loading"&&(t[Qy]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Mc(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function Ei(t,e,r){var n=Me,i=$e;let s=xe;xe&&Mt(!1),Gt(null),br(null);try{e!=="style"&&(Pc.has(t.getAttribute("is")||t.nodeName)||!customElements||customElements.get(t.getAttribute("is")||t.tagName.toLowerCase())?Mc(t).includes(e):r&&typeof r=="object")?t[e]=r:Te(t,e,r==null?r:String(r))}finally{Gt(n),br(i),s&&Mt(!0)}}function ab(t,e,r,n,i=!1,s=!1){if(xe&&i&&t.tagName==="INPUT"){var o=t,a=o.type==="checkbox"?"defaultChecked":"defaultValue";a in r||Ta(o)}var l=Aa(t),c=l[Rh],u=!l[Lh];let d=xe&&c;d&&Mt(!1);var f=e||{},p=t.tagName==="OPTION";for(var v in e)v in r||(r[v]=null);r.class?r.class=Yr(r.class):r[Qs]&&(r.class=null),r[Xs]&&(r.style??=null);var g=Mc(t);for(const A in r){let O=r[A];if(p&&A==="value"&&O==null){t.value=t.__value="",f[A]=O;continue}if(A==="class"){var m=t.namespaceURI==="http://www.w3.org/1999/xhtml";Qt(t,m,O,n,e?.[Qs],r[Qs]),f[A]=O,f[Qs]=r[Qs];continue}if(A==="style"){ib(t,O,e?.[Xs],r[Xs]),f[A]=O,f[Xs]=r[Xs];continue}var b=f[A];if(!(O===b&&!(O===void 0&&t.hasAttribute(A)))){f[A]=O;var k=A[0]+A[1];if(k!=="$$")if(k==="on"){const F={},N="$$"+A;let j=A.slice(2);var D=V_(j);if(z_(j)&&(j=j.slice(0,-7),F.capture=!0),!D&&b){if(O!=null)continue;t.removeEventListener(j,f[N],F),f[N]=null}if(O!=null)if(D)t[`__${j}`]=O,Hr([j]);else{let G=function(Z){f[A].call(this,Z)};f[N]=xc(j,t,G,F)}else D&&(t[`__${j}`]=void 0)}else if(A==="style")Te(t,A,O);else if(A==="autofocus")D_(t,!!O);else if(!c&&(A==="__value"||A==="value"&&O!=null))t.value=t.__value=O;else if(A==="selected"&&p)Ic(t,O);else{var T=A;u||(T=B_(T));var P=T==="defaultValue"||T==="defaultChecked";if(O==null&&!c&&!P)if(l[A]=null,T==="value"||T==="checked"){let F=t;const N=e===void 0;if(T==="value"){let j=F.defaultValue;F.removeAttribute(T),F.defaultValue=j,F.value=F.__value=N?j:null}else{let j=F.defaultChecked;F.removeAttribute(T),F.defaultChecked=j,F.checked=N?j:!1}}else t.removeAttribute(A);else P||g.includes(T)&&(c||typeof O!="string")?(t[T]=O,T in l&&(l[T]=gt)):typeof O!="function"&&Te(t,T,O)}}}return d&&Mt(!0),f}function je(t,e,r=[],n=[],i=[],s,o=!1,a=!1){Wf(i,r,n,l=>{var c=void 0,u={},d=t.nodeName==="SELECT",f=!1;if(ch(()=>{var v=e(...l.map(h)),g=ab(t,c,v,s,o,a);f&&d&&"value"in v&&Ea(t,v.value);for(let b of Object.getOwnPropertySymbols(u))v[b]||yt(u[b]);for(let b of Object.getOwnPropertySymbols(v)){var m=v[b];b.description===xf&&(!c||m!==c[b])&&(u[b]&&yt(u[b]),u[b]=Kt(()=>tb(t,()=>m))),g[b]=m}c=g}),d){var p=t;wa(()=>{Ea(p,c.value,!0),Fh(p)})}f=!0})}function Aa(t){return t.__attributes??={[Rh]:t.nodeName.includes("-"),[Lh]:t.namespaceURI===Ky}}var Pc=new Map;function Mc(t){var e=t.getAttribute("is")||t.nodeName,r=Pc.get(e);if(r)return r;Pc.set(e,r=[]);for(var n,i=t,s=Element.prototype;s!==i;){n=Ef(i);for(var o in n)n[o].set&&r.push(o);i=la(i)}return r}let $c=null;function lb(){if($c===null){var t=document.createElement("select");t.innerHTML="<option><span>t</span></option>",$c=t.firstChild?.firstChild?.nodeType===1}return $c}function cb(t,e){var r=xe;lb()||(Mt(!1),t.textContent="",t.append(O_("")));try{e()}finally{r&&(xe?I(t):(Mt(!0),bt(t)))}}function Ca(t,e,r=e){var n=new WeakSet;ya(t,"input",async i=>{var s=i?t.defaultValue:t.value;if(s=Fc(t)?Rc(s):s,r(s),Ze!==null&&n.add(Ze),await xh(),s!==(s=e())){var o=t.selectionStart,a=t.selectionEnd,l=t.value.length;if(t.value=s??"",a!==null){var c=t.value.length;o===a&&a===l&&c>l?(t.selectionStart=c,t.selectionEnd=c):(t.selectionStart=o,t.selectionEnd=Math.min(a,c))}}}),(xe&&t.defaultValue!==t.value||Ge(e)==null&&t.value)&&(r(Fc(t)?Rc(t.value):t.value),Ze!==null&&n.add(Ze)),es(()=>{var i=e();if(t===document.activeElement){var s=ma??Ze;if(n.has(s))return}Fc(t)&&i===Rc(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}const Nc=new Set;function ub(t,e,r,n,i=n){var s=r.getAttribute("type")==="checkbox",o=t;let a=!1;if(e!==null)for(var l of e)o=o[l]??=[];o.push(r),ya(r,"change",()=>{var c=r.__value;s&&(c=Zh(o,c,r.checked)),i(c)},()=>i(s?[]:null)),es(()=>{var c=n();if(xe&&r.defaultChecked!==r.checked){a=!0;return}s?(c=c||[],r.checked=c.includes(r.__value)):r.checked=Xf(r.__value,c)}),_a(()=>{var c=o.indexOf(r);c!==-1&&o.splice(c,1)}),Nc.has(o)||(Nc.add(o),lr(()=>{o.sort((c,u)=>c.compareDocumentPosition(u)===4?-1:1),Nc.delete(o)})),lr(()=>{if(a){var c;if(s)c=Zh(o,c,r.checked);else{var u=o.find(d=>d.checked);c=u?.__value}i(c)}})}function db(t,e,r=e){ya(t,"change",n=>{var i=n?t.defaultChecked:t.checked;r(i)}),(xe&&t.defaultChecked!==t.checked||Ge(e)==null)&&r(t.checked),es(()=>{var n=e();t.checked=!!n})}function Zh(t,e,r){for(var n=new Set,i=0;i<t.length;i+=1)t[i].checked&&n.add(t[i].__value);return r||n.delete(e),Array.from(n)}function Fc(t){var e=t.type;return e==="number"||e==="range"}function Rc(t){return t===""?null:+t}function Vh(t,e){return t===e||t?.[qr]===e}function Uh(t={},e,r,n){return wa(()=>{var i,s;return es(()=>{i=s,s=[],Ge(()=>{t!==r(...s)&&(e(t,...s),i&&Vh(r(...i),t)&&e(null,...i))})}),()=>{lr(()=>{s&&Vh(r(...s),t)&&e(null,...s)})}}),t}function Lc(t=!1){const e=rt,r=e.l.u;if(!r)return;let n=()=>L_(e.s);if(t){let i=0,s={};const o=js(()=>{let a=!1;const l=e.s;for(const c in l)l[c]!==s[c]&&(s[c]=l[c],a=!0);return a&&i++,i});n=()=>h(o)}r.b.length&&bc(()=>{Bh(e,n),rc(r.b)}),_e(()=>{const i=Ge(()=>r.m.map(Jy));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&_e(()=>{Bh(e,n),rc(r.a)})}function Bh(t,e){if(t.l.s)for(const r of t.l.s)h(r);e()}let Oa=!1;function fb(t){var e=Oa;try{return Oa=!1,[t(),Oa]}finally{Oa=e}}const hb={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Je(t,e,r){return new Proxy({props:t,exclude:e},hb)}const pb={get(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(zs(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n)return n[e]}},set(t,e,r){let n=t.props.length;for(;n--;){let i=t.props[n];zs(i)&&(i=i());const s=hn(i,e);if(s&&s.set)return s.set(r),!0}return!1},getOwnPropertyDescriptor(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(zs(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const i=hn(n,e);return i&&!i.configurable&&(i.configurable=!0),i}}},has(t,e){if(e===qr||e===ac)return!1;for(let r of t.props)if(zs(r)&&(r=r()),r!=null&&e in r)return!0;return!1},ownKeys(t){const e=[];for(let r of t.props)if(zs(r)&&(r=r()),!!r){for(const n in r)e.includes(n)||e.push(n);for(const n of Object.getOwnPropertySymbols(r))e.includes(n)||e.push(n)}return e}};function Qn(...t){return new Proxy({props:t},pb)}function _(t,e,r,n){var i=!Yi||(r&Uy)!==0,s=(r&jy)!==0,o=(r&qy)!==0,a=n,l=!0,c=()=>(l&&(l=!1,a=o?Ge(n):n),a),u;if(s){var d=qr in t||ac in t;u=hn(t,e)?.set??(d&&e in t?D=>t[e]=D:void 0)}var f,p=!1;s?[f,p]=fb(()=>t[e]):f=t[e],f===void 0&&n!==void 0&&(f=c(),u&&(i&&s_(),u(f)));var v;if(i?v=()=>{var D=t[e];return D===void 0?c():(l=!0,D)}:v=()=>{var D=t[e];return D!==void 0&&(a=void 0),D===void 0?a:D},i&&(r&By)===0)return v;if(u){var g=t.$$legacy;return(function(D,T){return arguments.length>0?((!i||!T||g||p)&&u(T?v():D),D):v()})}var m=!1,b=((r&Vy)!==0?js:pc)(()=>(m=!1,v()));s&&h(b);var k=$e;return(function(D,T){if(arguments.length>0){const P=T?h(b):i&&s?Be(D):D;return M(b,P),m=!0,a!==void 0&&(a=P),D}return Yn&&m||(k.f&gn)!==0?b.v:h(b)})}function mb(t){return new gb(t)}class gb{#e;#t;constructor(e){var r=new Map,n=(s,o)=>{var a=Yf(o,!1,!1);return r.set(s,a),a};const i=new Proxy({...e.props||{},$$events:{}},{get(s,o){return h(r.get(o)??n(o,Reflect.get(s,o)))},has(s,o){return o===ac?!0:(h(r.get(o)??n(o,Reflect.get(s,o))),Reflect.has(s,o))},set(s,o,a){return M(r.get(o)??n(o,a),a),Reflect.set(s,o,a)}});this.#t=(e.hydrate?W_:Dh)(e.component,{target:e.target,anchor:e.anchor,props:i,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&y(),this.#e=i.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||aa(this,s,{get(){return this.#t[s]},set(o){this.#t[s]=o},enumerable:!0});this.#t.$set=s=>{Object.assign(i,s)},this.#t.$destroy=()=>{H_(this.#t)}}$set(e){this.#t.$set(e)}$on(e,r){this.#e[e]=this.#e[e]||[];const n=(...i)=>r.call(this,...i);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(i=>i!==n)}}$destroy(){this.#t.$destroy()}}let jh;typeof HTMLElement=="function"&&(jh=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(t,e,r){super(),this.$$ctor=t,this.$$s=e,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),w(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=vb(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Da(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=mb({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=ba(()=>{es(()=>{this.$$r=!0;for(const n of oa(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Da(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Da(t,r,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return oa(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Da(t,e,r,n){const i=r[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function vb(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function ne(t,e,r,n,i,s){let o=class extends jh{constructor(){super(t,r,i),this.$$p_d=e}static get observedAttributes(){return oa(e).map(a=>(e[a].attribute||a).toLowerCase())}};return oa(e).forEach(a=>{aa(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=Da(a,l,e),this.$$d[a]=l;var c=this.$$c;if(c){var u=hn(c,a)?.get;u?c[a]=l:c.$set({[a]:l})}}})}),n.forEach(a=>{aa(o.prototype,a,{get(){return this.$$c?.[a]}})}),t.element=o,o}const qh={account:()=>"/#/user/account",annualTickets:()=>"/#/tickets/annual",checkoutFailure:t=>`/#/checkout/failure?payment_error=${t}`,checkoutSuccess:t=>`/#/checkout/success?ORDERID=${t}`,checkoutForm:()=>"/#/checkout",coupons:()=>"/#/coupons",combiTickets:()=>"/#/tickets/combi",combiTicketGroup:t=>"/#/tickets/combi?group="+t,dayTickets:()=>"/#/tickets/day",eventGroup:bb,event:t=>"/#/product/event/"+t,events:()=>"/#/products/events",exhibition:t=>"/#/exhibition/"+t,exhibitions:()=>"/#/exhibitions",home:()=>"/#/start",login:()=>"/#/login",merchandise:t=>"/#/merchandise/detail/"+t,merchandises:()=>"/#/merchandise/list",museum:t=>"/#/museum/"+t,museums:()=>"/#/museums",publicTours:()=>"/#/products/public-tours",register:()=>"/#/registration",tickets:()=>"/#/tickets/filters",ticketGroup:t=>"/#/tickets/filters?group="+t,tour:t=>"/#/product/tour/"+t,tours:()=>"/#/products/tours",toursGroup:wb,cart:()=>"/#/cart",annualTicketPersonalizationForm:(t,e)=>`/#/tickets/annual/personalisation/${t}/${e}`,annualTicketPersonalizationList:t=>`/#/tickets/annual/personalisation/${t}`,annualTicketPersonalizationFormSubmit:t=>`/#/tickets/annual/personalisation/${t}`},yb={...qh,checkoutSuccess:t=>`/checkout/success/?token=${t}`,checkoutFailure:t=>`/checkout/failure?error=${t}`};function _b(t){return t==="angular"?qh:yb}function bb(t){return`/#/products/events?category_id=${(S.settings?.multipleEventsMenuItems.event_groups[t]||[]).join("&category_id=")}`}function wb(t){return`/#/products/tours?category_id=${(S.settings?.multipleToursMenuItems.tour_groups[t]||[]).join("&category_id=")}`}function kb(t){return new Promise(e=>setTimeout(e,t))}function Wh(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}function Sb(t){return typeof t=="boolean"}function zc(t,e=1e3){return new Promise((r,n)=>{const i=Date.now(),s=20,o=()=>{try{const a=t();if(a){r(a);return}if(Date.now()-i>=e){n(new Error("Timeout reached without truthy value"));return}setTimeout(o,s)}catch(a){n(a)}};o()})}const Zc=Array.isArray,Hh=t=>!!t&&t.constructor===Object,xb=t=>typeof t=="string"||t instanceof String,Eb=t=>{try{return Number(t)===t}catch{return!1}},Tb=(t,e)=>t.reduce((r,n)=>{const i=e(n);return r[i]||(r[i]=[]),r[i].push(n),r},{}),Kh=(t,e)=>!t||(t.length??0)===0?null:t.reduce(e);function Ti(t,e){return(t||[]).reduce((r,n)=>r+(e?e(n):n),0)}const Ab=(t,e,r=!1)=>{if(!t)return[];const n=(s,o)=>e(s)-e(o),i=(s,o)=>e(o)-e(s);return t.slice().sort(r===!0?i:n)};function Cb(t,e){const r=e??(n=>n);return Kh(t,(n,i)=>r(n)>r(i)?n:i)}function Vc(t,e){const r=e??(n=>n);return Kh(t,(n,i)=>r(n)<r(i)?n:i)}const Ob=(t,e)=>{const r=t.reduce((n,i)=>{const s=i;return n[s]||(n[s]=i),n},{});return Object.values(r)},Gh=(t,e,r)=>{let n=r;for(let i=1;i<=t;i++)n=e(n,i);return n},Db=(t,e)=>t?!e||e.length===0?t:e.reduce((r,n)=>(delete r[n],r),{...t}):{},dr=(t,e)=>!t||!e?t??e??{}:Object.entries({...t,...e}).reduce((r,[n,i])=>({...r,[n]:Hh(t[n])?dr(t[n],i):i}),{});class Yh{#e={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.#e.uid!==""}isLoggedIn(){return!!(this.#e.uid&&Wh(this.#e.uid))}isGuest(){return!!(this.#e.uid&&!Wh(this.#e.uid))}signOut(){this.#e.uid="",this.#e.client="",this.#e.accessToken="",this.#e.expiry=0,this.save()}signIn(e){this.#e.uid=e.uid,this.#e.client=e.client,this.#e.accessToken=e.accessToken,this.#e.expiry=e.expiry,this.save()}get data(){return this.#e.expiry<Math.floor(Date.now()/1e3)&&this.signOut(),this.#e}toString(){return JSON.stringify(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 r=JSON.parse(e);if(!(Hh(r)&&"uid"in r&&"client"in r&&"accessToken"in r&&"expiry"in r))throw new Error(`(Auth.loadFromString) invalid auth json ${e}`);this.signIn(r)}}class Ib{constructor(e){this.auth=e}onRequest({request:e}){const{uid:r,client:n,accessToken:i,expiry:s}=this.auth.data,o=e.headers;r&&!o.has("uid")&&o.set("uid",r),n&&!o.has("client")&&o.set("client",n),i&&!o.has("access-token")&&o.set("access-token",i),s&&!o.has("expiry")&&o.set("expiry",String(s)),i&&!o.has("token-type")&&o.set("token-type","Bearer")}onResponse({response:e}){const r=e.headers.get("access-token"),n=e.headers.get("client"),i=e.headers.get("uid"),s=parseInt(e.headers.get("expiry")||"");return r&&n&&i&&s&&this.auth.signIn({uid:i,client:n,accessToken:r,expiry:s}),e}}var Ne;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{const s={};for(const o of i)s[o]=o;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(const a of s)o[a]=i[a];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},t.find=(i,s)=>{for(const o of i)if(s(o))return o},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Ne||(Ne={}));var Uc;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Uc||(Uc={}));const he=Ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xn=t=>{switch(typeof t){case"undefined":return he.undefined;case"string":return he.string;case"number":return isNaN(t)?he.nan:he.number;case"boolean":return he.boolean;case"function":return he.function;case"bigint":return he.bigint;case"symbol":return he.symbol;case"object":return Array.isArray(t)?he.array:t===null?he.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?he.promise:typeof Map<"u"&&t instanceof Map?he.map:typeof Set<"u"&&t instanceof Set?he.set:typeof Date<"u"&&t instanceof Date?he.date:he.object;default:return he.unknown}},ie=Ne.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Pb=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class fr extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const r=e||function(s){return s.message},n={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(r(o))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return i(this),n}static assert(e){if(!(e instanceof fr))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ne.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}fr.create=t=>new fr(t);const rs=(t,e)=>{let r;switch(t.code){case ie.invalid_type:t.received===he.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case ie.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Ne.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ne.joinValues(t.keys,", ")}`;break;case ie.invalid_union:r="Invalid input";break;case ie.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ne.joinValues(t.options)}`;break;case ie.invalid_enum_value:r=`Invalid enum value. Expected ${Ne.joinValues(t.options)}, received '${t.received}'`;break;case ie.invalid_arguments:r="Invalid function arguments";break;case ie.invalid_return_type:r="Invalid function return type";break;case ie.invalid_date:r="Invalid date";break;case ie.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Ne.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case ie.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case ie.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case ie.custom:r="Invalid input";break;case ie.invalid_intersection_types:r="Intersection results could not be merged";break;case ie.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case ie.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ne.assertNever(t)}return{message:r}};let Jh=rs;function Mb(t){Jh=t}function Ia(){return Jh}const Pa=t=>{const{data:e,path:r,errorMaps:n,issueData:i}=t,s=[...r,...i.path||[]],o={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let a="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)a=c(o,{data:e,defaultError:a}).message;return{...i,path:s,message:a}},$b=[];function fe(t,e){const r=Ia(),n=Pa({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===rs?void 0:rs].filter(i=>!!i)});t.common.issues.push(n)}class Ct{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const i of r){if(i.status==="aborted")return Ee;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const i of r){const s=await i.key,o=await i.value;n.push({key:s,value:o})}return Ct.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const i of r){const{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return Ee;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[s.value]=o.value)}return{status:e.value,value:n}}}const Ee=Object.freeze({status:"aborted"}),ns=t=>({status:"dirty",value:t}),Nt=t=>({status:"valid",value:t}),Bc=t=>t.status==="aborted",jc=t=>t.status==="dirty",eo=t=>t.status==="valid",to=t=>typeof Promise<"u"&&t instanceof Promise;function Ma(t,e,r,n){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Qh(t,e,r,n,i){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,r),r}typeof SuppressedError=="function"&&SuppressedError;var ve;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(ve||(ve={}));var ro,no;class Jr{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Xh=(t,e)=>{if(eo(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new fr(t.common.issues);return this._error=r,this._error}}};function Ce(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,a)=>{var l,c;const{message:u}=t;return o.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??n)!==null&&l!==void 0?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??r)!==null&&c!==void 0?c:a.defaultError}},description:i}}let De=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Xn(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Xn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ct,ctx:{common:e.parent.common,data:e.data,parsedType:Xn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(to(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;const i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xn(e)},s=this._parseSync({data:e,path:i.path,parent:i});return Xh(i,s)}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xn(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(to(i)?i:Promise.resolve(i));return Xh(n,s)}refine(e,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{const o=e(i),a=()=>s.addIssue({code:ie.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Mr({schema:this,typeName:Se.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Xr.create(this,this._def)}nullable(){return ni.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Oi.create(this,this._def)}promise(){return ls.create(this,this._def)}or(e){return ao.create([this,e],this._def)}and(e){return lo.create(this,e,this._def)}transform(e){return new Mr({...Ce(this._def),schema:this,typeName:Se.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new po({...Ce(this._def),innerType:this,defaultValue:r,typeName:Se.ZodDefault})}brand(){return new Hc({typeName:Se.ZodBranded,type:this,...Ce(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new mo({...Ce(this._def),innerType:this,catchValue:r,typeName:Se.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return go.create(this,e)}readonly(){return vo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const Nb=/^c[^\s-]{8,}$/i,Fb=/^[0-9a-z]+$/,Rb=/^[0-9A-HJKMNP-TV-Z]{26}$/,Lb=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,zb=/^[a-z0-9_-]{21}$/i,Zb=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Vb=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ub="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let qc;const Bb=/^(?:(?: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])$/,jb=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,qb=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ep="((\\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])))",Wb=new RegExp(`^${ep}$`);function tp(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Hb(t){return new RegExp(`^${tp(t)}$`)}function rp(t){let e=`${ep}T${tp(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Kb(t,e){return!!((e==="v4"||!e)&&Bb.test(t)||(e==="v6"||!e)&&jb.test(t))}let is=class ra extends De{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==he.string){const s=this._getOrReturnCtx(e);return fe(s,{code:ie.invalid_type,expected:he.string,received:s.parsedType}),Ee}const n=new Ct;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const o=e.data.length>s.value,a=e.data.length<s.value;(o||a)&&(i=this._getOrReturnCtx(e,i),o?fe(i,{code:ie.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&fe(i,{code:ie.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")Vb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"email",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")qc||(qc=new RegExp(Ub,"u")),qc.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"emoji",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")Lb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"uuid",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")zb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"nanoid",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")Nb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"cuid",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")Fb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"cuid2",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")Rb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"ulid",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),fe(i,{validation:"url",code:ie.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"regex",code:ie.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?rp(s).test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?Wb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?Hb(s).test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?Zb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"duration",code:ie.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?Kb(e.data,s.version)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"ip",code:ie.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?qb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"base64",code:ie.invalid_string,message:s.message}),n.dirty()):Ne.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:ie.invalid_string,...ve.errToObj(n)})}_addCheck(e){return new ra({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ve.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ve.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ve.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ve.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ve.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ve.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ve.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ve.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ve.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ve.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...ve.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...ve.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...ve.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...ve.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...ve.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...ve.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...ve.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...ve.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...ve.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...ve.errToObj(r)})}nonempty(e){return this.min(1,ve.errToObj(e))}trim(){return new ra({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ra({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ra({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};is.create=t=>{var e;return new is({checks:[],typeName:Se.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...Ce(t)})};function Gb(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,s=parseInt(t.toFixed(i).replace(".","")),o=parseInt(e.toFixed(i).replace(".",""));return s%o/Math.pow(10,i)}class ei extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==he.number){const s=this._getOrReturnCtx(e);return fe(s,{code:ie.invalid_type,expected:he.number,received:s.parsedType}),Ee}let n;const i=new Ct;for(const s of this._def.checks)s.kind==="int"?Ne.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?Gb(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.not_finite,message:s.message}),i.dirty()):Ne.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ve.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ve.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ve.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ve.toString(r))}setLimit(e,r,n,i){return new ei({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ve.toString(i)}]})}_addCheck(e){return new ei({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ve.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ve.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ve.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ve.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ve.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ve.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ve.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ve.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ve.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ne.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}ei.create=t=>new ei({checks:[],typeName:Se.ZodNumber,coerce:t?.coerce||!1,...Ce(t)});class ti extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==he.bigint){const s=this._getOrReturnCtx(e);return fe(s,{code:ie.invalid_type,expected:he.bigint,received:s.parsedType}),Ee}let n;const i=new Ct;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Ne.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ve.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ve.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ve.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ve.toString(r))}setLimit(e,r,n,i){return new ti({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ve.toString(i)}]})}_addCheck(e){return new ti({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ve.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ve.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ve.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ve.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ve.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}ti.create=t=>{var e;return new ti({checks:[],typeName:Se.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...Ce(t)})};class io extends De{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==he.boolean){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.boolean,received:n.parsedType}),Ee}return Nt(e.data)}}io.create=t=>new io({typeName:Se.ZodBoolean,coerce:t?.coerce||!1,...Ce(t)});class Ai extends De{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==he.date){const s=this._getOrReturnCtx(e);return fe(s,{code:ie.invalid_type,expected:he.date,received:s.parsedType}),Ee}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return fe(s,{code:ie.invalid_date}),Ee}const n=new Ct;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Ne.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ai({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:ve.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ve.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}Ai.create=t=>new Ai({checks:[],coerce:t?.coerce||!1,typeName:Se.ZodDate,...Ce(t)});class $a extends De{_parse(e){if(this._getType(e)!==he.symbol){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.symbol,received:n.parsedType}),Ee}return Nt(e.data)}}$a.create=t=>new $a({typeName:Se.ZodSymbol,...Ce(t)});class so extends De{_parse(e){if(this._getType(e)!==he.undefined){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.undefined,received:n.parsedType}),Ee}return Nt(e.data)}}so.create=t=>new so({typeName:Se.ZodUndefined,...Ce(t)});class oo extends De{_parse(e){if(this._getType(e)!==he.null){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.null,received:n.parsedType}),Ee}return Nt(e.data)}}oo.create=t=>new oo({typeName:Se.ZodNull,...Ce(t)});class ss extends De{constructor(){super(...arguments),this._any=!0}_parse(e){return Nt(e.data)}}ss.create=t=>new ss({typeName:Se.ZodAny,...Ce(t)});class Ci extends De{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Nt(e.data)}}Ci.create=t=>new Ci({typeName:Se.ZodUnknown,...Ce(t)});class xn extends De{_parse(e){const r=this._getOrReturnCtx(e);return fe(r,{code:ie.invalid_type,expected:he.never,received:r.parsedType}),Ee}}xn.create=t=>new xn({typeName:Se.ZodNever,...Ce(t)});class Na extends De{_parse(e){if(this._getType(e)!==he.undefined){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.void,received:n.parsedType}),Ee}return Nt(e.data)}}Na.create=t=>new Na({typeName:Se.ZodVoid,...Ce(t)});let Oi=class Xl extends De{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==he.array)return fe(r,{code:ie.invalid_type,expected:he.array,received:r.parsedType}),Ee;if(i.exactLength!==null){const o=r.data.length>i.exactLength.value,a=r.data.length<i.exactLength.value;(o||a)&&(fe(r,{code:o?ie.too_big:ie.too_small,minimum:a?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(fe(r,{code:ie.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(fe(r,{code:ie.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>i.type._parseAsync(new Jr(r,o,r.path,a)))).then(o=>Ct.mergeArray(n,o));const s=[...r.data].map((o,a)=>i.type._parseSync(new Jr(r,o,r.path,a)));return Ct.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new Xl({...this._def,minLength:{value:e,message:ve.toString(r)}})}max(e,r){return new Xl({...this._def,maxLength:{value:e,message:ve.toString(r)}})}length(e,r){return new Xl({...this._def,exactLength:{value:e,message:ve.toString(r)}})}nonempty(e){return this.min(1,e)}};Oi.create=(t,e)=>new Oi({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Se.ZodArray,...Ce(e)});function os(t){if(t instanceof ot){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Xr.create(os(n))}return new ot({...t._def,shape:()=>e})}else return t instanceof Oi?new Oi({...t._def,type:os(t.element)}):t instanceof Xr?Xr.create(os(t.unwrap())):t instanceof ni?ni.create(os(t.unwrap())):t instanceof Qr?Qr.create(t.items.map(e=>os(e))):t}class ot extends De{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=Ne.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==he.object){const c=this._getOrReturnCtx(e);return fe(c,{code:ie.invalid_type,expected:he.object,received:c.parsedType}),Ee}const{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof xn&&this._def.unknownKeys==="strip"))for(const c in i.data)o.includes(c)||a.push(c);const l=[];for(const c of o){const u=s[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Jr(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof xn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")a.length>0&&(fe(i,{code:ie.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Jr(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>Ct.mergeObjectSync(n,c)):Ct.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return ve.errToObj,new ot({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,s,o,a;const l=(o=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=ve.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ot({...this._def,unknownKeys:"strip"})}passthrough(){return new ot({...this._def,unknownKeys:"passthrough"})}extend(e){return new ot({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ot({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Se.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new ot({...this._def,catchall:e})}pick(e){const r={};return Ne.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new ot({...this._def,shape:()=>r})}omit(e){const r={};return Ne.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new ot({...this._def,shape:()=>r})}deepPartial(){return os(this)}partial(e){const r={};return Ne.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new ot({...this._def,shape:()=>r})}required(e){const r={};return Ne.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Xr;)s=s._def.innerType;r[n]=s}}),new ot({...this._def,shape:()=>r})}keyof(){return np(Ne.objectKeys(this.shape))}}ot.create=(t,e)=>new ot({shape:()=>t,unknownKeys:"strip",catchall:xn.create(),typeName:Se.ZodObject,...Ce(e)}),ot.strictCreate=(t,e)=>new ot({shape:()=>t,unknownKeys:"strict",catchall:xn.create(),typeName:Se.ZodObject,...Ce(e)}),ot.lazycreate=(t,e)=>new ot({shape:t,unknownKeys:"strip",catchall:xn.create(),typeName:Se.ZodObject,...Ce(e)});let ao=class extends De{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function i(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(a=>new fr(a.ctx.common.issues));return fe(r,{code:ie.invalid_union,unionErrors:o}),Ee}if(r.common.async)return Promise.all(n.map(async s=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let s;const o=[];for(const l of n){const c={...r,common:{...r.common,issues:[]},parent:null},u=l._parseSync({data:r.data,path:r.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(l=>new fr(l));return fe(r,{code:ie.invalid_union,unionErrors:a}),Ee}}get options(){return this._def.options}};ao.create=(t,e)=>new ao({options:t,typeName:Se.ZodUnion,...Ce(e)});const En=t=>t instanceof uo?En(t.schema):t instanceof Mr?En(t.innerType()):t instanceof fo?[t.value]:t instanceof ri?t.options:t instanceof ho?Ne.objectValues(t.enum):t instanceof po?En(t._def.innerType):t instanceof so?[void 0]:t instanceof oo?[null]:t instanceof Xr?[void 0,...En(t.unwrap())]:t instanceof ni?[null,...En(t.unwrap())]:t instanceof Hc||t instanceof vo?En(t.unwrap()):t instanceof mo?En(t._def.innerType):[];class Fa extends De{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==he.object)return fe(r,{code:ie.invalid_type,expected:he.object,received:r.parsedType}),Ee;const n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(fe(r,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ee)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const i=new Map;for(const s of r){const o=En(s.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of o){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,s)}}return new Fa({typeName:Se.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Ce(n)})}}function Wc(t,e){const r=Xn(t),n=Xn(e);if(t===e)return{valid:!0,data:t};if(r===he.object&&n===he.object){const i=Ne.objectKeys(e),s=Ne.objectKeys(t).filter(a=>i.indexOf(a)!==-1),o={...t,...e};for(const a of s){const l=Wc(t[a],e[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(r===he.array&&n===he.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const o=t[s],a=e[s],l=Wc(o,a);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return r===he.date&&n===he.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}let lo=class extends De{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),i=(s,o)=>{if(Bc(s)||Bc(o))return Ee;const a=Wc(s.value,o.value);return a.valid?((jc(s)||jc(o))&&r.dirty(),{status:r.value,value:a.data}):(fe(n,{code:ie.invalid_intersection_types}),Ee)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};lo.create=(t,e,r)=>new lo({left:t,right:e,typeName:Se.ZodIntersection,...Ce(r)});class Qr extends De{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==he.array)return fe(n,{code:ie.invalid_type,expected:he.array,received:n.parsedType}),Ee;if(n.data.length<this._def.items.length)return fe(n,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ee;!this._def.rest&&n.data.length>this._def.items.length&&(fe(n,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...n.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Jr(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(s).then(o=>Ct.mergeArray(r,o)):Ct.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new Qr({...this._def,rest:e})}}Qr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qr({items:t,typeName:Se.ZodTuple,rest:null,...Ce(e)})};class co extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==he.object)return fe(n,{code:ie.invalid_type,expected:he.object,received:n.parsedType}),Ee;const i=[],s=this._def.keyType,o=this._def.valueType;for(const a in n.data)i.push({key:s._parse(new Jr(n,a,n.path,a)),value:o._parse(new Jr(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Ct.mergeObjectAsync(r,i):Ct.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof De?new co({keyType:e,valueType:r,typeName:Se.ZodRecord,...Ce(n)}):new co({keyType:is.create(),valueType:e,typeName:Se.ZodRecord,...Ce(r)})}}class Ra extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==he.map)return fe(n,{code:ie.invalid_type,expected:he.map,received:n.parsedType}),Ee;const i=this._def.keyType,s=this._def.valueType,o=[...n.data.entries()].map(([a,l],c)=>({key:i._parse(new Jr(n,a,n.path,[c,"key"])),value:s._parse(new Jr(n,l,n.path,[c,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Ee;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(c.value,u.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Ee;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(c.value,u.value)}return{status:r.value,value:a}}}}Ra.create=(t,e,r)=>new Ra({valueType:e,keyType:t,typeName:Se.ZodMap,...Ce(r)});class Di extends De{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==he.set)return fe(n,{code:ie.invalid_type,expected:he.set,received:n.parsedType}),Ee;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(fe(n,{code:ie.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(fe(n,{code:ie.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const s=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Ee;u.status==="dirty"&&r.dirty(),c.add(u.value)}return{status:r.value,value:c}}const a=[...n.data.values()].map((l,c)=>s._parse(new Jr(n,l,n.path,c)));return n.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(e,r){return new Di({...this._def,minSize:{value:e,message:ve.toString(r)}})}max(e,r){return new Di({...this._def,maxSize:{value:e,message:ve.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Di.create=(t,e)=>new Di({valueType:t,minSize:null,maxSize:null,typeName:Se.ZodSet,...Ce(e)});class as extends De{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==he.function)return fe(r,{code:ie.invalid_type,expected:he.function,received:r.parsedType}),Ee;function n(a,l){return Pa({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ia(),rs].filter(c=>!!c),issueData:{code:ie.invalid_arguments,argumentsError:l}})}function i(a,l){return Pa({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ia(),rs].filter(c=>!!c),issueData:{code:ie.invalid_return_type,returnTypeError:l}})}const s={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof ls){const a=this;return Nt(async function(...l){const c=new fr([]),u=await a._def.args.parseAsync(l,s).catch(p=>{throw c.addIssue(n(l,p)),c}),d=await Reflect.apply(o,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(p=>{throw c.addIssue(i(d,p)),c})})}else{const a=this;return Nt(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new fr([n(l,c.error)]);const u=Reflect.apply(o,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new fr([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new as({...this._def,args:Qr.create(e).rest(Ci.create())})}returns(e){return new as({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new as({args:e||Qr.create([]).rest(Ci.create()),returns:r||Ci.create(),typeName:Se.ZodFunction,...Ce(n)})}}class uo extends De{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}uo.create=(t,e)=>new uo({getter:t,typeName:Se.ZodLazy,...Ce(e)});class fo extends De{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return fe(r,{received:r.data,code:ie.invalid_literal,expected:this._def.value}),Ee}return{status:"valid",value:e.data}}get value(){return this._def.value}}fo.create=(t,e)=>new fo({value:t,typeName:Se.ZodLiteral,...Ce(e)});function np(t,e){return new ri({values:t,typeName:Se.ZodEnum,...Ce(e)})}class ri extends De{constructor(){super(...arguments),ro.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return fe(r,{expected:Ne.joinValues(n),received:r.parsedType,code:ie.invalid_type}),Ee}if(Ma(this,ro)||Qh(this,ro,new Set(this._def.values)),!Ma(this,ro).has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return fe(r,{received:r.data,code:ie.invalid_enum_value,options:n}),Ee}return Nt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return ri.create(e,{...this._def,...r})}exclude(e,r=this._def){return ri.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}ro=new WeakMap,ri.create=np;class ho extends De{constructor(){super(...arguments),no.set(this,void 0)}_parse(e){const r=Ne.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==he.string&&n.parsedType!==he.number){const i=Ne.objectValues(r);return fe(n,{expected:Ne.joinValues(i),received:n.parsedType,code:ie.invalid_type}),Ee}if(Ma(this,no)||Qh(this,no,new Set(Ne.getValidEnumValues(this._def.values))),!Ma(this,no).has(e.data)){const i=Ne.objectValues(r);return fe(n,{received:n.data,code:ie.invalid_enum_value,options:i}),Ee}return Nt(e.data)}get enum(){return this._def.values}}no=new WeakMap,ho.create=(t,e)=>new ho({values:t,typeName:Se.ZodNativeEnum,...Ce(e)});class ls extends De{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==he.promise&&r.common.async===!1)return fe(r,{code:ie.invalid_type,expected:he.promise,received:r.parsedType}),Ee;const n=r.parsedType===he.promise?r.data:Promise.resolve(r.data);return Nt(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ls.create=(t,e)=>new ls({type:t,typeName:Se.ZodPromise,...Ce(e)});class Mr extends De{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Se.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:o=>{fe(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const o=i.transform(n.data,s);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return Ee;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?Ee:l.status==="dirty"||r.value==="dirty"?ns(l.value):l});{if(r.value==="aborted")return Ee;const a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?Ee:a.status==="dirty"||r.value==="dirty"?ns(a.value):a}}if(i.type==="refinement"){const o=a=>{const l=i.refinement(a,s);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Ee:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Ee:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!eo(o))return o;const a=i.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>eo(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:r.value,value:a})):o);Ne.assertNever(i)}}Mr.create=(t,e,r)=>new Mr({schema:t,typeName:Se.ZodEffects,effect:e,...Ce(r)}),Mr.createWithPreprocess=(t,e,r)=>new Mr({schema:e,effect:{type:"preprocess",transform:t},typeName:Se.ZodEffects,...Ce(r)});let Xr=class extends De{_parse(e){return this._getType(e)===he.undefined?Nt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Xr.create=(t,e)=>new Xr({innerType:t,typeName:Se.ZodOptional,...Ce(e)});let ni=class extends De{_parse(e){return this._getType(e)===he.null?Nt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ni.create=(t,e)=>new ni({innerType:t,typeName:Se.ZodNullable,...Ce(e)});let po=class extends De{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===he.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};po.create=(t,e)=>new po({innerType:t,typeName:Se.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ce(e)});let mo=class extends De{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return to(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new fr(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new fr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};mo.create=(t,e)=>new mo({innerType:t,typeName:Se.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ce(e)});class La extends De{_parse(e){if(this._getType(e)!==he.nan){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.nan,received:n.parsedType}),Ee}return{status:"valid",value:e.data}}}La.create=t=>new La({typeName:Se.ZodNaN,...Ce(t)});const Yb=Symbol("zod_brand");class Hc extends De{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class go extends De{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Ee:s.status==="dirty"?(r.dirty(),ns(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Ee:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new go({in:e,out:r,typeName:Se.ZodPipeline})}}let vo=class extends De{_parse(e){const r=this._def.innerType._parse(e),n=i=>(eo(i)&&(i.value=Object.freeze(i.value)),i);return to(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};vo.create=(t,e)=>new vo({innerType:t,typeName:Se.ZodReadonly,...Ce(e)});function ip(t,e={},r){return t?ss.create().superRefine((n,i)=>{var s,o;if(!t(n)){const a=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,l=(o=(s=a.fatal)!==null&&s!==void 0?s:r)!==null&&o!==void 0?o:!0,c=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...c,fatal:l})}}):ss.create()}const Jb={object:ot.lazycreate};var Se;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Se||(Se={}));const Qb=(t,e={message:`Input not instance of ${t.name}`})=>ip(r=>r instanceof t,e),sp=is.create,op=ei.create,Xb=La.create,ew=ti.create,ap=io.create,tw=Ai.create,rw=$a.create,nw=so.create,iw=oo.create,sw=ss.create,ow=Ci.create,aw=xn.create,lw=Na.create,cw=Oi.create,uw=ot.create,dw=ot.strictCreate,fw=ao.create,hw=Fa.create,pw=lo.create,mw=Qr.create,gw=co.create,vw=Ra.create,yw=Di.create,_w=as.create,bw=uo.create,ww=fo.create,kw=ri.create,Sw=ho.create,xw=ls.create,lp=Mr.create,Ew=Xr.create,Tw=ni.create,Aw=Mr.createWithPreprocess,Cw=go.create;var St=Object.freeze({__proto__:null,defaultErrorMap:rs,setErrorMap:Mb,getErrorMap:Ia,makeIssue:Pa,EMPTY_PATH:$b,addIssueToContext:fe,ParseStatus:Ct,INVALID:Ee,DIRTY:ns,OK:Nt,isAborted:Bc,isDirty:jc,isValid:eo,isAsync:to,get util(){return Ne},get objectUtil(){return Uc},ZodParsedType:he,getParsedType:Xn,ZodType:De,datetimeRegex:rp,ZodString:is,ZodNumber:ei,ZodBigInt:ti,ZodBoolean:io,ZodDate:Ai,ZodSymbol:$a,ZodUndefined:so,ZodNull:oo,ZodAny:ss,ZodUnknown:Ci,ZodNever:xn,ZodVoid:Na,ZodArray:Oi,ZodObject:ot,ZodUnion:ao,ZodDiscriminatedUnion:Fa,ZodIntersection:lo,ZodTuple:Qr,ZodRecord:co,ZodMap:Ra,ZodSet:Di,ZodFunction:as,ZodLazy:uo,ZodLiteral:fo,ZodEnum:ri,ZodNativeEnum:ho,ZodPromise:ls,ZodEffects:Mr,ZodTransformer:Mr,ZodOptional:Xr,ZodNullable:ni,ZodDefault:po,ZodCatch:mo,ZodNaN:La,BRAND:Yb,ZodBranded:Hc,ZodPipeline:go,ZodReadonly:vo,custom:ip,Schema:De,ZodSchema:De,late:Jb,get ZodFirstPartyTypeKind(){return Se},coerce:{string:(t=>is.create({...t,coerce:!0})),number:(t=>ei.create({...t,coerce:!0})),boolean:(t=>io.create({...t,coerce:!0})),bigint:(t=>ti.create({...t,coerce:!0})),date:(t=>Ai.create({...t,coerce:!0}))},any:sw,array:cw,bigint:ew,boolean:ap,date:tw,discriminatedUnion:hw,effect:lp,enum:kw,function:_w,instanceof:Qb,intersection:pw,lazy:bw,literal:ww,map:vw,nan:Xb,nativeEnum:Sw,never:aw,null:iw,nullable:Tw,number:op,object:uw,oboolean:()=>ap().optional(),onumber:()=>op().optional(),optional:Ew,ostring:()=>sp().optional(),pipeline:Cw,preprocess:Aw,promise:xw,record:gw,set:yw,strictObject:dw,string:sp,symbol:rw,transformer:lp,tuple:mw,undefined:nw,union:fw,unknown:ow,void:lw,NEVER:Ee,ZodIssueCode:ie,quotelessJson:Pb,ZodError:fr});const Ow=St.object({id:St.number(),customer:St.object({customer_salutation_id:St.number().positive({message:"user.fieldErrors.titleRequire"}),name:St.string().min(1,{message:"user.fieldErrors.nameRequire"}),surname:St.string().min(1,{message:"user.fieldErrors.surnameRequire"}),email:St.string().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:St.string().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:St.string().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:St.string().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:St.string().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:St.number().positive().default(60),language_id:St.number().positive({message:"user.fieldErrors.languageRequire"}).default(1)})});St.object({ticket_sale_id:St.number(),start_at:St.string().date(),personalizations:St.array(Ow)});function Kc(t,e){return t-e*Math.floor(t/e)}const cp=1721426;function za(t,e,r,n){e=Gc(t,e);let i=e-1,s=-2;return r<=2?s=0:Za(e)&&(s=-1),cp-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function Za(t){return t%4===0&&(t%100!==0||t%400===0)}function Gc(t,e){return t==="BC"?1-e:e}function Dw(t){let e="AD";return t<=0&&(e="BC",t=1-t),[e,t]}const Iw={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]};class cs{fromJulianDay(e){let r=e,n=r-cp,i=Math.floor(n/146097),s=Kc(n,146097),o=Math.floor(s/36524),a=Kc(s,36524),l=Math.floor(a/1461),c=Kc(a,1461),u=Math.floor(c/365),d=i*400+o*100+l*4+u+(o!==4&&u!==4?1:0),[f,p]=Dw(d),v=r-za(f,p,1,1),g=2;r<za(f,p,3,1)?g=0:Za(p)&&(g=1);let m=Math.floor(((v+g)*12+373)/367),b=r-za(f,p,m,1)+1;return new ai(f,p,m,b)}toJulianDay(e){return za(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return Iw[Za(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return Za(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"}}const Pw={"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 ii(t,e){return e=hr(e,t.calendar),t.era===e.era&&t.year===e.year&&t.month===e.month&&t.day===e.day}function Yc(t,e){return e=hr(e,t.calendar),t=Qc(t),e=Qc(e),t.era===e.era&&t.year===e.year&&t.month===e.month}function Mw(t,e){return t.isEqual?.(e)??e.isEqual?.(t)??t.identifier===e.identifier}function $w(t,e){return ii(t,Ii(e))}function up(t,e,r){let n=t.calendar.toJulianDay(t),i=zw(e),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function Nw(t){return tn(Date.now(),t)}function Ii(t){return Uw(Nw(t))}function dp(t,e){return t.calendar.toJulianDay(t)-e.calendar.toJulianDay(e)}function fp(t,e){return hp(t)-hp(e)}function hp(t){return t.hour*36e5+t.minute*6e4+t.second*1e3+t.millisecond}let Jc=null,Fw=!1;function Xt(){return Jc==null&&(Jc=new Intl.DateTimeFormat().resolvedOptions().timeZone),Jc}function pp(){return Fw}function Qc(t){return t.subtract({days:t.day-1})}function Rw(t){return t.add({days:t.calendar.getDaysInMonth(t)-t.day})}const mp=new Map,Xc=new Map;function Lw(t){if(Intl.Locale){let r=mp.get(t);return r||(r=new Intl.Locale(t).maximize().region,r&&mp.set(t,r)),r}let e=t.split("-")[1];return e==="u"?void 0:e}function zw(t){let e=Xc.get(t);if(!e){if(Intl.Locale){let n=new Intl.Locale(t);if("getWeekInfo"in n&&(e=n.getWeekInfo(),e))return Xc.set(t,e),e.firstDay}let r=Lw(t);if(t.includes("-fw-")){let n=t.split("-fw-")[1].split("-")[0];n==="mon"?e={firstDay:1}:n==="tue"?e={firstDay:2}:n==="wed"?e={firstDay:3}:n==="thu"?e={firstDay:4}:n==="fri"?e={firstDay:5}:n==="sat"?e={firstDay:6}:e={firstDay:0}}else t.includes("-ca-iso8601")?e={firstDay:1}:e={firstDay:r&&Pw[r]||0};Xc.set(t,e)}return e.firstDay}function si(t){t=hr(t,new cs);let e=Gc(t.era,t.year);return gp(e,t.month,t.day,t.hour,t.minute,t.second,t.millisecond)}function gp(t,e,r,n,i,s,o){let a=new Date;return a.setUTCHours(n,i,s,o),a.setUTCFullYear(t,e-1,r),a.getTime()}function yo(t,e){if(e==="UTC")return 0;if(t>0&&e===Xt()&&!pp())return new Date(t).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:o,second:a}=yp(t,e);return gp(r,n,i,s,o,a,0)-Math.floor(t/1e3)*1e3}const vp=new Map;function yp(t,e){let r=vp.get(e);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),vp.set(e,r));let n=r.formatToParts(new Date(t)),i={};for(let s of n)s.type!=="literal"&&(i[s.type]=s.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const Va=864e5;function Zw(t,e){let r=si(t),n=r-yo(r-Va,e),i=r-yo(r+Va,e);return _p(t,e,n,i)}function _p(t,e,r,n){return(r===n?[r]:[r,n]).filter(s=>Vw(t,e,s))}function Vw(t,e,r){let n=yp(r,e);return t.year===n.year&&t.month===n.month&&t.day===n.day&&t.hour===n.hour&&t.minute===n.minute&&t.second===n.second}function en(t,e,r="compatible"){let n=oi(t);if(e==="UTC")return si(n);if(e===Xt()&&r==="compatible"&&!pp()){n=hr(n,new cs);let l=new Date,c=Gc(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=si(n),s=yo(i-Va,e),o=yo(i+Va,e),a=_p(n,e,i-s,i-o);if(a.length===1)return a[0];if(a.length>1)switch(r){case"compatible":case"earlier":return a[0];case"later":return a[a.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(i-s,i-o);case"compatible":case"later":return Math.max(i-s,i-o);case"reject":throw new RangeError("No such absolute time found")}}function bp(t,e,r="compatible"){return new Date(en(t,e,r))}function tn(t,e){let r=yo(t,e),n=new Date(t+r),i=n.getUTCFullYear(),s=n.getUTCMonth()+1,o=n.getUTCDate(),a=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),u=n.getUTCMilliseconds();return new $r(i<1?"BC":"AD",i<1?-i+1:i,s,o,e,r,a,l,c,u)}function Uw(t){return new ai(t.calendar,t.era,t.year,t.month,t.day)}function oi(t,e){let r=0,n=0,i=0,s=0;if("timeZone"in t)({hour:r,minute:n,second:i,millisecond:s}=t);else if("hour"in t&&!e)return t;return e&&({hour:r,minute:n,second:i,millisecond:s}=e),new An(t.calendar,t.era,t.year,t.month,t.day,r,n,i,s)}function Bw(t){return new cu(t.hour,t.minute,t.second,t.millisecond)}function hr(t,e){if(Mw(t.calendar,e))return t;let r=e.fromJulianDay(t.calendar.toJulianDay(t)),n=t.copy();return n.calendar=e,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,Pi(n),n}function jw(t,e,r){if(t instanceof $r)return t.timeZone===e?t:wp(t,e);let n=en(t,e,r);return tn(n,e)}function qw(t){let e=si(t)-t.offset;return new Date(e)}function wp(t,e){let r=si(t)-t.offset;return hr(tn(r,e),t.calendar)}const _o=36e5;function Ua(t,e){let r=t.copy(),n="hour"in r?Ep(r,e):0;eu(r,e.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,t),r.month+=e.months||0,tu(r),kp(r),r.day+=(e.weeks||0)*7,r.day+=e.days||0,r.day+=n,Ww(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 o=r.calendar.isInverseEra?.(r);r.year=i,r.month=o?1:r.calendar.getMonthsInYear(r),r.day=o?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function eu(t,e){t.calendar.isInverseEra?.(t)&&(e=-e),t.year+=e}function tu(t){for(;t.month<1;)eu(t,-1),t.month+=t.calendar.getMonthsInYear(t);let e=0;for(;t.month>(e=t.calendar.getMonthsInYear(t));)t.month-=e,eu(t,1)}function Ww(t){for(;t.day<1;)t.month--,tu(t),t.day+=t.calendar.getDaysInMonth(t);for(;t.day>t.calendar.getDaysInMonth(t);)t.day-=t.calendar.getDaysInMonth(t),t.month++,tu(t)}function kp(t){t.month=Math.max(1,Math.min(t.calendar.getMonthsInYear(t),t.month)),t.day=Math.max(1,Math.min(t.calendar.getDaysInMonth(t),t.day))}function Pi(t){t.calendar.constrainDate&&t.calendar.constrainDate(t),t.year=Math.max(1,Math.min(t.calendar.getYearsInEra(t),t.year)),kp(t)}function ru(t){let e={};for(let r in t)typeof t[r]=="number"&&(e[r]=-t[r]);return e}function Sp(t,e){return Ua(t,ru(e))}function nu(t,e){let r=t.copy();return e.era!=null&&(r.era=e.era),e.year!=null&&(r.year=e.year),e.month!=null&&(r.month=e.month),e.day!=null&&(r.day=e.day),Pi(r),r}function bo(t,e){let r=t.copy();return e.hour!=null&&(r.hour=e.hour),e.minute!=null&&(r.minute=e.minute),e.second!=null&&(r.second=e.second),e.millisecond!=null&&(r.millisecond=e.millisecond),xp(r),r}function Hw(t){t.second+=Math.floor(t.millisecond/1e3),t.millisecond=Ba(t.millisecond,1e3),t.minute+=Math.floor(t.second/60),t.second=Ba(t.second,60),t.hour+=Math.floor(t.minute/60),t.minute=Ba(t.minute,60);let e=Math.floor(t.hour/24);return t.hour=Ba(t.hour,24),e}function xp(t){t.millisecond=Math.max(0,Math.min(t.millisecond,1e3)),t.second=Math.max(0,Math.min(t.second,59)),t.minute=Math.max(0,Math.min(t.minute,59)),t.hour=Math.max(0,Math.min(t.hour,23))}function Ba(t,e){let r=t%e;return r<0&&(r+=e),r}function Ep(t,e){return t.hour+=e.hours||0,t.minute+=e.minutes||0,t.second+=e.seconds||0,t.millisecond+=e.milliseconds||0,Hw(t)}function Tp(t,e){let r=t.copy();return Ep(r,e),r}function Kw(t,e){return Tp(t,ru(e))}function iu(t,e,r,n){let i=t.copy();switch(e){case"era":{let s=t.calendar.getEras(),o=s.indexOf(t.era);if(o<0)throw new Error("Invalid era: "+t.era);o=Tn(o,r,0,s.length-1,n?.round),i.era=s[o],Pi(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=Tn(t.year,r,-1/0,9999,n?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,t);break;case"month":i.month=Tn(t.month,r,1,t.calendar.getMonthsInYear(t),n?.round);break;case"day":i.day=Tn(t.day,r,1,t.calendar.getDaysInMonth(t),n?.round);break;default:throw new Error("Unsupported field "+e)}return t.calendar.balanceDate&&t.calendar.balanceDate(i),Pi(i),i}function su(t,e,r,n){let i=t.copy();switch(e){case"hour":{let s=t.hour,o=0,a=23;if(n?.hourCycle===12){let l=s>=12;o=l?12:0,a=l?23:11}i.hour=Tn(s,r,o,a,n?.round);break}case"minute":i.minute=Tn(t.minute,r,0,59,n?.round);break;case"second":i.second=Tn(t.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=Tn(t.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+e)}return i}function Tn(t,e,r,n,i=!1){if(i){t+=Math.sign(e),t<r&&(t=n);let s=Math.abs(e);e>0?t=Math.ceil(t/s)*s:t=Math.floor(t/s)*s,t>n&&(t=r)}else t+=e,t<r?t=n-(r-t-1):t>n&&(t=r+(t-n-1));return t}function Ap(t,e){let r;if(e.years!=null&&e.years!==0||e.months!=null&&e.months!==0||e.weeks!=null&&e.weeks!==0||e.days!=null&&e.days!==0){let i=Ua(oi(t),{years:e.years,months:e.months,weeks:e.weeks,days:e.days});r=en(i,t.timeZone)}else r=si(t)-t.offset;r+=e.milliseconds||0,r+=(e.seconds||0)*1e3,r+=(e.minutes||0)*6e4,r+=(e.hours||0)*36e5;let n=tn(r,t.timeZone);return hr(n,t.calendar)}function Gw(t,e){return Ap(t,ru(e))}function Yw(t,e,r,n){switch(e){case"hour":{let i=0,s=23;if(n?.hourCycle===12){let v=t.hour>=12;i=v?12:0,s=v?23:11}let o=oi(t),a=hr(bo(o,{hour:i}),new cs),l=[en(a,t.timeZone,"earlier"),en(a,t.timeZone,"later")].filter(v=>tn(v,t.timeZone).day===a.day)[0],c=hr(bo(o,{hour:s}),new cs),u=[en(c,t.timeZone,"earlier"),en(c,t.timeZone,"later")].filter(v=>tn(v,t.timeZone).day===c.day).pop(),d=si(t)-t.offset,f=Math.floor(d/_o),p=d%_o;return d=Tn(f,r,Math.floor(l/_o),Math.floor(u/_o),n?.round)*_o+p,hr(tn(d,t.timeZone),t.calendar)}case"minute":case"second":case"millisecond":return su(t,e,r,n);case"era":case"year":case"month":case"day":{let i=iu(oi(t),e,r,n),s=en(i,t.timeZone);return hr(tn(s,t.timeZone),t.calendar)}default:throw new Error("Unsupported field "+e)}}function Jw(t,e,r){let n=oi(t),i=bo(nu(n,e),e);if(i.compare(n)===0)return t;let s=en(i,t.timeZone,r);return hr(tn(s,t.timeZone),t.calendar)}const Qw=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Xw=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,e0=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,ou=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function ja(t){let e=t.match(Qw);if(!e)throw ou.test(t)?new Error(`Invalid ISO 8601 date string: ${t}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+t);let r=new ai(qe(e[1],0,9999),qe(e[2],1,12),1);return r.day=qe(e[3],1,r.calendar.getDaysInMonth(r)),r}function Cp(t){let e=t.match(Xw);if(!e)throw ou.test(t)?new Error(`Invalid ISO 8601 date time string: ${t}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+t);let r=qe(e[1],-9999,9999),n=r<1?"BC":"AD",i=new An(n,r<1?-r+1:r,qe(e[2],1,12),1,e[4]?qe(e[4],0,23):0,e[5]?qe(e[5],0,59):0,e[6]?qe(e[6],0,59):0,e[7]?qe(e[7],0,1/0)*1e3:0);return i.day=qe(e[3],0,i.calendar.getDaysInMonth(i)),i}function Op(t,e){let r=t.match(e0);if(!r)throw new Error("Invalid ISO 8601 date time string: "+t);let n=qe(r[1],-9999,9999),i=n<1?"BC":"AD",s=new $r(i,n<1?-n+1:n,qe(r[2],1,12),1,r[11],0,r[4]?qe(r[4],0,23):0,r[5]?qe(r[5],0,59):0,r[6]?qe(r[6],0,59):0,r[7]?qe(r[7],0,1/0)*1e3:0);s.day=qe(r[3],0,s.calendar.getDaysInMonth(s));let o=oi(s),a;if(r[8]){let l=qe(r[8],-23,23);if(s.offset=Math.sign(l)*(Math.abs(l)*36e5+qe(r[9]??"0",0,59)*6e4+qe(r[10]??"0",0,59)*1e3),a=si(s)-s.offset,!Zw(o,s.timeZone).includes(a))throw new Error(`Offset ${Pp(s.offset)} is invalid for ${au(s)} in ${s.timeZone}`)}else a=en(oi(o),s.timeZone,e);return tn(a,s.timeZone)}function t0(t,e){let r=t.match(ou);if(!r)throw new Error("Invalid ISO 8601 date time string: "+t);let n=qe(r[1],-9999,9999),i=n<1?"BC":"AD",s=new $r(i,n<1?-n+1:n,qe(r[2],1,12),1,e,0,r[4]?qe(r[4],0,23):0,r[5]?qe(r[5],0,59):0,r[6]?qe(r[6],0,59):0,r[7]?qe(r[7],0,1/0)*1e3:0);return s.day=qe(r[3],0,s.calendar.getDaysInMonth(s)),r[8]&&(s.offset=qe(r[8],-23,23)*36e5+qe(r[9]??"0",0,59)*6e4),wp(s,e)}function qe(t,e,r){let n=Number(t);if(n<e||n>r)throw new RangeError(`Value out of range: ${e} <= ${n} <= ${r}`);return n}function Dp(t){return`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}:${String(t.second).padStart(2,"0")}${t.millisecond?String(t.millisecond/1e3).slice(1):""}`}function Ip(t){let e=hr(t,new cs),r;return e.era==="BC"?r=e.year===1?"0000":"-"+String(Math.abs(1-e.year)).padStart(6,"00"):r=String(e.year).padStart(4,"0"),`${r}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`}function au(t){return`${Ip(t)}T${Dp(t)}`}function Pp(t){let e=Math.sign(t)<0?"-":"+";t=Math.abs(t);let r=Math.floor(t/36e5),n=Math.floor(t%36e5/6e4),i=Math.floor(t%36e5%6e4/1e3),s=`${e}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(s+=`:${String(i).padStart(2,"0")}`),s}function r0(t){return`${au(t)}${Pp(t.offset)}[${t.timeZone}]`}function lu(t){let e=typeof t[0]=="object"?t.shift():new cs,r;if(typeof t[0]=="string")r=t.shift();else{let o=e.getEras();r=o[o.length-1]}let n=t.shift(),i=t.shift(),s=t.shift();return[e,r,n,i,s]}class ai{#e;constructor(...e){let[r,n,i,s,o]=lu(e);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,Pi(this)}copy(){return this.era?new ai(this.calendar,this.era,this.year,this.month,this.day):new ai(this.calendar,this.year,this.month,this.day)}add(e){return Ua(this,e)}subtract(e){return Sp(this,e)}set(e){return nu(this,e)}cycle(e,r,n){return iu(this,e,r,n)}toDate(e){return bp(this,e)}toString(){return Ip(this)}compare(e){return dp(this,e)}}class cu{#e;constructor(e=0,r=0,n=0,i=0){this.hour=e,this.minute=r,this.second=n,this.millisecond=i,xp(this)}copy(){return new cu(this.hour,this.minute,this.second,this.millisecond)}add(e){return Tp(this,e)}subtract(e){return Kw(this,e)}set(e){return bo(this,e)}cycle(e,r,n){return su(this,e,r,n)}toString(){return Dp(this)}compare(e){return fp(this,e)}}class An{#e;constructor(...e){let[r,n,i,s,o]=lu(e);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Pi(this)}copy(){return this.era?new An(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new An(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return Ua(this,e)}subtract(e){return Sp(this,e)}set(e){return nu(bo(this,e),e)}cycle(e,r,n){switch(e){case"era":case"year":case"month":case"day":return iu(this,e,r,n);default:return su(this,e,r,n)}}toDate(e,r){return bp(this,e,r)}toString(){return au(this)}compare(e){let r=dp(this,e);return r===0?fp(this,oi(e)):r}}class $r{#e;constructor(...e){let[r,n,i,s,o]=lu(e),a=e.shift(),l=e.shift();this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,this.timeZone=a,this.offset=l,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Pi(this)}copy(){return this.era?new $r(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new $r(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return Ap(this,e)}subtract(e){return Gw(this,e)}set(e,r){return Jw(this,e,r)}cycle(e,r,n){return Yw(this,e,r,n)}toDate(){return qw(this)}toString(){return r0(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-jw(e,this.timeZone).toDate().getTime()}}let uu=new Map;class rn{constructor(e,r={}){this.formatter=Mp(e,r),this.options=r}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,r);if(r<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(r)}`}formatRangeToParts(e,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,r);if(r<e)throw new RangeError("End date must be >= start date");let n=this.formatter.formatToParts(e),i=this.formatter.formatToParts(r);return[...n.map(s=>({...s,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(s=>({...s,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return s0()&&(this.resolvedHourCycle||(this.resolvedHourCycle=o0(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}}const n0={true:{ja:"h11"},false:{}};function Mp(t,e={}){if(typeof e.hour12=="boolean"&&i0()){e={...e};let i=n0[String(e.hour12)][t.split("-")[0]],s=e.hour12?"h12":"h23";e.hourCycle=i??s,delete e.hour12}let r=t+(e?Object.entries(e).sort((i,s)=>i[0]<s[0]?-1:1).join():"");if(uu.has(r))return uu.get(r);let n=new Intl.DateTimeFormat(t,e);return uu.set(r,n),n}let du=null;function i0(){return du==null&&(du=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),du}let fu=null;function s0(){return fu==null&&(fu=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),fu}function o0(t,e){if(!e.timeStyle&&!e.hour)return;t=t.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),t+=(t.includes("-u-")?"":"-u")+"-nu-latn";let r=Mp(t,{...e,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(s=>s.type==="hour").value,10),i=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(s=>s.type==="hour").value,10);if(n===0&&i===23)return"h23";if(n===24&&i===23)return"h24";if(n===0&&i===11)return"h11";if(n===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}function wo(t){return Bw(t0(t,"Europe/Berlin")).toString().slice(0,-3)}function ko(t,e={weekday:"long",year:"numeric",month:"long",day:"numeric"},r="de"){return e={...e},new Date(t).toLocaleDateString(r,e)}function qa(t){if(t===void 0)throw Error("priceCents is required");return new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(t/100)}let a0=1;function $p(t){return t.type==="Ticket"}function Wa(t,e){return{...t,uid:a0++,selectedTime:e?.selectedTime??"",type:"Ticket",subtype:{time_slot:"timeslot",normal:"day",annual:"annual"}[t.ticket_type],shop_order:t.shop_order??0}}function li(t,e=""){return Ab(Object.values(t).map(r=>Wa(r,{selectedTime:e})),r=>r.shop_order)}function ci(t,e=""){let r=Object.entries(t);return e!==""&&(r=r.filter(([,n])=>n.total_capacities?.[e]&&n.total_capacities[e]>0)),Object.fromEntries(r)}const l0=function(t,e,r,n){if(t.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!$p(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,s=t.quotaManager;s.clearPrecart();for(const l of[...n.items,...e.items]){const c=l.product;$p(c)&&s.setPrecartItemQuantity(c.id,l.quantity)}const o=s.ticketCapacity(i.id,i.selectedTime),a=s.totalCapacity(i.id,i.selectedTime);return{max:Math.min(i.max_persons||100,o),min:i.min_persons||0,bookedOut:o===0,unavailable:a===0}};function So(t){return t.type==="Event"}function c0(t){return So(t)&&t.subtype==="scale"}let u0=1;function d0(t,e,r){const n={type:"Event",id:e,tax_included:!0,...t};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=t.title||"",r.price_description=t.description||""}return{uid:u0++,dateId:e,minAvailableCapacity:0,selectedTime:"",...r,...n,...t,type:"Event",subtype:t.scale_price_id===void 0?"flat":"scale"}}function hu(t,e,r){return d0(t,e,r)}const f0=function(t,e,r,n){if(t.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!So(r.product))throw new Error("(getMaxQuantitySeats) impossible");const s=r.product.dateId,o=t.allSeats[s];if(!o)return console.error("(getMaxQuantity) no seats found for dateId",s),{max:0,min:0,unavailable:!0,bookedOut:!1};const a=Math.min(o.max||100,o.max_per_registration||100,o.available??100),l={max_per_registration:a,available:100,overbook:!1,...o};let c=a;l.overbook&&(c=Math.min(l.max||100,l.max_per_registration||100));const u=n.totalQuantity,d=Ti(e.items.filter(v=>n.items.some(g=>g.uuid===v.uuid)),v=>v.quantity),f=Math.max(c-d-u+r.quantity,0);return{max:f,min:l.min??0,unavailable:l.available===0,bookedOut:f===0}},h0=function(t,e,r,n){if(t.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 p0(t){return{apiData:t,_timeslots:[],addQuotas(n){this._timeslots=[],this.apiData={...this.apiData,...n}},precart:{},clearPrecart(){this.precart={},this._timeslots=[]},setPrecartItemQuantity(n,i){this.precart[n]=i,this._timeslots=[]},getPrecartItemQuantity(n){return this.precart[n]??0},timeslots(){return this._timeslots.length===0&&(this._timeslots=Object.entries(this.apiData).flatMap(([n,i])=>Object.keys(i.capacities).map(s=>{const o=Ti(i.ticket_ids.map(a=>this.getPrecartItemQuantity(a)));return{timeSlot:s,quota:n,capacity:i.capacities[s]-o,tickets:i.ticket_ids,totalCapacity:i.total_capacities[s]}}))),this._timeslots},filterBy({timeslot:n,ticketId:i,date:s}={}){let o=this.timeslots();return i&&(o=o.filter(a=>a.tickets.includes(i))),n&&(o=o.filter(a=>a.timeSlot===n)),s&&(o=o.filter(a=>a.timeSlot.startsWith(s))),o.flatMap(a=>a.tickets.map(l=>({timeslot:n,ticket:l,quota:a.quota,capacity:a.capacity,totalCapacity:a.totalCapacity})))},ticketCapacity(n,i){return(Vc(this.filterBy({timeslot:i,ticketId:n}).map(o=>o.capacity))??0)+this.getPrecartItemQuantity(n)},totalCapacity(n,i){return Vc(this.filterBy({timeslot:i,ticketId:n}).map(o=>o.totalCapacity))??0},timeslotsOn(n){const i=this.timeslots().filter(a=>a.timeSlot.startsWith(n.toString())),s=Tb(i,a=>a.timeSlot);return Object.values(s).map(a=>{const c=Ob(a.flatMap(u=>u.tickets)).map(u=>Vc(a.filter(d=>d.tickets.includes(u)),d=>d.capacity)).filter(u=>u!==null);return Cb(c,u=>u.capacity)??a[0]}).sort((a,l)=>a.timeSlot.localeCompare(l.timeSlot))}}}function m0(t){let e=0;ba(()=>{_e(()=>{if(t.items.length===e)return;const r=t.items.length>e?"go-cart-item-added":"go-cart-item-removed";e=t.items.length,document.dispatchEvent(new CustomEvent(r,{detail:t.items.length}))})})}function xt(t,e){return{...{quantity:0,time:"",...e??{}},type:t.type,product:t,orderAttributes(){const n={shipped_with_merchandise_id:null,shipping_mode:"email",id:this.product.id};switch(t.type){case"Ticket":return{...n,time:this.time,quantity:this.quantity};case"Event":switch(t.subtype){case"flat":return{...n,quantity:this.quantity};case"scale":return{...n,quantities:{[t.scale_price_id]:this.quantity}};default:const s=t;throw new Error(`(orderAttributes) Unhandled Event subtype: ${s}`)}default:const i=t;throw new Error(`(orderAttributes) Unhandled product type: ${i}`)}},get uuid(){return this.type+"-"+this.product.id+this.subUId},get subUId(){const n=[];return this.time&&n.push(`time: ${this.time}`),c0(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),this.display?.discounted&&n.push("discounted"),n.length>0?` (${n.join(", ")})`:""},toString(){return this.uuid+":"+this.quantity},get price_cents(){return this.time&&this.product.dynamic_prices?.[this.time]!=null?this.product.dynamic_prices[this.time]:this.product.price_cents},get price_formatted(){return Sr(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 Sr(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return Sr(this.total_price_cents)}}}function g0(t){const e=t.product.type;switch(e){case"Ticket":if(!Np(t))return;const r=Wa(t.product,{selectedTime:t.product.selectedTime});return xt(r,{time:t.time,quantity:t.quantity});case"Event":if(!Np(t))return;const n=hu(t.product,t.id);return xt(n,{time:t.time,quantity:t.quantity});default:const i=e;throw new Error(`Unhandled case: ${i}`)}}function v0(t){let e=[],r=[];try{const n=localStorage.getItem("go-cart");if(!n)return[];const i=JSON.parse(n);if(Array.isArray(i))e=i,r=[];else if(typeof i=="object"&&i!==null)e=i.items||[],r=i.coupons||[];else throw console.dir({parsed:i,content:n}),new Error("go-cart has invalid format");return e.length===0?t.clearItems():t.items=e.map(g0).filter(w0),t.clearCoupons(),r.forEach(s=>t.addCoupon(s)),t.items}catch(n){return console.error(n),localStorage.setItem("go-cart",JSON.stringify({items:[],coupons:[]})),[]}}function y0(t){v0(t);let e=JSON.stringify({items:t.items||[],coupons:t.coupons||[]});localStorage.setItem("go-cart",e),ba(()=>{_e(()=>{const r=JSON.stringify({items:t.items||[],coupons:t.coupons||[]});r!==e&&(e=r,localStorage.setItem("go-cart",r))})})}const _0=t=>{const e=new Date,r=new Date(t);return e<r},b0=t=>ja(t.slice(0,10)).compare(Ii(Xt()))>=0,Np=t=>t.time?t.product.subtype==="day"?b0(t.time):_0(t.time):!0,w0=t=>t!==void 0;let k0=0;function us(t,e=20){const r=Be([]),n=Be([]),s={items:r,coupons:n,paymentModeId:void 0,uid:`cart-${k0++}`,get nonEmptyItems(){return this.items.filter(o=>o.quantity>0)},get totalPriceCents(){return Math.max(0,Ti(this.items,o=>o.total_price_cents))},get totalQuantity(){return Ti(this.items,o=>o.quantity)},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??S.settings?.defaultPaymentModeId,coupons:this.coupons,donations:[],affiliate:{},total:this.totalPriceCents}},get totalFormatted(){return Sr(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(o){for(let a=this.items.length-1;a>=0;a--)this.items[a].uuid===o.uuid&&this.items.splice(a,1)},addItem(o){const a=this.items.find(l=>l.uuid===o.uuid);a?a.quantity+=o.quantity:this.items.push(o)},addItems(o){o.forEach(a=>this.addItem(a))},addCoupon(o){this.coupons.includes(o)||this.coupons.push(o)},removeCoupon(o){const a=this.coupons.indexOf(o);a>-1&&this.coupons.splice(a,1)},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()}};return t&&t.forEach(o=>s.addItem(xt(o))),s}function Sr(t){return t=t??0,new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(t/100)}function S0(){const t=Be(us());return y0(t),m0(t),t}function Ha(){return typeof window<"u"&&typeof localStorage<"u"}function x0(t,e){if(Ha())try{localStorage.setItem(t,JSON.stringify(e))}catch(r){console.warn(`Failed to save to localStorage (${t}):`,r)}}function pu(t){if(!Ha())return null;try{const e=localStorage.getItem(t);return e?JSON.parse(e):null}catch(e){return console.warn(`Failed to load from localStorage (${t}):`,e),null}}function E0(t){if(Ha())try{localStorage.removeItem(t)}catch(e){console.warn(`Failed to remove from localStorage (${t}):`,e)}}const xo="go-capacity";function Fp(t,e){const r=pu(xo),n={allSeats:{...r?.allSeats||{},...t},allQuotas:{...r?.allQuotas||{},...e}};x0(xo,n)}function Rp(t){const e=pu(xo);if(e){if(e.allSeats)for(const r in e.allSeats){const n=parseInt(r);t.addSeats(n,e.allSeats[n],!1)}e.allQuotas&&t.addQuotas(e.allQuotas,!1)}}function T0(t){Ha()&&window.addEventListener("storage",e=>{if(e.key===xo&&Rp(t),e.key==="go-cart"){const r=pu("go-cart");(!r||!r.items||r.items.length===0)&&E0(xo)}})}function Lp(){const t={allSeats:{},allQuotas:{},quotaManager:p0({}),addQuotas(e,r=!0){this.allQuotas={...this.allQuotas,...e},this.quotaManager.addQuotas(e),r&&Fp(this.allSeats,this.allQuotas)},addSeats(e,r,n=!0){this.allSeats[e]=r,n&&Fp(this.allSeats,this.allQuotas)},capacityPolicy(e){const r=e.product.type;switch(r){case"Ticket":const i=e.product.subtype;switch(i){case"timeslot":case"event:ticket":case"day":return"quotas";case"annual":return"unlimited";default:const l=i;throw new Error(`(getMaxAvailability) Unhandled case: ${l}`)}case"Event":const o=e.product.subtype;switch(o){case"flat":case"scale":return"seats";default:const l=o;throw new Error(`(getMaxAvailability) Unhandled case: ${l}`)}default:const a=r;throw new Error(`(getMaxAvailability) Unhandled case: ${a}`)}},capacity(e,r,n){const i=this.capacityPolicy(r),s={quotas:l0,seats:f0,unlimited:h0}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Ge(()=>s(this,e,r,n))}};return Rp(t),T0(t),t}function zp(t){if(typeof document>"u")return;const r=`; ${document.cookie}`.split(`; ${t}=`);if(r.length===2){const n=r.pop()?.split(";").shift();return n?decodeURIComponent(n):void 0}}class Zp{get isAuthenticated(){return this.isLoggedIn||this.isGuest}}class A0 extends Zp{constructor(){super()}get isLoggedIn(){try{const e=zp("auth_headers");if(!e)return!1;const r=JSON.parse(e),n=Math.floor(Date.now()/1e3);return!r["access-token"]||parseInt(r.expiry,10)<n?!1:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r.uid)}catch{return!1}}get isGuest(){if(this.isLoggedIn)return!1;try{const e=zp("auth_headers");if(!e)return!0;const r=JSON.parse(e);return typeof r.uid=="string"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r.uid)}catch{return!0}}}class C0 extends Zp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}}const O0=t=>{switch(t){case"angular":return new A0;case"jmb":return new C0;default:let e=t;throw new Error("Unhandled shop type: "+e)}};function D0(t){return t==null||typeof t=="string"&&t.trim()===""}function I0(t,e){const r={};if(!e||e.length===0)return r;for(const n of e)(!(n in t)||D0(t[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function P0(t,e){return I0(t,e)}const M0={withStackTrace:!1},Vp=(t,e,r=M0)=>{const n=e.isOk()?{type:"Ok",value:e.value}:{type:"Err",value:e.error},i=r.withStackTrace?new Error().stack:void 0;return{data:n,message:t,stack:i}};function ds(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):i(u.value).then(a,l)}c((n=n.apply(t,[])).next())})}function Up(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Mi(t){return this instanceof Mi?(this.v=t,this):new Mi(t)}function $0(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(f){n[f]&&(i[f]=function(p){return new Promise(function(v,g){s.push([f,p,v,g])>1||a(f,p)})})}function a(f,p){try{l(n[f](p))}catch(v){d(s[0][3],v)}}function l(f){f.value instanceof Mi?Promise.resolve(f.value.v).then(c,u):d(s[0][2],f)}function c(f){a("next",f)}function u(f){a("throw",f)}function d(f,p){f(p),s.shift(),s.length&&a(s[0][0],s[0][1])}}function N0(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:Mi(t[i](o)),done:i==="return"}:s?s(o):o}:s}}function F0(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Up=="function"?Up(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,l){o=t[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}}class Ft{constructor(e){this._promise=e}static fromSafePromise(e){const r=e.then(n=>new On(n));return new Ft(r)}static fromPromise(e,r){const n=e.then(i=>new On(i)).catch(i=>new nn(r(i)));return new Ft(n)}static fromThrowable(e,r){return(...n)=>new Ft(ds(this,void 0,void 0,function*(){try{return new On(yield e(...n))}catch(i){return new nn(r?r(i):i)}}))}static combine(e){return R0(e)}static combineWithAllErrors(e){return L0(e)}map(e){return new Ft(this._promise.then(r=>ds(this,void 0,void 0,function*(){return r.isErr()?new nn(r.error):new On(yield e(r.value))})))}andThrough(e){return new Ft(this._promise.then(r=>ds(this,void 0,void 0,function*(){if(r.isErr())return new nn(r.error);const n=yield e(r.value);return n.isErr()?new nn(n.error):new On(r.value)})))}andTee(e){return new Ft(this._promise.then(r=>ds(this,void 0,void 0,function*(){if(r.isErr())return new nn(r.error);try{yield e(r.value)}catch{}return new On(r.value)})))}mapErr(e){return new Ft(this._promise.then(r=>ds(this,void 0,void 0,function*(){return r.isOk()?new On(r.value):new nn(yield e(r.error))})))}andThen(e){return new Ft(this._promise.then(r=>{if(r.isErr())return new nn(r.error);const n=e(r.value);return n instanceof Ft?n._promise:n}))}orElse(e){return new Ft(this._promise.then(r=>ds(this,void 0,void 0,function*(){return r.isErr()?e(r.error):new On(r.value)})))}match(e,r){return this._promise.then(n=>n.match(e,r))}unwrapOr(e){return this._promise.then(r=>r.unwrapOr(e))}safeUnwrap(){return $0(this,arguments,function*(){return yield Mi(yield Mi(yield*N0(F0(yield Mi(this._promise.then(r=>r.safeUnwrap()))))))})}then(e,r){return this._promise.then(e,r)}}const mu=t=>new Ft(Promise.resolve(new nn(t))),Bp=t=>{let e=$i([]);for(const r of t)if(r.isErr()){e=Cn(r.error);break}else e.map(n=>n.push(r.value));return e},R0=t=>Ft.fromSafePromise(Promise.all(t)).andThen(Bp),jp=t=>{let e=$i([]);for(const r of t)r.isErr()&&e.isErr()?e.error.push(r.error):r.isErr()&&e.isOk()?e=Cn([r.error]):r.isOk()&&e.isOk()&&e.value.push(r.value);return e},L0=t=>Ft.fromSafePromise(Promise.all(t)).andThen(jp);var gu;(function(t){function e(i,s){return(...o)=>{try{const a=i(...o);return $i(a)}catch(a){return Cn(s?s(a):a)}}}t.fromThrowable=e;function r(i){return Bp(i)}t.combine=r;function n(i){return jp(i)}t.combineWithAllErrors=n})(gu||(gu={}));const $i=t=>new On(t);function Cn(t){return new nn(t)}class On{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return $i(e(this.value))}mapErr(e){return $i(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map(r=>this.value)}andTee(e){try{e(this.value)}catch{}return $i(this.value)}orElse(e){return $i(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return Ft.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,r){return e(this.value)}safeUnwrap(){const e=this.value;return(function*(){return e})()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw Vp("Called `_unsafeUnwrapErr` on an Ok",this,e)}}class nn{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return Cn(this.error)}mapErr(e){return Cn(e(this.error))}andThrough(e){return Cn(this.error)}andTee(e){return Cn(this.error)}andThen(e){return Cn(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return mu(this.error)}asyncAndThrough(e){return mu(this.error)}asyncMap(e){return mu(this.error)}unwrapOr(e){return e}match(e,r){return r(this.error)}safeUnwrap(){const e=this.error;return(function*(){throw yield Cn(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw Vp("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}}gu.fromThrowable;const z0=/\{[^{}]+\}/g;function Z0(){return Math.random().toString(36).slice(2,11)}function V0(t){let{baseUrl:e="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:s,headers:o,...a}={...t};e=Kp(e);const l=[];async function c(u,d){const{baseUrl:f,fetch:p=n,Request:v=r,headers:g,params:m={},parseAs:b="json",querySerializer:k,bodySerializer:D=s??B0,body:T,...P}=d||{};f&&(e=Kp(f));let A=typeof i=="function"?i:Hp(i);k&&(A=typeof k=="function"?k:Hp({...typeof i=="object"?i:{},...k}));const O=T===void 0?void 0:D(T),F=O===void 0||O instanceof FormData?{}:{"Content-Type":"application/json"},N={redirect:"follow",...a,...P,body:O,headers:q0(F,o,g,m.header)};let j,G,Z=new r(j0(u,{baseUrl:e,params:m,querySerializer:A}),N);for(const K in P)K in Z||(Z[K]=P[K]);if(l.length){j=Z0(),G=Object.freeze({baseUrl:e,fetch:p,parseAs:b,querySerializer:A,bodySerializer:D});for(const K of l)if(K&&typeof K=="object"&&typeof K.onRequest=="function"){const J=await K.onRequest({request:Z,schemaPath:u,params:m,options:G,id:j});if(J){if(!(J instanceof r))throw new Error("onRequest: must return new Request() when modifying the request");Z=J}}}let ue=await p(Z);if(l.length)for(let K=l.length-1;K>=0;K--){const J=l[K];if(J&&typeof J=="object"&&typeof J.onResponse=="function"){const B=await J.onResponse({request:Z,response:ue,schemaPath:u,params:m,options:G,id:j});if(B){if(!(B instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");ue=B}}}if(ue.status===204||ue.headers.get("Content-Length")==="0")return ue.ok?{data:{},response:ue}:{error:{},response:ue};if(ue.ok)return b==="stream"?{data:ue.body,response:ue}:{data:await ue[b](),response:ue};let me=await ue.text();try{me=JSON.parse(me)}catch{}return{error:me,response:ue}}return{GET(u,d){return c(u,{...d,method:"GET"})},PUT(u,d){return c(u,{...d,method:"PUT"})},POST(u,d){return c(u,{...d,method:"POST"})},DELETE(u,d){return c(u,{...d,method:"DELETE"})},OPTIONS(u,d){return c(u,{...d,method:"OPTIONS"})},HEAD(u,d){return c(u,{...d,method:"HEAD"})},PATCH(u,d){return c(u,{...d,method:"PATCH"})},TRACE(u,d){return c(u,{...d,method:"TRACE"})},use(...u){for(const d of u)if(d){if(typeof d!="object"||!("onRequest"in d||"onResponse"in d))throw new Error("Middleware must be an object with one of `onRequest()` or `onResponse()`");l.push(d)}},eject(...u){for(const d of u){const f=l.indexOf(d);f!==-1&&l.splice(f,1)}}}}function Ka(t,e,r){if(e==null)return"";if(typeof e=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${r?.allowReserved===!0?e:encodeURIComponent(e)}`}function qp(t,e,r){if(!e||typeof e!="object")return"";const n=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if(r.style!=="deepObject"&&r.explode===!1){for(const a in e)n.push(a,r.allowReserved===!0?e[a]:encodeURIComponent(e[a]));const o=n.join(",");switch(r.style){case"form":return`${t}=${o}`;case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;default:return o}}for(const o in e){const a=r.style==="deepObject"?`${t}[${o}]`:o;n.push(Ka(a,e[o],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function Wp(t,e,r){if(!Array.isArray(e))return"";if(r.explode===!1){const s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",o=(r.allowReserved===!0?e:e.map(a=>encodeURIComponent(a))).join(s);switch(r.style){case"simple":return o;case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;default:return`${t}=${o}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const s of e)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?s:encodeURIComponent(s)):i.push(Ka(t,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function Hp(t){return function(r){const n=[];if(r&&typeof r=="object")for(const i in r){const s=r[i];if(s!=null){if(Array.isArray(s)){n.push(Wp(i,s,{style:"form",explode:!0,...t?.array,allowReserved:t?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(qp(i,s,{style:"deepObject",explode:!0,...t?.object,allowReserved:t?.allowReserved||!1}));continue}n.push(Ka(i,s,t))}}return n.join("&")}}function U0(t,e){let r=t;for(const n of t.match(z0)??[]){let i=n.substring(1,n.length-1),s=!1,o="simple";if(i.endsWith("*")&&(s=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(o="label",i=i.substring(1)):i.startsWith(";")&&(o="matrix",i=i.substring(1)),!e||e[i]===void 0||e[i]===null)continue;const a=e[i];if(Array.isArray(a)){r=r.replace(n,Wp(i,a,{style:o,explode:s}));continue}if(typeof a=="object"){r=r.replace(n,qp(i,a,{style:o,explode:s}));continue}if(o==="matrix"){r=r.replace(n,`;${Ka(i,a)}`);continue}r=r.replace(n,o==="label"?`.${encodeURIComponent(a)}`:encodeURIComponent(a))}return r}function B0(t){return t instanceof FormData?t:JSON.stringify(t)}function j0(t,e){let r=`${e.baseUrl}${t}`;e.params?.path&&(r=U0(r,e.params.path));let n=e.querySerializer(e.params.query??{});return n.startsWith("?")&&(n=n.substring(1)),n&&(r+=`?${n}`),r}function q0(...t){const e=new Headers;for(const r of t){if(!r||typeof r!="object")continue;const n=r instanceof Headers?r.entries():Object.entries(r);for(const[i,s]of n)if(s===null)e.delete(i);else if(Array.isArray(s))for(const o of s)e.append(i,o);else s!==void 0&&e.set(i,s)}return e}function Kp(t){return t.endsWith("/")?t.substring(0,t.length-1):t}function W0(t,e){return V0({baseUrl:t,headers:{"X-Shop-Url":e}})}const H0="/api/v4/calendar",K0="/api/v4/tickets/calendar",G0="/api/v4/auth/validate_token",Y0="/api/v4/tickets/list_and_quotas",J0="/api/v4/tickets",Q0="/api/v4/auth/sign_in",X0="/api/v4/auth",ek="/api/v4/orders/withdrawals",Gp={SHOP_GUEST:10,SHOP:20};class tk{constructor(e,r,n,i="angular"){this.type=i,e&&r&&n&&this.load(e,r,n,i)}#e=le(Be({customerSalutations:[],countries:[],locales:[]}));#t={};async load(e,r,n,i="angular"){(e.includes("jmb-staging.gomus.de")||e.includes("jmb.gomus.de"))&&(this.type="jmb"),h(this.#e).urls=_b(this.type),h(this.#e).currentUser=O0(this.type),h(this.#e).apiUrl=e,h(this.#e).shopDomain=r,h(this.#e).locale=n||"de",this.#t={},h(this.#e).client=W0(e,r),h(this.#e).capacityManager=Lp(),h(this.#e).cart=S0(),h(this.#e).auth=new Yh,h(this.#e).client.use(new Ib(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return h(this.#e).capacityManager||(h(this.#e).capacityManager=Lp()),h(this.#e).capacityManager}get cart(){return h(this.#e).cart}get auth(){return h(this.#e).auth||(h(this.#e).auth=new Yh),h(this.#e).auth}get currentUser(){return h(this.#e).currentUser}get slug(){return this.shopDomain?.match(/^(?:https?:\/\/)?([^.-]+)/)?.[1]}get client(){return h(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 this.shop?.translations}get currency(){return this.shop?.config.currency}t(e,r){return this.translate(e,r)}translate(e,r){if(!this.translations?.[e])return e;let n=this.translations[e];if(r&&n)for(const[i,s]of Object.entries(r))n=n.replace(`{{${i}}}`,s);return n||""}get apiUrl(){return h(this.#e).apiUrl}get shopDomain(){return h(this.#e).shopDomain}get baseUrl(){return"https://"+this.shopDomain}get locale(){return h(this.#e).locale}get shop(){return this.fetchAndCache("/api/v4/shop","shop","shop")}get _data(){return h(this.#e)}validateToken(){return this.fetchAndCache(G0,"validateToken","",{cache:5})}ticketsCalendar(e){return this.fetchAndCache(K0,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(H0,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(Y0,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:e})}tickets(e){return this.fetchAndCache(J0,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:e})}signIn(e){return this.apiPost(Q0,{body:e,requiredFields:["email","password"]})}signUp(e,r=!1){const n={addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:r?Gp.SHOP_GUEST:Gp.SHOP};e=dr(n,e);let i=["name","surname","email","email_confirmation","terms"];return r||i.push("password","password_confirmation"),this.apiPost(X0,{body:e,requiredFields:i})}withdrawal(e){const r={...e,order_id:String(e.order_id)};return r.note||delete r.note,this.apiPost(ek,{body:r,requiredFields:["order_id","first_name","last_name","email"],parseAs:"text"})}getDates(e){return this.fetchAndCache("/api/v4/dates",`dates-${JSON.stringify(e)}`,"dates",{query: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"]})}checkout(e){return this.apiPost("/api/v4/orders",{body:e,requiredFields:["items","total"]})}#r=null;async createCart(e){const r=JSON.stringify({items:e.items??[],coupons:e.coupons??[]});if(this.#r?.key===r)return this.#r.result;const n=await this.apiPost("/api/v4/cart",{body:e,requiredFields:["items"]});return this.#r={key:r,result:n},n}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,r){return this.apiPost("/api/v4/annual/personalization/finalize",{body:r,params:{query:{token:e}}})}uploadPersonalizationPhoto(e,r,n){const i=new FormData;return i.append("file",n),this.apiUpload("/api/v4/annual/personalizations/{id}/upload",{body:i,params:{path:{id:r},query:{token:e}}})}fetchAndCache(e,r,n,i){if(i??={},i.query??={},i.cache??=1e3,i.path??={},!this.#i())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),h(this.#e)[r];const s=dr({per_page:1e3},i.query),o=e+JSON.stringify(s),a=!this.#t[o],l=this.#t[o]?.fetchedAt<Date.now()-i.cache*1e3;return(a||l)&&this.apiGet(e,s,i.path).then(c=>{c&&(h(this.#e)[r]=n===""?c:c[n])}),h(this.#e)[r]}get museums(){return this.fetchAndCache("/api/v4/museums","museums","museums")}get exhibitions(){return this.fetchAndCache("/api/v4/exhibitions","exhibitions","exhibitions")}getEvent(e){return this.fetchAndCache(`/api/v4/events/${e}`,`single_event_${e}`,"event")}getTicketCapacities(e,r){return this.apiPost("/api/v4/tickets/capacities",{body:{date:e,ticket_ids:r},requiredFields:["date","ticket_ids"]})}getCouponSaleByBarcode(e){return this.fetchAndCache(`/api/v4/coupon_sales/barcode/${e}`,`coupon_sale_barcode_${e}`,"coupon_sale")}getEventDetailsOnDate(e,r){return this.fetchAndCache(`/api/v4/events/${e}/dates/${r}`,`/api/v4/events/${e}/dates/${r}`,"date")}get events(){return this.fetchAndCache("/api/v4/events","events","events")}get upcomingEvents(){return this.fetchAndCache("/api/v4/events","events","events",{query:{by_bookable:!0,with_bookings_in_future:1}})}get tours(){return this.fetchAndCache("/api/v4/tours","tours","tours")}get merchandises(){return this.fetchAndCache("/api/v4/merchandises","merchandises","merchandises")}get customerSalutations(){return this.fetchAndCache("/api/v3/customer_salutations","customerSalutations","customer_salutations")}get countries(){return this.fetchAndCache("/api/v3/countries","countries","countries")}get locales(){return this.fetchAndCache("/api/v4/locales","locales","locales_options")}get urls(){return h(this.#e).urls}get#n(){return{params:{query:{locale:this.locale},header:{"X-Shop-Url":this.shopDomain}}}}async apiPost(e,r){return this.apiCall(e,{method:"POST",...r})}async apiPut(e,r){return this.apiCall(e,{method:"PUT",...r})}async apiDELETE(e,r){return this.apiCall(e,{method:"DELETE",...r})}async apiUpload(e,r){this.#s();const{body:n,params:i={}}=r;return await this.client.POST(e,{body:n,params:dr(this.#n,{params:i}).params,bodySerializer:o=>o})}async apiCall(e,r){this.#s();const{body:n,params:i={},requiredFields:s,parseAs:o}=r,a=P0(n,s);if(Object.keys(a).length>0)return{error:{errors:a}};const l=this.client[r.method];return await l(e,{body:n,params:dr(this.#n,{params:i}).params,parseAs:o})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(r=>r.status==="fetching").length;)await kb(10)}async apiGet(e,r={},n){this.#s();const i=e+JSON.stringify(r);this.#t[i]={status:"fetching",fetchedAt:Date.now()};let s=this.#n;r&&(s=dr(s,{params:{query:r}})),e&&(s=dr(s,{params:{path:n}}));const o=await this.client.GET(e,s);return this.#t[i]={status:"completed",fetchedAt:Date.now()},o.data||o}#i=()=>this.apiUrl!==void 0&&this.shopDomain!==void 0&&this.locale!==void 0&&this.client!==void 0;#s=()=>{if(this.apiUrl===void 0)throw new Error("Public API URL is not set");if(this.shopDomain===void 0)throw new Error("Shop Domain (X-Shop-Url) is not set");if(this.locale===void 0)throw new Error("Locale is not set");if(this.client===void 0)throw new Error("client is not set");if(!this.#i())throw new Error("Fetch is not possible.")}}const S=new tk;function fs(t){return function(e,r){if(e)e.addEventListener(t,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.")}}class vu{constructor(e,r,n=1e3){this.host=e,this.KEY=r,this.pollDuration=n}#e=le(Be({value:void 0}));error=!1;static static(e){const r=new vu(null,null);return r.value=e,r}load(){zc(()=>(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 h(this.#e).value}set value(e){h(this.#e).value=e}}function hs(t){return function(e,r={pollDuration:1e3}){if(e){const n=new vu(e,t,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.")}}let rk={urls:{},navigateTo:t=>{window.location.assign(t)},forms:{},fields:{}};class nk{defaultConfig=dr(rk,window.customOptions);override=this.defaultConfig;#e=le(Be({}));get options(){return h(this.#e)}set options(e){M(this.#e,e,!0)}constructor(){this.update()}update(){const e=dr(this.defaultConfig,this.override);e.forms=Object.keys({...this.defaultConfig.forms,...this.override.forms}).reduce((r,n)=>(r[n]={...this.defaultConfig.forms[n],...this.override.forms[n]},r),{}),this.options=e}get config(){return this.options}define(e){return this.override=dr(this.override,e),this.update(),this}default(e){return this.defaultConfig=dr(this.defaultConfig,e),this.update(),this}}const at=new nk;class Yp{#e=le();get token(){return h(this.#e)}set token(e){M(this.#e,e,!0)}#t=le();get ticketSaleId(){return h(this.#t)}set ticketSaleId(e){M(this.#t,e,!0)}get order(){return this.token?lc(S.annualOrder(this.token)):void 0}get ticketSale(){if(this.ticketSaleId)return lc(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return at.config.urls.annualTicketPersonalizationForm?at.config.urls.annualTicketPersonalizationForm(this.token,e.id):S.urls.annualTicketPersonalizationForm(this.token,e.id)}}const Jp="go-annual-ticket-personalization",Qp=fs(Jp),ik=hs(Jp);var sk=q("<li><a> </a></li>"),ok=q('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function ak(t,e){te(e,!0);let r=_(e,"token",7);const n=new Yp;Qp(e.$$host,n),_e(()=>{n.token=r()});let i=C(()=>n.order);var s={details:n,get token(){return r()},set token(c){r(c),y()}},o=H(),a=L(o);{var l=c=>{var u=H(),d=L(u);Ke(d,17,()=>h(i).ticket_sales,f=>f.id,(f,p)=>{var v=ok(),g=$(v),m=$(g,!0);I(g);var b=ee(g,2),k=$(b,!0);I(b);var D=ee(b,2);{var T=P=>{var A=sk(),O=$(A),F=$(O,!0);I(O),I(A),ce((N,j)=>{Te(O,"href",N),se(F,j)},[()=>n.goToPersonalization(h(p)),()=>S.t("ticket.annual.personalization.list.personalize.add")]),w(P,A)};de(D,P=>{h(p).status=="not_ready_to_send"&&P(T)})}I(v),ce(P=>{Te(v,"data-ticket-sale-id",h(p).id),se(m,h(p).title),se(k,P)},[()=>S.t("ticket.annual.personalization.detail.title",{count:h(p).personalizations.length})]),w(f,v)}),w(c,u)};de(a,c=>{h(i)&&c(l)})}return w(t,o),re(s)}customElements.define("go-annual-ticket-personalization",ne(ak,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));function Q(t,e,r){function n(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,l);const c=o.prototype,u=Object.keys(c);for(let d=0;d<u.length;d++){const f=u[d];f in a||(a[f]=c[f].bind(a))}}const i=r?.Parent??Object;class s extends i{}Object.defineProperty(s,"name",{value:t});function o(a){var l;const c=r?.Parent?new s:this;n(c,a),(l=c._zod).deferred??(l.deferred=[]);for(const u of c._zod.deferred)u();return c}return Object.defineProperty(o,"init",{value:n}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}class ps extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Xp extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const lk={};function Ni(t){return lk}function yu(t,e){return typeof e=="bigint"?e.toString():e}function _u(t){return t==null}function bu(t){const e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}const em=Symbol("evaluating");function Ye(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==em)return n===void 0&&(n=em,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function ck(...t){const e={};for(const r of t){const n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function uk(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const tm="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function rm(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function wu(t){if(rm(t)===!1)return!1;const e=t.constructor;if(e===void 0||typeof e!="function")return!0;const r=e.prototype;return!(rm(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function nm(t){return wu(t)?{...t}:Array.isArray(t)?[...t]:t}function ku(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function dk(t,e,r){const n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function Oe(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function ms(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function fk(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function Ga(t){return typeof t=="string"?t:t?.message}function Fi(t,e,r){const n={...t,path:t.path??[]};if(!t.message){const i=Ga(t.inst?._zod.def?.error?.(t))??Ga(e?.error?.(t))??Ga(r.customError?.(t))??Ga(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}function Su(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Eo(...t){const[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}const im=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,yu,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},sm=Q("$ZodError",im),om=Q("$ZodError",im,{Parent:Error});function hk(t,e=r=>r.message){const r={},n=[];for(const i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function pk(t,e=r=>r.message){const r={_errors:[]},n=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>n({issues:o}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)r._errors.push(e(s));else{let o=r,a=0;for(;a<s.path.length;){const l=s.path[a];a===s.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(e(s))):o[l]=o[l]||{_errors:[]},o=o[l],a++}}};return n(t),r}const xu=t=>(e,r,n,i)=>{const s=n?Object.assign(n,{async:!1}):{async:!1},o=e._zod.run({value:r,issues:[]},s);if(o instanceof Promise)throw new ps;if(o.issues.length){const a=new(i?.Err??t)(o.issues.map(l=>Fi(l,s,Ni())));throw tm(a,i?.callee),a}return o.value},Eu=t=>async(e,r,n,i)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let o=e._zod.run({value:r,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new(i?.Err??t)(o.issues.map(l=>Fi(l,s,Ni())));throw tm(a,i?.callee),a}return o.value},Ya=t=>(e,r,n)=>{const i=n?{...n,async:!1}:{async:!1},s=e._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new ps;return s.issues.length?{success:!1,error:new(t??sm)(s.issues.map(o=>Fi(o,i,Ni())))}:{success:!0,data:s.value}},mk=Ya(om),Ja=t=>async(e,r,n)=>{const i=n?Object.assign(n,{async:!0}):{async:!0};let s=e._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new t(s.issues.map(o=>Fi(o,i,Ni())))}:{success:!0,data:s.value}},gk=Ja(om),vk=t=>(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return xu(t)(e,r,i)},yk=t=>(e,r,n)=>xu(t)(e,r,n),_k=t=>async(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Eu(t)(e,r,i)},bk=t=>async(e,r,n)=>Eu(t)(e,r,n),wk=t=>(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Ya(t)(e,r,i)},kk=t=>(e,r,n)=>Ya(t)(e,r,n),Sk=t=>async(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Ja(t)(e,r,i)},xk=t=>async(e,r,n)=>Ja(t)(e,r,n),Ek=/^[cC][^\s-]{8,}$/,Tk=/^[0-9a-z]+$/,Ak=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ck=/^[0-9a-vA-V]{20}$/,Ok=/^[A-Za-z0-9]{27}$/,Dk=/^[a-zA-Z0-9_-]{21}$/,Ik=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Pk=/^([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})$/,am=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[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)$/,Mk=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$k="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Nk(){return new RegExp($k,"u")}const Fk=/^(?:(?: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])$/,Rk=/^(([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}|:))$/,Lk=/^((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])$/,zk=/^(([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])$/,Zk=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,lm=/^[A-Za-z0-9_-]*$/,Vk=/^\+[1-9]\d{6,14}$/,cm="(?:(?:\\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])))",Uk=new RegExp(`^${cm}$`);function um(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Bk(t){return new RegExp(`^${um(t)}$`)}function jk(t){const e=um({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${e}(?:${r.join("|")})`;return new RegExp(`^${cm}T(?:${n})$`)}const qk=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},Wk=/^[^A-Z]*$/,Hk=/^[^a-z]*$/,sn=Q("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Kk=Q("$ZodCheckMaxLength",(t,e)=>{var r;sn.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!_u(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{const i=n.value;if(i.length<=e.maximum)return;const o=Su(i);n.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Gk=Q("$ZodCheckMinLength",(t,e)=>{var r;sn.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!_u(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{const i=n.value;if(i.length>=e.minimum)return;const o=Su(i);n.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Yk=Q("$ZodCheckLengthEquals",(t,e)=>{var r;sn.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!_u(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=n=>{const i=n.value,s=i.length;if(s===e.length)return;const o=Su(i),a=s>e.length;n.issues.push({origin:o,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),Qa=Q("$ZodCheckStringFormat",(t,e)=>{var r,n;sn.init(t,e),t._zod.onattach.push(i=>{const s=i._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),Jk=Q("$ZodCheckRegex",(t,e)=>{Qa.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Qk=Q("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Wk),Qa.init(t,e)}),Xk=Q("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Hk),Qa.init(t,e)}),eS=Q("$ZodCheckIncludes",(t,e)=>{sn.init(t,e);const r=ku(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),tS=Q("$ZodCheckStartsWith",(t,e)=>{sn.init(t,e);const r=new RegExp(`^${ku(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),rS=Q("$ZodCheckEndsWith",(t,e)=>{sn.init(t,e);const r=new RegExp(`.*${ku(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}}),nS=Q("$ZodCheckOverwrite",(t,e)=>{sn.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}}),iS={major:4,minor:3,patch:6},Rt=Q("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=iS;const n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(const i of n)for(const s of i._zod.onattach)s(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const i=(o,a,l)=>{let c=ms(o),u;for(const d of a){if(d._zod.def.when){if(!d._zod.def.when(o))continue}else if(c)continue;const f=o.issues.length,p=d._zod.check(o);if(p instanceof Promise&&l?.async===!1)throw new ps;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,o.issues.length!==f&&(c||(c=ms(o,f)))});else{if(o.issues.length===f)continue;c||(c=ms(o,f))}}return u?u.then(()=>o):o},s=(o,a,l)=>{if(ms(o))return o.aborted=!0,o;const c=i(a,n,l);if(c instanceof Promise){if(l.async===!1)throw new ps;return c.then(u=>t._zod.parse(u,l))}return t._zod.parse(c,l)};t._zod.run=(o,a)=>{if(a.skipChecks)return t._zod.parse(o,a);if(a.direction==="backward"){const c=t._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(u=>s(u,o,a)):s(c,o,a)}const l=t._zod.parse(o,a);if(l instanceof Promise){if(a.async===!1)throw new ps;return l.then(c=>i(c,n,a))}return i(l,n,a)}}Ye(t,"~standard",()=>({validate:i=>{try{const s=mk(t,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return gk(t,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),Tu=Q("$ZodString",(t,e)=>{Rt.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??qk(t._zod.bag),t._zod.parse=(r,n)=>{if(e.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:t}),r}}),nt=Q("$ZodStringFormat",(t,e)=>{Qa.init(t,e),Tu.init(t,e)}),sS=Q("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Pk),nt.init(t,e)}),oS=Q("$ZodUUID",(t,e)=>{if(e.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=am(n))}else e.pattern??(e.pattern=am());nt.init(t,e)}),aS=Q("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Mk),nt.init(t,e)}),lS=Q("$ZodURL",(t,e)=>{nt.init(t,e),t._zod.check=r=>{try{const n=r.value.trim(),i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),cS=Q("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Nk()),nt.init(t,e)}),uS=Q("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Dk),nt.init(t,e)}),dS=Q("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Ek),nt.init(t,e)}),fS=Q("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Tk),nt.init(t,e)}),hS=Q("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Ak),nt.init(t,e)}),pS=Q("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Ck),nt.init(t,e)}),mS=Q("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Ok),nt.init(t,e)}),gS=Q("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=jk(e)),nt.init(t,e)}),vS=Q("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Uk),nt.init(t,e)}),yS=Q("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Bk(e)),nt.init(t,e)}),_S=Q("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Ik),nt.init(t,e)}),bS=Q("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Fk),nt.init(t,e),t._zod.bag.format="ipv4"}),wS=Q("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Rk),nt.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),kS=Q("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Lk),nt.init(t,e)}),SS=Q("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=zk),nt.init(t,e),t._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[i,s]=n;if(!s)throw new Error;const o=Number(s);if(`${o}`!==s)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function dm(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const xS=Q("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Zk),nt.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{dm(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function ES(t){if(!lm.test(t))return!1;const e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return dm(r)}const TS=Q("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=lm),nt.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{ES(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),AS=Q("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Vk),nt.init(t,e)});function CS(t,e=null){try{const r=t.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||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}const OS=Q("$ZodJWT",(t,e)=>{nt.init(t,e),t._zod.check=r=>{CS(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}});function fm(t,e,r){t.issues.length&&e.issues.push(...fk(r,t.issues)),e.value[r]=t.value}const DS=Q("$ZodArray",(t,e)=>{Rt.init(t,e),t._zod.parse=(r,n)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);const s=[];for(let o=0;o<i.length;o++){const a=i[o],l=e.element._zod.run({value:a,issues:[]},n);l instanceof Promise?s.push(l.then(c=>fm(c,r,o))):fm(l,r,o)}return s.length?Promise.all(s).then(()=>r):r}});function hm(t,e,r,n){for(const s of t)if(s.issues.length===0)return e.value=s.value,e;const i=t.filter(s=>!ms(s));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(s=>s.issues.map(o=>Fi(o,n,Ni())))}),e)}const IS=Q("$ZodUnion",(t,e)=>{Rt.init(t,e),Ye(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Ye(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Ye(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),Ye(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){const i=e.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>bu(s.source)).join("|")})$`)}});const r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,s)=>{if(r)return n(i,s);let o=!1;const a=[];for(const l of e.options){const c=l._zod.run({value:i.value,issues:[]},s);if(c instanceof Promise)a.push(c),o=!0;else{if(c.issues.length===0)return c;a.push(c)}}return o?Promise.all(a).then(l=>hm(l,i,t,s)):hm(a,i,t,s)}}),PS=Q("$ZodIntersection",(t,e)=>{Rt.init(t,e),t._zod.parse=(r,n)=>{const i=r.value,s=e.left._zod.run({value:i,issues:[]},n),o=e.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([l,c])=>pm(r,l,c)):pm(r,s,o)}});function Au(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(wu(t)&&wu(e)){const r=Object.keys(e),n=Object.keys(t).filter(s=>r.indexOf(s)!==-1),i={...t,...e};for(const s of n){const o=Au(t[s],e[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};i[s]=o.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<t.length;n++){const i=t[n],s=e[n],o=Au(i,s);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function pm(t,e,r){const n=new Map;let i;for(const a of e.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(const l of a.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else t.issues.push(a);for(const a of r.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else t.issues.push(a);const s=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&i&&t.issues.push({...i,keys:s}),ms(t))return t;const o=Au(e.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return t.value=o.data,t}const MS=Q("$ZodTransform",(t,e)=>{Rt.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Xp(t.constructor.name);const i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(o=>(r.value=o,r));if(i instanceof Promise)throw new ps;return r.value=i,r}});function mm(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}const gm=Q("$ZodOptional",(t,e)=>{Rt.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Ye(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Ye(t._zod,"pattern",()=>{const r=e.innerType._zod.pattern;return r?new RegExp(`^(${bu(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>mm(s,r.value)):mm(i,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,n)}}),$S=Q("$ZodExactOptional",(t,e)=>{gm.init(t,e),Ye(t._zod,"values",()=>e.innerType._zod.values),Ye(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,n)=>e.innerType._zod.run(r,n)}),NS=Q("$ZodNullable",(t,e)=>{Rt.init(t,e),Ye(t._zod,"optin",()=>e.innerType._zod.optin),Ye(t._zod,"optout",()=>e.innerType._zod.optout),Ye(t._zod,"pattern",()=>{const r=e.innerType._zod.pattern;return r?new RegExp(`^(${bu(r.source)}|null)$`):void 0}),Ye(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),FS=Q("$ZodDefault",(t,e)=>{Rt.init(t,e),t._zod.optin="optional",Ye(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);if(r.value===void 0)return r.value=e.defaultValue,r;const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>vm(s,e)):vm(i,e)}});function vm(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}const RS=Q("$ZodPrefault",(t,e)=>{Rt.init(t,e),t._zod.optin="optional",Ye(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),LS=Q("$ZodNonOptional",(t,e)=>{Rt.init(t,e),Ye(t._zod,"values",()=>{const r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>ym(s,t)):ym(i,t)}});function ym(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}const zS=Q("$ZodCatch",(t,e)=>{Rt.init(t,e),Ye(t._zod,"optin",()=>e.innerType._zod.optin),Ye(t._zod,"optout",()=>e.innerType._zod.optout),Ye(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.value,s.issues.length&&(r.value=e.catchValue({...r,error:{issues:s.issues.map(o=>Fi(o,n,Ni()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(s=>Fi(s,n,Ni()))},input:r.value}),r.issues=[]),r)}}),ZS=Q("$ZodPipe",(t,e)=>{Rt.init(t,e),Ye(t._zod,"values",()=>e.in._zod.values),Ye(t._zod,"optin",()=>e.in._zod.optin),Ye(t._zod,"optout",()=>e.out._zod.optout),Ye(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=e.out._zod.run(r,n);return s instanceof Promise?s.then(o=>Xa(o,e.in,n)):Xa(s,e.in,n)}const i=e.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Xa(s,e.out,n)):Xa(i,e.out,n)}});function Xa(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}const VS=Q("$ZodReadonly",(t,e)=>{Rt.init(t,e),Ye(t._zod,"propValues",()=>e.innerType._zod.propValues),Ye(t._zod,"values",()=>e.innerType._zod.values),Ye(t._zod,"optin",()=>e.innerType?._zod?.optin),Ye(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(_m):_m(i)}});function _m(t){return t.value=Object.freeze(t.value),t}const US=Q("$ZodCustom",(t,e)=>{sn.init(t,e),Rt.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{const n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(s=>bm(s,r,n,t));bm(i,r,n,t)}});function bm(t,e,r,n){if(!t){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),e.issues.push(Eo(i))}}var wm;class BS{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){const n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){const r=e._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function jS(){return new BS}(wm=globalThis).__zod_globalRegistry??(wm.__zod_globalRegistry=jS());const To=globalThis.__zod_globalRegistry;function qS(t,e){return new t({type:"string",...Oe(e)})}function WS(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...Oe(e)})}function km(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...Oe(e)})}function HS(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...Oe(e)})}function KS(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Oe(e)})}function GS(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Oe(e)})}function YS(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Oe(e)})}function JS(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...Oe(e)})}function QS(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...Oe(e)})}function XS(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...Oe(e)})}function ex(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...Oe(e)})}function tx(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...Oe(e)})}function rx(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...Oe(e)})}function nx(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...Oe(e)})}function ix(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...Oe(e)})}function sx(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...Oe(e)})}function ox(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...Oe(e)})}function ax(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Oe(e)})}function lx(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Oe(e)})}function cx(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...Oe(e)})}function ux(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...Oe(e)})}function dx(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...Oe(e)})}function fx(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...Oe(e)})}function hx(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Oe(e)})}function px(t,e){return new t({type:"string",format:"date",check:"string_format",...Oe(e)})}function mx(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...Oe(e)})}function gx(t,e){return new t({type:"string",format:"duration",check:"string_format",...Oe(e)})}function Sm(t,e){return new Kk({check:"max_length",...Oe(e),maximum:t})}function el(t,e){return new Gk({check:"min_length",...Oe(e),minimum:t})}function xm(t,e){return new Yk({check:"length_equals",...Oe(e),length:t})}function vx(t,e){return new Jk({check:"string_format",format:"regex",...Oe(e),pattern:t})}function yx(t){return new Qk({check:"string_format",format:"lowercase",...Oe(t)})}function _x(t){return new Xk({check:"string_format",format:"uppercase",...Oe(t)})}function bx(t,e){return new eS({check:"string_format",format:"includes",...Oe(e),includes:t})}function wx(t,e){return new tS({check:"string_format",format:"starts_with",...Oe(e),prefix:t})}function kx(t,e){return new rS({check:"string_format",format:"ends_with",...Oe(e),suffix:t})}function gs(t){return new nS({check:"overwrite",tx:t})}function Sx(t){return gs(e=>e.normalize(t))}function xx(){return gs(t=>t.trim())}function Ex(){return gs(t=>t.toLowerCase())}function Tx(){return gs(t=>t.toUpperCase())}function Ax(){return gs(t=>uk(t))}function Cx(t,e,r){return new t({type:"array",element:e,...Oe(r)})}function Ox(t,e,r){return new t({type:"custom",check:"custom",fn:e,...Oe(r)})}function Dx(t){const e=Ix(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Eo(n,r.value,e._zod.def));else{const i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),i.continue??(i.continue=!e._zod.def.abort),r.issues.push(Eo(i))}},t(r.value,r)));return e}function Ix(t,e){const r=new sn({check:"custom",...Oe(e)});return r._zod.check=t,r}function Em(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??To,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function Lt(t,e,r={path:[],schemaPath:[]}){var n;const i=t._zod.def,s=e.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;const o={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,o);const a=t._zod.toJSONSchema?.();if(a)o.schema=a;else{const u={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,o.schema,u);else{const f=o.schema,p=e.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(t,e,f,u)}const d=t._zod.parent;d&&(o.ref||(o.ref=d),Lt(d,e,u),e.seen.get(d).isParent=!0)}const l=e.metadataRegistry.get(t);return l&&Object.assign(o.schema,l),e.io==="input"&&zt(t)&&(delete o.schema.examples,delete o.schema.default),e.io==="input"&&o.schema._prefault&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,e.seen.get(t).schema}function Tm(t,e){const r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const o of t.seen.entries()){const a=t.metadataRegistry.get(o[0])?.id;if(a){const l=n.get(a);if(l&&l!==o[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,o[0])}}const i=o=>{const a=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const d=t.external.registry.get(o[0])?.id,f=t.external.uri??(v=>v);if(d)return{ref:f(d)};const p=o[1].defId??o[1].schema.id??`schema${t.counter++}`;return o[1].defId=p,{defId:p,ref:`${f("__shared")}#/${a}/${p}`}}if(o[1]===r)return{ref:"#"};const c=`#/${a}/`,u=o[1].schema.id??`__schema${t.counter++}`;return{defId:u,ref:c+u}},s=o=>{if(o[1].schema.$ref)return;const a=o[1],{ref:l,defId:c}=i(o);a.def={...a.schema},c&&(a.defId=c);const u=a.schema;for(const d in u)delete u[d];u.$ref=l};if(t.cycles==="throw")for(const o of t.seen.entries()){const a=o[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
4
4
|
|
|
5
5
|
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of t.seen.entries()){const a=o[1];if(e===o[0]){s(o);continue}if(t.external){const c=t.external.registry.get(o[0])?.id;if(e!==o[0]&&c){s(o);continue}}if(t.metadataRegistry.get(o[0])?.id){s(o);continue}if(a.cycle){s(o);continue}if(a.count>1&&t.reused==="ref"){s(o);continue}}}function Am(t,e){const r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=o=>{const a=t.seen.get(o);if(a.ref===null)return;const l=a.def??a.schema,c={...l},u=a.ref;if(a.ref=null,u){n(u);const f=t.seen.get(u),p=f.schema;if(p.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(p)):Object.assign(l,p),Object.assign(l,c),o._zod.parent===u)for(const g in l)g==="$ref"||g==="allOf"||g in c||delete l[g];if(p.$ref&&f.def)for(const g in l)g==="$ref"||g==="allOf"||g in f.def&&JSON.stringify(l[g])===JSON.stringify(f.def[g])&&delete l[g]}const d=o._zod.parent;if(d&&d!==u){n(d);const f=t.seen.get(d);if(f?.schema.$ref&&(l.$ref=f.schema.$ref,f.def))for(const p in l)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(l[p])===JSON.stringify(f.def[p])&&delete l[p]}t.override({zodSchema:o,jsonSchema:l,path:a.path??[]})};for(const o of[...t.seen.entries()].reverse())n(o[0]);const i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){const o=t.external.registry.get(e)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(o)}Object.assign(i,r.def??r.schema);const s=t.external?.defs??{};for(const o of t.seen.entries()){const a=o[1];a.def&&a.defId&&(s[a.defId]=a.def)}t.external||Object.keys(s).length>0&&(t.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...e["~standard"],jsonSchema:{input:tl(e,"input",t.processors),output:tl(e,"output",t.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function zt(t,e){const r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);const n=t._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return zt(n.element,r);if(n.type==="set")return zt(n.valueType,r);if(n.type==="lazy")return zt(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 zt(n.innerType,r);if(n.type==="intersection")return zt(n.left,r)||zt(n.right,r);if(n.type==="record"||n.type==="map")return zt(n.keyType,r)||zt(n.valueType,r);if(n.type==="pipe")return zt(n.in,r)||zt(n.out,r);if(n.type==="object"){for(const i in n.shape)if(zt(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(zt(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(zt(i,r))return!0;return!!(n.rest&&zt(n.rest,r))}return!1}const Px=(t,e={})=>r=>{const n=Em({...r,processors:e});return Lt(t,n),Tm(n,t),Am(n,t)},tl=(t,e,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},o=Em({...i??{},target:s,io:e,processors:r});return Lt(t,o),Tm(o,t),Am(o,t)},Mx={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},$x=(t,e,r,n)=>{const i=r;i.type="string";const{minimum:s,maximum:o,format:a,patterns:l,contentEncoding:c}=t._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof o=="number"&&(i.maxLength=o),a&&(i.format=Mx[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){const u=[...l];u.length===1?i.pattern=u[0].source:u.length>1&&(i.allOf=[...u.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Nx=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Fx=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Rx=(t,e,r,n)=>{const i=r,s=t._zod.def,{minimum:o,maximum:a}=t._zod.bag;typeof o=="number"&&(i.minItems=o),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=Lt(s.element,e,{...n,path:[...n.path,"items"]})},Lx=(t,e,r,n)=>{const i=t._zod.def,s=i.inclusive===!1,o=i.options.map((a,l)=>Lt(a,e,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=o:r.anyOf=o},zx=(t,e,r,n)=>{const i=t._zod.def,s=Lt(i.left,e,{...n,path:[...n.path,"allOf",0]}),o=Lt(i.right,e,{...n,path:[...n.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,l=[...a(s)?s.allOf:[s],...a(o)?o.allOf:[o]];r.allOf=l},Zx=(t,e,r,n)=>{const i=t._zod.def,s=Lt(i.innerType,e,n),o=e.seen.get(t);e.target==="openapi-3.0"?(o.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},Vx=(t,e,r,n)=>{const i=t._zod.def;Lt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType},Ux=(t,e,r,n)=>{const i=t._zod.def;Lt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},Bx=(t,e,r,n)=>{const i=t._zod.def;Lt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},jx=(t,e,r,n)=>{const i=t._zod.def;Lt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=o},qx=(t,e,r,n)=>{const i=t._zod.def,s=e.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Lt(s,e,n);const o=e.seen.get(t);o.ref=s},Wx=(t,e,r,n)=>{const i=t._zod.def;Lt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType,r.readOnly=!0},Cm=(t,e,r,n)=>{const i=t._zod.def;Lt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType},Hx=Q("ZodISODateTime",(t,e)=>{gS.init(t,e),lt.init(t,e)});function Kx(t){return hx(Hx,t)}const Gx=Q("ZodISODate",(t,e)=>{vS.init(t,e),lt.init(t,e)});function Yx(t){return px(Gx,t)}const Jx=Q("ZodISOTime",(t,e)=>{yS.init(t,e),lt.init(t,e)});function Qx(t){return mx(Jx,t)}const Xx=Q("ZodISODuration",(t,e)=>{_S.init(t,e),lt.init(t,e)});function eE(t){return gx(Xx,t)}const xr=Q("ZodError",(t,e)=>{sm.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>pk(t,r)},flatten:{value:r=>hk(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,yu,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,yu,2)}},isEmpty:{get(){return t.issues.length===0}}})},{Parent:Error}),tE=xu(xr),rE=Eu(xr),nE=Ya(xr),iE=Ja(xr),sE=vk(xr),oE=yk(xr),aE=_k(xr),lE=bk(xr),cE=wk(xr),uE=kk(xr),dE=Sk(xr),fE=xk(xr),Zt=Q("ZodType",(t,e)=>(Rt.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:tl(t,"input"),output:tl(t,"output")}}),t.toJSONSchema=Px(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone(ck(e,{checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),t.with=t.check,t.clone=(r,n)=>dk(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.parse=(r,n)=>tE(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>nE(t,r,n),t.parseAsync=async(r,n)=>rE(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>iE(t,r,n),t.spa=t.safeParseAsync,t.encode=(r,n)=>sE(t,r,n),t.decode=(r,n)=>oE(t,r,n),t.encodeAsync=async(r,n)=>aE(t,r,n),t.decodeAsync=async(r,n)=>lE(t,r,n),t.safeEncode=(r,n)=>cE(t,r,n),t.safeDecode=(r,n)=>uE(t,r,n),t.safeEncodeAsync=async(r,n)=>dE(t,r,n),t.safeDecodeAsync=async(r,n)=>fE(t,r,n),t.refine=(r,n)=>t.check(eT(r,n)),t.superRefine=r=>t.check(tT(r)),t.overwrite=r=>t.check(gs(r)),t.optional=()=>Im(t),t.exactOptional=()=>VE(t),t.nullable=()=>Pm(t),t.nullish=()=>Im(Pm(t)),t.nonoptional=r=>KE(t,r),t.array=()=>PE(t),t.or=r=>$E([t,r]),t.and=r=>FE(t,r),t.transform=r=>Mm(t,LE(r)),t.default=r=>jE(t,r),t.prefault=r=>WE(t,r),t.catch=r=>YE(t,r),t.pipe=r=>Mm(t,r),t.readonly=()=>XE(t),t.describe=r=>{const n=t.clone();return To.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){return To.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return To.get(t);const n=t.clone();return To.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=r=>r(t),t)),Om=Q("_ZodString",(t,e)=>{Tu.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(n,i,s)=>$x(t,n,i);const r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...n)=>t.check(vx(...n)),t.includes=(...n)=>t.check(bx(...n)),t.startsWith=(...n)=>t.check(wx(...n)),t.endsWith=(...n)=>t.check(kx(...n)),t.min=(...n)=>t.check(el(...n)),t.max=(...n)=>t.check(Sm(...n)),t.length=(...n)=>t.check(xm(...n)),t.nonempty=(...n)=>t.check(el(1,...n)),t.lowercase=n=>t.check(yx(n)),t.uppercase=n=>t.check(_x(n)),t.trim=()=>t.check(xx()),t.normalize=(...n)=>t.check(Sx(...n)),t.toLowerCase=()=>t.check(Ex()),t.toUpperCase=()=>t.check(Tx()),t.slugify=()=>t.check(Ax())}),hE=Q("ZodString",(t,e)=>{Tu.init(t,e),Om.init(t,e),t.email=r=>t.check(WS(pE,r)),t.url=r=>t.check(JS(mE,r)),t.jwt=r=>t.check(fx(DE,r)),t.emoji=r=>t.check(QS(gE,r)),t.guid=r=>t.check(km(Dm,r)),t.uuid=r=>t.check(HS(nl,r)),t.uuidv4=r=>t.check(KS(nl,r)),t.uuidv6=r=>t.check(GS(nl,r)),t.uuidv7=r=>t.check(YS(nl,r)),t.nanoid=r=>t.check(XS(vE,r)),t.guid=r=>t.check(km(Dm,r)),t.cuid=r=>t.check(ex(yE,r)),t.cuid2=r=>t.check(tx(_E,r)),t.ulid=r=>t.check(rx(bE,r)),t.base64=r=>t.check(cx(AE,r)),t.base64url=r=>t.check(ux(CE,r)),t.xid=r=>t.check(nx(wE,r)),t.ksuid=r=>t.check(ix(kE,r)),t.ipv4=r=>t.check(sx(SE,r)),t.ipv6=r=>t.check(ox(xE,r)),t.cidrv4=r=>t.check(ax(EE,r)),t.cidrv6=r=>t.check(lx(TE,r)),t.e164=r=>t.check(dx(OE,r)),t.datetime=r=>t.check(Kx(r)),t.date=r=>t.check(Yx(r)),t.time=r=>t.check(Qx(r)),t.duration=r=>t.check(eE(r))});function rl(t){return qS(hE,t)}const lt=Q("ZodStringFormat",(t,e)=>{nt.init(t,e),Om.init(t,e)}),pE=Q("ZodEmail",(t,e)=>{aS.init(t,e),lt.init(t,e)}),Dm=Q("ZodGUID",(t,e)=>{sS.init(t,e),lt.init(t,e)}),nl=Q("ZodUUID",(t,e)=>{oS.init(t,e),lt.init(t,e)}),mE=Q("ZodURL",(t,e)=>{lS.init(t,e),lt.init(t,e)}),gE=Q("ZodEmoji",(t,e)=>{cS.init(t,e),lt.init(t,e)}),vE=Q("ZodNanoID",(t,e)=>{uS.init(t,e),lt.init(t,e)}),yE=Q("ZodCUID",(t,e)=>{dS.init(t,e),lt.init(t,e)}),_E=Q("ZodCUID2",(t,e)=>{fS.init(t,e),lt.init(t,e)}),bE=Q("ZodULID",(t,e)=>{hS.init(t,e),lt.init(t,e)}),wE=Q("ZodXID",(t,e)=>{pS.init(t,e),lt.init(t,e)}),kE=Q("ZodKSUID",(t,e)=>{mS.init(t,e),lt.init(t,e)}),SE=Q("ZodIPv4",(t,e)=>{bS.init(t,e),lt.init(t,e)}),xE=Q("ZodIPv6",(t,e)=>{wS.init(t,e),lt.init(t,e)}),EE=Q("ZodCIDRv4",(t,e)=>{kS.init(t,e),lt.init(t,e)}),TE=Q("ZodCIDRv6",(t,e)=>{SS.init(t,e),lt.init(t,e)}),AE=Q("ZodBase64",(t,e)=>{xS.init(t,e),lt.init(t,e)}),CE=Q("ZodBase64URL",(t,e)=>{TS.init(t,e),lt.init(t,e)}),OE=Q("ZodE164",(t,e)=>{AS.init(t,e),lt.init(t,e)}),DE=Q("ZodJWT",(t,e)=>{OS.init(t,e),lt.init(t,e)}),IE=Q("ZodArray",(t,e)=>{DS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Rx(t,r,n,i),t.element=e.element,t.min=(r,n)=>t.check(el(r,n)),t.nonempty=r=>t.check(el(1,r)),t.max=(r,n)=>t.check(Sm(r,n)),t.length=(r,n)=>t.check(xm(r,n)),t.unwrap=()=>t.element});function PE(t,e){return Cx(IE,t,e)}const ME=Q("ZodUnion",(t,e)=>{IS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Lx(t,r,n,i),t.options=e.options});function $E(t,e){return new ME({type:"union",options:t,...Oe(e)})}const NE=Q("ZodIntersection",(t,e)=>{PS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>zx(t,r,n,i)});function FE(t,e){return new NE({type:"intersection",left:t,right:e})}const RE=Q("ZodTransform",(t,e)=>{MS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Fx(t,r),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Xp(t.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Eo(s,r.value,e));else{const o=s;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),r.issues.push(Eo(o))}};const i=e.transform(r.value,r);return i instanceof Promise?i.then(s=>(r.value=s,r)):(r.value=i,r)}});function LE(t){return new RE({type:"transform",transform:t})}const zE=Q("ZodOptional",(t,e)=>{gm.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Cm(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Im(t){return new zE({type:"optional",innerType:t})}const ZE=Q("ZodExactOptional",(t,e)=>{$S.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Cm(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function VE(t){return new ZE({type:"optional",innerType:t})}const UE=Q("ZodNullable",(t,e)=>{NS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Zx(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Pm(t){return new UE({type:"nullable",innerType:t})}const BE=Q("ZodDefault",(t,e)=>{FS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Ux(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function jE(t,e){return new BE({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():nm(e)}})}const qE=Q("ZodPrefault",(t,e)=>{RS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Bx(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function WE(t,e){return new qE({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():nm(e)}})}const HE=Q("ZodNonOptional",(t,e)=>{LS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Vx(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function KE(t,e){return new HE({type:"nonoptional",innerType:t,...Oe(e)})}const GE=Q("ZodCatch",(t,e)=>{zS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>jx(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function YE(t,e){return new GE({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}const JE=Q("ZodPipe",(t,e)=>{ZS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>qx(t,r,n,i),t.in=e.in,t.out=e.out});function Mm(t,e){return new JE({type:"pipe",in:t,out:e})}const QE=Q("ZodReadonly",(t,e)=>{VS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Wx(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function XE(t){return new QE({type:"readonly",innerType:t})}const $m=Q("ZodCustom",(t,e)=>{US.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Nx(t,r)});function eT(t,e={}){return Ox($m,t,e)}function tT(t){return Dx(t)}function rT(t,e={}){const r=new $m({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...Oe(e)});return r._zod.bag.Class=t,r._zod.check=n=>{n.value instanceof t||n.issues.push({code:"invalid_type",expected:t.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var nT={salutation:{key:"salutation",apiKey:"customer_salutation_id",type:"select",label:"user.registration.form.customer_salutation_id",placeholder:"",description:"",autocomplete:"honorific-prefix",options:()=>S.customerSalutations.map(t=>({label:t.salutation,value:t.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:rl().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:rl().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:rl().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:()=>S.countries.map(t=>({label:t.name,value:t.id}))},language:{key:"language",apiKey:"language_id",type:"select",label:"user.registration.form.language",placeholder:"",description:"",autocomplete:"language",options:()=>S.locales.map(t=>({label:S.t(`languages.${t.locale}`),value:t.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:rl().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:rT(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:()=>(S.payment_modes?Object.values(S.payment_modes):[]).map(e=>({value:String(e.id),label:e.name}))}};function iT(t,e){return{...t,errors:t.errors||[],value:t.value??sT(t.type),options:t.options,autocomplete:t.autocomplete??"",placeholder:t.placeholder??"",description:t.description,apiErrors:t.apiErrors??[],mounted:t.mounted??!1,required:e,validate(){oT(this)}}}function sT(t){return t==="checkbox"?!1:t==="file"?null:""}function oT(t){if(t.errors=[],!t.validator){t.required&&(t.value===!1||t.value===""||t.value===null||t.value===void 0)&&(t.errors=["common.fieldErrors.required"]);return}const e=t.validator.safeParse(t.value);e.success?t.errors=[]:t.errors=e.error.format()._errors}const $s=class $s{static defineForm(e){at.default({forms:{[e.id]:{fields:e.fields,submitLabel:e.submitLabel}}})}static defineFields(e){at.default({fields:e})}static setRequiredApiKeys(e,r){Ry($s,Gl)[e]=r}static getFormOptions(e){return at.config.forms[e]}static createField(e,r){const n=$s.getFieldInit(e);if(!n)throw new Error(`(formFields) Field "${e}" not found`);return iT(n,r)}static getFormFields(e){return aT(e)}static getFieldInit(e){return at.config.fields[e]}};Gl=new WeakMap,Ly($s,Gl,{}),$s.defineFields(nT);let er=$s;function aT(t){const e=at.config.forms[t];if(!e)throw new Error(`(formFields) Form ${t} not found`);const r=e.fields;return r||(console.warn("(formFields) No fields defined for form",t),[])}function Cu(t){return t?t.filter(r=>r.mounted&&(r.errors?.length||r.apiErrors?.length)).length:0}function lT(t,e){te(e,!0);let r=_(e,"token",7),n=_(e,"ticketSaleId",7),i;const s=new Yp;Qp(e.$$host,s),_e(()=>{s.token=r(),s.ticketSaleId=n()}),er.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function o(){if(!i)return;const g=s.ticketSale.personalizations.length,m=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),b=Gh(g,(A,O)=>{const F=m[O-1].details;return A.push(F),A},[]);if(b.forEach(A=>{A.fields.forEach(O=>{A.validateField(O)})}),!Gh(g,(A,O)=>b[O-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const A=b.map(async(N,j)=>{const G=s.ticketSale.personalizations[j].id,ue=N.fields.find(K=>K.key==="photo")?.value;if(!(ue instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const me=await S.uploadPersonalizationPhoto(r(),G,ue);return me.error?{ok:!1,error:me.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),F=(await Promise.all(A)).find(N=>!N.ok);if(F){i.details.apiErrors=[F.error];return}}const D={personalization:{ticket_sale_id:s.ticketSaleId,start_at:i.details.formData.start_at,personalizations:b.map((A,O)=>{const F=Db(A.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[O].id,customer:F}})}},T=await S.finalizePersonalizations(r(),D);if(T.error){i.details.apiErrors=[T.error.error];return}const P=at.config.forms.personalization?.beforeSubmit;P&&P(D),at.config.urls.annualTicketPersonalizationFormSubmit?.()&&at.config.navigateTo(at.config.urls.annualTicketPersonalizationFormSubmit())}let a=null,l=null,c=null,u=0;function d(g){g.querySelectorAll("go-field").forEach(m=>m.replaceChildren())}function f(){return a?!0:(a=e.$$host.querySelector("go-personalization-form"),a?(l=a.cloneNode(!0),d(l),c=new Comment("go-personalization-form-anchor"),a.after(c),!0):(console.warn("[personalization] No <go-personalization-form> supplied"),!1))}function p(g){if(!f()||!a||!l||!c)return;const m=a.parentElement;if(!m)return;const b=Math.max(g,1),k=Array.from(m.querySelectorAll("go-personalization-form"));for(;k.length<b;){const T=l.cloneNode(!0);d(T),m.insertBefore(T,c),k.push(T)}for(;k.length>b;){const T=k.pop();T&&T!==a&&T.remove()}const D=s.ticketSale?.personalizations??[];k.forEach((T,P)=>{const A=D[P];A&&(T.dataset.personalizationId=String(A.id))}),u=b}Sn(()=>{f(),e.$$host.addEventListener("go-submit",o),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),_e(()=>{if(!s.ticketSale)return;const m=s.ticketSale?.personalizations.length??1;m!==u&&p(m)});var v={details:s,get token(){return r()},set token(g){r(g),y()},get ticketSaleId(){return n()},set ticketSaleId(g){n(g),y()}};return re(v)}customElements.define("go-annual-ticket-personalization-form",ne(lT,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));class cT{constructor(e,r){this.formId=e,this.form=r}#e=le(Be([]));#t=C(()=>Cu(this.fields)==0);get isValid(){return h(this.#t)}set isValid(e){M(this.#t,e)}#r=le();get successMessage(){return h(this.#r)}set successMessage(e){M(this.#r,e,!0)}get formData(){function e(i){return Eb(i)||Sb(i)?i:i==="true"||i==="false"?i==="true":!Number.isNaN(+i)&&i.trim()!==""?+i:i}const r=this.fields.filter(i=>i!==void 0).filter(i=>i.type!=="file").filter(i=>i.value!=="");return Object.fromEntries(r.map(i=>[i.apiKey,e(i.value)]))}fieldValue(e){return this.fields.find(r=>r.key===e)?.value}get apiErrors(){return h(this.#e)}set apiErrors(e){if(this.fields.forEach(r=>r.apiErrors=[]),Zc(e)){M(this.#e,e,!0);return}if(e.errors&&Zc(e.errors)&&M(this.#e,e.errors,!0),xb(e.error)){M(this.#e,[e.error],!0);return}for(const[r,n]of Object.entries(e)){if(r==="full_messages"||r==="success"||r==="errors")continue;const i=this.fields.find(s=>s.apiKey===r);if(!i){console.error(`(set apiErrors) Field with API key ${r} not found`);continue}i.apiErrors=n}}validateForm(){this.fields.forEach(e=>this.validateField(e))}validateField(e){if(e.validate(),e.apiKey==="password_confirmation"){const r=this.fields.find(n=>n.apiKey==="password");(!r||r&&e.value!==r.value)&&e.errors.push("user.fieldErrors.passwordMatch")}else if(e.apiKey==="email_confirmation"){const r=this.fields.find(n=>n.apiKey==="email");(!r||r&&e.value!==r.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(r=>r.closest("go-form")===e).map(r=>r.getField?.()).filter(r=>r)}toString(){return`Form: ${this.formId}, Fields: [${this.fields.map(e=>e.key).join(", ")}], Data: ${JSON.stringify(this.formData)}`}fill(e){const r=this.fields;Object.entries(e).forEach(([n,i])=>{const s=r.find(o=>o.apiKey===n);if(!s){console.warn(`(FormDetails.fill) Field with API key ${n} not found.`);return}if(s.type==="select"&&!s.options?.().find(o=>o.value===i))throw new Error(`(FormDetails.fill) Field ${n} has invalid value: ${i}`);if(s.type==="checkbox"&&![!0,!1].includes(i))throw new Error(`(FormDetails.fill) Field ${n} has invalid value: ${i}`);s.value=i})}}const Nm="go-form-details",uT=fs(Nm),vs=hs(Nm);function ui(t,e,r){const n=t.firstElementChild||void 0;if(t.children?.length===1&&n?.tagName.toLowerCase()===e)return n;const i=document.createElement(e);r&&Object.entries(r).forEach(([o,a])=>{typeof a=="boolean"?a&&i.setAttribute(o,""):i.setAttribute(o,a)});const s=document.createDocumentFragment();for(;t.firstChild;)s.appendChild(t.firstChild);return i.appendChild(s),t.replaceChildren(i),i}var dT=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 fT(t,e){te(e,!0);let r=_(e,"formId",7),n=_(e,"custom",7);const i=new cT(r(),e.$$host);uT(e.$$host,i);async function s(u){u.preventDefault(),u.stopPropagation(),i.validateForm(),i?.form?.dispatchEvent(new Event("go-after-validation",u)),i.isValid&&(i.apiErrors={},i?.form?.dispatchEvent(new Event("go-submit",u)),e.$$host.dispatchEvent(new Event("submit",{bubbles:!0,composed:!0})))}Sn(()=>{const u=ui(e.$$host,"form",{novalidate:!0});u.addEventListener("submit",s),i.form=u});var o={details:i,get formId(){return r()},set formId(u){r(u),y()},get custom(){return n()},set custom(u){n(u),y()}},a=H(),l=L(a);{var c=u=>{var d=dT(),f=L(d),p=ee(f,2),v=ee(p,2),g=$(v,!0);I(v),ce(m=>se(g,m),[()=>S.t(er.getFormOptions(r())?.submitLabel||"Submit")]),w(u,d)};de(l,u=>{n()||u(c)})}return w(t,a),re(o)}customElements.define("go-form",ne(fT,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var hT=q("<go-form></go-form>",2);function pT(t,e){te(e,!0);let r=_(e,"custom",7,!1);er.defineForm({id:"passwordReset",submitLabel:"user.passwordReset.actions.requestPasswordReset",fields:[{key:"email",required:!0}]});async function n(o){const l=o.target.details,c=await S.passwordReset(l.formData);c.data?(e.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),l.successMessage=c.data.message,l.apiErrors=[]):l.apiErrors=c.error.errors}var i={get custom(){return r()},set custom(o=!1){r(o),y()}},s=hT();return Ei(s,"formId","passwordReset"),ce(()=>Ei(s,"custom",r())),Ec("submit",s,n),w(t,s),re(i)}customElements.define("go-password-reset",ne(pT,{custom:{}},[],[]));function mT(t,e){te(e,!0),er.defineForm({id:"signIn",submitLabel:"common.actions.login",fields:[{key:"email",required:!0},{key:"password",required:!0}]});let r=_(e,"custom",7,!1);async function n(s){const a=s.target.details,l=await S.signIn(a.formData);l.data?e.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=l.error.errors}ui(e.$$host,"go-form",{"form-id":"signIn",custom:r()}),e.$$host.addEventListener("submit",n);var i={get custom(){return r()},set custom(s=!1){r(s),y()}};return re(i)}customElements.define("go-sign-in",ne(mT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function gT(t,e){te(e,!0);let r=_(e,"custom",7,!1);er.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(s){const a=s.target.details,l=await S.signUp(a.formData,!1);l.data?e.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=l.error.errors}ui(e.$$host,"go-form",{"form-id":"signUp",custom:r()}),e.$$host.addEventListener("submit",n);var i={get custom(){return r()},set custom(s=!1){r(s),y()}};return re(i)}customElements.define("go-sign-up",ne(gT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function vT(t,e){if(typeof t=="number"&&Number.isFinite(t))return t;if(t&&typeof t=="object"){const r=Object.values(t).reduce((n,i)=>typeof i=="number"&&Number.isFinite(i)?n+i:n,0);if(r>0)return r}return e}function Fm(t){return"quantity"in t&&t.quantity!==void 0?t.quantity:t.quantities}function yT(t){return vT(Fm(t),0)}function _T(t){const e=Fm(t);if(e&&typeof e=="object"){const r=Object.keys(e);if(r.length>0)return Number(r[0])}}function bT(t,e){const r=us(),n=new Set;return t.coupons.forEach(i=>r.addCoupon(i)),e.forEach(i=>{const s=i.attributes,o=_T(s),a=t.items.find(l=>l.type.toLowerCase()===i.type.toLowerCase()&&l.product.id===s.id&&(!s.time||l.time===s.time)&&(o===void 0||So(l.product)&&l.product.scale_price_id===o));if(!a){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:s});return}s.coupon&&(r.addCoupon(s.coupon),n.add(s.coupon)),r.addItem(wT(a,s))}),{cart:r,appliedCoupons:n}}function wT(t,e){const r=yT(e),n=e.price_cents??t.product.price_cents,i=t.product.price_cents,s=n<i,o={...t.product,price_cents:n};return xt(o,{quantity:r,time:t.time,display:{discounted:s,reference_uuid:t.uuid,originalPrice:i}})}class kT{#e=le();get displayCart(){return h(this.#e)}set displayCart(e){M(this.#e,e,!0)}#t=le(Be(new Set));get appliedCoupons(){return h(this.#t)}set appliedCoupons(e){M(this.#t,e,!0)}#r=le(!1);get preview(){return h(this.#r)}set preview(e){M(this.#r,e,!0)}get totalPriceCents(){return this.displayCart?.totalPriceCents??0}get subtotalPriceCents(){return S.cart?.totalPriceCents??0}get discountedAmountCents(){return Math.max(0,this.subtotalPriceCents-this.totalPriceCents)}get isDiscounted(){return this.discountedAmountCents>0}async calculateDisplayCart(){const e=S.cart;if(e)try{const{items:r,coupons:n}=e.orderData(),i=await S.createCart({items:r,coupons:n});if(!i||"error"in i){i&&"error"in i&&console.error("(go-cart) Unable to fetch discounted cart data",i.error),this.displayCart=e;return}const s=bT(e,i.data.items??[]);this.displayCart=s.cart,this.appliedCoupons=s.appliedCoupons}catch(r){console.error("(go-cart) Unable to fetch discounted cart data",r),this.displayCart=e}}}const Rm="go-cart-details",ST=fs(Rm),ys=hs(Rm);var xT=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),ET=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 Lm(t,e){te(e,!0);let r=_(e,"cartItem",7);if(!So(r().product))throw new Error("Product is not an event ticket");const n=r().product;var i={get cartItem(){return r()},set cartItem(p){r(p),y()}},s=ET(),o=L(s),a=$(o),l=$(a,!0);I(a);var c=ee(a),u=$(c,!0);I(c),I(o);var d=ee(o);{var f=p=>{var v=xT(),g=L(v),m=$(g,!0);I(g);var b=ee(g),k=$(b,!0);I(b),ce((D,T)=>{se(m,D),se(k,T)},[()=>ko(r().time,{month:"numeric",day:"numeric"},S.locale),()=>wo(r().time)]),w(p,v)};de(d,p=>{r().time&&p(f)})}return ce(()=>{se(l,n.event_title),se(u,n.title)}),w(t,s),re(i)}ne(Lm,{cartItem:{}},[],[],{mode:"open"});var TT=q('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),AT=q('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),CT=q('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>',1);function zm(t,e){te(e,!0);let r=_(e,"cartItem",7);var n={get cartItem(){return r()},set cartItem(c){r(c),y()}},i=CT(),s=L(i),o=$(s,!0);I(s);var a=ee(s,2);{var l=c=>{var u=AT(),d=L(u),f=$(d,!0);I(d);var p=ee(d,2);{var v=g=>{var m=TT(),b=$(m,!0);I(m),ce(k=>se(b,k),[()=>wo(r().time)]),w(g,m)};de(p,g=>{r().product.subtype==="timeslot"&&g(v)})}ce(g=>se(f,g),[()=>ko(r().time,{month:"numeric",day:"numeric"},S.locale)]),w(c,u)};de(a,c=>{r().time&&c(l)})}return ce(()=>se(o,r().product.title)),w(t,i),re(n)}ne(zm,{cartItem:{}},[],[],{mode:"open"});function Zm(t,e,r={floor:0}){const{floor:n}=r;if(e===0||e===n)return[il(n)];if(e<t)return t>n?[il(t)]:[];const i=Math.max(t,n),s=[il(n)];for(let o=i;o<=e;o++)o!==n&&s.push(il(o));return s}function il(t){return{value:t,label:t.toString()}}var OT=q('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),DT=q('<span class="go-cart-item-price-discounted"> </span>'),IT=q("<span> </span>"),PT=q("<option> </option>"),MT=q('<select class="go-cart-item-select"></select>'),$T=q('<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>'),NT=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>');function Vm(t,e){te(e,!0);let r=_(e,"displayItem",7),n=_(e,"displayCart",7),i=_(e,"preview",7),s=le(void 0);const o=C(()=>S.cart?.items.find(v=>v.uuid===(r().display?.reference_uuid??r().uuid))),a=us();_e(()=>{S.cart?.items.map(v=>v.quantity),Ge(()=>{M(s,S.capacityManager.capacity(n(),r(),a),!0)})});function l(v){const g=v;if(!h(o)){console.error("(CartItem) Could not find main item for line",r());return}const m=parseInt(g.value,10);h(o).quantity=Math.max(0,h(o).quantity-r().quantity+m)}function c(){if(!h(o)){console.error("(CartItem) Could not find main item for line",r());return}const v=Math.max(0,h(o).quantity-r().quantity);v===0?S.cart?.deleteItem(h(o)):h(o).quantity=v}var u={get displayItem(){return r()},set displayItem(v){r(v),y()},get displayCart(){return n()},set displayCart(v){n(v),y()},get preview(){return i()},set preview(v){i(v),y()}},d=H(),f=L(d);{var p=v=>{var g=NT(),m=$(g),b=$(m),k=$(b);{var D=B=>{zm(B,{get cartItem(){return r()}})},T=B=>{var W=H(),Y=L(W);{var ae=X=>{Lm(X,{get cartItem(){return r()}})};de(Y,X=>{r().product.type==="Event"&&X(ae)},!0)}w(B,W)};de(k,B=>{r().product.type==="Ticket"?B(D):B(T,!1)})}I(b);var P=ee(b,2),A=$(P);{var O=B=>{var W=OT(),Y=L(W),ae=$(Y,!0);I(Y);var X=ee(Y,2),ye=$(X,!0);I(X),ce((V,pe)=>{se(ae,V),se(ye,pe)},[()=>Sr(r().display.originalPrice),()=>Sr(r().final_price_cents)]),w(B,W)},F=B=>{var W=DT(),Y=$(W,!0);I(W),ce(ae=>se(Y,ae),[()=>Sr(r().final_price_cents)]),w(B,W)};de(A,B=>{r().display?.discounted?B(O):B(F,!1)})}I(P);var N=ee(P,2),j=$(N);{var G=B=>{var W=IT(),Y=$(W,!0);I(W),ce(()=>se(Y,r().quantity)),w(B,W)},Z=B=>{var W=MT();W.__change=Y=>l(Y.target),Ke(W,21,()=>Zm(h(s).min,h(s).max,{floor:1}),Y=>Y.value,(Y,ae)=>{var X=PT(),ye=$(X,!0);I(X);var V={};ce(()=>{Ic(X,r().quantity===h(ae).value),se(ye,h(ae).label),V!==(V=h(ae).value)&&(X.value=(X.__value=h(ae).value)??"")}),w(Y,X)}),I(W),ce(Y=>Te(W,"aria-label",Y),[()=>S.t("cart.content.table.edit")]),w(B,W)};de(j,B=>{i()?B(G):B(Z,!1)})}I(N);var ue=ee(N,2);{var me=B=>{var W=$T(),Y=$(W);Y.__click=c,I(W),ce(ae=>Te(Y,"aria-label",ae),[()=>S.t("cart.item.remove")]),w(B,W)};de(ue,B=>{i()||B(me)})}var K=ee(ue,2),J=$(K,!0);I(K),I(m),I(g),ce(B=>se(J,B),[()=>Sr(r().total_price_cents)]),w(v,g)};de(f,v=>{h(s)&&v(p)})}return w(t,d),re(u)}Hr(["change","click"]),ne(Vm,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var FT=q('<li class="go-cart-header-remove"></li>'),RT=q('<li class="go-cart-item"><!></li>'),LT=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 zT(t,e){te(e,!0);const r=ys(e.$$host),n=C(()=>r.value);var i=H(),s=L(i);{var o=a=>{var l=LT(),c=$(l),u=$(c),d=$(u),f=$(d,!0);I(d);var p=ee(d,2),v=$(p,!0);I(p);var g=ee(p,2),m=$(g,!0);I(g);var b=ee(g,2);{var k=A=>{var O=FT();w(A,O)};de(b,A=>{h(n).preview||A(k)})}var D=ee(b,2),T=$(D,!0);I(D),I(u),I(c);var P=ee(c,2);Ke(P,17,()=>h(n).displayCart.items,A=>A.uuid,(A,O)=>{var F=RT(),N=$(F);Vm(N,{get displayItem(){return h(O)},get displayCart(){return h(n).displayCart},get preview(){return h(n).preview}}),I(F),w(A,F)}),I(l),ce((A,O,F,N)=>{se(f,A),se(v,O),se(m,F),se(T,N)},[()=>S.t("cart.content.table.desc"),()=>S.t("cart.content.table.price"),()=>S.t("cart.content.table.quantity"),()=>S.t("cart.content.table.total")]),w(a,l)};de(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.items.length&&a(o)})}w(t,i),re()}customElements.define("go-cart-items",ne(zT,{},[],[]));var ZT=q('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),VT=q('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),UT=q('<ol data-testid="cart-coupons"></ol>');function BT(t,e){te(e,!0);const r=ys(e.$$host),n=C(()=>r.value);var i=H(),s=L(i);{var o=a=>{var l=UT();Ke(l,20,()=>h(n).displayCart.coupons,c=>c,(c,u)=>{var d=VT();let f;var p=$(d),v=$(p),g=$(v),m=$(g,!0);I(g);var b=ee(g,2);{var k=D=>{var T=ZT(),P=$(T);P.__click=()=>S.cart?.removeCoupon(u),I(T),ce(A=>Te(P,"aria-label",A),[()=>S.t("cart.coupons.remove")]),w(D,T)};de(b,D=>{h(n).preview||D(k)})}I(v),I(p),I(d),ce(D=>{f=Qt(d,1,"go-cart-coupon",null,f,D),se(m,u)},[()=>({"go-cart-coupon-inactive":!h(n).appliedCoupons.has(u)})]),w(c,d)}),I(l),w(a,l)};de(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.coupons.length>0&&a(o)})}w(t,i),re()}Hr(["click"]),customElements.define("go-cart-coupons",ne(BT,{},[],[]));var jT=q('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function qT(t,e){te(e,!0);const r=ys(e.$$host),n=C(()=>r.value);var i=H(),s=L(i);{var o=a=>{var l=jT(),c=$(l,!0);I(l),ce(u=>se(c,u),[()=>Sr(h(n).totalPriceCents)]),w(a,l)};de(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.items.length&&a(o)})}w(t,i),re()}customElements.define("go-cart-total-amount",ne(qT,{},[],[]));function WT(t,e){te(e,!0);const r=_(e,"preview",7,!1),n=new kT;ST(e.$$host,n),_e(()=>{n.preview=r()}),_e(()=>{S.cart&&(S.cart.items.map(o=>o.uuid+":"+o.quantity+":"+o.time),S.cart.coupons.join("|"),Ge(()=>n.calculateDisplayCart()))});async function i(){const o=e.$$host.querySelectorAll("go-coupon-redemption");let a=!0;for(const l of o){const c=await l.flush?.();c&&!c.success&&(a=!1)}return a}e.$$host.addEventListener("click",async o=>{const a=o.target.closest("go-submit");if(!a)return;const l=a.closest("go-form");if(l&&e.$$host.contains(l))return;const c=await i();e.$$host.dispatchEvent(new CustomEvent("go-submit",{detail:{ok:c},bubbles:!0,composed:!0}))});var s={get preview(){return r()},set preview(o=!1){r(o),y()}};return re(s)}customElements.define("go-cart",ne(WT,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var HT=q('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function KT(t,e){te(e,!0);const r=ys(e.$$host),n=C(()=>r.value);var i=H(),s=L(i);{var o=a=>{var l=HT(),c=$(l,!0);I(l),ce(u=>se(c,u),[()=>Sr(h(n).subtotalPriceCents)]),w(a,l)};de(s,a=>{h(n)&&S.cart?.items.length&&a(o)})}w(t,i),re()}customElements.define("go-cart-subtotal-amount",ne(KT,{},[],[]));var GT=q('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function YT(t,e){te(e,!0);const r=ys(e.$$host),n=C(()=>r.value);var i=H(),s=L(i);{var o=a=>{var l=GT(),c=ee($(l),1,!0);I(l),ce(u=>se(c,u),[()=>Sr(h(n).discountedAmountCents)]),w(a,l)};de(s,a=>{h(n)&&h(n).discountedAmountCents>0&&a(o)})}w(t,i),re()}customElements.define("go-cart-discounted-amount",ne(YT,{},[],[]));function JT(t,e){te(e,!0),ui(e.$$host,"go-if",{when:"data.cart.items.length === 0"}),re()}customElements.define("go-cart-empty",ne(JT,{},[],[]));function QT(t,e){te(e,!0);let r=C(()=>S.cart?.items.length);$t();var n=Jt();ce(()=>se(n,h(r))),w(t,n),re()}customElements.define("go-cart-counter",ne(QT,{},[],[]));function XT(t,e){te(e,!0);let r=_(e,"custom",7,!1),n=C(()=>S.cart);er.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}]}),ui(e.$$host,"go-form",{"form-id":"checkoutGuest",custom:r()}),e.$$host.addEventListener("submit",async s=>{const o=s.target;if(!h(n))return;const a=await S.signUp(o.details.formData,!0);if(a.error){o.details.apiErrors=a.error.errors;return}const l=o.details.fieldValue("paymentMode");h(n).paymentModeId=l==null?void 0:String(l);const c=await S.checkout(h(n).orderData());if(c.error){o.details.apiErrors=c.error;return}const u=at.config.forms.checkoutGuest?.beforeSubmit;u&&await u(o.details.formData);const d=c.data.meta.payment_url;at.config.navigateTo?.(d)});var i={get custom(){return r()},set custom(s=!1){r(s),y()}};return re(i)}customElements.define("go-checkout-form",ne(XT,{custom:{}},[],[]));const e1="TokenActions::ApplyOrderDiscount";async function t1(t){if(!S.cart)throw new Error("(go-coupon-redemption): cart not found");const e=await S.asyncFetch(()=>S.getCouponSaleByBarcode(t));return e?.is_valid?e.value_action===e1?(S.cart.addCoupon(t),{success:!0}):e.is_voucher_for?r1(t,e):Ou([S.t("cart.coupon.form.errors.notValid")]):Ou([S.t("cart.coupon.form.errors.notValid")])}async function r1(t,e){const n=(await S.asyncFetch(()=>S.tickets({"by_ticket_ids[]":[e.is_voucher_for]}))).find(s=>s.id===e.is_voucher_for);if(!n)return Ou([S.t("cart.coupon.form.errors.error")]);const i={...n,price_cents:0};return S.cart.addItem(xt(Wa(i),{quantity:1})),S.cart.addCoupon(t),{success:!0}}function Ou(t){return{success:!1,errors:t}}var n1=q("<go-form></go-form>",2);function i1(t,e){te(e,!0),er.defineForm({id:"couponRedemption",submitLabel:"cart.coupon.form.submit",fields:[{key:"token",required:!0}]});async function r(a){const l=a.details.fields.find(d=>d.key==="token"),c=(a.details.fieldValue("token")??"").trim().toUpperCase();if(!c)return{success:!0};const u=await t1(c);return u.success?(l&&(l.value=""),a.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),u):(a.details.apiErrors=u.errors,u)}async function n(a){await r(a.target)}async function i(){const a=e.$$host.querySelector("go-form");return a?.details?r(a):{success:!0}}var s={flush:i},o=n1();return Ei(o,"formId","couponRedemption"),Ec("submit",o,n),w(t,o),re(s)}customElements.define("go-coupon-redemption",ne(i1,{},[],["flush"])),p_();class s1{#e=le();get campaign(){return h(this.#e)}set campaign(e){M(this.#e,e,!0)}#t=le();get amount(){return h(this.#t)}set amount(e){M(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 r=JSON.parse(localStorage.getItem("201600627v4donations")||"[]");Ti(r.filter(i=>i.campaign_id=e.campaign_id),i=>i.value)+e.value>this.campaign.guest_limit&&this.campaign.guest_limit>0&&(!S.currentUser?.isAuthenticated||S.currentUser.isGuest)?this.skipDonation():(r.push(e),localStorage.setItem("201600627v4donations",JSON.stringify(r)),localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",S.urls.cart()),window.location.replace(S.urls.cart()))};skipDonation=()=>{localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",S.urls.cart()),window.location.replace(S.urls.cart())}}const Vt=new s1;var o1=q('<img alt="logo"/>'),a1=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 Um(t,e){te(e,!0);let r=_(e,"campaign",7);const n=C(()=>r().translations);var i={get campaign(){return r()},set campaign(g){r(g),y()}},s=a1();let o;s.__click=()=>Vt.selectCampaign(r()),s.__keydown=g=>{g.key==="Enter"&&Vt.selectCampaign(r())};var a=$(s),l=$(a);{var c=g=>{var m=o1();ce(b=>Te(m,"src",b),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),w(g,m)};de(l,g=>{r().picture.thumbnail&&g(c)})}I(a);var u=ee(a,2),d=$(u),f=$(d,!0);I(d);var p=ee(d,2),v=$(p,!0);return I(p),I(u),I(s),ce(()=>{o=Qt(s,1,"go-donation-campaign",null,o,{selected:Vt.campaign?.id===r()?.id}),se(f,h(n)["donations.headline"]),se(v,h(n)["donations.shop.info"])}),w(t,s),re(i)}Hr(["click","keydown"]),ne(Um,{campaign:{}},[],[],{mode:"open"});function l1(t,e){return e=="CHF"?new Intl.NumberFormat("de-CH",{style:"currency",currency:e}).format(t):new Intl.NumberFormat("de-DE",{style:"currency",currency:e}).format(t)}function Dn(t){if(!t)return;const e=t.split(",").map(r=>r.trim()).map(Number).filter(r=>!isNaN(r)&&r>0);return e.length>0?e:void 0}var c1=q("<button> </button>"),u1=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>'),d1=q('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function Bm(t,e){te(e,!0);const r=Vt.campaign?.guest_limit/100;let n=le(void 0);function i(f){Vt.amount=f,M(n,null)}function s(f){const p=document.getElementById("donationForm");p.checkValidity()?Vt.amount=f.target.valueAsNumber*100:(Vt.amount=void 0,p.reportValidity())}var o=d1(),a=$(o),l=$(a,!0);I(a);var c=ee(a,2);Ke(c,20,()=>Vt.campaign?.options,f=>f,(f,p)=>{var v=c1();let g;v.__click=()=>i(p);var m=$(v,!0);I(v),ce(b=>{g=Qt(v,1,"btn btn-default",null,g,{selected:Vt.amount===p}),se(m,b)},[()=>l1(p/100,S.currency)]),w(f,v)}),I(c);var u=ee(c,2);{var d=f=>{var p=u1(),v=$(p),g=$(v),m=$(g,!0);I(g);var b=ee(g,2);Ta(b),b.__input=s,I(v),I(p),ce((k,D)=>{se(m,k),Te(b,"max",r),Te(b,"placeholder",D),zh(b,h(n))},[()=>S.t("donations.selection.custom.label"),()=>S.t("donations.selection.custom.input.placeholder")]),w(f,p)};de(u,f=>{Vt.campaign?.free_donations&&f(d)})}I(o),ce(f=>se(l,f),[()=>S.t("donations.selection.title")]),w(t,o),re()}Hr(["click","input"]),ne(Bm,{},[],[],{mode:"open"});var f1=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 h1(t,e){te(e,!1),Sn(()=>{S.donations?.campaigns?.length==1&&Vt.selectCampaign(S.donations?.campaigns[0])}),Lc();var r=H(),n=L(r);{var i=s=>{var o=f1(),a=$(o);Ke(a,1,()=>S?.donations?.campaigns,g=>g.id,(g,m)=>{Um(g,{get campaign(){return h(m)}})});var l=ee(a,2);{var c=g=>{Bm(g,{})};de(l,g=>{Vt.campaign&&g(c)})}var u=ee(l,2),d=$(u);d.__click=function(...g){Vt.skipDonation?.apply(this,g)};var f=$(d,!0);I(d);var p=ee(d,2);p.__click=function(...g){Vt.addDonationToCart?.apply(this,g)};var v=$(p,!0);I(p),I(u),I(o),ce((g,m)=>{se(f,g),p.disabled=!Vt.amount,se(v,m)},[()=>S.t("donations.actions.continueWithoutDonation"),()=>S.t("donations.actions.addToCart")]),w(s,o)};de(n,s=>{S.donations&&S.donations.campaigns&&s(i)})}w(t,r),re()}Hr(["click"]),customElements.define("go-donations",ne(h1,{},[],[]));function p1(t){return typeof t=="function"}function Ao(t){return t!==null&&typeof t=="object"}const m1=["string","number","bigint","boolean"];function Du(t){return t==null||m1.includes(typeof t)?!0:Array.isArray(t)?t.every(e=>Du(e)):typeof t=="object"?Object.getPrototypeOf(t)===Object.prototype:!1}const sl=Symbol("box"),jm=Symbol("is-writable");function R(t,e){const r=C(t);return e?{[sl]:!0,[jm]:!0,get current(){return h(r)},set current(n){e(n)}}:{[sl]:!0,get current(){return t()}}}function qm(t){return Ao(t)&&sl in t}function g1(t){return qm(t)?t:p1(t)?R(t):Nr(t)}function Nr(t){let e=le(Be(t));return{[sl]:!0,[jm]:!0,get current(){return h(e)},set current(r){M(e,r,!0)}}}function Wm(...t){return function(e){for(const r of t)if(r){if(e.defaultPrevented)return;typeof r=="function"?r.call(this,e):r.current?.call(this,e)}}}var Hm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,v1=/\n/g,y1=/^\s*/,_1=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,b1=/^:\s*/,w1=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,k1=/^[;\s]*/,S1=/^\s+|\s+$/g,x1=`
|
|
6
6
|
`,Km="/",Gm="*",Ri="",E1="comment",T1="declaration";function A1(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var r=1,n=1;function i(v){var g=v.match(v1);g&&(r+=g.length);var m=v.lastIndexOf(x1);n=~m?v.length-m:n+v.length}function s(){var v={line:r,column:n};return function(g){return g.position=new o(v),c(),g}}function o(v){this.start=v,this.end={line:r,column:n},this.source=e.source}o.prototype.content=t;function a(v){var g=new Error(e.source+":"+r+":"+n+": "+v);if(g.reason=v,g.filename=e.source,g.line=r,g.column=n,g.source=t,!e.silent)throw g}function l(v){var g=v.exec(t);if(g){var m=g[0];return i(m),t=t.slice(m.length),g}}function c(){l(y1)}function u(v){var g;for(v=v||[];g=d();)g!==!1&&v.push(g);return v}function d(){var v=s();if(!(Km!=t.charAt(0)||Gm!=t.charAt(1))){for(var g=2;Ri!=t.charAt(g)&&(Gm!=t.charAt(g)||Km!=t.charAt(g+1));)++g;if(g+=2,Ri===t.charAt(g-1))return a("End of comment missing");var m=t.slice(2,g-2);return n+=2,i(m),t=t.slice(g),n+=2,v({type:E1,comment:m})}}function f(){var v=s(),g=l(_1);if(g){if(d(),!l(b1))return a("property missing ':'");var m=l(w1),b=v({type:T1,property:Ym(g[0].replace(Hm,Ri)),value:m?Ym(m[0].replace(Hm,Ri)):Ri});return l(k1),b}}function p(){var v=[];u(v);for(var g;g=f();)g!==!1&&(v.push(g),u(v));return v}return c(),p()}function Ym(t){return t?t.replace(S1,Ri):Ri}function C1(t,e){let r=null;if(!t||typeof t!="string")return r;const n=A1(t),i=typeof e=="function";return n.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?e(o,a,s):a&&(r=r||{},r[o]=a)}),r}const O1=/\d/,D1=["-","_","/","."];function I1(t=""){if(!O1.test(t))return t!==t.toLowerCase()}function P1(t){const e=[];let r="",n,i;for(const s of t){const o=D1.includes(s);if(o===!0){e.push(r),r="",n=void 0;continue}const a=I1(s);if(i===!1){if(n===!1&&a===!0){e.push(r),r=s,n=a;continue}if(n===!0&&a===!1&&r.length>1){const l=r.at(-1);e.push(r.slice(0,Math.max(0,r.length-1))),r=l+s,n=a;continue}}r+=s,n=a,i=o}return e.push(r),e}function Jm(t){return t?P1(t).map(e=>$1(e)).join(""):""}function M1(t){return N1(Jm(t||""))}function $1(t){return t?t[0].toUpperCase()+t.slice(1):""}function N1(t){return t?t[0].toLowerCase()+t.slice(1):""}function Co(t){if(!t)return{};const e={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){e[Jm(n)]=i;return}if(n.startsWith("--")){e[n]=i;return}e[M1(n)]=i}return C1(t,r),e}function Oo(...t){return(...e)=>{for(const r of t)typeof r=="function"&&r(...e)}}function F1(t,e){const r=RegExp(t,"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,e):n}}const R1=F1(/[A-Z]/,t=>`-${t.toLowerCase()}`);function L1(t){if(!t||typeof t!="object"||Array.isArray(t))throw new TypeError(`expected an argument of type object, but got ${typeof t}`);return Object.keys(t).map(e=>`${R1(e)}: ${t[e]};`).join(`
|
|
@@ -7986,7 +7986,7 @@ function C0(t) {
|
|
|
7986
7986
|
switch (e) {
|
|
7987
7987
|
case "Ticket":
|
|
7988
7988
|
if (!sh(t)) return;
|
|
7989
|
-
const r = Sl(t.product);
|
|
7989
|
+
const r = Sl(t.product, { selectedTime: t.product.selectedTime });
|
|
7990
7990
|
return Tt(r, { time: t.time, quantity: t.quantity });
|
|
7991
7991
|
case "Event":
|
|
7992
7992
|
if (!sh(t)) return;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "Giantmonkey GmbH"
|
|
5
5
|
},
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"version": "3.
|
|
7
|
+
"version": "3.4.1",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "./dist-js/gomus-webcomponents.iife.js",
|
|
10
10
|
"module": "./dist-js/gomus-webcomponents.iife.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"build:analyze": "vite build -c scripts/analyze-bundle/vite.config.ts && node scripts/analyze-bundle/analyze.mjs",
|
|
22
22
|
"preview": "vite preview",
|
|
23
23
|
"check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json --output human-verbose",
|
|
24
|
-
"prettier": "prettier --write \"src/**/*.{ts,js,svelte,css,scss,html,json,md}\"",
|
|
24
|
+
"prettier": "prettier --write \"src/**/*.{ts,js,svelte,css,scss,html,json,md,mdx}\"",
|
|
25
25
|
"open-test": "vite build && vite --open src/test.html",
|
|
26
26
|
"=== W E B C O M P O N E N T S ===": "",
|
|
27
27
|
"build-web-components-and-copy": "pnpm build-web-components; pnpm copy-web-components",
|