@gomusdev/web-components 4.14.0 → 4.14.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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.14.1 (2026-08-03)
4
+
5
+ ### Bug Fixes
6
+
7
+ * **cart:** render backend-discounted prices for dynamic-priced timeslot tickets
8
+
3
9
  ## 4.14.0 (2026-08-03)
4
10
 
5
11
  ### Features
@@ -15400,13 +15400,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15400
15400
  }
15401
15401
  function createDisplayCartItem(cartItem, attrs) {
15402
15402
  const quantity = isUITour(cartItem.product) ? 1 : resolveApiQuantity(attrs);
15403
- const originalPrice = cartItem.product.price_cents;
15404
- const displayPrice = originalPrice === 0 ? 0 : attrs.price_cents ?? originalPrice;
15403
+ const originalPrice = cartItem.price_cents;
15404
+ const displayPrice = cartItem.product.price_cents === 0 ? 0 : attrs.price_cents ?? originalPrice;
15405
15405
  const discounted = displayPrice < originalPrice;
15406
- return createCartItem({
15406
+ const product = {
15407
15407
  ...cartItem.product,
15408
15408
  price_cents: displayPrice
15409
- }, {
15409
+ };
15410
+ if ("dynamic_prices" in product) product.dynamic_prices = null;
15411
+ return createCartItem(product, {
15410
15412
  quantity,
15411
15413
  time: cartItem.time,
15412
15414
  voucher: cartItem.voucher,
@@ -15399,13 +15399,15 @@ function createDisplayCart(baseCart, apiItems) {
15399
15399
  }
15400
15400
  function createDisplayCartItem(cartItem, attrs) {
15401
15401
  const quantity = isUITour(cartItem.product) ? 1 : resolveApiQuantity(attrs);
15402
- const originalPrice = cartItem.product.price_cents;
15403
- const displayPrice = originalPrice === 0 ? 0 : attrs.price_cents ?? originalPrice;
15402
+ const originalPrice = cartItem.price_cents;
15403
+ const displayPrice = cartItem.product.price_cents === 0 ? 0 : attrs.price_cents ?? originalPrice;
15404
15404
  const discounted = displayPrice < originalPrice;
15405
- return createCartItem({
15405
+ const product = {
15406
15406
  ...cartItem.product,
15407
15407
  price_cents: displayPrice
15408
- }, {
15408
+ };
15409
+ if ("dynamic_prices" in product) product.dynamic_prices = null;
15410
+ return createCartItem(product, {
15409
15411
  quantity,
15410
15412
  time: cartItem.time,
15411
15413
  voucher: cartItem.voucher,
@@ -72,7 +72,7 @@ ${i}
72
72
 
73
73
  `)}h.write("payload.value = newResult;"),h.write("return payload;");const E=h.compile();return(k,T)=>E(p,k,T)};let s;const a=Va,o=!Ba.jitless,c=o&&gw.value,f=t.catchall;let u;e._zod.parse=(p,h)=>{u??(u=n.value);const g=p.value;return a(g)?o&&c&&h?.async===!1&&h.jitless!==!0?(s||(s=i(t.shape)),p=s(p,h),f?fh([],g,p,h,u,e):p):r(p,h):(p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p)}});function hh(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const i=e.filter(s=>!Ci(s));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(a=>Qn(a,n,Yn())))}),t)}var ik=K("$ZodUnion",(e,t)=>{ct.init(e,t),We(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),We(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),We(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),We(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>iu(i.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,i)=>{if(r)return r(n,i);let s=!1;const a=[];for(const o of t.options){const l=o._zod.run({value:n.value,issues:[]},i);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(o=>hh(o,n,e,i)):hh(a,n,e,i)}}),sk=K("$ZodIntersection",(e,t)=>{ct.init(e,t),e._zod.parse=(r,n)=>{const i=r.value,s=t.left._zod.run({value:i,issues:[]},n),a=t.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||a instanceof Promise?Promise.all([s,a]).then(([o,l])=>ph(r,o,l)):ph(r,s,a)}});function uu(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ps(e)&&Ps(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),i={...e,...t};for(const s of n){const a=uu(e[s],t[s]);if(!a.valid)return{valid:!1,mergeErrorPath:[s,...a.mergeErrorPath]};i[s]=a.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const i=e[n],s=t[n],a=uu(i,s);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function ph(e,t,r){const n=new Map;let i;for(const o of t.issues)if(o.code==="unrecognized_keys"){i??(i=o);for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else e.issues.push(o);for(const o of r.issues)if(o.code==="unrecognized_keys")for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else e.issues.push(o);const s=[...n].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(s.length&&i&&e.issues.push({...i,keys:s}),Ci(e))return e;const a=uu(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var ak=K("$ZodEnum",(e,t)=>{ct.init(e,t);const r=Wf(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>yw.has(typeof i)).map(i=>typeof i=="string"?ja(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{const a=i.value;return n.has(a)||i.issues.push({code:"invalid_value",values:r,input:a,inst:e}),i}}),ok=K("$ZodTransform",(e,t)=>{ct.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Zf(e.constructor.name);const i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(r.value=s,r.fallback=!0,r));if(i instanceof Promise)throw new Ai;return r.value=i,r.fallback=!0,r}});function mh(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var vh=K("$ZodOptional",(e,t)=>{ct.init(e,t),e._zod.optin="optional",e._zod.optout="optional",We(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),We(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${iu(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const i=r.value,s=t.innerType._zod.run(r,n);return s instanceof Promise?s.then(a=>mh(a,i)):mh(s,i)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),lk=K("$ZodExactOptional",(e,t)=>{vh.init(e,t),We(e._zod,"values",()=>t.innerType._zod.values),We(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),uk=K("$ZodNullable",(e,t)=>{ct.init(e,t),We(e._zod,"optin",()=>t.innerType._zod.optin),We(e._zod,"optout",()=>t.innerType._zod.optout),We(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${iu(r.source)}|null)$`):void 0}),We(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),ck=K("$ZodDefault",(e,t)=>{ct.init(e,t),e._zod.optin="optional",We(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>gh(s,t)):gh(i,t)}});function gh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var dk=K("$ZodPrefault",(e,t)=>{ct.init(e,t),e._zod.optin="optional",We(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),fk=K("$ZodNonOptional",(e,t)=>{ct.init(e,t),We(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>yh(s,e)):yh(i,e)}});function yh(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var hk=K("$ZodCatch",(e,t)=>{ct.init(e,t),e._zod.optin="optional",We(e._zod,"optout",()=>t.innerType._zod.optout),We(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(a=>Qn(a,n,Yn()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Qn(s,n,Yn()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),pk=K("$ZodPipe",(e,t)=>{ct.init(e,t),We(e._zod,"values",()=>t.in._zod.values),We(e._zod,"optin",()=>t.in._zod.optin),We(e._zod,"optout",()=>t.out._zod.optout),We(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(a=>Ya(a,t.in,n)):Ya(s,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Ya(s,t.out,n)):Ya(i,t.out,n)}});function Ya(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var mk=K("$ZodReadonly",(e,t)=>{ct.init(e,t),We(e._zod,"propValues",()=>t.innerType._zod.propValues),We(e._zod,"values",()=>t.innerType._zod.values),We(e._zod,"optin",()=>t.innerType?._zod?.optin),We(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(bh):bh(i)}});function bh(e){return e.value=Object.freeze(e.value),e}var vk=K("$ZodCustom",(e,t)=>{jt.init(e,t),ct.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(s=>_h(s,r,n,e));_h(i,r,n,e)}});function _h(e,t,r,n){if(!e){const i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(Ms(i))}}var wh,gk=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const r=t[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const r={...this.get(t)??{}};delete r.id;const n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function yk(){return new gk}(wh=globalThis).__zod_globalRegistry??(wh.__zod_globalRegistry=yk());var $s=globalThis.__zod_globalRegistry;function bk(e,t){return new e({type:"string",...ye(t)})}function _k(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ye(t)})}function kh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ye(t)})}function wk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ye(t)})}function kk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ye(t)})}function Sk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ye(t)})}function Ek(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ye(t)})}function Tk(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ye(t)})}function xk(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ye(t)})}function Ak(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ye(t)})}function Ck(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ye(t)})}function Ok(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ye(t)})}function Dk(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ye(t)})}function Ik(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ye(t)})}function Pk(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ye(t)})}function Mk(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ye(t)})}function $k(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ye(t)})}function Fk(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ye(t)})}function Nk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ye(t)})}function Rk(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ye(t)})}function Lk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ye(t)})}function zk(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ye(t)})}function qk(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ye(t)})}function Uk(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ye(t)})}function Bk(e,t){return new e({type:"string",format:"date",check:"string_format",...ye(t)})}function Vk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ye(t)})}function jk(e,t){return new e({type:"string",format:"duration",check:"string_format",...ye(t)})}function Zk(e,t){return new e({type:"number",checks:[],...ye(t)})}function Wk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ye(t)})}function Hk(e){return new e({type:"unknown"})}function Gk(e,t){return new e({type:"never",...ye(t)})}function Sh(e,t){return new ah({check:"less_than",...ye(t),value:e,inclusive:!1})}function cu(e,t){return new ah({check:"less_than",...ye(t),value:e,inclusive:!0})}function Eh(e,t){return new oh({check:"greater_than",...ye(t),value:e,inclusive:!1})}function du(e,t){return new oh({check:"greater_than",...ye(t),value:e,inclusive:!0})}function Th(e,t){return new h0({check:"multiple_of",...ye(t),value:e})}function xh(e,t){return new m0({check:"max_length",...ye(t),maximum:e})}function Ja(e,t){return new v0({check:"min_length",...ye(t),minimum:e})}function Ah(e,t){return new g0({check:"length_equals",...ye(t),length:e})}function Kk(e,t){return new y0({check:"string_format",format:"regex",...ye(t),pattern:e})}function Yk(e){return new b0({check:"string_format",format:"lowercase",...ye(e)})}function Jk(e){return new _0({check:"string_format",format:"uppercase",...ye(e)})}function Qk(e,t){return new w0({check:"string_format",format:"includes",...ye(t),includes:e})}function Xk(e,t){return new k0({check:"string_format",format:"starts_with",...ye(t),prefix:e})}function eS(e,t){return new S0({check:"string_format",format:"ends_with",...ye(t),suffix:e})}function Oi(e){return new E0({check:"overwrite",tx:e})}function tS(e){return Oi(t=>t.normalize(e))}function rS(){return Oi(e=>e.trim())}function nS(){return Oi(e=>e.toLowerCase())}function iS(){return Oi(e=>e.toUpperCase())}function sS(){return Oi(e=>vw(e))}function aS(e,t,r){return new e({type:"array",element:t,...ye(r)})}function oS(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ye(r)})}function lS(e,t){const r=uS(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ms(i,n.value,r._zod.def));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=r),s.continue??(s.continue=!r._zod.def.abort),n.issues.push(Ms(s))}},e(n.value,n)),t);return r}function uS(e,t){const r=new jt({check:"custom",...ye(t)});return r._zod.check=e,r}function Ch(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??$s,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Et(e,t,r={path:[],schemaPath:[]}){var n;const i=e._zod.def,s=t.seen.get(e);if(s)return s.count++,r.schemaPath.includes(e)&&(s.cycle=r.path),s.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);const o=e._zod.toJSONSchema?.();if(o)a.schema=o;else{const c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,c);else{const u=a.schema,p=t.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(e,t,u,c)}const f=e._zod.parent;f&&(a.ref||(a.ref=f),Et(f,t,c),t.seen.get(f).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),t.io==="input"&&It(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Oh(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const a of e.seen.entries()){const o=e.metadataRegistry.get(a[0])?.id;if(o){const l=n.get(o);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${o}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(o,a[0])}}const i=a=>{const o=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(a[0])?.id,u=e.external.uri??(h=>h);if(f)return{ref:u(f)};const p=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=p,{defId:p,ref:`${u("__shared")}#/${o}/${p}`}}if(a[1]===r)return{ref:"#"};const l=`#/${o}/`,c=a[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:l+c}},s=a=>{if(a[1].schema.$ref)return;const o=a[1],{ref:l,defId:c}=i(a);o.def={...o.schema},c&&(o.defId=c);const f=o.schema;for(const u in f)delete f[u];f.$ref=l};if(e.cycles==="throw")for(const a of e.seen.entries()){const o=a[1];if(o.cycle)throw new Error(`Cycle detected: #/${o.cycle?.join("/")}/<root>
74
74
 
75
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const o=a[1];if(t===a[0]){s(a);continue}if(e.external){const l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){s(a);continue}}if(e.metadataRegistry.get(a[0])?.id){s(a);continue}if(o.cycle){s(a);continue}if(o.count>1&&e.reused==="ref"){s(a);continue}}}function Dh(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=o=>{const l=e.seen.get(o);if(l.ref===null)return;const c=l.def??l.schema,f={...c},u=l.ref;if(l.ref=null,u){n(u);const h=e.seen.get(u),g=h.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(g)):Object.assign(c,g),Object.assign(c,f),o._zod.parent===u)for(const v in c)v==="$ref"||v==="allOf"||v in f||delete c[v];if(g.$ref&&h.def)for(const v in c)v==="$ref"||v==="allOf"||v in h.def&&JSON.stringify(c[v])===JSON.stringify(h.def[v])&&delete c[v]}const p=o._zod.parent;if(p&&p!==u){n(p);const h=e.seen.get(p);if(h?.schema.$ref&&(c.$ref=h.schema.$ref,h.def))for(const g in c)g==="$ref"||g==="allOf"||g in h.def&&JSON.stringify(c[g])===JSON.stringify(h.def[g])&&delete c[g]}e.override({zodSchema:o,jsonSchema:c,path:l.path??[]})};for(const o of[...e.seen.entries()].reverse())n(o[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const o=e.external.registry.get(t)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(o)}Object.assign(i,r.def??r.schema);const s=e.metadataRegistry.get(t)?.id;s!==void 0&&i.id===s&&delete i.id;const a=e.external?.defs??{};for(const o of e.seen.entries()){const l=o[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,a[l.defId]=l.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?i.$defs=a:i.definitions=a);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:Qa(t,"input",e.processors),output:Qa(t,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function It(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return It(n.element,r);if(n.type==="set")return It(n.valueType,r);if(n.type==="lazy")return It(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return It(n.innerType,r);if(n.type==="intersection")return It(n.left,r)||It(n.right,r);if(n.type==="record"||n.type==="map")return It(n.keyType,r)||It(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:It(n.in,r)||It(n.out,r);if(n.type==="object"){for(const i in n.shape)if(It(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(It(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(It(i,r))return!0;return!!(n.rest&&It(n.rest,r))}return!1}var cS=(e,t={})=>r=>{const n=Ch({...r,processors:t});return Et(e,n),Oh(n,e),Dh(n,e)},Qa=(e,t,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},a=Ch({...i??{},target:s,io:t,processors:r});return Et(e,a),Oh(a,e),Dh(a,e)},dS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},fS=(e,t,r,n)=>{const i=r;i.type="string";const{minimum:s,maximum:a,format:o,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof a=="number"&&(i.maxLength=a),o&&(i.format=dS[o]??o,i.format===""&&delete i.format,o==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){const f=[...l];f.length===1?i.pattern=f[0].source:f.length>1&&(i.allOf=[...f.map(u=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:u.source}))])}},hS=(e,t,r,n)=>{const i=r,{minimum:s,maximum:a,format:o,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:f}=e._zod.bag;typeof o=="string"&&o.includes("int")?i.type="integer":i.type="number";const u=typeof f=="number"&&f>=(s??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";u?h?(i.minimum=f,i.exclusiveMinimum=!0):i.exclusiveMinimum=f:typeof s=="number"&&(i.minimum=s),p?h?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof a=="number"&&(i.maximum=a),typeof l=="number"&&(i.multipleOf=l)},pS=(e,t,r,n)=>{r.not={}},mS=(e,t,r,n)=>{},vS=(e,t,r,n)=>{const i=e._zod.def,s=Wf(i.entries);s.every(a=>typeof a=="number")&&(r.type="number"),s.every(a=>typeof a=="string")&&(r.type="string"),r.enum=s},gS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},yS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},bS=(e,t,r,n)=>{const i=r,s=e._zod.def,{minimum:a,maximum:o}=e._zod.bag;typeof a=="number"&&(i.minItems=a),typeof o=="number"&&(i.maxItems=o),i.type="array",i.items=Et(s.element,t,{...n,path:[...n.path,"items"]})},_S=(e,t,r,n)=>{const i=r,s=e._zod.def;i.type="object",i.properties={};const a=s.shape;for(const c in a)i.properties[c]=Et(a[c],t,{...n,path:[...n.path,"properties",c]});const o=new Set(Object.keys(a)),l=new Set([...o].filter(c=>{const f=s.shape[c]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));l.size>0&&(i.required=Array.from(l)),s.catchall?._zod.def.type==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=Et(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},wS=(e,t,r,n)=>{const i=e._zod.def,s=i.inclusive===!1,a=i.options.map((o,l)=>Et(o,t,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=a:r.anyOf=a},kS=(e,t,r,n)=>{const i=e._zod.def,s=Et(i.left,t,{...n,path:[...n.path,"allOf",0]}),a=Et(i.right,t,{...n,path:[...n.path,"allOf",1]}),o=l=>"allOf"in l&&Object.keys(l).length===1;r.allOf=[...o(s)?s.allOf:[s],...o(a)?a.allOf:[a]]},SS=(e,t,r,n)=>{const i=e._zod.def,s=Et(i.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},ES=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},TS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},xS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},AS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType;let a;try{a=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},CS=(e,t,r,n)=>{const i=e._zod.def,s=i.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?s?i.out:i.in:i.out;Et(a,t,n);const o=t.seen.get(e);o.ref=a},OS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.readOnly=!0},Ih=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},DS=K("ZodISODateTime",(e,t)=>{L0.init(e,t),Qe.init(e,t)});function IS(e){return Uk(DS,e)}var PS=K("ZodISODate",(e,t)=>{z0.init(e,t),Qe.init(e,t)});function MS(e){return Bk(PS,e)}var $S=K("ZodISOTime",(e,t)=>{q0.init(e,t),Qe.init(e,t)});function FS(e){return Vk($S,e)}var NS=K("ZodISODuration",(e,t)=>{U0.init(e,t),Qe.init(e,t)});function RS(e){return jk(NS,e)}var LS=(e,t)=>{Xf.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Dw(e,r)},flatten:{value:r=>Ow(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,tu,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,tu,2)}},isEmpty:{get(){return e.issues.length===0}}})},fr=K("ZodError",LS,{Parent:Error}),zS=au(fr),qS=ou(fr),US=Wa(fr),BS=Ha(fr),VS=Mw(fr),jS=$w(fr),ZS=Fw(fr),WS=Nw(fr),HS=Rw(fr),GS=Lw(fr),KS=zw(fr),YS=qw(fr),Ph=new WeakMap;function Fs(e,t,r){const n=Object.getPrototypeOf(e);let i=Ph.get(n);if(i||(i=new Set,Ph.set(n,i)),!i.has(t)){i.add(t);for(const s in r){const a=r[s];Object.defineProperty(n,s,{configurable:!0,enumerable:!1,get(){const o=a.bind(this);return Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:o}),o},set(o){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:o})}})}}}var dt=K("ZodType",(e,t)=>(ct.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Qa(e,"input"),output:Qa(e,"output")}}),e.toJSONSchema=cS(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>zS(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>US(e,r,n),e.parseAsync=async(r,n)=>qS(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>BS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>VS(e,r,n),e.decode=(r,n)=>jS(e,r,n),e.encodeAsync=async(r,n)=>ZS(e,r,n),e.decodeAsync=async(r,n)=>WS(e,r,n),e.safeEncode=(r,n)=>HS(e,r,n),e.safeDecode=(r,n)=>GS(e,r,n),e.safeEncodeAsync=async(r,n)=>KS(e,r,n),e.safeDecodeAsync=async(r,n)=>YS(e,r,n),Fs(e,"ZodType",{check(...r){const n=this.def;return this.clone(Cn(n,{checks:[...n.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return On(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(U1(r,n))},superRefine(r,n){return this.check(B1(r,n))},overwrite(r){return this.check(Oi(r))},optional(){return qh(this)},exactOptional(){return O1(this)},nullable(){return Uh(this)},nullish(){return qh(Uh(this))},nonoptional(r){return F1(this,r)},array(){return Lh(this)},or(r){return k1([this,r])},and(r){return E1(this,r)},transform(r){return Vh(this,A1(r))},default(r){return P1(this,r)},prefault(r){return $1(this,r)},catch(r){return R1(this,r)},pipe(r){return Vh(this,r)},readonly(){return q1(this)},describe(r){const n=this.clone();return $s.add(n,{description:r}),n},meta(...r){if(r.length===0)return $s.get(this);const n=this.clone();return $s.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return $s.get(e)?.description},configurable:!0}),e)),Mh=K("_ZodString",(e,t)=>{lu.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>fS(e,n,i,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Fs(e,"_ZodString",{regex(...n){return this.check(Kk(...n))},includes(...n){return this.check(Qk(...n))},startsWith(...n){return this.check(Xk(...n))},endsWith(...n){return this.check(eS(...n))},min(...n){return this.check(Ja(...n))},max(...n){return this.check(xh(...n))},length(...n){return this.check(Ah(...n))},nonempty(...n){return this.check(Ja(1,...n))},lowercase(n){return this.check(Yk(n))},uppercase(n){return this.check(Jk(n))},trim(){return this.check(rS())},normalize(...n){return this.check(tS(...n))},toLowerCase(){return this.check(nS())},toUpperCase(){return this.check(iS())},slugify(){return this.check(sS())}})}),JS=K("ZodString",(e,t)=>{lu.init(e,t),Mh.init(e,t),e.email=r=>e.check(_k(QS,r)),e.url=r=>e.check(Tk(XS,r)),e.jwt=r=>e.check(qk(p1,r)),e.emoji=r=>e.check(xk(e1,r)),e.guid=r=>e.check(kh($h,r)),e.uuid=r=>e.check(wk(Xa,r)),e.uuidv4=r=>e.check(kk(Xa,r)),e.uuidv6=r=>e.check(Sk(Xa,r)),e.uuidv7=r=>e.check(Ek(Xa,r)),e.nanoid=r=>e.check(Ak(t1,r)),e.guid=r=>e.check(kh($h,r)),e.cuid=r=>e.check(Ck(r1,r)),e.cuid2=r=>e.check(Ok(n1,r)),e.ulid=r=>e.check(Dk(i1,r)),e.base64=r=>e.check(Rk(d1,r)),e.base64url=r=>e.check(Lk(f1,r)),e.xid=r=>e.check(Ik(s1,r)),e.ksuid=r=>e.check(Pk(a1,r)),e.ipv4=r=>e.check(Mk(o1,r)),e.ipv6=r=>e.check($k(l1,r)),e.cidrv4=r=>e.check(Fk(u1,r)),e.cidrv6=r=>e.check(Nk(c1,r)),e.e164=r=>e.check(zk(h1,r)),e.datetime=r=>e.check(IS(r)),e.date=r=>e.check(MS(r)),e.time=r=>e.check(FS(r)),e.duration=r=>e.check(RS(r))});function Qt(e){return bk(JS,e)}var Qe=K("ZodStringFormat",(e,t)=>{Je.init(e,t),Mh.init(e,t)}),QS=K("ZodEmail",(e,t)=>{O0.init(e,t),Qe.init(e,t)}),$h=K("ZodGUID",(e,t)=>{A0.init(e,t),Qe.init(e,t)}),Xa=K("ZodUUID",(e,t)=>{C0.init(e,t),Qe.init(e,t)}),XS=K("ZodURL",(e,t)=>{D0.init(e,t),Qe.init(e,t)}),e1=K("ZodEmoji",(e,t)=>{I0.init(e,t),Qe.init(e,t)}),t1=K("ZodNanoID",(e,t)=>{P0.init(e,t),Qe.init(e,t)}),r1=K("ZodCUID",(e,t)=>{M0.init(e,t),Qe.init(e,t)}),n1=K("ZodCUID2",(e,t)=>{$0.init(e,t),Qe.init(e,t)}),i1=K("ZodULID",(e,t)=>{F0.init(e,t),Qe.init(e,t)}),s1=K("ZodXID",(e,t)=>{N0.init(e,t),Qe.init(e,t)}),a1=K("ZodKSUID",(e,t)=>{R0.init(e,t),Qe.init(e,t)}),o1=K("ZodIPv4",(e,t)=>{B0.init(e,t),Qe.init(e,t)}),l1=K("ZodIPv6",(e,t)=>{V0.init(e,t),Qe.init(e,t)}),u1=K("ZodCIDRv4",(e,t)=>{j0.init(e,t),Qe.init(e,t)}),c1=K("ZodCIDRv6",(e,t)=>{Z0.init(e,t),Qe.init(e,t)}),d1=K("ZodBase64",(e,t)=>{W0.init(e,t),Qe.init(e,t)}),f1=K("ZodBase64URL",(e,t)=>{G0.init(e,t),Qe.init(e,t)}),h1=K("ZodE164",(e,t)=>{K0.init(e,t),Qe.init(e,t)}),p1=K("ZodJWT",(e,t)=>{J0.init(e,t),Qe.init(e,t)}),Fh=K("ZodNumber",(e,t)=>{uh.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>hS(e,n,i,s),Fs(e,"ZodNumber",{gt(n,i){return this.check(Eh(n,i))},gte(n,i){return this.check(du(n,i))},min(n,i){return this.check(du(n,i))},lt(n,i){return this.check(Sh(n,i))},lte(n,i){return this.check(cu(n,i))},max(n,i){return this.check(cu(n,i))},int(n){return this.check(Nh(n))},safe(n){return this.check(Nh(n))},positive(n){return this.check(Eh(0,n))},nonnegative(n){return this.check(du(0,n))},negative(n){return this.check(Sh(0,n))},nonpositive(n){return this.check(cu(0,n))},multipleOf(n,i){return this.check(Th(n,i))},step(n,i){return this.check(Th(n,i))},finite(){return this}});const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Ns(e){return Zk(Fh,e)}var m1=K("ZodNumberFormat",(e,t)=>{Q0.init(e,t),Fh.init(e,t)});function Nh(e){return Wk(m1,e)}var v1=K("ZodUnknown",(e,t)=>{X0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>mS(e,r,n,i)});function Rh(){return Hk(v1)}var g1=K("ZodNever",(e,t)=>{ek.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>pS(e,r,n,i)});function y1(e){return Gk(g1,e)}var b1=K("ZodArray",(e,t)=>{tk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>bS(e,r,n,i),e.element=t.element,Fs(e,"ZodArray",{min(r,n){return this.check(Ja(r,n))},nonempty(r){return this.check(Ja(1,r))},max(r,n){return this.check(xh(r,n))},length(r,n){return this.check(Ah(r,n))},unwrap(){return this.element}})});function Lh(e,t){return aS(b1,e,t)}var _1=K("ZodObject",(e,t)=>{nk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_S(e,r,n,i),We(e,"shape",()=>t.shape),Fs(e,"ZodObject",{keyof(){return T1(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Rh()})},loose(){return this.clone({...this._zod.def,catchall:Rh()})},strict(){return this.clone({...this._zod.def,catchall:y1()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return Sw(this,r)},safeExtend(r){return Ew(this,r)},merge(r){return Tw(this,r)},pick(r){return ww(this,r)},omit(r){return kw(this,r)},partial(...r){return xw(zh,this,r[0])},required(...r){return Aw(Bh,this,r[0])}})});function fu(e,t){return new _1({type:"object",shape:e??{},...ye(t)})}var w1=K("ZodUnion",(e,t)=>{ik.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>wS(e,r,n,i),e.options=t.options});function k1(e,t){return new w1({type:"union",options:e,...ye(t)})}var S1=K("ZodIntersection",(e,t)=>{sk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kS(e,r,n,i)});function E1(e,t){return new S1({type:"intersection",left:e,right:t})}var hu=K("ZodEnum",(e,t)=>{ak.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>vS(e,n,i,s),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{const s={};for(const a of n)if(r.has(a))s[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new hu({...t,checks:[],...ye(i),entries:s})},e.exclude=(n,i)=>{const s={...t.entries};for(const a of n)if(r.has(a))delete s[a];else throw new Error(`Key ${a} not found in enum`);return new hu({...t,checks:[],...ye(i),entries:s})}});function T1(e,t){return new hu({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...ye(t)})}var x1=K("ZodTransform",(e,t)=>{ok.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>yS(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Zf(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Ms(s,r.value,t));else{const a=s;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Ms(a))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(s=>(r.value=s,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function A1(e){return new x1({type:"transform",transform:e})}var zh=K("ZodOptional",(e,t)=>{vh.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ih(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function qh(e){return new zh({type:"optional",innerType:e})}var C1=K("ZodExactOptional",(e,t)=>{lk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ih(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function O1(e){return new C1({type:"optional",innerType:e})}var D1=K("ZodNullable",(e,t)=>{uk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>SS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Uh(e){return new D1({type:"nullable",innerType:e})}var I1=K("ZodDefault",(e,t)=>{ck.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>TS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function P1(e,t){return new I1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Yf(t)}})}var M1=K("ZodPrefault",(e,t)=>{dk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>xS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function $1(e,t){return new M1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Yf(t)}})}var Bh=K("ZodNonOptional",(e,t)=>{fk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>ES(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function F1(e,t){return new Bh({type:"nonoptional",innerType:e,...ye(t)})}var N1=K("ZodCatch",(e,t)=>{hk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>AS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function R1(e,t){return new N1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var L1=K("ZodPipe",(e,t)=>{pk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>CS(e,r,n,i),e.in=t.in,e.out=t.out});function Vh(e,t){return new L1({type:"pipe",in:e,out:t})}var z1=K("ZodReadonly",(e,t)=>{mk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>OS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function q1(e){return new z1({type:"readonly",innerType:e})}var jh=K("ZodCustom",(e,t)=>{vk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>gS(e,r,n,i)});function U1(e,t={}){return oS(jh,e,t)}function B1(e,t){return lS(e,t)}function V1(e,t={}){const r=new jh({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...ye(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var j1=fu({id:Ns(),customer:fu({customer_salutation_id:Ns().positive({message:"user.fieldErrors.titleRequire"}),name:Qt().min(1,{message:"user.fieldErrors.nameRequire"}),surname:Qt().min(1,{message:"user.fieldErrors.surnameRequire"}),email:Qt().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:Qt().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:Qt().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:Qt().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:Qt().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:Ns().positive().default(60),language_id:Ns().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),fN=fu({ticket_sale_id:Ns(),start_at:Qt().date(),personalizations:Lh(j1)});function pu(e,t){return e-t*Math.floor(e/t)}var Zh=1721426;function eo(e,t,r,n){t=mu(e,t);let i=t-1,s=-2;return r<=2?s=0:to(t)&&(s=-1),Zh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function to(e){return e%4===0&&(e%100!==0||e%400===0)}function mu(e,t){return e==="BC"?1-t:t}function Z1(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var W1={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]},Di=class{fromJulianDay(e){let t=e,r=t-Zh,n=Math.floor(r/146097),i=pu(r,146097),s=Math.floor(i/36524),a=pu(i,36524),o=Math.floor(a/1461),l=pu(a,1461),c=Math.floor(l/365),[f,u]=Z1(n*400+s*100+o*4+c+(s!==4&&c!==4?1:0)),p=t-eo(f,u,1,1),h=2;t<eo(f,u,3,1)?h=0:to(u)&&(h=1);let g=Math.floor(((p+h)*12+373)/367);return new zs(f,u,g,t-eo(f,u,g,1)+1)}toJulianDay(e){return eo(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return W1[to(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return to(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return e.era==="BC"}balanceDate(e){e.year<=0&&(e.era=e.era==="BC"?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}},H1={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Dn(e,t){return t=er(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function vu(e,t){return t=er(t,e.calendar),e=yu(e),t=yu(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function G1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function K1(e,t){return Dn(e,Ii(t))}var Y1={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Wh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?Y1[r]:rE(t),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function J1(e){return Br(Date.now(),e)}function Ii(e){return sE(J1(e))}function Hh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Q1(e,t){return Gh(e)-Gh(t)}function Gh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var gu=null,X1=!1;function Xt(){return gu==null&&(gu=new Intl.DateTimeFormat().resolvedOptions().timeZone),gu}function Kh(){return X1}function yu(e){return e.subtract({days:e.day-1})}function eE(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var Yh=new Map,bu=new Map;function tE(e){if(Intl.Locale){let r=Yh.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&Yh.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function rE(e){let t=bu.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return bu.set(e,t),t.firstDay}let r=tE(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];n==="mon"?t={firstDay:1}:n==="tue"?t={firstDay:2}:n==="wed"?t={firstDay:3}:n==="thu"?t={firstDay:4}:n==="fri"?t={firstDay:5}:n==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:r&&H1[r]||0};bu.set(e,t)}return t.firstDay}function In(e){return e=er(e,new Di),Jh(mu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Jh(e,t,r,n,i,s,a){let o=new Date;return o.setUTCHours(n,i,s,a),o.setUTCFullYear(e,t-1,r),o.getTime()}function Rs(e,t){if(t==="UTC")return 0;if(e>0&&t===Xt()&&!Kh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:a,second:o}=Xh(e,t);return Jh(r,n,i,s,a,o,0)-Math.floor(e/1e3)*1e3}var Qh=new Map;function Xh(e,t){let r=Qh.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Qh.set(t,r));let n=r.formatToParts(new Date(e)),i={};for(let s of n)s.type!=="literal"&&(i[s.type]=s.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}var ro=864e5;function nE(e,t){let r=In(e);return ep(e,t,r-Rs(r-ro,t),r-Rs(r+ro,t))}function ep(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>iE(e,t,i))}function iE(e,t,r){let n=Xh(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function Ur(e,t,r="compatible"){let n=Pn(e);if(t==="UTC")return In(n);if(t===Xt()&&r==="compatible"&&!Kh()){n=er(n,new Di);let l=new Date,c=mu(n.era,n.year);return l.setFullYear(c,n.month-1,n.day),l.setHours(n.hour,n.minute,n.second,n.millisecond),l.getTime()}let i=In(n),s=Rs(i-ro,t),a=Rs(i+ro,t),o=ep(n,t,i-s,i-a);if(o.length===1)return o[0];if(o.length>1)switch(r){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(i-s,i-a);case"compatible":case"later":return Math.max(i-s,i-a);case"reject":throw new RangeError("No such absolute time found")}}function tp(e,t,r="compatible"){return new Date(Ur(e,t,r))}function Br(e,t){let r=Rs(e,t),n=new Date(e+r),i=n.getUTCFullYear(),s=n.getUTCMonth()+1,a=n.getUTCDate(),o=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),f=n.getUTCMilliseconds();return new Mn(i<1?"BC":"AD",i<1?-i+1:i,s,a,t,r,o,l,c,f)}function sE(e){return new zs(e.calendar,e.era,e.year,e.month,e.day)}function Pn(e,t){let r=0,n=0,i=0,s=0;if("timeZone"in e)({hour:r,minute:n,second:i,millisecond:s}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:i,millisecond:s}=t),new Pi(e.calendar,e.era,e.year,e.month,e.day,r,n,i,s)}function er(e,t){if(G1(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,Xn(n),n}function aE(e,t,r){return e instanceof Mn?e.timeZone===t?e:rp(e,t):Br(Ur(e,t,r),t)}function oE(e){let t=In(e)-e.offset;return new Date(t)}function rp(e,t){return er(Br(In(e)-e.offset,t),e.calendar)}var Ls=36e5;function no(e,t){let r=e.copy(),n="hour"in r?dE(r,t):0;_u(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,wu(r),np(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,lE(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let i=r.calendar.getYearsInEra(r);if(r.year>i){let a=r.calendar.isInverseEra?.(r);r.year=i,r.month=a?1:r.calendar.getMonthsInYear(r),r.day=a?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function _u(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function wu(e){for(;e.month<1;)_u(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,_u(e,1)}function lE(e){for(;e.day<1;)e.month--,wu(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,wu(e)}function np(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Xn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),np(e)}function ip(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function sp(e,t){return no(e,ip(t))}function ku(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),Xn(r),r}function io(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),cE(r),r}function uE(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=so(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=so(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=so(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=so(e.hour,24),t}function cE(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function so(e,t){let r=e%t;return r<0&&(r+=t),r}function dE(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,uE(e)}function Su(e,t,r,n){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),a=s.indexOf(e.era);if(a<0)throw new Error("Invalid era: "+e.era);a=an(a,r,0,s.length-1,n?.round),i.era=s[a],Xn(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=an(e.year,r,-1/0,9999,n?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=an(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":i.day=an(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),Xn(i),i}function ap(e,t,r,n){let i=e.copy();switch(t){case"hour":{let s=e.hour,a=0,o=23;if(n?.hourCycle===12){let l=s>=12;a=l?12:0,o=l?23:11}i.hour=an(s,r,a,o,n?.round);break}case"minute":i.minute=an(e.minute,r,0,59,n?.round);break;case"second":i.second=an(e.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=an(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return i}function an(e,t,r,n,i=!1){if(i){e+=Math.sign(t),e<r&&(e=n);let s=Math.abs(t);t>0?e=Math.ceil(e/s)*s:e=Math.floor(e/s)*s,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function op(e,t){let r;return t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?r=Ur(no(Pn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):r=In(e)-e.offset,r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5,er(Br(r,e.timeZone),e.calendar)}function fE(e,t){return op(e,ip(t))}function hE(e,t,r,n){switch(t){case"hour":{let i=0,s=23;if(n?.hourCycle===12){let g=e.hour>=12;i=g?12:0,s=g?23:11}let a=Pn(e),o=er(io(a,{hour:i}),new Di),l=[Ur(o,e.timeZone,"earlier"),Ur(o,e.timeZone,"later")].filter(g=>Br(g,e.timeZone).day===o.day)[0],c=er(io(a,{hour:s}),new Di),f=[Ur(c,e.timeZone,"earlier"),Ur(c,e.timeZone,"later")].filter(g=>Br(g,e.timeZone).day===c.day).pop(),u=In(e)-e.offset,p=Math.floor(u/Ls),h=u%Ls;return u=an(p,r,Math.floor(l/Ls),Math.floor(f/Ls),n?.round)*Ls+h,er(Br(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return ap(e,t,r,n);case"era":case"year":case"month":case"day":return er(Br(Ur(Su(Pn(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function pE(e,t,r){let n=Pn(e),i=io(ku(n,t),t);return i.compare(n)===0?e:er(Br(Ur(i,e.timeZone,r),e.timeZone),e.calendar)}var mE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,vE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,gE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,Eu=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/,yE=["hours","minutes","seconds"],hN=["years","months","weeks","days",...yE];function ao(e){let t=e.match(mE);if(!t)throw Eu.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new zs(Be(t[1],0,9999),Be(t[2],1,12),1);return r.day=Be(t[3],1,r.calendar.getDaysInMonth(r)),r}function lp(e){let t=e.match(vE);if(!t)throw Eu.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=Be(t[1],-9999,9999),n=new Pi(r<1?"BC":"AD",r<1?-r+1:r,Be(t[2],1,12),1,t[4]?Be(t[4],0,23):0,t[5]?Be(t[5],0,59):0,t[6]?Be(t[6],0,59):0,t[7]?Be(t[7],0,1/0)*1e3:0);return n.day=Be(t[3],0,n.calendar.getDaysInMonth(n)),n}function up(e,t){let r=e.match(gE);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Be(r[1],-9999,9999),i=new Mn(n<1?"BC":"AD",n<1?-n+1:n,Be(r[2],1,12),1,r[11],0,r[4]?Be(r[4],0,23):0,r[5]?Be(r[5],0,59):0,r[6]?Be(r[6],0,59):0,r[7]?Be(r[7],0,1/0)*1e3:0);i.day=Be(r[3],0,i.calendar.getDaysInMonth(i));let s=Pn(i),a;if(r[8]){let o=Be(r[8],-23,23);if(i.offset=Math.sign(o)*(Math.abs(o)*36e5+Be(r[9]??"0",0,59)*6e4+Be(r[10]??"0",0,59)*1e3),a=In(i)-i.offset,!nE(s,i.timeZone).includes(a))throw new Error(`Offset ${fp(i.offset)} is invalid for ${Tu(i)} in ${i.timeZone}`)}else a=Ur(Pn(s),i.timeZone,t);return Br(a,i.timeZone)}function cp(e,t){let r=e.match(Eu);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Be(r[1],-9999,9999),i=new Mn(n<1?"BC":"AD",n<1?-n+1:n,Be(r[2],1,12),1,t,0,r[4]?Be(r[4],0,23):0,r[5]?Be(r[5],0,59):0,r[6]?Be(r[6],0,59):0,r[7]?Be(r[7],0,1/0)*1e3:0);return i.day=Be(r[3],0,i.calendar.getDaysInMonth(i)),r[8]&&(i.offset=Be(r[8],-23,23)*36e5+Be(r[9]??"0",0,59)*6e4),rp(i,t)}function Be(e,t,r){let n=Number(e);if(n<t||n>r)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function bE(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function dp(e){let t=er(e,new Di),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Tu(e){return`${dp(e)}T${bE(e)}`}function fp(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),s=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(s+=`:${String(i).padStart(2,"0")}`),s}function _E(e){return`${Tu(e)}${fp(e.offset)}[${e.timeZone}]`}function xu(e){let t=typeof e[0]=="object"?e.shift():new Di,r;if(typeof e[0]=="string")r=e.shift();else{let a=t.getEras();r=a[a.length-1]}let n=e.shift(),i=e.shift(),s=e.shift();return[t,r,n,i,s]}var zs=class ud{#e;constructor(...t){let[r,n,i,s,a]=xu(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,Xn(this)}copy(){return this.era?new ud(this.calendar,this.era,this.year,this.month,this.day):new ud(this.calendar,this.year,this.month,this.day)}add(t){return no(this,t)}subtract(t){return sp(this,t)}set(t){return ku(this,t)}cycle(t,r,n){return Su(this,t,r,n)}toDate(t){return tp(this,t)}toString(){return dp(this)}compare(t){return Hh(this,t)}},Pi=class cd{#e;constructor(...t){let[r,n,i,s,a]=xu(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Xn(this)}copy(){return this.era?new cd(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new cd(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return no(this,t)}subtract(t){return sp(this,t)}set(t){return ku(io(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return Su(this,t,r,n);default:return ap(this,t,r,n)}}toDate(t,r){return tp(this,t,r)}toString(){return Tu(this)}compare(t){let r=Hh(this,t);return r===0?Q1(this,Pn(t)):r}},Mn=class dd{#e;constructor(...t){let[r,n,i,s,a]=xu(t),o=t.shift(),l=t.shift();this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,this.timeZone=o,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Xn(this)}copy(){return this.era?new dd(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new dd(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return op(this,t)}subtract(t){return fE(this,t)}set(t,r){return pE(this,t,r)}cycle(t,r,n){return hE(this,t,r,n)}toDate(){return oE(this)}toString(){return _E(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-aE(t,this.timeZone).toDate().getTime()}},Au=new Map,hr=class{constructor(e,t={}){this.formatter=hp(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,t);if(t<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,t);if(t<e)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return SE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=EE(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}},wE={true:{ja:"h11"},false:{}};function hp(e,t={}){if(typeof t.hour12=="boolean"&&kE()){t={...t};let i=wE[String(t.hour12)][e.split("-")[0]],s=t.hour12?"h12":"h23";t.hourCycle=i??s,delete t.hour12}let r=e+(t?Object.entries(t).sort((i,s)=>i[0]<s[0]?-1:1).join():"");if(Au.has(r))return Au.get(r);let n=new Intl.DateTimeFormat(e,t);return Au.set(r,n),n}var Cu=null;function kE(){return Cu==null&&(Cu=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Cu}var Ou=null;function SE(){return Ou==null&&(Ou=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Ou}function EE(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=hp(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(s=>s.type==="hour").value,10),i=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(s=>s.type==="hour").value,10);if(n===0&&i===23)return"h23";if(n===24&&i===23)return"h24";if(n===0&&i===11)return"h11";if(n===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}var TE={dayMonth:{month:"numeric",day:"numeric"},short:{year:"numeric",month:"numeric",day:"numeric"}};function pp(e,t){const r=cp(e,"Europe/Berlin");return new hr(t,{timeZone:r.timeZone,hour:"numeric",minute:"numeric"}).format(r.toDate())}function xE(e,t,r){const n=cp(e instanceof Date?e.toISOString():e,"Europe/Berlin");return new hr(r,{timeZone:n.timeZone,...TE[t]}).format(n.toDate())}function oo(e){return e?.type==="Ticket"}function Vr(e){const t=e;return!!t&&t.type==="Ticket"&&t.is_mantle===!0&&!!t.sub_tickets&&Object.keys(t.sub_tickets).length>0}function qs(e){return Object.entries(e.sub_tickets??{}).map(([t,r])=>({id:Number(t),title:r?.title??"",description:r?.description??null,min_persons:r?.min_persons??0,max_persons:r?.max_persons??0}))}function Us(e,t){return{...e,selectedTime:t?.selectedTime??"",type:"Ticket",subtype:{time_slot:"timeslot",normal:"day",annual:"annual"}[e.ticket_type],shop_order:e.shop_order??0,content:void 0}}function Bs(e,t=""){return Uf(Object.values(e).map(r=>Us(r,{selectedTime:t})),r=>r.shop_order)}function Du(e,t){const r=n=>Object.keys(n.total_capacities??{}).find(i=>(n.total_capacities?.[i]??0)>0);return Uf(Object.values(e).filter(n=>r(n)||Object.keys(n.total_capacities??{}).length===0).map(n=>Us(n,{selectedTime:r(n)??t})),n=>n.shop_order)}function Vs(e,t=""){let r=Object.entries(e);return t!==""&&(r=r.filter(([,n])=>n.total_capacities?.[t]&&n.total_capacities[t]>0)),Object.fromEntries(r)}var mp=e=>qr(Object.values(e.mantle?.composition??{}));function AE(e){const t=e.quantity??0;return Vr(e.product)?t*mp(e):t}function Iu(e,t,r,n){e.clearPrecart();let i=0;for(const s of[...r.items,...t.items]){if(!oo(s.product))continue;const a=AE(s);s===n&&(i=a),e.addPrecartItemQuantity(s.product.id,a)}return i}var CE=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!oo(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,s=e.quotaManager,a=Iu(s,t,n,r),o=s.ticketCapacity(i.id,i.selectedTime,a),l=s.totalCapacity(i.id,i.selectedTime);return{max:Math.min(i.max_persons||100,o),min:i.min_persons||0,bookedOut:o===0,unavailable:l===0}},OE=function(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxQuantity_Mantle) impossible");if(!Vr(r.product))throw new Error("(maxQuantity_Mantle) impossible");const i=r.product,s=e.quotaManager,a=Iu(s,t,n,r),o=s.ticketCapacity(i.id,i.selectedTime,a),l=s.totalCapacity(i.id,i.selectedTime),c=mp(r),f=c>1?Math.floor(o/c):o;return{max:Math.min(i.max_persons||100,f),min:i.min_persons||0,bookedOut:f===0,unavailable:l===0}},DE=e=>Object.fromEntries(qs(e).map(t=>[t.id,t.max_persons]));function IE(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxSubQuantities) impossible");if(!Vr(r.product))throw new Error("(maxSubQuantities) impossible");const i=r.product,s=r.quantity??0;let a=1/0;return s>0&&(Iu(e.quotaManager,t,n,r),a=Math.floor(e.quotaManager.ticketCapacity(i.id,i.selectedTime,0)/s)),Object.fromEntries(qs(i).map(o=>[o.id,Math.min(o.max_persons,(r.mantle?.composition?.[o.id]??0)+a)]))}function js(e){return e?.type==="Event"}function PE(e){return js(e)&&e.subtype==="scale"}function ME(e,t,r){const n={type:"Event",id:t,tax_included:!0,...e};if(r?.date){const i=r.date;r.date_title=i.title||"",r.date_description=i.description||"",r.event_title=i.event_title||"",r.event_subtitle=i.event_sub_title||"",r.price_title=e.title||"",r.price_description=e.description||""}return{dateId:t,minAvailableCapacity:0,selectedTime:"",...r,...n,...e,type:"Event",subtype:e.scale_price_id===void 0?"flat":"scale"}}function Pu(e,t,r){return ME(e,t,r)}var $E=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!js(r.product))throw new Error("(getMaxQuantitySeats) impossible");const i=r.product.dateId,s=e.allSeats[i];if(!s)return console.error("(getMaxQuantity) no seats found for dateId",i),{max:0,min:0,unavailable:!0,bookedOut:!1};const a=Math.min(s.max||100,s.max_per_registration||100,s.available??100),o={max_per_registration:a,available:100,overbook:!1,...s};let l=a;o.overbook&&(l=Math.min(o.max||100,o.max_per_registration||100));const c=n.totalQuantity,f=qr(t.items.filter(p=>n.items.some(h=>h.uuid===p.uuid)),p=>p.quantity),u=Math.max(l-f-c+r.quantity,0);return{max:u,min:o.min??0,unavailable:o.available===0,bookedOut:u===0}},FE=function(e,t,r,n){if(e.capacityPolicy(r)!=="unlimited")throw new Error("(getMaxQuantityUnlimited) impossible");return{max:r.product.max_persons??100,min:r.product.min_persons??0,unavailable:!1,bookedOut:!1}};function NE(e){return{apiData:e,_timeslots:[],addQuotas(t){this._timeslots=[],this.apiData={...this.apiData,...t}},precart:{},clearPrecart(){this.precart={},this._timeslots=[]},setPrecartItemQuantity(t,r){this.precart[t]=r,this._timeslots=[]},addPrecartItemQuantity(t,r){this.precart[t]=(this.precart[t]??0)+r,this._timeslots=[]},getPrecartItemQuantity(t){return this.precart[t]??0},timeslots(){return this._timeslots.length===0&&(this._timeslots=Object.entries(this.apiData).flatMap(([t,r])=>Object.keys(r.capacities).map(n=>{const i=qr(r.ticket_ids.map(s=>this.getPrecartItemQuantity(s)));return{timeSlot:n,quota:t,capacity:r.capacities[n]-i,tickets:r.ticket_ids,totalCapacity:r.total_capacities[n]}}))),this._timeslots},filterBy({timeslot:t,ticketId:r,date:n}={}){let i=this.timeslots();return r&&(i=i.filter(s=>s.tickets.includes(r))),t&&(i=i.filter(s=>s.timeSlot===t)),n&&(i=i.filter(s=>s.timeSlot.startsWith(n))),i.flatMap(s=>s.tickets.map(a=>({timeslot:t,ticket:a,quota:s.quota,capacity:s.capacity,totalCapacity:s.totalCapacity})))},ticketCapacity(t,r,n=this.getPrecartItemQuantity(t)){const i=eu(this.filterBy({timeslot:r,ticketId:t}).map(s=>s.capacity))??0;return Math.max(0,i+n)},totalCapacity(t,r){return eu(this.filterBy({timeslot:r,ticketId:t}).map(n=>n.totalCapacity))??0},timeslotsOn(t,r){let n=this.timeslots().filter(s=>s.timeSlot.startsWith(t.toString()));r&&(n=n.filter(s=>s.tickets.some(a=>r.includes(a))));const i=cw(n,s=>s.timeSlot);return Object.values(i).map(s=>dw(fw(s.flatMap(a=>a.tickets)).map(a=>eu(s.filter(o=>o.tickets.includes(a)),o=>o.capacity)).filter(a=>a!==null),a=>a.capacity)??s[0]).sort((s,a)=>s.timeSlot.localeCompare(a.timeSlot))}}}function RE(e){let t=0;_s(()=>{ve(()=>{if(e.items.length===t)return;const r=e.items.length>t?"go-cart-item-added":"go-cart-item-removed";t=e.items.length,document.dispatchEvent(new CustomEvent(r,{detail:e.items.length}))})})}function yt(e){let t;try{t=new Intl.NumberFormat(S.locale??"de",{style:"currency",currency:S.currency??"EUR"})}catch{t=new Intl.NumberFormat("de",{style:"currency",currency:"EUR"})}return t.format((e??0)/100)}function on(e){if(!e)return;const t=e.split(",").map(r=>r.trim()).map(Number).filter(r=>!isNaN(r)&&r>0);return t.length>0?t:void 0}function vp(e){return e?.type==="Tour"}function gp(e,t){return{...e,type:"Tour",description:"",price_cents:e.totalPriceCents,tax_included:!0,vat_pct:0,instanceKey:t?.instanceKey??crypto.randomUUID(),wire:LE(e)}}function LE(e){const t={language_id:e.languageId};return e.quantities?t.quantities=e.quantities:t.quantity=e.participants,e.gradeId!=null&&(t.grade_id=e.gradeId),e.ageGroupId!=null&&(t.age_group_id=e.ageGroupId),e.surcharges&&(t.surcharges=e.surcharges),e.equipment&&(t.equipment=e.equipment),e.attendees&&(t.attendees=e.attendees),e.customs&&(t.customs=e.customs),t}function zE(e){const{type:t,description:r,price_cents:n,tax_included:i,vat_pct:s,instanceKey:a,wire:o,...l}=e;return gp({...l,totalPriceCents:n},{instanceKey:a})}var qE=0;function rt(e,t){const r={quantity:0,time:"",...t??{}};return Vr(e)&&(r.mantle={composition:r.mantle?.composition??Object.fromEntries(qs(e).map(n=>[n.id,n.max_persons])),key:r.mantle?.key??`mantle-${qE++}`}),{...r,quantity:r.quantity??0,time:r.time??"",type:e.type,product:e,orderAttributes(){const n={shipped_with_merchandise_id:null,shipping_mode:"email",id:this.product.id,uuid:this.uuid};switch(e.type){case"Ticket":return{...n,time:this.time,quantity:this.quantity,...Vr(this.product)&&this.mantle?{sub_ticket_quantities:this.mantle.composition}:{}};case"Event":switch(e.subtype){case"flat":return{...n,quantity:this.quantity};case"scale":return{...n,quantities:{[e.scale_price_id]:this.quantity}};default:throw new Error(`(orderAttributes) Unhandled Event subtype: ${e}`)}case"Coupon":return{...n,quantity:this.quantity};case"Tour":return{...n,start_time:this.time,...e.wire};default:throw new Error(`(orderAttributes) Unhandled product type: ${e}`)}},get uuid(){return this.type+"-"+this.product.id+this.subUId},get subUId(){const n=[];return this.time&&n.push(`time: ${this.time}`),PE(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),vp(this.product)&&n.push(`tour: ${this.product.instanceKey}`),this.display?.discounted&&n.push("discounted"),Vr(this.product)&&this.mantle?.key&&n.push(`mantle_key: ${this.mantle.key}`),this.voucher?.code&&n.push(`voucher_code: ${this.voucher.code}`),n.length>0?` (${n.join(", ")})`:""},toString(){return this.uuid+":"+this.quantity},get price_cents(){const n="dynamic_prices"in this.product?this.product.dynamic_prices:null;return this.time&&n?.[this.time]!=null?n[this.time]:this.product.price_cents},get price_formatted(){return yt(this.price_cents)},get final_price_cents(){const n=this.product.tax_included?1:1+this.product.vat_pct/100;return this.price_cents*n},get final_price_formatted(){return yt(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return yt(this.total_price_cents)}}}var pN=15*6e4;function lo(){return typeof window<"u"&&typeof localStorage<"u"}function UE(e,t){if(lo())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Mu(e){if(!lo())return null;try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(t){return console.warn(`Failed to load from localStorage (${e}):`,t),null}}function yp(e){if(lo())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}function bp(e){return{...e,description:"",tax_included:!0,type:"Coupon"}}var _p="go-cart",uo=(e,t)=>localStorage.setItem(_p,JSON.stringify({items:e,coupons:t,savedAt:Date.now()}));function BE(e){const t=e.product.type;switch(t){case"Ticket":return $u(e)?rt(Us(e.product,{selectedTime:e.product.selectedTime}),{time:e.time,quantity:e.quantity,mantle:e.mantle,voucher:e.voucher}):void 0;case"Event":return $u(e)?rt(Pu(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;case"Tour":return $u(e)?rt(zE(e.product),{time:e.time,quantity:e.quantity}):void 0;case"Coupon":return rt(bp(e.product),{quantity:e.quantity});default:throw new Error(`Unhandled case: ${t}`)}}function VE(e){let t=[],r=[],n;try{const i=localStorage.getItem(_p);if(!i)return[];const s=JSON.parse(i);if(Array.isArray(s))t=s,r=[];else if(typeof s=="object"&&s!==null)t=s.items||[],r=s.coupons||[],n=s.savedAt;else throw console.dir({parsed:s,content:i}),new Error("go-cart has invalid format");return n&&Date.now()-n>9e5?(e.clearItems(),e.clearCoupons(),uo([],[]),[]):(t.length===0?e.clearItems():e.items=t.map(BE).filter(HE),e.clearCoupons(),r.forEach(a=>e.addCoupon(typeof a=="string"?{code:a,kind:"actionToken"}:a)),e.items)}catch(i){return console.error(i),uo([],[]),[]}}function jE(e){VE(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});uo(e.items||[],e.coupons||[]),_s(()=>{ve(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});r!==t&&(t=r,uo(e.items||[],e.coupons||[]))})})}var ZE=e=>new Date<new Date(e),WE=e=>ao(e.slice(0,10)).compare(Ii(Xt()))>=0,$u=e=>e.time?e.product.subtype==="day"?WE(e.time):ZE(e.time):!0,HE=e=>e!==void 0,GE=0;function ei(e,t=20){const r=Me([]),n=Me([]);let i=ae(void 0);const s={items:r,coupons:n,get paymentModeId(){return d(i)},set paymentModeId(a){$(i,a,!0)},uid:`cart-${GE++}`,get nonEmptyItems(){return this.items.filter(a=>a.quantity>0)},get totalPriceCents(){return Math.max(0,qr(this.items,a=>a.total_price_cents))},get totalQuantity(){return qr(this.items,a=>a.quantity)},get valueVoucherCents(){return qr(this.coupons.filter(a=>a.kind==="valueVoucher"),a=>a.valueCents??0)},get amountToPayCents(){return Math.max(0,this.totalPriceCents-this.valueVoucherCents)},toString(){return this.uid+" > ["+this.items.map(a=>a.uuid+":"+a.quantity).join(", ")+"]"},orderData(){return{items:this.items.map(a=>({type:a.type,attributes:a.orderAttributes()})),shipping_address_id:null,comment:null,reference:null,payment_mode_id:this.paymentModeId??S.settings?.defaultPaymentModeId,coupons:this.coupons.map(a=>a.code),donations:[],affiliate:{},total:this.amountToPayCents}},get totalFormatted(){return yt(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(a){for(let o=this.items.length-1;o>=0;o--)this.items[o].uuid===a.uuid&&this.items.splice(o,1);a?.voucher?.code&&!this.items.some(o=>o.voucher?.code===a.voucher.code)&&this.removeCoupon(a.voucher.code)},addItem(a){const o=this.items.find(l=>l.uuid===a.uuid);o?o.quantity+=a.quantity:this.items.push(a)},addItems(a){a.forEach(o=>this.addItem(o))},addCoupon(a){const o={...a,code:a.code.toUpperCase()};this.coupons.some(l=>l.code===o.code)||this.coupons.push(o)},removeCoupon(a){const o=a.toUpperCase(),l=this.coupons.findIndex(c=>c.code===o);if(l>-1){const[c]=this.coupons.splice(l,1);if(c.kind==="serviceVoucher")for(let f=this.items.length-1;f>=0;f--)this.items[f].voucher?.code===o&&this.items.splice(f,1)}},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()}};return e&&e.forEach(a=>s.addItem(rt(a))),s}function KE(){const e=Me(ei());return jE(e),RE(e),e}var Mi="go-capacity";function wp(e,t){const r=Mu(Mi);UE(Mi,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function kp(e){const t=Mu(Mi);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){yp(Mi);return}if(t.allSeats)for(const r in t.allSeats){const n=parseInt(r);e.addSeats(n,t.allSeats[n],!1)}t.allQuotas&&e.addQuotas(t.allQuotas,!1)}}function YE(e){lo()&&window.addEventListener("storage",t=>{if(t.key===Mi&&kp(e),t.key==="go-cart"){const r=Mu("go-cart");(!r||!r.items||r.items.length===0)&&yp(Mi)}})}function Sp(){const e={allSeats:{},allQuotas:{},quotaManager:NE({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&wp(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&wp(this.allSeats,this.allQuotas)},capacityPolicy(t){const r=t.product.type;switch(r){case"Ticket":const n=t.product,i=n.subtype;switch(i){case"timeslot":case"event:ticket":case"day":return Vr(n)?"mantle":"quotas";case"annual":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${i}`)}case"Event":const s=t.product.subtype;switch(s){case"flat":case"scale":return"seats";default:throw new Error(`(getMaxAvailability) Unhandled case: ${s}`)}case"Coupon":return"unlimited";case"Tour":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${r}`)}},capacity(t,r,n){const i=this.capacityPolicy(r),s={quotas:CE,mantle:OE,seats:$E,unlimited:FE}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Re(()=>s(this,t,r,n))},subTicketMaxes(t,r,n){if(!Vr(r.product))return{};const i=this.capacityPolicy(r);if(i!=="mantle"&&i!=="unlimited")throw new Error(`(subTicketMaxes) impossible: ${i}`);return Re(()=>i==="mantle"?IE(this,t,r,n):DE(r.product))}};return kp(e),YE(e),e}function Ep(e){if(typeof document>"u"||!e)return;const t=`; ${document.cookie}`.split(`; ${e}=`);if(t.length===2){const r=t.pop()?.split(";").shift();return r?decodeURIComponent(r):void 0}}var Tp=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},JE=class extends Tp{constructor(){super()}get isLoggedIn(){try{const e=Ep("auth_headers");if(!e)return!1;const t=JSON.parse(e),r=Math.floor(Date.now()/1e3);return!t["access-token"]||parseInt(t.expiry,10)<r?!1:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.uid)}catch{return!1}}get isGuest(){if(this.isLoggedIn)return!1;try{const e=Ep("auth_headers");if(!e)return!0;const t=JSON.parse(e);return typeof t.uid=="string"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.uid)}catch{return!0}}},QE=class extends Tp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},XE=e=>{switch(e){case"angular":return new JE;case"jmb":return new QE;default:throw new Error("Unhandled shop type: "+e)}};function eT(e){return e==null||typeof e=="string"&&e.trim()===""}function tT(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||eT(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function rT(e,t){return tT(e,t)}var nT={withStackTrace:!1},xp=(e,t,r=nT)=>({data:t.isOk()?{type:"Ok",value:t.value}:{type:"Err",value:t.error},message:e,stack:r.withStackTrace?new Error().stack:void 0});function ti(e,t,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(f){try{c(n.next(f))}catch(u){a(u)}}function l(f){try{c(n.throw(f))}catch(u){a(u)}}function c(f){f.done?s(f.value):i(f.value).then(o,l)}c((n=n.apply(e,t||[])).next())})}function Ap(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function jr(e){return this instanceof jr?(this.v=e,this):new jr(e)}function Cp(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(h){return function(g){return Promise.resolve(g).then(h,u)}}function o(h,g){n[h]&&(i[h]=function(v){return new Promise(function(m,y){s.push([h,v,m,y])>1||l(h,v)})},g&&(i[h]=g(i[h])))}function l(h,g){try{c(n[h](g))}catch(v){p(s[0][3],v)}}function c(h){h.value instanceof jr?Promise.resolve(h.value.v).then(f,u):p(s[0][2],h)}function f(h){l("next",h)}function u(h){l("throw",h)}function p(h,g){h(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}function iT(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,s){t[i]=e[i]?function(a){return(r=!r)?{value:jr(e[i](a)),done:!1}:s?s(a):a}:s}}function sT(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Ap=="function"?Ap(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(a){return new Promise(function(o,l){a=e[s](a),i(o,l,a.done,a.value)})}}function i(s,a,o,l){Promise.resolve(l).then(function(c){s({value:c,done:o})},a)}}var ri=class br{constructor(t){this._promise=t}static fromSafePromise(t){return new br(t.then(r=>new Wr(r)))}static fromPromise(t,r){return new br(t.then(n=>new Wr(n)).catch(n=>new Sr(r(n))))}static fromThrowable(t,r){return(...n)=>new br(ti(this,void 0,void 0,function*(){try{return new Wr(yield t(...n))}catch(i){return new Sr(r?r(i):i)}}))}static combine(t){return aT(t)}static combineWithAllErrors(t){return oT(t)}map(t){return new br(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?new Sr(r.error):new Wr(yield t(r.value))})))}andThrough(t){return new br(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);const n=yield t(r.value);return n.isErr()?new Sr(n.error):new Wr(r.value)})))}andTee(t){return new br(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);try{yield t(r.value)}catch{}return new Wr(r.value)})))}orTee(t){return new br(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isOk())return new Wr(r.value);try{yield t(r.error)}catch{}return new Sr(r.error)})))}mapErr(t){return new br(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isOk()?new Wr(r.value):new Sr(yield t(r.error))})))}andThen(t){return new br(this._promise.then(r=>{if(r.isErr())return new Sr(r.error);const n=t(r.value);return n instanceof br?n._promise:n}))}orElse(t){return new br(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?t(r.error):new Wr(r.value)})))}match(t,r){return this._promise.then(n=>n.match(t,r))}unwrapOr(t){return this._promise.then(r=>r.unwrapOr(t))}safeUnwrap(){return Cp(this,arguments,function*(){return yield jr(yield jr(yield*iT(sT(yield jr(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return Cp(this,arguments,function*(){const r=yield jr(this._promise);return r.isErr()&&(yield yield jr(co(r.error))),yield jr(r.value)})}};function co(e){return new ri(Promise.resolve(new Sr(e)))}var mN=ri.fromPromise,vN=ri.fromSafePromise,gN=ri.fromThrowable,Op=e=>{let t=$n([]);for(const r of e)if(r.isErr()){t=Zr(r.error);break}else t.map(n=>n.push(r.value));return t},aT=e=>ri.fromSafePromise(Promise.all(e)).andThen(Op),Dp=e=>{let t=$n([]);for(const r of e)r.isErr()&&t.isErr()?t.error.push(r.error):r.isErr()&&t.isOk()?t=Zr([r.error]):r.isOk()&&t.isOk()&&t.value.push(r.value);return t},oT=e=>ri.fromSafePromise(Promise.all(e)).andThen(Dp),Fu;(function(e){function t(i,s){return(...a)=>{try{return $n(i(...a))}catch(o){return Zr(s?s(o):o)}}}e.fromThrowable=t;function r(i){return Op(i)}e.combine=r;function n(i){return Dp(i)}e.combineWithAllErrors=n})(Fu||(Fu={}));function $n(e){return new Wr(e)}function Zr(e){return new Sr(e)}var Wr=class{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return $n(e(this.value))}mapErr(e){return $n(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map(t=>this.value)}andTee(e){try{e(this.value)}catch{}return $n(this.value)}orTee(e){return $n(this.value)}orElse(e){return $n(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return ri.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,t){return e(this.value)}safeUnwrap(){const e=this.value;return(function*(){return e})()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw xp("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},Sr=class{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return Zr(this.error)}mapErr(e){return Zr(e(this.error))}andThrough(e){return Zr(this.error)}andTee(e){return Zr(this.error)}orTee(e){try{e(this.error)}catch{}return Zr(this.error)}andThen(e){return Zr(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return co(this.error)}asyncAndThrough(e){return co(this.error)}asyncMap(e){return co(this.error)}unwrapOr(e){return e}match(e,t){return t(this.error)}safeUnwrap(){const e=this.error;return(function*(){throw yield Zr(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw xp("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},yN=Fu.fromThrowable,lT=/\{[^{}]+\}/g,uT=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function cT(){return Math.random().toString(36).slice(2,11)}function dT(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:s,pathSerializer:a,headers:o,requestInitExt:l=void 0,...c}={...e};l=uT()?l:void 0,t=Fp(t);const f=[];async function u(p,h){const{baseUrl:g,fetch:v=n,Request:m=r,headers:y,params:E={},parseAs:k="json",querySerializer:T,bodySerializer:A=s??hT,pathSerializer:O,body:F,middleware:R=[],...Y}=h||{};let N=t;g&&(N=Fp(g)??t);let X=typeof i=="function"?i:Mp(i);T&&(X=typeof T=="function"?T:Mp({...typeof i=="object"?i:{},...T}));const q=O||a||fT,le=F===void 0?void 0:A(F,$p(o,y,E.header)),he=$p(le===void 0||le instanceof FormData?{}:{"Content-Type":"application/json"},o,y,E.header),j=[...f,...R],oe={redirect:"follow",...c,...Y,body:le,headers:he};let ee,fe,ce=new m(pT(p,{baseUrl:N,params:E,querySerializer:X,pathSerializer:q}),oe),de;for(const P in Y)P in ce||(ce[P]=Y[P]);if(j.length){ee=cT(),fe=Object.freeze({baseUrl:N,fetch:v,parseAs:k,querySerializer:X,bodySerializer:A,pathSerializer:q});for(const P of j)if(P&&typeof P=="object"&&typeof P.onRequest=="function"){const te=await P.onRequest({request:ce,schemaPath:p,params:E,options:fe,id:ee});if(te)if(te instanceof m)ce=te;else if(te instanceof Response){de=te;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!de){try{de=await v(ce,l)}catch(P){let te=P;if(j.length)for(let L=j.length-1;L>=0;L--){const be=j[L];if(be&&typeof be=="object"&&typeof be.onError=="function"){const Z=await be.onError({request:ce,error:te,schemaPath:p,params:E,options:fe,id:ee});if(Z){if(Z instanceof Response){te=void 0,de=Z;break}if(Z instanceof Error){te=Z;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(te)throw te}if(j.length)for(let P=j.length-1;P>=0;P--){const te=j[P];if(te&&typeof te=="object"&&typeof te.onResponse=="function"){const L=await te.onResponse({request:ce,response:de,schemaPath:p,params:E,options:fe,id:ee});if(L){if(!(L instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");de=L}}}}const G=de.headers.get("Content-Length");if(de.status===204||ce.method==="HEAD"||G==="0"&&!de.headers.get("Transfer-Encoding")?.includes("chunked"))return de.ok?{data:void 0,response:de}:{error:void 0,response:de};if(de.ok)return{data:await(async()=>{if(k==="stream")return de.body;if(k==="json"&&!G){const te=await de.text();return te?JSON.parse(te):void 0}return await de[k]()})(),response:de};let Q=await de.text();try{Q=JSON.parse(Q)}catch{}return{error:Q,response:de}}return{request(p,h,g){return u(h,{...g,method:p.toUpperCase()})},GET(p,h){return u(p,{...h,method:"GET"})},PUT(p,h){return u(p,{...h,method:"PUT"})},POST(p,h){return u(p,{...h,method:"POST"})},DELETE(p,h){return u(p,{...h,method:"DELETE"})},OPTIONS(p,h){return u(p,{...h,method:"OPTIONS"})},HEAD(p,h){return u(p,{...h,method:"HEAD"})},PATCH(p,h){return u(p,{...h,method:"PATCH"})},TRACE(p,h){return u(p,{...h,method:"TRACE"})},use(...p){for(const h of p)if(h){if(typeof h!="object"||!("onRequest"in h||"onResponse"in h||"onError"in h))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");f.push(h)}},eject(...p){for(const h of p){const g=f.indexOf(h);g!==-1&&f.splice(g,1)}}}}function fo(e,t,r){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function Ip(e,t,r){if(!t||typeof t!="object")return"";const n=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if(r.style!=="deepObject"&&r.explode===!1){for(const o in t)n.push(o,r.allowReserved===!0?t[o]:encodeURIComponent(t[o]));const a=n.join(",");switch(r.style){case"form":return`${e}=${a}`;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return a}}for(const a in t){const o=r.style==="deepObject"?`${e}[${a}]`:a;n.push(fo(o,t[a],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function Pp(e,t,r){if(!Array.isArray(t))return"";if(r.explode===!1){const s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",a=(r.allowReserved===!0?t:t.map(o=>encodeURIComponent(o))).join(s);switch(r.style){case"simple":return a;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return`${e}=${a}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const s of t)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?s:encodeURIComponent(s)):i.push(fo(e,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function Mp(e){return function(r){const n=[];if(r&&typeof r=="object")for(const i in r){const s=r[i];if(s!=null){if(Array.isArray(s)){if(s.length===0)continue;n.push(Pp(i,s,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(Ip(i,s,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(fo(i,s,e))}}return n.join("&")}}function fT(e,t){let r=e;for(const n of e.match(lT)??[]){let i=n.substring(1,n.length-1),s=!1,a="simple";if(i.endsWith("*")&&(s=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(a="label",i=i.substring(1)):i.startsWith(";")&&(a="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const o=t[i];if(Array.isArray(o)){r=r.replace(n,Pp(i,o,{style:a,explode:s}));continue}if(typeof o=="object"){r=r.replace(n,Ip(i,o,{style:a,explode:s}));continue}if(a==="matrix"){r=r.replace(n,`;${fo(i,o)}`);continue}r=r.replace(n,a==="label"?`.${encodeURIComponent(o)}`:encodeURIComponent(o))}return r}function hT(e,t){return e instanceof FormData?e:t&&(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])==="application/x-www-form-urlencoded"?new URLSearchParams(e).toString():JSON.stringify(e)}function pT(e,t){let r=`${t.baseUrl}${e}`;t.params?.path&&(r=t.pathSerializer(r,t.params.path));let n=t.querySerializer(t.params.query??{});return n.startsWith("?")&&(n=n.substring(1)),n&&(r+=`?${n}`),r}function $p(...e){const t=new Headers;for(const r of e){if(!r||typeof r!="object")continue;const n=r instanceof Headers?r.entries():Object.entries(r);for(const[i,s]of n)if(s===null)t.delete(i);else if(Array.isArray(s))for(const a of s)t.append(i,a);else s!==void 0&&t.set(i,s)}return t}function Fp(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function mT(e,t){return dT({baseUrl:e,headers:{"X-Shop-Url":t}})}var vT="/api/v4/calendar",gT="/api/v4/tickets/calendar",yT="/api/v4/auth/validate_token",bT="/api/v4/tickets/list_and_quotas",_T="/api/v4/tickets",wT="/api/v4/auth/sign_in",kT="/api/v4/auth",ST="/api/v4/orders/withdrawals",ET="/api/v4/customer/memberships/activate",TT="/api/v4/orders",xT="/api/v4/customer/customer_addresses",AT="/api/v4/customer/memberships",Np={SHOP_GUEST:10,SHOP:20},ho={error:{success:!1,errors:["Not signed in"]}},Rp=X_,CT=class{type;#e=ae(Me({customerSalutations:[],countries:[],locales:[]}));#t={};constructor(e,t,r,n="angular"){this.type=n,e&&t&&r&&this.load(e,t,r,n)}async load(e,t,r,n="angular"){(e.includes("jmb-staging.gomus.de")||e.includes("jmb.gomus.de"))&&(this.type="jmb"),d(this.#e).urls=tw(this.type),d(this.#e).currentUser=XE(this.type),d(this.#e).apiUrl=e,d(this.#e).shopDomain=t,d(this.#e).locale=r||"de",Y_(d(this.#e).locale),this.#t={},d(this.#e).client=mT(e,t),d(this.#e).capacityManager=Sp(),d(this.#e).cart=KE(),d(this.#e).auth=new Vf,d(this.#e).client.use(new pw(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return d(this.#e).capacityManager||(d(this.#e).capacityManager=Sp()),d(this.#e).capacityManager}get cart(){return d(this.#e).cart}get auth(){return d(this.#e).auth||(d(this.#e).auth=new Vf),d(this.#e).auth}get currentUser(){return d(this.#e).currentUser}get slug(){return this.shopDomain?.match(/^(?:https?:\/\/)?([^.-]+)/)?.[1]}get client(){return d(this.#e).client}get name(){return this.shop?.name}get config(){return this.shop?.config}get payment_modes(){return this.shop?.payment_modes}get content(){return this.shop?.content}get settings(){return this.shop?.settings}get donations(){return this.shop?.config.donations}get translations(){return{...Rp[(this.locale??"en").toLowerCase().split(/[-_]/)[0]]??Rp.en,...this.shop?.translations}}get currency(){return this.shop?.config.currency}t(e,t){return this.translate(e,t)}translate(e,t){if(!this.translations?.[e])return e;let r=this.translations[e];if(t&&r)for(const[n,i]of Object.entries(t))r=r.replace(`{{${n}}}`,i);return r||""}get apiUrl(){return d(this.#e).apiUrl}get shopDomain(){return d(this.#e).shopDomain}get baseUrl(){return"https://"+this.shopDomain}get locale(){return d(this.#e).locale??"de"}formatTime(e){return pp(e,this.locale)}formatDate(e,t){return xE(e,t,this.locale)}get shop(){return this.fetchAndCache("/api/v4/shop","shop","shop")}get _data(){return d(this.#e)}getCustomer(){return this.auth.data.accessToken?this.fetchAndCache(yT,"getCustomer","",{cache:5}):ho}getOrders(e={}){return this.auth.data.accessToken?this.fetchAndCache(TT,`orders-${JSON.stringify(e)}`,"",{cache:5,query:e}):ho}getCustomerAddresses(){return this.auth.data.accessToken?this.fetchAndCache(xT,"customerAddresses","",{cache:5}):ho}getCustomerMemberships(){return this.auth.data.accessToken?this.fetchAndCache(AT,"customerMemberships","",{cache:5}):ho}ticketsCalendar(e){return this.fetchAndCache(gT,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(vT,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(bT,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:Vt({per_page:100},e??{})})}tickets(e){return this.fetchAndCache(_T,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:Vt({per_page:100},e??{})})}ticketsContent(e){return this.fetchAndCache("/api/v4/tickets/content",`ticketsContent-${JSON.stringify(e)}`,"data",{cache:300,query:Vt({"ticket_ids[]":e},{per_page:100})})}signIn(e){return this.apiPost(wT,{body:e,requiredFields:["email","password"]})}signUp(e,t=!1){e=Vt({addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:t?Np.SHOP_GUEST:Np.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(kT,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(ST,{body:t,requiredFields:["order_id","first_name","last_name","email"],parseAs:"text"})}getDates(e){return this.fetchAndCache("/api/v4/dates",`dates-${JSON.stringify(e)}`,"dates",{query:Vt({per_page:100},e),cache:60})}updatePassword(e){return this.apiPut("/api/v4/auth/password",{body:e,requiredFields:["current_password","password","password_confirmation"]})}passwordReset(e){return this.apiPost("/api/v4/auth/password",{body:e,requiredFields:["email"]})}setNewPassword(e,t){return this.apiPut("/api/v4/auth/password",{body:e,requiredFields:["password","password_confirmation"],params:{header:t}})}activateMembership(e){return this.apiPost(ET,{body:e,requiredFields:["email"],parseAs:"text"})}checkout(e){return this.apiPost("/api/v4/orders",{body:e,requiredFields:["items","total"]})}#r=null;async createCart(e){const t=JSON.stringify({items:e.items??[],coupons:e.coupons??[]});if(this.#r?.key===t)return this.#r.result;const r=await this.apiPost("/api/v4/cart",{body:e,requiredFields:["items"]});return this.#r={key:t,result:r},r}order(e){return this.fetchAndCache("/api/v4/orders/{id}",`order-${e}`,"order",{path:{id:e}})}annualOrder(e){return this.fetchAndCache("/api/v4/annual/order",`annual-order-${e}`,"order",{query:{token:e}})}finalizePersonalizations(e,t){return this.apiPost("/api/v4/annual/personalization/finalize",{body:t,params:{query:{token:e}}})}uploadPersonalizationPhoto(e,t,r){const n=new FormData;return n.append("file",r),this.apiUpload("/api/v4/annual/personalizations/{id}/upload",{body:n,params:{path:{id:t},query:{token:e}}})}fetchAndCache(e,t,r,n){if(n??={},n.query??={},n.cache??=1e3,n.path??={},!this.#i())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),d(this.#e)[t];const i=n.query,s=e+JSON.stringify(i),a=!this.#t[s],o=this.#t[s]?.fetchedAt<Date.now()-n.cache*1e3;return(a||o)&&this.apiGet(e,i,n.path).then(l=>{l&&(d(this.#e)[t]=r===""?l:l[r])}),d(this.#e)[t]}get museums(){return this.fetchAndCache("/api/v4/museums","museums","museums",{query:{per_page:100}})}get exhibitions(){return this.fetchAndCache("/api/v4/exhibitions","exhibitions","exhibitions",{query:{per_page:100}})}getEvent(e){return this.fetchAndCache(`/api/v4/events/${e}`,`single_event_${e}`,"event")}getTicketCapacities(e,t){return this.apiPost("/api/v4/tickets/capacities",{body:{date:e,ticket_ids:t},requiredFields:["date","ticket_ids"]})}getCouponSaleByBarcode(e){return this.fetchAndCache(`/api/v4/coupon_sales/barcode/${e}`,`coupon_sale_barcode_${e}`,"coupon_sale",{cache:0})}getCoupons(){return this.fetchAndCache("/api/v4/coupons","coupons","coupons",{query:{online_available:!0,per_page:100}})}getEventDetailsOnDate(e,t){return this.fetchAndCache(`/api/v4/events/${e}/dates/${t}`,`/api/v4/events/${e}/dates/${t}`,"date")}get events(){return this.fetchAndCache("/api/v4/events","events","events",{query:{per_page:100}})}get upcomingEvents(){return this.fetchAndCache("/api/v4/events","events","events",{query:{by_bookable:!0,with_bookings_in_future:1,per_page:100}})}get tours(){return this.fetchAndCache("/api/v4/tours","tours","tours",{query:{per_page:100}})}get merchandises(){return this.fetchAndCache("/api/v4/merchandises","merchandises","merchandises",{query:{per_page:100}})}get customerSalutations(){return this.fetchAndCache("/api/v3/customer_salutations","customerSalutations","customer_salutations")}get countries(){return this.fetchAndCache("/api/v3/countries","countries","countries",{query:{per_page:100}})}get locales(){return this.fetchAndCache("/api/v4/locales","locales","locales_options")}get urls(){return d(this.#e).urls}get#n(){return{params:{query:{locale:this.locale},header:{"X-Shop-Url":this.shopDomain}}}}async apiPost(e,t){return this.apiCall(e,{method:"POST",...t})}async apiPut(e,t){return this.apiCall(e,{method:"PUT",...t})}async apiDELETE(e,t){return this.apiCall(e,{method:"DELETE",...t})}async apiUpload(e,t){this.#s();const{body:r,params:n={}}=t;return await this.client.POST(e,{body:r,params:Vt(this.#n,{params:n}).params,bodySerializer:i=>i})}async apiCall(e,t){this.#s();const{body:r,params:n={},requiredFields:i,parseAs:s}=t,a=rT(r,i);if(Object.keys(a).length>0)return{error:{errors:a}};const o=this.client[t.method];return await o(e,{body:r,params:Vt(this.#n,{params:n}).params,parseAs:s})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(t=>t.status==="fetching").length;)await iw(10)}async apiGet(e,t={},r){this.#s();const n=e+JSON.stringify(t);this.#t[n]={status:"fetching",fetchedAt:Date.now()};let i=this.#n;t&&(i=Vt(i,{params:{query:t}})),e&&(i=Vt(i,{params:{path:r}}));const s=await this.client.GET(e,i);return this.#t[n]={status:"completed",fetchedAt:Date.now()},s.data||s}#i=()=>this.apiUrl!==void 0&&this.shopDomain!==void 0&&this.locale!==void 0&&this.client!==void 0;#s=()=>{if(this.apiUrl===void 0)throw new Error("Public API URL is not set");if(this.shopDomain===void 0)throw new Error("Shop Domain (X-Shop-Url) is not set");if(this.locale===void 0)throw new Error("Locale is not set");if(this.client===void 0)throw new Error("client is not set");if(!this.#i())throw new Error("Fetch is not possible.")}},S=new CT;function $i(e){return function(t,r){if(t)t.addEventListener(e,n=>{n.stopPropagation(),n.detail.value=r});else throw new Error("(createSetDetails) Host is undefined, You are probably trying to use this in a non-web-component context.")}}var OT=class py{host;KEY;pollDuration;#e=ae(Me({value:void 0}));error=!1;constructor(t,r,n=1e3){this.host=t,this.KEY=r,this.pollDuration=n}static static(t){const r=new py(null,null);return r.value=t,r}load(){Ql(()=>(this.host.dispatchEvent(new CustomEvent(this.KEY,{detail:this,bubbles:!0})),this.value),this.pollDuration).then(()=>{},()=>{this.error=!0,console.warn("(createGetDetails) could not load data for:",this.KEY)})}get value(){return d(this.#e).value}set value(t){d(this.#e).value=t}};function Fi(e){return function(t,r={pollDuration:1e3}){if(t){const n=new OT(t,e,r.pollDuration);return n.load(r.pollDuration),n}else throw new Error("(createGetDetails) Host is undefined, You are probably trying to use this in a non-web-component context.")}}var DT={urls:{},navigateTo:e=>{window.location.assign(e)},forms:{},fields:{},quantityStepper:!0},IT=class{defaultConfig=Vt(DT,window.customOptions);override=this.defaultConfig;#e=ae(Me(this.defaultConfig));get options(){return d(this.#e)}set options(e){$(this.#e,e,!0)}constructor(){this.update()}update(){const e=Vt(this.defaultConfig,this.override);e.forms=Object.keys({...this.defaultConfig.forms,...this.override.forms}).reduce((t,r)=>(t[r]={...this.defaultConfig.forms[r],...this.override.forms[r]},t),{}),this.options=e}get config(){return this.options}define(e){return this.override=Vt(this.override,e),this.update(),this}default(e){return this.defaultConfig=Vt(this.defaultConfig,e),this.update(),this}},Xe=new IT,Lp=class{#e=ae();get token(){return d(this.#e)}set token(e){$(this.#e,e,!0)}#t=ae();get ticketSaleId(){return d(this.#t)}set ticketSaleId(e){$(this.#t,e,!0)}get order(){if(this.token)return hl(S.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return hl(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return Xe.config.urls.annualTicketPersonalizationForm?Xe.config.urls.annualTicketPersonalizationForm(this.token,e.id):S.urls.annualTicketPersonalizationForm(this.token,e.id)}},zp="go-annual-ticket-personalization",qp=$i(zp),PT=Fi(zp),MT=B("<li><a> </a></li>"),$T=B('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function FT(e,t){ne(t,!0);let r=_(t,"token",7);const n=new Lp;qp(t.$$host,n),ve(()=>{n.token=r()});let i=D(()=>n.order);var s={details:n,get token(){return r()},set token(c){r(c),b()}},a=re(),o=U(a),l=c=>{var f=re(),u=U(f);Ne(u,17,()=>d(i).ticket_sales,p=>p.id,(p,h)=>{var g=$T(),v=M(g),m=M(v,!0);I(v);var y=V(v,2),E=M(y,!0);I(y);var k=V(y,2),T=A=>{var O=MT(),F=M(O),R=M(F,!0);I(F),I(O),J((Y,N)=>{me(F,"href",Y),H(R,N)},[()=>n.goToPersonalization(d(h)),()=>S.t("ticket.annual.personalization.list.personalize.add")]),x(A,O)};ue(k,A=>{d(h).status=="not_ready_to_send"&&A(T)}),I(g),J(A=>{me(g,"data-ticket-sale-id",d(h).id),H(m,d(h).title),H(E,A)},[()=>S.t("ticket.annual.personalization.detail.title",{count:d(h).personalizations.length})]),x(p,g)}),x(c,f)};return ue(o,c=>{d(i)&&c(l)}),x(e,a),ie(s)}customElements.define("go-annual-ticket-personalization",se(FT,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));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(e=>({label:e.salutation,value:e.id}))},firstName:{key:"firstName",apiKey:"name",type:"text",label:"user.registration.form.name",placeholder:"",description:"",autocomplete:"given-name"},lastName:{key:"lastName",apiKey:"surname",type:"text",label:"user.registration.form.surname",placeholder:"",description:"",autocomplete:"family-name"},email:{key:"email",apiKey:"email",type:"email",label:"user.registration.form.email",placeholder:"",description:"",autocomplete:"email",validator:Qt().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:Qt().email("user.fieldErrors.emailValid")},password:{key:"password",apiKey:"password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"current-password"},currentPassword:{key:"current_password",apiKey:"current_password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"current-password"},newPassword:{key:"password",apiKey:"password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"new-password",validator:Qt().min(6,"user.fieldErrors.passwordTooShort")},confirmPassword:{key:"confirmPassword",apiKey:"password_confirmation",type:"password",label:"user.registration.form.confirmPassword",placeholder:"",description:"",autocomplete:"new-password"},addressee:{key:"addressee",apiKey:"addr_addressat",type:"text",label:"user.registration.form.adressat",placeholder:"",description:"",autocomplete:"name"},street:{key:"street",apiKey:"addr_street",type:"text",label:"user.registration.form.street",placeholder:"",description:"",autocomplete:"street-address"},postcode:{key:"postcode",apiKey:"addr_zip",type:"text",label:"user.registration.form.plz",placeholder:"",description:"",autocomplete:"postal-code"},city:{key:"city",apiKey:"addr_city",type:"text",label:"user.registration.form.city",placeholder:"",description:"",autocomplete:"address-level2"},country:{key:"country",apiKey:"addr_country_id",type:"select",label:"user.registration.form.country",placeholder:"",description:"",autocomplete:"country",options:()=>S.countries.map(e=>({label:e.name,value:e.id}))},language:{key:"language",apiKey:"language_id",type:"select",label:"user.registration.form.language",placeholder:"",description:"",autocomplete:"language",options:()=>(S.locales??[]).map(e=>({label:S.t(`languages.${e.locale}`),value:e.id}))},acceptTerms:{key:"acceptTerms",apiKey:"terms",type:"checkbox",label:"user.registration.form.accept",placeholder:"",description:"",autocomplete:"off"},startAt:{apiKey:"start_at",key:"startAt",type:"date",label:"ticket.annual.personalization.list.startAt.update",placeholder:"",description:"",autocomplete:"off",validator:Qt().date()},dateOfBirth:{key:"dateOfBirth",apiKey:"date_of_birth",type:"date",label:"user.registration.form.dateOfBirth",placeholder:"",description:"",autocomplete:"bday",validator:Qt().date()},token:{key:"token",apiKey:"id",type:"text",label:"cart.coupon.form.code",placeholder:"",description:"",autocomplete:"off"},photo:{key:"photo",apiKey:"file",type:"file",label:"ticket.annual.personalization.form.photo",placeholder:"",description:"",autocomplete:"off",validator:V1(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 RT(e,t){return{...e,errors:e.errors||[],value:e.value??LT(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){zT(this)}}}function LT(e){return e==="checkbox"?!1:e==="file"?null:""}function zT(e){if(e.errors=[],!e.validator){e.required&&(e.value===!1||e.value===""||e.value===null||e.value===void 0)&&(e.errors=["common.fieldErrors.required"]);return}const t=e.validator.safeParse(e.value);t.success?e.errors=[]:e.errors=t.error.format()._errors}var Pt=class rl{static#e={};static defineForm(t){Xe.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){Xe.default({fields:t})}static{rl.defineFields(NT)}static setRequiredApiKeys(t,r){rl.#e[t]=r}static getFormOptions(t){return Xe.config.forms[t]}static createField(t,r){const n=rl.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return RT(n,r)}static getFormFields(t){return qT(t)}static getFieldInit(t){return Xe.config.fields[t]}};function qT(e){const t=Xe.config.forms[e];if(!t)throw new Error(`(formFields) Form ${e} not found`);const r=t.fields;return r||(console.warn("(formFields) No fields defined for form",e),[])}function Nu(e){return e?e.filter(t=>t.mounted&&(t.errors?.length||t.apiErrors?.length)).length:0}function UT(e,t){ne(t,!0);let r=_(t,"token",7),n=_(t,"ticketSaleId",7),i=null;const s=new Lp;qp(t.$$host,s),ve(()=>{s.token=r(),s.ticketSaleId=n()}),Pt.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function a(){if(!i)return;const v=s.ticketSale.personalizations.length,m=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),y=Bf(v,(O,F)=>{const R=m[F-1].details;return O.push(R),O},[]);if(y.forEach(O=>{O.fields.forEach(F=>{O.validateField(F)})}),!Bf(v,(O,F)=>y[F-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const O=y.map(async(R,Y)=>{const N=s.ticketSale.personalizations[Y].id,X=R.fields.find(le=>le.key==="photo")?.value;if(!(X instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const q=await S.uploadPersonalizationPhoto(r(),N,X);return q.error?{ok:!1,error:q.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),F=(await Promise.all(O)).find(R=>!R.ok);if(F){i.details.apiErrors=[F.error];return}}const E={personalization:{ticket_sale_id:s.ticketSaleId,start_at:i.details.formData.start_at,personalizations:y.map((O,F)=>{const R=hw(O.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[F].id,customer:R}})}},k=await S.finalizePersonalizations(r(),E);if(k.error){i.details.apiErrors=k.error.error?[k.error.error]:[];return}const T=Xe.config.forms.personalization?.beforeSubmit;T&&T(E);const A=Xe.config.urls.annualTicketPersonalizationFormSubmit?.(r());A&&Xe.config.navigateTo(A)}let o=null,l=null,c=null,f=0;function u(v){v.querySelectorAll("go-field").forEach(m=>m.replaceChildren())}function p(){return o?!0:(o=t.$$host.querySelector("go-personalization-form"),o?(l=o.cloneNode(!0),u(l),c=new Comment("go-personalization-form-anchor"),o.after(c),!0):(console.warn("[personalization] No <go-personalization-form> supplied"),!1))}function h(v){if(!p()||!o||!l||!c)return;const m=o.parentElement;if(!m)return;const y=Math.max(v,1),E=Array.from(m.querySelectorAll("go-personalization-form"));for(;E.length<y;){const T=l.cloneNode(!0);u(T),m.insertBefore(T,c),E.push(T)}for(;E.length>y;){const T=E.pop();T&&T!==o&&T.remove()}const k=s.ticketSale?.personalizations??[];E.forEach((T,A)=>{const O=k[A];O&&(T.dataset.personalizationId=String(O.id))}),f=y}En(()=>{p(),t.$$host.addEventListener("go-submit",a),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),ve(()=>{if(!s.ticketSale)return;const v=s.ticketSale?.personalizations.length??1;v!==f&&h(v)});var g={details:s,get token(){return r()},set token(v){r(v),b()},get ticketSaleId(){return n()},set ticketSaleId(v){n(v),b()}};return ie(g)}customElements.define("go-annual-ticket-personalization-form",se(UT,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var BT=class{formId;form;#e=ae(Me([]));#t=D(()=>Nu(this.fields)==0);get isValid(){return d(this.#t)}set isValid(e){$(this.#t,e)}#r=ae();get successMessage(){return d(this.#r)}set successMessage(e){$(this.#r,e,!0)}get formData(){function e(r){return lw(r)||sw(r)?r:r==="true"||r==="false"?r==="true":!Number.isNaN(+r)&&r.trim()!==""?+r:r}const t=this.fields.filter(r=>r!==void 0).filter(r=>r.type!=="file").filter(r=>r.value!=="");return Object.fromEntries(t.map(r=>[r.apiKey,e(r.value)]))}fieldValue(e){return this.fields.find(t=>t.key===e)?.value}get apiErrors(){return d(this.#e)}set apiErrors(e){if($(this.#e,[],!0),this.fields.forEach(t=>t.apiErrors=[]),Xl(e)){$(this.#e,e,!0);return}if(e.errors&&Xl(e.errors)&&$(this.#e,e.errors,!0),ow(e.error)){$(this.#e,[e.error],!0);return}for(const[t,r]of Object.entries(e)){if(t==="full_messages"||t==="success"||t==="errors")continue;const n=this.fields.find(i=>i.apiKey===t);if(!n){console.error(`(set apiErrors) Field with API key ${t} not found`);continue}n.apiErrors=r}}validateForm(){this.fields.forEach(e=>this.validateField(e))}validateField(e){if(e.validate(),e.apiKey==="password_confirmation"){const t=this.fields.find(r=>r.apiKey==="password");(!t||t&&e.value!==t.value)&&e.errors.push("user.fieldErrors.passwordMatch")}else if(e.apiKey==="email_confirmation"){const t=this.fields.find(r=>r.apiKey==="email");(!t||t&&e.value!==t.value)&&e.errors.push("user.fieldErrors.emailMatch")}}get fields(){const e=this.form.closest("go-form");return Array.from(this.form.querySelectorAll("go-field")).filter(t=>t.closest("go-form")===e).map(t=>t.getField?.()).filter(t=>!!t)}toString(){return`Form: ${this.formId}, Fields: [${this.fields.map(e=>e.key).join(", ")}], Data: ${JSON.stringify(this.formData)}`}fill(e){const t=this.fields;Object.entries(e).forEach(([r,n])=>{const i=t.find(s=>s.apiKey===r);if(!i){console.warn(`(FormDetails.fill) Field with API key ${r} not found.`);return}if(i.type==="select"&&!i.options?.().find(s=>s.value===n))throw new Error(`(FormDetails.fill) Field ${r} has invalid value: ${n}`);if(i.type==="checkbox"&&![!0,!1].includes(n))throw new Error(`(FormDetails.fill) Field ${r} has invalid value: ${n}`);i.value=n})}constructor(e,t){this.formId=e,this.form=t}},Up="go-form-details",VT=$i(Up),Ni=Fi(Up);function Hr(e,t,r){const n=e.firstElementChild||void 0;if(e.children?.length===1&&n?.tagName.toLowerCase()===t)return n;const i=document.createElement(t);r&&Object.entries(r).forEach(([a,o])=>{typeof o=="boolean"?o&&i.setAttribute(a,""):i.setAttribute(a,o)});const s=document.createDocumentFragment();for(;e.firstChild;)s.appendChild(e.firstChild);return i.appendChild(s),e.replaceChildren(i),i}var jT=B("<go-all-fields></go-all-fields> <go-form-feedback><go-errors-feedback></go-errors-feedback> <go-success-feedback></go-success-feedback></go-form-feedback> <go-submit> </go-submit>",3);function ZT(e,t){ne(t,!0);let r=_(t,"formId",7),n=_(t,"custom",7);const i=new BT(r(),t.$$host);VT(t.$$host,i);async function s(f){f.preventDefault(),f.stopPropagation(),i.validateForm(),i?.form?.dispatchEvent(new Event("go-after-validation",f)),i.isValid&&(i.apiErrors={},i.successMessage=void 0,i?.form?.dispatchEvent(new Event("go-submit",f)),t.$$host.dispatchEvent(new Event("submit",{bubbles:!0,composed:!0})))}En(()=>{const f=Hr(t.$$host,"form",{novalidate:!0});f.addEventListener("submit",s),i.form=f});var a={details:i,get formId(){return r()},set formId(f){r(f),b()},get custom(){return n()},set custom(f){n(f),b()}},o=re(),l=U(o),c=f=>{var u=jT(),p=U(u),h=V(p,2),g=V(h,2),v=M(g,!0);I(g),J(m=>H(v,m),[()=>S.t(Pt.getFormOptions(r())?.submitLabel||"Submit")]),x(f,u)};return ue(l,f=>{n()||f(c)}),x(e,o),ie(a)}customElements.define("go-form",se(ZT,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var WT=B("<go-form></go-form>",2);function HT(e,t){ne(t,!0);let r=_(t,"custom",7,!1),n=_(t,"redirectUrl",7,"");Pt.defineForm({id:"passwordReset",submitLabel:"user.passwordReset.actions.requestPasswordReset",fields:[{key:"email",required:!0}]});async function i(o){const l=o.target.details,c=l.formData,f=await S.passwordReset(n()?{...c,redirect_url:n()}:c);f.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),l.successMessage=f.data.message,l.apiErrors=[]):l.apiErrors=f.error.errors}var s={get custom(){return r()},set custom(o=!1){r(o),b()},get redirectUrl(){return n()},set redirectUrl(o=""){n(o),b()}},a=WT();return xn(a,"formId","passwordReset"),J(()=>xn(a,"custom",r())),Ts("submit",a,i),x(e,a),ie(s)}customElements.define("go-password-reset",se(HT,{redirectUrl:{attribute:"redirect-url",type:"String"},custom:{}},[],[]));var GT=B("<go-form></go-form>",2);function KT(e,t){ne(t,!0);let r=_(t,"accessToken",7,""),n=_(t,"client",7,""),i=_(t,"uid",7,"");Pt.defineForm({id:"setPassword",submitLabel:"user.passwordReset.actions.resetPassword",fields:[{key:"newPassword",required:!0},{key:"confirmPassword",required:!0}]});async function s(l){const c=l.target.details,f=await S.setNewPassword(c.formData,{"access-token":r(),client:n(),uid:i()});f.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),c.successMessage=f.data.message,c.apiErrors=[]):c.apiErrors=f.error.errors}var a={get accessToken(){return r()},set accessToken(l=""){r(l),b()},get client(){return n()},set client(l=""){n(l),b()},get uid(){return i()},set uid(l=""){i(l),b()}},o=GT();return xn(o,"formId","setPassword"),Ts("submit",o,s),x(e,o),ie(a)}customElements.define("go-set-password",se(KT,{accessToken:{attribute:"access-token",type:"String"},client:{attribute:"client",type:"String"},uid:{attribute:"uid",type:"String"}},[],[]));function YT(e,t){ne(t,!0),Pt.defineForm({id:"signIn",submitLabel:"common.actions.login",fields:[{key:"email",required:!0},{key:"password",required:!0}]});let r=_(t,"custom",7,!1);async function n(i){const s=i.target.details,a=await S.signIn(s.formData);a.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error.errors}return Hr(t.$$host,"go-form",{"form-id":"signIn",custom:r()}),t.$$host.addEventListener("submit",n),ie({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-sign-in",se(YT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function JT(e,t){ne(t,!0);let r=_(t,"custom",7,!1);Pt.defineForm({id:"signUp",submitLabel:"common.actions.register",fields:[{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"newPassword",required:!0},{key:"confirmPassword",required:!0},{key:"acceptTerms",required:!0}]});async function n(i){const s=i.target.details,a=await S.signUp(s.formData,!1);a.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error.errors}return Hr(t.$$host,"go-form",{"form-id":"signUp",custom:r()}),t.$$host.addEventListener("submit",n),ie({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-sign-up",se(JT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function QT(e,t){if(typeof e=="number"&&Number.isFinite(e))return e;if(e&&typeof e=="object"){const r=Object.values(e).reduce((n,i)=>typeof i=="number"&&Number.isFinite(i)?n+i:n,0);if(r>0)return r}return t}function XT(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function ex(e){return QT(XT(e),0)}function tx(e,t){const r=ei(),n=new Set(t.map(i=>i.attributes.coupon).filter(Boolean).map(i=>i.toUpperCase()));return e.coupons.forEach(i=>r.addCoupon({...i,applied:i.kind!=="actionToken"||n.has(i.code)})),t.forEach(i=>{const s=i.attributes,a=s.uuid,o=e.items.find(l=>l.uuid===a);if(!o){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:s});return}r.addItem(rx(o,s))}),r}function rx(e,t){const r=vp(e.product)?1:ex(t),n=e.product.price_cents,i=n===0?0:t.price_cents??n,s=i<n;return rt({...e.product,price_cents:i},{quantity:r,time:e.time,voucher:e.voucher,mantle:e.mantle,display:{discounted:s,reference_uuid:e.uuid,originalPrice:n}})}var nx=class{#e=ae();get displayCart(){return d(this.#e)}set displayCart(e){$(this.#e,e,!0)}#t=ae(!1);get preview(){return d(this.#t)}set preview(e){$(this.#t,e,!0)}get totalPriceCents(){return this.displayCart?.amountToPayCents??0}get subtotalPriceCents(){return 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:t,coupons:r}=e.orderData(),n=await S.createCart({items:t,coupons:r});if(n?.data){this.displayCart=tx(e,n.data.items??[]);return}console.error("(go-cart) Unable to fetch discounted cart data",n?.error),this.displayCart=e}catch(t){console.error("(go-cart) Unable to fetch discounted cart data",t),this.displayCart=e}}},Bp="go-cart-details",ix=$i(Bp),Ri=Fi(Bp),sx=B('<span class="go-cart-item-title" data-testid="cart-item-title"> </span>');function Vp(e,t){ne(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(a){r(a),b()}},i=sx(),s=M(i,!0);return I(i),J(()=>H(s,r().product.title)),x(e,i),ie(n)}se(Vp,{cartItem:{}},[],[],{mode:"open"});var ax=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span><span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),ox=B('<span class="go-cart-item-title" data-testid="cart-item-title"><span class="go-cart-item-title-event-title"> </span><span class="go-cart-item-title-ticket-title"> </span></span><!>',1);function jp(e,t){ne(t,!0);let r=_(t,"cartItem",7);if(!js(r().product))throw new Error("Product is not an event ticket");const n=r().product;var i={get cartItem(){return r()},set cartItem(h){r(h),b()}},s=ox(),a=U(s),o=M(a),l=M(o,!0);I(o);var c=V(o),f=M(c,!0);I(c),I(a);var u=V(a),p=h=>{var g=ax(),v=U(g),m=M(v,!0);I(v);var y=V(v),E=M(y,!0);I(y),J((k,T)=>{H(m,k),H(E,T)},[()=>S.formatDate(r().time,"dayMonth"),()=>S.formatTime(r().time)]),x(h,g)};return ue(u,h=>{r().time&&h(p)}),J(()=>{H(l,n.event_title),H(f,n.title)}),x(e,s),ie(i)}se(jp,{cartItem:{}},[],[],{mode:"open"});var lx=B('<span class="go-cart-item-subtitle" data-testid="cart-item-subtitle"> </span>'),ux=B('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),cx=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),dx=B('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!> <!>',1);function Zp(e,t){ne(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(p){r(p),b()}},i=dx(),s=U(i),a=M(s,!0);I(s);var o=V(s,2),l=p=>{var h=lx(),g=M(h,!0);I(h),J(()=>H(g,r().product.sub_title)),x(p,h)},c=D(()=>oo(r().product)&&r().product.sub_title);ue(o,p=>{d(c)&&p(l)});var f=V(o,2),u=p=>{var h=cx(),g=U(h),v=M(g,!0);I(g);var m=V(g,2),y=E=>{var k=ux(),T=M(k,!0);I(k),J(A=>H(T,A),[()=>S.formatTime(r().time)]),x(E,k)};ue(m,E=>{r().product.type==="Ticket"&&r().product.subtype==="timeslot"&&E(y)}),J(E=>H(v,E),[()=>S.formatDate(r().time,"dayMonth")]),x(p,h)};return ue(f,p=>{r().time&&p(u)}),J(()=>H(a,r().product.title)),x(e,i),ie(n)}se(Zp,{cartItem:{}},[],[],{mode:"open"});var fx=B('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),hx=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),px=B('<span class="go-cart-item-custom" data-testid="cart-item-custom"> </span>'),mx=B('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <span class="go-cart-item-participants" data-testid="cart-item-participants"> </span> <!> <!>',1);function Wp(e,t){ne(t,!0);let r=_(t,"cartItem",7);const n=D(()=>r().product),i=D(()=>{if(!r().time)return null;try{return{date:S.formatDate(r().time,"short"),time:S.formatTime(r().time)}}catch{return{date:r().time,time:""}}}),s=m=>m==null?"":typeof m=="object"?JSON.stringify(m):String(m),a=D(()=>Object.entries(d(n).customs??{}).filter(([,m])=>m!=null&&m!==""));var o={get cartItem(){return r()},set cartItem(m){r(m),b()}},l=mx(),c=U(l),f=M(c,!0);I(c);var u=V(c,2),p=M(u,!0);I(u);var h=V(u,2),g=m=>{var y=hx(),E=U(y),k=M(E,!0);I(E);var T=V(E,2),A=O=>{var F=fx(),R=M(F,!0);I(F),J(()=>H(R,d(i).time)),x(O,F)};ue(T,O=>{d(i).time&&O(A)}),J(()=>H(k,d(i).date)),x(m,y)};ue(h,m=>{d(i)&&m(g)});var v=V(h,2);return Ne(v,17,()=>d(a),([m,y])=>m,(m,y)=>{var E=D(()=>Jy(d(y),2));let k=()=>d(E)[0],T=()=>d(E)[1];var A=px(),O=M(A);I(A),J(F=>H(O,`${k()??""}: ${F??""}`),[()=>s(T())]),x(m,A)}),J(m=>{H(f,d(n).title),H(p,m)},[()=>S.t("cart.item.participants",{count:d(n).participants})]),x(e,l),ie(o)}se(Wp,{cartItem:{}},[],[],{mode:"open"});function Hp(e,{min:t,max:r}){const n=e<t?Math.max(t,1):e+1;return n>r?e:n}function vx(e,{min:t,floor:r=0}){return e<=t?r:e-1}function gx(e,{min:t,max:r,floor:n=0}){if(!Number.isFinite(e)||e<=0)return n;let i=Math.floor(e);return i<t&&(i=t),i>r&&(i=r),i}function yx(e,{min:t,max:r,floor:n=0}){return e<0||e>r?!1:e===n||e>=t}function Gp(e,t){return Hp(e,t)>e}function Kp(e,{floor:t=0}){return e>t}var bx=B('<div class="go-quantity-stepper" role="group"><button type="button" tabindex="-1"><span aria-hidden="true"> </span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>');function Yp(e,t){const r=mt();ne(t,!0);let n=_(t,"value",7),i=_(t,"min",7),s=_(t,"max",7),a=_(t,"floor",7,0),o=_(t,"label",7),l=_(t,"decreaseLabel",7),c=_(t,"increaseLabel",7),f=_(t,"onDecrementBelowMin",7),u=_(t,"removeAriaLabel",7),p=_(t,"removeLabel",7,"✕"),h=_(t,"onChange",7);const g=D(()=>f()!=null),v=D(()=>Math.max(i(),1)),m=D(()=>d(g)?{min:d(v),max:s(),floor:d(v)}:{min:i(),max:s(),floor:a()}),y=D(()=>d(g)&&n()<=d(v));let E,k=ae(!1);const T=D(()=>!d(y)&&!Kp(n(),d(m))),A=D(()=>!Gp(n(),d(m)));function O(G){G!==n()&&h()(G)}function F(){d(y)?f()():R()}function R(){Kp(n(),d(m))&&O(vx(n(),d(m)))}function Y(){Gp(n(),d(m))&&O(Hp(n(),d(m)))}function N(){const G=parseInt(E.value,10);if(d(g)&&(!Number.isFinite(G)||G<=0)){$(k,!1),E.value=String(n()),f()();return}const Q=gx(G,d(m));$(k,!1),E.value=String(Q),O(Q)}function X(){const G=E.value.trim();$(k,!(/^\d+$/.test(G)&&yx(parseInt(G,10),d(m))))}function q(G){switch(G.key){case"ArrowUp":G.preventDefault(),Y();break;case"ArrowDown":G.preventDefault(),R();break;case"Home":G.preventDefault(),O(d(m).floor);break;case"End":G.preventDefault(),O(s());break;case"Enter":G.preventDefault(),N();break}}var le={get value(){return n()},set value(G){n(G),b()},get min(){return i()},set min(G){i(G),b()},get max(){return s()},set max(G){s(G),b()},get floor(){return a()},set floor(G=0){a(G),b()},get label(){return o()},set label(G){o(G),b()},get decreaseLabel(){return l()},set decreaseLabel(G){l(G),b()},get increaseLabel(){return c()},set increaseLabel(G){c(G),b()},get onDecrementBelowMin(){return f()},set onDecrementBelowMin(G){f(G),b()},get removeAriaLabel(){return u()},set removeAriaLabel(G){u(G),b()},get removeLabel(){return p()},set removeLabel(G="✕"){p(G),b()},get onChange(){return h()},set onChange(G){h(G),b()}},he=bx(),j=M(he);let oe;var ee=M(j),fe=M(ee,!0);I(ee),I(j);var ce=V(j,2);Is(ce),Yl(ce,G=>E=G,()=>E);var de=V(ce,2);return I(he),J(()=>{me(he,"aria-label",o()),oe=St(j,1,"go-quantity-stepper-button go-quantity-stepper-decrement",null,oe,{"go-quantity-stepper-remove":d(y)}),me(j,"title",d(y)?u():l()),me(j,"aria-controls",r),me(j,"aria-disabled",d(T)),H(fe,d(y)?p():"−"),me(ce,"id",r),me(ce,"aria-label",o()),Ul(ce,n()),me(ce,"aria-valuenow",n()),me(ce,"aria-valuemin",d(m).floor),me(ce,"aria-valuemax",s()),me(ce,"aria-invalid",d(k)?"true":void 0),me(de,"title",c()),me(de,"aria-controls",r),me(de,"aria-disabled",d(A))}),pt("click",j,F),pt("input",ce,X),pt("change",ce,N),Ts("blur",ce,N),pt("keydown",ce,q),pt("click",de,Y),x(e,he),ie(le)}cr(["click","input","change","keydown"]),se(Yp,{value:{},min:{},max:{},floor:{},label:{},decreaseLabel:{},increaseLabel:{},onDecrementBelowMin:{},removeAriaLabel:{},removeLabel:{},onChange:{}},[],[],{mode:"open"});function _x(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[po(n)];if(t<e)return e>n?[po(e)]:[];const i=Math.max(e,n),s=[po(n)];for(let a=i;a<=t;a++)a!==n&&s.push(po(a));return s}function po(e){return{value:e,label:e.toString()}}var wx=B("<option> </option>"),kx=B('<select class="go-quantity-select"></select>');function mo(e,t){ne(t,!0);let r=_(t,"value",7),n=_(t,"min",7),i=_(t,"max",7),s=_(t,"label",7),a=_(t,"floor",7,0),o=_(t,"deselectable",7,!0),l=_(t,"onDecrementBelowMin",7),c=_(t,"onChange",7);const f=D(()=>Xe.config.quantityStepper);var u={get value(){return r()},set value(m){r(m),b()},get min(){return n()},set min(m){n(m),b()},get max(){return i()},set max(m){i(m),b()},get label(){return s()},set label(m){s(m),b()},get floor(){return a()},set floor(m=0){a(m),b()},get deselectable(){return o()},set deselectable(m=!0){o(m),b()},get onDecrementBelowMin(){return l()},set onDecrementBelowMin(m){l(m),b()},get onChange(){return c()},set onChange(m){c(m),b()}},p=re(),h=U(p),g=m=>{{let y=D(()=>o()?0:n()),E=D(()=>S.t("quantity.decrease")),k=D(()=>S.t("quantity.increase")),T=D(()=>S.t("quantity.remove")),A=D(()=>S.t("quantity.remove.label"));Yp(m,{get value(){return r()},get min(){return n()},get max(){return i()},get floor(){return d(y)},get label(){return s()},get decreaseLabel(){return d(E)},get increaseLabel(){return d(k)},get onDecrementBelowMin(){return l()},get removeAriaLabel(){return d(T)},get removeLabel(){return d(A)},get onChange(){return c()}})}},v=m=>{var y=kx();Ne(y,21,()=>_x(n(),i(),{floor:o()?a():n()}),E=>E.value,(E,k)=>{var T=wx(),A=M(T,!0);I(T);var O={};J(()=>{Pf(T,r()===d(k).value),H(A,d(k).label),O!==(O=d(k).value)&&(T.value=(T.__value=d(k).value)??"")}),x(E,T)}),I(y),J(()=>me(y,"aria-label",s())),pt("change",y,E=>c()(parseInt(E.target.value,10))),x(m,y)};return ue(h,m=>{d(f)?m(g):m(v,-1)}),x(e,p),ie(u)}cr(["change"]),se(mo,{value:{},min:{},max:{},label:{},floor:{},deselectable:{},onDecrementBelowMin:{},onChange:{}},[],[],{mode:"open"});function Jp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Sx(e){if(Array.isArray(e))return e}function Ex(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}function Tx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
75
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const o=a[1];if(t===a[0]){s(a);continue}if(e.external){const l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){s(a);continue}}if(e.metadataRegistry.get(a[0])?.id){s(a);continue}if(o.cycle){s(a);continue}if(o.count>1&&e.reused==="ref"){s(a);continue}}}function Dh(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=o=>{const l=e.seen.get(o);if(l.ref===null)return;const c=l.def??l.schema,f={...c},u=l.ref;if(l.ref=null,u){n(u);const h=e.seen.get(u),g=h.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(g)):Object.assign(c,g),Object.assign(c,f),o._zod.parent===u)for(const v in c)v==="$ref"||v==="allOf"||v in f||delete c[v];if(g.$ref&&h.def)for(const v in c)v==="$ref"||v==="allOf"||v in h.def&&JSON.stringify(c[v])===JSON.stringify(h.def[v])&&delete c[v]}const p=o._zod.parent;if(p&&p!==u){n(p);const h=e.seen.get(p);if(h?.schema.$ref&&(c.$ref=h.schema.$ref,h.def))for(const g in c)g==="$ref"||g==="allOf"||g in h.def&&JSON.stringify(c[g])===JSON.stringify(h.def[g])&&delete c[g]}e.override({zodSchema:o,jsonSchema:c,path:l.path??[]})};for(const o of[...e.seen.entries()].reverse())n(o[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const o=e.external.registry.get(t)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(o)}Object.assign(i,r.def??r.schema);const s=e.metadataRegistry.get(t)?.id;s!==void 0&&i.id===s&&delete i.id;const a=e.external?.defs??{};for(const o of e.seen.entries()){const l=o[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,a[l.defId]=l.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?i.$defs=a:i.definitions=a);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:Qa(t,"input",e.processors),output:Qa(t,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function It(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return It(n.element,r);if(n.type==="set")return It(n.valueType,r);if(n.type==="lazy")return It(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return It(n.innerType,r);if(n.type==="intersection")return It(n.left,r)||It(n.right,r);if(n.type==="record"||n.type==="map")return It(n.keyType,r)||It(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:It(n.in,r)||It(n.out,r);if(n.type==="object"){for(const i in n.shape)if(It(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(It(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(It(i,r))return!0;return!!(n.rest&&It(n.rest,r))}return!1}var cS=(e,t={})=>r=>{const n=Ch({...r,processors:t});return Et(e,n),Oh(n,e),Dh(n,e)},Qa=(e,t,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},a=Ch({...i??{},target:s,io:t,processors:r});return Et(e,a),Oh(a,e),Dh(a,e)},dS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},fS=(e,t,r,n)=>{const i=r;i.type="string";const{minimum:s,maximum:a,format:o,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof a=="number"&&(i.maxLength=a),o&&(i.format=dS[o]??o,i.format===""&&delete i.format,o==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){const f=[...l];f.length===1?i.pattern=f[0].source:f.length>1&&(i.allOf=[...f.map(u=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:u.source}))])}},hS=(e,t,r,n)=>{const i=r,{minimum:s,maximum:a,format:o,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:f}=e._zod.bag;typeof o=="string"&&o.includes("int")?i.type="integer":i.type="number";const u=typeof f=="number"&&f>=(s??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";u?h?(i.minimum=f,i.exclusiveMinimum=!0):i.exclusiveMinimum=f:typeof s=="number"&&(i.minimum=s),p?h?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof a=="number"&&(i.maximum=a),typeof l=="number"&&(i.multipleOf=l)},pS=(e,t,r,n)=>{r.not={}},mS=(e,t,r,n)=>{},vS=(e,t,r,n)=>{const i=e._zod.def,s=Wf(i.entries);s.every(a=>typeof a=="number")&&(r.type="number"),s.every(a=>typeof a=="string")&&(r.type="string"),r.enum=s},gS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},yS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},bS=(e,t,r,n)=>{const i=r,s=e._zod.def,{minimum:a,maximum:o}=e._zod.bag;typeof a=="number"&&(i.minItems=a),typeof o=="number"&&(i.maxItems=o),i.type="array",i.items=Et(s.element,t,{...n,path:[...n.path,"items"]})},_S=(e,t,r,n)=>{const i=r,s=e._zod.def;i.type="object",i.properties={};const a=s.shape;for(const c in a)i.properties[c]=Et(a[c],t,{...n,path:[...n.path,"properties",c]});const o=new Set(Object.keys(a)),l=new Set([...o].filter(c=>{const f=s.shape[c]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));l.size>0&&(i.required=Array.from(l)),s.catchall?._zod.def.type==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=Et(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},wS=(e,t,r,n)=>{const i=e._zod.def,s=i.inclusive===!1,a=i.options.map((o,l)=>Et(o,t,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=a:r.anyOf=a},kS=(e,t,r,n)=>{const i=e._zod.def,s=Et(i.left,t,{...n,path:[...n.path,"allOf",0]}),a=Et(i.right,t,{...n,path:[...n.path,"allOf",1]}),o=l=>"allOf"in l&&Object.keys(l).length===1;r.allOf=[...o(s)?s.allOf:[s],...o(a)?a.allOf:[a]]},SS=(e,t,r,n)=>{const i=e._zod.def,s=Et(i.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},ES=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},TS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},xS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},AS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType;let a;try{a=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},CS=(e,t,r,n)=>{const i=e._zod.def,s=i.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?s?i.out:i.in:i.out;Et(a,t,n);const o=t.seen.get(e);o.ref=a},OS=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.readOnly=!0},Ih=(e,t,r,n)=>{const i=e._zod.def;Et(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},DS=K("ZodISODateTime",(e,t)=>{L0.init(e,t),Qe.init(e,t)});function IS(e){return Uk(DS,e)}var PS=K("ZodISODate",(e,t)=>{z0.init(e,t),Qe.init(e,t)});function MS(e){return Bk(PS,e)}var $S=K("ZodISOTime",(e,t)=>{q0.init(e,t),Qe.init(e,t)});function FS(e){return Vk($S,e)}var NS=K("ZodISODuration",(e,t)=>{U0.init(e,t),Qe.init(e,t)});function RS(e){return jk(NS,e)}var LS=(e,t)=>{Xf.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Dw(e,r)},flatten:{value:r=>Ow(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,tu,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,tu,2)}},isEmpty:{get(){return e.issues.length===0}}})},fr=K("ZodError",LS,{Parent:Error}),zS=au(fr),qS=ou(fr),US=Wa(fr),BS=Ha(fr),VS=Mw(fr),jS=$w(fr),ZS=Fw(fr),WS=Nw(fr),HS=Rw(fr),GS=Lw(fr),KS=zw(fr),YS=qw(fr),Ph=new WeakMap;function Fs(e,t,r){const n=Object.getPrototypeOf(e);let i=Ph.get(n);if(i||(i=new Set,Ph.set(n,i)),!i.has(t)){i.add(t);for(const s in r){const a=r[s];Object.defineProperty(n,s,{configurable:!0,enumerable:!1,get(){const o=a.bind(this);return Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:o}),o},set(o){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:o})}})}}}var dt=K("ZodType",(e,t)=>(ct.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Qa(e,"input"),output:Qa(e,"output")}}),e.toJSONSchema=cS(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>zS(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>US(e,r,n),e.parseAsync=async(r,n)=>qS(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>BS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>VS(e,r,n),e.decode=(r,n)=>jS(e,r,n),e.encodeAsync=async(r,n)=>ZS(e,r,n),e.decodeAsync=async(r,n)=>WS(e,r,n),e.safeEncode=(r,n)=>HS(e,r,n),e.safeDecode=(r,n)=>GS(e,r,n),e.safeEncodeAsync=async(r,n)=>KS(e,r,n),e.safeDecodeAsync=async(r,n)=>YS(e,r,n),Fs(e,"ZodType",{check(...r){const n=this.def;return this.clone(Cn(n,{checks:[...n.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return On(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(U1(r,n))},superRefine(r,n){return this.check(B1(r,n))},overwrite(r){return this.check(Oi(r))},optional(){return qh(this)},exactOptional(){return O1(this)},nullable(){return Uh(this)},nullish(){return qh(Uh(this))},nonoptional(r){return F1(this,r)},array(){return Lh(this)},or(r){return k1([this,r])},and(r){return E1(this,r)},transform(r){return Vh(this,A1(r))},default(r){return P1(this,r)},prefault(r){return $1(this,r)},catch(r){return R1(this,r)},pipe(r){return Vh(this,r)},readonly(){return q1(this)},describe(r){const n=this.clone();return $s.add(n,{description:r}),n},meta(...r){if(r.length===0)return $s.get(this);const n=this.clone();return $s.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return $s.get(e)?.description},configurable:!0}),e)),Mh=K("_ZodString",(e,t)=>{lu.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>fS(e,n,i,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Fs(e,"_ZodString",{regex(...n){return this.check(Kk(...n))},includes(...n){return this.check(Qk(...n))},startsWith(...n){return this.check(Xk(...n))},endsWith(...n){return this.check(eS(...n))},min(...n){return this.check(Ja(...n))},max(...n){return this.check(xh(...n))},length(...n){return this.check(Ah(...n))},nonempty(...n){return this.check(Ja(1,...n))},lowercase(n){return this.check(Yk(n))},uppercase(n){return this.check(Jk(n))},trim(){return this.check(rS())},normalize(...n){return this.check(tS(...n))},toLowerCase(){return this.check(nS())},toUpperCase(){return this.check(iS())},slugify(){return this.check(sS())}})}),JS=K("ZodString",(e,t)=>{lu.init(e,t),Mh.init(e,t),e.email=r=>e.check(_k(QS,r)),e.url=r=>e.check(Tk(XS,r)),e.jwt=r=>e.check(qk(p1,r)),e.emoji=r=>e.check(xk(e1,r)),e.guid=r=>e.check(kh($h,r)),e.uuid=r=>e.check(wk(Xa,r)),e.uuidv4=r=>e.check(kk(Xa,r)),e.uuidv6=r=>e.check(Sk(Xa,r)),e.uuidv7=r=>e.check(Ek(Xa,r)),e.nanoid=r=>e.check(Ak(t1,r)),e.guid=r=>e.check(kh($h,r)),e.cuid=r=>e.check(Ck(r1,r)),e.cuid2=r=>e.check(Ok(n1,r)),e.ulid=r=>e.check(Dk(i1,r)),e.base64=r=>e.check(Rk(d1,r)),e.base64url=r=>e.check(Lk(f1,r)),e.xid=r=>e.check(Ik(s1,r)),e.ksuid=r=>e.check(Pk(a1,r)),e.ipv4=r=>e.check(Mk(o1,r)),e.ipv6=r=>e.check($k(l1,r)),e.cidrv4=r=>e.check(Fk(u1,r)),e.cidrv6=r=>e.check(Nk(c1,r)),e.e164=r=>e.check(zk(h1,r)),e.datetime=r=>e.check(IS(r)),e.date=r=>e.check(MS(r)),e.time=r=>e.check(FS(r)),e.duration=r=>e.check(RS(r))});function Qt(e){return bk(JS,e)}var Qe=K("ZodStringFormat",(e,t)=>{Je.init(e,t),Mh.init(e,t)}),QS=K("ZodEmail",(e,t)=>{O0.init(e,t),Qe.init(e,t)}),$h=K("ZodGUID",(e,t)=>{A0.init(e,t),Qe.init(e,t)}),Xa=K("ZodUUID",(e,t)=>{C0.init(e,t),Qe.init(e,t)}),XS=K("ZodURL",(e,t)=>{D0.init(e,t),Qe.init(e,t)}),e1=K("ZodEmoji",(e,t)=>{I0.init(e,t),Qe.init(e,t)}),t1=K("ZodNanoID",(e,t)=>{P0.init(e,t),Qe.init(e,t)}),r1=K("ZodCUID",(e,t)=>{M0.init(e,t),Qe.init(e,t)}),n1=K("ZodCUID2",(e,t)=>{$0.init(e,t),Qe.init(e,t)}),i1=K("ZodULID",(e,t)=>{F0.init(e,t),Qe.init(e,t)}),s1=K("ZodXID",(e,t)=>{N0.init(e,t),Qe.init(e,t)}),a1=K("ZodKSUID",(e,t)=>{R0.init(e,t),Qe.init(e,t)}),o1=K("ZodIPv4",(e,t)=>{B0.init(e,t),Qe.init(e,t)}),l1=K("ZodIPv6",(e,t)=>{V0.init(e,t),Qe.init(e,t)}),u1=K("ZodCIDRv4",(e,t)=>{j0.init(e,t),Qe.init(e,t)}),c1=K("ZodCIDRv6",(e,t)=>{Z0.init(e,t),Qe.init(e,t)}),d1=K("ZodBase64",(e,t)=>{W0.init(e,t),Qe.init(e,t)}),f1=K("ZodBase64URL",(e,t)=>{G0.init(e,t),Qe.init(e,t)}),h1=K("ZodE164",(e,t)=>{K0.init(e,t),Qe.init(e,t)}),p1=K("ZodJWT",(e,t)=>{J0.init(e,t),Qe.init(e,t)}),Fh=K("ZodNumber",(e,t)=>{uh.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>hS(e,n,i,s),Fs(e,"ZodNumber",{gt(n,i){return this.check(Eh(n,i))},gte(n,i){return this.check(du(n,i))},min(n,i){return this.check(du(n,i))},lt(n,i){return this.check(Sh(n,i))},lte(n,i){return this.check(cu(n,i))},max(n,i){return this.check(cu(n,i))},int(n){return this.check(Nh(n))},safe(n){return this.check(Nh(n))},positive(n){return this.check(Eh(0,n))},nonnegative(n){return this.check(du(0,n))},negative(n){return this.check(Sh(0,n))},nonpositive(n){return this.check(cu(0,n))},multipleOf(n,i){return this.check(Th(n,i))},step(n,i){return this.check(Th(n,i))},finite(){return this}});const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Ns(e){return Zk(Fh,e)}var m1=K("ZodNumberFormat",(e,t)=>{Q0.init(e,t),Fh.init(e,t)});function Nh(e){return Wk(m1,e)}var v1=K("ZodUnknown",(e,t)=>{X0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>mS(e,r,n,i)});function Rh(){return Hk(v1)}var g1=K("ZodNever",(e,t)=>{ek.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>pS(e,r,n,i)});function y1(e){return Gk(g1,e)}var b1=K("ZodArray",(e,t)=>{tk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>bS(e,r,n,i),e.element=t.element,Fs(e,"ZodArray",{min(r,n){return this.check(Ja(r,n))},nonempty(r){return this.check(Ja(1,r))},max(r,n){return this.check(xh(r,n))},length(r,n){return this.check(Ah(r,n))},unwrap(){return this.element}})});function Lh(e,t){return aS(b1,e,t)}var _1=K("ZodObject",(e,t)=>{nk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_S(e,r,n,i),We(e,"shape",()=>t.shape),Fs(e,"ZodObject",{keyof(){return T1(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Rh()})},loose(){return this.clone({...this._zod.def,catchall:Rh()})},strict(){return this.clone({...this._zod.def,catchall:y1()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return Sw(this,r)},safeExtend(r){return Ew(this,r)},merge(r){return Tw(this,r)},pick(r){return ww(this,r)},omit(r){return kw(this,r)},partial(...r){return xw(zh,this,r[0])},required(...r){return Aw(Bh,this,r[0])}})});function fu(e,t){return new _1({type:"object",shape:e??{},...ye(t)})}var w1=K("ZodUnion",(e,t)=>{ik.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>wS(e,r,n,i),e.options=t.options});function k1(e,t){return new w1({type:"union",options:e,...ye(t)})}var S1=K("ZodIntersection",(e,t)=>{sk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kS(e,r,n,i)});function E1(e,t){return new S1({type:"intersection",left:e,right:t})}var hu=K("ZodEnum",(e,t)=>{ak.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>vS(e,n,i,s),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{const s={};for(const a of n)if(r.has(a))s[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new hu({...t,checks:[],...ye(i),entries:s})},e.exclude=(n,i)=>{const s={...t.entries};for(const a of n)if(r.has(a))delete s[a];else throw new Error(`Key ${a} not found in enum`);return new hu({...t,checks:[],...ye(i),entries:s})}});function T1(e,t){return new hu({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...ye(t)})}var x1=K("ZodTransform",(e,t)=>{ok.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>yS(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Zf(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Ms(s,r.value,t));else{const a=s;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Ms(a))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(s=>(r.value=s,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function A1(e){return new x1({type:"transform",transform:e})}var zh=K("ZodOptional",(e,t)=>{vh.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ih(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function qh(e){return new zh({type:"optional",innerType:e})}var C1=K("ZodExactOptional",(e,t)=>{lk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ih(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function O1(e){return new C1({type:"optional",innerType:e})}var D1=K("ZodNullable",(e,t)=>{uk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>SS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Uh(e){return new D1({type:"nullable",innerType:e})}var I1=K("ZodDefault",(e,t)=>{ck.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>TS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function P1(e,t){return new I1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Yf(t)}})}var M1=K("ZodPrefault",(e,t)=>{dk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>xS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function $1(e,t){return new M1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Yf(t)}})}var Bh=K("ZodNonOptional",(e,t)=>{fk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>ES(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function F1(e,t){return new Bh({type:"nonoptional",innerType:e,...ye(t)})}var N1=K("ZodCatch",(e,t)=>{hk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>AS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function R1(e,t){return new N1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var L1=K("ZodPipe",(e,t)=>{pk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>CS(e,r,n,i),e.in=t.in,e.out=t.out});function Vh(e,t){return new L1({type:"pipe",in:e,out:t})}var z1=K("ZodReadonly",(e,t)=>{mk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>OS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function q1(e){return new z1({type:"readonly",innerType:e})}var jh=K("ZodCustom",(e,t)=>{vk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>gS(e,r,n,i)});function U1(e,t={}){return oS(jh,e,t)}function B1(e,t){return lS(e,t)}function V1(e,t={}){const r=new jh({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...ye(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var j1=fu({id:Ns(),customer:fu({customer_salutation_id:Ns().positive({message:"user.fieldErrors.titleRequire"}),name:Qt().min(1,{message:"user.fieldErrors.nameRequire"}),surname:Qt().min(1,{message:"user.fieldErrors.surnameRequire"}),email:Qt().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:Qt().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:Qt().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:Qt().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:Qt().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:Ns().positive().default(60),language_id:Ns().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),fN=fu({ticket_sale_id:Ns(),start_at:Qt().date(),personalizations:Lh(j1)});function pu(e,t){return e-t*Math.floor(e/t)}var Zh=1721426;function eo(e,t,r,n){t=mu(e,t);let i=t-1,s=-2;return r<=2?s=0:to(t)&&(s=-1),Zh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function to(e){return e%4===0&&(e%100!==0||e%400===0)}function mu(e,t){return e==="BC"?1-t:t}function Z1(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var W1={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]},Di=class{fromJulianDay(e){let t=e,r=t-Zh,n=Math.floor(r/146097),i=pu(r,146097),s=Math.floor(i/36524),a=pu(i,36524),o=Math.floor(a/1461),l=pu(a,1461),c=Math.floor(l/365),[f,u]=Z1(n*400+s*100+o*4+c+(s!==4&&c!==4?1:0)),p=t-eo(f,u,1,1),h=2;t<eo(f,u,3,1)?h=0:to(u)&&(h=1);let g=Math.floor(((p+h)*12+373)/367);return new zs(f,u,g,t-eo(f,u,g,1)+1)}toJulianDay(e){return eo(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return W1[to(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return to(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return e.era==="BC"}balanceDate(e){e.year<=0&&(e.era=e.era==="BC"?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}},H1={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Dn(e,t){return t=er(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function vu(e,t){return t=er(t,e.calendar),e=yu(e),t=yu(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function G1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function K1(e,t){return Dn(e,Ii(t))}var Y1={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Wh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?Y1[r]:rE(t),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function J1(e){return Br(Date.now(),e)}function Ii(e){return sE(J1(e))}function Hh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Q1(e,t){return Gh(e)-Gh(t)}function Gh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var gu=null,X1=!1;function Xt(){return gu==null&&(gu=new Intl.DateTimeFormat().resolvedOptions().timeZone),gu}function Kh(){return X1}function yu(e){return e.subtract({days:e.day-1})}function eE(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var Yh=new Map,bu=new Map;function tE(e){if(Intl.Locale){let r=Yh.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&Yh.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function rE(e){let t=bu.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return bu.set(e,t),t.firstDay}let r=tE(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];n==="mon"?t={firstDay:1}:n==="tue"?t={firstDay:2}:n==="wed"?t={firstDay:3}:n==="thu"?t={firstDay:4}:n==="fri"?t={firstDay:5}:n==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:r&&H1[r]||0};bu.set(e,t)}return t.firstDay}function In(e){return e=er(e,new Di),Jh(mu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Jh(e,t,r,n,i,s,a){let o=new Date;return o.setUTCHours(n,i,s,a),o.setUTCFullYear(e,t-1,r),o.getTime()}function Rs(e,t){if(t==="UTC")return 0;if(e>0&&t===Xt()&&!Kh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:a,second:o}=Xh(e,t);return Jh(r,n,i,s,a,o,0)-Math.floor(e/1e3)*1e3}var Qh=new Map;function Xh(e,t){let r=Qh.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Qh.set(t,r));let n=r.formatToParts(new Date(e)),i={};for(let s of n)s.type!=="literal"&&(i[s.type]=s.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}var ro=864e5;function nE(e,t){let r=In(e);return ep(e,t,r-Rs(r-ro,t),r-Rs(r+ro,t))}function ep(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>iE(e,t,i))}function iE(e,t,r){let n=Xh(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function Ur(e,t,r="compatible"){let n=Pn(e);if(t==="UTC")return In(n);if(t===Xt()&&r==="compatible"&&!Kh()){n=er(n,new Di);let l=new Date,c=mu(n.era,n.year);return l.setFullYear(c,n.month-1,n.day),l.setHours(n.hour,n.minute,n.second,n.millisecond),l.getTime()}let i=In(n),s=Rs(i-ro,t),a=Rs(i+ro,t),o=ep(n,t,i-s,i-a);if(o.length===1)return o[0];if(o.length>1)switch(r){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(i-s,i-a);case"compatible":case"later":return Math.max(i-s,i-a);case"reject":throw new RangeError("No such absolute time found")}}function tp(e,t,r="compatible"){return new Date(Ur(e,t,r))}function Br(e,t){let r=Rs(e,t),n=new Date(e+r),i=n.getUTCFullYear(),s=n.getUTCMonth()+1,a=n.getUTCDate(),o=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),f=n.getUTCMilliseconds();return new Mn(i<1?"BC":"AD",i<1?-i+1:i,s,a,t,r,o,l,c,f)}function sE(e){return new zs(e.calendar,e.era,e.year,e.month,e.day)}function Pn(e,t){let r=0,n=0,i=0,s=0;if("timeZone"in e)({hour:r,minute:n,second:i,millisecond:s}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:i,millisecond:s}=t),new Pi(e.calendar,e.era,e.year,e.month,e.day,r,n,i,s)}function er(e,t){if(G1(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,Xn(n),n}function aE(e,t,r){return e instanceof Mn?e.timeZone===t?e:rp(e,t):Br(Ur(e,t,r),t)}function oE(e){let t=In(e)-e.offset;return new Date(t)}function rp(e,t){return er(Br(In(e)-e.offset,t),e.calendar)}var Ls=36e5;function no(e,t){let r=e.copy(),n="hour"in r?dE(r,t):0;_u(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,wu(r),np(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,lE(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let i=r.calendar.getYearsInEra(r);if(r.year>i){let a=r.calendar.isInverseEra?.(r);r.year=i,r.month=a?1:r.calendar.getMonthsInYear(r),r.day=a?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function _u(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function wu(e){for(;e.month<1;)_u(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,_u(e,1)}function lE(e){for(;e.day<1;)e.month--,wu(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,wu(e)}function np(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Xn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),np(e)}function ip(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function sp(e,t){return no(e,ip(t))}function ku(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),Xn(r),r}function io(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),cE(r),r}function uE(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=so(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=so(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=so(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=so(e.hour,24),t}function cE(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function so(e,t){let r=e%t;return r<0&&(r+=t),r}function dE(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,uE(e)}function Su(e,t,r,n){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),a=s.indexOf(e.era);if(a<0)throw new Error("Invalid era: "+e.era);a=an(a,r,0,s.length-1,n?.round),i.era=s[a],Xn(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=an(e.year,r,-1/0,9999,n?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=an(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":i.day=an(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),Xn(i),i}function ap(e,t,r,n){let i=e.copy();switch(t){case"hour":{let s=e.hour,a=0,o=23;if(n?.hourCycle===12){let l=s>=12;a=l?12:0,o=l?23:11}i.hour=an(s,r,a,o,n?.round);break}case"minute":i.minute=an(e.minute,r,0,59,n?.round);break;case"second":i.second=an(e.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=an(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return i}function an(e,t,r,n,i=!1){if(i){e+=Math.sign(t),e<r&&(e=n);let s=Math.abs(t);t>0?e=Math.ceil(e/s)*s:e=Math.floor(e/s)*s,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function op(e,t){let r;return t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?r=Ur(no(Pn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):r=In(e)-e.offset,r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5,er(Br(r,e.timeZone),e.calendar)}function fE(e,t){return op(e,ip(t))}function hE(e,t,r,n){switch(t){case"hour":{let i=0,s=23;if(n?.hourCycle===12){let g=e.hour>=12;i=g?12:0,s=g?23:11}let a=Pn(e),o=er(io(a,{hour:i}),new Di),l=[Ur(o,e.timeZone,"earlier"),Ur(o,e.timeZone,"later")].filter(g=>Br(g,e.timeZone).day===o.day)[0],c=er(io(a,{hour:s}),new Di),f=[Ur(c,e.timeZone,"earlier"),Ur(c,e.timeZone,"later")].filter(g=>Br(g,e.timeZone).day===c.day).pop(),u=In(e)-e.offset,p=Math.floor(u/Ls),h=u%Ls;return u=an(p,r,Math.floor(l/Ls),Math.floor(f/Ls),n?.round)*Ls+h,er(Br(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return ap(e,t,r,n);case"era":case"year":case"month":case"day":return er(Br(Ur(Su(Pn(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function pE(e,t,r){let n=Pn(e),i=io(ku(n,t),t);return i.compare(n)===0?e:er(Br(Ur(i,e.timeZone,r),e.timeZone),e.calendar)}var mE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,vE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,gE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,Eu=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/,yE=["hours","minutes","seconds"],hN=["years","months","weeks","days",...yE];function ao(e){let t=e.match(mE);if(!t)throw Eu.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new zs(Be(t[1],0,9999),Be(t[2],1,12),1);return r.day=Be(t[3],1,r.calendar.getDaysInMonth(r)),r}function lp(e){let t=e.match(vE);if(!t)throw Eu.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=Be(t[1],-9999,9999),n=new Pi(r<1?"BC":"AD",r<1?-r+1:r,Be(t[2],1,12),1,t[4]?Be(t[4],0,23):0,t[5]?Be(t[5],0,59):0,t[6]?Be(t[6],0,59):0,t[7]?Be(t[7],0,1/0)*1e3:0);return n.day=Be(t[3],0,n.calendar.getDaysInMonth(n)),n}function up(e,t){let r=e.match(gE);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Be(r[1],-9999,9999),i=new Mn(n<1?"BC":"AD",n<1?-n+1:n,Be(r[2],1,12),1,r[11],0,r[4]?Be(r[4],0,23):0,r[5]?Be(r[5],0,59):0,r[6]?Be(r[6],0,59):0,r[7]?Be(r[7],0,1/0)*1e3:0);i.day=Be(r[3],0,i.calendar.getDaysInMonth(i));let s=Pn(i),a;if(r[8]){let o=Be(r[8],-23,23);if(i.offset=Math.sign(o)*(Math.abs(o)*36e5+Be(r[9]??"0",0,59)*6e4+Be(r[10]??"0",0,59)*1e3),a=In(i)-i.offset,!nE(s,i.timeZone).includes(a))throw new Error(`Offset ${fp(i.offset)} is invalid for ${Tu(i)} in ${i.timeZone}`)}else a=Ur(Pn(s),i.timeZone,t);return Br(a,i.timeZone)}function cp(e,t){let r=e.match(Eu);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Be(r[1],-9999,9999),i=new Mn(n<1?"BC":"AD",n<1?-n+1:n,Be(r[2],1,12),1,t,0,r[4]?Be(r[4],0,23):0,r[5]?Be(r[5],0,59):0,r[6]?Be(r[6],0,59):0,r[7]?Be(r[7],0,1/0)*1e3:0);return i.day=Be(r[3],0,i.calendar.getDaysInMonth(i)),r[8]&&(i.offset=Be(r[8],-23,23)*36e5+Be(r[9]??"0",0,59)*6e4),rp(i,t)}function Be(e,t,r){let n=Number(e);if(n<t||n>r)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function bE(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function dp(e){let t=er(e,new Di),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Tu(e){return`${dp(e)}T${bE(e)}`}function fp(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),s=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(s+=`:${String(i).padStart(2,"0")}`),s}function _E(e){return`${Tu(e)}${fp(e.offset)}[${e.timeZone}]`}function xu(e){let t=typeof e[0]=="object"?e.shift():new Di,r;if(typeof e[0]=="string")r=e.shift();else{let a=t.getEras();r=a[a.length-1]}let n=e.shift(),i=e.shift(),s=e.shift();return[t,r,n,i,s]}var zs=class ud{#e;constructor(...t){let[r,n,i,s,a]=xu(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,Xn(this)}copy(){return this.era?new ud(this.calendar,this.era,this.year,this.month,this.day):new ud(this.calendar,this.year,this.month,this.day)}add(t){return no(this,t)}subtract(t){return sp(this,t)}set(t){return ku(this,t)}cycle(t,r,n){return Su(this,t,r,n)}toDate(t){return tp(this,t)}toString(){return dp(this)}compare(t){return Hh(this,t)}},Pi=class cd{#e;constructor(...t){let[r,n,i,s,a]=xu(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Xn(this)}copy(){return this.era?new cd(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new cd(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return no(this,t)}subtract(t){return sp(this,t)}set(t){return ku(io(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return Su(this,t,r,n);default:return ap(this,t,r,n)}}toDate(t,r){return tp(this,t,r)}toString(){return Tu(this)}compare(t){let r=Hh(this,t);return r===0?Q1(this,Pn(t)):r}},Mn=class dd{#e;constructor(...t){let[r,n,i,s,a]=xu(t),o=t.shift(),l=t.shift();this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,this.timeZone=o,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Xn(this)}copy(){return this.era?new dd(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new dd(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return op(this,t)}subtract(t){return fE(this,t)}set(t,r){return pE(this,t,r)}cycle(t,r,n){return hE(this,t,r,n)}toDate(){return oE(this)}toString(){return _E(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-aE(t,this.timeZone).toDate().getTime()}},Au=new Map,hr=class{constructor(e,t={}){this.formatter=hp(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,t);if(t<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,t);if(t<e)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return SE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=EE(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}},wE={true:{ja:"h11"},false:{}};function hp(e,t={}){if(typeof t.hour12=="boolean"&&kE()){t={...t};let i=wE[String(t.hour12)][e.split("-")[0]],s=t.hour12?"h12":"h23";t.hourCycle=i??s,delete t.hour12}let r=e+(t?Object.entries(t).sort((i,s)=>i[0]<s[0]?-1:1).join():"");if(Au.has(r))return Au.get(r);let n=new Intl.DateTimeFormat(e,t);return Au.set(r,n),n}var Cu=null;function kE(){return Cu==null&&(Cu=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Cu}var Ou=null;function SE(){return Ou==null&&(Ou=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Ou}function EE(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=hp(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(s=>s.type==="hour").value,10),i=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(s=>s.type==="hour").value,10);if(n===0&&i===23)return"h23";if(n===24&&i===23)return"h24";if(n===0&&i===11)return"h11";if(n===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}var TE={dayMonth:{month:"numeric",day:"numeric"},short:{year:"numeric",month:"numeric",day:"numeric"}};function pp(e,t){const r=cp(e,"Europe/Berlin");return new hr(t,{timeZone:r.timeZone,hour:"numeric",minute:"numeric"}).format(r.toDate())}function xE(e,t,r){const n=cp(e instanceof Date?e.toISOString():e,"Europe/Berlin");return new hr(r,{timeZone:n.timeZone,...TE[t]}).format(n.toDate())}function oo(e){return e?.type==="Ticket"}function Vr(e){const t=e;return!!t&&t.type==="Ticket"&&t.is_mantle===!0&&!!t.sub_tickets&&Object.keys(t.sub_tickets).length>0}function qs(e){return Object.entries(e.sub_tickets??{}).map(([t,r])=>({id:Number(t),title:r?.title??"",description:r?.description??null,min_persons:r?.min_persons??0,max_persons:r?.max_persons??0}))}function Us(e,t){return{...e,selectedTime:t?.selectedTime??"",type:"Ticket",subtype:{time_slot:"timeslot",normal:"day",annual:"annual"}[e.ticket_type],shop_order:e.shop_order??0,content:void 0}}function Bs(e,t=""){return Uf(Object.values(e).map(r=>Us(r,{selectedTime:t})),r=>r.shop_order)}function Du(e,t){const r=n=>Object.keys(n.total_capacities??{}).find(i=>(n.total_capacities?.[i]??0)>0);return Uf(Object.values(e).filter(n=>r(n)||Object.keys(n.total_capacities??{}).length===0).map(n=>Us(n,{selectedTime:r(n)??t})),n=>n.shop_order)}function Vs(e,t=""){let r=Object.entries(e);return t!==""&&(r=r.filter(([,n])=>n.total_capacities?.[t]&&n.total_capacities[t]>0)),Object.fromEntries(r)}var mp=e=>qr(Object.values(e.mantle?.composition??{}));function AE(e){const t=e.quantity??0;return Vr(e.product)?t*mp(e):t}function Iu(e,t,r,n){e.clearPrecart();let i=0;for(const s of[...r.items,...t.items]){if(!oo(s.product))continue;const a=AE(s);s===n&&(i=a),e.addPrecartItemQuantity(s.product.id,a)}return i}var CE=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!oo(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,s=e.quotaManager,a=Iu(s,t,n,r),o=s.ticketCapacity(i.id,i.selectedTime,a),l=s.totalCapacity(i.id,i.selectedTime);return{max:Math.min(i.max_persons||100,o),min:i.min_persons||0,bookedOut:o===0,unavailable:l===0}},OE=function(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxQuantity_Mantle) impossible");if(!Vr(r.product))throw new Error("(maxQuantity_Mantle) impossible");const i=r.product,s=e.quotaManager,a=Iu(s,t,n,r),o=s.ticketCapacity(i.id,i.selectedTime,a),l=s.totalCapacity(i.id,i.selectedTime),c=mp(r),f=c>1?Math.floor(o/c):o;return{max:Math.min(i.max_persons||100,f),min:i.min_persons||0,bookedOut:f===0,unavailable:l===0}},DE=e=>Object.fromEntries(qs(e).map(t=>[t.id,t.max_persons]));function IE(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxSubQuantities) impossible");if(!Vr(r.product))throw new Error("(maxSubQuantities) impossible");const i=r.product,s=r.quantity??0;let a=1/0;return s>0&&(Iu(e.quotaManager,t,n,r),a=Math.floor(e.quotaManager.ticketCapacity(i.id,i.selectedTime,0)/s)),Object.fromEntries(qs(i).map(o=>[o.id,Math.min(o.max_persons,(r.mantle?.composition?.[o.id]??0)+a)]))}function js(e){return e?.type==="Event"}function PE(e){return js(e)&&e.subtype==="scale"}function ME(e,t,r){const n={type:"Event",id:t,tax_included:!0,...e};if(r?.date){const i=r.date;r.date_title=i.title||"",r.date_description=i.description||"",r.event_title=i.event_title||"",r.event_subtitle=i.event_sub_title||"",r.price_title=e.title||"",r.price_description=e.description||""}return{dateId:t,minAvailableCapacity:0,selectedTime:"",...r,...n,...e,type:"Event",subtype:e.scale_price_id===void 0?"flat":"scale"}}function Pu(e,t,r){return ME(e,t,r)}var $E=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!js(r.product))throw new Error("(getMaxQuantitySeats) impossible");const i=r.product.dateId,s=e.allSeats[i];if(!s)return console.error("(getMaxQuantity) no seats found for dateId",i),{max:0,min:0,unavailable:!0,bookedOut:!1};const a=Math.min(s.max||100,s.max_per_registration||100,s.available??100),o={max_per_registration:a,available:100,overbook:!1,...s};let l=a;o.overbook&&(l=Math.min(o.max||100,o.max_per_registration||100));const c=n.totalQuantity,f=qr(t.items.filter(p=>n.items.some(h=>h.uuid===p.uuid)),p=>p.quantity),u=Math.max(l-f-c+r.quantity,0);return{max:u,min:o.min??0,unavailable:o.available===0,bookedOut:u===0}},FE=function(e,t,r,n){if(e.capacityPolicy(r)!=="unlimited")throw new Error("(getMaxQuantityUnlimited) impossible");return{max:r.product.max_persons??100,min:r.product.min_persons??0,unavailable:!1,bookedOut:!1}};function NE(e){return{apiData:e,_timeslots:[],addQuotas(t){this._timeslots=[],this.apiData={...this.apiData,...t}},precart:{},clearPrecart(){this.precart={},this._timeslots=[]},setPrecartItemQuantity(t,r){this.precart[t]=r,this._timeslots=[]},addPrecartItemQuantity(t,r){this.precart[t]=(this.precart[t]??0)+r,this._timeslots=[]},getPrecartItemQuantity(t){return this.precart[t]??0},timeslots(){return this._timeslots.length===0&&(this._timeslots=Object.entries(this.apiData).flatMap(([t,r])=>Object.keys(r.capacities).map(n=>{const i=qr(r.ticket_ids.map(s=>this.getPrecartItemQuantity(s)));return{timeSlot:n,quota:t,capacity:r.capacities[n]-i,tickets:r.ticket_ids,totalCapacity:r.total_capacities[n]}}))),this._timeslots},filterBy({timeslot:t,ticketId:r,date:n}={}){let i=this.timeslots();return r&&(i=i.filter(s=>s.tickets.includes(r))),t&&(i=i.filter(s=>s.timeSlot===t)),n&&(i=i.filter(s=>s.timeSlot.startsWith(n))),i.flatMap(s=>s.tickets.map(a=>({timeslot:t,ticket:a,quota:s.quota,capacity:s.capacity,totalCapacity:s.totalCapacity})))},ticketCapacity(t,r,n=this.getPrecartItemQuantity(t)){const i=eu(this.filterBy({timeslot:r,ticketId:t}).map(s=>s.capacity))??0;return Math.max(0,i+n)},totalCapacity(t,r){return eu(this.filterBy({timeslot:r,ticketId:t}).map(n=>n.totalCapacity))??0},timeslotsOn(t,r){let n=this.timeslots().filter(s=>s.timeSlot.startsWith(t.toString()));r&&(n=n.filter(s=>s.tickets.some(a=>r.includes(a))));const i=cw(n,s=>s.timeSlot);return Object.values(i).map(s=>dw(fw(s.flatMap(a=>a.tickets)).map(a=>eu(s.filter(o=>o.tickets.includes(a)),o=>o.capacity)).filter(a=>a!==null),a=>a.capacity)??s[0]).sort((s,a)=>s.timeSlot.localeCompare(a.timeSlot))}}}function RE(e){let t=0;_s(()=>{ve(()=>{if(e.items.length===t)return;const r=e.items.length>t?"go-cart-item-added":"go-cart-item-removed";t=e.items.length,document.dispatchEvent(new CustomEvent(r,{detail:e.items.length}))})})}function yt(e){let t;try{t=new Intl.NumberFormat(S.locale??"de",{style:"currency",currency:S.currency??"EUR"})}catch{t=new Intl.NumberFormat("de",{style:"currency",currency:"EUR"})}return t.format((e??0)/100)}function on(e){if(!e)return;const t=e.split(",").map(r=>r.trim()).map(Number).filter(r=>!isNaN(r)&&r>0);return t.length>0?t:void 0}function vp(e){return e?.type==="Tour"}function gp(e,t){return{...e,type:"Tour",description:"",price_cents:e.totalPriceCents,tax_included:!0,vat_pct:0,instanceKey:t?.instanceKey??crypto.randomUUID(),wire:LE(e)}}function LE(e){const t={language_id:e.languageId};return e.quantities?t.quantities=e.quantities:t.quantity=e.participants,e.gradeId!=null&&(t.grade_id=e.gradeId),e.ageGroupId!=null&&(t.age_group_id=e.ageGroupId),e.surcharges&&(t.surcharges=e.surcharges),e.equipment&&(t.equipment=e.equipment),e.attendees&&(t.attendees=e.attendees),e.customs&&(t.customs=e.customs),t}function zE(e){const{type:t,description:r,price_cents:n,tax_included:i,vat_pct:s,instanceKey:a,wire:o,...l}=e;return gp({...l,totalPriceCents:n},{instanceKey:a})}var qE=0;function rt(e,t){const r={quantity:0,time:"",...t??{}};return Vr(e)&&(r.mantle={composition:r.mantle?.composition??Object.fromEntries(qs(e).map(n=>[n.id,n.max_persons])),key:r.mantle?.key??`mantle-${qE++}`}),{...r,quantity:r.quantity??0,time:r.time??"",type:e.type,product:e,orderAttributes(){const n={shipped_with_merchandise_id:null,shipping_mode:"email",id:this.product.id,uuid:this.uuid};switch(e.type){case"Ticket":return{...n,time:this.time,quantity:this.quantity,...Vr(this.product)&&this.mantle?{sub_ticket_quantities:this.mantle.composition}:{}};case"Event":switch(e.subtype){case"flat":return{...n,quantity:this.quantity};case"scale":return{...n,quantities:{[e.scale_price_id]:this.quantity}};default:throw new Error(`(orderAttributes) Unhandled Event subtype: ${e}`)}case"Coupon":return{...n,quantity:this.quantity};case"Tour":return{...n,start_time:this.time,...e.wire};default:throw new Error(`(orderAttributes) Unhandled product type: ${e}`)}},get uuid(){return this.type+"-"+this.product.id+this.subUId},get subUId(){const n=[];return this.time&&n.push(`time: ${this.time}`),PE(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),vp(this.product)&&n.push(`tour: ${this.product.instanceKey}`),this.display?.discounted&&n.push("discounted"),Vr(this.product)&&this.mantle?.key&&n.push(`mantle_key: ${this.mantle.key}`),this.voucher?.code&&n.push(`voucher_code: ${this.voucher.code}`),n.length>0?` (${n.join(", ")})`:""},toString(){return this.uuid+":"+this.quantity},get price_cents(){const n="dynamic_prices"in this.product?this.product.dynamic_prices:null;return this.time&&n?.[this.time]!=null?n[this.time]:this.product.price_cents},get price_formatted(){return yt(this.price_cents)},get final_price_cents(){const n=this.product.tax_included?1:1+this.product.vat_pct/100;return this.price_cents*n},get final_price_formatted(){return yt(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return yt(this.total_price_cents)}}}var pN=15*6e4;function lo(){return typeof window<"u"&&typeof localStorage<"u"}function UE(e,t){if(lo())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Mu(e){if(!lo())return null;try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(t){return console.warn(`Failed to load from localStorage (${e}):`,t),null}}function yp(e){if(lo())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}function bp(e){return{...e,description:"",tax_included:!0,type:"Coupon"}}var _p="go-cart",uo=(e,t)=>localStorage.setItem(_p,JSON.stringify({items:e,coupons:t,savedAt:Date.now()}));function BE(e){const t=e.product.type;switch(t){case"Ticket":return $u(e)?rt(Us(e.product,{selectedTime:e.product.selectedTime}),{time:e.time,quantity:e.quantity,mantle:e.mantle,voucher:e.voucher}):void 0;case"Event":return $u(e)?rt(Pu(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;case"Tour":return $u(e)?rt(zE(e.product),{time:e.time,quantity:e.quantity}):void 0;case"Coupon":return rt(bp(e.product),{quantity:e.quantity});default:throw new Error(`Unhandled case: ${t}`)}}function VE(e){let t=[],r=[],n;try{const i=localStorage.getItem(_p);if(!i)return[];const s=JSON.parse(i);if(Array.isArray(s))t=s,r=[];else if(typeof s=="object"&&s!==null)t=s.items||[],r=s.coupons||[],n=s.savedAt;else throw console.dir({parsed:s,content:i}),new Error("go-cart has invalid format");return n&&Date.now()-n>9e5?(e.clearItems(),e.clearCoupons(),uo([],[]),[]):(t.length===0?e.clearItems():e.items=t.map(BE).filter(HE),e.clearCoupons(),r.forEach(a=>e.addCoupon(typeof a=="string"?{code:a,kind:"actionToken"}:a)),e.items)}catch(i){return console.error(i),uo([],[]),[]}}function jE(e){VE(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});uo(e.items||[],e.coupons||[]),_s(()=>{ve(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});r!==t&&(t=r,uo(e.items||[],e.coupons||[]))})})}var ZE=e=>new Date<new Date(e),WE=e=>ao(e.slice(0,10)).compare(Ii(Xt()))>=0,$u=e=>e.time?e.product.subtype==="day"?WE(e.time):ZE(e.time):!0,HE=e=>e!==void 0,GE=0;function ei(e,t=20){const r=Me([]),n=Me([]);let i=ae(void 0);const s={items:r,coupons:n,get paymentModeId(){return d(i)},set paymentModeId(a){$(i,a,!0)},uid:`cart-${GE++}`,get nonEmptyItems(){return this.items.filter(a=>a.quantity>0)},get totalPriceCents(){return Math.max(0,qr(this.items,a=>a.total_price_cents))},get totalQuantity(){return qr(this.items,a=>a.quantity)},get valueVoucherCents(){return qr(this.coupons.filter(a=>a.kind==="valueVoucher"),a=>a.valueCents??0)},get amountToPayCents(){return Math.max(0,this.totalPriceCents-this.valueVoucherCents)},toString(){return this.uid+" > ["+this.items.map(a=>a.uuid+":"+a.quantity).join(", ")+"]"},orderData(){return{items:this.items.map(a=>({type:a.type,attributes:a.orderAttributes()})),shipping_address_id:null,comment:null,reference:null,payment_mode_id:this.paymentModeId??S.settings?.defaultPaymentModeId,coupons:this.coupons.map(a=>a.code),donations:[],affiliate:{},total:this.amountToPayCents}},get totalFormatted(){return yt(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(a){for(let o=this.items.length-1;o>=0;o--)this.items[o].uuid===a.uuid&&this.items.splice(o,1);a?.voucher?.code&&!this.items.some(o=>o.voucher?.code===a.voucher.code)&&this.removeCoupon(a.voucher.code)},addItem(a){const o=this.items.find(l=>l.uuid===a.uuid);o?o.quantity+=a.quantity:this.items.push(a)},addItems(a){a.forEach(o=>this.addItem(o))},addCoupon(a){const o={...a,code:a.code.toUpperCase()};this.coupons.some(l=>l.code===o.code)||this.coupons.push(o)},removeCoupon(a){const o=a.toUpperCase(),l=this.coupons.findIndex(c=>c.code===o);if(l>-1){const[c]=this.coupons.splice(l,1);if(c.kind==="serviceVoucher")for(let f=this.items.length-1;f>=0;f--)this.items[f].voucher?.code===o&&this.items.splice(f,1)}},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()}};return e&&e.forEach(a=>s.addItem(rt(a))),s}function KE(){const e=Me(ei());return jE(e),RE(e),e}var Mi="go-capacity";function wp(e,t){const r=Mu(Mi);UE(Mi,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function kp(e){const t=Mu(Mi);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){yp(Mi);return}if(t.allSeats)for(const r in t.allSeats){const n=parseInt(r);e.addSeats(n,t.allSeats[n],!1)}t.allQuotas&&e.addQuotas(t.allQuotas,!1)}}function YE(e){lo()&&window.addEventListener("storage",t=>{if(t.key===Mi&&kp(e),t.key==="go-cart"){const r=Mu("go-cart");(!r||!r.items||r.items.length===0)&&yp(Mi)}})}function Sp(){const e={allSeats:{},allQuotas:{},quotaManager:NE({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&wp(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&wp(this.allSeats,this.allQuotas)},capacityPolicy(t){const r=t.product.type;switch(r){case"Ticket":const n=t.product,i=n.subtype;switch(i){case"timeslot":case"event:ticket":case"day":return Vr(n)?"mantle":"quotas";case"annual":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${i}`)}case"Event":const s=t.product.subtype;switch(s){case"flat":case"scale":return"seats";default:throw new Error(`(getMaxAvailability) Unhandled case: ${s}`)}case"Coupon":return"unlimited";case"Tour":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${r}`)}},capacity(t,r,n){const i=this.capacityPolicy(r),s={quotas:CE,mantle:OE,seats:$E,unlimited:FE}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Re(()=>s(this,t,r,n))},subTicketMaxes(t,r,n){if(!Vr(r.product))return{};const i=this.capacityPolicy(r);if(i!=="mantle"&&i!=="unlimited")throw new Error(`(subTicketMaxes) impossible: ${i}`);return Re(()=>i==="mantle"?IE(this,t,r,n):DE(r.product))}};return kp(e),YE(e),e}function Ep(e){if(typeof document>"u"||!e)return;const t=`; ${document.cookie}`.split(`; ${e}=`);if(t.length===2){const r=t.pop()?.split(";").shift();return r?decodeURIComponent(r):void 0}}var Tp=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},JE=class extends Tp{constructor(){super()}get isLoggedIn(){try{const e=Ep("auth_headers");if(!e)return!1;const t=JSON.parse(e),r=Math.floor(Date.now()/1e3);return!t["access-token"]||parseInt(t.expiry,10)<r?!1:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.uid)}catch{return!1}}get isGuest(){if(this.isLoggedIn)return!1;try{const e=Ep("auth_headers");if(!e)return!0;const t=JSON.parse(e);return typeof t.uid=="string"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.uid)}catch{return!0}}},QE=class extends Tp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},XE=e=>{switch(e){case"angular":return new JE;case"jmb":return new QE;default:throw new Error("Unhandled shop type: "+e)}};function eT(e){return e==null||typeof e=="string"&&e.trim()===""}function tT(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||eT(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function rT(e,t){return tT(e,t)}var nT={withStackTrace:!1},xp=(e,t,r=nT)=>({data:t.isOk()?{type:"Ok",value:t.value}:{type:"Err",value:t.error},message:e,stack:r.withStackTrace?new Error().stack:void 0});function ti(e,t,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(f){try{c(n.next(f))}catch(u){a(u)}}function l(f){try{c(n.throw(f))}catch(u){a(u)}}function c(f){f.done?s(f.value):i(f.value).then(o,l)}c((n=n.apply(e,t||[])).next())})}function Ap(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function jr(e){return this instanceof jr?(this.v=e,this):new jr(e)}function Cp(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(h){return function(g){return Promise.resolve(g).then(h,u)}}function o(h,g){n[h]&&(i[h]=function(v){return new Promise(function(m,y){s.push([h,v,m,y])>1||l(h,v)})},g&&(i[h]=g(i[h])))}function l(h,g){try{c(n[h](g))}catch(v){p(s[0][3],v)}}function c(h){h.value instanceof jr?Promise.resolve(h.value.v).then(f,u):p(s[0][2],h)}function f(h){l("next",h)}function u(h){l("throw",h)}function p(h,g){h(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}function iT(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,s){t[i]=e[i]?function(a){return(r=!r)?{value:jr(e[i](a)),done:!1}:s?s(a):a}:s}}function sT(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Ap=="function"?Ap(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(a){return new Promise(function(o,l){a=e[s](a),i(o,l,a.done,a.value)})}}function i(s,a,o,l){Promise.resolve(l).then(function(c){s({value:c,done:o})},a)}}var ri=class br{constructor(t){this._promise=t}static fromSafePromise(t){return new br(t.then(r=>new Wr(r)))}static fromPromise(t,r){return new br(t.then(n=>new Wr(n)).catch(n=>new Sr(r(n))))}static fromThrowable(t,r){return(...n)=>new br(ti(this,void 0,void 0,function*(){try{return new Wr(yield t(...n))}catch(i){return new Sr(r?r(i):i)}}))}static combine(t){return aT(t)}static combineWithAllErrors(t){return oT(t)}map(t){return new br(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?new Sr(r.error):new Wr(yield t(r.value))})))}andThrough(t){return new br(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);const n=yield t(r.value);return n.isErr()?new Sr(n.error):new Wr(r.value)})))}andTee(t){return new br(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);try{yield t(r.value)}catch{}return new Wr(r.value)})))}orTee(t){return new br(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isOk())return new Wr(r.value);try{yield t(r.error)}catch{}return new Sr(r.error)})))}mapErr(t){return new br(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isOk()?new Wr(r.value):new Sr(yield t(r.error))})))}andThen(t){return new br(this._promise.then(r=>{if(r.isErr())return new Sr(r.error);const n=t(r.value);return n instanceof br?n._promise:n}))}orElse(t){return new br(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?t(r.error):new Wr(r.value)})))}match(t,r){return this._promise.then(n=>n.match(t,r))}unwrapOr(t){return this._promise.then(r=>r.unwrapOr(t))}safeUnwrap(){return Cp(this,arguments,function*(){return yield jr(yield jr(yield*iT(sT(yield jr(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return Cp(this,arguments,function*(){const r=yield jr(this._promise);return r.isErr()&&(yield yield jr(co(r.error))),yield jr(r.value)})}};function co(e){return new ri(Promise.resolve(new Sr(e)))}var mN=ri.fromPromise,vN=ri.fromSafePromise,gN=ri.fromThrowable,Op=e=>{let t=$n([]);for(const r of e)if(r.isErr()){t=Zr(r.error);break}else t.map(n=>n.push(r.value));return t},aT=e=>ri.fromSafePromise(Promise.all(e)).andThen(Op),Dp=e=>{let t=$n([]);for(const r of e)r.isErr()&&t.isErr()?t.error.push(r.error):r.isErr()&&t.isOk()?t=Zr([r.error]):r.isOk()&&t.isOk()&&t.value.push(r.value);return t},oT=e=>ri.fromSafePromise(Promise.all(e)).andThen(Dp),Fu;(function(e){function t(i,s){return(...a)=>{try{return $n(i(...a))}catch(o){return Zr(s?s(o):o)}}}e.fromThrowable=t;function r(i){return Op(i)}e.combine=r;function n(i){return Dp(i)}e.combineWithAllErrors=n})(Fu||(Fu={}));function $n(e){return new Wr(e)}function Zr(e){return new Sr(e)}var Wr=class{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return $n(e(this.value))}mapErr(e){return $n(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map(t=>this.value)}andTee(e){try{e(this.value)}catch{}return $n(this.value)}orTee(e){return $n(this.value)}orElse(e){return $n(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return ri.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,t){return e(this.value)}safeUnwrap(){const e=this.value;return(function*(){return e})()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw xp("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},Sr=class{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return Zr(this.error)}mapErr(e){return Zr(e(this.error))}andThrough(e){return Zr(this.error)}andTee(e){return Zr(this.error)}orTee(e){try{e(this.error)}catch{}return Zr(this.error)}andThen(e){return Zr(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return co(this.error)}asyncAndThrough(e){return co(this.error)}asyncMap(e){return co(this.error)}unwrapOr(e){return e}match(e,t){return t(this.error)}safeUnwrap(){const e=this.error;return(function*(){throw yield Zr(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw xp("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},yN=Fu.fromThrowable,lT=/\{[^{}]+\}/g,uT=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function cT(){return Math.random().toString(36).slice(2,11)}function dT(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:s,pathSerializer:a,headers:o,requestInitExt:l=void 0,...c}={...e};l=uT()?l:void 0,t=Fp(t);const f=[];async function u(p,h){const{baseUrl:g,fetch:v=n,Request:m=r,headers:y,params:E={},parseAs:k="json",querySerializer:T,bodySerializer:A=s??hT,pathSerializer:O,body:F,middleware:R=[],...Y}=h||{};let N=t;g&&(N=Fp(g)??t);let X=typeof i=="function"?i:Mp(i);T&&(X=typeof T=="function"?T:Mp({...typeof i=="object"?i:{},...T}));const q=O||a||fT,le=F===void 0?void 0:A(F,$p(o,y,E.header)),he=$p(le===void 0||le instanceof FormData?{}:{"Content-Type":"application/json"},o,y,E.header),j=[...f,...R],oe={redirect:"follow",...c,...Y,body:le,headers:he};let ee,fe,ce=new m(pT(p,{baseUrl:N,params:E,querySerializer:X,pathSerializer:q}),oe),de;for(const P in Y)P in ce||(ce[P]=Y[P]);if(j.length){ee=cT(),fe=Object.freeze({baseUrl:N,fetch:v,parseAs:k,querySerializer:X,bodySerializer:A,pathSerializer:q});for(const P of j)if(P&&typeof P=="object"&&typeof P.onRequest=="function"){const te=await P.onRequest({request:ce,schemaPath:p,params:E,options:fe,id:ee});if(te)if(te instanceof m)ce=te;else if(te instanceof Response){de=te;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!de){try{de=await v(ce,l)}catch(P){let te=P;if(j.length)for(let L=j.length-1;L>=0;L--){const be=j[L];if(be&&typeof be=="object"&&typeof be.onError=="function"){const Z=await be.onError({request:ce,error:te,schemaPath:p,params:E,options:fe,id:ee});if(Z){if(Z instanceof Response){te=void 0,de=Z;break}if(Z instanceof Error){te=Z;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(te)throw te}if(j.length)for(let P=j.length-1;P>=0;P--){const te=j[P];if(te&&typeof te=="object"&&typeof te.onResponse=="function"){const L=await te.onResponse({request:ce,response:de,schemaPath:p,params:E,options:fe,id:ee});if(L){if(!(L instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");de=L}}}}const G=de.headers.get("Content-Length");if(de.status===204||ce.method==="HEAD"||G==="0"&&!de.headers.get("Transfer-Encoding")?.includes("chunked"))return de.ok?{data:void 0,response:de}:{error:void 0,response:de};if(de.ok)return{data:await(async()=>{if(k==="stream")return de.body;if(k==="json"&&!G){const te=await de.text();return te?JSON.parse(te):void 0}return await de[k]()})(),response:de};let Q=await de.text();try{Q=JSON.parse(Q)}catch{}return{error:Q,response:de}}return{request(p,h,g){return u(h,{...g,method:p.toUpperCase()})},GET(p,h){return u(p,{...h,method:"GET"})},PUT(p,h){return u(p,{...h,method:"PUT"})},POST(p,h){return u(p,{...h,method:"POST"})},DELETE(p,h){return u(p,{...h,method:"DELETE"})},OPTIONS(p,h){return u(p,{...h,method:"OPTIONS"})},HEAD(p,h){return u(p,{...h,method:"HEAD"})},PATCH(p,h){return u(p,{...h,method:"PATCH"})},TRACE(p,h){return u(p,{...h,method:"TRACE"})},use(...p){for(const h of p)if(h){if(typeof h!="object"||!("onRequest"in h||"onResponse"in h||"onError"in h))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");f.push(h)}},eject(...p){for(const h of p){const g=f.indexOf(h);g!==-1&&f.splice(g,1)}}}}function fo(e,t,r){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function Ip(e,t,r){if(!t||typeof t!="object")return"";const n=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if(r.style!=="deepObject"&&r.explode===!1){for(const o in t)n.push(o,r.allowReserved===!0?t[o]:encodeURIComponent(t[o]));const a=n.join(",");switch(r.style){case"form":return`${e}=${a}`;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return a}}for(const a in t){const o=r.style==="deepObject"?`${e}[${a}]`:a;n.push(fo(o,t[a],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function Pp(e,t,r){if(!Array.isArray(t))return"";if(r.explode===!1){const s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",a=(r.allowReserved===!0?t:t.map(o=>encodeURIComponent(o))).join(s);switch(r.style){case"simple":return a;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return`${e}=${a}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const s of t)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?s:encodeURIComponent(s)):i.push(fo(e,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function Mp(e){return function(r){const n=[];if(r&&typeof r=="object")for(const i in r){const s=r[i];if(s!=null){if(Array.isArray(s)){if(s.length===0)continue;n.push(Pp(i,s,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(Ip(i,s,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(fo(i,s,e))}}return n.join("&")}}function fT(e,t){let r=e;for(const n of e.match(lT)??[]){let i=n.substring(1,n.length-1),s=!1,a="simple";if(i.endsWith("*")&&(s=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(a="label",i=i.substring(1)):i.startsWith(";")&&(a="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const o=t[i];if(Array.isArray(o)){r=r.replace(n,Pp(i,o,{style:a,explode:s}));continue}if(typeof o=="object"){r=r.replace(n,Ip(i,o,{style:a,explode:s}));continue}if(a==="matrix"){r=r.replace(n,`;${fo(i,o)}`);continue}r=r.replace(n,a==="label"?`.${encodeURIComponent(o)}`:encodeURIComponent(o))}return r}function hT(e,t){return e instanceof FormData?e:t&&(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])==="application/x-www-form-urlencoded"?new URLSearchParams(e).toString():JSON.stringify(e)}function pT(e,t){let r=`${t.baseUrl}${e}`;t.params?.path&&(r=t.pathSerializer(r,t.params.path));let n=t.querySerializer(t.params.query??{});return n.startsWith("?")&&(n=n.substring(1)),n&&(r+=`?${n}`),r}function $p(...e){const t=new Headers;for(const r of e){if(!r||typeof r!="object")continue;const n=r instanceof Headers?r.entries():Object.entries(r);for(const[i,s]of n)if(s===null)t.delete(i);else if(Array.isArray(s))for(const a of s)t.append(i,a);else s!==void 0&&t.set(i,s)}return t}function Fp(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function mT(e,t){return dT({baseUrl:e,headers:{"X-Shop-Url":t}})}var vT="/api/v4/calendar",gT="/api/v4/tickets/calendar",yT="/api/v4/auth/validate_token",bT="/api/v4/tickets/list_and_quotas",_T="/api/v4/tickets",wT="/api/v4/auth/sign_in",kT="/api/v4/auth",ST="/api/v4/orders/withdrawals",ET="/api/v4/customer/memberships/activate",TT="/api/v4/orders",xT="/api/v4/customer/customer_addresses",AT="/api/v4/customer/memberships",Np={SHOP_GUEST:10,SHOP:20},ho={error:{success:!1,errors:["Not signed in"]}},Rp=X_,CT=class{type;#e=ae(Me({customerSalutations:[],countries:[],locales:[]}));#t={};constructor(e,t,r,n="angular"){this.type=n,e&&t&&r&&this.load(e,t,r,n)}async load(e,t,r,n="angular"){(e.includes("jmb-staging.gomus.de")||e.includes("jmb.gomus.de"))&&(this.type="jmb"),d(this.#e).urls=tw(this.type),d(this.#e).currentUser=XE(this.type),d(this.#e).apiUrl=e,d(this.#e).shopDomain=t,d(this.#e).locale=r||"de",Y_(d(this.#e).locale),this.#t={},d(this.#e).client=mT(e,t),d(this.#e).capacityManager=Sp(),d(this.#e).cart=KE(),d(this.#e).auth=new Vf,d(this.#e).client.use(new pw(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return d(this.#e).capacityManager||(d(this.#e).capacityManager=Sp()),d(this.#e).capacityManager}get cart(){return d(this.#e).cart}get auth(){return d(this.#e).auth||(d(this.#e).auth=new Vf),d(this.#e).auth}get currentUser(){return d(this.#e).currentUser}get slug(){return this.shopDomain?.match(/^(?:https?:\/\/)?([^.-]+)/)?.[1]}get client(){return d(this.#e).client}get name(){return this.shop?.name}get config(){return this.shop?.config}get payment_modes(){return this.shop?.payment_modes}get content(){return this.shop?.content}get settings(){return this.shop?.settings}get donations(){return this.shop?.config.donations}get translations(){return{...Rp[(this.locale??"en").toLowerCase().split(/[-_]/)[0]]??Rp.en,...this.shop?.translations}}get currency(){return this.shop?.config.currency}t(e,t){return this.translate(e,t)}translate(e,t){if(!this.translations?.[e])return e;let r=this.translations[e];if(t&&r)for(const[n,i]of Object.entries(t))r=r.replace(`{{${n}}}`,i);return r||""}get apiUrl(){return d(this.#e).apiUrl}get shopDomain(){return d(this.#e).shopDomain}get baseUrl(){return"https://"+this.shopDomain}get locale(){return d(this.#e).locale??"de"}formatTime(e){return pp(e,this.locale)}formatDate(e,t){return xE(e,t,this.locale)}get shop(){return this.fetchAndCache("/api/v4/shop","shop","shop")}get _data(){return d(this.#e)}getCustomer(){return this.auth.data.accessToken?this.fetchAndCache(yT,"getCustomer","",{cache:5}):ho}getOrders(e={}){return this.auth.data.accessToken?this.fetchAndCache(TT,`orders-${JSON.stringify(e)}`,"",{cache:5,query:e}):ho}getCustomerAddresses(){return this.auth.data.accessToken?this.fetchAndCache(xT,"customerAddresses","",{cache:5}):ho}getCustomerMemberships(){return this.auth.data.accessToken?this.fetchAndCache(AT,"customerMemberships","",{cache:5}):ho}ticketsCalendar(e){return this.fetchAndCache(gT,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(vT,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(bT,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:Vt({per_page:100},e??{})})}tickets(e){return this.fetchAndCache(_T,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:Vt({per_page:100},e??{})})}ticketsContent(e){return this.fetchAndCache("/api/v4/tickets/content",`ticketsContent-${JSON.stringify(e)}`,"data",{cache:300,query:Vt({"ticket_ids[]":e},{per_page:100})})}signIn(e){return this.apiPost(wT,{body:e,requiredFields:["email","password"]})}signUp(e,t=!1){e=Vt({addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:t?Np.SHOP_GUEST:Np.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(kT,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(ST,{body:t,requiredFields:["order_id","first_name","last_name","email"],parseAs:"text"})}getDates(e){return this.fetchAndCache("/api/v4/dates",`dates-${JSON.stringify(e)}`,"dates",{query:Vt({per_page:100},e),cache:60})}updatePassword(e){return this.apiPut("/api/v4/auth/password",{body:e,requiredFields:["current_password","password","password_confirmation"]})}passwordReset(e){return this.apiPost("/api/v4/auth/password",{body:e,requiredFields:["email"]})}setNewPassword(e,t){return this.apiPut("/api/v4/auth/password",{body:e,requiredFields:["password","password_confirmation"],params:{header:t}})}activateMembership(e){return this.apiPost(ET,{body:e,requiredFields:["email"],parseAs:"text"})}checkout(e){return this.apiPost("/api/v4/orders",{body:e,requiredFields:["items","total"]})}#r=null;async createCart(e){const t=JSON.stringify({items:e.items??[],coupons:e.coupons??[]});if(this.#r?.key===t)return this.#r.result;const r=await this.apiPost("/api/v4/cart",{body:e,requiredFields:["items"]});return this.#r={key:t,result:r},r}order(e){return this.fetchAndCache("/api/v4/orders/{id}",`order-${e}`,"order",{path:{id:e}})}annualOrder(e){return this.fetchAndCache("/api/v4/annual/order",`annual-order-${e}`,"order",{query:{token:e}})}finalizePersonalizations(e,t){return this.apiPost("/api/v4/annual/personalization/finalize",{body:t,params:{query:{token:e}}})}uploadPersonalizationPhoto(e,t,r){const n=new FormData;return n.append("file",r),this.apiUpload("/api/v4/annual/personalizations/{id}/upload",{body:n,params:{path:{id:t},query:{token:e}}})}fetchAndCache(e,t,r,n){if(n??={},n.query??={},n.cache??=1e3,n.path??={},!this.#i())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),d(this.#e)[t];const i=n.query,s=e+JSON.stringify(i),a=!this.#t[s],o=this.#t[s]?.fetchedAt<Date.now()-n.cache*1e3;return(a||o)&&this.apiGet(e,i,n.path).then(l=>{l&&(d(this.#e)[t]=r===""?l:l[r])}),d(this.#e)[t]}get museums(){return this.fetchAndCache("/api/v4/museums","museums","museums",{query:{per_page:100}})}get exhibitions(){return this.fetchAndCache("/api/v4/exhibitions","exhibitions","exhibitions",{query:{per_page:100}})}getEvent(e){return this.fetchAndCache(`/api/v4/events/${e}`,`single_event_${e}`,"event")}getTicketCapacities(e,t){return this.apiPost("/api/v4/tickets/capacities",{body:{date:e,ticket_ids:t},requiredFields:["date","ticket_ids"]})}getCouponSaleByBarcode(e){return this.fetchAndCache(`/api/v4/coupon_sales/barcode/${e}`,`coupon_sale_barcode_${e}`,"coupon_sale",{cache:0})}getCoupons(){return this.fetchAndCache("/api/v4/coupons","coupons","coupons",{query:{online_available:!0,per_page:100}})}getEventDetailsOnDate(e,t){return this.fetchAndCache(`/api/v4/events/${e}/dates/${t}`,`/api/v4/events/${e}/dates/${t}`,"date")}get events(){return this.fetchAndCache("/api/v4/events","events","events",{query:{per_page:100}})}get upcomingEvents(){return this.fetchAndCache("/api/v4/events","events","events",{query:{by_bookable:!0,with_bookings_in_future:1,per_page:100}})}get tours(){return this.fetchAndCache("/api/v4/tours","tours","tours",{query:{per_page:100}})}get merchandises(){return this.fetchAndCache("/api/v4/merchandises","merchandises","merchandises",{query:{per_page:100}})}get customerSalutations(){return this.fetchAndCache("/api/v3/customer_salutations","customerSalutations","customer_salutations")}get countries(){return this.fetchAndCache("/api/v3/countries","countries","countries",{query:{per_page:100}})}get locales(){return this.fetchAndCache("/api/v4/locales","locales","locales_options")}get urls(){return d(this.#e).urls}get#n(){return{params:{query:{locale:this.locale},header:{"X-Shop-Url":this.shopDomain}}}}async apiPost(e,t){return this.apiCall(e,{method:"POST",...t})}async apiPut(e,t){return this.apiCall(e,{method:"PUT",...t})}async apiDELETE(e,t){return this.apiCall(e,{method:"DELETE",...t})}async apiUpload(e,t){this.#s();const{body:r,params:n={}}=t;return await this.client.POST(e,{body:r,params:Vt(this.#n,{params:n}).params,bodySerializer:i=>i})}async apiCall(e,t){this.#s();const{body:r,params:n={},requiredFields:i,parseAs:s}=t,a=rT(r,i);if(Object.keys(a).length>0)return{error:{errors:a}};const o=this.client[t.method];return await o(e,{body:r,params:Vt(this.#n,{params:n}).params,parseAs:s})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(t=>t.status==="fetching").length;)await iw(10)}async apiGet(e,t={},r){this.#s();const n=e+JSON.stringify(t);this.#t[n]={status:"fetching",fetchedAt:Date.now()};let i=this.#n;t&&(i=Vt(i,{params:{query:t}})),e&&(i=Vt(i,{params:{path:r}}));const s=await this.client.GET(e,i);return this.#t[n]={status:"completed",fetchedAt:Date.now()},s.data||s}#i=()=>this.apiUrl!==void 0&&this.shopDomain!==void 0&&this.locale!==void 0&&this.client!==void 0;#s=()=>{if(this.apiUrl===void 0)throw new Error("Public API URL is not set");if(this.shopDomain===void 0)throw new Error("Shop Domain (X-Shop-Url) is not set");if(this.locale===void 0)throw new Error("Locale is not set");if(this.client===void 0)throw new Error("client is not set");if(!this.#i())throw new Error("Fetch is not possible.")}},S=new CT;function $i(e){return function(t,r){if(t)t.addEventListener(e,n=>{n.stopPropagation(),n.detail.value=r});else throw new Error("(createSetDetails) Host is undefined, You are probably trying to use this in a non-web-component context.")}}var OT=class py{host;KEY;pollDuration;#e=ae(Me({value:void 0}));error=!1;constructor(t,r,n=1e3){this.host=t,this.KEY=r,this.pollDuration=n}static static(t){const r=new py(null,null);return r.value=t,r}load(){Ql(()=>(this.host.dispatchEvent(new CustomEvent(this.KEY,{detail:this,bubbles:!0})),this.value),this.pollDuration).then(()=>{},()=>{this.error=!0,console.warn("(createGetDetails) could not load data for:",this.KEY)})}get value(){return d(this.#e).value}set value(t){d(this.#e).value=t}};function Fi(e){return function(t,r={pollDuration:1e3}){if(t){const n=new OT(t,e,r.pollDuration);return n.load(r.pollDuration),n}else throw new Error("(createGetDetails) Host is undefined, You are probably trying to use this in a non-web-component context.")}}var DT={urls:{},navigateTo:e=>{window.location.assign(e)},forms:{},fields:{},quantityStepper:!0},IT=class{defaultConfig=Vt(DT,window.customOptions);override=this.defaultConfig;#e=ae(Me(this.defaultConfig));get options(){return d(this.#e)}set options(e){$(this.#e,e,!0)}constructor(){this.update()}update(){const e=Vt(this.defaultConfig,this.override);e.forms=Object.keys({...this.defaultConfig.forms,...this.override.forms}).reduce((t,r)=>(t[r]={...this.defaultConfig.forms[r],...this.override.forms[r]},t),{}),this.options=e}get config(){return this.options}define(e){return this.override=Vt(this.override,e),this.update(),this}default(e){return this.defaultConfig=Vt(this.defaultConfig,e),this.update(),this}},Xe=new IT,Lp=class{#e=ae();get token(){return d(this.#e)}set token(e){$(this.#e,e,!0)}#t=ae();get ticketSaleId(){return d(this.#t)}set ticketSaleId(e){$(this.#t,e,!0)}get order(){if(this.token)return hl(S.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return hl(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return Xe.config.urls.annualTicketPersonalizationForm?Xe.config.urls.annualTicketPersonalizationForm(this.token,e.id):S.urls.annualTicketPersonalizationForm(this.token,e.id)}},zp="go-annual-ticket-personalization",qp=$i(zp),PT=Fi(zp),MT=B("<li><a> </a></li>"),$T=B('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function FT(e,t){ne(t,!0);let r=_(t,"token",7);const n=new Lp;qp(t.$$host,n),ve(()=>{n.token=r()});let i=D(()=>n.order);var s={details:n,get token(){return r()},set token(c){r(c),b()}},a=re(),o=U(a),l=c=>{var f=re(),u=U(f);Ne(u,17,()=>d(i).ticket_sales,p=>p.id,(p,h)=>{var g=$T(),v=M(g),m=M(v,!0);I(v);var y=V(v,2),E=M(y,!0);I(y);var k=V(y,2),T=A=>{var O=MT(),F=M(O),R=M(F,!0);I(F),I(O),J((Y,N)=>{me(F,"href",Y),H(R,N)},[()=>n.goToPersonalization(d(h)),()=>S.t("ticket.annual.personalization.list.personalize.add")]),x(A,O)};ue(k,A=>{d(h).status=="not_ready_to_send"&&A(T)}),I(g),J(A=>{me(g,"data-ticket-sale-id",d(h).id),H(m,d(h).title),H(E,A)},[()=>S.t("ticket.annual.personalization.detail.title",{count:d(h).personalizations.length})]),x(p,g)}),x(c,f)};return ue(o,c=>{d(i)&&c(l)}),x(e,a),ie(s)}customElements.define("go-annual-ticket-personalization",se(FT,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));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(e=>({label:e.salutation,value:e.id}))},firstName:{key:"firstName",apiKey:"name",type:"text",label:"user.registration.form.name",placeholder:"",description:"",autocomplete:"given-name"},lastName:{key:"lastName",apiKey:"surname",type:"text",label:"user.registration.form.surname",placeholder:"",description:"",autocomplete:"family-name"},email:{key:"email",apiKey:"email",type:"email",label:"user.registration.form.email",placeholder:"",description:"",autocomplete:"email",validator:Qt().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:Qt().email("user.fieldErrors.emailValid")},password:{key:"password",apiKey:"password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"current-password"},currentPassword:{key:"current_password",apiKey:"current_password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"current-password"},newPassword:{key:"password",apiKey:"password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"new-password",validator:Qt().min(6,"user.fieldErrors.passwordTooShort")},confirmPassword:{key:"confirmPassword",apiKey:"password_confirmation",type:"password",label:"user.registration.form.confirmPassword",placeholder:"",description:"",autocomplete:"new-password"},addressee:{key:"addressee",apiKey:"addr_addressat",type:"text",label:"user.registration.form.adressat",placeholder:"",description:"",autocomplete:"name"},street:{key:"street",apiKey:"addr_street",type:"text",label:"user.registration.form.street",placeholder:"",description:"",autocomplete:"street-address"},postcode:{key:"postcode",apiKey:"addr_zip",type:"text",label:"user.registration.form.plz",placeholder:"",description:"",autocomplete:"postal-code"},city:{key:"city",apiKey:"addr_city",type:"text",label:"user.registration.form.city",placeholder:"",description:"",autocomplete:"address-level2"},country:{key:"country",apiKey:"addr_country_id",type:"select",label:"user.registration.form.country",placeholder:"",description:"",autocomplete:"country",options:()=>S.countries.map(e=>({label:e.name,value:e.id}))},language:{key:"language",apiKey:"language_id",type:"select",label:"user.registration.form.language",placeholder:"",description:"",autocomplete:"language",options:()=>(S.locales??[]).map(e=>({label:S.t(`languages.${e.locale}`),value:e.id}))},acceptTerms:{key:"acceptTerms",apiKey:"terms",type:"checkbox",label:"user.registration.form.accept",placeholder:"",description:"",autocomplete:"off"},startAt:{apiKey:"start_at",key:"startAt",type:"date",label:"ticket.annual.personalization.list.startAt.update",placeholder:"",description:"",autocomplete:"off",validator:Qt().date()},dateOfBirth:{key:"dateOfBirth",apiKey:"date_of_birth",type:"date",label:"user.registration.form.dateOfBirth",placeholder:"",description:"",autocomplete:"bday",validator:Qt().date()},token:{key:"token",apiKey:"id",type:"text",label:"cart.coupon.form.code",placeholder:"",description:"",autocomplete:"off"},photo:{key:"photo",apiKey:"file",type:"file",label:"ticket.annual.personalization.form.photo",placeholder:"",description:"",autocomplete:"off",validator:V1(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 RT(e,t){return{...e,errors:e.errors||[],value:e.value??LT(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){zT(this)}}}function LT(e){return e==="checkbox"?!1:e==="file"?null:""}function zT(e){if(e.errors=[],!e.validator){e.required&&(e.value===!1||e.value===""||e.value===null||e.value===void 0)&&(e.errors=["common.fieldErrors.required"]);return}const t=e.validator.safeParse(e.value);t.success?e.errors=[]:e.errors=t.error.format()._errors}var Pt=class rl{static#e={};static defineForm(t){Xe.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){Xe.default({fields:t})}static{rl.defineFields(NT)}static setRequiredApiKeys(t,r){rl.#e[t]=r}static getFormOptions(t){return Xe.config.forms[t]}static createField(t,r){const n=rl.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return RT(n,r)}static getFormFields(t){return qT(t)}static getFieldInit(t){return Xe.config.fields[t]}};function qT(e){const t=Xe.config.forms[e];if(!t)throw new Error(`(formFields) Form ${e} not found`);const r=t.fields;return r||(console.warn("(formFields) No fields defined for form",e),[])}function Nu(e){return e?e.filter(t=>t.mounted&&(t.errors?.length||t.apiErrors?.length)).length:0}function UT(e,t){ne(t,!0);let r=_(t,"token",7),n=_(t,"ticketSaleId",7),i=null;const s=new Lp;qp(t.$$host,s),ve(()=>{s.token=r(),s.ticketSaleId=n()}),Pt.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function a(){if(!i)return;const v=s.ticketSale.personalizations.length,m=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),y=Bf(v,(O,F)=>{const R=m[F-1].details;return O.push(R),O},[]);if(y.forEach(O=>{O.fields.forEach(F=>{O.validateField(F)})}),!Bf(v,(O,F)=>y[F-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const O=y.map(async(R,Y)=>{const N=s.ticketSale.personalizations[Y].id,X=R.fields.find(le=>le.key==="photo")?.value;if(!(X instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const q=await S.uploadPersonalizationPhoto(r(),N,X);return q.error?{ok:!1,error:q.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),F=(await Promise.all(O)).find(R=>!R.ok);if(F){i.details.apiErrors=[F.error];return}}const E={personalization:{ticket_sale_id:s.ticketSaleId,start_at:i.details.formData.start_at,personalizations:y.map((O,F)=>{const R=hw(O.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[F].id,customer:R}})}},k=await S.finalizePersonalizations(r(),E);if(k.error){i.details.apiErrors=k.error.error?[k.error.error]:[];return}const T=Xe.config.forms.personalization?.beforeSubmit;T&&T(E);const A=Xe.config.urls.annualTicketPersonalizationFormSubmit?.(r());A&&Xe.config.navigateTo(A)}let o=null,l=null,c=null,f=0;function u(v){v.querySelectorAll("go-field").forEach(m=>m.replaceChildren())}function p(){return o?!0:(o=t.$$host.querySelector("go-personalization-form"),o?(l=o.cloneNode(!0),u(l),c=new Comment("go-personalization-form-anchor"),o.after(c),!0):(console.warn("[personalization] No <go-personalization-form> supplied"),!1))}function h(v){if(!p()||!o||!l||!c)return;const m=o.parentElement;if(!m)return;const y=Math.max(v,1),E=Array.from(m.querySelectorAll("go-personalization-form"));for(;E.length<y;){const T=l.cloneNode(!0);u(T),m.insertBefore(T,c),E.push(T)}for(;E.length>y;){const T=E.pop();T&&T!==o&&T.remove()}const k=s.ticketSale?.personalizations??[];E.forEach((T,A)=>{const O=k[A];O&&(T.dataset.personalizationId=String(O.id))}),f=y}En(()=>{p(),t.$$host.addEventListener("go-submit",a),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),ve(()=>{if(!s.ticketSale)return;const v=s.ticketSale?.personalizations.length??1;v!==f&&h(v)});var g={details:s,get token(){return r()},set token(v){r(v),b()},get ticketSaleId(){return n()},set ticketSaleId(v){n(v),b()}};return ie(g)}customElements.define("go-annual-ticket-personalization-form",se(UT,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var BT=class{formId;form;#e=ae(Me([]));#t=D(()=>Nu(this.fields)==0);get isValid(){return d(this.#t)}set isValid(e){$(this.#t,e)}#r=ae();get successMessage(){return d(this.#r)}set successMessage(e){$(this.#r,e,!0)}get formData(){function e(r){return lw(r)||sw(r)?r:r==="true"||r==="false"?r==="true":!Number.isNaN(+r)&&r.trim()!==""?+r:r}const t=this.fields.filter(r=>r!==void 0).filter(r=>r.type!=="file").filter(r=>r.value!=="");return Object.fromEntries(t.map(r=>[r.apiKey,e(r.value)]))}fieldValue(e){return this.fields.find(t=>t.key===e)?.value}get apiErrors(){return d(this.#e)}set apiErrors(e){if($(this.#e,[],!0),this.fields.forEach(t=>t.apiErrors=[]),Xl(e)){$(this.#e,e,!0);return}if(e.errors&&Xl(e.errors)&&$(this.#e,e.errors,!0),ow(e.error)){$(this.#e,[e.error],!0);return}for(const[t,r]of Object.entries(e)){if(t==="full_messages"||t==="success"||t==="errors")continue;const n=this.fields.find(i=>i.apiKey===t);if(!n){console.error(`(set apiErrors) Field with API key ${t} not found`);continue}n.apiErrors=r}}validateForm(){this.fields.forEach(e=>this.validateField(e))}validateField(e){if(e.validate(),e.apiKey==="password_confirmation"){const t=this.fields.find(r=>r.apiKey==="password");(!t||t&&e.value!==t.value)&&e.errors.push("user.fieldErrors.passwordMatch")}else if(e.apiKey==="email_confirmation"){const t=this.fields.find(r=>r.apiKey==="email");(!t||t&&e.value!==t.value)&&e.errors.push("user.fieldErrors.emailMatch")}}get fields(){const e=this.form.closest("go-form");return Array.from(this.form.querySelectorAll("go-field")).filter(t=>t.closest("go-form")===e).map(t=>t.getField?.()).filter(t=>!!t)}toString(){return`Form: ${this.formId}, Fields: [${this.fields.map(e=>e.key).join(", ")}], Data: ${JSON.stringify(this.formData)}`}fill(e){const t=this.fields;Object.entries(e).forEach(([r,n])=>{const i=t.find(s=>s.apiKey===r);if(!i){console.warn(`(FormDetails.fill) Field with API key ${r} not found.`);return}if(i.type==="select"&&!i.options?.().find(s=>s.value===n))throw new Error(`(FormDetails.fill) Field ${r} has invalid value: ${n}`);if(i.type==="checkbox"&&![!0,!1].includes(n))throw new Error(`(FormDetails.fill) Field ${r} has invalid value: ${n}`);i.value=n})}constructor(e,t){this.formId=e,this.form=t}},Up="go-form-details",VT=$i(Up),Ni=Fi(Up);function Hr(e,t,r){const n=e.firstElementChild||void 0;if(e.children?.length===1&&n?.tagName.toLowerCase()===t)return n;const i=document.createElement(t);r&&Object.entries(r).forEach(([a,o])=>{typeof o=="boolean"?o&&i.setAttribute(a,""):i.setAttribute(a,o)});const s=document.createDocumentFragment();for(;e.firstChild;)s.appendChild(e.firstChild);return i.appendChild(s),e.replaceChildren(i),i}var jT=B("<go-all-fields></go-all-fields> <go-form-feedback><go-errors-feedback></go-errors-feedback> <go-success-feedback></go-success-feedback></go-form-feedback> <go-submit> </go-submit>",3);function ZT(e,t){ne(t,!0);let r=_(t,"formId",7),n=_(t,"custom",7);const i=new BT(r(),t.$$host);VT(t.$$host,i);async function s(f){f.preventDefault(),f.stopPropagation(),i.validateForm(),i?.form?.dispatchEvent(new Event("go-after-validation",f)),i.isValid&&(i.apiErrors={},i.successMessage=void 0,i?.form?.dispatchEvent(new Event("go-submit",f)),t.$$host.dispatchEvent(new Event("submit",{bubbles:!0,composed:!0})))}En(()=>{const f=Hr(t.$$host,"form",{novalidate:!0});f.addEventListener("submit",s),i.form=f});var a={details:i,get formId(){return r()},set formId(f){r(f),b()},get custom(){return n()},set custom(f){n(f),b()}},o=re(),l=U(o),c=f=>{var u=jT(),p=U(u),h=V(p,2),g=V(h,2),v=M(g,!0);I(g),J(m=>H(v,m),[()=>S.t(Pt.getFormOptions(r())?.submitLabel||"Submit")]),x(f,u)};return ue(l,f=>{n()||f(c)}),x(e,o),ie(a)}customElements.define("go-form",se(ZT,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var WT=B("<go-form></go-form>",2);function HT(e,t){ne(t,!0);let r=_(t,"custom",7,!1),n=_(t,"redirectUrl",7,"");Pt.defineForm({id:"passwordReset",submitLabel:"user.passwordReset.actions.requestPasswordReset",fields:[{key:"email",required:!0}]});async function i(o){const l=o.target.details,c=l.formData,f=await S.passwordReset(n()?{...c,redirect_url:n()}:c);f.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),l.successMessage=f.data.message,l.apiErrors=[]):l.apiErrors=f.error.errors}var s={get custom(){return r()},set custom(o=!1){r(o),b()},get redirectUrl(){return n()},set redirectUrl(o=""){n(o),b()}},a=WT();return xn(a,"formId","passwordReset"),J(()=>xn(a,"custom",r())),Ts("submit",a,i),x(e,a),ie(s)}customElements.define("go-password-reset",se(HT,{redirectUrl:{attribute:"redirect-url",type:"String"},custom:{}},[],[]));var GT=B("<go-form></go-form>",2);function KT(e,t){ne(t,!0);let r=_(t,"accessToken",7,""),n=_(t,"client",7,""),i=_(t,"uid",7,"");Pt.defineForm({id:"setPassword",submitLabel:"user.passwordReset.actions.resetPassword",fields:[{key:"newPassword",required:!0},{key:"confirmPassword",required:!0}]});async function s(l){const c=l.target.details,f=await S.setNewPassword(c.formData,{"access-token":r(),client:n(),uid:i()});f.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),c.successMessage=f.data.message,c.apiErrors=[]):c.apiErrors=f.error.errors}var a={get accessToken(){return r()},set accessToken(l=""){r(l),b()},get client(){return n()},set client(l=""){n(l),b()},get uid(){return i()},set uid(l=""){i(l),b()}},o=GT();return xn(o,"formId","setPassword"),Ts("submit",o,s),x(e,o),ie(a)}customElements.define("go-set-password",se(KT,{accessToken:{attribute:"access-token",type:"String"},client:{attribute:"client",type:"String"},uid:{attribute:"uid",type:"String"}},[],[]));function YT(e,t){ne(t,!0),Pt.defineForm({id:"signIn",submitLabel:"common.actions.login",fields:[{key:"email",required:!0},{key:"password",required:!0}]});let r=_(t,"custom",7,!1);async function n(i){const s=i.target.details,a=await S.signIn(s.formData);a.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error.errors}return Hr(t.$$host,"go-form",{"form-id":"signIn",custom:r()}),t.$$host.addEventListener("submit",n),ie({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-sign-in",se(YT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function JT(e,t){ne(t,!0);let r=_(t,"custom",7,!1);Pt.defineForm({id:"signUp",submitLabel:"common.actions.register",fields:[{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"newPassword",required:!0},{key:"confirmPassword",required:!0},{key:"acceptTerms",required:!0}]});async function n(i){const s=i.target.details,a=await S.signUp(s.formData,!1);a.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error.errors}return Hr(t.$$host,"go-form",{"form-id":"signUp",custom:r()}),t.$$host.addEventListener("submit",n),ie({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-sign-up",se(JT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function QT(e,t){if(typeof e=="number"&&Number.isFinite(e))return e;if(e&&typeof e=="object"){const r=Object.values(e).reduce((n,i)=>typeof i=="number"&&Number.isFinite(i)?n+i:n,0);if(r>0)return r}return t}function XT(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function ex(e){return QT(XT(e),0)}function tx(e,t){const r=ei(),n=new Set(t.map(i=>i.attributes.coupon).filter(Boolean).map(i=>i.toUpperCase()));return e.coupons.forEach(i=>r.addCoupon({...i,applied:i.kind!=="actionToken"||n.has(i.code)})),t.forEach(i=>{const s=i.attributes,a=s.uuid,o=e.items.find(l=>l.uuid===a);if(!o){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:s});return}r.addItem(rx(o,s))}),r}function rx(e,t){const r=vp(e.product)?1:ex(t),n=e.price_cents,i=e.product.price_cents===0?0:t.price_cents??n,s=i<n,a={...e.product,price_cents:i};return"dynamic_prices"in a&&(a.dynamic_prices=null),rt(a,{quantity:r,time:e.time,voucher:e.voucher,mantle:e.mantle,display:{discounted:s,reference_uuid:e.uuid,originalPrice:n}})}var nx=class{#e=ae();get displayCart(){return d(this.#e)}set displayCart(e){$(this.#e,e,!0)}#t=ae(!1);get preview(){return d(this.#t)}set preview(e){$(this.#t,e,!0)}get totalPriceCents(){return this.displayCart?.amountToPayCents??0}get subtotalPriceCents(){return 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:t,coupons:r}=e.orderData(),n=await S.createCart({items:t,coupons:r});if(n?.data){this.displayCart=tx(e,n.data.items??[]);return}console.error("(go-cart) Unable to fetch discounted cart data",n?.error),this.displayCart=e}catch(t){console.error("(go-cart) Unable to fetch discounted cart data",t),this.displayCart=e}}},Bp="go-cart-details",ix=$i(Bp),Ri=Fi(Bp),sx=B('<span class="go-cart-item-title" data-testid="cart-item-title"> </span>');function Vp(e,t){ne(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(a){r(a),b()}},i=sx(),s=M(i,!0);return I(i),J(()=>H(s,r().product.title)),x(e,i),ie(n)}se(Vp,{cartItem:{}},[],[],{mode:"open"});var ax=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span><span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),ox=B('<span class="go-cart-item-title" data-testid="cart-item-title"><span class="go-cart-item-title-event-title"> </span><span class="go-cart-item-title-ticket-title"> </span></span><!>',1);function jp(e,t){ne(t,!0);let r=_(t,"cartItem",7);if(!js(r().product))throw new Error("Product is not an event ticket");const n=r().product;var i={get cartItem(){return r()},set cartItem(h){r(h),b()}},s=ox(),a=U(s),o=M(a),l=M(o,!0);I(o);var c=V(o),f=M(c,!0);I(c),I(a);var u=V(a),p=h=>{var g=ax(),v=U(g),m=M(v,!0);I(v);var y=V(v),E=M(y,!0);I(y),J((k,T)=>{H(m,k),H(E,T)},[()=>S.formatDate(r().time,"dayMonth"),()=>S.formatTime(r().time)]),x(h,g)};return ue(u,h=>{r().time&&h(p)}),J(()=>{H(l,n.event_title),H(f,n.title)}),x(e,s),ie(i)}se(jp,{cartItem:{}},[],[],{mode:"open"});var lx=B('<span class="go-cart-item-subtitle" data-testid="cart-item-subtitle"> </span>'),ux=B('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),cx=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),dx=B('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!> <!>',1);function Zp(e,t){ne(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(p){r(p),b()}},i=dx(),s=U(i),a=M(s,!0);I(s);var o=V(s,2),l=p=>{var h=lx(),g=M(h,!0);I(h),J(()=>H(g,r().product.sub_title)),x(p,h)},c=D(()=>oo(r().product)&&r().product.sub_title);ue(o,p=>{d(c)&&p(l)});var f=V(o,2),u=p=>{var h=cx(),g=U(h),v=M(g,!0);I(g);var m=V(g,2),y=E=>{var k=ux(),T=M(k,!0);I(k),J(A=>H(T,A),[()=>S.formatTime(r().time)]),x(E,k)};ue(m,E=>{r().product.type==="Ticket"&&r().product.subtype==="timeslot"&&E(y)}),J(E=>H(v,E),[()=>S.formatDate(r().time,"dayMonth")]),x(p,h)};return ue(f,p=>{r().time&&p(u)}),J(()=>H(a,r().product.title)),x(e,i),ie(n)}se(Zp,{cartItem:{}},[],[],{mode:"open"});var fx=B('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),hx=B('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),px=B('<span class="go-cart-item-custom" data-testid="cart-item-custom"> </span>'),mx=B('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <span class="go-cart-item-participants" data-testid="cart-item-participants"> </span> <!> <!>',1);function Wp(e,t){ne(t,!0);let r=_(t,"cartItem",7);const n=D(()=>r().product),i=D(()=>{if(!r().time)return null;try{return{date:S.formatDate(r().time,"short"),time:S.formatTime(r().time)}}catch{return{date:r().time,time:""}}}),s=m=>m==null?"":typeof m=="object"?JSON.stringify(m):String(m),a=D(()=>Object.entries(d(n).customs??{}).filter(([,m])=>m!=null&&m!==""));var o={get cartItem(){return r()},set cartItem(m){r(m),b()}},l=mx(),c=U(l),f=M(c,!0);I(c);var u=V(c,2),p=M(u,!0);I(u);var h=V(u,2),g=m=>{var y=hx(),E=U(y),k=M(E,!0);I(E);var T=V(E,2),A=O=>{var F=fx(),R=M(F,!0);I(F),J(()=>H(R,d(i).time)),x(O,F)};ue(T,O=>{d(i).time&&O(A)}),J(()=>H(k,d(i).date)),x(m,y)};ue(h,m=>{d(i)&&m(g)});var v=V(h,2);return Ne(v,17,()=>d(a),([m,y])=>m,(m,y)=>{var E=D(()=>Jy(d(y),2));let k=()=>d(E)[0],T=()=>d(E)[1];var A=px(),O=M(A);I(A),J(F=>H(O,`${k()??""}: ${F??""}`),[()=>s(T())]),x(m,A)}),J(m=>{H(f,d(n).title),H(p,m)},[()=>S.t("cart.item.participants",{count:d(n).participants})]),x(e,l),ie(o)}se(Wp,{cartItem:{}},[],[],{mode:"open"});function Hp(e,{min:t,max:r}){const n=e<t?Math.max(t,1):e+1;return n>r?e:n}function vx(e,{min:t,floor:r=0}){return e<=t?r:e-1}function gx(e,{min:t,max:r,floor:n=0}){if(!Number.isFinite(e)||e<=0)return n;let i=Math.floor(e);return i<t&&(i=t),i>r&&(i=r),i}function yx(e,{min:t,max:r,floor:n=0}){return e<0||e>r?!1:e===n||e>=t}function Gp(e,t){return Hp(e,t)>e}function Kp(e,{floor:t=0}){return e>t}var bx=B('<div class="go-quantity-stepper" role="group"><button type="button" tabindex="-1"><span aria-hidden="true"> </span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>');function Yp(e,t){const r=mt();ne(t,!0);let n=_(t,"value",7),i=_(t,"min",7),s=_(t,"max",7),a=_(t,"floor",7,0),o=_(t,"label",7),l=_(t,"decreaseLabel",7),c=_(t,"increaseLabel",7),f=_(t,"onDecrementBelowMin",7),u=_(t,"removeAriaLabel",7),p=_(t,"removeLabel",7,"✕"),h=_(t,"onChange",7);const g=D(()=>f()!=null),v=D(()=>Math.max(i(),1)),m=D(()=>d(g)?{min:d(v),max:s(),floor:d(v)}:{min:i(),max:s(),floor:a()}),y=D(()=>d(g)&&n()<=d(v));let E,k=ae(!1);const T=D(()=>!d(y)&&!Kp(n(),d(m))),A=D(()=>!Gp(n(),d(m)));function O(G){G!==n()&&h()(G)}function F(){d(y)?f()():R()}function R(){Kp(n(),d(m))&&O(vx(n(),d(m)))}function Y(){Gp(n(),d(m))&&O(Hp(n(),d(m)))}function N(){const G=parseInt(E.value,10);if(d(g)&&(!Number.isFinite(G)||G<=0)){$(k,!1),E.value=String(n()),f()();return}const Q=gx(G,d(m));$(k,!1),E.value=String(Q),O(Q)}function X(){const G=E.value.trim();$(k,!(/^\d+$/.test(G)&&yx(parseInt(G,10),d(m))))}function q(G){switch(G.key){case"ArrowUp":G.preventDefault(),Y();break;case"ArrowDown":G.preventDefault(),R();break;case"Home":G.preventDefault(),O(d(m).floor);break;case"End":G.preventDefault(),O(s());break;case"Enter":G.preventDefault(),N();break}}var le={get value(){return n()},set value(G){n(G),b()},get min(){return i()},set min(G){i(G),b()},get max(){return s()},set max(G){s(G),b()},get floor(){return a()},set floor(G=0){a(G),b()},get label(){return o()},set label(G){o(G),b()},get decreaseLabel(){return l()},set decreaseLabel(G){l(G),b()},get increaseLabel(){return c()},set increaseLabel(G){c(G),b()},get onDecrementBelowMin(){return f()},set onDecrementBelowMin(G){f(G),b()},get removeAriaLabel(){return u()},set removeAriaLabel(G){u(G),b()},get removeLabel(){return p()},set removeLabel(G="✕"){p(G),b()},get onChange(){return h()},set onChange(G){h(G),b()}},he=bx(),j=M(he);let oe;var ee=M(j),fe=M(ee,!0);I(ee),I(j);var ce=V(j,2);Is(ce),Yl(ce,G=>E=G,()=>E);var de=V(ce,2);return I(he),J(()=>{me(he,"aria-label",o()),oe=St(j,1,"go-quantity-stepper-button go-quantity-stepper-decrement",null,oe,{"go-quantity-stepper-remove":d(y)}),me(j,"title",d(y)?u():l()),me(j,"aria-controls",r),me(j,"aria-disabled",d(T)),H(fe,d(y)?p():"−"),me(ce,"id",r),me(ce,"aria-label",o()),Ul(ce,n()),me(ce,"aria-valuenow",n()),me(ce,"aria-valuemin",d(m).floor),me(ce,"aria-valuemax",s()),me(ce,"aria-invalid",d(k)?"true":void 0),me(de,"title",c()),me(de,"aria-controls",r),me(de,"aria-disabled",d(A))}),pt("click",j,F),pt("input",ce,X),pt("change",ce,N),Ts("blur",ce,N),pt("keydown",ce,q),pt("click",de,Y),x(e,he),ie(le)}cr(["click","input","change","keydown"]),se(Yp,{value:{},min:{},max:{},floor:{},label:{},decreaseLabel:{},increaseLabel:{},onDecrementBelowMin:{},removeAriaLabel:{},removeLabel:{},onChange:{}},[],[],{mode:"open"});function _x(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[po(n)];if(t<e)return e>n?[po(e)]:[];const i=Math.max(e,n),s=[po(n)];for(let a=i;a<=t;a++)a!==n&&s.push(po(a));return s}function po(e){return{value:e,label:e.toString()}}var wx=B("<option> </option>"),kx=B('<select class="go-quantity-select"></select>');function mo(e,t){ne(t,!0);let r=_(t,"value",7),n=_(t,"min",7),i=_(t,"max",7),s=_(t,"label",7),a=_(t,"floor",7,0),o=_(t,"deselectable",7,!0),l=_(t,"onDecrementBelowMin",7),c=_(t,"onChange",7);const f=D(()=>Xe.config.quantityStepper);var u={get value(){return r()},set value(m){r(m),b()},get min(){return n()},set min(m){n(m),b()},get max(){return i()},set max(m){i(m),b()},get label(){return s()},set label(m){s(m),b()},get floor(){return a()},set floor(m=0){a(m),b()},get deselectable(){return o()},set deselectable(m=!0){o(m),b()},get onDecrementBelowMin(){return l()},set onDecrementBelowMin(m){l(m),b()},get onChange(){return c()},set onChange(m){c(m),b()}},p=re(),h=U(p),g=m=>{{let y=D(()=>o()?0:n()),E=D(()=>S.t("quantity.decrease")),k=D(()=>S.t("quantity.increase")),T=D(()=>S.t("quantity.remove")),A=D(()=>S.t("quantity.remove.label"));Yp(m,{get value(){return r()},get min(){return n()},get max(){return i()},get floor(){return d(y)},get label(){return s()},get decreaseLabel(){return d(E)},get increaseLabel(){return d(k)},get onDecrementBelowMin(){return l()},get removeAriaLabel(){return d(T)},get removeLabel(){return d(A)},get onChange(){return c()}})}},v=m=>{var y=kx();Ne(y,21,()=>_x(n(),i(),{floor:o()?a():n()}),E=>E.value,(E,k)=>{var T=wx(),A=M(T,!0);I(T);var O={};J(()=>{Pf(T,r()===d(k).value),H(A,d(k).label),O!==(O=d(k).value)&&(T.value=(T.__value=d(k).value)??"")}),x(E,T)}),I(y),J(()=>me(y,"aria-label",s())),pt("change",y,E=>c()(parseInt(E.target.value,10))),x(m,y)};return ue(h,m=>{d(f)?m(g):m(v,-1)}),x(e,p),ie(u)}cr(["change"]),se(mo,{value:{},min:{},max:{},label:{},floor:{},deselectable:{},onDecrementBelowMin:{},onChange:{}},[],[],{mode:"open"});function Jp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Sx(e){if(Array.isArray(e))return e}function Ex(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}function Tx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
76
76
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xx(e,t){return Sx(e)||Ex(e,t)||Ax(e,t)||Tx()}function Ax(e,t){if(e){if(typeof e=="string")return Jp(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jp(e,t):void 0}}var Qp=Object.entries,Xp=Object.setPrototypeOf,Cx=Object.isFrozen,Ox=Object.getPrototypeOf,Dx=Object.getOwnPropertyDescriptor,Mt=Object.freeze,pr=Object.seal,Li=Object.create,em=typeof Reflect<"u"&&Reflect,Ru=em.apply,Lu=em.construct;Mt||(Mt=function(t){return t}),pr||(pr=function(t){return t}),Ru||(Ru=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];return t.apply(r,i)}),Lu||(Lu=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return new t(...n)});var zi=ft(Array.prototype.forEach),Ix=ft(Array.prototype.lastIndexOf),tm=ft(Array.prototype.pop),qi=ft(Array.prototype.push),Px=ft(Array.prototype.splice),$t=Array.isArray,Zs=ft(String.prototype.toLowerCase),zu=ft(String.prototype.toString),rm=ft(String.prototype.match),Ui=ft(String.prototype.replace),nm=ft(String.prototype.indexOf),Mx=ft(String.prototype.trim),$x=ft(Number.prototype.toString),Fx=ft(Boolean.prototype.toString),im=typeof BigInt>"u"?null:ft(BigInt.prototype.toString),sm=typeof Symbol>"u"?null:ft(Symbol.prototype.toString),nt=ft(Object.prototype.hasOwnProperty),Ws=ft(Object.prototype.toString),Tt=ft(RegExp.prototype.test),Hs=Nx(TypeError);function ft(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Ru(e,t,n)}}function Nx(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Lu(e,r)}}function Ae(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zs;if(Xp&&Xp(e,null),!$t(t))return e;let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const s=r(i);s!==i&&(Cx(t)||(t[n]=s),i=s)}e[i]=!0}return e}function Rx(e){for(let t=0;t<e.length;t++)nt(e,t)||(e[t]=null);return e}function At(e){const t=Li(null);for(const n of Qp(e)){var r=xx(n,2);const i=r[0],s=r[1];nt(e,i)&&($t(s)?t[i]=Rx(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=At(s):t[i]=s)}return t}function Lx(e){switch(typeof e){case"string":return e;case"number":return $x(e);case"boolean":return Fx(e);case"bigint":return im?im(e):"0";case"symbol":return sm?sm(e):"Symbol()";case"undefined":return Ws(e);case"function":case"object":{if(e===null)return Ws(e);const t=e,r=Gr(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:Ws(n)}return Ws(e)}default:return Ws(e)}}function Gr(e,t){for(;e!==null;){const n=Dx(e,t);if(n){if(n.get)return ft(n.get);if(typeof n.value=="function")return ft(n.value)}e=Ox(e)}function r(){return null}return r}function zx(e){try{return Tt(e,""),!0}catch{return!1}}var am=Mt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),qu=Mt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Uu=Mt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),qx=Mt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Bu=Mt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ux=Mt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),om=Mt(["#text"]),lm=Mt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Vu=Mt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),um=Mt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),vo=Mt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Bx=pr(/{{[\w\W]*|^[\w\W]*}}/g),Vx=pr(/<%[\w\W]*|^[\w\W]*%>/g),jx=pr(/\${[\w\W]*/g),Zx=pr(/^data-[\-\w.\u00B7-\uFFFF]+$/),Wx=pr(/^aria-[\-\w]+$/),cm=pr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Hx=pr(/^(?:\w+script|data):/i),Gx=pr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Kx=pr(/^html$/i),Yx=pr(/^[a-z][.\w]*(-[.\w]+)+$/i),Kr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Jx=function(){return typeof window>"u"?null:window},Qx=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},dm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function fm(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Jx();const t=ge=>fm(ge);if(t.version="3.4.7",t.removed=[],!e||!e.document||e.document.nodeType!==Kr.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const n=r,i=n.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,o=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,f=e.trustedTypes,u=o.prototype,p=Gr(u,"cloneNode"),h=Gr(u,"remove"),g=Gr(u,"nextSibling"),v=Gr(u,"childNodes"),m=Gr(u,"parentNode"),y=Gr(u,"shadowRoot"),E=Gr(u,"attributes"),k=a&&a.prototype?Gr(a.prototype,"nodeType"):null,T=a&&a.prototype?Gr(a.prototype,"nodeName"):null;if(typeof s=="function"){const ge=r.createElement("template");ge.content&&ge.content.ownerDocument&&(r=ge.content.ownerDocument)}let A,O="";const F=r,R=F.implementation,Y=F.createNodeIterator,N=F.createDocumentFragment,X=F.getElementsByTagName,q=n.importNode;let le=dm();t.isSupported=typeof Qp=="function"&&typeof m=="function"&&R&&R.createHTMLDocument!==void 0;const he=Bx,j=Vx,oe=jx,ee=Zx,fe=Wx,ce=Hx,de=Gx,G=Yx;let Q=cm,P=null;const te=Ae({},[...am,...qu,...Uu,...Bu,...om]);let L=null;const be=Ae({},[...lm,...Vu,...um,...vo]);let Z=Object.seal(Li(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),w=null,_e=null;const we=Object.seal(Li(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let De=!0,Le=!0,je=!1,bt=!0,at=!1,Nt=!0,_t=!1,Rt=!1,nr=!1,Ht=!1,vr=!1,Ir=!1,Pr=!0,yn=!1;const Mr="user-content-";let gr=!0,Xr=!1,en={},xt=null;const Un=Ae({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let rs=null;const ns=Ae({},["audio","video","img","source","image","track"]);let fa=null;const td=Ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mi="http://www.w3.org/1998/Math/MathML",is="http://www.w3.org/2000/svg",yr="http://www.w3.org/1999/xhtml";let Bn=yr,rd=!1,nd=null;const _F=Ae({},[mi,is,yr],zu);let id=Ae({},["mi","mo","mn","ms","mtext"]),sd=Ae({},["annotation-xml"]);const wF=Ae({},["title","style","font","a","script"]);let ha=null;const kF=["application/xhtml+xml","text/html"],SF="text/html";let lt=null,ss=null;const EF=r.createElement("form"),ry=function(C){return C instanceof RegExp||C instanceof Function},ad=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ss&&ss===C)return;(!C||typeof C!="object")&&(C={}),C=At(C),ha=kF.indexOf(C.PARSER_MEDIA_TYPE)===-1?SF:C.PARSER_MEDIA_TYPE,lt=ha==="application/xhtml+xml"?zu:Zs,P=nt(C,"ALLOWED_TAGS")&&$t(C.ALLOWED_TAGS)?Ae({},C.ALLOWED_TAGS,lt):te,L=nt(C,"ALLOWED_ATTR")&&$t(C.ALLOWED_ATTR)?Ae({},C.ALLOWED_ATTR,lt):be,nd=nt(C,"ALLOWED_NAMESPACES")&&$t(C.ALLOWED_NAMESPACES)?Ae({},C.ALLOWED_NAMESPACES,zu):_F,fa=nt(C,"ADD_URI_SAFE_ATTR")&&$t(C.ADD_URI_SAFE_ATTR)?Ae(At(td),C.ADD_URI_SAFE_ATTR,lt):td,rs=nt(C,"ADD_DATA_URI_TAGS")&&$t(C.ADD_DATA_URI_TAGS)?Ae(At(ns),C.ADD_DATA_URI_TAGS,lt):ns,xt=nt(C,"FORBID_CONTENTS")&&$t(C.FORBID_CONTENTS)?Ae({},C.FORBID_CONTENTS,lt):Un,w=nt(C,"FORBID_TAGS")&&$t(C.FORBID_TAGS)?Ae({},C.FORBID_TAGS,lt):At({}),_e=nt(C,"FORBID_ATTR")&&$t(C.FORBID_ATTR)?Ae({},C.FORBID_ATTR,lt):At({}),en=nt(C,"USE_PROFILES")?C.USE_PROFILES&&typeof C.USE_PROFILES=="object"?At(C.USE_PROFILES):C.USE_PROFILES:!1,De=C.ALLOW_ARIA_ATTR!==!1,Le=C.ALLOW_DATA_ATTR!==!1,je=C.ALLOW_UNKNOWN_PROTOCOLS||!1,bt=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,at=C.SAFE_FOR_TEMPLATES||!1,Nt=C.SAFE_FOR_XML!==!1,_t=C.WHOLE_DOCUMENT||!1,Ht=C.RETURN_DOM||!1,vr=C.RETURN_DOM_FRAGMENT||!1,Ir=C.RETURN_TRUSTED_TYPE||!1,nr=C.FORCE_BODY||!1,Pr=C.SANITIZE_DOM!==!1,yn=C.SANITIZE_NAMED_PROPS||!1,gr=C.KEEP_CONTENT!==!1,Xr=C.IN_PLACE||!1,Q=zx(C.ALLOWED_URI_REGEXP)?C.ALLOWED_URI_REGEXP:cm,Bn=typeof C.NAMESPACE=="string"?C.NAMESPACE:yr,id=nt(C,"MATHML_TEXT_INTEGRATION_POINTS")&&C.MATHML_TEXT_INTEGRATION_POINTS&&typeof C.MATHML_TEXT_INTEGRATION_POINTS=="object"?At(C.MATHML_TEXT_INTEGRATION_POINTS):Ae({},["mi","mo","mn","ms","mtext"]),sd=nt(C,"HTML_INTEGRATION_POINTS")&&C.HTML_INTEGRATION_POINTS&&typeof C.HTML_INTEGRATION_POINTS=="object"?At(C.HTML_INTEGRATION_POINTS):Ae({},["annotation-xml"]);const W=nt(C,"CUSTOM_ELEMENT_HANDLING")&&C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING=="object"?At(C.CUSTOM_ELEMENT_HANDLING):Li(null);if(Z=Li(null),nt(W,"tagNameCheck")&&ry(W.tagNameCheck)&&(Z.tagNameCheck=W.tagNameCheck),nt(W,"attributeNameCheck")&&ry(W.attributeNameCheck)&&(Z.attributeNameCheck=W.attributeNameCheck),nt(W,"allowCustomizedBuiltInElements")&&typeof W.allowCustomizedBuiltInElements=="boolean"&&(Z.allowCustomizedBuiltInElements=W.allowCustomizedBuiltInElements),at&&(Le=!1),vr&&(Ht=!0),en&&(P=Ae({},om),L=Li(null),en.html===!0&&(Ae(P,am),Ae(L,lm)),en.svg===!0&&(Ae(P,qu),Ae(L,Vu),Ae(L,vo)),en.svgFilters===!0&&(Ae(P,Uu),Ae(L,Vu),Ae(L,vo)),en.mathMl===!0&&(Ae(P,Bu),Ae(L,um),Ae(L,vo))),we.tagCheck=null,we.attributeCheck=null,nt(C,"ADD_TAGS")&&(typeof C.ADD_TAGS=="function"?we.tagCheck=C.ADD_TAGS:$t(C.ADD_TAGS)&&(P===te&&(P=At(P)),Ae(P,C.ADD_TAGS,lt))),nt(C,"ADD_ATTR")&&(typeof C.ADD_ATTR=="function"?we.attributeCheck=C.ADD_ATTR:$t(C.ADD_ATTR)&&(L===be&&(L=At(L)),Ae(L,C.ADD_ATTR,lt))),nt(C,"ADD_URI_SAFE_ATTR")&&$t(C.ADD_URI_SAFE_ATTR)&&Ae(fa,C.ADD_URI_SAFE_ATTR,lt),nt(C,"FORBID_CONTENTS")&&$t(C.FORBID_CONTENTS)&&(xt===Un&&(xt=At(xt)),Ae(xt,C.FORBID_CONTENTS,lt)),nt(C,"ADD_FORBID_CONTENTS")&&$t(C.ADD_FORBID_CONTENTS)&&(xt===Un&&(xt=At(xt)),Ae(xt,C.ADD_FORBID_CONTENTS,lt)),gr&&(P["#text"]=!0),_t&&Ae(P,["html","head","body"]),P.table&&(Ae(P,["tbody"]),delete w.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw Hs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Hs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=C.TRUSTED_TYPES_POLICY,O=A.createHTML("")}else A===void 0&&(A=Qx(f,i)),A!==null&&typeof O=="string"&&(O=A.createHTML(""));(le.uponSanitizeElement.length>0||le.uponSanitizeAttribute.length>0)&&P===te&&(P=At(P)),le.uponSanitizeAttribute.length>0&&L===be&&(L=At(L)),Mt&&Mt(C),ss=C},ny=Ae({},[...qu,...Uu,...qx]),iy=Ae({},[...Bu,...Ux]),TF=function(C){let W=m(C);(!W||!W.tagName)&&(W={namespaceURI:Bn,tagName:"template"});const pe=Zs(C.tagName),Ie=Zs(W.tagName);return nd[C.namespaceURI]?C.namespaceURI===is?W.namespaceURI===yr?pe==="svg":W.namespaceURI===mi?pe==="svg"&&(Ie==="annotation-xml"||id[Ie]):!!ny[pe]:C.namespaceURI===mi?W.namespaceURI===yr?pe==="math":W.namespaceURI===is?pe==="math"&&sd[Ie]:!!iy[pe]:C.namespaceURI===yr?W.namespaceURI===is&&!sd[Ie]||W.namespaceURI===mi&&!id[Ie]?!1:!iy[pe]&&(wF[pe]||!ny[pe]):!!(ha==="application/xhtml+xml"&&nd[C.namespaceURI]):!1},$r=function(C){qi(t.removed,{element:C});try{m(C).removeChild(C)}catch{h(C)}},vi=function(C,W){try{qi(t.removed,{attribute:W.getAttributeNode(C),from:W})}catch{qi(t.removed,{attribute:null,from:W})}if(W.removeAttribute(C),C==="is")if(Ht||vr)try{$r(W)}catch{}else try{W.setAttribute(C,"")}catch{}},sy=function(C){let W=null,pe=null;if(nr)C="<remove></remove>"+C;else{const tt=rm(C,/^[\r\n\t ]+/);pe=tt&&tt[0]}ha==="application/xhtml+xml"&&Bn===yr&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");const Ie=A?A.createHTML(C):C;if(Bn===yr)try{W=new c().parseFromString(Ie,ha)}catch{}if(!W||!W.documentElement){W=R.createDocument(Bn,"template",null);try{W.documentElement.innerHTML=rd?O:Ie}catch{}}const ze=W.body||W.documentElement;return C&&pe&&ze.insertBefore(r.createTextNode(pe),ze.childNodes[0]||null),Bn===yr?X.call(W,_t?"html":"body")[0]:_t?W.documentElement:ze},ay=function(C){return Y.call(C.ownerDocument||C,C,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},oy=function(C){C.normalize();const W=Y.call(C.ownerDocument||C,C,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let pe=W.nextNode();for(;pe;){let Ie=pe.data;zi([he,j,oe],ze=>{Ie=Ui(Ie,ze," ")}),pe.data=Ie,pe=W.nextNode()}},Xo=function(C){const W=T?T(C):null;return typeof W!="string"||lt(W)!=="form"?!1:typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||C.attributes!==E(C)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function"||C.nodeType!==k(C)||C.childNodes!==v(C)},pa=function(C){if(!k||typeof C!="object"||C===null)return!1;try{return k(C)===Kr.documentFragment}catch{return!1}},el=function(C){if(!k||typeof C!="object"||C===null)return!1;try{return typeof k(C)=="number"}catch{return!1}};function bn(ge,C,W){zi(ge,pe=>{pe.call(t,C,W,ss)})}const ly=function(C){let W=null;if(bn(le.beforeSanitizeElements,C,null),Xo(C))return $r(C),!0;const pe=lt(C.nodeName);if(bn(le.uponSanitizeElement,C,{tagName:pe,allowedTags:P}),Nt&&C.hasChildNodes()&&!el(C.firstElementChild)&&Tt(/<[/\w!]/g,C.innerHTML)&&Tt(/<[/\w!]/g,C.textContent)||Nt&&C.namespaceURI===yr&&pe==="style"&&el(C.firstElementChild)||C.nodeType===Kr.progressingInstruction||Nt&&C.nodeType===Kr.comment&&Tt(/<[/\w]/g,C.data))return $r(C),!0;if(w[pe]||!(we.tagCheck instanceof Function&&we.tagCheck(pe))&&!P[pe]){if(!w[pe]&&cy(pe)&&(Z.tagNameCheck instanceof RegExp&&Tt(Z.tagNameCheck,pe)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(pe)))return!1;if(gr&&!xt[pe]){const Ie=m(C),ze=v(C);if(ze&&Ie){const tt=ze.length;for(let Gt=tt-1;Gt>=0;--Gt){const Vn=p(ze[Gt],!0);Ie.insertBefore(Vn,g(C))}}}return $r(C),!0}return(k?k(C):C.nodeType)===Kr.element&&!TF(C)||(pe==="noscript"||pe==="noembed"||pe==="noframes")&&Tt(/<\/no(script|embed|frames)/i,C.innerHTML)?($r(C),!0):(at&&C.nodeType===Kr.text&&(W=C.textContent,zi([he,j,oe],Ie=>{W=Ui(W,Ie," ")}),C.textContent!==W&&(qi(t.removed,{element:C.cloneNode()}),C.textContent=W)),bn(le.afterSanitizeElements,C,null),!1)},uy=function(C,W,pe){if(_e[W]||Pr&&(W==="id"||W==="name")&&(pe in r||pe in EF))return!1;const Ie=L[W]||we.attributeCheck instanceof Function&&we.attributeCheck(W,C);if(!(Le&&!_e[W]&&Tt(ee,W))){if(!(De&&Tt(fe,W))){if(!Ie||_e[W]){if(!(cy(C)&&(Z.tagNameCheck instanceof RegExp&&Tt(Z.tagNameCheck,C)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(C))&&(Z.attributeNameCheck instanceof RegExp&&Tt(Z.attributeNameCheck,W)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(W,C))||W==="is"&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&Tt(Z.tagNameCheck,pe)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(pe))))return!1}else if(!fa[W]){if(!Tt(Q,Ui(pe,de,""))){if(!((W==="src"||W==="xlink:href"||W==="href")&&C!=="script"&&nm(pe,"data:")===0&&rs[C])){if(!(je&&!Tt(ce,Ui(pe,de,"")))){if(pe)return!1}}}}}}return!0},xF=Ae({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),cy=function(C){return!xF[Zs(C)]&&Tt(G,C)},dy=function(C){bn(le.beforeSanitizeAttributes,C,null);const W=C.attributes;if(!W||Xo(C))return;const pe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0};let Ie=W.length;for(;Ie--;){const ze=W[Ie],tt=ze.name,Gt=ze.namespaceURI,Vn=ze.value,_n=lt(tt),od=Vn;let wt=tt==="value"?od:Mx(od);if(pe.attrName=_n,pe.attrValue=wt,pe.keepAttr=!0,pe.forceKeepAttr=void 0,bn(le.uponSanitizeAttribute,C,pe),wt=pe.attrValue,yn&&(_n==="id"||_n==="name")&&nm(wt,Mr)!==0&&(vi(tt,C),wt=Mr+wt),Nt&&Tt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,wt)){vi(tt,C);continue}if(_n==="attributename"&&rm(wt,"href")){vi(tt,C);continue}if(pe.forceKeepAttr)continue;if(!pe.keepAttr){vi(tt,C);continue}if(!bt&&Tt(/\/>/i,wt)){vi(tt,C);continue}at&&zi([he,j,oe],hy=>{wt=Ui(wt,hy," ")});const fy=lt(C.nodeName);if(!uy(fy,_n,wt)){vi(tt,C);continue}if(A&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Gt)switch(f.getAttributeType(fy,_n)){case"TrustedHTML":wt=A.createHTML(wt);break;case"TrustedScriptURL":wt=A.createScriptURL(wt);break}if(wt!==od)try{Gt?C.setAttributeNS(Gt,tt,wt):C.setAttribute(tt,wt),Xo(C)?$r(C):tm(t.removed)}catch{vi(tt,C)}}bn(le.afterSanitizeAttributes,C,null)},tl=function(C){let W=null;const pe=ay(C);for(bn(le.beforeSanitizeShadowDOM,C,null);W=pe.nextNode();)if(bn(le.uponSanitizeShadowNode,W,null),ly(W),dy(W),pa(W.content)&&tl(W.content),(k?k(W):W.nodeType)===Kr.element){const Ie=y?y(W):W.shadowRoot;pa(Ie)&&(as(Ie),tl(Ie))}bn(le.afterSanitizeShadowDOM,C,null)},as=function(C){const W=k?k(C):C.nodeType;if(W===Kr.element){const ze=y?y(C):C.shadowRoot;pa(ze)&&(as(ze),tl(ze))}const pe=v?v(C):C.childNodes;if(!pe)return;const Ie=[];zi(pe,ze=>{qi(Ie,ze)});for(const ze of Ie)as(ze);if(W===Kr.element){const ze=T?T(C):null;if(typeof ze=="string"&&lt(ze)==="template"){const tt=C.content;pa(tt)&&as(tt)}}};return t.sanitize=function(ge){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=null,pe=null,Ie=null,ze=null;if(rd=!ge,rd&&(ge="<!-->"),typeof ge!="string"&&!el(ge)&&(ge=Lx(ge),typeof ge!="string"))throw Hs("dirty is not a string, aborting");if(!t.isSupported)return ge;if(Rt||ad(C),t.removed=[],typeof ge=="string"&&(Xr=!1),Xr){const Vn=T?T(ge):ge.nodeName;if(typeof Vn=="string"){const _n=lt(Vn);if(!P[_n]||w[_n])throw Hs("root node is forbidden and cannot be sanitized in-place")}if(Xo(ge))throw Hs("root node is clobbered and cannot be sanitized in-place");as(ge)}else if(el(ge))W=sy("<!---->"),pe=W.ownerDocument.importNode(ge,!0),pe.nodeType===Kr.element&&pe.nodeName==="BODY"||pe.nodeName==="HTML"?W=pe:W.appendChild(pe),as(pe);else{if(!Ht&&!at&&!_t&&ge.indexOf("<")===-1)return A&&Ir?A.createHTML(ge):ge;if(W=sy(ge),!W)return Ht?null:Ir?O:""}W&&nr&&$r(W.firstChild);const tt=ay(Xr?ge:W);for(;Ie=tt.nextNode();)ly(Ie),dy(Ie),pa(Ie.content)&&tl(Ie.content);if(Xr)return at&&oy(ge),ge;if(Ht){if(at&&oy(W),vr)for(ze=N.call(W.ownerDocument);W.firstChild;)ze.appendChild(W.firstChild);else ze=W;return(L.shadowroot||L.shadowrootmode)&&(ze=q.call(n,ze,!0)),ze}let Gt=_t?W.outerHTML:W.innerHTML;return _t&&P["!doctype"]&&W.ownerDocument&&W.ownerDocument.doctype&&W.ownerDocument.doctype.name&&Tt(Kx,W.ownerDocument.doctype.name)&&(Gt="<!DOCTYPE "+W.ownerDocument.doctype.name+`>
77
77
  `+Gt),at&&zi([he,j,oe],Vn=>{Gt=Ui(Gt,Vn," ")}),A&&Ir?A.createHTML(Gt):Gt},t.setConfig=function(){ad(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Rt=!0},t.clearConfig=function(){ss=null,Rt=!1},t.isValidAttribute=function(ge,C,W){return ss||ad({}),uy(lt(ge),lt(C),W)},t.addHook=function(ge,C){typeof C=="function"&&qi(le[ge],C)},t.removeHook=function(ge,C){if(C!==void 0){const W=Ix(le[ge],C);return W===-1?void 0:Px(le[ge],W,1)[0]}return tm(le[ge])},t.removeHooks=function(ge){le[ge]=[]},t.removeAllHooks=function(){le=dm()},t}var hm=fm(),Xx=B('<span class="go-sub-ticket-description"></span>'),eA=B('<span class="go-sub-ticket-quantity"> </span>'),tA=B('<li><span class="go-sub-ticket-title"> </span> <!> <!></li>');function ju(e,t){ne(t,!0);let r=_(t,"sub",7),n=_(t,"quantity",7),i=_(t,"max",23,()=>r().max_persons),s=_(t,"onChange",7),a=_(t,"preview",7,!1);const o=D(()=>r().min_persons===r().max_persons);var l={get sub(){return r()},set sub(y){r(y),b()},get quantity(){return n()},set quantity(y){n(y),b()},get max(){return i()},set max(y=r.max_persons){i(y),b()},get onChange(){return s()},set onChange(y){s(y),b()},get preview(){return a()},set preview(y=!1){a(y),b()}},c=tA(),f=M(c),u=M(f,!0);I(f);var p=V(f,2),h=y=>{var E=Xx();Ef(E,()=>hm.sanitize(r().description),!0),I(E),x(y,E)};ue(p,y=>{r().description&&y(h)});var g=V(p,2),v=y=>{var E=eA(),k=M(E,!0);I(E),J(()=>{me(E,"data-testid",`sub-ticket-${r().id??""}-quantity`),H(k,n())}),x(y,E)},m=y=>{{let E=D(()=>r().title||S.t("cart.content.table.edit"));mo(y,{get value(){return n()},get min(){return r().min_persons},get max(){return i()},get label(){return d(E)},deselectable:!1,get onChange(){return s()}})}};return ue(g,y=>{a()||d(o)?y(v):y(m,-1)}),I(c),J(()=>{St(c,1,dr(["go-sub-ticket",d(o)&&"is-fixed",a()&&"is-preview",n()===0&&"is-empty"])),me(c,"data-testid",`sub-ticket-${r().id??""}`),H(u,r().title)}),x(e,c),ie(l)}se(ju,{sub:{},quantity:{},max:{},onChange:{},preview:{}},[],[],{mode:"open"});function pm(e,t){const{product:r}=e;return js(r)?[r.event_title,e.time&&pp(e.time,t),r.title].filter(Boolean).join(" - "):r.title}var rA=B('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),nA=B('<span class="go-cart-item-price-discounted"> </span>'),iA=B('<span data-testid="cart-item-participant-count"> </span>'),sA=B('<span data-testid="cart-item-voucher-quantity"> </span>'),aA=B("<span> </span>"),oA=B('<li class="go-cart-item-remove"><button class="go-cart-remove"> </button></li>'),lA=B('<ul class="go-sub-tickets" role="list"></ul>'),uA=B('<article class="go-cart-item-content"><ul><li class="go-cart-item-title-container"><!></li> <li class="go-cart-item-price"><!></li> <li class="go-cart-item-count"><!></li> <!> <li class="go-cart-item-sum"> </li></ul></article> <!>',1);function mm(e,t){ne(t,!0);let r=_(t,"displayItem",7),n=_(t,"displayCart",7),i=_(t,"preview",7),s=ae(void 0),a=ae(Me({}));const o=D(()=>S.cart?.items.find(y=>y.uuid===(r().display?.reference_uuid??r().uuid))),l=D(()=>Vr(r().product)?r().product:null),c=ei();ve(()=>{S.cart?.items.map(y=>y.quantity),S.cart?.items.forEach(y=>y.mantle&&Object.values(y.mantle.composition)),Re(()=>{$(s,S.capacityManager.capacity(n(),r(),c),!0),$(a,d(o)?S.capacityManager.subTicketMaxes(S.cart,d(o),c):{},!0)})});function f(y){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}d(o).quantity=Math.max(0,d(o).quantity-r().quantity+y)}function u(){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}const y=Math.max(0,d(o).quantity-r().quantity);y===0?S.cart?.deleteItem(d(o)):d(o).quantity=y}function p(y,E){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}d(o).mantle&&(d(o).mantle.composition[y]=E)}var h={get displayItem(){return r()},set displayItem(y){r(y),b()},get displayCart(){return n()},set displayCart(y){n(y),b()},get preview(){return i()},set preview(y){i(y),b()}},g=re(),v=U(g),m=y=>{var E=uA(),k=U(E),T=M(k),A=M(T),O=M(A),F=Z=>{Zp(Z,{get cartItem(){return r()}})},R=Z=>{jp(Z,{get cartItem(){return r()}})},Y=Z=>{Vp(Z,{get cartItem(){return r()}})},N=Z=>{Wp(Z,{get cartItem(){return r()}})};ue(O,Z=>{r().product.type==="Ticket"?Z(F):r().product.type==="Event"?Z(R,1):r().product.type==="Coupon"?Z(Y,2):r().product.type==="Tour"&&Z(N,3)}),I(A);var X=V(A,2),q=M(X),le=Z=>{var w=rA(),_e=U(w),we=M(_e,!0);I(_e);var De=V(_e,2),Le=M(De,!0);I(De),J((je,bt)=>{H(we,je),H(Le,bt)},[()=>yt(r().display.originalPrice),()=>yt(r().final_price_cents)]),x(Z,w)},he=Z=>{var w=nA(),_e=M(w,!0);I(w),J(we=>H(_e,we),[()=>yt(r().final_price_cents)]),x(Z,w)};ue(q,Z=>{r().display?.discounted?Z(le):Z(he,-1)}),I(X);var j=V(X,2),oe=M(j),ee=Z=>{var w=iA(),_e=M(w,!0);I(w),J(()=>H(_e,r().product.participants)),x(Z,w)},fe=Z=>{var w=sA(),_e=M(w,!0);I(w),J(()=>H(_e,r().quantity)),x(Z,w)},ce=Z=>{var w=aA(),_e=M(w,!0);I(w),J(()=>H(_e,r().quantity)),x(Z,w)},de=Z=>{{let w=D(()=>r().quantity??0),_e=D(()=>pm(r(),S.locale));mo(Z,{get value(){return d(w)},get min(){return d(s).min},get max(){return d(s).max},get label(){return d(_e)},floor:1,onChange:f,onDecrementBelowMin:u})}};ue(oe,Z=>{r().product.type==="Tour"?Z(ee):r().voucher?.code?Z(fe,1):i()?Z(ce,2):Z(de,-1)}),I(j);var G=V(j,2),Q=Z=>{var w=oA(),_e=M(w),we=M(_e,!0);I(_e),I(w),J((De,Le)=>{me(_e,"aria-label",De),H(we,Le)},[()=>S.t("cart.item.aria.removeItem"),()=>S.t("cart.item.remove")]),pt("click",_e,u),x(Z,w)};ue(G,Z=>{i()||Z(Q)});var P=V(G,2),te=M(P,!0);I(P),I(T),I(k);var L=V(k,2),be=Z=>{var w=lA();Ne(w,21,()=>qs(d(l)),_e=>_e.id,(_e,we)=>{{let De=D(()=>r().mantle?.composition?.[d(we).id]??0);ju(_e,{get sub(){return d(we)},get preview(){return i()},get quantity(){return d(De)},get max(){return d(a)[d(we).id]},onChange:Le=>p(d(we).id,Le)})}}),I(w),J(()=>me(w,"aria-label",d(l).title)),x(Z,w)};ue(L,Z=>{d(l)&&Z(be)}),J(Z=>H(te,Z),[()=>yt(r().total_price_cents)]),x(y,E)};return ue(v,y=>{d(s)&&y(m)}),x(e,g),ie(h)}cr(["click"]),se(mm,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var cA=B('<li class="go-cart-header-remove"></li>'),dA=B('<li class="go-cart-item"><!></li>'),fA=B('<ol data-testid="cart-items"><li class="go-cart-header"><ul><li class="go-cart-header-title"> </li> <li class="go-cart-header-price"> </li> <li class="go-cart-header-count"> </li> <!> <li class="go-cart-header-sum"> </li></ul></li> <!></ol>');function hA(e,t){ne(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=fA(),c=M(l),f=M(c),u=M(f),p=M(u,!0);I(u);var h=V(u,2),g=M(h,!0);I(h);var v=V(h,2),m=M(v,!0);I(v);var y=V(v,2),E=O=>{var F=cA();x(O,F)};ue(y,O=>{d(n).preview||O(E)});var k=V(y,2),T=M(k,!0);I(k),I(f),I(c);var A=V(c,2);Ne(A,17,()=>d(n).displayCart.items,O=>O.uuid,(O,F)=>{var R=dA();mm(M(R),{get displayItem(){return d(F)},get displayCart(){return d(n).displayCart},get preview(){return d(n).preview}}),I(R),x(O,R)}),I(l),J((O,F,R,Y)=>{H(p,O),H(g,F),H(m,R),H(T,Y)},[()=>S.t("cart.content.table.desc"),()=>S.t("cart.content.table.price"),()=>S.t("cart.content.table.quantity"),()=>S.t("cart.content.table.total")]),x(o,l)};ue(s,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.items.length&&o(a)}),x(e,i),ie()}customElements.define("go-cart-items",se(hA,{},[],[]));var pA=B('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),mA=B('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),vA=B('<ol data-testid="cart-coupons"></ol>');function gA(e,t){ne(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=vA();Ne(l,21,()=>d(n).displayCart.coupons,c=>c.code,(c,f)=>{var u=mA();let p;var h=M(u),g=M(h),v=M(g),m=M(v,!0);I(v);var y=V(v,2),E=k=>{var T=pA(),A=M(T);I(T),J(O=>me(A,"aria-label",O),[()=>S.t("cart.coupons.remove")]),pt("click",A,()=>S.cart?.removeCoupon(d(f).code)),x(k,T)};ue(y,k=>{d(n).preview||k(E)}),I(g),I(h),I(u),J(()=>{p=St(u,1,"go-cart-coupon",null,p,{"go-cart-coupon-inactive":!d(f).applied}),H(m,d(f).code)}),x(c,u)}),I(l),x(o,l)};ue(s,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.coupons.length>0&&o(a)}),x(e,i),ie()}cr(["click"]),customElements.define("go-cart-coupons",se(gA,{},[],[]));var yA=B('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function bA(e,t){ne(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=yA(),c=M(l,!0);I(l),J(f=>H(c,f),[()=>yt(d(n).totalPriceCents)]),x(o,l)};ue(s,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.items.length&&o(a)}),x(e,i),ie()}customElements.define("go-cart-total-amount",se(bA,{},[],[]));function _A(e,t){ne(t,!0);const r=_(t,"preview",7,!1),n=new nx;ix(t.$$host,n),ve(()=>{n.preview=r()}),ve(()=>{S.cart&&(S.cart.items.map(s=>s.uuid+":"+s.quantity+":"+s.time),S.cart.coupons.map(s=>s.code).join("|"),S.cart.items.forEach(s=>s.mantle&&Object.values(s.mantle.composition)),Re(()=>n.calculateDisplayCart()))});async function i(){const s=t.$$host.querySelectorAll("go-coupon-redemption");let a=!0;for(const o of s){const l=await o.flush?.();l&&!l.success&&(a=!1)}return a}return t.$$host.addEventListener("click",async s=>{const a=s.target.closest("go-submit");if(!a)return;const o=a.closest("go-form");if(o&&t.$$host.contains(o))return;const l=await i();l&&t.$$host.dispatchEvent(new CustomEvent("go-submit",{detail:{ok:l},bubbles:!0,composed:!0}))}),ie({get preview(){return r()},set preview(s=!1){r(s),b()}})}customElements.define("go-cart",se(_A,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var wA=B('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function kA(e,t){ne(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=wA(),c=M(l,!0);I(l),J(f=>H(c,f),[()=>yt(d(n).subtotalPriceCents)]),x(o,l)};ue(s,o=>{d(n)&&S.cart?.items.length&&o(a)}),x(e,i),ie()}customElements.define("go-cart-subtotal-amount",se(kA,{},[],[]));var SA=B('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function EA(e,t){ne(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=re(),s=U(i),a=o=>{var l=SA(),c=V(M(l),1,!0);I(l),J(f=>H(c,f),[()=>yt(d(n).discountedAmountCents)]),x(o,l)};ue(s,o=>{d(n)&&d(n).discountedAmountCents>0&&o(a)}),x(e,i),ie()}customElements.define("go-cart-discounted-amount",se(EA,{},[],[]));function TA(e,t){ne(t,!0),Hr(t.$$host,"go-if",{when:"data.cart.items.length === 0"}),ie()}customElements.define("go-cart-empty",se(TA,{},[],[]));function xA(e,t){ne(t,!0);let r=D(()=>S.cart?.items.length);Ot();var n=Bt();J(()=>H(n,d(r))),x(e,n),ie()}customElements.define("go-cart-counter",se(xA,{},[],[]));function AA(e){const t=document.createElement("form");t.method="post",t.action=e.url;for(const[r,n]of Object.entries(e.params)){const i=document.createElement("input");i.type="hidden",i.name=r,i.value=String(n),t.appendChild(i)}document.body.appendChild(t),t.submit()}async function vm(e,t){const r=S.cart;if(!r)return;const n=e.details.fieldValue("paymentMode");r.paymentModeId=n==null?void 0:String(n);const i=await S.checkout(r.orderData());if(i.error){e.details.apiErrors=i.error;return}const s=Xe.config.forms[t]?.beforeSubmit;s&&await s(e.details.formData);const a=i.data.meta,o=Xe.config.navigateTo;a.status==="success"?o?.(S.urls.checkoutSuccess(i.data.order.token)):a.status==="fail"?o?.(S.urls.checkoutFailure("")):a.payment_url?o?.(a.payment_url):a.payment_data?AA(a.payment_data):o?.(S.urls.checkoutFailure(""))}function gm(e,t){Pt.defineForm({id:"checkoutGuest",submitLabel:"cart.detail.actions.checkout",fields:[{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"acceptTerms",required:!0},{key:"paymentMode",required:!0}]}),Hr(e,"go-form",{"form-id":"checkoutGuest",custom:t}),e.addEventListener("submit",async r=>{const n=r.target;if(!S.cart)return;const i=await S.signUp(n.details.formData,!0);if(i.error){n.details.apiErrors=i.error.errors;return}await vm(n,"checkoutGuest")})}function CA(e,t){Pt.defineForm({id:"checkoutUser",submitLabel:"cart.detail.actions.checkout",fields:[{key:"acceptTerms",required:!0},{key:"paymentMode",required:!0}]}),Hr(e,"go-form",{"form-id":"checkoutUser",custom:t}),e.addEventListener("submit",async r=>{const n=r.target;await vm(n,"checkoutUser")})}function OA(e,t){ne(t,!0);let r=_(t,"custom",7,!1);return gm(t.$$host,r()),ie({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-form",se(OA,{custom:{}},[],[]));function DA(e,t){ne(t,!0);let r=_(t,"custom",7,!1);return gm(t.$$host,r()),ie({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-guest",se(DA,{custom:{}},[],[]));function IA(e,t){ne(t,!0);let r=_(t,"custom",7,!1);return CA(t.$$host,r()),ie({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-user",se(IA,{custom:{}},[],[]));var PA="TokenActions::ApplyOrderDiscount";async function MA(e){if(!S.cart)throw new Error("(go-coupon-redemption): cart not found");const t=S.cart,r=await S.asyncFetch(()=>S.getCouponSaleByBarcode(e));return r?.is_valid?r.value_action===PA?(t.addCoupon({code:e,kind:"actionToken"}),{success:!0}):r.is_voucher_for?FA(e,r):r.value_cents&&r.value_cents>0?$A(e,r.value_cents):Zu([S.t("cart.coupon.form.errors.notValid")]):Zu([S.t("cart.coupon.form.errors.notValid")])}function $A(e,t){return S.cart.addCoupon({code:e,kind:"valueVoucher",valueCents:t}),{success:!0}}async function FA(e,t){const r=e.toUpperCase();if(S.cart.coupons.some(a=>a.code===r))return{success:!0};const n=await S.asyncFetch(()=>S.tickets({"by_ticket_ids[]":[t.is_voucher_for]})),i=Array.isArray(n)?n.find(a=>a.id===t.is_voucher_for):void 0;if(!i)return Zu([S.t("cart.coupon.form.errors.error")]);const s={...i,price_cents:0};return S.cart.addItem(rt(Us(s),{quantity:1,voucher:{code:r}})),S.cart.addCoupon({code:r,kind:"serviceVoucher"}),{success:!0}}function Zu(e){return{success:!1,errors:e}}var NA=B("<go-form></go-form>",2);function RA(e,t){ne(t,!0),Pt.defineForm({id:"couponRedemption",submitLabel:"cart.coupon.form.submit",fields:[{key:"token",required:!0}]});async function r(o){const l=o.details.fields.find(u=>u.key==="token"),c=(o.details.fieldValue("token")??"").trim().toUpperCase();if(!c)return{success:!0};const f=await MA(c);return f.success?(o.details.apiErrors=[],l&&(l.value=""),o.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),f):(o.details.apiErrors=f.errors,f)}async function n(o){await r(o.target)}async function i(){const o=t.$$host.querySelector("go-form");return o?.details?r(o):{success:!0}}var s={flush:i},a=NA();return xn(a,"formId","couponRedemption"),Ts("submit",a,n),x(e,a),ie(s)}customElements.define("go-coupon-redemption",se(RA,{},[],["flush"])),kb();var LA=class{#e=ae();get campaign(){return d(this.#e)}set campaign(e){$(this.#e,e,!0)}#t=ae();get amount(){return d(this.#t)}set amount(e){$(this.#t,e,!0)}selectCampaign=e=>{this.campaign=e,document.getElementsByClassName("donation-actions")[0]?.scrollIntoView()};addDonationToCart=()=>{if(this.amount===void 0||this.campaign===void 0)return;const e={value:this.amount,campaign_id:this.campaign.id};let t=JSON.parse(localStorage.getItem("201600627v4donations")||"[]");qr(t.filter(r=>r.campaign_id=e.campaign_id),r=>r.value)+e.value>this.campaign.guest_limit&&this.campaign.guest_limit>0&&(!S.currentUser?.isAuthenticated||S.currentUser.isGuest)?this.skipDonation():(t.push(e),localStorage.setItem("201600627v4donations",JSON.stringify(t)),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())}},Ct=new LA,zA=B('<img alt="logo"/>'),qA=B('<div role="button" tabindex="0"><div class="donation-image"><!></div> <div class="donation-info"><p class="donation-info-title"> </p> <p class="donation-info-description"> </p></div></div>');function ym(e,t){ne(t,!0);let r=_(t,"campaign",7);const n=D(()=>r().translations);var i={get campaign(){return r()},set campaign(v){r(v),b()}},s=qA();let a;var o=M(s),l=M(o),c=v=>{var m=zA();J(y=>me(m,"src",y),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),x(v,m)};ue(l,v=>{r().picture.thumbnail&&v(c)}),I(o);var f=V(o,2),u=M(f),p=M(u,!0);I(u);var h=V(u,2),g=M(h,!0);return I(h),I(f),I(s),J(()=>{a=St(s,1,"go-donation-campaign",null,a,{selected:Ct.campaign?.id===r()?.id}),H(p,d(n)["donations.headline"]),H(g,d(n)["donations.shop.info"])}),pt("click",s,()=>Ct.selectCampaign(r())),pt("keydown",s,v=>{v.key==="Enter"&&Ct.selectCampaign(r())}),x(e,s),ie(i)}cr(["click","keydown"]),se(ym,{campaign:{}},[],[],{mode:"open"});var UA=B("<button> </button>"),BA=B('<form id="donationForm" action="" novalidate=""><div class="donation-custom form-group"><label for="donation-custom-amount"> </label> <input class="form-control" id="donation-custom-amount" type="number" min="1"/></div></form>'),VA=B('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function bm(e,t){ne(t,!0);const r=Ct.campaign?.guest_limit?Ct.campaign.guest_limit/100:void 0;let n=ae(void 0);function i(p){Ct.amount=p,$(n,null)}function s(p){const h=document.getElementById("donationForm");h.checkValidity()?Ct.amount=p.target.valueAsNumber*100:(Ct.amount=void 0,h.reportValidity())}var a=VA(),o=M(a),l=M(o,!0);I(o);var c=V(o,2);Ne(c,20,()=>Ct.campaign?.options,p=>p,(p,h)=>{var g=UA();let v;var m=M(g,!0);I(g),J(y=>{v=St(g,1,"btn btn-default",null,v,{selected:Ct.amount===h}),H(m,y)},[()=>yt(h)]),pt("click",g,()=>i(h)),x(p,g)}),I(c);var f=V(c,2),u=p=>{var h=BA(),g=M(h),v=M(g),m=M(v,!0);I(v);var y=V(v,2);Is(y),I(g),I(h),J((E,k)=>{H(m,E),me(y,"max",r),me(y,"placeholder",k),Ul(y,d(n))},[()=>S.t("donations.selection.custom.label"),()=>S.t("donations.selection.custom.input.placeholder")]),pt("input",y,s),x(p,h)};ue(f,p=>{Ct.campaign?.free_donations&&p(u)}),I(a),J(p=>H(l,p),[()=>S.t("donations.selection.title")]),x(e,a),ie()}cr(["click","input"]),se(bm,{},[],[],{mode:"open"});var jA=B('<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>');function ZA(e,t){ne(t,!1),En(()=>{S.donations?.campaigns?.length==1&&Ct.selectCampaign(S.donations?.campaigns[0])}),Jl();var r=re(),n=U(r),i=s=>{var a=jA(),o=M(a);Ne(o,1,()=>S?.donations?.campaigns,v=>v.id,(v,m)=>{ym(v,{get campaign(){return d(m)}})});var l=V(o,2),c=v=>{bm(v,{})};ue(l,v=>{Ct.campaign&&v(c)});var f=V(l,2),u=M(f),p=M(u,!0);I(u);var h=V(u,2),g=M(h,!0);I(h),I(f),I(a),J((v,m)=>{H(p,v),h.disabled=!Ct.amount,H(g,m)},[()=>S.t("donations.actions.continueWithoutDonation"),()=>S.t("donations.actions.addToCart")]),pt("click",u,function(...v){Ct.skipDonation?.apply(this,v)}),pt("click",h,function(...v){Ct.addDonationToCart?.apply(this,v)}),x(s,a)};ue(n,s=>{S.donations&&S.donations.campaigns&&s(i)}),x(e,r),ie()}cr(["click"]),customElements.define("go-donations",se(ZA,{},[],[]));function WA(e){return typeof e=="function"}function Gs(e){return e!==null&&typeof e=="object"}var HA=["string","number","bigint","boolean"];function Wu(e){return e==null||HA.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Wu(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}var go=Symbol("box"),_m=Symbol("is-writable");function z(e,t){const r=D(e);return t?{[go]:!0,[_m]:!0,get current(){return d(r)},set current(n){t(n)}}:{[go]:!0,get current(){return e()}}}function wm(e){return Gs(e)&&go in e}function GA(e){return wm(e)?e:WA(e)?z(e):Er(e)}function Er(e){let t=ae(Me(e));return{[go]:!0,[_m]:!0,get current(){return d(t)},set current(r){$(t,r,!0)}}}function km(...e){return function(t){for(const r of e)if(r){if(t.defaultPrevented)return;typeof r=="function"?r.call(this,t):r.current?.call(this,t)}}}var Sm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,KA=/\n/g,YA=/^\s*/,JA=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,QA=/^:\s*/,XA=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,eC=/^[;\s]*/,tC=/^\s+|\s+$/g,rC=`
78
78
  `,Em="/",Tm="*",ni="",nC="comment",iC="declaration";function sC(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(g){var v=g.match(KA);v&&(r+=v.length);var m=g.lastIndexOf(rC);n=~m?g.length-m:n+g.length}function s(){var g={line:r,column:n};return function(v){return v.position=new a(g),c(),v}}function a(g){this.start=g,this.end={line:r,column:n},this.source=t.source}a.prototype.content=e;function o(g){var v=new Error(t.source+":"+r+":"+n+": "+g);if(v.reason=g,v.filename=t.source,v.line=r,v.column=n,v.source=e,!t.silent)throw v}function l(g){var v=g.exec(e);if(v){var m=v[0];return i(m),e=e.slice(m.length),v}}function c(){l(YA)}function f(g){var v;for(g=g||[];v=u();)v!==!1&&g.push(v);return g}function u(){var g=s();if(!(Em!=e.charAt(0)||Tm!=e.charAt(1))){for(var v=2;ni!=e.charAt(v)&&(Tm!=e.charAt(v)||Em!=e.charAt(v+1));)++v;if(v+=2,ni===e.charAt(v-1))return o("End of comment missing");var m=e.slice(2,v-2);return n+=2,i(m),e=e.slice(v),n+=2,g({type:nC,comment:m})}}function p(){var g=s(),v=l(JA);if(v){if(u(),!l(QA))return o("property missing ':'");var m=l(XA),y=g({type:iC,property:xm(v[0].replace(Sm,ni)),value:m?xm(m[0].replace(Sm,ni)):ni});return l(eC),y}}function h(){var g=[];f(g);for(var v;v=p();)v!==!1&&(g.push(v),f(g));return g}return c(),h()}function xm(e){return e?e.replace(tC,ni):ni}function aC(e,t){let r=null;if(!e||typeof e!="string")return r;const n=sC(e),i=typeof t=="function";return n.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:o}=s;i?t(a,o,s):o&&(r=r||{},r[a]=o)}),r}var oC=/\d/,lC=["-","_","/","."];function uC(e=""){if(!oC.test(e))return e!==e.toLowerCase()}function cC(e){const t=[];let r="",n,i;for(const s of e){const a=lC.includes(s);if(a===!0){t.push(r),r="",n=void 0;continue}const o=uC(s);if(i===!1){if(n===!1&&o===!0){t.push(r),r=s,n=o;continue}if(n===!0&&o===!1&&r.length>1){const l=r.at(-1);t.push(r.slice(0,Math.max(0,r.length-1))),r=l+s,n=o;continue}}r+=s,n=o,i=a}return t.push(r),t}function Am(e){return e?cC(e).map(t=>fC(t)).join(""):""}function dC(e){return hC(Am(e||""))}function fC(e){return e?e[0].toUpperCase()+e.slice(1):""}function hC(e){return e?e[0].toLowerCase()+e.slice(1):""}function Ks(e){if(!e)return{};const t={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){t[Am(n)]=i;return}if(n.startsWith("--")){t[n]=i;return}t[dC(n)]=i}return aC(e,r),t}function Ys(...e){return(...t)=>{for(const r of e)typeof r=="function"&&r(...t)}}function pC(e,t){const r=RegExp(e,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,t):n}}var mC=pC(/[A-Z]/,e=>`-${e.toLowerCase()}`);function vC(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${mC(t)}: ${e[t]};`).join(`
@@ -10129,11 +10129,11 @@ function jT(e, t) {
10129
10129
  }), r;
10130
10130
  }
10131
10131
  function ZT(e, t) {
10132
- const r = jm(e.product) ? 1 : VT(t), n = e.product.price_cents, i = n === 0 ? 0 : t.price_cents ?? n, s = i < n;
10133
- return it({
10132
+ const r = jm(e.product) ? 1 : VT(t), n = e.price_cents, i = e.product.price_cents === 0 ? 0 : t.price_cents ?? n, s = i < n, a = {
10134
10133
  ...e.product,
10135
10134
  price_cents: i
10136
- }, {
10135
+ };
10136
+ return "dynamic_prices" in a && (a.dynamic_prices = null), it(a, {
10137
10137
  quantity: r,
10138
10138
  time: e.time,
10139
10139
  voucher: e.voucher,
@@ -46,7 +46,7 @@ export declare const TicketFactories: {
46
46
  max_total_capacity: number;
47
47
  shipped_with_merchandise_id: null;
48
48
  restricted_shop_account: boolean;
49
- dynamic_prices: null;
49
+ dynamic_prices: Record<string, number> | null;
50
50
  };
51
51
  day(options?: Partial<ReturnType<typeof defaultTicket>>): {
52
52
  type: ProductType;
@@ -90,7 +90,7 @@ export declare const TicketFactories: {
90
90
  max_total_capacity: number;
91
91
  shipped_with_merchandise_id: null;
92
92
  restricted_shop_account: boolean;
93
- dynamic_prices: null;
93
+ dynamic_prices: Record<string, number> | null;
94
94
  };
95
95
  mantle(options?: Partial<ReturnType<typeof defaultTicket>>): {
96
96
  type: ProductType;
@@ -134,7 +134,7 @@ export declare const TicketFactories: {
134
134
  max_total_capacity: number;
135
135
  shipped_with_merchandise_id: null;
136
136
  restricted_shop_account: boolean;
137
- dynamic_prices: null;
137
+ dynamic_prices: Record<string, number> | null;
138
138
  };
139
139
  /**
140
140
  * A backend order-echo ticket item (the shape go-order-breakdown renders).
@@ -186,6 +186,6 @@ declare function defaultTicket(): {
186
186
  max_total_capacity: number;
187
187
  shipped_with_merchandise_id: null;
188
188
  restricted_shop_account: boolean;
189
- dynamic_prices: null;
189
+ dynamic_prices: Record<string, number> | null;
190
190
  };
191
191
  export {};
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Giantmonkey GmbH"
5
5
  },
6
6
  "license": "MIT",
7
- "version": "4.14.0",
7
+ "version": "4.14.1",
8
8
  "type": "module",
9
9
  "main": "./dist-js/gomus-webcomponents.iife.js",
10
10
  "module": "./dist-js/gomus-webcomponents.iife.js",