@dfgk/hoverla-checkout 1.0.0 → 1.0.2
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/dist/hoverla-checkout.js
CHANGED
|
@@ -218,6 +218,13 @@ var HoverlaCheckoutBundle=(function(e){Object.defineProperty(e,Symbol.toStringTa
|
|
|
218
218
|
color: var(--hv-color-muted, #505a63);
|
|
219
219
|
font-size: 0.875em;
|
|
220
220
|
}
|
|
221
|
+
.hv-choice-single {
|
|
222
|
+
grid-template-columns: minmax(0, 1fr);
|
|
223
|
+
}
|
|
224
|
+
.hv-choice-single .hv-choice-help {
|
|
225
|
+
grid-column: 1;
|
|
226
|
+
margin-top: calc(var(--hv-space, 8px) / 2);
|
|
227
|
+
}
|
|
221
228
|
.hv-choice-flag {
|
|
222
229
|
grid-column: 2;
|
|
223
230
|
color: var(--hv-color-warning, #8a5a00);
|
|
@@ -358,11 +365,63 @@ var HoverlaCheckoutBundle=(function(e){Object.defineProperty(e,Symbol.toStringTa
|
|
|
358
365
|
.hv-totals-row dd {
|
|
359
366
|
margin: 0;
|
|
360
367
|
}
|
|
368
|
+
.hv-totals-note {
|
|
369
|
+
flex-direction: column;
|
|
370
|
+
gap: calc(var(--hv-space, 8px) / 2);
|
|
371
|
+
align-items: flex-start;
|
|
372
|
+
}
|
|
373
|
+
.hv-totals-note dd {
|
|
374
|
+
overflow-wrap: anywhere;
|
|
375
|
+
}
|
|
376
|
+
@container (min-width: 480px) {
|
|
377
|
+
.hv-totals-note {
|
|
378
|
+
flex-direction: row;
|
|
379
|
+
gap: var(--hv-space, 8px);
|
|
380
|
+
align-items: baseline;
|
|
381
|
+
}
|
|
382
|
+
.hv-totals-note dd {
|
|
383
|
+
text-align: right;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
361
386
|
.hv-totals-total {
|
|
362
387
|
font-size: 1.25em;
|
|
363
388
|
font-weight: 700;
|
|
364
389
|
}
|
|
365
390
|
|
|
391
|
+
.hv-result-items ul {
|
|
392
|
+
margin: 0;
|
|
393
|
+
padding: 0;
|
|
394
|
+
list-style: none;
|
|
395
|
+
}
|
|
396
|
+
.hv-result-item {
|
|
397
|
+
display: flex;
|
|
398
|
+
flex-wrap: wrap;
|
|
399
|
+
column-gap: calc(var(--hv-space, 8px) * 2);
|
|
400
|
+
row-gap: calc(var(--hv-space, 8px) / 2);
|
|
401
|
+
align-items: baseline;
|
|
402
|
+
justify-content: space-between;
|
|
403
|
+
padding-block: var(--hv-space, 8px);
|
|
404
|
+
border-bottom: 1px solid var(--hv-color-border, #80898f);
|
|
405
|
+
}
|
|
406
|
+
.hv-result-item:last-child {
|
|
407
|
+
border-bottom: 0;
|
|
408
|
+
}
|
|
409
|
+
.hv-result-name {
|
|
410
|
+
flex: 1 1 12ch;
|
|
411
|
+
min-width: 0;
|
|
412
|
+
overflow-wrap: anywhere;
|
|
413
|
+
}
|
|
414
|
+
.hv-result-qty {
|
|
415
|
+
white-space: nowrap;
|
|
416
|
+
}
|
|
417
|
+
.hv-result-price {
|
|
418
|
+
flex: 0 0 auto;
|
|
419
|
+
margin-left: auto;
|
|
420
|
+
font-weight: 600;
|
|
421
|
+
font-variant-numeric: tabular-nums;
|
|
422
|
+
white-space: nowrap;
|
|
423
|
+
}
|
|
424
|
+
|
|
366
425
|
.hv-button {
|
|
367
426
|
display: inline-flex;
|
|
368
427
|
gap: var(--hv-space, 8px);
|
|
@@ -441,25 +500,41 @@ var HoverlaCheckoutBundle=(function(e){Object.defineProperty(e,Symbol.toStringTa
|
|
|
441
500
|
border-radius: var(--hv-radius, 8px);
|
|
442
501
|
}
|
|
443
502
|
.hv-iban-row {
|
|
444
|
-
display:
|
|
445
|
-
|
|
503
|
+
display: block;
|
|
504
|
+
padding-block: calc(var(--hv-space, 8px) * 1.5);
|
|
505
|
+
border-bottom: 1px solid var(--hv-color-border, #80898f);
|
|
506
|
+
}
|
|
507
|
+
.hv-iban-row:last-child {
|
|
508
|
+
border-bottom: 0;
|
|
446
509
|
}
|
|
447
510
|
.hv-iban-row dt {
|
|
511
|
+
display: block;
|
|
512
|
+
margin: 0 0 calc(var(--hv-space, 8px) / 2);
|
|
448
513
|
color: var(--hv-color-muted, #505a63);
|
|
449
514
|
font-size: 0.875em;
|
|
450
515
|
}
|
|
451
516
|
.hv-iban-row dd {
|
|
452
|
-
display:
|
|
453
|
-
|
|
517
|
+
display: grid;
|
|
518
|
+
grid-template-columns: minmax(0, 1fr);
|
|
454
519
|
gap: var(--hv-space, 8px);
|
|
455
|
-
align-items: center;
|
|
456
520
|
margin: 0;
|
|
457
521
|
}
|
|
458
|
-
.hv-iban-
|
|
522
|
+
.hv-iban-text {
|
|
459
523
|
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
524
|
+
font-size: 0.9375em;
|
|
460
525
|
user-select: all;
|
|
461
526
|
overflow-wrap: anywhere;
|
|
462
527
|
}
|
|
528
|
+
.hv-iban-row .hv-copy-button {
|
|
529
|
+
width: 100%;
|
|
530
|
+
}
|
|
531
|
+
@container (min-width: 480px) {
|
|
532
|
+
.hv-iban-row .hv-copy-button {
|
|
533
|
+
width: auto;
|
|
534
|
+
min-width: 160px;
|
|
535
|
+
justify-self: start;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
463
538
|
.hv-copy-button {
|
|
464
539
|
min-height: max(44px, var(--hv-control-height, 44px));
|
|
465
540
|
padding: var(--hv-space, 8px) calc(var(--hv-space, 8px) * 1.5);
|
|
@@ -495,7 +570,7 @@ var HoverlaCheckoutBundle=(function(e){Object.defineProperty(e,Symbol.toStringTa
|
|
|
495
570
|
border: 0;
|
|
496
571
|
}
|
|
497
572
|
}
|
|
498
|
-
`;function n(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var r={},i=[],a=()=>{},o=()=>!1,s=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),c=e=>e.startsWith(`onUpdate:`),l=Object.assign,u=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},d=Object.prototype.hasOwnProperty,f=(e,t)=>d.call(e,t),p=Array.isArray,m=e=>S(e)===`[object Map]`,h=e=>S(e)===`[object Set]`,g=e=>S(e)===`[object Date]`,_=e=>typeof e==`function`,v=e=>typeof e==`string`,y=e=>typeof e==`symbol`,b=e=>typeof e==`object`&&!!e,x=e=>(b(e)||_(e))&&_(e.then)&&_(e.catch),ee=Object.prototype.toString,S=e=>ee.call(e),C=e=>S(e).slice(8,-1),te=e=>S(e)===`[object Object]`,ne=e=>v(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,re=n(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),ie=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ae=/-\w/g,w=ie(e=>e.replace(ae,e=>e.slice(1).toUpperCase())),oe=/\B([A-Z])/g,T=ie(e=>e.replace(oe,`-$1`).toLowerCase()),se=ie(e=>e.charAt(0).toUpperCase()+e.slice(1)),ce=ie(e=>e?`on${se(e)}`:``),le=(e,t)=>!Object.is(e,t),ue=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},de=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},fe=e=>{let t=parseFloat(e);return isNaN(t)?e:t},pe=e=>{let t=v(e)?Number(e):NaN;return isNaN(t)?e:t},me,he=()=>me||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ge(e){if(p(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=v(r)?be(r):ge(r);if(i)for(let e in i)t[e]=i[e]}return t}if(v(e)||b(e))return e}var _e=/;(?![^(]*\))/g,ve=/:([^]+)/,ye=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function be(e){let t={};return e.replace(ye,e=>e.startsWith(`/*`)?``:e).split(_e).forEach(e=>{if(e){let n=e.split(ve);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function xe(e){let t=``;if(v(e))t=e;else if(p(e))for(let n=0;n<e.length;n++){let r=xe(e[n]);r&&(t+=r+` `)}else if(b(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}var Se=n(`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`);function Ce(e){return!!e||e===``}function we(e,t,n){if(e.length!==t.length)return!1;let r=!0;for(let i=0;r&&i<e.length;i++)r=Oe(e[i],t[i],n);return r}function Te(e,t,n){if(e.size!==t.size)return!1;let r=Array.from(t),i=new Uint8Array(r.length);for(let t of e){let e=-1;for(let a=0;a<r.length;a++)if(!i[a]&&Oe(t,r[a],n)){e=a;break}if(e<0)return!1;i[e]=1}return!0}function Ee(e,t,n){let r=m(e),i=m(t);if(r||i||(r=h(e),i=h(t),r||i))return r&&i?Te(e,t,n):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e){let i=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(i&&!a||!i&&a||!Oe(e[r],t[r],n))return!1}return String(e)===String(t)}function De(e,t,n,r){n||=[new Map,new Map];let[i,a]=n;if(i.has(e)||a.has(t))return i.get(e)===t&&a.get(t)===e;i.set(e,t),a.set(t,e);let o=r(e,t,n);return i.delete(e),a.delete(t),o}function Oe(e,t,n){if(e===t)return!0;let r=g(e),i=g(t);return r||i?r&&i?e.getTime()===t.getTime():!1:(r=y(e),i=y(t),r||i?e===t:(r=p(e),i=p(t),r||i?r&&i?De(e,t,n,we):!1:(r=b(e),i=b(t),r||i?!r||!i?!1:De(e,t,n,Ee):String(e)===String(t))))}var E,ke=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&E&&(E.active?(this.parent=E,this.index=(E.scopes||(E.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}run(e){if(this._active){let t=E;try{return E=this,e()}finally{E=t}}}on(){++this._on===1&&(this.prevScope=E,E=this)}off(){if(this._on>0&&--this._on===0){if(E===this)E=this.prevScope;else{let e=E;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let e=this.scopes.slice();for(t=0,n=e.length;t<n;t++)e[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function Ae(){return E}function je(e,t=!1){E&&E.cleanups.push(e)}var D,Me=new WeakSet,Ne=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,E&&(E.active?E.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Me.has(this)&&(Me.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Le(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Xe(this),Be(this);let e=D,t=Ke;D=this,Ke=!0;try{return this.fn()}finally{Ve(this),D=e,Ke=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)We(e);this.deps=this.depsTail=void 0,Xe(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Me.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){He(this)&&this.run()}get dirty(){return He(this)}},Pe=0,Fe,Ie;function Le(e,t=!1){e.flags|=8,t?(e.next=Ie,Ie=e):(e.next=Fe,Fe=e)}function Re(){Pe++}function ze(){if(--Pe>0)return;if(Ie){let e=Ie;for(Ie=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Fe;){let t=Fe;for(Fe=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Be(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ve(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),We(r),Ge(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function He(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ue(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ue(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ze)||(e.globalVersion=Ze,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!He(e))))return;e.flags|=2;let t=e.dep,n=D,r=Ke;D=e,Ke=!0;try{Be(e);let n=e.fn(e._value);(t.version===0||le(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{D=n,Ke=r,Ve(e),e.flags&=-3}}function We(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)We(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ge(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Ke=!0,qe=[];function Je(){qe.push(Ke),Ke=!1}function Ye(){let e=qe.pop();Ke=e===void 0||e}function Xe(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=D;D=void 0;try{t()}finally{D=e}}}var Ze=0,Qe=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},$e=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!D||!Ke||D===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==D)t=this.activeLink=new Qe(D,this),D.deps?(t.prevDep=D.depsTail,D.depsTail.nextDep=t,D.depsTail=t):D.deps=D.depsTail=t,et(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=D.depsTail,t.nextDep=void 0,D.depsTail.nextDep=t,D.depsTail=t,D.deps===t&&(D.deps=e)}return t}trigger(e){this.version++,Ze++,this.notify(e)}notify(e){Re();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{ze()}}};function et(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)et(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var tt=new WeakMap,nt=Symbol(``),rt=Symbol(``),it=Symbol(``);function O(e,t,n){if(Ke&&D){let t=tt.get(e);t||tt.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new $e),r.map=t,r.key=n),r.track()}}function at(e,t,n,r,i,a){let o=tt.get(e);if(!o){Ze++;return}let s=e=>{e&&e.trigger()};if(Re(),t===`clear`)o.forEach(s);else{let i=p(e),a=i&&ne(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===it||!y(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(it)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(nt)),m(e)&&s(o.get(rt)));break;case`delete`:i||(s(o.get(nt)),m(e)&&s(o.get(rt)));break;case`set`:m(e)&&s(o.get(nt))}}ze()}function ot(e){let t=k(e);return t===e||(O(t,`iterate`,it),Yt(e))?t:Jt(e)?qt(e)?t.map(e=>$t(Qt(e))):t.map($t):t.map(Qt)}function st(e){return O(e=k(e),`iterate`,it),e}function ct(e,t){return Jt(e)?$t(qt(e)?Qt(t):t):Qt(t)}var lt={__proto__:null,[Symbol.iterator](){return ut(this,Symbol.iterator,e=>ct(this,e))},concat(...e){return ot(this).concat(...e.map(e=>p(e)?ot(e):e))},entries(){return ut(this,`entries`,e=>(e[1]=ct(this,e[1]),e))},every(e,t){return pt(this,`every`,e,t,void 0,arguments)},filter(e,t){return pt(this,`filter`,e,t,e=>e.map(e=>ct(this,e)),arguments)},find(e,t){return pt(this,`find`,e,t,e=>ct(this,e),arguments)},findIndex(e,t){return pt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return pt(this,`findLast`,e,t,e=>ct(this,e),arguments)},findLastIndex(e,t){return pt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return pt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ht(this,`includes`,e)},indexOf(...e){return ht(this,`indexOf`,e)},join(e){return ot(this).join(e)},lastIndexOf(...e){return ht(this,`lastIndexOf`,e)},map(e,t){return pt(this,`map`,e,t,void 0,arguments)},pop(){return gt(this,`pop`)},push(...e){return gt(this,`push`,e)},reduce(e,...t){return mt(this,`reduce`,e,t)},reduceRight(e,...t){return mt(this,`reduceRight`,e,t)},shift(){return gt(this,`shift`)},some(e,t){return pt(this,`some`,e,t,void 0,arguments)},splice(...e){return gt(this,`splice`,e)},toReversed(){return ot(this).toReversed()},toSorted(e){return ot(this).toSorted(e)},toSpliced(...e){return ot(this).toSpliced(...e)},unshift(...e){return gt(this,`unshift`,e)},values(){return ut(this,`values`,e=>ct(this,e))}};function ut(e,t,n){let r=st(e),i=r[t],a=i.call(r);if(r!==e&&!Yt(e)){if(a[Symbol.toStringTag]===`Array Iterator`){let e=Object.create(Object.getPrototypeOf(a));return e.next=()=>dt(a.next(),n),i!==ft[t]&&Object.defineProperties(e,{return:{get(){let e=a.return;return typeof e==`function`?e.bind(a):e}},throw:{get(){let e=a.throw;return typeof e==`function`?e.bind(a):e}}}),e}a._next=a.next,a.next=()=>dt(a._next(),n)}return a}function dt(e,t){return e.done||(e.value=t(e.value)),e}var ft=Array.prototype;function pt(e,t,n,r,i,a){let o=st(e),s=o!==e&&!Yt(e),c=o[t];if(c!==ft[t]){let t=c.apply(e,a);return s?Qt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,ct(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function mt(e,t,n,r){let i=st(e),a=i!==e&&!Yt(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=ct(e,t)),n.call(this,t,ct(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?ct(e,c):c}function ht(e,t,n){let r=k(e);O(r,`iterate`,it);let i=r[t](...n);return(i===-1||i===!1)&&Xt(n[0])?(n[0]=k(n[0]),r[t](...n)):i}function gt(e,t,n=[]){Je(),Re();let r=k(e)[t].apply(e,n);return ze(),Ye(),r}var _t=n(`__proto__,__v_isRef,__isVue`),vt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(y));function yt(e){y(e)||(e=String(e));let t=k(this);return O(t,`has`,e),t.hasOwnProperty(e)}var bt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Bt:zt:i?Rt:Lt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=p(e);if(!r){let e;if(a&&(e=lt[t]))return e;if(t===`hasOwnProperty`)return yt}let o=Reflect.get(e,t,A(e)?e:n);if((y(t)?vt.has(t):_t(t))||(r||O(e,`get`,t),i))return o;if(A(o)){let e=a&&ne(t)?o:o.value;return r&&b(e)?Wt(e):e}return b(o)?r?Wt(o):Ht(o):o}},xt=class extends bt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=p(e)&&ne(t);if(!this._isShallow){let e=Jt(i);if(!Yt(n)&&!Jt(n)&&(i=k(i),n=k(n)),!a&&A(i)&&!A(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:f(e,t),s=Reflect.set(e,t,n,A(e)?e:r);return e===k(r)&&s&&(o?le(n,i)&&at(e,`set`,t,n,i):at(e,`add`,t,n)),s}deleteProperty(e,t){let n=f(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&at(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return y(t)&&vt.has(t)||O(e,`has`,t),n}ownKeys(e){return O(e,`iterate`,p(e)?`length`:nt),Reflect.ownKeys(e)}},St=class extends bt{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},Ct=new xt,wt=new St,Tt=new xt(!0),Et=new St(!0),Dt=e=>e,Ot=e=>Reflect.getPrototypeOf(e);function kt(e,t,n){return function(...r){let i=this.__v_raw,a=k(i),o=m(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,u=i[e](...r),d=n?Dt:t?$t:Qt;return!t&&O(a,`iterate`,c?rt:nt),l(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:s?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function At(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function jt(e,t){let n={get(n){let r=this.__v_raw,i=k(r),a=k(n);e||(le(n,a)&&O(i,`get`,n),O(i,`get`,a));let{has:o}=Ot(i),s=t?Dt:e?$t:Qt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&O(k(t),`iterate`,nt),t.size},has(t){let n=this.__v_raw,r=k(n),i=k(t);return e||(le(t,i)&&O(r,`has`,t),O(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=k(a),s=t?Dt:e?$t:Qt;return!e&&O(o,`iterate`,nt),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return l(n,e?{add:At(`add`),set:At(`set`),delete:At(`delete`),clear:At(`clear`)}:{add(e){let n=k(this),r=Ot(n),i=k(e),a=!t&&!Yt(e)&&!Jt(e)?i:e;return r.has.call(n,a)||le(e,a)&&r.has.call(n,e)||le(i,a)&&r.has.call(n,i)||(n.add(a),at(n,`add`,a,a)),this},set(e,n){t||Yt(n)||Jt(n)||(n=k(n));let r=k(this),{has:i,get:a}=Ot(r),o=i.call(r,e);o||=(e=k(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?le(n,s)&&at(r,`set`,e,n,s):at(r,`add`,e,n),this},delete(e){let t=k(this),{has:n,get:r}=Ot(t),i=n.call(t,e);i||=(e=k(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&at(t,`delete`,e,void 0,a),o},clear(){let e=k(this),t=e.size!==0,n=e.clear();return t&&at(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=kt(r,e,t)}),n}function Mt(e,t){let n=jt(e,t);return(r,i,a)=>i===`__v_isReactive`?!e:i===`__v_isReadonly`?e:i===`__v_isShallow`?t:i===`__v_raw`?r:Reflect.get(f(n,i)&&i in r?n:r,i,a)}var Nt={get:Mt(!1,!1)},Pt={get:Mt(!1,!0)},Ft={get:Mt(!0,!1)},It={get:Mt(!0,!0)},Lt=new WeakMap,Rt=new WeakMap,zt=new WeakMap,Bt=new WeakMap;function Vt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Ht(e){return Jt(e)?e:Kt(e,!1,Ct,Nt,Lt)}function Ut(e){return Kt(e,!1,Tt,Pt,Rt)}function Wt(e){return Kt(e,!0,wt,Ft,zt)}function Gt(e){return Kt(e,!0,Et,It,Bt)}function Kt(e,t,n,r,i){if(!b(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Vt(C(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function qt(e){return Jt(e)?qt(e.__v_raw):!!(e&&e.__v_isReactive)}function Jt(e){return!!(e&&e.__v_isReadonly)}function Yt(e){return!!(e&&e.__v_isShallow)}function Xt(e){return e?!!e.__v_raw:!1}function k(e){let t=e&&e.__v_raw;return t?k(t):e}function Zt(e){return!f(e,`__v_skip`)&&Object.isExtensible(e)&&de(e,`__v_skip`,!0),e}var Qt=e=>b(e)?Ht(e):e,$t=e=>b(e)?Wt(e):e;function A(e){return e?e.__v_isRef===!0:!1}function j(e){return tn(e,!1)}function en(e){return tn(e,!0)}function tn(e,t){return A(e)?e:new nn(e,t)}var nn=class{constructor(e,t){this.dep=new $e,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:k(e),this._value=t?e:Qt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Yt(e)||Jt(e);e=n?e:k(e),le(e,t)&&(this._rawValue=e,this._value=n?e:Qt(e),this.dep.trigger())}};function rn(e){return A(e)?e.value:e}function an(e){return _(e)?e():rn(e)}var on={get:(e,t,n)=>t===`__v_raw`?e:rn(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return A(i)&&!A(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function sn(e){return qt(e)?e:new Proxy(e,on)}var cn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new $e(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ze-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&D!==this)return Le(this,!0),!0}get value(){let e=this.dep.track();return Ue(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function ln(e,t,n=!1){let r,i;return _(e)?r=e:(r=e.get,i=e.set),new cn(r,i,n)}var un={},dn=new WeakMap,fn=void 0;function pn(e,t=!1,n=fn){if(n){let t=dn.get(n);t||dn.set(n,t=[]),t.push(e)}}function mn(e,t,n=r){let{immediate:i,deep:o,once:s,scheduler:c,augmentJob:l,call:d}=n,f=e=>o?e:Yt(e)||o===!1||o===0?hn(e,1):hn(e),m,h,g,v,y=!1,b=!1;if(A(e)?(h=()=>e.value,y=Yt(e)):qt(e)?(h=()=>f(e),y=!0):p(e)?(b=!0,y=e.some(e=>qt(e)||Yt(e)),h=()=>e.map(e=>{if(A(e))return e.value;if(qt(e))return f(e);if(_(e))return d?d(e,2):e()})):h=_(e)?t?d?()=>d(e,2):e:()=>{if(g){Je();try{g()}finally{Ye()}}let t=fn;fn=m;try{return d?d(e,3,[v]):e(v)}finally{fn=t}}:a,t&&o){let e=h,t=o===!0?1/0:o;h=()=>hn(e(),t)}let x=Ae(),ee=()=>{m.stop(),x&&x.active&&u(x.effects,m)};if(s&&t){let e=t;t=(...t)=>{try{return e(...t)}finally{ee()}}}let S=b?Array(e.length).fill(un):un,C=e=>{if(m.flags&1&&(m.dirty||e)){if(t){let n=m.run();if(e||o||y||(b?n.some((e,t)=>le(e,S[t])):le(n,S))){let e=fn;Je();try{g&&g(),fn=m;let e=[n,S===un?void 0:b&&S[0]===un?[]:S,v];S=n,d?d(t,3,e):t(...e)}finally{fn=e,Ye()}}}else m.run()}};return l&&l(C),m=new Ne(h),m.scheduler=c?()=>c(C,!1):C,v=e=>pn(e,!1,m),g=m.onStop=()=>{let e=dn.get(m);if(e){if(d)d(e,4);else for(let t of e)t();dn.delete(m)}},t?i?C(!0):S=m.run():c?c(C.bind(null,!0),!0):m.run(),ee.pause=m.pause.bind(m),ee.resume=m.resume.bind(m),ee.stop=ee,ee}function hn(e,t=1/0,n){if(t<=0||!b(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,A(e))hn(e.value,t,n);else if(p(e))for(let r=0;r<e.length;r++)hn(e[r],t,n);else if(h(e)||m(e))e.forEach(e=>{hn(e,t,n)});else if(te(e)){for(let r in e)hn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&hn(e[r],t,n)}return e}function gn(e,t,n,r){try{return r?e(...r):e()}catch(e){vn(e,t,n)}}function _n(e,t,n,r){if(_(e)){let i=gn(e,t,n,r);return i&&x(i)&&i.catch(e=>{vn(e,t,n)}),i}if(p(e)){let i=[];for(let a=0;a<e.length;a++)i.push(_n(e[a],t,n,r));return i}}function vn(e,t,n,i=!0){let a=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||r;if(t){let r=t.parent,i=t.proxy,a=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(t[n](e,i,a)===!1)return}r=r.parent}if(o){Je(),gn(o,null,10,[e,i,a]),Ye();return}}yn(e,n,a,i,s)}function yn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var M=[],bn=-1,xn=[],Sn=null,Cn=0,wn=Promise.resolve(),Tn=null;function En(e){let t=Tn||wn;return e?t.then(this?e.bind(this):e):t}function Dn(e){let t=bn+1,n=M.length;for(;t<n;){let r=t+n>>>1,i=M[r],a=Fn(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function On(e){if(!(e.flags&1)){let t=Fn(e),n=M[M.length-1];!n||!(e.flags&2)&&t>=Fn(n)?M.push(e):M.splice(Dn(t),0,e),e.flags|=1,kn()}}function kn(){Tn||=wn.then(In)}function An(e){if(!p(e))Sn&&e.id===-1?Sn.splice(Cn+1,0,e):e.flags&1||(xn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)xn.push(e[t]);kn()}function jn(e,t,n,r=bn+1){for(;r<M.length;r++){let n=M[r];if(n&&n.flags&2){if(e&&n.id!==e.uid||t!==void 0&&!(n.id>=t))continue;M.splice(r,1),r=e?r-1:bn,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Mn(e,t,n=0){if(xn.length){let e=xn,r=0;if(t){e=[];for(let i=0;i<xn.length;i++){let a=xn[i];(a.i===void 0?t.has(a):!a.i||a.i.uid<n)?xn[r++]=a:e.push(a)}}let i=[...new Set(e)].sort((e,t)=>Fn(e)-Fn(t));if(xn.length=r,Sn){for(let e=0;e<i.length;e++)Sn.push(i[e]);return}for(Sn=i,Cn=0;Cn<Sn.length;Cn++){let e=Sn[Cn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}Sn=null,Cn=0}}var Nn=!1;function Pn(e,t){if(Nn){e();return}let n=t===void 0?void 0:new Set(xn);e(),Nn=!0;try{jn(void 0,t),Mn(void 0,n,t)}finally{Nn=!1}}var Fn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function In(e){try{for(bn=0;bn<M.length;bn++){let e=M[bn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),gn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;bn<M.length;bn++){let e=M[bn];e&&(e.flags&=-2)}bn=-1,M.length=0,Mn(e),Tn=null,(M.length||xn.length)&&In(e)}}var Ln=null,Rn=null;function zn(e){let t=Ln;return Ln=e,Rn=e&&e.type.__scopeId||null,t}function Bn(e,t=Ln,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&hi(-1);let i=zn(t),a=di.length,o;try{o=e(...n)}finally{for(let e=di.length;e>a;e--)pi();zn(i),r._d&&hi(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Vn(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o<i.length;o++){let s=i[o];a&&(s.oldValue=a[o].value);let c=s.dir[r];c&&(Je(),_n(c,n,8,[e.el,s,e,t]),Ye())}}function Hn(e,t){if(L){let n=L.provides,r=L.parent&&L.parent.provides;r===n&&(n=L.provides=Object.create(r)),n[e]=t}}function Un(e,t,n=!1){let r=Pi();if(r||br){let i=br?br._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&_(t)?t.call(r&&r.proxy):t}}var Wn=Symbol.for(`v-scx`),Gn=()=>Un(Wn);function Kn(e,t,n){return qn(e,t,n)}function qn(e,t,n=r){let{immediate:i,deep:o,flush:s,once:c}=n,u=l({},n),d=t&&i||!t&&s!==`post`,f;if(Bi){if(s===`sync`){let e=Gn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=a,e.resume=a,e.pause=a,e}}let p=L;u.call=(e,t,n)=>_n(e,p,t,n);let m=!1;s===`post`?u.scheduler=e=>{e.i=p,P(e,p&&p.suspense)}:s!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():On(e)}),u.augmentJob=e=>{t&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=mn(e,t,u);return Bi&&(f?f.push(h):d&&h()),h}var Jn=Symbol(`_vte`),Yn=e=>e.__isTeleport,Xn=Symbol(`_leaveCb`);function Zn(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==li){t=n;break}}return t}function Qn(e){if(!sr(e))return Yn(e.type)&&e.children?Zn(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&_(n.default))return n.default()}}function $n(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;$n(Yn(n.type)&&Qn(n)||n,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===F&&p(e.children)){let n=Er(e.children,!1);n&&$n(n,t)}}function er(e){if(e.component)return er(e.component.subTree);if(e.type===F){let t=p(e.children)&&Er(e.children,!1);return t?er(t):void 0}if(e.type!==li)return e}function N(e,t){return _(e)?l({name:e.name},t,{setup:e}):e}function tr(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function nr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var rr=new WeakMap;function ir(e,t,n,i,a=!1){if(p(e)){e.forEach((e,r)=>ir(e,t&&(p(t)?t[r]:t),n,i,a));return}if(or(i)&&!a){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&ir(e,t,n,i.component.subTree);return}let s=i.shapeFlag&4?Yi(i.component):i.el,c=a?null:s,{i:l,r:d}=e,m=t&&t.r,h=l.refs===r?l.refs={}:l.refs,g=l.setupState,y=k(g),b=g===r?o:e=>!nr(h,e)&&f(y,e),x=(e,t)=>!(t&&nr(h,t));if(m!=null&&m!==d){if(ar(t),v(m))h[m]=null,b(m)&&(g[m]=null);else if(A(m)){let e=t;x(m,e.k)&&(m.value=null),e.k&&(h[e.k]=null)}}if(_(d))gn(d,l,12,[c,h]);else{let t=v(d),r=A(d);if(t||r){let i=()=>{if(e.f){let n=t?b(d)?g[d]:h[d]:x(d)||!e.k?d.value:h[e.k];if(a)p(n)&&u(n,s);else if(p(n))n.includes(s)||n.push(s);else if(t)h[d]=[s],b(d)&&(g[d]=h[d]);else{let t=[s];x(d,e.k)&&(d.value=t),e.k&&(h[e.k]=t)}}else t?(h[d]=c,b(d)&&(g[d]=c)):r&&(x(d,e.k)&&(d.value=c),e.k&&(h[e.k]=c))};if(c){let t=()=>{i(),rr.delete(e)};t.id=-1,rr.set(e,t),P(t,n)}else ar(e),i()}}}function ar(e){let t=rr.get(e);t&&(t.flags|=8,rr.delete(e))}he().requestIdleCallback,he().cancelIdleCallback;var or=e=>!!e.type.__asyncLoader,sr=e=>e.type.__isKeepAlive;function cr(e,t,n=L,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Je();let i=Li(n),a=_n(t,n,e,r);return i(),Ye(),a};return r?i.unshift(a):i.push(a),a}}var lr=e=>(t,n=L)=>{Bi&&e!==`sp`||cr(e,(...e)=>t(...e),n)},ur=lr(`m`),dr=lr(`bum`),fr=Symbol.for(`v-ndc`),pr=e=>e?zi(e)?Yi(e):pr(e.parent):null,mr=l(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>pr(e.parent),$root:e=>pr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>e.type,$forceUpdate:e=>e.f||=()=>{On(e.update)},$nextTick:e=>e.n||=En.bind(e.proxy),$watch:e=>a}),hr=(e,t)=>e!==r&&!e.__isScriptSetup&&f(e,t),gr={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(t[0]!==`$`){let e=s[t];if(e!==void 0)switch(e){case 1:return i[t];case 2:return a[t];case 4:return n[t];case 3:return o[t]}else if(hr(i,t))return s[t]=1,i[t];else if(f(o,t))return s[t]=3,o[t];else if(n!==r&&f(n,t))return s[t]=4,n[t];else s[t]=0}let u=mr[t],d,p;if(u)return t===`$attrs`&&O(e.attrs,`get`,``),u(e);if((d=c.__cssModules)&&(d=d[t]))return d;if(n!==r&&f(n,t))return s[t]=4,n[t];if(p=l.config.globalProperties,f(p,t))return p[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return hr(i,t)?(i[t]=n,!0):f(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,props:a,type:o}},s){let c;return!!(n[s]||hr(t,s)||f(a,s)||f(r,s)||f(mr,s)||f(i.config.globalProperties,s)||(c=o.__cssModules)&&c[s])},defineProperty(e,t,n){return n.get==null?f(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function _r(){return{app:null,config:{isNativeTag:o,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var vr=0;function yr(e,t){return function(n,r=null){_(n)||(n=l({},n)),r!=null&&!b(r)&&(r=null);let i=_r(),a=new WeakSet,o=[],s=!1,c=i.app={_uid:vr++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:Zi,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&_(e.install)?(a.add(e),e.install(c,...t)):_(e)&&(a.add(e),e(c,...t))),c},mixin(e){return c},component(e,t){return t?(i.components[e]=t,c):i.components[e]},directive(e,t){return t?(i.directives[e]=t,c):i.directives[e]},mount(a,o,l){if(!s){let u=c._ceVNode||I(n,r);return u.appContext=i,l===!0?l=`svg`:l===!1&&(l=void 0),o&&t?t(u,a):e(u,a,l),s=!0,c._container=a,a.__vue_app__=c,Yi(u.component)}},onUnmount(e){o.push(e)},unmount(){s&&(_n(o,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(e,t){return i.provides[e]=t,c},runWithContext(e){let t=br;br=c;try{return e()}finally{br=t}}};return c}}var br=null,xr=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${w(t)}Modifiers`]||e[`${T(t)}Modifiers`];function Sr(e,t,...n){if(e.isUnmounted)return;let i=e.vnode.props||r,a=n,o=t.startsWith(`update:`),s=o&&xr(i,t.slice(7));s&&(s.trim&&(a=n.map(e=>v(e)?e.trim():e)),s.number&&(a=a.map(fe)));let c,l=i[c=ce(t)]||i[c=ce(w(t))];!l&&o&&(l=i[c=ce(T(t))]),l&&_n(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,_n(u,e,6,a)}}function Cr(e,t,n=!1){let r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={};return a?(p(a)?a.forEach(e=>o[e]=null):l(o,a),b(e)&&r.set(e,o),o):(b(e)&&r.set(e,null),null)}function wr(e,t){return!e||!s(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),f(e,t[0].toLowerCase()+t.slice(1))||f(e,T(t))||f(e,t))}function Tr(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=zn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Ti(u.call(t,e,d,f,m,p,h)),y=s}else{let e=t;v=Ti(e.length>1?e(f,{attrs:s,slots:o,emit:l}):e(f,null)),y=t.props?s:Dr(s)}}catch(t){di.length=0,vn(t,e,1),v=I(li)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(c)&&(y=Or(y,a)),b=Ci(b,y,!1,!0))}return n.dirs&&(b=Ci(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&$n(Yn(b.type)&&Qn(b)||b,n.transition),v=b,zn(_),v}function Er(e,t=!0){let n;for(let t=0;t<e.length;t++){let r=e[t];if(gi(r)){if(r.type!==li||r.children===`v-if`){if(n)return;n=r}}else return}return n}var Dr=e=>{let t;for(let n in e)(n===`class`||n===`style`||s(n))&&((t||={})[n]=e[n]);return t},Or=(e,t)=>{let n={};for(let r in e)c(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function kr(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Ar(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(jr(o,r,n)&&!wr(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?!o||Ar(r,o,l):!!o;return!1}function Ar(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(!f(e,a)||jr(t,e,a)&&!wr(n,a))return!0}return!1}function jr(e,t,n){let r=e[n],i=t[n];return n===`style`&&b(r)&&b(i)?!Oe(r,i):r!==i}function Mr({vnode:e,parent:t,suspense:n},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}var Nr={},Pr=()=>Object.create(Nr),Fr=e=>Object.getPrototypeOf(e)===Nr;function Ir(e,t,n,r=!1){let i={},a=Pr();e.propsDefaults=Object.create(null),Rr(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:Ut(i):e.type.props?i:a,e.attrs=a}function Lr(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=k(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(wr(e.emitsOptions,o))continue;let u=t[o];if(c){if(f(a,o))u!==a[o]&&(a[o]=u,l=!0);else{let t=w(o);i[t]=zr(c,s,t,u,e,!1)}}else u!==a[o]&&(a[o]=u,l=!0)}}}else{Rr(e,t,i,a)&&(l=!0);let r;for(let a in s)t&&(f(t,a)||(r=T(a))!==a&&f(t,r))||(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=zr(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)t&&f(t,e)||(delete a[e],l=!0)}l&&at(e.attrs,`set`,``)}function Rr(e,t,n,i){let[a,o]=e.propsOptions,s=!1,c;if(t)for(let r in t){if(re(r))continue;let l=t[r],u;a&&f(a,u=w(r))?!o||!o.includes(u)?n[u]=l:(c||={})[u]=l:wr(e.emitsOptions,r)||r in i&&l===i[r]||(i[r]=l,s=!0)}if(o){let t=k(n),i=c||r;for(let r=0;r<o.length;r++){let s=o[r];n[s]=zr(a,t,s,i[s],e,!f(i,s))}}return s}function zr(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=f(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&_(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=Li(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===T(n))&&(r=!0))}return r}function Br(e,t,n=!1){let a=t.propsCache,o=a.get(e);if(o)return o;let s=e.props,c={},u=[];if(!s)return b(e)&&a.set(e,i),i;if(p(s))for(let e=0;e<s.length;e++){let t=w(s[e]);Vr(t)&&(c[t]=r)}else if(s)for(let e in s){let t=w(e);if(Vr(t)){let n=s[e],r=c[t]=p(n)||_(n)?{type:n}:l({},n),i=r.type,a=!1,o=!0;if(p(i))for(let e=0;e<i.length;++e){let t=i[e],n=_(t)&&t.name;if(n===`Boolean`){a=!0;break}n===`String`&&(o=!1)}else a=_(i)&&i.name===`Boolean`;r[0]=a,r[1]=o,(a||f(r,`default`))&&u.push(t)}}let d=[c,u];return b(e)&&a.set(e,d),d}function Vr(e){return e[0]!==`$`&&!re(e)}var Hr=e=>e===`_`||e===`_ctx`||e===`$stable`,Ur=e=>p(e)?e.map(Ti):[Ti(e)],Wr=(e,t,n)=>{if(t._n)return t;let r=Bn((...e)=>Ur(t(...e)),n);return r._c=!1,r},Gr=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Hr(n))continue;let i=e[n];if(_(i))t[n]=Wr(n,i,r);else if(i!=null){let e=Ur(i);t[n]=()=>e}}},Kr=(e,t)=>{let n=Ur(t);e.slots.default=()=>n},qr=(e,t,n)=>{for(let r in t)(n||!Hr(r))&&(e[r]=t[r])},Jr=(e,t,n)=>{let r=e.slots=Pr();if(e.vnode.shapeFlag&32){let e=t._;e?(qr(r,t,n),n&&de(r,`_`,e,!0)):Gr(t,r)}else t&&Kr(e,t)},Yr=(e,t,n)=>{let{vnode:i,slots:a}=e,o=!0,s=r;if(i.shapeFlag&32){let e=t._;e?n&&e===1?o=!1:qr(a,t,n):(o=!t.$stable,Gr(t,a)),s=t}else t&&(Kr(e,t),s={default:1});if(o)for(let e in a)!Hr(e)&&s[e]==null&&delete a[e]},P=si;function Xr(e){return Zr(e)}function Zr(e,t){let n=he();n.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=a,insertStaticContent:_}=e,v=(e,t,n,r=null,a=null,o=null,s=void 0,c=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!_i(e,t)&&(r=Ce(e),ve(e,a,o,!0),e=null),t.patchFlag===-2&&(l=!1,t.dynamicChildren=null),t.dynamicChildren&&e&&e.dynamicChildren&&e.dynamicChildren.hasOnce&&(t.dynamicChildren===i&&(t.dynamicChildren=[]),t.dynamicChildren.hasOnce=!0);let{type:u,ref:d,shapeFlag:f}=t;switch(u){case ci:y(e,t,n,r);break;case li:b(e,t,n,r);break;case ui:e??x(t,n,r,s);break;case F:T(e,t,n,r,a,o,s,c,l);break;default:f&1?C(e,t,n,r,a,o,s,c,l):f&6?se(e,t,n,r,a,o,s,c,l):(f&64||f&128)&&u.process(e,t,n,r,a,o,s,c,l,Te)}d!=null&&a?ir(d,e&&e.ref,o,t||e,!t):d==null&&e&&e.ref!=null&&ir(e.ref,null,o,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},ee=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},S=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},C=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)te(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),ae(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},te=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&ie(e.children,d,null,r,i,Qr(e,a),s,u),_&&Vn(e,null,r,`created`),ne(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!re(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&ki(f,r,e)}_&&Vn(e,null,r,`beforeMount`);let v=ei(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&P(()=>{try{f&&ki(f,r,e),v&&g.enter(d),_&&Vn(e,null,r,`mounted`)}finally{}},i)},ne=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||oi(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;ne(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},ie=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++){let c=e[l]=s?Ei(e[l]):Ti(e[l]);v(null,c,t,n,r,i,a,o,s)}},ae=(e,t,n,i,a,o,s)=>{let l=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=e.patchFlag&16;let m=e.props||r,h=t.props||r,g;if(n&&$r(n,!1),(g=h.onVnodeBeforeUpdate)&&ki(g,n,t,e),f&&Vn(t,e,n,`beforeUpdate`),n&&$r(n,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(u=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?w(e.dynamicChildren,d,l,n,i,Qr(t,a),o):s||pe(e,t,l,null,n,i,Qr(t,a),o,!1),u>0){if(u&16)oe(l,m,h,n,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let r=e[t],i=m[r],o=h[r];(o!==i||r===`value`)&&c(l,r,i,o,a,n)}}u&1&&e.children!==t.children&&p(l,t.children)}else!s&&d==null&&oe(l,m,h,n,a);((g=h.onVnodeUpdated)||f)&&P(()=>{g&&ki(g,n,t,e),f&&Vn(t,e,n,`updated`)},i)},w=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s],u=c.el||ai(c),d=u&&(c.type===F||!_i(c,l)||c.shapeFlag&198)?m(u):n;v(c,l,d,null,r,i,a,o,!0)}},oe=(e,t,n,i,a)=>{if(t!==n){if(t!==r)for(let r in t)!re(r)&&!(r in n)&&c(e,r,t[r],null,a,i);for(let r in n){if(re(r))continue;let o=n[r],s=t[r];o!==s&&r!==`value`&&c(e,r,s,o,a,i)}`value`in n&&c(e,`value`,t.value,n.value,a)}},T=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),ie(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(w(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&ti(e,t,!0)):pe(e,t,n,f,i,a,s,c,l)},se=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):ce(t,n,r,i,a,o,c):le(e,t,c)},ce=(e,t,n,r,i,a,o)=>{let s=e.component=Ni(e,r,i);if(sr(e)&&(s.ctx.renderer=Te),Vi(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,de,o,a),!e.el){let r=s.subTree=I(li);b(null,r,t,n),e.placeholder=r.el}}else de(s,e,t,n,i,a,o)},le=(e,t,n)=>{let r=t.component=e.component;if(kr(e,t,n)){if(r.asyncDep&&!r.asyncResolved){t.el=e.el,t.placeholder=e.placeholder,fe(r,t,n);return}r.next=t,r.update()}else t.el=e.el,t.placeholder=e.placeholder,r.vnode=t},de=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=ri(e);if(n){t&&(t.el=c.el,fe(e,t,o)),n.asyncDep.then(()=>{P(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;$r(e,!1),t?(t.el=c.el,fe(e,t,o)):t=c,n&&ue(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&ki(d,s,t,c),$r(e,!0);let f=Tr(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),Ce(p),e,i,a),t.el=f.el,u===null&&Mr(e,f.el),r&&P(r,i),(d=t.props&&t.props.onVnodeUpdated)&&P(()=>ki(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=or(t);if($r(e,!1),l&&ue(l),!m&&(o=c&&c.onVnodeBeforeMount)&&ki(o,d,t),$r(e,!0),s&&De){let t=()=>{e.subTree=Tr(e),De(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=Tr(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&P(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;P(()=>ki(o,d,e),i)}(t.shapeFlag&256||d&&or(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&P(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Ne(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>On(u),$r(e,!0),l()},fe=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,Lr(e,t.props,r,n),Yr(e,t.children,n),Je(),jn(e),Ye()},pe=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){ge(l,d,n,r,i,a,o,s,c);return}if(f&256){me(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&Se(l,i,a),d!==l&&p(n,d)):u&16?m&16?ge(l,d,n,r,i,a,o,s,c):Se(l,i,a,!0):(u&8&&p(n,``),m&16&&ie(d,n,r,i,a,o,s,c))},me=(e,t,n,r,a,o,s,c,l)=>{e||=i,t||=i;let u=e.length,d=t.length,f=Math.min(u,d),p=0;for(;p<f;p++){let r=t[p]=l?Ei(t[p]):Ti(t[p]);v(e[p],r,n,null,a,o,s,c,l)}u>d?Se(e,a,o,!0,!1,f):ie(t,n,r,a,o,s,c,l,f)},ge=(e,t,n,r,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let r=e[u],i=t[u]=l?Ei(t[u]):Ti(t[u]);if(_i(r,i))v(r,i,n,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let r=e[f],i=t[p]=l?Ei(t[p]):Ti(t[p]);if(_i(r,i))v(r,i,n,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,i=e<d?t[e].el:r;for(;u<=p;)v(null,t[u]=l?Ei(t[u]):Ti(t[u]),n,i,a,o,s,c,l),u++}}else if(u>p)for(;u<=f;)ve(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?Ei(t[u]):Ti(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,ee=0,S=Array(b);for(u=0;u<b;u++)S[u]=0;for(u=m;u<=f;u++){let r=e[u];if(y>=b){ve(r,a,o,!0);continue}let i;if(r.key!=null)i=g.get(r.key);else for(_=h;_<=p;_++)if(S[_-h]===0&&_i(r,t[_])){i=_;break}i===void 0?ve(r,a,o,!0):(S[i-h]=u+1,i>=ee?ee=i:x=!0,v(r,t[i],n,null,a,o,s,c,l),y++)}let C=x?ni(S):i;for(_=C.length-1,u=b-1;u>=0;u--){let e=h+u,i=t[e],f=t[e+1],p=e+1<d?f.el||ai(f):r;S[u]===0?v(null,i,n,p,a,o,s,c,l):x&&(_<0||u!==C[_]?_e(i,n,p,2):_--)}}},_e=(e,t,n,r,i=null)=>{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6)_e(e.component.subTree,t,n,r);else if(d&128)e.suspense.move(t,n,r);else if(d&64)c.move(e,t,n,Te);else if(c===F){o(a,t,n);for(let e=0;e<u.length;e++)_e(u[e],t,n,r);o(e.anchor,t,n)}else if(c===ui)ee(e,t,n);else if(r!==2&&d&1&&l){if(r===0)l.persisted&&!a[Xn]?o(a,t,n):(l.beforeEnter(a),o(a,t,n),P(()=>l.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[Xn];a._isLeaving&&a[Xn](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}}else o(a,t,n)},ve=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if((d===-2||l&&l.hasOnce)&&(i=!1),s!=null&&(Je(),ir(s,null,n,e,!0),Ye()),p==null||e.ctx&&e.ctx!==t||(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!or(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&ki(_,t,e),u&6)xe(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Vn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,Te,r):l&&!l.hasOnce&&(a!==F||d>0&&d&64)?Se(l,t,n,!1,!0):(a===F&&d&384||!i&&u&16)&&Se(c,t,n),r&&ye(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&P(()=>{_&&ki(_,t,e),h&&Vn(e,null,t,`unmounted`),v&&(e.el=null)},n)},ye=e=>{let{type:t,el:n,anchor:r,transition:i}=e,a=t===F;if(a&&!i){be(n,r);return}if(t===ui){S(e),i&&!i.persisted&&i.afterLeave&&i.afterLeave();return}let o=a?er(e):e,c=()=>{a?m(n)&&be(n,r):s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(o&&o.shapeFlag&1&&i&&!i.persisted){let{leave:e,delayLeave:t}=i,n=o.el,r=()=>e(n,c);t?t(n,c,r):r()}else c()},be=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},xe=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;ii(c),ii(l),r&&ue(r),i.stop(),a?(a.flags|=8,ve(o,e,t,n)):e.vnode.el&&o&&(o.transition=e.vnode.transition,ve(o,e,t,n)),s&&P(s,t),P(()=>{e.isUnmounted=!0},t)},Se=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)ve(e[o],t,n,r,i)},Ce=e=>{if(e.shapeFlag&6)return Ce(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Jn];return n?h(n):t},we=(e,t,n)=>{Pn(()=>{e==null?t._vnode&&ve(t._vnode,null,null,!0):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e},e&&t._vnode?void 0:e&&e.component?e.component.uid:Mi())},Te={p:v,um:ve,m:_e,r:ye,mt:ce,mc:ie,pc:pe,pbc:w,n:Ce,o:e},Ee,De;return t&&([Ee,De]=t(Te)),{render:we,hydrate:Ee,createApp:yr(we,Ee)}}function Qr({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function $r({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ei(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ti(e,t,n=!1){let r=e.children,i=t.children;if(p(r)&&p(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=Ei(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&ti(t,a)),a.type===ci&&(a.patchFlag===-1&&(a=i[e]=Ei(a)),a.el=t.el),a.type===li&&!a.el&&(a.el=t.el)}}function ni(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function ri(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ri(t)}function ii(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ai(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?ai(t.subTree):null}var oi=e=>e.__isSuspense;function si(e,t){t&&t.pendingBranch?p(e)?t.effects.push(...e):t.effects.push(e):An(e)}var F=Symbol.for(`v-fgt`),ci=Symbol.for(`v-txt`),li=Symbol.for(`v-cmt`),ui=Symbol.for(`v-stc`),di=[],fi=null;function pi(){di.pop(),fi=di[di.length-1]||null}var mi=1;function hi(e,t=!1){mi+=e,e<0&&fi&&t&&(fi.hasOnce=!0)}function gi(e){return e?e.__v_isVNode===!0:!1}function _i(e,t){return e.type===t.type&&e.key===t.key}var vi=({key:e})=>e??null,yi=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:v(e)||A(e)||_(e)?{i:Ln,r:e,k:t,f:!!n}:e);function bi(e,t=null,n=null,r=0,i=null,a=e===F?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&vi(t),ref:t&&yi(t),scopeId:Rn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Ln};return s?(Di(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=v(n)?8:16),mi>0&&!o&&fi&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&fi.push(c),c}var I=xi;function xi(e,t=null,n=null,r=0,i=null,a=!1){if(e&&e!==fr||(e=li),gi(e)){let r=Ci(e,t,!0);return n&&Di(r,n),mi>0&&!a&&fi&&(r.shapeFlag&6?fi[fi.indexOf(e)]=r:fi.push(r)),r.patchFlag=-2,r}if(Xi(e)&&(e=e.__vccOpts),t){t=Si(t);let{class:e,style:n}=t;e&&!v(e)&&(t.class=xe(e)),b(n)&&(Xt(n)&&!p(n)&&(n=l({},n)),t.style=ge(n))}let o=v(e)?1:oi(e)?128:Yn(e)?64:b(e)?4:_(e)?2:0;return bi(e,t,n,r,i,o,a,!0)}function Si(e){return e?Xt(e)||Fr(e)?l({},e):e:null}function Ci(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?Oi(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&vi(l),ref:t&&t.ref?n&&a?p(a)?a.concat(yi(t)):[a,yi(t)]:yi(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==F?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ci(e.ssContent),ssFallback:e.ssFallback&&Ci(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&r&&$n(u,c.clone(u)),u}function wi(e=` `,t=0){return I(ci,null,e,t)}function Ti(e){return e==null||typeof e==`boolean`?I(li):p(e)?I(F,null,e.slice()):gi(e)?Ei(e):I(ci,null,String(e))}function Ei(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ci(e)}function Di(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(p(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Di(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!Fr(t)?t._ctx=Ln:r===3&&Ln&&(Ln.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(_(t)){if(r&65){Di(e,{default:t});return}t={default:t,_ctx:Ln},n=32}else t=String(t),r&64?(n=16,t=[wi(t)]):n=8;e.children=t,e.shapeFlag|=n}function Oi(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=xe([t.class,r.class]));else if(e===`style`)t.style=ge([t.style,r.style]);else if(s(e)){let n=t[e],i=r[e];i&&n!==i&&!(p(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!c(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function ki(e,t,n,r=null){_n(e,t,7,[n,r])}var Ai=_r(),ji=0;function Mi(){return ji}function Ni(e,t,n){let i=e.type,a=(t?t.appContext:e.appContext)||Ai,o={uid:ji++,vnode:e,type:i,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ke(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Br(i,a),emitsOptions:Cr(i,a),emit:null,emitted:null,propsDefaults:r,inheritAttrs:i.inheritAttrs,ctx:r,data:r,props:r,attrs:r,slots:r,refs:r,setupState:r,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=Sr.bind(null,o),e.ce&&e.ce(o),o}var L=null,Pi=()=>L||Ln,Fi,Ii;{let e=he(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Fi=t(`__VUE_INSTANCE_SETTERS__`,e=>L=e),Ii=t(`__VUE_SSR_SETTERS__`,e=>Bi=e)}var Li=e=>{let t=L;return Fi(e),e.scope.on(),()=>{e.scope.off(),Fi(t)}},Ri=()=>{L&&L.scope.off(),Fi(null)};function zi(e){return e.vnode.shapeFlag&4}var Bi=!1;function Vi(e,t=!1,n=!1){t&&Ii(t);let{props:r,children:i}=e.vnode,a=zi(e);Ir(e,r,a,t),Jr(e,i,n||t);let o=a?Hi(e,t):void 0;return t&&Ii(!1),o}function Hi(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,gr);let{setup:r}=n;if(r){Je();let n=e.setupContext=r.length>1?Ji(e):null,i=Li(e),a=gn(r,e,0,[e.props,n]),o=x(a);if(Ye(),i(),(o||e.sp)&&!or(e)&&tr(e),o){if(a.then(Ri,Ri),t)return a.then(n=>{Ii(!0);try{Ui(e,n,t)}finally{Ii(!1)}}).catch(t=>{vn(t,e,0)});e.asyncDep=a}else Ui(e,a,t)}else Ki(e,t)}function Ui(e,t,n){_(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:b(t)&&(e.setupState=sn(t)),Ki(e,n)}var Wi,Gi;function Ki(e,t,n){let r=e.type;if(!e.render){if(!t&&Wi&&!r.render){let t=r.template||!1;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r;r.render=Wi(t,l(l({isCustomElement:n,delimiters:a},i),o))}}e.render=r.render||a,Gi&&Gi(e)}}var qi={get(e,t){return O(e,`get`,``),e[t]}};function Ji(e){return{attrs:new Proxy(e.attrs,qi),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Yi(e){return e.exposed?e.exposeProxy||=new Proxy(sn(Zt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in mr)return mr[n](e)},has(e,t){return t in e||t in mr}}):e.proxy}function Xi(e){return _(e)&&`__vccOpts`in e}var R=(e,t)=>ln(e,t,Bi);function z(e,t,n){try{hi(-1);let r=arguments.length;return r===2?b(t)&&!p(t)?gi(t)?I(e,null,[t]):I(e,t):I(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&gi(n)&&(n=[n]),I(e,t,n))}finally{hi(1)}}var Zi=`3.5.44`,Qi=void 0,$i=typeof window<`u`&&window.trustedTypes;if($i)try{Qi=$i.createPolicy(`vue`,{createHTML:e=>e})}catch{}var ea=Qi?e=>Qi.createHTML(e):e=>e,ta=`http://www.w3.org/2000/svg`,na=`http://www.w3.org/1998/Math/MathML`,ra=typeof document<`u`?document:null,ia=ra&&ra.createElement(`template`),aa={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?ra.createElementNS(ta,e):t===`mathml`?ra.createElementNS(na,e):n?ra.createElement(e,{is:n}):ra.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>ra.createTextNode(e),createComment:e=>ra.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ra.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==a&&(i=i.nextSibling););else{ia.innerHTML=ea(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=ia.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},oa=Symbol(`_vtc`);function sa(e,t,n){let r=e[oa];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var ca=Symbol(`_vod`),la=Symbol(`_vsh`),ua=Symbol(``),da=/(?:^|;)\s*display\s*:/;function fa(e,t,n){let r=e.style,i=v(n),a=!1;if(n&&!i){if(t){if(v(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??ma(r,t,``)}else for(let e in t)n[e]??ma(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?ma(r,i,``):va(e,i,!v(t)&&t?t[i]:void 0,o)||ma(r,i,o)}}else if(i){if(t!==n){let e=r[ua];e&&(n+=`;`+e),r.cssText=n,a=da.test(n)}}else t&&e.removeAttribute(`style`);ca in e&&(i&&t===n||(e[ca]=a?r.display:``),e[la]&&(r.display=`none`))}var pa=/\s*!important$/;function ma(e,t,n){if(p(n))n.forEach(n=>ma(e,t,n));else if(n??=``,t.startsWith(`--`))pa.test(n)?e.setProperty(t,n.replace(pa,``),`important`):e.setProperty(t,n);else{let r=_a(e,t);pa.test(n)?e.setProperty(T(r),n.replace(pa,``),`important`):e[r]=n}}var ha=[`Webkit`,`Moz`,`ms`],ga={};function _a(e,t){let n=ga[t];if(n)return n;let r=w(t);if(r!==`filter`&&r in e)return ga[t]=r;r=se(r);for(let n=0;n<ha.length;n++){let i=ha[n]+r;if(i in e)return ga[t]=i}return t}function va(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&v(r)&&n===r}var ya=`http://www.w3.org/1999/xlink`;function ba(e,t,n,r,i,a=Se(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(ya,t.slice(6,t.length)):e.setAttributeNS(ya,t,n):n==null||a&&!Ce(n)?e.removeAttribute(t):e.setAttribute(t,a?``:y(n)?String(n):n)}function xa(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?ea(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);r===i&&`_value`in e||(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=Ce(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function Sa(e,t,n,r){e.addEventListener(t,n,r)}function Ca(e,t,n,r){e.removeEventListener(t,n,r)}var wa=Symbol(`_vei`);function Ta(e,t,n,r,i=null){let a=e[wa]||(e[wa]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=Oa(t);r?Sa(e,n,a[t]=Ma(r,i),s):o&&(Ca(e,n,o,s),a[t]=void 0)}}var Ea=/(Once|Passive|Capture)$/,Da=/^on:?(?:Once|Passive|Capture)$/;function Oa(e){let t,n;for(;(n=e.match(Ea))&&!Da.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):T(e.slice(2)),t]}var ka=0,Aa=Promise.resolve(),ja=()=>ka||=(Aa.then(()=>ka=0),Date.now());function Ma(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(p(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&_n(e,t,5,a)}}else _n(r,t,5,[e])};return n.value=e,n.attached=ja(),n}var Na=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Pa=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?sa(e,r,o):t===`style`?fa(e,n,r):s(t)?c(t)||Ta(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):Fa(e,t,r,o))?(xa(e,t,r),e.tagName.includes(`-`)||t!==`value`&&t!==`checked`&&t!==`selected`||ba(e,t,r,o,a,t!==`value`)):e._isVueCE&&(Ia(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!v(r)))?xa(e,w(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),ba(e,t,r,o))};function Fa(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&Na(t)&&_(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return Na(t)&&v(n)?!1:t in e}function Ia(e,t){let n=e._def.props;if(!n)return!1;let r=w(t);return Array.isArray(n)?n.some(e=>w(e)===r):Object.keys(n).some(e=>w(e)===r)}var La={};function Ra(e,t,n){let r=N(e,t);te(r)&&(r=l({},r,t));class i extends Ba{constructor(e){super(r,e,n)}}return i.def=r,i}var za=typeof HTMLElement<`u`?HTMLElement:class{},Ba=class e extends za{constructor(e,t={},n=Ga){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==Ga?this._root=this.shadowRoot:e.shadowRoot===!1?this._root=this:(this.attachShadow(l({},e.shadowRootOptions,{mode:`open`})),this._root=this.shadowRoot)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t&&=t.assignedSlot||t.parentNode||t.host;)if(t instanceof e){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{if(this._pendingResolve=void 0,this.isConnected)return this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,En(()=>{this._connected||(this._ob&&=(this._ob.disconnect(),null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&=(this._teleportTargets.clear(),void 0))})}_processMutations(e){for(let t of e)this._setAttr(t.attributeName)}_resolveDef(){if(this._pendingResolve)return this._pendingResolve;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{this._resolved=!0,this._pendingResolve=void 0;let{props:n,styles:r}=e,i;if(n&&!p(n))for(let e in n){let t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=pe(this._props[e])),(i||=Object.create(null))[w(e)]=!0)}this._numberProps=i,this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._connected&&this._mount(e)},t=this._def.__asyncLoader;if(t)return this._pendingResolve=t().then(t=>{t.configureApp=this._def.configureApp,e(this._def=t,!0)}),this._pendingResolve;e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)f(this,e)||Object.defineProperty(this,e,{get:()=>rn(t[e])})}_resolveProps(e){let{props:t}=e,n=p(t)?t:Object.keys(t||{});for(let e of Object.keys(this))e[0]!==`_`&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(w))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!this._patching)}})}_setAttr(e){if(e.startsWith(`data-v-`))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):La,r=w(e);t&&this._numberProps&&this._numberProps[r]&&(n=pe(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(this._dirty=!0,t===La?delete this._props[e]:(this._props[e]=t,e===`key`&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&(this._processMutations(n.takeRecords()),n.disconnect()),t===!0?this.setAttribute(T(e),``):typeof t==`string`||typeof t==`number`?this.setAttribute(T(e),t+``):t||this.removeAttribute(T(e)),n&&n.observe(this,{attributes:!0})}}_update(){let e=this._createVNode();this._app&&(e.appContext=this._app._context),Wa(e,this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=I(this._def,l(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,te(t[0])?l({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),T(e)!==e&&t(T(e),n)},this._setParent()}),t}_applyStyles(e,t,n){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let r=this._nonce,i=this.shadowRoot,a=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i),o=null;for(let s=e.length-1;s>=0;s--){let c=document.createElement(`style`);r&&c.setAttribute(`nonce`,r),c.textContent=e[s],i.insertBefore(c,o||a),o=c,s===0&&(n||this._styleAnchors.set(this._def,c),t&&this._styleAnchors.set(t,c))}}_getStyleAnchor(e){if(!e)return null;let t=this._styleAnchors.get(e);return t&&t.parentNode===this.shadowRoot?t:(t&&this._styleAnchors.delete(e),null)}_getRootStyleInsertionAnchor(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if(!(n instanceof HTMLStyleElement))return n}return null}_parseSlots(){let e=this._slots={},t;for(;t=this.firstChild;){let n=t.nodeType===1&&t.getAttribute(`slot`)||`default`;(e[n]||(e[n]=[])).push(t),this.removeChild(t)}}_renderSlots(){let e=this._getSlots(),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){let r=e[n],i=r.getAttribute(`name`)||`default`,a=this._slots[i],o=r.parentNode;if(a)for(let e of a){if(t&&e.nodeType===1){let n=t+`-s`,r=document.createTreeWalker(e,1);e.setAttribute(n,``);let i;for(;i=r.nextNode();)i.setAttribute(n,``)}o.insertBefore(e,r)}else for(;r.firstChild;)o.insertBefore(r.firstChild,r);o.removeChild(r)}}_getSlots(){let e=[this];this._teleportTargets&&e.push(...this._teleportTargets);let t=new Set;for(let n of e){let e=n.querySelectorAll(`slot`);for(let n=0;n<e.length;n++)t.add(e[n])}return Array.from(t)}_injectChildStyle(e,t){this._applyStyles(e.styles,e,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(e){}},Va=l({patchProp:Pa},aa),Ha;function Ua(){return Ha||=Xr(Va)}var Wa=((...e)=>{Ua().render(...e)}),Ga=((...e)=>{let t=Ua().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=qa(e);if(!r)return;let i=t._component;_(i)||i.render||i.template||(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Ka(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function Ka(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function qa(e){return v(e)?document.querySelector(e):e}var B=class extends Error{kind;status;fields;items;retryAfterSeconds;constructor(e,t,n={}){super(`API error ${e} (${t})`),this.name=`ApiError`,this.kind=e,this.status=t,this.fields=n.fields??[],this.items=n.items??[],this.retryAfterSeconds=n.retryAfterSeconds}};function Ja(e){let t=`redirect_url`in e?e.redirect_url:e.form.action;try{return new URL(t).protocol===`https:`}catch{return!1}}function Ya(e){let{apiBase:t,landingSlug:n}=e,r=e.fetch??((...e)=>globalThis.fetch(...e));async function i(e,n={}){let i;try{i=await r(`${t}${e}`,{...n,credentials:`omit`})}catch(e){throw new B(e.name===`AbortError`?`aborted`:`network`,0)}let a;try{a=await i.json()}catch{a=void 0}if(i.ok)return a;let o=a??{},s=Number(i.headers.get(`retry-after`));throw new B(typeof o.error==`string`?o.error:`unexpected`,i.status,{...Array.isArray(o.fields)&&{fields:o.fields},...Array.isArray(o.items)&&{items:o.items},...Number.isFinite(s)&&i.headers.has(`retry-after`)&&{retryAfterSeconds:s}})}let a=(e,t,n)=>`/v1/public/orders/${encodeURIComponent(e)}/${n}?t=${encodeURIComponent(t)}`;return{getCatalog:()=>i(`/v1/public/landings/${n}/catalog`),createOrder:(e,t)=>i(`/v1/public/landings/${n}/orders`,{method:`POST`,headers:{"content-type":`application/json`,"idempotency-key":t},body:JSON.stringify(e)}),getStatus:(e,t)=>i(a(e,t,`status`)),startCheckout:(e,t)=>i(a(e,t,`checkout`),{method:`POST`}),searchSettlements:(e,t)=>i(`/v1/public/np/settlements?q=${encodeURIComponent(e)}`,{...t&&{signal:t}}),getWarehouses:(e,t,n)=>i(`/v1/public/np/warehouses?settlementRef=${encodeURIComponent(e)}&type=${t}`,{...n&&{signal:n}})}}function Xa(e=()=>crypto.randomUUID()){let t,n;return{keyFor(r){let i=JSON.stringify(r);return(n===void 0||i!==t)&&(n=e(),t=i),n},done(){n=void 0,t=void 0}}}function Za(e,t,n){return new Intl.NumberFormat(n===`uk`?`uk-UA`:`en-GB`,{style:`currency`,currency:t}).format(e/100)}function Qa(e){let t=new URLSearchParams(e),n=t.get(`number`),r=t.get(`t`);return n&&r?{number:n,token:r}:void 0}function $a(e){let t=new URL(e.location.href);t.searchParams.has(`t`)&&(t.searchParams.delete(`t`),e.history.replaceState(e.history.state,``,t.pathname+t.search))}var eo=e=>e.startsWith(`card_`);function to(e){return e.payment_state===`paid`||e.payment_state===`partially_paid`?`paid`:e.status===`cancelled`?`failed`:e.payment_method===`np_cod`?`cod`:e.payment_method===`iban`?`iban_unpaid`:`pending`}var no=3e3,ro=6e4,io=[2e3,5e3,1e4];function ao(e){let{api:t,params:n,onResult:r}=e,i=!1,a,o=0,s=0,c=!1;async function l(){let e;try{e={kind:`ok`,status:await t.getStatus(n.number,n.token)}}catch(t){e=t.status===404?{kind:`missing`}:{kind:`error`}}if(i||(e.kind===`error`?s++:(s=0,c=!0),(e.kind!==`error`||!c&&s>io.length)&&r(e),!(e.kind===`error`||e.kind===`ok`&&eo(e.status.payment_method)&&to(e.status)===`pending`)))return;let u=e.kind===`error`?io[s-1]??3e3:no;o+u<=6e4&&(o+=u,a=setTimeout(l,u))}return l(),()=>{i=!0,clearTimeout(a)}}function oo(e){let t=e,n=new Set;return{getState:()=>t,set(e){t={...t,...e};for(let e of[...n])e(t)},subscribe(e){return n.add(e),()=>void n.delete(e)}}}function so(e,t){let n=oo({result:void 0,outcome:void 0}),r;return{getState:n.getState,subscribe:n.subscribe,start(){r?.(),r=ao({api:e,params:t,onResult:e=>n.set({result:e,outcome:e.kind===`ok`?to(e.status):void 0})})},stop(){r?.(),r=void 0}}}function co(e){let t=en(e.getState());return je(e.subscribe(e=>{t.value=e})),Gt(t)}function lo(e){Pi()&&ur(e)}function uo(e,t){let n=en({result:void 0,outcome:void 0}),r,i;function a(){r?.stop(),i?.(),r=i=void 0}function o(){a();let o=an(t);o?(r=so(e,o),i=r.subscribe(e=>{n.value=e}),r.start()):n.value={result:{kind:`missing`},outcome:void 0}}return lo(o),je(a),{result:R(()=>n.value.result),outcome:R(()=>n.value.outcome),start:o,stop:a}}var fo={uk:{loading:`Завантаження…`,catalogError:`Не вдалося завантажити товари.`,retry:`Спробувати ще раз`,soldOut:`Немає в наявності`,variantSoldOut:`немає`,product:`Товар`,quantity:`Кількість`,name:`Ім'я та прізвище`,phone:`Телефон`,email:`Електронна пошта (необов’язково)`,comment:`Коментар (необов’язково)`,payment:`Оплата`,city:`Місто`,warehouse:`Відділення Нової пошти`,consentPrefix:`Я погоджуюсь з`,consentPrivacy:`політикою конфіденційності`,consentOffer:`публічною офертою`,submit:`Оформити замовлення`,sending:`Надсилаємо…`,fixFields:`Перевірте виділені поля.`,pay:{card_online:`Картка онлайн`,card_instalments:`Оплата частинами`,np_cod:`Накладений платіж`,iban:`Переказ на рахунок`},errors:{invalid_phone:`Введіть український номер, наприклад 099 000 00 01.`,too_small:`Занадто коротке значення.`,required:`Обов'язкове поле.`,invalid_value:`Невірне значення.`,generic:`Невірне значення.`,out_of_stock:`Цього товару вже немає в наявності.`,form_too_fast:`Будь ласка, спробуйте ще раз.`,payment_method_disabled:`Цей спосіб оплати зараз недоступний.`,payment_method_unavailable:`Цей спосіб оплати зараз недоступний.`,variant_unavailable:`Цього варіанта більше немає.`,rate_limited:`Забагато спроб. Спробуйте трохи пізніше.`,network:`Немає зв'язку. Спробуйте ще раз.`,unexpected:`Щось пішло не так. Спробуйте ще раз.`,not_allowed:`Це поле тут не потрібне.`,invalid_postcode:`Індекс — п’ять цифр.`,invalid_email:`Перевірте адресу пошти.`,consent_required:`Потрібна ваша згода.`,choose_settlement:`Оберіть населений пункт зі списку.`,choose_warehouse:`Оберіть відділення зі списку.`,choose_payment:`Оберіть спосіб оплати ще раз.`},successTitle:`Дякуємо! Замовлення прийнято`,failTitle:`Оплата не пройшла`,failText:`Замовлення не оплачено. Ви можете спробувати ще раз.`,orderNumber:`Номер замовлення`,statusLoading:`Перевіряємо замовлення…`,statusMissing:`Замовлення не знайдено. Посилання могло застаріти.`,statusError:`Не вдалося перевірити замовлення.`,home:`На головну`,total:`Разом`,linesTitle:`Товари у замовленні`,variant:`Варіант`,addLine:`Додати ще товар`,removeLine:`Прибрати: {name}`,soldOutOption:`немає в наявності`,lineGone:`Немає в наявності — приберіть цей рядок або оберіть інший варіант.`,allSoldOut:`Усі товари зараз розпродані. Оформити замовлення поки неможливо.`,maxLines:`Не більше {n} різних товарів у замовленні.`,deliveryTitle:`Доставка`,delivery:{np_branch:`Відділення Нової пошти`,np_locker:`Поштомат Нової пошти`,np_courier:`Кур'єр Нової пошти`,ukrposhta:`Укрпошта`},settlement:`Населений пункт`,settlementHint:`Почніть вводити назву (від 2 літер) і оберіть зі списку.`,warehouseBranch:`Відділення`,warehouseLocker:`Поштомат`,warehouseFilter:`Пошук за номером або адресою`,warehouseNeedSettlement:`Спочатку оберіть населений пункт.`,warehouseNone:`Тут немає відповідних пунктів.`,warehouseLoading:`Завантажуємо список…`,searching:`Шукаємо…`,noResults:`Нічого не знайдено.`,resultsCount:`Знайдено: {n}`,maxWeight:`до {kg} кг`,directoryDown:`Довідник Нової пошти зараз недоступний. Введіть місто й відділення вручну — замовлення все одно буде прийнято.`,directoryWait:`Забагато запитів до довідника. Спробуйте через {s} с або введіть вручну.`,typeManually:`Ввести вручну`,manualCity:`Місто (вручну)`,manualWarehouse:`Відділення або поштомат (номер чи адреса)`,street:`Вулиця, будинок, квартира`,postcode:`Поштовий індекс`,region:`Область (необов’язково)`,upCity:`Місто або село`,upAddress:`Вулиця, будинок, квартира`,paymentTitle:`Оплата`,payHelp:{np_cod:`Сплачуєте під час отримання на пошті.`,iban:`Реквізити для переказу побачите після оформлення.`,card_online:`Перейдете на сторінку безпечної оплати карткою.`,card_instalments:`Перейдете на сторінку оплати частинами.`},phoneHint:`Формат: 099 000 00 01`,emailHint:`Для квитанції або чека`,errorSummary:`Перевірте форму:`,consentField:`Згода`,retryPayment:`Повторити`,waitSeconds:`Спробуйте ще раз через {s} с.`,cardPreparing:`Оплату ще готують. Зачекайте хвилину й спробуйте ще раз — замовлення збережено.`,cardUnavailable:`Оплата карткою тимчасово недоступна. Замовлення збережено — оберіть інший спосіб оплати або зв’яжіться з нами.`,cardRetry:`Спробувати оплату ще раз`,redirecting:`Переходимо до оплати…`,items:`Склад замовлення`,paymentPaid:`Оплачено`,paymentPending:`Очікуємо підтвердження оплати…`,paymentPendingLong:`Підтвердження оплати ще не надійшло. Якщо ви вже оплатили, воно з’явиться за кілька хвилин; сторінку можна закрити.`,paymentFailed:`Замовлення скасовано, оплату не отримано.`,paymentCod:`Оплата під час отримання.`,ibanTitle:`Реквізити для оплати`,ibanRecipient:`Отримувач`,ibanIban:`IBAN`,ibanEdrpou:`ЄДРПОУ`,ibanPurpose:`Призначення платежу`,copy:`Копіювати`,copied:`Скопійовано`,copyIban:`Копіювати IBAN`,copyPurpose:`Копіювати призначення платежу`,ibanTtl:`Якщо оплата не надійде протягом строку, визначеного продавцем, замовлення буде скасовано автоматично.`,ibanTtlHours:`Якщо оплата не надійде протягом {hours} год., замовлення буде скасовано автоматично.`,qtyLabel:`Кількість: {name}`,qtyDec:`Зменшити кількість: {name}`,qtyInc:`Збільшити кількість: {name}`,qtyNow:`Кількість: {n}`,qtyMax:`Не більше {max} шт.`,qtyRule:`Мінімум {min}, кратно {step}`,lineRemoved:`Прибрано: {name}`,buyerTitle:`Контакти`,deliveryHelp:{np_branch:`Заберете у відділенні`,np_locker:`Заберете з поштомату`,np_courier:`Привезе кур'єр за вашою адресою`,ukrposhta:`Доставка Укрпоштою за індексом`},retryDirectory:`Спробувати список ще раз`,payUnavailable:`Тимчасово недоступно`,newTab:`(відкриється в новій вкладці)`,subtotal:`Товари ({n})`,discount:`Знижка`,deliveryFee:`Доставка`,submitBlockedStock:`Приберіть недоступні товари, щоб оформити замовлення.`,slowSubmit:`Це триває довше, ніж зазвичай. Не закривайте сторінку: замовлення не задублюється.`,cooldownBtn:`Спробуйте через {s} с`,priceChanged:`Ціни оновилися. Було {old}, тепер {new}.`,priceConfirm:`Підтвердити нову суму та оформити`,ibanAmount:`Сума до сплати`,ibanHowTo:`Переказ можна зробити в застосунку вашого банку: вставте IBAN і призначення платежу.`,copyAmount:`Копіювати суму`,copyFailed:`Не вдалося скопіювати. Виділіть текст і скопіюйте вручну.`,cardGo:`Якщо перехід не стався, натисніть кнопку`,cardGoBtn:`Перейти до оплати`,failAgain:`Оформити знову`,newOrder:`Нове замовлення`,newOrderConfirm:`Реквізити цього замовлення зникнуть зі сторінки. Ви їх скопіювали?`,newOrderYes:`Так, нове замовлення`,newOrderNo:`Ні, залишити`,lastOrder:`Це ваше останнє замовлення`,embedNoLanding:`Форму замовлення не налаштовано: немає атрибута landing.`,skipToForm:`Перейти до оформлення`},en:{loading:`Loading…`,catalogError:`The products could not be loaded.`,retry:`Try again`,soldOut:`Sold out`,variantSoldOut:`sold out`,product:`Product`,quantity:`Quantity`,name:`Full name`,phone:`Phone`,email:`Email (optional)`,comment:`Comment (optional)`,payment:`Payment`,city:`City`,warehouse:`Nova Poshta branch`,consentPrefix:`I agree to the`,consentPrivacy:`privacy policy`,consentOffer:`public offer`,submit:`Place order`,sending:`Sending…`,fixFields:`Please check the marked fields.`,pay:{card_online:`Card online`,card_instalments:`Instalments`,np_cod:`Cash on delivery`,iban:`Bank transfer`},errors:{invalid_phone:`Enter a Ukrainian number, for example 099 000 00 01.`,too_small:`The value is too short.`,required:`Required.`,invalid_value:`Invalid value.`,generic:`Invalid value.`,out_of_stock:`This item is no longer in stock.`,form_too_fast:`Please try again.`,payment_method_disabled:`This payment method is unavailable right now.`,payment_method_unavailable:`This payment method is unavailable right now.`,variant_unavailable:`This option is no longer available.`,rate_limited:`Too many attempts. Please try again in a moment.`,network:`No connection. Please try again.`,unexpected:`Something went wrong. Please try again.`,not_allowed:`This field is not needed here.`,invalid_postcode:`The postcode is five digits.`,invalid_email:`Check the email address.`,consent_required:`Your consent is required.`,choose_settlement:`Choose a town or village from the list.`,choose_warehouse:`Choose a branch from the list.`,choose_payment:`Please choose a payment method again.`},successTitle:`Thank you! Your order is placed`,failTitle:`The payment did not go through`,failText:`The order is not paid. You can try again.`,orderNumber:`Order number`,statusLoading:`Checking your order…`,statusMissing:`Order not found. The link may have expired.`,statusError:`The order could not be checked.`,home:`Home`,total:`Total`,linesTitle:`Items in your order`,variant:`Option`,addLine:`Add another item`,removeLine:`Remove: {name}`,soldOutOption:`sold out`,lineGone:`Sold out — remove this line or choose another option.`,allSoldOut:`Everything is sold out right now. You cannot place an order yet.`,maxLines:`No more than {n} different items per order.`,deliveryTitle:`Delivery`,delivery:{np_branch:`Nova Poshta branch`,np_locker:`Nova Poshta parcel locker`,np_courier:`Nova Poshta courier`,ukrposhta:`Ukrposhta`},settlement:`Town or village`,settlementHint:`Start typing the name (2 letters or more) and pick from the list.`,warehouseBranch:`Branch`,warehouseLocker:`Parcel locker`,warehouseFilter:`Search by number or address`,warehouseNeedSettlement:`Choose a town or village first.`,warehouseNone:`No matching points here.`,warehouseLoading:`Loading the list…`,searching:`Searching…`,noResults:`Nothing found.`,resultsCount:`Found: {n}`,maxWeight:`up to {kg} kg`,directoryDown:`The Nova Poshta directory is unavailable right now. Type the city and branch yourself — your order will still be accepted.`,directoryWait:`Too many directory requests. Try again in {s} s or type it in.`,typeManually:`Type it in`,manualCity:`City (typed)`,manualWarehouse:`Branch or locker (number or address)`,street:`Street, house, flat`,postcode:`Postcode`,region:`Region (optional)`,upCity:`City or village`,upAddress:`Street, house, flat`,paymentTitle:`Payment`,payHelp:{np_cod:`You pay when you collect the parcel.`,iban:`You will see the bank details after you place the order.`,card_online:`You will be taken to a secure card payment page.`,card_instalments:`You will be taken to the instalments payment page.`},phoneHint:`Format: 099 000 00 01`,emailHint:`For the receipt`,errorSummary:`Please check the form:`,consentField:`Consent`,retryPayment:`Retry`,waitSeconds:`Try again in {s} s.`,cardPreparing:`The payment is still being prepared. Wait a minute and try again — your order is saved.`,cardUnavailable:`Card payment is temporarily unavailable. Your order is saved — choose another way to pay or contact us.`,cardRetry:`Try the payment again`,redirecting:`Taking you to the payment…`,items:`Order contents`,paymentPaid:`Paid`,paymentPending:`Waiting for the payment confirmation…`,paymentPendingLong:`The payment is not confirmed yet. If you have paid, it will show in a few minutes; you can close this page.`,paymentFailed:`The order is cancelled, no payment was received.`,paymentCod:`You pay when you collect the parcel.`,ibanTitle:`Payment details`,ibanRecipient:`Recipient`,ibanIban:`IBAN`,ibanEdrpou:`Company ID (EDRPOU)`,ibanPurpose:`Payment purpose`,copy:`Copy`,copied:`Copied`,copyIban:`Copy the IBAN`,copyPurpose:`Copy the payment purpose`,ibanTtl:`If the payment does not arrive within the period set by the seller, the order is cancelled automatically.`,ibanTtlHours:`If the payment does not arrive within {hours} hours, the order is cancelled automatically.`,qtyLabel:`Quantity: {name}`,qtyDec:`Decrease quantity: {name}`,qtyInc:`Increase quantity: {name}`,qtyNow:`Quantity: {n}`,qtyMax:`No more than {max}`,qtyRule:`Minimum {min}, in steps of {step}`,lineRemoved:`Removed: {name}`,buyerTitle:`Contact details`,deliveryHelp:{np_branch:`You collect it at a branch`,np_locker:`You collect it from a locker`,np_courier:`A courier brings it to your address`,ukrposhta:`Ukrposhta delivery by postcode`},retryDirectory:`Try the list again`,payUnavailable:`Temporarily unavailable`,newTab:`(opens in a new tab)`,subtotal:`Items ({n})`,discount:`Discount`,deliveryFee:`Delivery`,submitBlockedStock:`Remove the unavailable items to place the order.`,slowSubmit:`This is taking longer than usual. Keep the page open: the order will not be duplicated.`,cooldownBtn:`Try again in {s} s`,priceChanged:`Prices have been updated. Was {old}, now {new}.`,priceConfirm:`Confirm the new total and place the order`,ibanAmount:`Amount to pay`,ibanHowTo:`You can pay in your bank app: paste the IBAN and the payment purpose.`,copyAmount:`Copy the amount`,copyFailed:`Could not copy. Select the text and copy it yourself.`,cardGo:`If you are not redirected, press the button`,cardGoBtn:`Go to payment`,failAgain:`Place the order again`,newOrder:`New order`,newOrderConfirm:`The requisites of this order will disappear from the page. Did you copy them?`,newOrderYes:`Yes, new order`,newOrderNo:`No, keep it`,lastOrder:`This is your latest order`,embedNoLanding:`The order form is not set up: the landing attribute is missing.`,skipToForm:`Skip to checkout`}};function V(e,t){return e.replace(/\{(\w+)\}/g,(e,n)=>String(t[n]??``))}function po(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function mo(e,t){if(!po(e)||!po(t))return t??e;let n={...e};for(let[r,i]of Object.entries(t))i!==void 0&&(n[r]=mo(e[r],i));return n}function ho(e,t){return mo(mo(fo.uk,fo[e]),t?.[e])}var go={lang:{type:String,required:!0},messages:{type:Object}};function H(e){return R(()=>ho(e.lang,e.messages))}var _o=e=>e.type===li||e.type===ci&&String(e.children??``).trim()===``||e.type===F&&e.children?.every(_o)!==!1;function vo(e,t){let n=e[t]?.();return n&&!n.every(_o)?n:void 0}function yo(e,t){return Object.fromEntries(t.filter(t=>e[t]).map(t=>[t,e[t]]))}var bo=Symbol(`hv-announce`);function xo(){let e=j(``);return Hn(bo,t=>{e.value=e.value===t?`${t}\u00a0`:t}),{text:e}}function So(){let e=Un(bo,void 0),t=j(``);return{announce:e??(e=>{t.value=t.value===e?`${e}\u00a0`:e}),region:()=>e?null:z(`p`,{class:`hv-sr-only`,role:`status`},t.value)}}function Co(e){let t=[e.hint?`${e.id}-hint`:``,e.error?`${e.id}-error`:``].filter(Boolean).join(` `)||void 0;return z(`div`,{class:`hv-field`},[z(`label`,{class:`hv-label`,for:e.id},e.label),e.control({id:e.id,"aria-invalid":e.error?`true`:void 0,"aria-describedby":t}),e.hint?z(`p`,{id:`${e.id}-hint`,class:`hv-hint`},e.hint):null,e.error?z(`p`,{id:`${e.id}-error`,class:`hv-error`},e.error):null])}function wo(e){return Co({...e,control:t=>z(`input`,{class:`hv-input`,type:`text`,name:e.id.replace(/^hv-/,``),value:e.value,...e.attrs,...t,onInput:t=>e.onInput(t.target.value),onBlur:e.onBlur})})}var To=(e,t,n,r={})=>z(`fieldset`,{class:`hv-section ${t}`,...r},[z(`legend`,{class:`hv-section-title`},e),...n]),Eo=2e3,Do=e=>e.replace(/\s+/g,``).replace(/(.{4})(?=.)/g,`$1 `),Oo=N({name:`HvIbanBlock`,props:{...go,iban:{type:Object,required:!0},totalMinor:{type:Number,required:!0},currency:{type:String,required:!0},ttlHours:Number},setup(e){let t=H(e),{announce:n}=So(),r=j(``),i=j(!1),a;je(()=>clearTimeout(a));async function o(e,o){clearTimeout(a);try{await navigator.clipboard.writeText(o),i.value=!1,r.value=e,n(t.value.copied),a=setTimeout(()=>r.value=``,Eo)}catch{r.value=``,i.value=!0}}let s=(e,n,i,a,s)=>z(`div`,{key:e,class:`hv-iban-row`},[z(`dt`,{class:`hv-iban-label`},n),z(`dd`,{class:`hv-iban-value`},[z(`span`,{class:`hv-iban-text`},i),z(`button`,{type:`button`,class:`hv-button hv-button-secondary hv-copy-button`,"aria-label":s,onClick:()=>void o(e,a)},r.value===e?t.value.copied:t.value.copy)])]);return()=>{let n=e.iban,r=(e.totalMinor/100).toFixed(2);return z(`section`,{class:`hv-iban`},[z(`h2`,{class:`hv-section-title`},t.value.ibanTitle),z(`p`,{class:`hv-hint`},t.value.ibanHowTo),z(`dl`,{class:`hv-iban-list`},[s(`recipient`,t.value.ibanRecipient,n.recipient,n.recipient,`${t.value.copy}: ${t.value.ibanRecipient}`),s(`iban`,t.value.ibanIban,Do(n.iban),n.iban.replace(/\s+/g,``),t.value.copyIban),n.edrpou?s(`edrpou`,t.value.ibanEdrpou,n.edrpou,n.edrpou,`${t.value.copy}: ${t.value.ibanEdrpou}`):null,s(`purpose`,t.value.ibanPurpose,n.purpose,n.purpose,t.value.copyPurpose),s(`amount`,t.value.ibanAmount,Za(e.totalMinor,e.currency,e.lang),r,t.value.copyAmount)]),i.value?z(`p`,{class:`hv-error`,role:`alert`},t.value.copyFailed):null,z(`p`,{class:`hv-hint`},e.ttlHours?V(t.value.ibanTtlHours,{hours:e.ttlHours}):t.value.ibanTtl)])}}}),ko=N({name:`HvCheckoutResult`,props:{...go,api:{type:Object,required:!0},params:{type:Object},theme:{type:String,default:`light`},homeUrl:{type:String,default:`/`},retryUrl:String,pendingLongMs:{type:Number,default:ro}},setup(e,{slots:t}){let n=H(e),r=j(e.params),i=j(!!e.params);ur(()=>{e.params||(r.value=Qa(window.location.search),$a(window),i.value=!0)});let a=uo(e.api,()=>r.value),o=j(),s=j(null),c=j(!1),l;je(()=>clearTimeout(l));let u=R(()=>{let e=a.result.value;return e?e.kind===`missing`?`missing`:e.kind===`error`?`error`:a.outcome.value??`checking`:`checking`});return Kn(u,async t=>{clearTimeout(l),c.value=!1,t===`pending`&&(l=setTimeout(()=>c.value=!0,e.pendingLongMs)),t===`iban_unpaid`&&o.value===void 0&&e.api.getCatalog().then(e=>o.value=e.landing.payment_ttl_hours).catch(()=>void 0),t!==`checking`&&(await En(),s.value?.focus())}),()=>{let r={lang:e.lang,messages:e.messages},i={class:`hv-root hv-result`,"data-hv-theme":e.theme},l=u.value,d=a.result.value,f=d?.kind===`ok`?d.status:void 0,p=e=>z(`h1`,{ref:s,class:`hv-result-title`,tabindex:-1},e),m=z(`a`,{class:`hv-button hv-button-secondary`,href:e.homeUrl},n.value.home);if(l===`checking`)return z(`div`,i,[z(`p`,{class:`hv-skeleton`,role:`status`,"aria-busy":`true`},n.value.statusLoading)]);if(l===`missing`)return z(`div`,i,[p(n.value.statusMissing),m]);if(l===`error`)return z(`div`,i,[p(n.value.statusError),z(`button`,{type:`button`,class:`hv-button hv-button-primary`,onClick:()=>a.start()},n.value.retry),m]);let h=l===`failed`,g=f?z(`section`,{class:`hv-result-items`},[z(`h2`,{class:`hv-section-title`},n.value.items),z(`ul`,f.items.map((t,n)=>z(`li`,{key:n,class:`hv-result-item`},[z(`span`,[t.name,t.variant_name?`, ${t.variant_name}`:``,` × ${t.quantity}`]),z(`span`,Za(t.unit_price_minor*t.quantity,f.currency,e.lang))]))),z(`p`,{class:`hv-result-total`},[`${n.value.total}: `,Za(f.total_minor,f.currency,e.lang)])]):null,_=l===`paid`?n.value.paymentPaid:l===`pending`?c.value?n.value.paymentPendingLong:n.value.paymentPending:l===`failed`?n.value.paymentFailed:l===`cod`?n.value.paymentCod:``;return z(`div`,i,[p(h?n.value.failTitle:n.value.successTitle),f?z(`p`,{class:`hv-result-number`},`${n.value.orderNumber}: ${f.number}`):null,_?z(`p`,{class:`hv-result-status`,role:`status`,"data-outcome":l},_):null,h?z(`p`,n.value.failText):null,l===`iban_unpaid`&&f?.iban?z(Oo,{...r,iban:f.iban,totalMinor:f.total_minor,currency:f.currency,ttlHours:o.value}):null,g,vo(t,h?`fail-extra`:`success-extra`),h?z(`a`,{class:`hv-button hv-button-primary`,href:e.retryUrl??e.homeUrl},n.value.failAgain):null,m])}}});function Ao(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function jo(e,t=`|`){return e.map(e=>ts(e)).join(t)}function Mo(e,t){return typeof t==`bigint`?t.toString():t}var No=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Po(e){return new No(e)}function Fo(e){return e==null}function Io(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Lo(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function Ro(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function zo(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function Bo(e){return zo(e._zod.def)??e._zod.def.shape}function Vo(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return Ro(this,t,e),e},enumerable:!0,configurable:!0})}function Ho(e,t,n){t in e?Ro(e,t,n):e[t]=n}function Uo(e,t,n,r){let i=Bo(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Vo(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Ho(e,a,r?r(n.value,a):n.value))}}function Wo(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Vo(e,n,()=>t[n]):Ho(e,n,r.value))}}function U(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Go(e){return JSON.stringify(e)}function Ko(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var qo=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Jo(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Yo=Po(()=>{if(Ws.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Xo(e){if(Jo(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Jo(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Zo(e){return Xo(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Qo=new Set([`string`,`number`,`symbol`]);function $o(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function es(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function W(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function ts(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ns(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var rs={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},is={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function as(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return Uo(i,e,os(e,t)),es(e,U(n,{shape:i,checks:[]}))}function os(e,t){let n=Bo(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function ss(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(os(e,t)),a={};return Uo(a,e,Reflect.ownKeys(Bo(e)).filter(e=>!i.has(e))),es(e,U(n,{shape:a,checks:[]}))}function cs(e,t){if(!Xo(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=Bo(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return es(e,U(e._zod.def,{shape:ls(e,t)}))}function ls(e,t){let n={};return Uo(n,e,Reflect.ownKeys(Bo(e))),Wo(n,t),n}function us(e,t){if(!Xo(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return es(e,U(e._zod.def,{shape:ls(e,t)}))}function ds(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return Uo(n,e,Reflect.ownKeys(Bo(e))),Uo(n,t,Reflect.ownKeys(Bo(t))),es(e,U(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function fs(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(os(t,n)):void 0,o={};return Uo(o,t,Reflect.ownKeys(Bo(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),es(t,U(t._zod.def,{shape:o,checks:[]}))}function ps(e,t,n){let r=n?new Set(os(t,n)):void 0,i={};return Uo(i,t,Reflect.ownKeys(Bo(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),es(t,U(t._zod.def,{shape:i}))}function ms(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function hs(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function gs(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function _s(e){return typeof e==`string`?e:e?.message}function vs(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function ys(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function bs(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:_s(e.inst?._zod.def?.error?.(e))??_s(a?.(e))??_s(t?.error?.(e))??_s(n.customError?.(e))??_s(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var xs=/[\uD800-\uDBFF]/;function Ss(e){let t=e.length;if(!xs.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Cs(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function ws(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Ts(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Es(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):As(e,n,r.value)}}function Ds(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Os(e,t,n){return Ds(e,t,n,!1)}function ks(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Ds(this,n,r(this))},set(e){Ds(this,n,e)}})}return t}function As(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Ds(this,t,n.bind(this))},set(e){Ds(this,t,e)}})}function js(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Ms,Ns=!1,Ps={configurable:!0,get(){Ns=!0}};function G(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Ms!==e._zod?Ms=void 0:(Ms=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Ps);let e=Ns;Ns=!1;try{let r=n(this);return Ns?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Ns||=e,r}catch(n){throw delete this[t],Ns||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function Fs(e,t,n,r){let i=js(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Is=`~constantCatch`;function Ls(e){let t=()=>e;return t[Is]=!0,t}var Rs,zs={value:void 0,enumerable:!1},Bs=`captureStackTrace`in Error?Error:null;function Vs(e){let t=Bs;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Bs=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function K(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){zs.value=new a(r);try{Object.defineProperty(n,"_zod",zs)}finally{zs.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Es(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Vs(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Hs=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Us=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Rs=globalThis).__zod_globalConfig??(Rs.__zod_globalConfig={});var Ws=globalThis.__zod_globalConfig;function Gs(e){return e&&Object.assign(Ws,e),Ws}function Ks(){let e=this._zod;return e.message??=JSON.stringify(e.def,Mo,2),e.message}function qs(e){this._zod.message=e}var Js={get:Ks,set:qs,enumerable:!0,configurable:!0},Ys={value:void 0,enumerable:!1},Xs=new WeakSet([Object.prototype,Error.prototype]),Zs=K(`$ZodError`,(e,t)=>{e.name=`$ZodError`,Ys.value=t,Object.defineProperty(e,"issues",Ys),Ys.value=void 0,Object.defineProperty(e,"message",Js);let n=Object.getPrototypeOf(e);Xs.has(n)||(Xs.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function Qs(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function $s(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Qs(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ec(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function tc(e,t){return{callee:t?.callee??e,Err:t?.Err}}var nc=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Hs;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>bs(e,o,Gs())));throw qo(n,a?.callee??t),n}return s.value};return t},rc=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>bs(e,o,Gs())));throw qo(n,a?.callee??t),n}return s.value};return t},ic=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Hs;return a.issues.length?ac(e,a.issues,i):{success:!0,data:a.value}};function ac(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>bs(e,n,Gs()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var oc=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?ac(e,a.issues,i):{success:!0,data:a.value}},sc=Symbol.for(`zod.compile.invalid`),cc=Symbol.for(`zod.compile.fallback`),lc=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==sc)return!0;if(r.definite===!0&&n===void 0)return!1}return uc(e,t,n)});function uc(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[cc]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Hs;return a.issues.length===0}var dc=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},fc=e=>{let t=nc(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,tc(n,a))};return n},pc=e=>{let t=nc(e),n=(e,r,i,a)=>t(e,r,i,tc(n,a));return n},mc=e=>{let t=rc(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,tc(n,a))};return n},hc=e=>{let t=rc(e),n=async(e,r,i,a)=>await t(e,r,i,tc(n,a));return n},gc=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ic(e)(t,n,i)},_c=e=>(t,n,r)=>ic(e)(t,n,r),vc=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return oc(e)(t,n,i)},yc=e=>async(t,n,r)=>oc(e)(t,n,r),bc=/^[cC][0-9a-z]{6,}$/,xc=/^[0-9a-z]+$/,Sc=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Cc=/^[0-9a-vA-V]{20}$/,wc=/^[A-Za-z0-9]{27}$/,Tc=/^[a-zA-Z0-9_-]{21}$/;function Ec(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Dc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Oc=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,kc=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ac=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,jc=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Mc(){return new RegExp(jc,`u`)}var Nc=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Pc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Fc=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ic=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Lc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Rc=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,zc=/^https?$/,Bc=/^\+[1-9]\d{6,14}$/,Vc=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function Hc(e){return RegExp(`^${e}$`)}var Uc=Hc(Vc);function Wc(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Gc(e){return RegExp(`^${Wc(e)}$`)}function Kc(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Wc({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Wc({precision:e.precision})}`:n;return RegExp(`^${Vc}T(?:${r})$`)}var qc=/^[\s\S]{0,}$/,Jc=/^-?\d+(?:\.\d+)?$/,Yc=/^[^A-Z]*$/,Xc=/^[^a-z]*$/,q=K(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Zc=e=>{let t=e.value;return!Fo(t)&&t.length!==void 0},Qc={number:`number`,bigint:`bigint`,object:`date`},$c=K(`$ZodCheckLessThan`,(e,t)=>{q.init(e,t);let n=Qc[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Qc[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),el=K(`$ZodCheckGreaterThan`,(e,t)=>{q.init(e,t);let n=Qc[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Qc[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tl=K(`$ZodCheckMultipleOf`,(e,t)=>{q.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Lo(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),nl=K(`$ZodCheckNumberFormat`,(e,t)=>{q.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=rs[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),rl=K(`$ZodCheckMaxLength`,(e,t)=>{var n;q.init(e,t),(n=e._zod.def).when??(n.when=Zc),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Ss(r):i)<=t.maximum)return;let a=Cs(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),il=K(`$ZodCheckMinLength`,(e,t)=>{var n;q.init(e,t),(n=e._zod.def).when??(n.when=Zc),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Ss(r):i)>=t.minimum)return;let a=Cs(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),al=K(`$ZodCheckLengthEquals`,(e,t)=>{var n;q.init(e,t),(n=e._zod.def).when??(n.when=Zc),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Ss(r):i;if(a===t.length)return;let o=Cs(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ol=K(`$ZodCheckStringFormat`,(e,t)=>{var n,r;q.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),sl=K(`$ZodCheckRegex`,(e,t)=>{ol.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),cl=K(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Yc,ol.init(e,t)}),ll=K(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Xc,ol.init(e,t)}),ul=K(`$ZodCheckIncludes`,(e,t)=>{q.init(e,t);let n=$o(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),dl=K(`$ZodCheckStartsWith`,(e,t)=>{q.init(e,t);let n=RegExp(`^${$o(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),fl=K(`$ZodCheckEndsWith`,(e,t)=>{q.init(e,t);let n=RegExp(`.*${$o(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),pl=K(`$ZodCheckOverwrite`,(e,t)=>{q.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),ml=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
573
|
+
`;function n(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var r={},i=[],a=()=>{},o=()=>!1,s=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),c=e=>e.startsWith(`onUpdate:`),l=Object.assign,u=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},d=Object.prototype.hasOwnProperty,f=(e,t)=>d.call(e,t),p=Array.isArray,m=e=>S(e)===`[object Map]`,h=e=>S(e)===`[object Set]`,g=e=>S(e)===`[object Date]`,_=e=>typeof e==`function`,v=e=>typeof e==`string`,y=e=>typeof e==`symbol`,b=e=>typeof e==`object`&&!!e,x=e=>(b(e)||_(e))&&_(e.then)&&_(e.catch),ee=Object.prototype.toString,S=e=>ee.call(e),C=e=>S(e).slice(8,-1),te=e=>S(e)===`[object Object]`,ne=e=>v(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,re=n(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),ie=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ae=/-\w/g,w=ie(e=>e.replace(ae,e=>e.slice(1).toUpperCase())),oe=/\B([A-Z])/g,T=ie(e=>e.replace(oe,`-$1`).toLowerCase()),se=ie(e=>e.charAt(0).toUpperCase()+e.slice(1)),ce=ie(e=>e?`on${se(e)}`:``),le=(e,t)=>!Object.is(e,t),ue=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},de=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},fe=e=>{let t=parseFloat(e);return isNaN(t)?e:t},pe=e=>{let t=v(e)?Number(e):NaN;return isNaN(t)?e:t},me,he=()=>me||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ge(e){if(p(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=v(r)?be(r):ge(r);if(i)for(let e in i)t[e]=i[e]}return t}if(v(e)||b(e))return e}var _e=/;(?![^(]*\))/g,ve=/:([^]+)/,ye=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function be(e){let t={};return e.replace(ye,e=>e.startsWith(`/*`)?``:e).split(_e).forEach(e=>{if(e){let n=e.split(ve);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function xe(e){let t=``;if(v(e))t=e;else if(p(e))for(let n=0;n<e.length;n++){let r=xe(e[n]);r&&(t+=r+` `)}else if(b(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}var Se=n(`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`);function Ce(e){return!!e||e===``}function we(e,t,n){if(e.length!==t.length)return!1;let r=!0;for(let i=0;r&&i<e.length;i++)r=Oe(e[i],t[i],n);return r}function Te(e,t,n){if(e.size!==t.size)return!1;let r=Array.from(t),i=new Uint8Array(r.length);for(let t of e){let e=-1;for(let a=0;a<r.length;a++)if(!i[a]&&Oe(t,r[a],n)){e=a;break}if(e<0)return!1;i[e]=1}return!0}function Ee(e,t,n){let r=m(e),i=m(t);if(r||i||(r=h(e),i=h(t),r||i))return r&&i?Te(e,t,n):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e){let i=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(i&&!a||!i&&a||!Oe(e[r],t[r],n))return!1}return String(e)===String(t)}function De(e,t,n,r){n||=[new Map,new Map];let[i,a]=n;if(i.has(e)||a.has(t))return i.get(e)===t&&a.get(t)===e;i.set(e,t),a.set(t,e);let o=r(e,t,n);return i.delete(e),a.delete(t),o}function Oe(e,t,n){if(e===t)return!0;let r=g(e),i=g(t);return r||i?r&&i?e.getTime()===t.getTime():!1:(r=y(e),i=y(t),r||i?e===t:(r=p(e),i=p(t),r||i?r&&i?De(e,t,n,we):!1:(r=b(e),i=b(t),r||i?!r||!i?!1:De(e,t,n,Ee):String(e)===String(t))))}var E,ke=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&E&&(E.active?(this.parent=E,this.index=(E.scopes||(E.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}run(e){if(this._active){let t=E;try{return E=this,e()}finally{E=t}}}on(){++this._on===1&&(this.prevScope=E,E=this)}off(){if(this._on>0&&--this._on===0){if(E===this)E=this.prevScope;else{let e=E;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let e=this.scopes.slice();for(t=0,n=e.length;t<n;t++)e[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function Ae(){return E}function je(e,t=!1){E&&E.cleanups.push(e)}var D,Me=new WeakSet,Ne=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,E&&(E.active?E.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Me.has(this)&&(Me.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Le(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Xe(this),Be(this);let e=D,t=Ke;D=this,Ke=!0;try{return this.fn()}finally{Ve(this),D=e,Ke=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)We(e);this.deps=this.depsTail=void 0,Xe(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Me.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){He(this)&&this.run()}get dirty(){return He(this)}},Pe=0,Fe,Ie;function Le(e,t=!1){e.flags|=8,t?(e.next=Ie,Ie=e):(e.next=Fe,Fe=e)}function Re(){Pe++}function ze(){if(--Pe>0)return;if(Ie){let e=Ie;for(Ie=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Fe;){let t=Fe;for(Fe=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Be(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ve(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),We(r),Ge(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function He(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ue(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ue(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ze)||(e.globalVersion=Ze,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!He(e))))return;e.flags|=2;let t=e.dep,n=D,r=Ke;D=e,Ke=!0;try{Be(e);let n=e.fn(e._value);(t.version===0||le(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{D=n,Ke=r,Ve(e),e.flags&=-3}}function We(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)We(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ge(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Ke=!0,qe=[];function Je(){qe.push(Ke),Ke=!1}function Ye(){let e=qe.pop();Ke=e===void 0||e}function Xe(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=D;D=void 0;try{t()}finally{D=e}}}var Ze=0,Qe=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},$e=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!D||!Ke||D===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==D)t=this.activeLink=new Qe(D,this),D.deps?(t.prevDep=D.depsTail,D.depsTail.nextDep=t,D.depsTail=t):D.deps=D.depsTail=t,et(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=D.depsTail,t.nextDep=void 0,D.depsTail.nextDep=t,D.depsTail=t,D.deps===t&&(D.deps=e)}return t}trigger(e){this.version++,Ze++,this.notify(e)}notify(e){Re();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{ze()}}};function et(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)et(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var tt=new WeakMap,nt=Symbol(``),rt=Symbol(``),it=Symbol(``);function O(e,t,n){if(Ke&&D){let t=tt.get(e);t||tt.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new $e),r.map=t,r.key=n),r.track()}}function at(e,t,n,r,i,a){let o=tt.get(e);if(!o){Ze++;return}let s=e=>{e&&e.trigger()};if(Re(),t===`clear`)o.forEach(s);else{let i=p(e),a=i&&ne(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===it||!y(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(it)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(nt)),m(e)&&s(o.get(rt)));break;case`delete`:i||(s(o.get(nt)),m(e)&&s(o.get(rt)));break;case`set`:m(e)&&s(o.get(nt))}}ze()}function ot(e){let t=k(e);return t===e||(O(t,`iterate`,it),Yt(e))?t:Jt(e)?qt(e)?t.map(e=>$t(Qt(e))):t.map($t):t.map(Qt)}function st(e){return O(e=k(e),`iterate`,it),e}function ct(e,t){return Jt(e)?$t(qt(e)?Qt(t):t):Qt(t)}var lt={__proto__:null,[Symbol.iterator](){return ut(this,Symbol.iterator,e=>ct(this,e))},concat(...e){return ot(this).concat(...e.map(e=>p(e)?ot(e):e))},entries(){return ut(this,`entries`,e=>(e[1]=ct(this,e[1]),e))},every(e,t){return pt(this,`every`,e,t,void 0,arguments)},filter(e,t){return pt(this,`filter`,e,t,e=>e.map(e=>ct(this,e)),arguments)},find(e,t){return pt(this,`find`,e,t,e=>ct(this,e),arguments)},findIndex(e,t){return pt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return pt(this,`findLast`,e,t,e=>ct(this,e),arguments)},findLastIndex(e,t){return pt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return pt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ht(this,`includes`,e)},indexOf(...e){return ht(this,`indexOf`,e)},join(e){return ot(this).join(e)},lastIndexOf(...e){return ht(this,`lastIndexOf`,e)},map(e,t){return pt(this,`map`,e,t,void 0,arguments)},pop(){return gt(this,`pop`)},push(...e){return gt(this,`push`,e)},reduce(e,...t){return mt(this,`reduce`,e,t)},reduceRight(e,...t){return mt(this,`reduceRight`,e,t)},shift(){return gt(this,`shift`)},some(e,t){return pt(this,`some`,e,t,void 0,arguments)},splice(...e){return gt(this,`splice`,e)},toReversed(){return ot(this).toReversed()},toSorted(e){return ot(this).toSorted(e)},toSpliced(...e){return ot(this).toSpliced(...e)},unshift(...e){return gt(this,`unshift`,e)},values(){return ut(this,`values`,e=>ct(this,e))}};function ut(e,t,n){let r=st(e),i=r[t],a=i.call(r);if(r!==e&&!Yt(e)){if(a[Symbol.toStringTag]===`Array Iterator`){let e=Object.create(Object.getPrototypeOf(a));return e.next=()=>dt(a.next(),n),i!==ft[t]&&Object.defineProperties(e,{return:{get(){let e=a.return;return typeof e==`function`?e.bind(a):e}},throw:{get(){let e=a.throw;return typeof e==`function`?e.bind(a):e}}}),e}a._next=a.next,a.next=()=>dt(a._next(),n)}return a}function dt(e,t){return e.done||(e.value=t(e.value)),e}var ft=Array.prototype;function pt(e,t,n,r,i,a){let o=st(e),s=o!==e&&!Yt(e),c=o[t];if(c!==ft[t]){let t=c.apply(e,a);return s?Qt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,ct(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function mt(e,t,n,r){let i=st(e),a=i!==e&&!Yt(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=ct(e,t)),n.call(this,t,ct(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?ct(e,c):c}function ht(e,t,n){let r=k(e);O(r,`iterate`,it);let i=r[t](...n);return(i===-1||i===!1)&&Xt(n[0])?(n[0]=k(n[0]),r[t](...n)):i}function gt(e,t,n=[]){Je(),Re();let r=k(e)[t].apply(e,n);return ze(),Ye(),r}var _t=n(`__proto__,__v_isRef,__isVue`),vt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(y));function yt(e){y(e)||(e=String(e));let t=k(this);return O(t,`has`,e),t.hasOwnProperty(e)}var bt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Bt:zt:i?Rt:Lt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=p(e);if(!r){let e;if(a&&(e=lt[t]))return e;if(t===`hasOwnProperty`)return yt}let o=Reflect.get(e,t,A(e)?e:n);if((y(t)?vt.has(t):_t(t))||(r||O(e,`get`,t),i))return o;if(A(o)){let e=a&&ne(t)?o:o.value;return r&&b(e)?Wt(e):e}return b(o)?r?Wt(o):Ht(o):o}},xt=class extends bt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=p(e)&&ne(t);if(!this._isShallow){let e=Jt(i);if(!Yt(n)&&!Jt(n)&&(i=k(i),n=k(n)),!a&&A(i)&&!A(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:f(e,t),s=Reflect.set(e,t,n,A(e)?e:r);return e===k(r)&&s&&(o?le(n,i)&&at(e,`set`,t,n,i):at(e,`add`,t,n)),s}deleteProperty(e,t){let n=f(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&at(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return y(t)&&vt.has(t)||O(e,`has`,t),n}ownKeys(e){return O(e,`iterate`,p(e)?`length`:nt),Reflect.ownKeys(e)}},St=class extends bt{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},Ct=new xt,wt=new St,Tt=new xt(!0),Et=new St(!0),Dt=e=>e,Ot=e=>Reflect.getPrototypeOf(e);function kt(e,t,n){return function(...r){let i=this.__v_raw,a=k(i),o=m(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,u=i[e](...r),d=n?Dt:t?$t:Qt;return!t&&O(a,`iterate`,c?rt:nt),l(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:s?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function At(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function jt(e,t){let n={get(n){let r=this.__v_raw,i=k(r),a=k(n);e||(le(n,a)&&O(i,`get`,n),O(i,`get`,a));let{has:o}=Ot(i),s=t?Dt:e?$t:Qt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&O(k(t),`iterate`,nt),t.size},has(t){let n=this.__v_raw,r=k(n),i=k(t);return e||(le(t,i)&&O(r,`has`,t),O(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=k(a),s=t?Dt:e?$t:Qt;return!e&&O(o,`iterate`,nt),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return l(n,e?{add:At(`add`),set:At(`set`),delete:At(`delete`),clear:At(`clear`)}:{add(e){let n=k(this),r=Ot(n),i=k(e),a=!t&&!Yt(e)&&!Jt(e)?i:e;return r.has.call(n,a)||le(e,a)&&r.has.call(n,e)||le(i,a)&&r.has.call(n,i)||(n.add(a),at(n,`add`,a,a)),this},set(e,n){t||Yt(n)||Jt(n)||(n=k(n));let r=k(this),{has:i,get:a}=Ot(r),o=i.call(r,e);o||=(e=k(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?le(n,s)&&at(r,`set`,e,n,s):at(r,`add`,e,n),this},delete(e){let t=k(this),{has:n,get:r}=Ot(t),i=n.call(t,e);i||=(e=k(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&at(t,`delete`,e,void 0,a),o},clear(){let e=k(this),t=e.size!==0,n=e.clear();return t&&at(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=kt(r,e,t)}),n}function Mt(e,t){let n=jt(e,t);return(r,i,a)=>i===`__v_isReactive`?!e:i===`__v_isReadonly`?e:i===`__v_isShallow`?t:i===`__v_raw`?r:Reflect.get(f(n,i)&&i in r?n:r,i,a)}var Nt={get:Mt(!1,!1)},Pt={get:Mt(!1,!0)},Ft={get:Mt(!0,!1)},It={get:Mt(!0,!0)},Lt=new WeakMap,Rt=new WeakMap,zt=new WeakMap,Bt=new WeakMap;function Vt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Ht(e){return Jt(e)?e:Kt(e,!1,Ct,Nt,Lt)}function Ut(e){return Kt(e,!1,Tt,Pt,Rt)}function Wt(e){return Kt(e,!0,wt,Ft,zt)}function Gt(e){return Kt(e,!0,Et,It,Bt)}function Kt(e,t,n,r,i){if(!b(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Vt(C(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function qt(e){return Jt(e)?qt(e.__v_raw):!!(e&&e.__v_isReactive)}function Jt(e){return!!(e&&e.__v_isReadonly)}function Yt(e){return!!(e&&e.__v_isShallow)}function Xt(e){return e?!!e.__v_raw:!1}function k(e){let t=e&&e.__v_raw;return t?k(t):e}function Zt(e){return!f(e,`__v_skip`)&&Object.isExtensible(e)&&de(e,`__v_skip`,!0),e}var Qt=e=>b(e)?Ht(e):e,$t=e=>b(e)?Wt(e):e;function A(e){return e?e.__v_isRef===!0:!1}function j(e){return tn(e,!1)}function en(e){return tn(e,!0)}function tn(e,t){return A(e)?e:new nn(e,t)}var nn=class{constructor(e,t){this.dep=new $e,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:k(e),this._value=t?e:Qt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Yt(e)||Jt(e);e=n?e:k(e),le(e,t)&&(this._rawValue=e,this._value=n?e:Qt(e),this.dep.trigger())}};function rn(e){return A(e)?e.value:e}function an(e){return _(e)?e():rn(e)}var on={get:(e,t,n)=>t===`__v_raw`?e:rn(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return A(i)&&!A(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function sn(e){return qt(e)?e:new Proxy(e,on)}var cn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new $e(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ze-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&D!==this)return Le(this,!0),!0}get value(){let e=this.dep.track();return Ue(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function ln(e,t,n=!1){let r,i;return _(e)?r=e:(r=e.get,i=e.set),new cn(r,i,n)}var un={},dn=new WeakMap,fn=void 0;function pn(e,t=!1,n=fn){if(n){let t=dn.get(n);t||dn.set(n,t=[]),t.push(e)}}function mn(e,t,n=r){let{immediate:i,deep:o,once:s,scheduler:c,augmentJob:l,call:d}=n,f=e=>o?e:Yt(e)||o===!1||o===0?hn(e,1):hn(e),m,h,g,v,y=!1,b=!1;if(A(e)?(h=()=>e.value,y=Yt(e)):qt(e)?(h=()=>f(e),y=!0):p(e)?(b=!0,y=e.some(e=>qt(e)||Yt(e)),h=()=>e.map(e=>{if(A(e))return e.value;if(qt(e))return f(e);if(_(e))return d?d(e,2):e()})):h=_(e)?t?d?()=>d(e,2):e:()=>{if(g){Je();try{g()}finally{Ye()}}let t=fn;fn=m;try{return d?d(e,3,[v]):e(v)}finally{fn=t}}:a,t&&o){let e=h,t=o===!0?1/0:o;h=()=>hn(e(),t)}let x=Ae(),ee=()=>{m.stop(),x&&x.active&&u(x.effects,m)};if(s&&t){let e=t;t=(...t)=>{try{return e(...t)}finally{ee()}}}let S=b?Array(e.length).fill(un):un,C=e=>{if(m.flags&1&&(m.dirty||e)){if(t){let n=m.run();if(e||o||y||(b?n.some((e,t)=>le(e,S[t])):le(n,S))){let e=fn;Je();try{g&&g(),fn=m;let e=[n,S===un?void 0:b&&S[0]===un?[]:S,v];S=n,d?d(t,3,e):t(...e)}finally{fn=e,Ye()}}}else m.run()}};return l&&l(C),m=new Ne(h),m.scheduler=c?()=>c(C,!1):C,v=e=>pn(e,!1,m),g=m.onStop=()=>{let e=dn.get(m);if(e){if(d)d(e,4);else for(let t of e)t();dn.delete(m)}},t?i?C(!0):S=m.run():c?c(C.bind(null,!0),!0):m.run(),ee.pause=m.pause.bind(m),ee.resume=m.resume.bind(m),ee.stop=ee,ee}function hn(e,t=1/0,n){if(t<=0||!b(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,A(e))hn(e.value,t,n);else if(p(e))for(let r=0;r<e.length;r++)hn(e[r],t,n);else if(h(e)||m(e))e.forEach(e=>{hn(e,t,n)});else if(te(e)){for(let r in e)hn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&hn(e[r],t,n)}return e}function gn(e,t,n,r){try{return r?e(...r):e()}catch(e){vn(e,t,n)}}function _n(e,t,n,r){if(_(e)){let i=gn(e,t,n,r);return i&&x(i)&&i.catch(e=>{vn(e,t,n)}),i}if(p(e)){let i=[];for(let a=0;a<e.length;a++)i.push(_n(e[a],t,n,r));return i}}function vn(e,t,n,i=!0){let a=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||r;if(t){let r=t.parent,i=t.proxy,a=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(t[n](e,i,a)===!1)return}r=r.parent}if(o){Je(),gn(o,null,10,[e,i,a]),Ye();return}}yn(e,n,a,i,s)}function yn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var M=[],bn=-1,xn=[],Sn=null,Cn=0,wn=Promise.resolve(),Tn=null;function En(e){let t=Tn||wn;return e?t.then(this?e.bind(this):e):t}function Dn(e){let t=bn+1,n=M.length;for(;t<n;){let r=t+n>>>1,i=M[r],a=Fn(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function On(e){if(!(e.flags&1)){let t=Fn(e),n=M[M.length-1];!n||!(e.flags&2)&&t>=Fn(n)?M.push(e):M.splice(Dn(t),0,e),e.flags|=1,kn()}}function kn(){Tn||=wn.then(In)}function An(e){if(!p(e))Sn&&e.id===-1?Sn.splice(Cn+1,0,e):e.flags&1||(xn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)xn.push(e[t]);kn()}function jn(e,t,n,r=bn+1){for(;r<M.length;r++){let n=M[r];if(n&&n.flags&2){if(e&&n.id!==e.uid||t!==void 0&&!(n.id>=t))continue;M.splice(r,1),r=e?r-1:bn,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Mn(e,t,n=0){if(xn.length){let e=xn,r=0;if(t){e=[];for(let i=0;i<xn.length;i++){let a=xn[i];(a.i===void 0?t.has(a):!a.i||a.i.uid<n)?xn[r++]=a:e.push(a)}}let i=[...new Set(e)].sort((e,t)=>Fn(e)-Fn(t));if(xn.length=r,Sn){for(let e=0;e<i.length;e++)Sn.push(i[e]);return}for(Sn=i,Cn=0;Cn<Sn.length;Cn++){let e=Sn[Cn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}Sn=null,Cn=0}}var Nn=!1;function Pn(e,t){if(Nn){e();return}let n=t===void 0?void 0:new Set(xn);e(),Nn=!0;try{jn(void 0,t),Mn(void 0,n,t)}finally{Nn=!1}}var Fn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function In(e){try{for(bn=0;bn<M.length;bn++){let e=M[bn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),gn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;bn<M.length;bn++){let e=M[bn];e&&(e.flags&=-2)}bn=-1,M.length=0,Mn(e),Tn=null,(M.length||xn.length)&&In(e)}}var Ln=null,Rn=null;function zn(e){let t=Ln;return Ln=e,Rn=e&&e.type.__scopeId||null,t}function Bn(e,t=Ln,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&hi(-1);let i=zn(t),a=di.length,o;try{o=e(...n)}finally{for(let e=di.length;e>a;e--)pi();zn(i),r._d&&hi(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Vn(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o<i.length;o++){let s=i[o];a&&(s.oldValue=a[o].value);let c=s.dir[r];c&&(Je(),_n(c,n,8,[e.el,s,e,t]),Ye())}}function Hn(e,t){if(L){let n=L.provides,r=L.parent&&L.parent.provides;r===n&&(n=L.provides=Object.create(r)),n[e]=t}}function Un(e,t,n=!1){let r=Pi();if(r||br){let i=br?br._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&_(t)?t.call(r&&r.proxy):t}}var Wn=Symbol.for(`v-scx`),Gn=()=>Un(Wn);function Kn(e,t,n){return qn(e,t,n)}function qn(e,t,n=r){let{immediate:i,deep:o,flush:s,once:c}=n,u=l({},n),d=t&&i||!t&&s!==`post`,f;if(Bi){if(s===`sync`){let e=Gn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=a,e.resume=a,e.pause=a,e}}let p=L;u.call=(e,t,n)=>_n(e,p,t,n);let m=!1;s===`post`?u.scheduler=e=>{e.i=p,P(e,p&&p.suspense)}:s!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():On(e)}),u.augmentJob=e=>{t&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=mn(e,t,u);return Bi&&(f?f.push(h):d&&h()),h}var Jn=Symbol(`_vte`),Yn=e=>e.__isTeleport,Xn=Symbol(`_leaveCb`);function Zn(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==li){t=n;break}}return t}function Qn(e){if(!sr(e))return Yn(e.type)&&e.children?Zn(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&_(n.default))return n.default()}}function $n(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;$n(Yn(n.type)&&Qn(n)||n,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===F&&p(e.children)){let n=Er(e.children,!1);n&&$n(n,t)}}function er(e){if(e.component)return er(e.component.subTree);if(e.type===F){let t=p(e.children)&&Er(e.children,!1);return t?er(t):void 0}if(e.type!==li)return e}function N(e,t){return _(e)?l({name:e.name},t,{setup:e}):e}function tr(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function nr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var rr=new WeakMap;function ir(e,t,n,i,a=!1){if(p(e)){e.forEach((e,r)=>ir(e,t&&(p(t)?t[r]:t),n,i,a));return}if(or(i)&&!a){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&ir(e,t,n,i.component.subTree);return}let s=i.shapeFlag&4?Yi(i.component):i.el,c=a?null:s,{i:l,r:d}=e,m=t&&t.r,h=l.refs===r?l.refs={}:l.refs,g=l.setupState,y=k(g),b=g===r?o:e=>!nr(h,e)&&f(y,e),x=(e,t)=>!(t&&nr(h,t));if(m!=null&&m!==d){if(ar(t),v(m))h[m]=null,b(m)&&(g[m]=null);else if(A(m)){let e=t;x(m,e.k)&&(m.value=null),e.k&&(h[e.k]=null)}}if(_(d))gn(d,l,12,[c,h]);else{let t=v(d),r=A(d);if(t||r){let i=()=>{if(e.f){let n=t?b(d)?g[d]:h[d]:x(d)||!e.k?d.value:h[e.k];if(a)p(n)&&u(n,s);else if(p(n))n.includes(s)||n.push(s);else if(t)h[d]=[s],b(d)&&(g[d]=h[d]);else{let t=[s];x(d,e.k)&&(d.value=t),e.k&&(h[e.k]=t)}}else t?(h[d]=c,b(d)&&(g[d]=c)):r&&(x(d,e.k)&&(d.value=c),e.k&&(h[e.k]=c))};if(c){let t=()=>{i(),rr.delete(e)};t.id=-1,rr.set(e,t),P(t,n)}else ar(e),i()}}}function ar(e){let t=rr.get(e);t&&(t.flags|=8,rr.delete(e))}he().requestIdleCallback,he().cancelIdleCallback;var or=e=>!!e.type.__asyncLoader,sr=e=>e.type.__isKeepAlive;function cr(e,t,n=L,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Je();let i=Li(n),a=_n(t,n,e,r);return i(),Ye(),a};return r?i.unshift(a):i.push(a),a}}var lr=e=>(t,n=L)=>{Bi&&e!==`sp`||cr(e,(...e)=>t(...e),n)},ur=lr(`m`),dr=lr(`bum`),fr=Symbol.for(`v-ndc`),pr=e=>e?zi(e)?Yi(e):pr(e.parent):null,mr=l(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>pr(e.parent),$root:e=>pr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>e.type,$forceUpdate:e=>e.f||=()=>{On(e.update)},$nextTick:e=>e.n||=En.bind(e.proxy),$watch:e=>a}),hr=(e,t)=>e!==r&&!e.__isScriptSetup&&f(e,t),gr={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(t[0]!==`$`){let e=s[t];if(e!==void 0)switch(e){case 1:return i[t];case 2:return a[t];case 4:return n[t];case 3:return o[t]}else if(hr(i,t))return s[t]=1,i[t];else if(f(o,t))return s[t]=3,o[t];else if(n!==r&&f(n,t))return s[t]=4,n[t];else s[t]=0}let u=mr[t],d,p;if(u)return t===`$attrs`&&O(e.attrs,`get`,``),u(e);if((d=c.__cssModules)&&(d=d[t]))return d;if(n!==r&&f(n,t))return s[t]=4,n[t];if(p=l.config.globalProperties,f(p,t))return p[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return hr(i,t)?(i[t]=n,!0):f(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,props:a,type:o}},s){let c;return!!(n[s]||hr(t,s)||f(a,s)||f(r,s)||f(mr,s)||f(i.config.globalProperties,s)||(c=o.__cssModules)&&c[s])},defineProperty(e,t,n){return n.get==null?f(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function _r(){return{app:null,config:{isNativeTag:o,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var vr=0;function yr(e,t){return function(n,r=null){_(n)||(n=l({},n)),r!=null&&!b(r)&&(r=null);let i=_r(),a=new WeakSet,o=[],s=!1,c=i.app={_uid:vr++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:Zi,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&_(e.install)?(a.add(e),e.install(c,...t)):_(e)&&(a.add(e),e(c,...t))),c},mixin(e){return c},component(e,t){return t?(i.components[e]=t,c):i.components[e]},directive(e,t){return t?(i.directives[e]=t,c):i.directives[e]},mount(a,o,l){if(!s){let u=c._ceVNode||I(n,r);return u.appContext=i,l===!0?l=`svg`:l===!1&&(l=void 0),o&&t?t(u,a):e(u,a,l),s=!0,c._container=a,a.__vue_app__=c,Yi(u.component)}},onUnmount(e){o.push(e)},unmount(){s&&(_n(o,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(e,t){return i.provides[e]=t,c},runWithContext(e){let t=br;br=c;try{return e()}finally{br=t}}};return c}}var br=null,xr=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${w(t)}Modifiers`]||e[`${T(t)}Modifiers`];function Sr(e,t,...n){if(e.isUnmounted)return;let i=e.vnode.props||r,a=n,o=t.startsWith(`update:`),s=o&&xr(i,t.slice(7));s&&(s.trim&&(a=n.map(e=>v(e)?e.trim():e)),s.number&&(a=a.map(fe)));let c,l=i[c=ce(t)]||i[c=ce(w(t))];!l&&o&&(l=i[c=ce(T(t))]),l&&_n(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,_n(u,e,6,a)}}function Cr(e,t,n=!1){let r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={};return a?(p(a)?a.forEach(e=>o[e]=null):l(o,a),b(e)&&r.set(e,o),o):(b(e)&&r.set(e,null),null)}function wr(e,t){return!e||!s(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),f(e,t[0].toLowerCase()+t.slice(1))||f(e,T(t))||f(e,t))}function Tr(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=zn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Ti(u.call(t,e,d,f,m,p,h)),y=s}else{let e=t;v=Ti(e.length>1?e(f,{attrs:s,slots:o,emit:l}):e(f,null)),y=t.props?s:Dr(s)}}catch(t){di.length=0,vn(t,e,1),v=I(li)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(c)&&(y=Or(y,a)),b=Ci(b,y,!1,!0))}return n.dirs&&(b=Ci(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&$n(Yn(b.type)&&Qn(b)||b,n.transition),v=b,zn(_),v}function Er(e,t=!0){let n;for(let t=0;t<e.length;t++){let r=e[t];if(gi(r)){if(r.type!==li||r.children===`v-if`){if(n)return;n=r}}else return}return n}var Dr=e=>{let t;for(let n in e)(n===`class`||n===`style`||s(n))&&((t||={})[n]=e[n]);return t},Or=(e,t)=>{let n={};for(let r in e)c(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function kr(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Ar(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(jr(o,r,n)&&!wr(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?!o||Ar(r,o,l):!!o;return!1}function Ar(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(!f(e,a)||jr(t,e,a)&&!wr(n,a))return!0}return!1}function jr(e,t,n){let r=e[n],i=t[n];return n===`style`&&b(r)&&b(i)?!Oe(r,i):r!==i}function Mr({vnode:e,parent:t,suspense:n},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}var Nr={},Pr=()=>Object.create(Nr),Fr=e=>Object.getPrototypeOf(e)===Nr;function Ir(e,t,n,r=!1){let i={},a=Pr();e.propsDefaults=Object.create(null),Rr(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:Ut(i):e.type.props?i:a,e.attrs=a}function Lr(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=k(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(wr(e.emitsOptions,o))continue;let u=t[o];if(c){if(f(a,o))u!==a[o]&&(a[o]=u,l=!0);else{let t=w(o);i[t]=zr(c,s,t,u,e,!1)}}else u!==a[o]&&(a[o]=u,l=!0)}}}else{Rr(e,t,i,a)&&(l=!0);let r;for(let a in s)t&&(f(t,a)||(r=T(a))!==a&&f(t,r))||(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=zr(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)t&&f(t,e)||(delete a[e],l=!0)}l&&at(e.attrs,`set`,``)}function Rr(e,t,n,i){let[a,o]=e.propsOptions,s=!1,c;if(t)for(let r in t){if(re(r))continue;let l=t[r],u;a&&f(a,u=w(r))?!o||!o.includes(u)?n[u]=l:(c||={})[u]=l:wr(e.emitsOptions,r)||r in i&&l===i[r]||(i[r]=l,s=!0)}if(o){let t=k(n),i=c||r;for(let r=0;r<o.length;r++){let s=o[r];n[s]=zr(a,t,s,i[s],e,!f(i,s))}}return s}function zr(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=f(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&_(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=Li(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===T(n))&&(r=!0))}return r}function Br(e,t,n=!1){let a=t.propsCache,o=a.get(e);if(o)return o;let s=e.props,c={},u=[];if(!s)return b(e)&&a.set(e,i),i;if(p(s))for(let e=0;e<s.length;e++){let t=w(s[e]);Vr(t)&&(c[t]=r)}else if(s)for(let e in s){let t=w(e);if(Vr(t)){let n=s[e],r=c[t]=p(n)||_(n)?{type:n}:l({},n),i=r.type,a=!1,o=!0;if(p(i))for(let e=0;e<i.length;++e){let t=i[e],n=_(t)&&t.name;if(n===`Boolean`){a=!0;break}n===`String`&&(o=!1)}else a=_(i)&&i.name===`Boolean`;r[0]=a,r[1]=o,(a||f(r,`default`))&&u.push(t)}}let d=[c,u];return b(e)&&a.set(e,d),d}function Vr(e){return e[0]!==`$`&&!re(e)}var Hr=e=>e===`_`||e===`_ctx`||e===`$stable`,Ur=e=>p(e)?e.map(Ti):[Ti(e)],Wr=(e,t,n)=>{if(t._n)return t;let r=Bn((...e)=>Ur(t(...e)),n);return r._c=!1,r},Gr=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Hr(n))continue;let i=e[n];if(_(i))t[n]=Wr(n,i,r);else if(i!=null){let e=Ur(i);t[n]=()=>e}}},Kr=(e,t)=>{let n=Ur(t);e.slots.default=()=>n},qr=(e,t,n)=>{for(let r in t)(n||!Hr(r))&&(e[r]=t[r])},Jr=(e,t,n)=>{let r=e.slots=Pr();if(e.vnode.shapeFlag&32){let e=t._;e?(qr(r,t,n),n&&de(r,`_`,e,!0)):Gr(t,r)}else t&&Kr(e,t)},Yr=(e,t,n)=>{let{vnode:i,slots:a}=e,o=!0,s=r;if(i.shapeFlag&32){let e=t._;e?n&&e===1?o=!1:qr(a,t,n):(o=!t.$stable,Gr(t,a)),s=t}else t&&(Kr(e,t),s={default:1});if(o)for(let e in a)!Hr(e)&&s[e]==null&&delete a[e]},P=si;function Xr(e){return Zr(e)}function Zr(e,t){let n=he();n.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=a,insertStaticContent:_}=e,v=(e,t,n,r=null,a=null,o=null,s=void 0,c=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!_i(e,t)&&(r=Ce(e),ve(e,a,o,!0),e=null),t.patchFlag===-2&&(l=!1,t.dynamicChildren=null),t.dynamicChildren&&e&&e.dynamicChildren&&e.dynamicChildren.hasOnce&&(t.dynamicChildren===i&&(t.dynamicChildren=[]),t.dynamicChildren.hasOnce=!0);let{type:u,ref:d,shapeFlag:f}=t;switch(u){case ci:y(e,t,n,r);break;case li:b(e,t,n,r);break;case ui:e??x(t,n,r,s);break;case F:T(e,t,n,r,a,o,s,c,l);break;default:f&1?C(e,t,n,r,a,o,s,c,l):f&6?se(e,t,n,r,a,o,s,c,l):(f&64||f&128)&&u.process(e,t,n,r,a,o,s,c,l,Te)}d!=null&&a?ir(d,e&&e.ref,o,t||e,!t):d==null&&e&&e.ref!=null&&ir(e.ref,null,o,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},ee=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},S=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},C=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)te(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),ae(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},te=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&ie(e.children,d,null,r,i,Qr(e,a),s,u),_&&Vn(e,null,r,`created`),ne(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!re(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&ki(f,r,e)}_&&Vn(e,null,r,`beforeMount`);let v=ei(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&P(()=>{try{f&&ki(f,r,e),v&&g.enter(d),_&&Vn(e,null,r,`mounted`)}finally{}},i)},ne=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||oi(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;ne(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},ie=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++){let c=e[l]=s?Ei(e[l]):Ti(e[l]);v(null,c,t,n,r,i,a,o,s)}},ae=(e,t,n,i,a,o,s)=>{let l=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=e.patchFlag&16;let m=e.props||r,h=t.props||r,g;if(n&&$r(n,!1),(g=h.onVnodeBeforeUpdate)&&ki(g,n,t,e),f&&Vn(t,e,n,`beforeUpdate`),n&&$r(n,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(u=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?w(e.dynamicChildren,d,l,n,i,Qr(t,a),o):s||pe(e,t,l,null,n,i,Qr(t,a),o,!1),u>0){if(u&16)oe(l,m,h,n,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let r=e[t],i=m[r],o=h[r];(o!==i||r===`value`)&&c(l,r,i,o,a,n)}}u&1&&e.children!==t.children&&p(l,t.children)}else!s&&d==null&&oe(l,m,h,n,a);((g=h.onVnodeUpdated)||f)&&P(()=>{g&&ki(g,n,t,e),f&&Vn(t,e,n,`updated`)},i)},w=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s],u=c.el||ai(c),d=u&&(c.type===F||!_i(c,l)||c.shapeFlag&198)?m(u):n;v(c,l,d,null,r,i,a,o,!0)}},oe=(e,t,n,i,a)=>{if(t!==n){if(t!==r)for(let r in t)!re(r)&&!(r in n)&&c(e,r,t[r],null,a,i);for(let r in n){if(re(r))continue;let o=n[r],s=t[r];o!==s&&r!==`value`&&c(e,r,s,o,a,i)}`value`in n&&c(e,`value`,t.value,n.value,a)}},T=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),ie(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(w(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&ti(e,t,!0)):pe(e,t,n,f,i,a,s,c,l)},se=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):ce(t,n,r,i,a,o,c):le(e,t,c)},ce=(e,t,n,r,i,a,o)=>{let s=e.component=Ni(e,r,i);if(sr(e)&&(s.ctx.renderer=Te),Vi(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,de,o,a),!e.el){let r=s.subTree=I(li);b(null,r,t,n),e.placeholder=r.el}}else de(s,e,t,n,i,a,o)},le=(e,t,n)=>{let r=t.component=e.component;if(kr(e,t,n)){if(r.asyncDep&&!r.asyncResolved){t.el=e.el,t.placeholder=e.placeholder,fe(r,t,n);return}r.next=t,r.update()}else t.el=e.el,t.placeholder=e.placeholder,r.vnode=t},de=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=ri(e);if(n){t&&(t.el=c.el,fe(e,t,o)),n.asyncDep.then(()=>{P(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;$r(e,!1),t?(t.el=c.el,fe(e,t,o)):t=c,n&&ue(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&ki(d,s,t,c),$r(e,!0);let f=Tr(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),Ce(p),e,i,a),t.el=f.el,u===null&&Mr(e,f.el),r&&P(r,i),(d=t.props&&t.props.onVnodeUpdated)&&P(()=>ki(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=or(t);if($r(e,!1),l&&ue(l),!m&&(o=c&&c.onVnodeBeforeMount)&&ki(o,d,t),$r(e,!0),s&&De){let t=()=>{e.subTree=Tr(e),De(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=Tr(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&P(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;P(()=>ki(o,d,e),i)}(t.shapeFlag&256||d&&or(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&P(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Ne(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>On(u),$r(e,!0),l()},fe=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,Lr(e,t.props,r,n),Yr(e,t.children,n),Je(),jn(e),Ye()},pe=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){ge(l,d,n,r,i,a,o,s,c);return}if(f&256){me(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&Se(l,i,a),d!==l&&p(n,d)):u&16?m&16?ge(l,d,n,r,i,a,o,s,c):Se(l,i,a,!0):(u&8&&p(n,``),m&16&&ie(d,n,r,i,a,o,s,c))},me=(e,t,n,r,a,o,s,c,l)=>{e||=i,t||=i;let u=e.length,d=t.length,f=Math.min(u,d),p=0;for(;p<f;p++){let r=t[p]=l?Ei(t[p]):Ti(t[p]);v(e[p],r,n,null,a,o,s,c,l)}u>d?Se(e,a,o,!0,!1,f):ie(t,n,r,a,o,s,c,l,f)},ge=(e,t,n,r,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let r=e[u],i=t[u]=l?Ei(t[u]):Ti(t[u]);if(_i(r,i))v(r,i,n,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let r=e[f],i=t[p]=l?Ei(t[p]):Ti(t[p]);if(_i(r,i))v(r,i,n,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,i=e<d?t[e].el:r;for(;u<=p;)v(null,t[u]=l?Ei(t[u]):Ti(t[u]),n,i,a,o,s,c,l),u++}}else if(u>p)for(;u<=f;)ve(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?Ei(t[u]):Ti(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,ee=0,S=Array(b);for(u=0;u<b;u++)S[u]=0;for(u=m;u<=f;u++){let r=e[u];if(y>=b){ve(r,a,o,!0);continue}let i;if(r.key!=null)i=g.get(r.key);else for(_=h;_<=p;_++)if(S[_-h]===0&&_i(r,t[_])){i=_;break}i===void 0?ve(r,a,o,!0):(S[i-h]=u+1,i>=ee?ee=i:x=!0,v(r,t[i],n,null,a,o,s,c,l),y++)}let C=x?ni(S):i;for(_=C.length-1,u=b-1;u>=0;u--){let e=h+u,i=t[e],f=t[e+1],p=e+1<d?f.el||ai(f):r;S[u]===0?v(null,i,n,p,a,o,s,c,l):x&&(_<0||u!==C[_]?_e(i,n,p,2):_--)}}},_e=(e,t,n,r,i=null)=>{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6)_e(e.component.subTree,t,n,r);else if(d&128)e.suspense.move(t,n,r);else if(d&64)c.move(e,t,n,Te);else if(c===F){o(a,t,n);for(let e=0;e<u.length;e++)_e(u[e],t,n,r);o(e.anchor,t,n)}else if(c===ui)ee(e,t,n);else if(r!==2&&d&1&&l){if(r===0)l.persisted&&!a[Xn]?o(a,t,n):(l.beforeEnter(a),o(a,t,n),P(()=>l.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[Xn];a._isLeaving&&a[Xn](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}}else o(a,t,n)},ve=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if((d===-2||l&&l.hasOnce)&&(i=!1),s!=null&&(Je(),ir(s,null,n,e,!0),Ye()),p==null||e.ctx&&e.ctx!==t||(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!or(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&ki(_,t,e),u&6)xe(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Vn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,Te,r):l&&!l.hasOnce&&(a!==F||d>0&&d&64)?Se(l,t,n,!1,!0):(a===F&&d&384||!i&&u&16)&&Se(c,t,n),r&&ye(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&P(()=>{_&&ki(_,t,e),h&&Vn(e,null,t,`unmounted`),v&&(e.el=null)},n)},ye=e=>{let{type:t,el:n,anchor:r,transition:i}=e,a=t===F;if(a&&!i){be(n,r);return}if(t===ui){S(e),i&&!i.persisted&&i.afterLeave&&i.afterLeave();return}let o=a?er(e):e,c=()=>{a?m(n)&&be(n,r):s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(o&&o.shapeFlag&1&&i&&!i.persisted){let{leave:e,delayLeave:t}=i,n=o.el,r=()=>e(n,c);t?t(n,c,r):r()}else c()},be=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},xe=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;ii(c),ii(l),r&&ue(r),i.stop(),a?(a.flags|=8,ve(o,e,t,n)):e.vnode.el&&o&&(o.transition=e.vnode.transition,ve(o,e,t,n)),s&&P(s,t),P(()=>{e.isUnmounted=!0},t)},Se=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)ve(e[o],t,n,r,i)},Ce=e=>{if(e.shapeFlag&6)return Ce(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Jn];return n?h(n):t},we=(e,t,n)=>{Pn(()=>{e==null?t._vnode&&ve(t._vnode,null,null,!0):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e},e&&t._vnode?void 0:e&&e.component?e.component.uid:Mi())},Te={p:v,um:ve,m:_e,r:ye,mt:ce,mc:ie,pc:pe,pbc:w,n:Ce,o:e},Ee,De;return t&&([Ee,De]=t(Te)),{render:we,hydrate:Ee,createApp:yr(we,Ee)}}function Qr({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function $r({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ei(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ti(e,t,n=!1){let r=e.children,i=t.children;if(p(r)&&p(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=Ei(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&ti(t,a)),a.type===ci&&(a.patchFlag===-1&&(a=i[e]=Ei(a)),a.el=t.el),a.type===li&&!a.el&&(a.el=t.el)}}function ni(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function ri(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ri(t)}function ii(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ai(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?ai(t.subTree):null}var oi=e=>e.__isSuspense;function si(e,t){t&&t.pendingBranch?p(e)?t.effects.push(...e):t.effects.push(e):An(e)}var F=Symbol.for(`v-fgt`),ci=Symbol.for(`v-txt`),li=Symbol.for(`v-cmt`),ui=Symbol.for(`v-stc`),di=[],fi=null;function pi(){di.pop(),fi=di[di.length-1]||null}var mi=1;function hi(e,t=!1){mi+=e,e<0&&fi&&t&&(fi.hasOnce=!0)}function gi(e){return e?e.__v_isVNode===!0:!1}function _i(e,t){return e.type===t.type&&e.key===t.key}var vi=({key:e})=>e??null,yi=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:v(e)||A(e)||_(e)?{i:Ln,r:e,k:t,f:!!n}:e);function bi(e,t=null,n=null,r=0,i=null,a=e===F?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&vi(t),ref:t&&yi(t),scopeId:Rn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Ln};return s?(Di(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=v(n)?8:16),mi>0&&!o&&fi&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&fi.push(c),c}var I=xi;function xi(e,t=null,n=null,r=0,i=null,a=!1){if(e&&e!==fr||(e=li),gi(e)){let r=Ci(e,t,!0);return n&&Di(r,n),mi>0&&!a&&fi&&(r.shapeFlag&6?fi[fi.indexOf(e)]=r:fi.push(r)),r.patchFlag=-2,r}if(Xi(e)&&(e=e.__vccOpts),t){t=Si(t);let{class:e,style:n}=t;e&&!v(e)&&(t.class=xe(e)),b(n)&&(Xt(n)&&!p(n)&&(n=l({},n)),t.style=ge(n))}let o=v(e)?1:oi(e)?128:Yn(e)?64:b(e)?4:_(e)?2:0;return bi(e,t,n,r,i,o,a,!0)}function Si(e){return e?Xt(e)||Fr(e)?l({},e):e:null}function Ci(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?Oi(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&vi(l),ref:t&&t.ref?n&&a?p(a)?a.concat(yi(t)):[a,yi(t)]:yi(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==F?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ci(e.ssContent),ssFallback:e.ssFallback&&Ci(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&r&&$n(u,c.clone(u)),u}function wi(e=` `,t=0){return I(ci,null,e,t)}function Ti(e){return e==null||typeof e==`boolean`?I(li):p(e)?I(F,null,e.slice()):gi(e)?Ei(e):I(ci,null,String(e))}function Ei(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ci(e)}function Di(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(p(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Di(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!Fr(t)?t._ctx=Ln:r===3&&Ln&&(Ln.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(_(t)){if(r&65){Di(e,{default:t});return}t={default:t,_ctx:Ln},n=32}else t=String(t),r&64?(n=16,t=[wi(t)]):n=8;e.children=t,e.shapeFlag|=n}function Oi(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=xe([t.class,r.class]));else if(e===`style`)t.style=ge([t.style,r.style]);else if(s(e)){let n=t[e],i=r[e];i&&n!==i&&!(p(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!c(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function ki(e,t,n,r=null){_n(e,t,7,[n,r])}var Ai=_r(),ji=0;function Mi(){return ji}function Ni(e,t,n){let i=e.type,a=(t?t.appContext:e.appContext)||Ai,o={uid:ji++,vnode:e,type:i,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ke(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Br(i,a),emitsOptions:Cr(i,a),emit:null,emitted:null,propsDefaults:r,inheritAttrs:i.inheritAttrs,ctx:r,data:r,props:r,attrs:r,slots:r,refs:r,setupState:r,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=Sr.bind(null,o),e.ce&&e.ce(o),o}var L=null,Pi=()=>L||Ln,Fi,Ii;{let e=he(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Fi=t(`__VUE_INSTANCE_SETTERS__`,e=>L=e),Ii=t(`__VUE_SSR_SETTERS__`,e=>Bi=e)}var Li=e=>{let t=L;return Fi(e),e.scope.on(),()=>{e.scope.off(),Fi(t)}},Ri=()=>{L&&L.scope.off(),Fi(null)};function zi(e){return e.vnode.shapeFlag&4}var Bi=!1;function Vi(e,t=!1,n=!1){t&&Ii(t);let{props:r,children:i}=e.vnode,a=zi(e);Ir(e,r,a,t),Jr(e,i,n||t);let o=a?Hi(e,t):void 0;return t&&Ii(!1),o}function Hi(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,gr);let{setup:r}=n;if(r){Je();let n=e.setupContext=r.length>1?Ji(e):null,i=Li(e),a=gn(r,e,0,[e.props,n]),o=x(a);if(Ye(),i(),(o||e.sp)&&!or(e)&&tr(e),o){if(a.then(Ri,Ri),t)return a.then(n=>{Ii(!0);try{Ui(e,n,t)}finally{Ii(!1)}}).catch(t=>{vn(t,e,0)});e.asyncDep=a}else Ui(e,a,t)}else Ki(e,t)}function Ui(e,t,n){_(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:b(t)&&(e.setupState=sn(t)),Ki(e,n)}var Wi,Gi;function Ki(e,t,n){let r=e.type;if(!e.render){if(!t&&Wi&&!r.render){let t=r.template||!1;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r;r.render=Wi(t,l(l({isCustomElement:n,delimiters:a},i),o))}}e.render=r.render||a,Gi&&Gi(e)}}var qi={get(e,t){return O(e,`get`,``),e[t]}};function Ji(e){return{attrs:new Proxy(e.attrs,qi),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Yi(e){return e.exposed?e.exposeProxy||=new Proxy(sn(Zt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in mr)return mr[n](e)},has(e,t){return t in e||t in mr}}):e.proxy}function Xi(e){return _(e)&&`__vccOpts`in e}var R=(e,t)=>ln(e,t,Bi);function z(e,t,n){try{hi(-1);let r=arguments.length;return r===2?b(t)&&!p(t)?gi(t)?I(e,null,[t]):I(e,t):I(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&gi(n)&&(n=[n]),I(e,t,n))}finally{hi(1)}}var Zi=`3.5.44`,Qi=void 0,$i=typeof window<`u`&&window.trustedTypes;if($i)try{Qi=$i.createPolicy(`vue`,{createHTML:e=>e})}catch{}var ea=Qi?e=>Qi.createHTML(e):e=>e,ta=`http://www.w3.org/2000/svg`,na=`http://www.w3.org/1998/Math/MathML`,ra=typeof document<`u`?document:null,ia=ra&&ra.createElement(`template`),aa={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?ra.createElementNS(ta,e):t===`mathml`?ra.createElementNS(na,e):n?ra.createElement(e,{is:n}):ra.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>ra.createTextNode(e),createComment:e=>ra.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ra.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==a&&(i=i.nextSibling););else{ia.innerHTML=ea(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=ia.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},oa=Symbol(`_vtc`);function sa(e,t,n){let r=e[oa];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var ca=Symbol(`_vod`),la=Symbol(`_vsh`),ua=Symbol(``),da=/(?:^|;)\s*display\s*:/;function fa(e,t,n){let r=e.style,i=v(n),a=!1;if(n&&!i){if(t){if(v(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??ma(r,t,``)}else for(let e in t)n[e]??ma(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?ma(r,i,``):va(e,i,!v(t)&&t?t[i]:void 0,o)||ma(r,i,o)}}else if(i){if(t!==n){let e=r[ua];e&&(n+=`;`+e),r.cssText=n,a=da.test(n)}}else t&&e.removeAttribute(`style`);ca in e&&(i&&t===n||(e[ca]=a?r.display:``),e[la]&&(r.display=`none`))}var pa=/\s*!important$/;function ma(e,t,n){if(p(n))n.forEach(n=>ma(e,t,n));else if(n??=``,t.startsWith(`--`))pa.test(n)?e.setProperty(t,n.replace(pa,``),`important`):e.setProperty(t,n);else{let r=_a(e,t);pa.test(n)?e.setProperty(T(r),n.replace(pa,``),`important`):e[r]=n}}var ha=[`Webkit`,`Moz`,`ms`],ga={};function _a(e,t){let n=ga[t];if(n)return n;let r=w(t);if(r!==`filter`&&r in e)return ga[t]=r;r=se(r);for(let n=0;n<ha.length;n++){let i=ha[n]+r;if(i in e)return ga[t]=i}return t}function va(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&v(r)&&n===r}var ya=`http://www.w3.org/1999/xlink`;function ba(e,t,n,r,i,a=Se(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(ya,t.slice(6,t.length)):e.setAttributeNS(ya,t,n):n==null||a&&!Ce(n)?e.removeAttribute(t):e.setAttribute(t,a?``:y(n)?String(n):n)}function xa(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?ea(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);r===i&&`_value`in e||(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=Ce(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function Sa(e,t,n,r){e.addEventListener(t,n,r)}function Ca(e,t,n,r){e.removeEventListener(t,n,r)}var wa=Symbol(`_vei`);function Ta(e,t,n,r,i=null){let a=e[wa]||(e[wa]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=Oa(t);r?Sa(e,n,a[t]=Ma(r,i),s):o&&(Ca(e,n,o,s),a[t]=void 0)}}var Ea=/(Once|Passive|Capture)$/,Da=/^on:?(?:Once|Passive|Capture)$/;function Oa(e){let t,n;for(;(n=e.match(Ea))&&!Da.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):T(e.slice(2)),t]}var ka=0,Aa=Promise.resolve(),ja=()=>ka||=(Aa.then(()=>ka=0),Date.now());function Ma(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(p(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&_n(e,t,5,a)}}else _n(r,t,5,[e])};return n.value=e,n.attached=ja(),n}var Na=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Pa=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?sa(e,r,o):t===`style`?fa(e,n,r):s(t)?c(t)||Ta(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):Fa(e,t,r,o))?(xa(e,t,r),e.tagName.includes(`-`)||t!==`value`&&t!==`checked`&&t!==`selected`||ba(e,t,r,o,a,t!==`value`)):e._isVueCE&&(Ia(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!v(r)))?xa(e,w(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),ba(e,t,r,o))};function Fa(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&Na(t)&&_(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return Na(t)&&v(n)?!1:t in e}function Ia(e,t){let n=e._def.props;if(!n)return!1;let r=w(t);return Array.isArray(n)?n.some(e=>w(e)===r):Object.keys(n).some(e=>w(e)===r)}var La={};function Ra(e,t,n){let r=N(e,t);te(r)&&(r=l({},r,t));class i extends Ba{constructor(e){super(r,e,n)}}return i.def=r,i}var za=typeof HTMLElement<`u`?HTMLElement:class{},Ba=class e extends za{constructor(e,t={},n=Ga){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==Ga?this._root=this.shadowRoot:e.shadowRoot===!1?this._root=this:(this.attachShadow(l({},e.shadowRootOptions,{mode:`open`})),this._root=this.shadowRoot)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t&&=t.assignedSlot||t.parentNode||t.host;)if(t instanceof e){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{if(this._pendingResolve=void 0,this.isConnected)return this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,En(()=>{this._connected||(this._ob&&=(this._ob.disconnect(),null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&=(this._teleportTargets.clear(),void 0))})}_processMutations(e){for(let t of e)this._setAttr(t.attributeName)}_resolveDef(){if(this._pendingResolve)return this._pendingResolve;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{this._resolved=!0,this._pendingResolve=void 0;let{props:n,styles:r}=e,i;if(n&&!p(n))for(let e in n){let t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=pe(this._props[e])),(i||=Object.create(null))[w(e)]=!0)}this._numberProps=i,this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._connected&&this._mount(e)},t=this._def.__asyncLoader;if(t)return this._pendingResolve=t().then(t=>{t.configureApp=this._def.configureApp,e(this._def=t,!0)}),this._pendingResolve;e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)f(this,e)||Object.defineProperty(this,e,{get:()=>rn(t[e])})}_resolveProps(e){let{props:t}=e,n=p(t)?t:Object.keys(t||{});for(let e of Object.keys(this))e[0]!==`_`&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(w))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!this._patching)}})}_setAttr(e){if(e.startsWith(`data-v-`))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):La,r=w(e);t&&this._numberProps&&this._numberProps[r]&&(n=pe(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(this._dirty=!0,t===La?delete this._props[e]:(this._props[e]=t,e===`key`&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&(this._processMutations(n.takeRecords()),n.disconnect()),t===!0?this.setAttribute(T(e),``):typeof t==`string`||typeof t==`number`?this.setAttribute(T(e),t+``):t||this.removeAttribute(T(e)),n&&n.observe(this,{attributes:!0})}}_update(){let e=this._createVNode();this._app&&(e.appContext=this._app._context),Wa(e,this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=I(this._def,l(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,te(t[0])?l({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),T(e)!==e&&t(T(e),n)},this._setParent()}),t}_applyStyles(e,t,n){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let r=this._nonce,i=this.shadowRoot,a=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i),o=null;for(let s=e.length-1;s>=0;s--){let c=document.createElement(`style`);r&&c.setAttribute(`nonce`,r),c.textContent=e[s],i.insertBefore(c,o||a),o=c,s===0&&(n||this._styleAnchors.set(this._def,c),t&&this._styleAnchors.set(t,c))}}_getStyleAnchor(e){if(!e)return null;let t=this._styleAnchors.get(e);return t&&t.parentNode===this.shadowRoot?t:(t&&this._styleAnchors.delete(e),null)}_getRootStyleInsertionAnchor(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if(!(n instanceof HTMLStyleElement))return n}return null}_parseSlots(){let e=this._slots={},t;for(;t=this.firstChild;){let n=t.nodeType===1&&t.getAttribute(`slot`)||`default`;(e[n]||(e[n]=[])).push(t),this.removeChild(t)}}_renderSlots(){let e=this._getSlots(),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){let r=e[n],i=r.getAttribute(`name`)||`default`,a=this._slots[i],o=r.parentNode;if(a)for(let e of a){if(t&&e.nodeType===1){let n=t+`-s`,r=document.createTreeWalker(e,1);e.setAttribute(n,``);let i;for(;i=r.nextNode();)i.setAttribute(n,``)}o.insertBefore(e,r)}else for(;r.firstChild;)o.insertBefore(r.firstChild,r);o.removeChild(r)}}_getSlots(){let e=[this];this._teleportTargets&&e.push(...this._teleportTargets);let t=new Set;for(let n of e){let e=n.querySelectorAll(`slot`);for(let n=0;n<e.length;n++)t.add(e[n])}return Array.from(t)}_injectChildStyle(e,t){this._applyStyles(e.styles,e,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(e){}},Va=l({patchProp:Pa},aa),Ha;function Ua(){return Ha||=Xr(Va)}var Wa=((...e)=>{Ua().render(...e)}),Ga=((...e)=>{let t=Ua().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=qa(e);if(!r)return;let i=t._component;_(i)||i.render||i.template||(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Ka(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function Ka(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function qa(e){return v(e)?document.querySelector(e):e}var B=class extends Error{kind;status;fields;items;retryAfterSeconds;constructor(e,t,n={}){super(`API error ${e} (${t})`),this.name=`ApiError`,this.kind=e,this.status=t,this.fields=n.fields??[],this.items=n.items??[],this.retryAfterSeconds=n.retryAfterSeconds}};function Ja(e){let t=`redirect_url`in e?e.redirect_url:e.form.action;try{return new URL(t).protocol===`https:`}catch{return!1}}function Ya(e){let{apiBase:t,landingSlug:n}=e,r=e.fetch??((...e)=>globalThis.fetch(...e));async function i(e,n={}){let i;try{i=await r(`${t}${e}`,{...n,credentials:`omit`})}catch(e){throw new B(e.name===`AbortError`?`aborted`:`network`,0)}let a;try{a=await i.json()}catch{a=void 0}if(i.ok)return a;let o=a??{},s=Number(i.headers.get(`retry-after`));throw new B(typeof o.error==`string`?o.error:`unexpected`,i.status,{...Array.isArray(o.fields)&&{fields:o.fields},...Array.isArray(o.items)&&{items:o.items},...Number.isFinite(s)&&i.headers.has(`retry-after`)&&{retryAfterSeconds:s}})}let a=(e,t,n)=>`/v1/public/orders/${encodeURIComponent(e)}/${n}?t=${encodeURIComponent(t)}`;return{getCatalog:()=>i(`/v1/public/landings/${n}/catalog`),createOrder:(e,t)=>i(`/v1/public/landings/${n}/orders`,{method:`POST`,headers:{"content-type":`application/json`,"idempotency-key":t},body:JSON.stringify(e)}),getStatus:(e,t)=>i(a(e,t,`status`)),startCheckout:(e,t)=>i(a(e,t,`checkout`),{method:`POST`}),searchSettlements:(e,t)=>i(`/v1/public/np/settlements?q=${encodeURIComponent(e)}`,{...t&&{signal:t}}),getWarehouses:(e,t,n)=>i(`/v1/public/np/warehouses?settlementRef=${encodeURIComponent(e)}&type=${t}`,{...n&&{signal:n}})}}function Xa(e=()=>crypto.randomUUID()){let t,n;return{keyFor(r){let i=JSON.stringify(r);return(n===void 0||i!==t)&&(n=e(),t=i),n},done(){n=void 0,t=void 0}}}function Za(e,t,n){return new Intl.NumberFormat(n===`uk`?`uk-UA`:`en-GB`,{style:`currency`,currency:t}).format(e/100)}function Qa(e){let t=new URLSearchParams(e),n=t.get(`number`),r=t.get(`t`);return n&&r?{number:n,token:r}:void 0}function $a(e){let t=new URL(e.location.href);t.searchParams.has(`t`)&&(t.searchParams.delete(`t`),e.history.replaceState(e.history.state,``,t.pathname+t.search))}var eo=e=>e.startsWith(`card_`);function to(e){return e.payment_state===`paid`||e.payment_state===`partially_paid`?`paid`:e.status===`cancelled`?`failed`:e.payment_method===`np_cod`?`cod`:e.payment_method===`iban`?`iban_unpaid`:`pending`}var no=3e3,ro=6e4,io=[2e3,5e3,1e4];function ao(e){let{api:t,params:n,onResult:r}=e,i=!1,a,o=0,s=0,c=!1;async function l(){let e;try{e={kind:`ok`,status:await t.getStatus(n.number,n.token)}}catch(t){e=t.status===404?{kind:`missing`}:{kind:`error`}}if(i||(e.kind===`error`?s++:(s=0,c=!0),(e.kind!==`error`||!c&&s>io.length)&&r(e),!(e.kind===`error`||e.kind===`ok`&&eo(e.status.payment_method)&&to(e.status)===`pending`)))return;let u=e.kind===`error`?io[s-1]??3e3:no;o+u<=6e4&&(o+=u,a=setTimeout(l,u))}return l(),()=>{i=!0,clearTimeout(a)}}function oo(e){let t=e,n=new Set;return{getState:()=>t,set(e){t={...t,...e};for(let e of[...n])e(t)},subscribe(e){return n.add(e),()=>void n.delete(e)}}}function so(e,t){let n=oo({result:void 0,outcome:void 0}),r;return{getState:n.getState,subscribe:n.subscribe,start(){r?.(),r=ao({api:e,params:t,onResult:e=>n.set({result:e,outcome:e.kind===`ok`?to(e.status):void 0})})},stop(){r?.(),r=void 0}}}function co(e){let t=en(e.getState());return je(e.subscribe(e=>{t.value=e})),Gt(t)}function lo(e){Pi()&&ur(e)}function uo(e,t){let n=en({result:void 0,outcome:void 0}),r,i;function a(){r?.stop(),i?.(),r=i=void 0}function o(){a();let o=an(t);o?(r=so(e,o),i=r.subscribe(e=>{n.value=e}),r.start()):n.value={result:{kind:`missing`},outcome:void 0}}return lo(o),je(a),{result:R(()=>n.value.result),outcome:R(()=>n.value.outcome),start:o,stop:a}}var fo={uk:{loading:`Завантаження…`,catalogError:`Не вдалося завантажити товари.`,retry:`Спробувати ще раз`,soldOut:`Немає в наявності`,variantSoldOut:`немає`,product:`Товар`,quantity:`Кількість`,name:`Ім'я та прізвище`,phone:`Телефон`,email:`Електронна пошта (необов’язково)`,comment:`Коментар (необов’язково)`,payment:`Оплата`,city:`Місто`,warehouse:`Відділення Нової пошти`,consentPrefix:`Я погоджуюсь з`,consentPrivacy:`політикою конфіденційності`,consentOffer:`публічною офертою`,submit:`Оформити замовлення`,sending:`Надсилаємо…`,fixFields:`Перевірте виділені поля.`,pay:{card_online:`Картка онлайн`,card_instalments:`Оплата частинами`,np_cod:`Накладений платіж`,iban:`Переказ на рахунок`},errors:{invalid_phone:`Введіть український номер, наприклад 099 000 00 01.`,too_small:`Занадто коротке значення.`,required:`Обов'язкове поле.`,invalid_value:`Невірне значення.`,generic:`Невірне значення.`,out_of_stock:`Цього товару вже немає в наявності.`,form_too_fast:`Будь ласка, спробуйте ще раз.`,payment_method_disabled:`Цей спосіб оплати зараз недоступний.`,payment_method_unavailable:`Цей спосіб оплати зараз недоступний.`,variant_unavailable:`Цього варіанта більше немає.`,rate_limited:`Забагато спроб. Спробуйте трохи пізніше.`,network:`Немає зв'язку. Спробуйте ще раз.`,unexpected:`Щось пішло не так. Спробуйте ще раз.`,not_allowed:`Це поле тут не потрібне.`,invalid_postcode:`Індекс — п’ять цифр.`,invalid_email:`Перевірте адресу пошти.`,consent_required:`Потрібна ваша згода.`,choose_settlement:`Оберіть населений пункт зі списку.`,choose_warehouse:`Оберіть відділення зі списку.`,choose_payment:`Оберіть спосіб оплати ще раз.`},successTitle:`Дякуємо! Замовлення прийнято`,failTitle:`Оплата не пройшла`,failText:`Замовлення не оплачено. Ви можете спробувати ще раз.`,orderNumber:`Номер замовлення`,statusLoading:`Перевіряємо замовлення…`,statusMissing:`Замовлення не знайдено. Посилання могло застаріти.`,statusError:`Не вдалося перевірити замовлення.`,home:`На головну`,total:`Разом`,linesTitle:`Товари у замовленні`,variant:`Варіант`,addLine:`Додати ще товар`,removeLine:`Прибрати: {name}`,soldOutOption:`немає в наявності`,lineGone:`Немає в наявності — приберіть цей рядок або оберіть інший варіант.`,allSoldOut:`Усі товари зараз розпродані. Оформити замовлення поки неможливо.`,maxLines:`Не більше {n} різних товарів у замовленні.`,deliveryTitle:`Доставка`,delivery:{np_branch:`Відділення Нової пошти`,np_locker:`Поштомат Нової пошти`,np_courier:`Кур'єр Нової пошти`,ukrposhta:`Укрпошта`},settlement:`Населений пункт`,settlementHint:`Почніть вводити назву (від 2 літер) і оберіть зі списку.`,warehouseBranch:`Відділення`,warehouseLocker:`Поштомат`,warehouseFilter:`Пошук за номером або адресою`,warehouseNeedSettlement:`Спочатку оберіть населений пункт.`,warehouseNone:`Тут немає відповідних пунктів.`,warehouseLoading:`Завантажуємо список…`,searching:`Шукаємо…`,noResults:`Нічого не знайдено.`,resultsCount:`Знайдено: {n}`,maxWeight:`до {kg} кг`,directoryDown:`Довідник Нової пошти зараз недоступний. Введіть місто й відділення вручну — замовлення все одно буде прийнято.`,directoryWait:`Забагато запитів до довідника. Спробуйте через {s} с або введіть вручну.`,typeManually:`Ввести вручну`,manualCity:`Місто (вручну)`,manualWarehouse:`Відділення або поштомат (номер чи адреса)`,street:`Вулиця, будинок, квартира`,postcode:`Поштовий індекс`,region:`Область (необов’язково)`,upCity:`Місто або село`,upAddress:`Вулиця, будинок, квартира`,paymentTitle:`Оплата`,payHelp:{np_cod:`Сплачуєте під час отримання на пошті.`,iban:`Реквізити для переказу побачите після оформлення.`,card_online:`Перейдете на сторінку безпечної оплати карткою.`,card_instalments:`Перейдете на сторінку оплати частинами.`},phoneHint:`Формат: 099 000 00 01`,emailHint:`Для квитанції або чека`,errorSummary:`Перевірте форму:`,consentField:`Згода`,retryPayment:`Повторити`,waitSeconds:`Спробуйте ще раз через {s} с.`,cardPreparing:`Оплату ще готують. Зачекайте хвилину й спробуйте ще раз — замовлення збережено.`,cardUnavailable:`Оплата карткою тимчасово недоступна. Замовлення збережено — оберіть інший спосіб оплати або зв’яжіться з нами.`,cardRetry:`Спробувати оплату ще раз`,redirecting:`Переходимо до оплати…`,items:`Склад замовлення`,paymentPaid:`Оплачено`,paymentPending:`Очікуємо підтвердження оплати…`,paymentPendingLong:`Підтвердження оплати ще не надійшло. Якщо ви вже оплатили, воно з’явиться за кілька хвилин; сторінку можна закрити.`,paymentFailed:`Замовлення скасовано, оплату не отримано.`,paymentCod:`Оплата під час отримання.`,ibanTitle:`Реквізити для оплати`,ibanRecipient:`Отримувач`,ibanIban:`IBAN`,ibanEdrpou:`ЄДРПОУ`,ibanPurpose:`Призначення платежу`,copy:`Копіювати`,copied:`Скопійовано`,copyIban:`Копіювати IBAN`,copyPurpose:`Копіювати призначення платежу`,ibanTtl:`Якщо оплата не надійде протягом строку, визначеного продавцем, замовлення буде скасовано автоматично.`,ibanTtlHours:`Якщо оплата не надійде протягом {hours} год., замовлення буде скасовано автоматично.`,qtyLabel:`Кількість: {name}`,qtyDec:`Зменшити кількість: {name}`,qtyInc:`Збільшити кількість: {name}`,qtyNow:`Кількість: {n}`,qtyMax:`Не більше {max} шт.`,qtyRule:`Мінімум {min}, кратно {step}`,lineRemoved:`Прибрано: {name}`,buyerTitle:`Контакти`,deliveryHelp:{np_branch:`Заберете у відділенні`,np_locker:`Заберете з поштомату`,np_courier:`Привезе кур'єр за вашою адресою`,ukrposhta:`Доставка Укрпоштою за індексом`},retryDirectory:`Спробувати список ще раз`,payUnavailable:`Тимчасово недоступно`,newTab:`(відкриється в новій вкладці)`,subtotal:`Товари ({n})`,discount:`Знижка`,deliveryFee:`Доставка`,submitBlockedStock:`Приберіть недоступні товари, щоб оформити замовлення.`,slowSubmit:`Це триває довше, ніж зазвичай. Не закривайте сторінку: замовлення не задублюється.`,cooldownBtn:`Спробуйте через {s} с`,priceChanged:`Ціни оновилися. Було {old}, тепер {new}.`,priceConfirm:`Підтвердити нову суму та оформити`,ibanAmount:`Сума до сплати`,ibanHowTo:`Переказ можна зробити в застосунку вашого банку: вставте IBAN і призначення платежу.`,copyAmount:`Копіювати суму`,copyFailed:`Не вдалося скопіювати. Виділіть текст і скопіюйте вручну.`,cardGo:`Якщо перехід не стався, натисніть кнопку`,cardGoBtn:`Перейти до оплати`,failAgain:`Оформити знову`,newOrder:`Нове замовлення`,newOrderConfirm:`Реквізити цього замовлення зникнуть зі сторінки. Ви їх скопіювали?`,newOrderYes:`Так, нове замовлення`,newOrderNo:`Ні, залишити`,lastOrder:`Це ваше останнє замовлення`,embedNoLanding:`Форму замовлення не налаштовано: немає атрибута landing.`,skipToForm:`Перейти до оформлення`},en:{loading:`Loading…`,catalogError:`The products could not be loaded.`,retry:`Try again`,soldOut:`Sold out`,variantSoldOut:`sold out`,product:`Product`,quantity:`Quantity`,name:`Full name`,phone:`Phone`,email:`Email (optional)`,comment:`Comment (optional)`,payment:`Payment`,city:`City`,warehouse:`Nova Poshta branch`,consentPrefix:`I agree to the`,consentPrivacy:`privacy policy`,consentOffer:`public offer`,submit:`Place order`,sending:`Sending…`,fixFields:`Please check the marked fields.`,pay:{card_online:`Card online`,card_instalments:`Instalments`,np_cod:`Cash on delivery`,iban:`Bank transfer`},errors:{invalid_phone:`Enter a Ukrainian number, for example 099 000 00 01.`,too_small:`The value is too short.`,required:`Required.`,invalid_value:`Invalid value.`,generic:`Invalid value.`,out_of_stock:`This item is no longer in stock.`,form_too_fast:`Please try again.`,payment_method_disabled:`This payment method is unavailable right now.`,payment_method_unavailable:`This payment method is unavailable right now.`,variant_unavailable:`This option is no longer available.`,rate_limited:`Too many attempts. Please try again in a moment.`,network:`No connection. Please try again.`,unexpected:`Something went wrong. Please try again.`,not_allowed:`This field is not needed here.`,invalid_postcode:`The postcode is five digits.`,invalid_email:`Check the email address.`,consent_required:`Your consent is required.`,choose_settlement:`Choose a town or village from the list.`,choose_warehouse:`Choose a branch from the list.`,choose_payment:`Please choose a payment method again.`},successTitle:`Thank you! Your order is placed`,failTitle:`The payment did not go through`,failText:`The order is not paid. You can try again.`,orderNumber:`Order number`,statusLoading:`Checking your order…`,statusMissing:`Order not found. The link may have expired.`,statusError:`The order could not be checked.`,home:`Home`,total:`Total`,linesTitle:`Items in your order`,variant:`Option`,addLine:`Add another item`,removeLine:`Remove: {name}`,soldOutOption:`sold out`,lineGone:`Sold out — remove this line or choose another option.`,allSoldOut:`Everything is sold out right now. You cannot place an order yet.`,maxLines:`No more than {n} different items per order.`,deliveryTitle:`Delivery`,delivery:{np_branch:`Nova Poshta branch`,np_locker:`Nova Poshta parcel locker`,np_courier:`Nova Poshta courier`,ukrposhta:`Ukrposhta`},settlement:`Town or village`,settlementHint:`Start typing the name (2 letters or more) and pick from the list.`,warehouseBranch:`Branch`,warehouseLocker:`Parcel locker`,warehouseFilter:`Search by number or address`,warehouseNeedSettlement:`Choose a town or village first.`,warehouseNone:`No matching points here.`,warehouseLoading:`Loading the list…`,searching:`Searching…`,noResults:`Nothing found.`,resultsCount:`Found: {n}`,maxWeight:`up to {kg} kg`,directoryDown:`The Nova Poshta directory is unavailable right now. Type the city and branch yourself — your order will still be accepted.`,directoryWait:`Too many directory requests. Try again in {s} s or type it in.`,typeManually:`Type it in`,manualCity:`City (typed)`,manualWarehouse:`Branch or locker (number or address)`,street:`Street, house, flat`,postcode:`Postcode`,region:`Region (optional)`,upCity:`City or village`,upAddress:`Street, house, flat`,paymentTitle:`Payment`,payHelp:{np_cod:`You pay when you collect the parcel.`,iban:`You will see the bank details after you place the order.`,card_online:`You will be taken to a secure card payment page.`,card_instalments:`You will be taken to the instalments payment page.`},phoneHint:`Format: 099 000 00 01`,emailHint:`For the receipt`,errorSummary:`Please check the form:`,consentField:`Consent`,retryPayment:`Retry`,waitSeconds:`Try again in {s} s.`,cardPreparing:`The payment is still being prepared. Wait a minute and try again — your order is saved.`,cardUnavailable:`Card payment is temporarily unavailable. Your order is saved — choose another way to pay or contact us.`,cardRetry:`Try the payment again`,redirecting:`Taking you to the payment…`,items:`Order contents`,paymentPaid:`Paid`,paymentPending:`Waiting for the payment confirmation…`,paymentPendingLong:`The payment is not confirmed yet. If you have paid, it will show in a few minutes; you can close this page.`,paymentFailed:`The order is cancelled, no payment was received.`,paymentCod:`You pay when you collect the parcel.`,ibanTitle:`Payment details`,ibanRecipient:`Recipient`,ibanIban:`IBAN`,ibanEdrpou:`Company ID (EDRPOU)`,ibanPurpose:`Payment purpose`,copy:`Copy`,copied:`Copied`,copyIban:`Copy the IBAN`,copyPurpose:`Copy the payment purpose`,ibanTtl:`If the payment does not arrive within the period set by the seller, the order is cancelled automatically.`,ibanTtlHours:`If the payment does not arrive within {hours} hours, the order is cancelled automatically.`,qtyLabel:`Quantity: {name}`,qtyDec:`Decrease quantity: {name}`,qtyInc:`Increase quantity: {name}`,qtyNow:`Quantity: {n}`,qtyMax:`No more than {max}`,qtyRule:`Minimum {min}, in steps of {step}`,lineRemoved:`Removed: {name}`,buyerTitle:`Contact details`,deliveryHelp:{np_branch:`You collect it at a branch`,np_locker:`You collect it from a locker`,np_courier:`A courier brings it to your address`,ukrposhta:`Ukrposhta delivery by postcode`},retryDirectory:`Try the list again`,payUnavailable:`Temporarily unavailable`,newTab:`(opens in a new tab)`,subtotal:`Items ({n})`,discount:`Discount`,deliveryFee:`Delivery`,submitBlockedStock:`Remove the unavailable items to place the order.`,slowSubmit:`This is taking longer than usual. Keep the page open: the order will not be duplicated.`,cooldownBtn:`Try again in {s} s`,priceChanged:`Prices have been updated. Was {old}, now {new}.`,priceConfirm:`Confirm the new total and place the order`,ibanAmount:`Amount to pay`,ibanHowTo:`You can pay in your bank app: paste the IBAN and the payment purpose.`,copyAmount:`Copy the amount`,copyFailed:`Could not copy. Select the text and copy it yourself.`,cardGo:`If you are not redirected, press the button`,cardGoBtn:`Go to payment`,failAgain:`Place the order again`,newOrder:`New order`,newOrderConfirm:`The requisites of this order will disappear from the page. Did you copy them?`,newOrderYes:`Yes, new order`,newOrderNo:`No, keep it`,lastOrder:`This is your latest order`,embedNoLanding:`The order form is not set up: the landing attribute is missing.`,skipToForm:`Skip to checkout`}};function V(e,t){return e.replace(/\{(\w+)\}/g,(e,n)=>String(t[n]??``))}function po(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function mo(e,t){if(!po(e)||!po(t))return t??e;let n={...e};for(let[r,i]of Object.entries(t))i!==void 0&&(n[r]=mo(e[r],i));return n}function ho(e,t){return mo(mo(fo.uk,fo[e]),t?.[e])}var go={lang:{type:String,required:!0},messages:{type:Object}};function H(e){return R(()=>ho(e.lang,e.messages))}var _o=e=>e.type===li||e.type===ci&&String(e.children??``).trim()===``||e.type===F&&e.children?.every(_o)!==!1;function vo(e,t){let n=e[t]?.();return n&&!n.every(_o)?n:void 0}function yo(e,t){return Object.fromEntries(t.filter(t=>e[t]).map(t=>[t,e[t]]))}var bo=Symbol(`hv-announce`);function xo(){let e=j(``);return Hn(bo,t=>{e.value=e.value===t?`${t}\u00a0`:t}),{text:e}}function So(){let e=Un(bo,void 0),t=j(``);return{announce:e??(e=>{t.value=t.value===e?`${e}\u00a0`:e}),region:()=>e?null:z(`p`,{class:`hv-sr-only`,role:`status`},t.value)}}function Co(e){let t=[e.hint?`${e.id}-hint`:``,e.error?`${e.id}-error`:``].filter(Boolean).join(` `)||void 0;return z(`div`,{class:`hv-field`},[z(`label`,{class:`hv-label`,for:e.id},e.label),e.control({id:e.id,"aria-invalid":e.error?`true`:void 0,"aria-describedby":t}),e.hint?z(`p`,{id:`${e.id}-hint`,class:`hv-hint`},e.hint):null,e.error?z(`p`,{id:`${e.id}-error`,class:`hv-error`},e.error):null])}function wo(e){return Co({...e,control:t=>z(`input`,{class:`hv-input`,type:`text`,name:e.id.replace(/^hv-/,``),value:e.value,...e.attrs,...t,onInput:t=>e.onInput(t.target.value),onBlur:e.onBlur})})}var To=(e,t,n,r={})=>z(`fieldset`,{class:`hv-section ${t}`,...r},[z(`legend`,{class:`hv-section-title`},e),...n]),Eo=2e3,Do=e=>e.replace(/\s+/g,``).replace(/(.{4})(?=.)/g,`$1 `),Oo=N({name:`HvIbanBlock`,props:{...go,iban:{type:Object,required:!0},totalMinor:{type:Number,required:!0},currency:{type:String,required:!0},ttlHours:Number},setup(e){let t=H(e),{announce:n}=So(),r=j(``),i=j(!1),a;je(()=>clearTimeout(a));async function o(e,o){clearTimeout(a);try{await navigator.clipboard.writeText(o),i.value=!1,r.value=e,n(t.value.copied),a=setTimeout(()=>r.value=``,Eo)}catch{r.value=``,i.value=!0}}let s=(e,n,i,a,s)=>z(`div`,{key:e,class:`hv-iban-row`},[z(`dt`,{class:`hv-iban-label`},n),z(`dd`,{class:`hv-iban-value`},[z(`span`,{class:`hv-iban-text`},i),z(`button`,{type:`button`,class:`hv-button hv-button-secondary hv-copy-button`,"aria-label":s,onClick:()=>void o(e,a)},r.value===e?t.value.copied:t.value.copy)])]);return()=>{let n=e.iban,r=(e.totalMinor/100).toFixed(2);return z(`section`,{class:`hv-iban`},[z(`h2`,{class:`hv-section-title`},t.value.ibanTitle),z(`p`,{class:`hv-hint`},t.value.ibanHowTo),z(`dl`,{class:`hv-iban-list`},[s(`recipient`,t.value.ibanRecipient,n.recipient,n.recipient,`${t.value.copy}: ${t.value.ibanRecipient}`),s(`iban`,t.value.ibanIban,Do(n.iban),n.iban.replace(/\s+/g,``),t.value.copyIban),n.edrpou?s(`edrpou`,t.value.ibanEdrpou,n.edrpou,n.edrpou,`${t.value.copy}: ${t.value.ibanEdrpou}`):null,s(`purpose`,t.value.ibanPurpose,n.purpose,n.purpose,t.value.copyPurpose),s(`amount`,t.value.ibanAmount,Za(e.totalMinor,e.currency,e.lang),r,t.value.copyAmount)]),i.value?z(`p`,{class:`hv-error`,role:`alert`},t.value.copyFailed):null,z(`p`,{class:`hv-hint`},e.ttlHours?V(t.value.ibanTtlHours,{hours:e.ttlHours}):t.value.ibanTtl)])}}}),ko=N({name:`HvCheckoutResult`,props:{...go,api:{type:Object,required:!0},params:{type:Object},theme:{type:String,default:`light`},homeUrl:{type:String,default:`/`},retryUrl:String,pendingLongMs:{type:Number,default:ro}},setup(e,{slots:t}){let n=H(e),r=j(e.params),i=j(!!e.params);ur(()=>{e.params||(r.value=Qa(window.location.search),$a(window),i.value=!0)});let a=uo(e.api,()=>r.value),o=j(),s=j(null),c=j(!1),l;je(()=>clearTimeout(l));let u=R(()=>{let e=a.result.value;return e?e.kind===`missing`?`missing`:e.kind===`error`?`error`:a.outcome.value??`checking`:`checking`});return Kn(u,async t=>{clearTimeout(l),c.value=!1,t===`pending`&&(l=setTimeout(()=>c.value=!0,e.pendingLongMs)),t===`iban_unpaid`&&o.value===void 0&&e.api.getCatalog().then(e=>o.value=e.landing.payment_ttl_hours).catch(()=>void 0),t!==`checking`&&(await En(),s.value?.focus())}),()=>{let r={lang:e.lang,messages:e.messages},i={class:`hv-root hv-result`,"data-hv-theme":e.theme},l=u.value,d=a.result.value,f=d?.kind===`ok`?d.status:void 0,p=e=>z(`h1`,{ref:s,class:`hv-result-title`,tabindex:-1},e),m=z(`a`,{class:`hv-button hv-button-secondary`,href:e.homeUrl},n.value.home);if(l===`checking`)return z(`div`,i,[z(`p`,{class:`hv-skeleton`,role:`status`,"aria-busy":`true`},n.value.statusLoading)]);if(l===`missing`)return z(`div`,i,[p(n.value.statusMissing),m]);if(l===`error`)return z(`div`,i,[p(n.value.statusError),z(`button`,{type:`button`,class:`hv-button hv-button-primary`,onClick:()=>a.start()},n.value.retry),m]);let h=l===`failed`,g=f?z(`section`,{class:`hv-result-items`},[z(`h2`,{class:`hv-section-title`},n.value.items),z(`ul`,f.items.map((t,n)=>z(`li`,{key:n,class:`hv-result-item`},[z(`span`,{class:`hv-result-name`},[t.name,t.variant_name?`, ${t.variant_name}`:``,`\xA0`,z(`span`,{class:`hv-result-qty`},`× ${t.quantity}`)]),z(`span`,{class:`hv-result-price`},Za(t.unit_price_minor*t.quantity,f.currency,e.lang))]))),z(`p`,{class:`hv-result-total`},[`${n.value.total}: `,Za(f.total_minor,f.currency,e.lang)])]):null,_=l===`paid`?n.value.paymentPaid:l===`pending`?c.value?n.value.paymentPendingLong:n.value.paymentPending:l===`failed`?n.value.paymentFailed:l===`cod`?n.value.paymentCod:``;return z(`div`,i,[p(h?n.value.failTitle:n.value.successTitle),f?z(`p`,{class:`hv-result-number`},`${n.value.orderNumber}: ${f.number}`):null,_?z(`p`,{class:`hv-result-status`,role:`status`,"data-outcome":l},_):null,h?z(`p`,n.value.failText):null,l===`iban_unpaid`&&f?.iban?z(Oo,{...r,iban:f.iban,totalMinor:f.total_minor,currency:f.currency,ttlHours:o.value}):null,g,vo(t,h?`fail-extra`:`success-extra`),h?z(`a`,{class:`hv-button hv-button-primary`,href:e.retryUrl??e.homeUrl},n.value.failAgain):null,m])}}});function Ao(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function jo(e,t=`|`){return e.map(e=>ts(e)).join(t)}function Mo(e,t){return typeof t==`bigint`?t.toString():t}var No=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Po(e){return new No(e)}function Fo(e){return e==null}function Io(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Lo(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function Ro(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function zo(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function Bo(e){return zo(e._zod.def)??e._zod.def.shape}function Vo(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return Ro(this,t,e),e},enumerable:!0,configurable:!0})}function Ho(e,t,n){t in e?Ro(e,t,n):e[t]=n}function Uo(e,t,n,r){let i=Bo(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Vo(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Ho(e,a,r?r(n.value,a):n.value))}}function Wo(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Vo(e,n,()=>t[n]):Ho(e,n,r.value))}}function U(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Go(e){return JSON.stringify(e)}function Ko(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var qo=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Jo(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Yo=Po(()=>{if(Ws.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Xo(e){if(Jo(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Jo(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Zo(e){return Xo(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Qo=new Set([`string`,`number`,`symbol`]);function $o(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function es(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function W(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function ts(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ns(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var rs={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},is={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function as(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return Uo(i,e,os(e,t)),es(e,U(n,{shape:i,checks:[]}))}function os(e,t){let n=Bo(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function ss(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(os(e,t)),a={};return Uo(a,e,Reflect.ownKeys(Bo(e)).filter(e=>!i.has(e))),es(e,U(n,{shape:a,checks:[]}))}function cs(e,t){if(!Xo(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=Bo(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return es(e,U(e._zod.def,{shape:ls(e,t)}))}function ls(e,t){let n={};return Uo(n,e,Reflect.ownKeys(Bo(e))),Wo(n,t),n}function us(e,t){if(!Xo(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return es(e,U(e._zod.def,{shape:ls(e,t)}))}function ds(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return Uo(n,e,Reflect.ownKeys(Bo(e))),Uo(n,t,Reflect.ownKeys(Bo(t))),es(e,U(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function fs(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(os(t,n)):void 0,o={};return Uo(o,t,Reflect.ownKeys(Bo(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),es(t,U(t._zod.def,{shape:o,checks:[]}))}function ps(e,t,n){let r=n?new Set(os(t,n)):void 0,i={};return Uo(i,t,Reflect.ownKeys(Bo(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),es(t,U(t._zod.def,{shape:i}))}function ms(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function hs(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function gs(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function _s(e){return typeof e==`string`?e:e?.message}function vs(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function ys(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function bs(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:_s(e.inst?._zod.def?.error?.(e))??_s(a?.(e))??_s(t?.error?.(e))??_s(n.customError?.(e))??_s(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var xs=/[\uD800-\uDBFF]/;function Ss(e){let t=e.length;if(!xs.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Cs(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function ws(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Ts(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Es(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):As(e,n,r.value)}}function Ds(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Os(e,t,n){return Ds(e,t,n,!1)}function ks(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Ds(this,n,r(this))},set(e){Ds(this,n,e)}})}return t}function As(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Ds(this,t,n.bind(this))},set(e){Ds(this,t,e)}})}function js(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Ms,Ns=!1,Ps={configurable:!0,get(){Ns=!0}};function G(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Ms!==e._zod?Ms=void 0:(Ms=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Ps);let e=Ns;Ns=!1;try{let r=n(this);return Ns?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Ns||=e,r}catch(n){throw delete this[t],Ns||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function Fs(e,t,n,r){let i=js(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Is=`~constantCatch`;function Ls(e){let t=()=>e;return t[Is]=!0,t}var Rs,zs={value:void 0,enumerable:!1},Bs=`captureStackTrace`in Error?Error:null;function Vs(e){let t=Bs;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Bs=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function K(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){zs.value=new a(r);try{Object.defineProperty(n,"_zod",zs)}finally{zs.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Es(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Vs(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Hs=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Us=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Rs=globalThis).__zod_globalConfig??(Rs.__zod_globalConfig={});var Ws=globalThis.__zod_globalConfig;function Gs(e){return e&&Object.assign(Ws,e),Ws}function Ks(){let e=this._zod;return e.message??=JSON.stringify(e.def,Mo,2),e.message}function qs(e){this._zod.message=e}var Js={get:Ks,set:qs,enumerable:!0,configurable:!0},Ys={value:void 0,enumerable:!1},Xs=new WeakSet([Object.prototype,Error.prototype]),Zs=K(`$ZodError`,(e,t)=>{e.name=`$ZodError`,Ys.value=t,Object.defineProperty(e,"issues",Ys),Ys.value=void 0,Object.defineProperty(e,"message",Js);let n=Object.getPrototypeOf(e);Xs.has(n)||(Xs.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function Qs(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function $s(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Qs(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ec(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function tc(e,t){return{callee:t?.callee??e,Err:t?.Err}}var nc=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Hs;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>bs(e,o,Gs())));throw qo(n,a?.callee??t),n}return s.value};return t},rc=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>bs(e,o,Gs())));throw qo(n,a?.callee??t),n}return s.value};return t},ic=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Hs;return a.issues.length?ac(e,a.issues,i):{success:!0,data:a.value}};function ac(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>bs(e,n,Gs()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var oc=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?ac(e,a.issues,i):{success:!0,data:a.value}},sc=Symbol.for(`zod.compile.invalid`),cc=Symbol.for(`zod.compile.fallback`),lc=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==sc)return!0;if(r.definite===!0&&n===void 0)return!1}return uc(e,t,n)});function uc(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[cc]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Hs;return a.issues.length===0}var dc=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},fc=e=>{let t=nc(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,tc(n,a))};return n},pc=e=>{let t=nc(e),n=(e,r,i,a)=>t(e,r,i,tc(n,a));return n},mc=e=>{let t=rc(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,tc(n,a))};return n},hc=e=>{let t=rc(e),n=async(e,r,i,a)=>await t(e,r,i,tc(n,a));return n},gc=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ic(e)(t,n,i)},_c=e=>(t,n,r)=>ic(e)(t,n,r),vc=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return oc(e)(t,n,i)},yc=e=>async(t,n,r)=>oc(e)(t,n,r),bc=/^[cC][0-9a-z]{6,}$/,xc=/^[0-9a-z]+$/,Sc=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Cc=/^[0-9a-vA-V]{20}$/,wc=/^[A-Za-z0-9]{27}$/,Tc=/^[a-zA-Z0-9_-]{21}$/;function Ec(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Dc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Oc=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,kc=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ac=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,jc=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Mc(){return new RegExp(jc,`u`)}var Nc=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Pc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Fc=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ic=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Lc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Rc=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,zc=/^https?$/,Bc=/^\+[1-9]\d{6,14}$/,Vc=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function Hc(e){return RegExp(`^${e}$`)}var Uc=Hc(Vc);function Wc(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Gc(e){return RegExp(`^${Wc(e)}$`)}function Kc(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Wc({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Wc({precision:e.precision})}`:n;return RegExp(`^${Vc}T(?:${r})$`)}var qc=/^[\s\S]{0,}$/,Jc=/^-?\d+(?:\.\d+)?$/,Yc=/^[^A-Z]*$/,Xc=/^[^a-z]*$/,q=K(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Zc=e=>{let t=e.value;return!Fo(t)&&t.length!==void 0},Qc={number:`number`,bigint:`bigint`,object:`date`},$c=K(`$ZodCheckLessThan`,(e,t)=>{q.init(e,t);let n=Qc[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Qc[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),el=K(`$ZodCheckGreaterThan`,(e,t)=>{q.init(e,t);let n=Qc[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Qc[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tl=K(`$ZodCheckMultipleOf`,(e,t)=>{q.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Lo(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),nl=K(`$ZodCheckNumberFormat`,(e,t)=>{q.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=rs[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),rl=K(`$ZodCheckMaxLength`,(e,t)=>{var n;q.init(e,t),(n=e._zod.def).when??(n.when=Zc),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Ss(r):i)<=t.maximum)return;let a=Cs(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),il=K(`$ZodCheckMinLength`,(e,t)=>{var n;q.init(e,t),(n=e._zod.def).when??(n.when=Zc),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Ss(r):i)>=t.minimum)return;let a=Cs(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),al=K(`$ZodCheckLengthEquals`,(e,t)=>{var n;q.init(e,t),(n=e._zod.def).when??(n.when=Zc),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Ss(r):i;if(a===t.length)return;let o=Cs(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ol=K(`$ZodCheckStringFormat`,(e,t)=>{var n,r;q.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),sl=K(`$ZodCheckRegex`,(e,t)=>{ol.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),cl=K(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Yc,ol.init(e,t)}),ll=K(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Xc,ol.init(e,t)}),ul=K(`$ZodCheckIncludes`,(e,t)=>{q.init(e,t);let n=$o(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),dl=K(`$ZodCheckStartsWith`,(e,t)=>{q.init(e,t);let n=RegExp(`^${$o(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),fl=K(`$ZodCheckEndsWith`,(e,t)=>{q.init(e,t);let n=RegExp(`.*${$o(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),pl=K(`$ZodCheckOverwrite`,(e,t)=>{q.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),ml=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
499
574
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
|
|
500
575
|
`)}\n};`)(...Object.values(this.closed))}},hl={major:4,minor:6,patch:7},J=K(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=hl;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=ms(t),a;for(let o of n){if(o._zod.def.when){if(hs(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new Hs;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(ys(t.issues,n,e),i||=ms(t,n))});else{if(t.issues.length===n)continue;ys(t.issues,n,e),i||=ms(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(ms(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Hs;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new Hs;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Os(this,`~standard`,vl(this))},set"~standard"(e){Ds(this,`~standard`,e)}}),gl=(e,t)=>e.issues.length?{issues:e.issues.map(e=>bs(e,t,Gs()))}:{value:e.value};async function _l(e,t){let n={async:!0};return gl(await e._zod.run({value:t,issues:[]},n),n)}function vl(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return gl(r,n)}catch{}return _l(e,t)},vendor:`zod`,version:1}}var yl=K(`$ZodString`,(e,t)=>{J.init(e,t),e._zod.pattern=t.pattern??qc,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),Y=K(`$ZodStringFormat`,(e,t)=>{ol.init(e,t),yl.init(e,t)}),bl=K(`$ZodGUID`,(e,t)=>{t.pattern??=Oc,Y.init(e,t)}),xl=K(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=kc(e)}else t.pattern??=kc();Y.init(e,t)}),Sl=K(`$ZodEmail`,(e,t)=>{t.pattern??=Ac,Y.init(e,t)});function Cl(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function wl(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Cl(e)||2:Tl(e,t)}function Tl(e,t){if(!t.normalize&&t.protocol?.source===zc.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var El=/[\t\n\r]/g;function Dl(e){return e.replace(El,``)}function Ol(e,t){return t.lastIndex=0,t.test(e.hostname)}function kl(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Al=K(`$ZodURL`,(e,t)=>{Y.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=wl(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Dl(r);return}t.hostname&&!Ol(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!kl(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Dl(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),jl=K(`$ZodEmoji`,(e,t)=>{t.pattern??=Mc(),Y.init(e,t)}),Ml=K(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Tc:Ec(t.length),Y.init(e,t)}),Nl=K(`$ZodCUID`,(e,t)=>{t.pattern??=bc,Y.init(e,t)}),Pl=K(`$ZodCUID2`,(e,t)=>{t.pattern??=xc,Y.init(e,t)}),Fl=K(`$ZodULID`,(e,t)=>{t.pattern??=Sc,Y.init(e,t)}),Il=K(`$ZodXID`,(e,t)=>{t.pattern??=Cc,Y.init(e,t)}),Ll=K(`$ZodKSUID`,(e,t)=>{t.pattern??=wc,Y.init(e,t)}),Rl=K(`$ZodISODateTime`,(e,t)=>{t.pattern??=Kc(t),Y.init(e,t)}),zl=K(`$ZodISODate`,(e,t)=>{t.pattern??=Uc,Y.init(e,t)}),Bl=K(`$ZodISOTime`,(e,t)=>{t.pattern??=Gc(t),Y.init(e,t)}),Vl=K(`$ZodISODuration`,(e,t)=>{t.pattern??=Dc,Y.init(e,t)}),Hl=K(`$ZodIPv4`,(e,t)=>{t.pattern??=Nc,Y.init(e,t)}),Ul=/^[0-9a-fA-F:.]+$/;function Wl(e){return Ul.test(e)?Cl(`http://[${e}]`):!1}var Gl=K(`$ZodIPv6`,(e,t)=>{t.pattern??=Pc,Y.init(e,t),e._zod.check=n=>{Wl(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Kl=K(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Fc,Y.init(e,t)});function ql(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Wl(n)}var Jl=K(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Ic,Y.init(e,t),e._zod.check=n=>{ql(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Yl(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Xl=/^[0-9a-zA-Z+/]*={0,2}$/,Zl=K(`$ZodBase64`,(e,t)=>{t.pattern??=Xl,Y.init(e,t),e._zod.check=n=>{Yl(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Ql=/^[A-Za-z0-9_-]*$/;function $l(e){if(!Ql.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Yl(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var eu=K(`$ZodBase64URL`,(e,t)=>{t.pattern??=Ql,Y.init(e,t),e._zod.check=n=>{$l(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),tu=K(`$ZodE164`,(e,t)=>{t.pattern??=Bc,Y.init(e,t)});function nu(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var ru=K(`$ZodJWT`,(e,t)=>{Y.init(e,t),e._zod.check=n=>{nu(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),iu=K(`$ZodNumber`,(e,t)=>{J.init(e,t),e._zod.pattern=Jc,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),au=K(`$ZodNumberFormat`,(e,t)=>{nl.init(e,t),iu.init(e,t)}),ou=K(`$ZodUnknown`,(e,t)=>{J.init(e,t),e._zod.parse=e=>e}),su=K(`$ZodNever`,(e,t)=>{J.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function cu(e,t){let n=vs(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of vs(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,ys(n.issues,t,e),n}}return i(n,a)}}var lu=e=>Array.isArray(e)?e.length:-1;function uu(e,t,n){e.issues.length&&t.issues.push(...gs(n,e.issues)),t.value[n]=e.value}var du=K(`$ZodArray`,(e,t)=>{J.init(e,t);let n=Ws.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>uu(t,r,e)));else if(uu(c,r,e),s&&c.issues.length!==0&&ms(c))break}return o.length?Promise.all(o).then(()=>r):r},cu(e,lu)});function fu(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...gs(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var pu=[];function mu(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:pu,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=ns(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function hu(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(ms(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>fu(e,n,i,t,d,f))):fu(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var gu=K(`$ZodObject`,(e,t)=>{J.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=Po(()=>mu(t));G(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||Ro(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=Jo,o=t.catchall,s,c=Ws.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(ms(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>fu(n,t,e,r,a,o))):fu(s,t,e,r,a,o)}return o?hu(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),_u=K(`$ZodObjectJIT`,(e,t)=>{gu.init(e,t);let n=e._zod.parse,r=Po(()=>mu(t)),i=Ws.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new ml([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
|
|
501
576
|
let ${e}_ab = false;
|
|
@@ -549,4 +624,4 @@ var HoverlaCheckoutBundle=(function(e){Object.defineProperty(e,Symbol.toStringTa
|
|
|
549
624
|
|
|
550
625
|
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=Jo,c=!Ws.jitless,l=c&&Yo.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?hu([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function vu(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!ms(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>bs(e,r,Gs())))}),t)}var yu=K(`$ZodUnion`,(e,t)=>{J.init(e,t),G(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),G(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),G(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),G(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>Io(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>vu(t,r,e,i)):vu(o,r,e,i)}}),bu=K(`$ZodIntersection`,(e,t)=>{J.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Su(e,t,n)):Su(e,i,a)}});function xu(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Xo(e)&&Xo(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=xu(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=xu(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Su(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=xu(t.value,n.value);if(!c.valid){if(ms(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Cu=K(`$ZodEnum`,(e,t)=>{J.init(e,t);let n=Ao(t.entries),r=new Set(n);e._zod.values=r,G(e,`pattern`,e=>{let t=Ao(e.def.entries).filter(e=>Qo.has(typeof e));return RegExp(t.length?`^(${t.map(e=>$o(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),wu=K(`$ZodLiteral`,(e,t)=>{J.init(e,t);let n=new Set(t.values);e._zod.values=n,G(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?$o(e):e?$o(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Tu=K(`$ZodTransform`,(e,t)=>{J.init(e,t),e._zod.optin=`optional`,Ws.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Us(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new Hs;return n.value=i,n}});function Eu(e,t){return e.value=t.issues.length?void 0:t.value,e}var Du=K(`$ZodOptional`,(e,t)=>{J.init(e,t),G(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,G(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),G(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Io(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Eu(e,t)):Eu(e,r)}return t.innerType._zod.run(e,n)}}),Ou=K(`$ZodExactOptional`,(e,t)=>{Du.init(e,t),G(e,`values`,e=>e.def.innerType._zod.values),G(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),ku=K(`$ZodNullable`,(e,t)=>{J.init(e,t),G(e,`optin`,e=>e.def.innerType._zod.optin),G(e,`optout`,e=>e.def.innerType._zod.optout),G(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Io(t.source)}|null)$`):void 0}),G(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Au=K(`$ZodDefault`,(e,t)=>{J.init(e,t),e._zod.optin=`defaulted`,G(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ju(e,t)):ju(r,t)}});function ju(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Mu=K(`$ZodPrefault`,(e,t)=>{J.init(e,t),e._zod.optin=`defaulted`,G(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Nu=K(`$ZodNonOptional`,(e,t)=>{J.init(e,t),G(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Pu(t,e)):Pu(i,e)}});function Pu(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Fu(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>bs(e,r,Gs()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Iu=K(`$ZodCatch`,(e,t)=>{J.init(e,t),G(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),G(e,`optout`,e=>e.def.innerType._zod.optout),G(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Fu(e,r,t,n)):Fu(e,r,t,n)}}),Lu=K(`$ZodPipe`,(e,t)=>{J.init(e,t),G(e,`values`,e=>e.def.in._zod.values),G(e,`optin`,e=>e.def.in._zod.optin),G(e,`optout`,e=>e.def.out._zod.optout),G(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Ru(e,t.in,n)):Ru(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Ru(e,t.out,n)):Ru(r,t.out,n)}});function Ru(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var zu=K(`$ZodReadonly`,(e,t)=>{J.init(e,t),G(e,`propValues`,e=>e.def.innerType._zod.propValues),G(e,`values`,e=>e.def.innerType._zod.values),G(e,`optin`,e=>e.def.innerType?._zod?.optin),G(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Bu):Bu(r)}});function Bu(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Vu=K(`$ZodCustom`,(e,t)=>{q.init(e,t),J.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Hu(t,n,r,e));Hu(i,n,r,e)}});function Hu(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ts(e))}}var Uu=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Wu=`~memo`,Gu=[];function Ku(e){return typeof e==`object`&&!!e}function qu(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Ju=new WeakMap,Yu=0,Xu=1,Zu=2;function Qu(e,t,n){let r=Ju.get(e);if(r!==void 0)return r?Zu:Yu;if(t.has(e))return Zu;t.add(e);let i=Yu,a=e=>{if(i!==Zu&&e?._zod){let r=Qu(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Yu;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Xu:o.value?._zod?Qu(o.value,t,n):Yu;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=zo(c);s(e?o(e,!0):Xu),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Qu(r,t,!1):Xu);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),$u(e,i)}function $u(e,t){return t!==Xu&&Ju.set(e,t===Zu),t}function ed(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var td,nd=[],rd={alloc(e,t,n){let r=td;if(!r)return n;td=void 0;let i={value:n,issues:null};return r.set(t.value,i),nd.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&ad(n,e.value))throw new Uu;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Qu(e,new Set,!1);if(i===Yu)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Zu||r?n=!0:r=!0}let l=s.value;if(!Ku(l))return t(s,c);let u=c[Wu];u||(u={buckets:new WeakMap,backEdges:void 0},c[Wu]=u);let d;i===c?d=a:(d=ed(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...qu(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;td=d;let p=nd.length,m=t(s,c);td=void 0;let h=nd.length>p?nd.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?qu(e.issues):Gu),e)):(h&&(h.issues=m.issues.length?qu(m.issues):Gu),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function id(){return rd}function ad(e,t){let n=e[Wu]?.backEdges;return n!==void 0&&Ku(t)&&n.has(t)}var od=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(ws(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${ts(e.values[0])}`:`Invalid option: expected one of ${jo(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${jo(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function sd(){return{localeError:od()}}var cd,ld=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let 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){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function ud(){return new ld}(cd=globalThis).__zod_globalRegistry??(cd.__zod_globalRegistry=ud());var dd=globalThis.__zod_globalRegistry;function fd(e){return e.checks&&=[...e.checks],e}function pd(e,t){return new e(fd({type:`string`,...W(t)}))}function md(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...W(t)})}function hd(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...W(t)})}function gd(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...W(t)})}function _d(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...W(t)})}function vd(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...W(t)})}function yd(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...W(t)})}function bd(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...W(t)})}function xd(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...W(t)})}function Sd(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...W(t)})}function Cd(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...W(t)})}function wd(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...W(t)})}function Td(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...W(t)})}function Ed(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...W(t)})}function Dd(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...W(t)})}function Od(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...W(t)})}function kd(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...W(t)})}function Ad(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...W(t)})}function jd(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...W(t)})}function Md(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...W(t)})}function Nd(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...W(t)})}function Pd(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...W(t)})}function Fd(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...W(t)})}function Id(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...W(t)})}function Ld(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...W(t)})}function Rd(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...W(t)})}function zd(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...W(t)})}function Bd(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...W(t)})}function Vd(e){return new e({type:`unknown`})}function Hd(e,t){return new e({type:`never`,...W(t)})}function Ud(e,t){return new $c({check:`less_than`,...W(t),value:e,inclusive:!1})}function Wd(e,t){return new $c({check:`less_than`,...W(t),value:e,inclusive:!0})}function Gd(e,t){return new el({check:`greater_than`,...W(t),value:e,inclusive:!1})}function Kd(e,t){return new el({check:`greater_than`,...W(t),value:e,inclusive:!0})}function qd(e,t){return new tl({check:`multiple_of`,...W(t),value:e})}function Jd(e,t){return new rl({check:`max_length`,...W(t),maximum:e})}function Yd(e,t){return new il({check:`min_length`,...W(t),minimum:e})}function Xd(e,t){return new al({check:`length_equals`,...W(t),length:e})}function Zd(e,t){return new sl({check:`string_format`,format:`regex`,...W(t),pattern:e})}function Qd(e){return new cl({check:`string_format`,format:`lowercase`,...W(e)})}function $d(e){return new ll({check:`string_format`,format:`uppercase`,...W(e)})}function ef(e,t){return new ul({check:`string_format`,format:`includes`,...W(t),includes:e})}function tf(e,t){return new dl({check:`string_format`,format:`starts_with`,...W(t),prefix:e})}function nf(e,t){return new fl({check:`string_format`,format:`ends_with`,...W(t),suffix:e})}function rf(e){return new pl({check:`overwrite`,tx:e})}function af(e){return rf(t=>t.normalize(e))}function of(){return rf(e=>e.trim())}function sf(){return rf(e=>e.toLowerCase())}function cf(){return rf(e=>e.toUpperCase())}function lf(){return rf(e=>Ko(e))}function uf(e,t,n){return new e({type:`array`,element:t,...W(n)})}function df(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...W(n)})}function ff(e,t){let n=pf(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ts(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Ts(r))}},e(t.value,t)),t);return n}function pf(e,t){let n=new q({check:`custom`,...W(t)});return n._zod.check=e,n}function mf(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&Ro(e,t,n[t]);return e}function hf(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??dd,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function gf(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function X(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,X(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&mf(o.schema,c),t.io===`input`&&Z(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function _f(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function vf(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${_f(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+_f(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
551
626
|
|
|
552
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function yf(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;yf(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var bf=new Set([`type`,`properties`,`required`,`additionalProperties`]),xf=[`oneOf`,`anyOf`];function Sf(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Cf(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!bf.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Sf(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}Ro(n,r,e.length===1?e[0]:Cf(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Sf(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function wf(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of bf)if(t in e)return;let n=t.filter(e=>xf.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Cf(t);else{let e=n[0],i=xf.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>Cf([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,mf(e,r))}function Tf(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):mf(i,s),mf(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())yf(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])wf(e)}}let 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){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}mf(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,Ro(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Df(t,`input`,e.processors),output:Df(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Z(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return Z(r.element,n);if(r.type===`set`)return Z(r.valueType,n);if(r.type===`lazy`)return Z(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return Z(r.innerType,n);if(r.type===`intersection`)return Z(r.left,n)||Z(r.right,n);if(r.type===`record`||r.type===`map`)return Z(r.keyType,n)||Z(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:Z(r.in,n)||Z(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Z(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Z(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Z(e,n))return!0;return!!(r.rest&&Z(r.rest,n))}return!1}var Ef=(e,t={})=>n=>{let r=hf({...n,processors:t});return X(e,r),vf(r,e),Tf(r,e)},Df=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=hf({...i??{},target:a,io:t,processors:n});return X(e,o),vf(o,e),Tf(o,e)},Of=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},kf=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Af=(e,t)=>{Of(e,`minimum`,t),kf(e,`maximum`,t)},jf=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Mf=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Nf=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Pf=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Ff=(e,t)=>Of(e,`minimum`,t.minimum),If=(e,t)=>kf(e,`maximum`,t.maximum),Lf=e=>(t,n)=>{Pf(t,n.format);let[r,i]=e[n.format];Of(t,`minimum`,r),kf(t,`maximum`,i)},Rf={greater_than:(e,t)=>Of(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>kf(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>jf(e,t.value),number_format:Lf(rs),bigint_format:Lf(is),min_length:Ff,max_length:If,length_equals:(e,t)=>Af(e,t.length),min_size:Ff,max_size:If,size_equals:(e,t)=>Af(e,t.size),string_format:(e,t)=>{Pf(e,t.format),t.pattern&&Mf(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Nf(e,t.mime)};function zf(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Rf[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Of(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Of(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&kf(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&kf(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&jf(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Nf(t,i.mime);for(let e of i.patterns??[])Mf(t,e);return t}var Bf={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Vf=new Map([[Xl,Lc],[Ql,Rc]]),Hf=e=>Vf.get(e)??e,Uf=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=zf(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Bf[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Hf);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Wf=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=zf(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):gf(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Gf=(e,t,n,r)=>{n.not={}},Kf=(e,t,n,r)=>{let i=e._zod.def,a=Ao(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},qf=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(gf(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(gf(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},Jf=(e,t,n,r)=>{gf(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Yf=(e,t,n,r)=>{gf(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Xf=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=zf(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=X(a.element,t,{...r,path:[...r.path,`items`]})};function Zf(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Zf(t.out):t.type===`catch`?Zf(t.innerType):e._zod.optin}var Qf=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&gf(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)Ro(i.properties,e,X(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Zf(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=X(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},$f=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>X(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},ep=(e,t,n,r)=>{let i=e._zod.def,a=X(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=X(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},tp=(e,t,n,r)=>{let i=e._zod.def,a=X(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},np=(e,t,n,r)=>{let i=e._zod.def;X(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},rp=Symbol();function ip(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(gf(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),rp):JSON.parse(o)}var ap=(e,t,n,r)=>{let i=e._zod.def;X(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=ip(i.defaultValue,e,t,n,r);o!==rp&&(n.default=o)},op=(e,t,n,r)=>{let i=e._zod.def;X(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=ip(i.defaultValue,e,t,n,r);o!==rp&&(n._prefault=o)},sp=(e,t,n,r)=>{let i=e._zod.def;X(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{gf(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},cp=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;X(o,t,r);let s=t.seen.get(e);s.ref=o},lp=(e,t,n,r)=>{let i=e._zod.def;X(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},up=(e,t,n,r)=>{let i=e._zod.def;X(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},dp=new WeakSet([Object.prototype,Error.prototype]);function fp(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var pp=K(`ZodError`,(e,t)=>{Zs.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);dp.has(n)||(dp.add(n),fp(n,`format`,e=>t=>ec(e,t)),fp(n,`flatten`,e=>t=>$s(e,t)),fp(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Mo,2)}),fp(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Mo,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),mp=nc(pp),hp=rc(pp),gp=ic(pp),_p=oc(pp),vp=fc(pp),yp=pc(pp),bp=mc(pp),xp=hc(pp),Sp=gc(pp),Cp=_c(pp),wp=vc(pp),Tp=yc(pp);function Ep(){Ws.localeError||Gs(sd())}function Dp(){Ws.memoizer||Gs({memoizer:id()})}var Q=K(`ZodType`,(e,t)=>(Ep(),J.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(U(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return es(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Vm(e,t))},superRefine(e,t){return this.check(Hm(e,t))},overwrite(e){return this.check(rf(e))},optional(){return Cm(this)},exactOptional(){return Tm(this)},nullable(){return Dm(this)},nullish(){return Cm(Dm(this))},nonoptional(e){return Nm(this,e)},array(){return lm(this)},or(e){return pm([this,e])},and(e){return hm(this,e)},transform(e){return Lm(this,xm(e))},default(e){return km(this,e)},prefault(e){return jm(this,e)},catch(e){return Fm(this,e)},pipe(e){return Lm(this,e)},readonly(){return zm(this)},describe(e){let t=this.clone();return dd.add(t,{description:e}),t},meta(...e){if(e.length===0)return dd.get(this);let t=this.clone();return dd.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Os(this,`~standard`,{...vl(this),jsonSchema:{input:Df(this,`input`),output:Df(this,`output`)}})},set"~standard"(e){Ds(this,`~standard`,e)},parse:function e(t,n){return mp(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await hp(this,t,n,{callee:e})},safeParse(e,t){return gp(this,e,t)},async safeParseAsync(e,t){return _p(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Ds(this,`spa`,e)},validate(e,t){return lc(this,e,t)},validateAsync(e,t){return dc(this,e,t)},encode:function e(t,n){return vp(this,t,n,{callee:e})},decode:function e(t,n){return yp(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await bp(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await xp(this,t,n,{callee:e})},safeEncode(e,t){return Sp(this,e,t)},safeDecode(e,t){return Cp(this,e,t)},async safeEncodeAsync(e,t){return wp(this,e,t)},async safeDecodeAsync(e,t){return Tp(this,e,t)},toJSONSchema(e){return Ef(this,{})(e)},get description(){return dd.get(this)?.description},get _def(){return this._zod.def}}),Op=K(`_ZodString`,(e,t)=>{yl.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uf(e,t,n,r)},ks({format:e=>zf(e).format??null,minLength:e=>zf(e).minimum??null,maxLength:e=>zf(e).maximum??null},{regex(...e){return this.check(Zd(...e))},includes(...e){return this.check(ef(...e))},startsWith(...e){return this.check(tf(...e))},endsWith(...e){return this.check(nf(...e))},min(...e){return this.check(Yd(...e))},max(...e){return this.check(Jd(...e))},length(...e){return this.check(Xd(...e))},nonempty(...e){return this.check(Yd(1,...e))},lowercase(e){return this.check(Qd(e))},uppercase(e){return this.check($d(e))},trim(){return this.check(of())},normalize(...e){return this.check(af(...e))},toLowerCase(){return this.check(sf())},toUpperCase(){return this.check(cf())},slugify(){return this.check(lf())}})),kp=K(`ZodString`,(e,t)=>{yl.init(e,t),Op.init(e,t)},{email(e){return this.check(md(Fp,e))},url(e){return this.check(bd(zp,e))},jwt(e){return this.check(Fd(em,e))},emoji(e){return this.check(xd(Bp,e))},guid(e){return this.check(hd(Lp,e))},uuid(e){return this.check(gd(Rp,e))},uuidv4(e){return this.check(_d(Rp,e))},uuidv6(e){return this.check(vd(Rp,e))},uuidv7(e){return this.check(yd(Rp,e))},nanoid(e){return this.check(Sd(Vp,e))},cuid(e){return this.check(Cd(Hp,e))},cuid2(e){return this.check(wd(Up,e))},ulid(e){return this.check(Td(Wp,e))},base64(e){return this.check(Md(Zp,e))},base64url(e){return this.check(Nd(Qp,e))},xid(e){return this.check(Ed(Gp,e))},ksuid(e){return this.check(Dd(Kp,e))},ipv4(e){return this.check(Od(qp,e))},ipv6(e){return this.check(kd(Jp,e))},cidrv4(e){return this.check(Ad(Yp,e))},cidrv6(e){return this.check(jd(Xp,e))},e164(e){return this.check(Pd($p,e))},datetime(e){return this.check(Id(jp,e))},date(e){return this.check(Ld(Mp,e))},time(e){return this.check(Rd(Np,e))},duration(e){return this.check(zd(Pp,e))}});function Ap(e){return pd(kp,e)}var $=K(`ZodStringFormat`,(e,t)=>{Y.init(e,t),Op.init(e,t)}),jp=K(`ZodISODateTime`,(e,t)=>{Rl.init(e,t),$.init(e,t)}),Mp=K(`ZodISODate`,(e,t)=>{zl.init(e,t),$.init(e,t)}),Np=K(`ZodISOTime`,(e,t)=>{Bl.init(e,t),$.init(e,t)}),Pp=K(`ZodISODuration`,(e,t)=>{Vl.init(e,t),$.init(e,t)}),Fp=K(`ZodEmail`,(e,t)=>{Sl.init(e,t),$.init(e,t)});function Ip(e){return md(Fp,e)}var Lp=K(`ZodGUID`,(e,t)=>{bl.init(e,t),$.init(e,t)}),Rp=K(`ZodUUID`,(e,t)=>{xl.init(e,t),$.init(e,t)}),zp=K(`ZodURL`,(e,t)=>{Al.init(e,t),$.init(e,t)}),Bp=K(`ZodEmoji`,(e,t)=>{jl.init(e,t),$.init(e,t)}),Vp=K(`ZodNanoID`,(e,t)=>{Ml.init(e,t),$.init(e,t)}),Hp=K(`ZodCUID`,(e,t)=>{Nl.init(e,t),$.init(e,t)}),Up=K(`ZodCUID2`,(e,t)=>{Pl.init(e,t),$.init(e,t)}),Wp=K(`ZodULID`,(e,t)=>{Fl.init(e,t),$.init(e,t)}),Gp=K(`ZodXID`,(e,t)=>{Il.init(e,t),$.init(e,t)}),Kp=K(`ZodKSUID`,(e,t)=>{Ll.init(e,t),$.init(e,t)}),qp=K(`ZodIPv4`,(e,t)=>{Hl.init(e,t),$.init(e,t)}),Jp=K(`ZodIPv6`,(e,t)=>{Gl.init(e,t),$.init(e,t)}),Yp=K(`ZodCIDRv4`,(e,t)=>{Kl.init(e,t),$.init(e,t)}),Xp=K(`ZodCIDRv6`,(e,t)=>{Jl.init(e,t),$.init(e,t)}),Zp=K(`ZodBase64`,(e,t)=>{Zl.init(e,t),$.init(e,t)}),Qp=K(`ZodBase64URL`,(e,t)=>{eu.init(e,t),$.init(e,t)}),$p=K(`ZodE164`,(e,t)=>{tu.init(e,t),$.init(e,t)}),em=K(`ZodJWT`,(e,t)=>{ru.init(e,t),$.init(e,t)}),tm=K(`ZodNumber`,(e,t)=>{iu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wf(e,t,n,r),e.isFinite=!0},ks({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=zf(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=zf(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=zf(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>zf(e).format??null},{gt(e,t){return this.check(Gd(e,t))},gte(e,t){return this.check(Kd(e,t))},min(e,t){return this.check(Kd(e,t))},lt(e,t){return this.check(Ud(e,t))},lte(e,t){return this.check(Wd(e,t))},max(e,t){return this.check(Wd(e,t))},int(e){return this.check(rm(e))},safe(e){return this.check(rm(e))},positive(e){return this.check(Gd(0,e))},nonnegative(e){return this.check(Kd(0,e))},negative(e){return this.check(Ud(0,e))},nonpositive(e){return this.check(Wd(0,e))},multipleOf(e,t){return this.check(qd(e,t))},step(e,t){return this.check(qd(e,t))},finite(){return this}})),nm=K(`ZodNumberFormat`,(e,t)=>{au.init(e,t),tm.init(e,t)});function rm(e){return Bd(nm,e)}var im=K(`ZodUnknown`,(e,t)=>{ou.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function am(){return Vd(im)}var om=K(`ZodNever`,(e,t)=>{su.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gf(e,t,n,r)});function sm(e){return Hd(om,e)}var cm=K(`ZodArray`,(e,t)=>{Dp(),du.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xf(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Yd(e,t))},nonempty(e){return this.check(Yd(1,e))},max(e,t){return this.check(Jd(e,t))},length(e,t){return this.check(Xd(e,t))},unwrap(){return this.element}});function lm(e,t){return uf(cm,e,t)}var um=K(`ZodObject`,(e,t)=>{Dp(),_u.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qf(e,t,n,r),Fs(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return _m(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(U(this._zod.def,{catchall:e}))},passthrough(){return this.clone(U(this._zod.def,{catchall:am()}))},loose(){return this.clone(U(this._zod.def,{catchall:am()}))},strict(){return this.clone(U(this._zod.def,{catchall:sm()}))},strip(){return this.clone(U(this._zod.def,{catchall:void 0}))},extend(e){return cs(this,e)},safeExtend(e){return us(this,e)},merge(e){return ds(this,e)},pick(e){return as(this,e)},omit(e){return ss(this,e)},partial(...e){return fs(Sm,this,e[0])},exactPartial(...e){return fs(wm,this,e[0],`exactPartial`)},required(...e){return ps(Mm,this,e[0])}});function dm(e,t){return new um({type:`object`,shape:e,catchall:sm(),...W(t)})}var fm=K(`ZodUnion`,(e,t)=>{yu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$f(e,t,n,r),e.options=t.options});function pm(e,t){return new fm({type:`union`,options:e,...W(t)})}var mm=K(`ZodIntersection`,(e,t)=>{bu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ep(e,t,n,r)});function hm(e,t){return new mm({type:`intersection`,left:e,right:t})}var gm=K(`ZodEnum`,(e,t)=>{Cu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kf(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new gm({...t,checks:[],...W(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new gm({...t,checks:[],...W(r),entries:i})}});function _m(e,t){return new gm({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...W(t)})}var vm=K(`ZodLiteral`,(e,t)=>{wu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qf(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function ym(e,t){return new vm({type:`literal`,values:Array.isArray(e)?e:[e],...W(t)})}var bm=K(`ZodTransform`,(e,t)=>{Dp(),Tu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yf(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Us(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ts(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Ts(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function xm(e){return new bm({type:`transform`,transform:e})}var Sm=K(`ZodOptional`,(e,t)=>{Du.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>up(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Cm(e){return new Sm({type:`optional`,innerType:e})}var wm=K(`ZodExactOptional`,(e,t)=>{Ou.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>up(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Tm(e){return new wm({type:`optional`,innerType:e})}var Em=K(`ZodNullable`,(e,t)=>{ku.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tp(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Dm(e){return new Em({type:`nullable`,innerType:e})}var Om=K(`ZodDefault`,(e,t)=>{Au.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ap(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function km(e,t){return new Om({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Zo(t)}})}var Am=K(`ZodPrefault`,(e,t)=>{Mu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>op(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jm(e,t){return new Am({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Zo(t)}})}var Mm=K(`ZodNonOptional`,(e,t)=>{Nu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>np(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Nm(e,t){return new Mm({type:`nonoptional`,innerType:e,...W(t)})}var Pm=K(`ZodCatch`,(e,t)=>{Iu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sp(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Fm(e,t){return new Pm({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Ls(t)})}var Im=K(`ZodPipe`,(e,t)=>{Lu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cp(e,t,n,r),e.in=t.in,e.out=t.out});function Lm(e,t){return new Im({type:`pipe`,in:e,out:t})}var Rm=K(`ZodReadonly`,(e,t)=>{zu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lp(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zm(e){return new Rm({type:`readonly`,innerType:e})}var Bm=K(`ZodCustom`,(e,t)=>{Vu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jf(e,t,n,r)});function Vm(e,t={}){return df(Bm,e,t)}function Hm(e,t){return ff(e,t)}var Um=[`card_online`,`card_instalments`,`np_cod`,`iban`],Wm=[`np_branch`,`np_locker`,`np_courier`,`ukrposhta`];function Gm(e){let t=e.replace(/[\s\-()]/g,``),n=/^(?:\+?380|0)(\d{9})$/.exec(t)?.[1];if(n&&!n.startsWith(`0`))return`+380${n}`}function Km(e){let t=Gm(e);if(!t)return e;let n=t.slice(4);return`+380 ${n.slice(0,2)} ${n.slice(2,5)} ${n.slice(5,7)} ${n.slice(7)}`}var qm=e=>Ap().trim().min(1).max(e).optional(),Jm=[`np_city_ref`,`np_city_name`,`np_warehouse_ref`,`np_warehouse_name`],Ym=[...Jm,`up_postcode`,`up_region`,`up_city`,`up_address`],Xm={np_branch:{required:Jm,optional:[]},np_locker:{required:Jm,optional:[]},np_courier:{required:[`np_city_ref`,`np_city_name`,`up_address`],optional:[]},ukrposhta:{required:[`up_postcode`,`up_city`,`up_address`],optional:[`up_region`]}},Zm={unit_price_minor:am().optional(),price:am().optional(),subtotal_minor:am().optional(),shipping_minor:am().optional(),total_minor:am().optional()},Qm=dm({lines:lm(dm({variant_id:rm().positive(),quantity:rm().min(1).max(99),...Zm})).min(1).max(20),payment_method:_m(Um),delivery_method:_m(Wm),buyer_name:Ap().trim().min(2).max(100),buyer_phone:Ap().max(32).transform((e,t)=>{let n=Gm(e);return n===void 0&&t.issues.push({code:`custom`,message:`invalid_phone`,input:e}),n??e}),buyer_email:Ap().trim().max(254).pipe(Ip()).optional(),buyer_comment:Ap().trim().max(500).optional(),np_city_ref:qm(64),np_city_name:qm(100),np_warehouse_ref:qm(64),np_warehouse_name:qm(100),up_postcode:Ap().trim().regex(/^\d{5}$/).optional(),up_region:qm(100),up_city:qm(100),up_address:qm(200),consent:ym(!0),website:Ap().optional(),form_elapsed_ms:rm().min(0),...Zm}).superRefine((e,t)=>{let n=Xm[e.delivery_method],r=e;for(let e of Ym){let i=r[e]!==void 0;n.required.includes(e)&&!i?t.addIssue({code:`custom`,path:[e],message:`required`}):i&&!n.required.includes(e)&&!n.optional.includes(e)&&t.addIssue({code:`custom`,path:[e],message:`not_allowed`})}});function $m(e){if(`success`in e)return void window.location.assign(e.success);if(`redirect_url`in e)return void window.location.assign(e.redirect_url);let t=document.createElement(`form`);t.method=`POST`,t.action=e.form.action;for(let[n,r]of Object.entries(e.form.fields)){let e=document.createElement(`input`);e.type=`hidden`,e.name=n,e.value=r,t.append(e)}document.body.append(t),t.submit()}function eh(e){return e.products.flatMap(e=>e.variants.map(t=>({id:t.id,label:`${e.name} — ${t.name}`,disabled:!t.available,unitPriceMinor:t.unit_price_minor})))}function th(e){return Number.isFinite(e)?Math.min(99,Math.max(1,Math.trunc(e))):1}function nh(e,t,n=1){let r=e.find(e=>e.variantId===t);return r?e.map(e=>e===r?{...e,quantity:th(e.quantity+n)}:e):e.length>=20?e:[...e,{variantId:t,quantity:th(n)}]}function rh(e,t,n){return e.map(e=>e.variantId===t?{...e,quantity:th(n)}:e)}function ih(e,t){return e.filter(e=>e.variantId!==t)}function ah(e,t){let n=new Map(eh(e).map(e=>[e.id,e.unitPriceMinor]));return t.reduce((e,t)=>e+(n.get(t.variantId)??0)*t.quantity,0)}function oh(e){return e.map(e=>({variant_id:e.variantId,quantity:e.quantity}))}function sh(e,t){let n=new Set(t.filter(e=>!e.available).map(e=>e.variant_id));return e.filter(e=>n.has(e.variantId)).map(e=>e.variantId)}function ch(e,t,n){if(t===n)return e;let r=e.find(e=>e.variantId===n);if(!r)return e.map(e=>e.variantId===t?{...e,variantId:n}:e);let i=e.find(e=>e.variantId===t);return e.filter(e=>e.variantId!==t).map(e=>e===r?{...e,quantity:th(e.quantity+(i?.quantity??0))}:e)}function lh(e,t){let n=eh(e).filter(e=>!e.disabled),r=new Set(t.map(e=>e.variantId));return(n.find(e=>!r.has(e.id))??n[0])?.id}var uh=`dfgk-cart`;function dh(e){let t=e;return typeof t==`object`&&!!t&&Number.isInteger(t.variantId)&&Number.isInteger(t.quantity)}function fh(e={}){let{persist:t}=e,n=t?.key??uh,r,i=[],a=new Set,o=!t,s=oo(c());function c(){let e=r?eh(r):[],t=new Set(e.filter(e=>!e.disabled).map(e=>e.id)),n=r?i.map(e=>e.variantId).filter(e=>!t.has(e)):[];return{lines:i,unavailableIds:[...new Set([...n,...a])].filter(e=>i.some(t=>t.variantId===e)),options:e,totalMinor:r?ah(r,i):0,count:i.reduce((e,t)=>e+t.quantity,0)}}function l(e,r=!0){if(i=e,s.set(c()),r&&t&&o)try{t.storage.setItem(n,JSON.stringify(i))}catch{}}return{getState:s.getState,subscribe:s.subscribe,setCatalog(e){r=e,s.set(c())},add(e,t=1){let n=e??(r&&lh(r,i));n!==void 0&&l(nh(i,n,t))},setQuantity:(e,t)=>l(rh(i,e,t)),remove(e){a.delete(e),l(ih(i,e))},replaceVariant(e,t){a.delete(e),l(ch(i,e,t))},markUnavailable(e){a=new Set(sh(i,e)),s.set(c())},clear(){a=new Set,l([])},payload:()=>oh(i),hydrate(){if(t&&!o){o=!0;try{let e=JSON.parse(t.storage.getItem(n)??`[]`);Array.isArray(e)&&i.length===0&&l(e.filter(dh).reduce((e,t)=>nh(e,t.variantId,t.quantity),[]),!1)}catch{}}}}}function ph(e,t={}){let n=fh(t),r=co(n);return Kn(()=>an(e),n.setCatalog,{immediate:!0}),lo(()=>n.hydrate()),{controller:n,lines:R(()=>r.value.lines),unavailableIds:R(()=>r.value.unavailableIds),options:R(()=>r.value.options),totalMinor:R(()=>r.value.totalMinor),count:R(()=>r.value.count),add:n.add,setQuantity:n.setQuantity,remove:n.remove,replaceVariant:n.replaceVariant,markUnavailable:n.markUnavailable,clear:n.clear,hydrate:n.hydrate}}function mh(e){let t=oo({status:`idle`,catalog:void 0}),n=0;return{getState:t.getState,subscribe:t.subscribe,async load(){let r=++n;t.set({status:`loading`});try{let i=await e.getCatalog();r===n&&t.set({status:`ready`,catalog:i})}catch{r===n&&t.set({status:`error`})}}}}function hh(e){let t=mh(e),n=co(t);return lo(()=>void t.load()),{controller:t,status:R(()=>n.value.status),catalog:R(()=>n.value.catalog),reload:()=>t.load()}}var gh={buyer_name:`name`,buyer_phone:`phone`,buyer_email:`email`,buyer_comment:`comment`,np_city_ref:`settlement`,np_city_name:`settlement`,np_warehouse_ref:`warehouse`,np_warehouse_name:`warehouse`,up_address:`address`,up_postcode:`postcode`,up_region:`region`,up_city:`city`,consent:`consent`,payment_method:`payment`,delivery_method:`delivery`};function _h(e){return e===`lines`||e.startsWith(`lines.`)?`lines`:gh[e]}function vh(e){let t={fields:{},staleVariantIds:[]};if(!(e instanceof B))return{...t,message:`unexpected`,action:`retry`};switch(e.kind){case`invalid_request`:{let n={};for(let t of e.fields){let e=_h(t.path);e&&!n[e]&&(n[e]=t.code)}return{...t,fields:n,message:`fixFields`,action:`none`}}case`form_too_fast`:return{...t,message:`form_too_fast`,action:`retry_soon`,waitSeconds:3};case`out_of_stock`:return{...t,message:`out_of_stock`,action:`refresh_catalog`,staleVariantIds:e.items.filter(e=>!e.available).map(e=>e.variant_id)};case`payment_method_disabled`:case`payment_method_unavailable`:return{...t,message:e.kind,action:`choose_payment`};case`variant_unavailable`:return{...t,message:e.kind,action:`refresh_catalog`};case`rate_limited`:return{...t,message:`rate_limited`,action:`wait`,waitSeconds:e.retryAfterSeconds??60};case`network`:return{...t,message:`network`,action:`retry`};default:return{...t,message:`unexpected`,action:`retry`}}}function yh(e=()=>Date.now()){let t=e();return{elapsedMs:()=>Math.max(0,Math.round(e()-t))}}var bh=e=>e===`card_online`||e===`card_instalments`;function xh({form_elapsed_ms:e,...t}){return t}function Sh(e){let{api:t,cart:n,delivery:r,lang:i}=e,a=e.navigate??$m,o=fo[i],s=Xa(),c=yh(),l,u=oo({form:{name:``,phone:``,email:``,comment:``,consent:!1,website:``},payment:Um[0],paymentMethods:[...Um],errors:{},formError:``,sending:!1,cooldown:0,created:void 0,cardState:``,redirecting:!1}),d=e=>o.errors[e]??o.errors.generic;function f(e,t){return d(e===`settlement`&&t===`required`?`choose_settlement`:e===`warehouse`&&t===`required`?`choose_warehouse`:e===`consent`?`consent_required`:e===`postcode`?`invalid_postcode`:e===`email`?`invalid_email`:t)}function p(e){clearInterval(l),u.set({cooldown:e}),l=setInterval(()=>{let e=Math.max(0,u.getState().cooldown-1);u.set({cooldown:e}),e||clearInterval(l)},1e3)}function m(){let{form:e,payment:t}=u.getState(),i=e=>e.trim()===``?void 0:e;return{lines:n.payload(),payment_method:t,delivery_method:r.getState().delivery.method,buyer_name:e.name,buyer_phone:e.phone,buyer_email:i(e.email),buyer_comment:i(e.comment),...r.fields(),consent:e.consent,website:e.website,form_elapsed_ms:c.elapsedMs()}}function h(e,t){u.set({errors:e,formError:t})}async function g(e,n){u.set({cardState:``});try{let r=await t.startCheckout(e,n);if(!Ja(r)){u.set({cardState:`unavailable`});return}u.set({redirecting:!0}),a(r)}catch(e){u.set({redirecting:!1,cardState:e instanceof B&&e.kind===`checkout_in_progress`?`in_progress`:e instanceof B&&e.kind===`network`?`network`:`unavailable`})}}async function _(r=!1){let i=u.getState();if(i.sending||i.cooldown||i.created)return;u.set({errors:{},formError:``}),n.markUnavailable([]);let c=Qm.safeParse(m());if(!c.success){let e={};for(let t of c.error.issues){let n=_h(t.path.join(`.`));n&&!e[n]&&(e[n]=f(n,t.code===`custom`?t.message:t.code))}return h(e,o.fixFields)}u.set({sending:!0});try{let e=c.data,n=await t.createOrder(e,s.keyFor(xh(e)));if(s.done(),bh(u.getState().payment))u.set({created:{number:n.number,token:n.status_token}}),await g(n.number,n.status_token);else{let e=new URLSearchParams({number:n.number,t:n.status_token});a({success:`/success?${e}`})}}catch(t){let i=vh(t);if(!r&&i.message===`form_too_fast`)return await new Promise(e=>setTimeout(e,(i.waitSeconds??3)*1e3)),u.set({sending:!1}),_(!0);let a={};for(let[e,t]of Object.entries(i.fields))a[e]=f(e,t);i.action===`choose_payment`&&(a.payment=d(`choose_payment`)),t instanceof B&&t.items.length&&n.markUnavailable(t.items),(i.action===`refresh_catalog`||i.action===`choose_payment`)&&e.onRefreshCatalog?.(),i.waitSeconds&&p(i.waitSeconds);let s=i.message===`fixFields`?o.fixFields:d(i.message);h(a,i.action===`wait`?`${s} ${V(o.waitSeconds,{s:i.waitSeconds??0})}`:s)}finally{u.set({sending:!1})}}let v=!1;return{getState:u.getState,subscribe:u.subscribe,setCatalog(e){if(!e)return;let t=e.payment_methods.filter(e=>Um.includes(e)),{payment:n,errors:i}=u.getState(),a=!t.includes(n);u.set({paymentMethods:t,...a&&{payment:t[0]??n,...v&&{errors:{...i,payment:d(`choose_payment`)}}}});let o=r.getState().delivery.method,s=Wm.filter(t=>e.delivery_methods.includes(t));s.length&&!s.includes(o)&&r.setMethod(s[0])},setField(e,t){u.set({form:{...u.getState().form,[e]:t}})},setPayment(e){v=!0,u.set({payment:e})},start(){c=yh()},formatPhone(){let{form:e}=u.getState();e.phone.trim()&&u.set({form:{...e,phone:Km(e.phone)}})},submit:()=>_(),async retryCard(){let{created:e,redirecting:t}=u.getState();e&&!t&&await g(e.number,e.token)},dispose(){clearInterval(l)}}}function Ch(e){let t=Sh({...e,cart:e.cart.controller,delivery:e.delivery.controller}),n=co(t),{catalog:r}=e;return r!==void 0&&Kn(()=>an(r),t.setCatalog,{immediate:!0}),lo(t.start),je(t.dispose),{controller:t,form:R(()=>n.value.form),payment:R(()=>n.value.payment),paymentMethods:R(()=>n.value.paymentMethods),errors:R(()=>n.value.errors),formError:R(()=>n.value.formError),sending:R(()=>n.value.sending),cooldown:R(()=>n.value.cooldown),created:R(()=>n.value.created),cardState:R(()=>n.value.cardState),redirecting:R(()=>n.value.redirecting),setField:t.setField,setPayment:t.setPayment,formatPhone:t.formatPhone,submit:t.submit,retryCard:t.retryCard}}function wh(e){return{method:e,manual:!1,manualCity:``,manualWarehouse:``,street:``,postcode:``,region:``,city:``,address:``}}var Th=e=>e!==`ukrposhta`;function Eh(e,t){if(t===e.method)return e;let n=wh(t);return Th(t)&&Th(e.method)&&(n.manual=e.manual,n.manualCity=e.manualCity,e.settlement&&(n.settlement=e.settlement)),n}var Dh=e=>e?.trim()?e.trim():void 0;function Oh(e){let t=e.manual?Dh(e.manualCity):e.settlement?.ref,n=e.manual?Dh(e.manualCity):e.settlement?.name;return{...t&&{np_city_ref:t},...n&&{np_city_name:n}}}function kh(e){switch(e.method){case`np_branch`:case`np_locker`:{let t=e.manual?Dh(e.manualWarehouse):e.warehouse?.ref,n=e.manual?Dh(e.manualWarehouse):e.warehouse?.name;return{...Oh(e),...t&&{np_warehouse_ref:t},...n&&{np_warehouse_name:n}}}case`np_courier`:{let t=Dh(e.street);return{...Oh(e),...t&&{up_address:t}}}case`ukrposhta`:{let t=Dh(e.postcode),n=Dh(e.region),r=Dh(e.city),i=Dh(e.address);return{...t&&{up_postcode:t},...n&&{up_region:n},...r&&{up_city:r},...i&&{up_address:i}}}}}function Ah(e){return e instanceof B&&(e.kind===`np_unavailable`||e.kind===`network`||e.status>=500)}function jh(e){let t=new Map,n=new Map,r=0;async function i(e){let t=r-Date.now();if(t>0)throw new B(`rate_limited`,429,{retryAfterSeconds:Math.ceil(t/1e3)});try{return(await e()).items}catch(e){throw e instanceof B&&e.status===429&&(r=Date.now()+(e.retryAfterSeconds??30)*1e3),e}}return{async settlements(n,r){let a=n.trim().toLowerCase(),o=t.get(a);if(o)return o;let s=await i(()=>e.searchSettlements(n.trim(),r));return t.set(a,s),s},async warehouses(t,r,a){let o=`${t}|${r}`,s=n.get(o);if(s)return s;let c=await i(()=>e.getWarehouses(t,r,a));return n.set(o,c),c}}}function Mh(e){let t=e.delayMs??250,n=e.minChars??2,r,i,a=0,o=!1;function s(){clearTimeout(r),r=void 0,i?.abort(),i=void 0,a++}return{input(c){if(s(),o)return;let l=c.trim();if([...l].length<n)return e.onState({status:`idle`,items:[]});let u=a;r=setTimeout(async()=>{i=new AbortController,e.onState({status:`loading`,items:[]});try{let t=await e.search(l,i.signal);u===a&&e.onState({status:`ready`,items:t})}catch(t){u===a&&!(t instanceof B&&t.kind===`aborted`)&&e.onState({status:`error`,items:[],error:t})}},t)},dispose(){o=!0,s()}}}function Nh(e,t={}){let n=jh(e),r=oo({delivery:wh(t.method??`np_branch`),settlementText:``,settlements:{status:`idle`,items:[]},warehouseText:``,warehouses:[],warehousesStatus:`idle`,waitSeconds:0}),i,a=e=>r.set({delivery:{...r.getState().delivery,...e}});function o(e){Ah(e)?(a({manual:!0}),c()):e instanceof B&&e.status===429&&r.set({waitSeconds:e.retryAfterSeconds??30})}let s=Mh({search:(e,t)=>n.settlements(e,t),onState:e=>{r.set({settlements:e}),e.status===`error`&&o(e.error)}});async function c(){i?.abort();let{delivery:e}=r.getState(),t=e.settlement?.ref;if(r.set({warehouses:[],warehousesStatus:`idle`}),!t||e.manual||e.method===`np_courier`)return;let a=i=new AbortController;r.set({warehousesStatus:`loading`});try{let i=await n.warehouses(t,e.method===`np_locker`?`locker`:`branch`,a.signal);a.signal.aborted||r.set({warehouses:i,warehousesStatus:`ready`})}catch(e){if(a.signal.aborted)return;r.set({warehousesStatus:`idle`}),o(e)}}return{getState:r.getState,subscribe:r.subscribe,setMethod(e){let t=r.getState().delivery,n=Eh(t,e);n!==t&&(r.set({delivery:n,warehouseText:``,...!n.settlement&&{settlementText:``}}),c())},inputSettlement(e){let{delivery:t}=r.getState();r.set({settlementText:e,waitSeconds:0}),t.settlement&&e!==t.settlement.name&&(a({settlement:void 0,warehouse:void 0}),c()),s.input(e)},pickSettlement(e){let t=r.getState().settlements.items.find(t=>t.ref===e);t&&(r.set({settlementText:t.name,warehouseText:``}),a({settlement:{ref:t.ref,name:t.name.slice(0,100)},warehouse:void 0}),c())},inputWarehouse(e){let{delivery:t}=r.getState();r.set({warehouseText:e}),t.warehouse&&e!==t.warehouse.name&&a({warehouse:void 0})},pickWarehouse(e){let t=r.getState().warehouses.find(t=>t.ref===e);t&&(r.set({warehouseText:t.name}),a({warehouse:{ref:t.ref,name:t.name.slice(0,100)}}))},setField(e){let t=e.manual!==void 0&&e.manual!==r.getState().delivery.manual;a(e),t&&c()},fields:()=>kh(r.getState().delivery),dispose(){s.dispose(),i?.abort()}}}function Ph(e,t={}){let n=Nh(e,t),r=co(n);return je(n.dispose),{controller:n,delivery:R(()=>r.value.delivery),method:R(()=>r.value.delivery.method),settlementText:R(()=>r.value.settlementText),settlements:R(()=>r.value.settlements),warehouseText:R(()=>r.value.warehouseText),warehouses:R(()=>r.value.warehouses),warehousesStatus:R(()=>r.value.warehousesStatus),waitSeconds:R(()=>r.value.waitSeconds),setMethod:n.setMethod,inputSettlement:n.inputSettlement,pickSettlement:n.pickSettlement,inputWarehouse:n.inputWarehouse,pickWarehouse:n.pickWarehouse,setField:n.setField,fields:n.fields}}var Fh=N({name:`HvBuyerSection`,props:{...go,checkout:{type:Object,required:!0}},setup(e,{slots:t}){let n=H(e);return()=>{let{form:r,errors:i,setField:a,formatPhone:o}=e.checkout,s=i.value;return To(n.value.buyerTitle,`hv-buyer`,[vo(t,`buyer-note`),wo({id:`hv-buyer-name`,label:n.value.name,value:r.value.name,error:s.name,attrs:{name:`name`,autocomplete:`name`},onInput:e=>a(`name`,e)}),wo({id:`hv-buyer-phone`,label:n.value.phone,value:r.value.phone,hint:n.value.phoneHint,error:s.phone,attrs:{name:`phone`,type:`tel`,inputmode:`tel`,autocomplete:`tel`},onInput:e=>a(`phone`,e),onBlur:o}),wo({id:`hv-buyer-email`,label:n.value.email,value:r.value.email,hint:n.value.emailHint,error:s.email,attrs:{name:`email`,type:`email`,autocomplete:`email`},onInput:e=>a(`email`,e)}),Co({id:`hv-buyer-comment`,label:n.value.comment,error:s.comment,control:e=>z(`textarea`,{class:`hv-textarea`,name:`comment`,maxlength:500,value:r.value.comment,...e,onInput:e=>a(`comment`,e.target.value)})}),z(`div`,{class:`hv-hp`,"aria-hidden":`true`},[z(`label`,[`Website `,z(`input`,{name:`website`,tabindex:-1,autocomplete:`off`,value:r.value.website,onInput:e=>a(`website`,e.target.value)})])])])}}}),Ih=N({name:`HvConsentField`,props:{...go,checkout:{type:Object,required:!0},policyLinks:{type:Object,required:!0}},setup(e,{slots:t}){let n=H(e);return()=>{let r=e.checkout.errors.value.consent,i=(e,t)=>z(`a`,{href:e,target:`_blank`,rel:`noopener`},[t,z(`span`,{class:`hv-sr-only`},` ${n.value.newTab}`)]);return z(`div`,{class:`hv-field`},[z(`label`,{class:`hv-consent`},[z(`input`,{id:`hv-consent`,type:`checkbox`,name:`consent`,checked:e.checkout.form.value.consent,"aria-invalid":r?`true`:void 0,"aria-describedby":r?`hv-consent-error`:void 0,onChange:t=>e.checkout.setField(`consent`,t.target.checked)}),z(`span`,[`${n.value.consentPrefix} `,i(e.policyLinks.privacy,n.value.consentPrivacy),`, `,i(e.policyLinks.offer,n.value.consentOffer)])]),vo(t,`consent-extra`),r?z(`p`,{id:`hv-consent-error`,class:`hv-error`},r):null])}}}),Lh=N({name:`HvCombobox`,props:{...go,id:{type:String,required:!0},label:{type:String,required:!0},modelValue:{type:String,required:!0},items:{type:Array,required:!0},status:{type:String,required:!0},hint:String,error:String,required:Boolean},emits:{"update:modelValue":e=>!0,select:e=>!0},setup(e,{emit:t}){let n=H(e),{announce:r,region:i}=So(),a=j(!1),o=j(!1),s=j(-1),c=R(()=>a.value&&!o.value&&e.items.length>0),l=t=>`${e.id}-opt-${t}`;Kn(R(()=>e.status===`loading`?n.value.searching:e.status===`ready`?e.items.length?V(n.value.resultsCount,{n:e.items.length}):n.value.noResults:``),e=>e&&r(e)),Kn(()=>e.items,()=>s.value=-1);function u(t){let n=e.items.length;n&&(o.value=!1,s.value=(t+n)%n)}function d(n){let r=e.items[n];r&&(o.value=!0,s.value=-1,t(`select`,r.key))}function f(t){let n=e=>{t.preventDefault(),e()};switch(t.key){case`ArrowDown`:return n(()=>u(s.value+1));case`ArrowUp`:return n(()=>u(s.value<0?-1:s.value-1));case`Home`:c.value&&n(()=>u(0));return;case`End`:c.value&&n(()=>u(e.items.length-1));return;case`Enter`:c.value&&s.value>=0&&n(()=>d(s.value));return;case`Escape`:c.value&&n(()=>o.value=!0)}}return()=>{let n=e.hint?`${e.id}-hint`:``,r=e.error?`${e.id}-error`:``;return z(`div`,{class:`hv-combobox hv-field`},[z(`label`,{class:`hv-label`,for:`${e.id}-input`},e.label),z(`input`,{id:`${e.id}-input`,class:`hv-input`,type:`text`,role:`combobox`,autocomplete:`off`,"aria-autocomplete":`list`,"aria-expanded":c.value?`true`:`false`,"aria-controls":`${e.id}-list`,"aria-activedescendant":c.value&&s.value>=0?l(s.value):void 0,"aria-invalid":e.error?`true`:void 0,"aria-required":e.required?`true`:void 0,"aria-describedby":[n,r].filter(Boolean).join(` `)||void 0,value:e.modelValue,onInput:e=>{o.value=!1,t(`update:modelValue`,e.target.value)},onKeydown:f,onFocus:()=>a.value=!0,onBlur:()=>a.value=!1}),e.hint?z(`p`,{id:n,class:`hv-hint`},e.hint):null,z(`ul`,{id:`${e.id}-list`,class:`hv-combobox-list`,role:`listbox`,"aria-label":e.label,hidden:!c.value},e.items.map((e,t)=>z(`li`,{id:l(t),key:e.key,class:`hv-combobox-option`,role:`option`,"aria-selected":t===s.value?`true`:`false`,"data-active":t===s.value?`true`:void 0,onMousedown:e=>{e.preventDefault(),d(t)}},[e.label,e.detail?z(`small`,e.detail):null]))),e.error?z(`p`,{id:r,class:`hv-error`},e.error):null,i()])}}}),Rh=50,zh=N({name:`HvDeliverySection`,props:{...go,delivery:{type:Object,required:!0},methods:{type:Array,required:!0},errors:{type:Object,default:()=>({})}},setup(e,{slots:t}){let n=H(e);return Kn(()=>e.delivery.delivery.value.manual,t=>{let{delivery:n,settlementText:r}=e.delivery;t&&!n.value.manualCity&&r.value&&e.delivery.setField({manualCity:r.value})}),()=>{let r=e.delivery,i=r.delivery.value,a=e.errors,o=i.method!==`ukrposhta`,s=i.method===`np_branch`||i.method===`np_locker`,c=e=>()=>r.setField(e),l=(e,t,n,i,a,o={})=>wo({id:e,label:t,value:n,error:i,attrs:o,onInput:e=>r.setField({[a]:e})}),u=r.settlements.value,d=u.items.map(e=>({key:e.ref,label:e.name,detail:[e.area,e.region].filter(Boolean).join(`, `)||void 0})),f=r.warehouseText.value.trim().toLowerCase(),p=i.warehouse,m=(f&&!(p&&f===p.name.toLowerCase())?r.warehouses.value.filter(e=>`${e.number} ${e.name} ${e.address??``}`.toLowerCase().includes(f)):r.warehouses.value).slice(0,Rh).map(e=>({key:e.ref,label:e.name,detail:[e.address,e.max_weight_kg?V(n.value.maxWeight,{kg:e.max_weight_kg}):``].filter(Boolean).join(` · `)||void 0})),h=z(`button`,{type:`button`,class:`hv-button hv-button-secondary`,onClick:c({manual:!0})},n.value.typeManually),g=e.methods.length>1?z(`div`,{class:`hv-choices`,role:`radiogroup`,"aria-label":n.value.deliveryTitle},e.methods.map(e=>z(`label`,{key:e,class:`hv-choice`},[z(`input`,{type:`radio`,name:`hv-delivery`,value:e,checked:i.method===e,onChange:()=>r.setMethod(e)}),z(`span`,{class:`hv-choice-title`},n.value.delivery[e]),z(`span`,{class:`hv-choice-help`},n.value.deliveryHelp[e])]))):z(`p`,{class:`hv-choice-title`},n.value.delivery[i.method]),_=[i.manual?z(`div`,{class:`hv-notice`,role:`status`,"data-kind":`info`},[z(`p`,n.value.directoryDown),z(`button`,{type:`button`,class:`hv-button hv-button-secondary`,onClick:c({manual:!1})},n.value.retryDirectory)]):r.waitSeconds.value?z(`div`,{class:`hv-notice`,role:`status`},[z(`p`,V(n.value.directoryWait,{s:r.waitSeconds.value})),h]):null,...i.manual?[l(`hv-manual-city`,n.value.manualCity,i.manualCity,a.settlement,`manualCity`,{autocomplete:`address-level2`}),s?l(`hv-manual-warehouse`,n.value.manualWarehouse,i.manualWarehouse,a.warehouse,`manualWarehouse`):null]:[z(Lh,{id:`hv-settlement`,lang:e.lang,messages:e.messages,label:n.value.settlement,hint:n.value.settlementHint,modelValue:r.settlementText.value,items:d,status:u.status===`error`?`idle`:u.status,error:a.settlement,required:!0,"onUpdate:modelValue":r.inputSettlement,onSelect:r.pickSettlement}),u.status===`ready`&&!d.length&&r.settlementText.value.trim().length>=2?z(`div`,{class:`hv-field`},[z(`p`,{class:`hv-hint`},n.value.noResults),h]):null,s&&i.settlement?z(Lh,{id:`hv-warehouse`,lang:e.lang,messages:e.messages,label:i.method===`np_locker`?n.value.warehouseLocker:n.value.warehouseBranch,hint:n.value.warehouseFilter,modelValue:r.warehouseText.value,items:m,status:r.warehousesStatus.value===`loading`?`loading`:`ready`,error:a.warehouse,required:!0,"onUpdate:modelValue":r.inputWarehouse,onSelect:r.pickWarehouse}):s?z(`p`,{class:`hv-hint`},n.value.warehouseNeedSettlement):null,r.warehousesStatus.value===`loading`?z(`p`,{class:`hv-hint`},n.value.warehouseLoading):s&&i.settlement&&r.warehousesStatus.value===`ready`&&!r.warehouses.value.length?z(`p`,{class:`hv-hint`},n.value.warehouseNone):null],i.method===`np_courier`?l(`hv-address`,n.value.street,i.street,a.address,`street`,{autocomplete:`street-address`}):null],v=[l(`hv-postcode`,n.value.postcode,i.postcode,a.postcode,`postcode`,{inputmode:`numeric`,maxlength:5,autocomplete:`postal-code`}),l(`hv-region`,n.value.region,i.region,a.region,`region`,{autocomplete:`address-level1`}),l(`hv-city`,n.value.upCity,i.city,a.city,`city`,{autocomplete:`address-level2`}),l(`hv-address`,n.value.upAddress,i.address,a.address,`address`,{autocomplete:`street-address`})];return To(n.value.deliveryTitle,`hv-delivery`,[vo(t,`delivery-note`),g,...o?_:v,a.delivery?z(`p`,{id:`hv-delivery-error`,class:`hv-error`},a.delivery):null])}}}),Bh={lines:[`hv-lines-error`,`hv-line-qty-0`],name:[`hv-buyer-name`],phone:[`hv-buyer-phone`],email:[`hv-buyer-email`],comment:[`hv-buyer-comment`],settlement:[`hv-settlement-input`,`hv-manual-city`],warehouse:[`hv-warehouse-input`,`hv-manual-warehouse`],address:[`hv-address`],postcode:[`hv-postcode`],region:[`hv-region`],city:[`hv-city`],consent:[`hv-consent`],payment:[`hv-payment-group`],delivery:[`hv-delivery-error`]};function Vh(e){for(let t of Bh[e]??[]){let e=document.getElementById(t);if(e)return e.focus(),!0}return!1}var Hh=N({name:`HvErrorSummary`,props:{...go,errors:{type:Object,default:()=>({})},formError:{type:String,default:``}},setup(e){let t=H(e),n=j(null);return Kn(()=>e.errors,async e=>{Object.keys(e).length&&(await En(),n.value?.focus())}),()=>{let r=Object.entries(e.errors);return!r.length&&!e.formError?null:z(`div`,{ref:n,class:`hv-error-summary`,role:`alert`,tabindex:-1},[z(`p`,{class:`hv-error-summary-title`},t.value.errorSummary),e.formError?z(`p`,e.formError):null,r.length?z(`ul`,r.map(([e,t])=>z(`li`,{key:e},[z(`a`,{class:`hv-error-summary-link`,href:`#${Bh[e]?.[0]??e}`,onClick:t=>{Vh(e)&&t.preventDefault()}},t)]))):null])}}});function Uh(e,t){let n=Math.max(1,t?.min??1),r=Math.max(1,t?.step??1),i=n+Math.ceil((Math.min(99,Math.max(n,Math.trunc(e)))-n)/r)*r;return i<=99?i:n+Math.floor((99-n)/r)*r}var Wh=N({name:`HvLinesSection`,props:{...go,cart:{type:Object,required:!0},catalog:{type:Object,required:!0},error:String,quantityRule:Function},setup(e,{slots:t}){let n=H(e),{announce:r,region:i}=So(),a=j(),o=j({}),s=t=>e.quantityRule?.(t),c=t=>e.cart.options.value.find(e=>e.id===t)?.label??``,l=t=>Za(t,e.catalog.landing.currency,e.lang);function u(t,i){let a=Uh(i,s(t));e.cart.setQuantity(t,a),r(V(n.value.qtyNow,{n:a}))}function d(e,t,i){delete o.value[e];let a=t.trim();if(!/^\d+$/.test(a))return r(V(n.value.qtyNow,{n:i}));u(e,Number(a))}function f(){En(()=>{(a.value?.querySelector(`.hv-add`)??a.value?.querySelector(`.hv-stepper-input`))?.focus()})}return()=>{let{lines:p,options:m,unavailableIds:h}=e.cart,g=m.value;if(g.length&&g.every(e=>e.disabled))return To(n.value.linesTitle,`hv-lines`,[z(`div`,{class:`hv-notice`,role:`alert`},[z(`p`,n.value.allSoldOut),vo(t,`sold-out`)])]);let _=p.value.length>=20;return To(n.value.linesTitle,`hv-lines`,[vo(t,`before-lines`),...p.value.map((t,i)=>{let a=t.variantId,m=h.value.includes(a),_=s(a),v=_?.step??1,y=_?.min??1,b=t.quantity-v<y,x=t.quantity+v>99,ee=g.find(e=>e.id===a)?.unitPriceMinor??0,S=c(a),C=`hv-line-gone-${i}`,te=`hv-line-qty-${i}`,ne=[m?C:``,_?`hv-line-rule-${i}`:``].filter(Boolean).join(` `)||void 0;return z(`div`,{key:a,class:`hv-line`,"data-gone":m?`true`:void 0},[g.length>1?z(`div`,{class:`hv-field`},[z(`label`,{class:`hv-label`,for:`hv-line-variant-${i}`},n.value.variant),z(`select`,{id:`hv-line-variant-${i}`,class:`hv-select`,value:a,"aria-describedby":m?C:void 0,onChange:t=>e.cart.replaceVariant(a,Number(t.target.value))},g.map(e=>z(`option`,{key:e.id,value:e.id,disabled:e.disabled,selected:e.id===a},e.disabled?`${e.label} (${n.value.soldOutOption})`:e.label)))]):z(`span`,{class:`hv-line-name`},S),z(`span`,{class:`hv-line-price`},l(ee)),z(`div`,{class:`hv-line-actions`},[z(`div`,{class:`hv-stepper`,role:`group`,"aria-label":V(n.value.qtyLabel,{name:S})},[z(`button`,{type:`button`,class:`hv-stepper-button`,"aria-label":V(n.value.qtyDec,{name:S}),"aria-disabled":b||m?`true`:void 0,onClick:()=>{!b&&!m&&u(a,t.quantity-v)}},`−`),z(`input`,{id:te,class:`hv-stepper-input`,type:`text`,inputmode:`numeric`,pattern:`[0-9]*`,autocomplete:`off`,"aria-label":V(n.value.qtyLabel,{name:S}),"aria-describedby":ne,readonly:m||void 0,value:o.value[a]??String(t.quantity),onInput:e=>{o.value[a]=e.target.value},onBlur:e=>d(a,e.target.value,t.quantity),onKeydown:e=>{e.key===`Enter`&&(e.preventDefault(),d(a,e.target.value,t.quantity))}}),z(`button`,{type:`button`,class:`hv-stepper-button`,"aria-label":V(n.value.qtyInc,{name:S}),"aria-disabled":x||m?`true`:void 0,onClick:()=>{!x&&!m&&u(a,t.quantity+v)}},`+`)]),m?null:z(`span`,{class:`hv-line-price`},l(ee*t.quantity)),z(`button`,{type:`button`,class:`hv-button hv-button-secondary hv-line-remove`,"aria-disabled":p.value.length<2?`true`:void 0,onClick:()=>{p.value.length<2||(e.cart.remove(a),r(V(n.value.lineRemoved,{name:S})),f())}},V(n.value.removeLine,{name:S}))]),x&&!m?z(`p`,{class:`hv-hint`},V(n.value.qtyMax,{max:99})):null,_?z(`p`,{id:`hv-line-rule-${i}`,class:`hv-hint`},V(n.value.qtyRule,{min:_.min,step:_.step})):null,m?z(`p`,{id:C,class:`hv-error`},n.value.lineGone):null])}),z(`button`,{type:`button`,class:`hv-button hv-button-secondary hv-add`,"aria-disabled":_?`true`:void 0,onClick:()=>{_||e.cart.add()}},n.value.addLine),_?z(`p`,{class:`hv-hint`},V(n.value.maxLines,{n:20})):null,e.error?z(`p`,{id:`hv-lines-error`,class:`hv-error`},e.error):null,i()],{ref:a})}}}),Gh=N({name:`HvPaymentSection`,props:{...go,checkout:{type:Object,required:!0},unavailable:{type:Array,default:()=>[]}},setup(e,{slots:t}){let n=H(e);return()=>{let{payment:r,paymentMethods:i,errors:a,setPayment:o}=e.checkout,s=[...i.value].sort((e,t)=>Um.indexOf(e)-Um.indexOf(t)),c=a.value.payment,l=s.length===1?s[0]:void 0;return To(n.value.paymentTitle,`hv-payment`,[l?z(`div`,{class:`hv-choice`},[z(`span`,{class:`hv-choice-title`},n.value.pay[l]),z(`span`,{class:`hv-choice-help`},n.value.payHelp[l])]):z(`div`,{id:`hv-payment-group`,class:`hv-choices`,role:`radiogroup`,"aria-label":n.value.paymentTitle,"aria-describedby":c?`hv-payment-error`:void 0,"aria-invalid":c?`true`:void 0},s.map(t=>{let i=e.unavailable.includes(t);return z(`label`,{key:t,class:`hv-choice`,"aria-disabled":i?`true`:void 0},[z(`input`,{type:`radio`,name:`hv-payment`,value:t,checked:r.value===t,"aria-disabled":i?`true`:void 0,onChange:()=>{i||o(t)},onClick:e=>i&&e.preventDefault()}),z(`span`,{class:`hv-choice-title`},n.value.pay[t]),i?z(`span`,{class:`hv-choice-flag`},n.value.payUnavailable):null,z(`span`,{class:`hv-choice-help`},n.value.payHelp[t])])})),vo(t,`payment-note`),c?z(`p`,{id:`hv-payment-error`,class:`hv-error`},c):null])}}}),Kh=4e3,qh=5e3,Jh=N({name:`HvSubmitSection`,props:{...go,checkout:{type:Object,required:!0},blockedByStock:{type:Boolean,default:!1},priceChange:{type:Object},canGoToPayment:{type:Boolean,default:!1},slowAfterMs:{type:Number,default:Kh},redirectButtonMs:{type:Number,default:qh}},emits:[`confirm-price`,`go-to-payment`],setup(e,{slots:t,emit:n}){let r=H(e),{announce:i,region:a}=So(),o=j(!1),s;Kn(()=>e.checkout.sending.value,t=>{clearTimeout(s),o.value=!1,t&&(s=setTimeout(()=>{o.value=!0,i(r.value.slowSubmit)},e.slowAfterMs))},{immediate:!0});let c=j(!1),l;return Kn(()=>e.checkout.redirecting.value,t=>{clearTimeout(l),c.value=!1,t&&(l=setTimeout(()=>c.value=!0,e.redirectButtonMs))},{immediate:!0}),je(()=>{clearTimeout(s),clearTimeout(l)}),()=>{let i=e.checkout,s=e.lang,l=i.sending.value||i.redirecting.value,u=i.cooldown.value>0,d=l||u||e.blockedByStock||!!i.created.value,f=i.sending.value?r.value.sending:i.redirecting.value?r.value.redirecting:u?V(r.value.cooldownBtn,{s:i.cooldown.value}):r.value.submit,p=[];return e.blockedByStock&&p.push(z(`p`,{class:`hv-notice`,role:`alert`,"data-kind":`error`},r.value.submitBlockedStock)),o.value&&i.sending.value&&p.push(z(`p`,{class:`hv-notice`,role:`status`},r.value.slowSubmit)),(i.cardState.value===`in_progress`||i.cardState.value===`unavailable`||i.cardState.value===`network`)&&p.push(z(`div`,{class:`hv-notice`,role:`alert`,"data-kind":`error`},[z(`p`,i.cardState.value===`unavailable`?r.value.cardUnavailable:i.cardState.value===`network`?r.value.errors.network:r.value.cardPreparing),i.cardState.value===`unavailable`?null:z(`button`,{type:`button`,class:`hv-button hv-button-secondary`,onClick:()=>void i.retryCard()},r.value.cardRetry),vo(t,`fail-extra`)])),i.redirecting.value&&c.value&&e.canGoToPayment&&p.push(z(`p`,{class:`hv-notice`,role:`status`},[`${r.value.cardGo} `,z(`button`,{type:`button`,class:`hv-button hv-button-secondary`,onClick:()=>n(`go-to-payment`)},r.value.cardGoBtn)])),e.priceChange&&p.push(z(`div`,{class:`hv-notice`,role:`alert`,"data-kind":`warn`},[z(`p`,V(r.value.priceChanged,{old:Za(e.priceChange.oldMinor,e.priceChange.currency,s),new:Za(e.priceChange.newMinor,e.priceChange.currency,s)})),z(`button`,{type:`button`,class:`hv-button hv-button-primary`,onClick:()=>n(`confirm-price`)},r.value.priceConfirm)])),z(`div`,{class:`hv-submit`},[vo(t,`submit-note`),z(`button`,{type:`submit`,class:`hv-button hv-button-primary hv-submit-button`,"aria-disabled":d?`true`:void 0,"aria-busy":i.sending.value?`true`:void 0,onClick:e=>{d&&e.preventDefault()}},f),...p,a()])}}}),Yh=N({name:`HvTotalsSection`,props:{...go,cart:{type:Object,required:!0},catalog:{type:Object,required:!0}},setup(e,{slots:t}){let n=H(e);return()=>{let{lines:r,options:i,unavailableIds:a}=e.cart,o=t=>Za(t,e.catalog.landing.currency,e.lang),s=r.value.filter(e=>!a.value.includes(e.variantId)),c=s.reduce((e,t)=>e+(i.value.find(e=>e.id===t.variantId)?.unitPriceMinor??0)*t.quantity,0),l=s.reduce((e,t)=>e+t.quantity,0),u=(e,t)=>z(`div`,{class:`hv-totals-row`},[z(`dt`,e),z(`dd`,t)]),d=vo(t,`totals-discount`),f=vo(t,`totals-delivery`);return z(`section`,{class:`hv-totals`,"aria-label":n.value.total},[z(`dl`,[u(V(n.value.subtotal,{n:l}),o(c)),d?u(n.value.discount,d):null,f?u(n.value.deliveryFee,f):null,z(`div`,{class:`hv-totals-row hv-totals-total`},[z(`dt`,n.value.total),z(`dd`,{"aria-live":`polite`},o(c))])])])}}}),Xh=N({name:`HvOrderForm`,props:{...go,api:{type:Object,required:!0},policyLinks:{type:Object,required:!0},theme:{type:String,default:`light`},navigate:Function,quantityRule:Function,priceChange:Object},emits:[`refresh-catalog`,`confirm-price`],setup(e,{slots:t,emit:n}){let r=H(e),i=xo(),a=hh(e.api),o=ph(a.catalog),s=Ph(e.api),c=j(),l=Ch({api:e.api,cart:o,delivery:s,lang:e.lang,catalog:a.catalog,navigate:t=>{c.value=t,(e.navigate??$m)(t)},onRefreshCatalog:()=>{n(`refresh-catalog`),a.reload()}});Kn(a.catalog,e=>{e&&!o.lines.value.length&&!o.unavailableIds.value.length&&o.add()},{immediate:!0});let u=R(()=>{let e=a.catalog.value?.delivery_methods,t=Wm.filter(t=>!e||e.includes(t));return t.length?t:[...Wm]});return Kn(l.errors,e=>{e.lines&&o.unavailableIds.value.length&&Vh(`lines`)}),()=>{let d=a.catalog.value,f=a.status.value,p={lang:e.lang,messages:e.messages},m={class:`hv-root`,"data-hv-theme":e.theme};if(!d)return z(`div`,m,[f===`error`?z(`div`,{class:`hv-notice`,role:`alert`,"data-kind":`error`},[z(`p`,r.value.catalogError),z(`button`,{type:`button`,class:`hv-button hv-button-secondary`,onClick:()=>void a.reload()},r.value.retry)]):z(`p`,{class:`hv-skeleton`,role:`status`,"aria-busy":`true`},r.value.loading)]);let h=l.errors.value;return z(`div`,m,[z(`form`,{class:`hv-main`,novalidate:!0,"aria-label":r.value.submit,onSubmit:e=>{e.preventDefault(),l.submit()}},[z(Hh,{...p,errors:h,formError:l.formError.value}),z(Wh,{...p,cart:o,catalog:d,error:h.lines,quantityRule:e.quantityRule},yo(t,[`before-lines`,`sold-out`])),z(Fh,{...p,checkout:l},yo(t,[`buyer-note`])),z(zh,{...p,delivery:s,methods:u.value,errors:h},yo(t,[`delivery-note`])),z(Gh,{...p,checkout:l},yo(t,[`payment-note`])),z(Ih,{...p,checkout:l,policyLinks:e.policyLinks},yo(t,[`consent-extra`])),z(Yh,{...p,cart:o,catalog:d},yo(t,[`totals-discount`,`totals-delivery`])),z(Jh,{...p,checkout:l,blockedByStock:o.unavailableIds.value.length>0,priceChange:e.priceChange,canGoToPayment:!!c.value,onConfirmPrice:()=>n(`confirm-price`),onGoToPayment:()=>c.value&&(e.navigate??$m)(c.value)},yo(t,[`submit-note`,`fail-extra`]))]),z(`p`,{class:`hv-sr-only`,role:`status`},i.text.value)])}}}),Zh=e=>`hoverla:${e}:order`;function Qh(){try{return globalThis.sessionStorage}catch{return}}var $h=e=>typeof e==`string`&&e!==``;function eg(e){let{recipient:t,iban:n,edrpou:r,purpose:i}=e.iban;return{number:e.number,totalMinor:e.totalMinor,currency:e.currency,paymentMethod:e.paymentMethod,iban:{recipient:t,iban:n,...r?{edrpou:r}:{},purpose:i}}}function tg(e,t,n,r=Date.now()){try{let i={...eg(n),savedAt:r};e?.setItem(Zh(t),JSON.stringify(i))}catch{}}function ng(e,t){try{e?.removeItem(Zh(t))}catch{}}function rg(e,t,n=Date.now()){try{let r=e?.getItem(Zh(t));if(!r)return;let i=JSON.parse(r);if(!i||typeof i.savedAt!=`number`||n-i.savedAt>864e5||n<i.savedAt-6e4||!$h(i.number)||typeof i.totalMinor!=`number`||!$h(i.currency)||!$h(i.paymentMethod)||!i.iban||!$h(i.iban.recipient)||!$h(i.iban.iban)||!$h(i.iban.purpose)){ng(e,t);return}return eg(i)}catch{return}}var ig={},ag=()=>ig;function og(e){ig={...ig,...e}}var sg=`https://api-hoverla.dfgk.com.ua`,cg=[`before-lines`,`sold-out`,`buyer-note`,`delivery-note`,`payment-note`,`consent-extra`,`totals-discount`,`totals-delivery`,`submit-note`,`success-extra`,`fail-extra`];function lg(e){return(e?.closest(`[lang]`)?.getAttribute(`lang`)??``).toLowerCase().startsWith(`en`)?`en`:`uk`}var ug=N({name:`HoverlaCheckoutApp`,props:{landing:{type:String,default:``},api:{type:String,default:sg},theme:{type:String,default:`light`},offerHref:{type:String,default:`/offer`},privacyHref:{type:String,default:`/privacy`},homeHref:{type:String,default:`/`}},setup(e){let t=Pi()?.ce,n=()=>lg(t),r=H({get lang(){return n()},get messages(){return ag().messages}}),i=(e,n)=>t?.dispatchEvent(new CustomEvent(`hoverla-${e}`,{detail:n,bubbles:!0,composed:!0})),a=(e,t)=>i(`error`,{where:e,kind:t instanceof B?t.kind:`unexpected`,status:t instanceof B?t.status:0});e.landing||ur(()=>a(`config`,void 0));let o=Qh(),s=j({kind:`form`}),c=R(()=>{let t=Ya({apiBase:e.api.replace(/\/+$/,``),landingSlug:e.landing}),n=Object.fromEntries(Object.entries(t).map(([e,t])=>[e,async(...n)=>{try{return await t(...n)}catch(t){throw t.name!==`AbortError`&&a(e,t),t}}]));return{...n,async createOrder(...e){let t=await n.createOrder(...e);return i(`order-created`,{amount:t.total_minor,currency:t.currency,paymentMethod:t.payment_method}),t},async getStatus(...t){let r=await n.getStatus(...t);return r.iban&&to(r)===`iban_unpaid`&&tg(o,e.landing,{number:r.number,totalMinor:r.total_minor,currency:r.currency,paymentMethod:r.payment_method,iban:r.iban}),r}}}),l=j([]),u=()=>{l.value=Array.from(t?.children??[]).map(e=>e.getAttribute(`slot`)??``).filter(e=>cg.includes(e))},d;ur(()=>{u(),t&&(d=new MutationObserver(u),d.observe(t,{childList:!0,attributes:!0,attributeFilter:[`slot`],subtree:!0}));let n=Qa(window.location.search);if(n){$a(window),s.value={kind:`result`,params:n};return}let r=rg(o,e.landing);r&&(s.value={kind:`stored`,order:r})}),dr(()=>d?.disconnect());let f=e=>Object.fromEntries(e.filter(e=>l.value.includes(e)).map(e=>[e,()=>z(`slot`,{name:e})])),p=()=>{!t||t.getBoundingClientRect().top>=0||t.scrollIntoView({block:`start`,behavior:matchMedia(`(prefers-reduced-motion: reduce)`).matches?`auto`:`smooth`})},m=e=>{if(`success`in e){let t=Qa(new URL(e.success,window.location.href).search);if(t){s.value={kind:`result`,params:t},p();return}}$m(e)},h=j(!1),g=()=>{h.value=!1,ng(o,e.landing),s.value={kind:`form`},p()};return()=>{let t=r.value,i={lang:n(),messages:ag().messages};if(!e.landing)return z(`div`,{class:`hv-root`},[z(`div`,{class:`hv-notice`,role:`alert`,"data-kind":`error`},t.embedNoLanding)]);let a=z(`a`,{class:`hv-button hv-button-secondary`,href:e.homeHref},t.home),o=(e,t)=>z(`button`,{type:`button`,class:`hv-button hv-button-secondary`,onClick:t},e),l=h.value?z(`div`,{class:`hv-notice`,role:`group`},[z(`p`,t.newOrderConfirm),o(t.newOrderYes,g),o(t.newOrderNo,()=>h.value=!1)]):o(t.newOrder,()=>h.value=!0),u=s.value;if(u.kind===`stored`){let n=u.order;return z(`div`,{class:`hv-root hv-result`,"data-hv-theme":e.theme},[z(`h1`,{class:`hv-result-title`,tabindex:-1},t.successTitle),z(`p`,{class:`hv-result-hint`},t.lastOrder),z(`p`,{class:`hv-result-number`},`${t.orderNumber}: ${n.number}`),z(Oo,{...i,iban:n.iban,totalMinor:n.totalMinor,currency:n.currency}),l,a])}return u.kind===`result`?z(`div`,{"data-hv-wrap":``},[z(ko,{...i,api:c.value,params:u.params,theme:e.theme,homeUrl:e.homeHref},f([`success-extra`,`fail-extra`])),z(`div`,{class:`hv-root`},[l])]):z(Xh,{...i,api:c.value,theme:e.theme,navigate:m,policyLinks:{offer:e.offerHref,privacy:e.privacyHref}},f(cg.filter(e=>e!==`success-extra`)))}}}),dg=`1.0.0`,fg=`hoverla-checkout`;function pg(e){return Array.from(e.classList).filter(e=>e.startsWith(`hv-`)&&e!==`hv-sr-only`).map(e=>e.slice(3)).join(` `)}function mg(e){for(let t of e.querySelectorAll(`[class*="hv-"]`)){let e=pg(t);e&&t.getAttribute(`part`)!==e&&t.setAttribute(`part`,e)}}var hg=Ra(ug);function gg(e){let t;try{t=new CSSStyleSheet,t.replaceSync(e)}catch{t=void 0}return class extends hg{constructor(){super();let n=this.shadowRoot;if(n){if(t&&`adoptedStyleSheets`in n)n.adoptedStyleSheets=[t];else{let t=document.createElement(`style`);t.textContent=e,n.prepend(t)}new MutationObserver(()=>mg(n)).observe(n,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`class`]})}}}}function _g(e){typeof customElements<`u`&&(customElements.get(`hoverla-checkout`)||customElements.define(fg,gg(e)))}var vg={configure:og,version:dg};return _g(t),typeof window<`u`&&(window.HoverlaCheckout??=vg),e.HoverlaCheckout=vg,e})({});
|
|
627
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function yf(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;yf(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var bf=new Set([`type`,`properties`,`required`,`additionalProperties`]),xf=[`oneOf`,`anyOf`];function Sf(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Cf(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!bf.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Sf(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}Ro(n,r,e.length===1?e[0]:Cf(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Sf(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function wf(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of bf)if(t in e)return;let n=t.filter(e=>xf.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Cf(t);else{let e=n[0],i=xf.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>Cf([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,mf(e,r))}function Tf(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):mf(i,s),mf(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())yf(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])wf(e)}}let 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){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}mf(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,Ro(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Df(t,`input`,e.processors),output:Df(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Z(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return Z(r.element,n);if(r.type===`set`)return Z(r.valueType,n);if(r.type===`lazy`)return Z(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return Z(r.innerType,n);if(r.type===`intersection`)return Z(r.left,n)||Z(r.right,n);if(r.type===`record`||r.type===`map`)return Z(r.keyType,n)||Z(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:Z(r.in,n)||Z(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Z(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Z(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Z(e,n))return!0;return!!(r.rest&&Z(r.rest,n))}return!1}var Ef=(e,t={})=>n=>{let r=hf({...n,processors:t});return X(e,r),vf(r,e),Tf(r,e)},Df=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=hf({...i??{},target:a,io:t,processors:n});return X(e,o),vf(o,e),Tf(o,e)},Of=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},kf=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Af=(e,t)=>{Of(e,`minimum`,t),kf(e,`maximum`,t)},jf=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Mf=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Nf=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Pf=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Ff=(e,t)=>Of(e,`minimum`,t.minimum),If=(e,t)=>kf(e,`maximum`,t.maximum),Lf=e=>(t,n)=>{Pf(t,n.format);let[r,i]=e[n.format];Of(t,`minimum`,r),kf(t,`maximum`,i)},Rf={greater_than:(e,t)=>Of(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>kf(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>jf(e,t.value),number_format:Lf(rs),bigint_format:Lf(is),min_length:Ff,max_length:If,length_equals:(e,t)=>Af(e,t.length),min_size:Ff,max_size:If,size_equals:(e,t)=>Af(e,t.size),string_format:(e,t)=>{Pf(e,t.format),t.pattern&&Mf(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Nf(e,t.mime)};function zf(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Rf[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Of(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Of(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&kf(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&kf(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&jf(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Nf(t,i.mime);for(let e of i.patterns??[])Mf(t,e);return t}var Bf={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Vf=new Map([[Xl,Lc],[Ql,Rc]]),Hf=e=>Vf.get(e)??e,Uf=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=zf(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Bf[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Hf);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Wf=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=zf(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):gf(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Gf=(e,t,n,r)=>{n.not={}},Kf=(e,t,n,r)=>{let i=e._zod.def,a=Ao(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},qf=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(gf(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(gf(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},Jf=(e,t,n,r)=>{gf(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Yf=(e,t,n,r)=>{gf(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Xf=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=zf(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=X(a.element,t,{...r,path:[...r.path,`items`]})};function Zf(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Zf(t.out):t.type===`catch`?Zf(t.innerType):e._zod.optin}var Qf=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&gf(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)Ro(i.properties,e,X(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Zf(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=X(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},$f=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>X(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},ep=(e,t,n,r)=>{let i=e._zod.def,a=X(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=X(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},tp=(e,t,n,r)=>{let i=e._zod.def,a=X(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},np=(e,t,n,r)=>{let i=e._zod.def;X(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},rp=Symbol();function ip(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(gf(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),rp):JSON.parse(o)}var ap=(e,t,n,r)=>{let i=e._zod.def;X(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=ip(i.defaultValue,e,t,n,r);o!==rp&&(n.default=o)},op=(e,t,n,r)=>{let i=e._zod.def;X(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=ip(i.defaultValue,e,t,n,r);o!==rp&&(n._prefault=o)},sp=(e,t,n,r)=>{let i=e._zod.def;X(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{gf(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},cp=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;X(o,t,r);let s=t.seen.get(e);s.ref=o},lp=(e,t,n,r)=>{let i=e._zod.def;X(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},up=(e,t,n,r)=>{let i=e._zod.def;X(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},dp=new WeakSet([Object.prototype,Error.prototype]);function fp(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var pp=K(`ZodError`,(e,t)=>{Zs.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);dp.has(n)||(dp.add(n),fp(n,`format`,e=>t=>ec(e,t)),fp(n,`flatten`,e=>t=>$s(e,t)),fp(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Mo,2)}),fp(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Mo,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),mp=nc(pp),hp=rc(pp),gp=ic(pp),_p=oc(pp),vp=fc(pp),yp=pc(pp),bp=mc(pp),xp=hc(pp),Sp=gc(pp),Cp=_c(pp),wp=vc(pp),Tp=yc(pp);function Ep(){Ws.localeError||Gs(sd())}function Dp(){Ws.memoizer||Gs({memoizer:id()})}var Q=K(`ZodType`,(e,t)=>(Ep(),J.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(U(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return es(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Vm(e,t))},superRefine(e,t){return this.check(Hm(e,t))},overwrite(e){return this.check(rf(e))},optional(){return Cm(this)},exactOptional(){return Tm(this)},nullable(){return Dm(this)},nullish(){return Cm(Dm(this))},nonoptional(e){return Nm(this,e)},array(){return lm(this)},or(e){return pm([this,e])},and(e){return hm(this,e)},transform(e){return Lm(this,xm(e))},default(e){return km(this,e)},prefault(e){return jm(this,e)},catch(e){return Fm(this,e)},pipe(e){return Lm(this,e)},readonly(){return zm(this)},describe(e){let t=this.clone();return dd.add(t,{description:e}),t},meta(...e){if(e.length===0)return dd.get(this);let t=this.clone();return dd.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Os(this,`~standard`,{...vl(this),jsonSchema:{input:Df(this,`input`),output:Df(this,`output`)}})},set"~standard"(e){Ds(this,`~standard`,e)},parse:function e(t,n){return mp(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await hp(this,t,n,{callee:e})},safeParse(e,t){return gp(this,e,t)},async safeParseAsync(e,t){return _p(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Ds(this,`spa`,e)},validate(e,t){return lc(this,e,t)},validateAsync(e,t){return dc(this,e,t)},encode:function e(t,n){return vp(this,t,n,{callee:e})},decode:function e(t,n){return yp(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await bp(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await xp(this,t,n,{callee:e})},safeEncode(e,t){return Sp(this,e,t)},safeDecode(e,t){return Cp(this,e,t)},async safeEncodeAsync(e,t){return wp(this,e,t)},async safeDecodeAsync(e,t){return Tp(this,e,t)},toJSONSchema(e){return Ef(this,{})(e)},get description(){return dd.get(this)?.description},get _def(){return this._zod.def}}),Op=K(`_ZodString`,(e,t)=>{yl.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uf(e,t,n,r)},ks({format:e=>zf(e).format??null,minLength:e=>zf(e).minimum??null,maxLength:e=>zf(e).maximum??null},{regex(...e){return this.check(Zd(...e))},includes(...e){return this.check(ef(...e))},startsWith(...e){return this.check(tf(...e))},endsWith(...e){return this.check(nf(...e))},min(...e){return this.check(Yd(...e))},max(...e){return this.check(Jd(...e))},length(...e){return this.check(Xd(...e))},nonempty(...e){return this.check(Yd(1,...e))},lowercase(e){return this.check(Qd(e))},uppercase(e){return this.check($d(e))},trim(){return this.check(of())},normalize(...e){return this.check(af(...e))},toLowerCase(){return this.check(sf())},toUpperCase(){return this.check(cf())},slugify(){return this.check(lf())}})),kp=K(`ZodString`,(e,t)=>{yl.init(e,t),Op.init(e,t)},{email(e){return this.check(md(Fp,e))},url(e){return this.check(bd(zp,e))},jwt(e){return this.check(Fd(em,e))},emoji(e){return this.check(xd(Bp,e))},guid(e){return this.check(hd(Lp,e))},uuid(e){return this.check(gd(Rp,e))},uuidv4(e){return this.check(_d(Rp,e))},uuidv6(e){return this.check(vd(Rp,e))},uuidv7(e){return this.check(yd(Rp,e))},nanoid(e){return this.check(Sd(Vp,e))},cuid(e){return this.check(Cd(Hp,e))},cuid2(e){return this.check(wd(Up,e))},ulid(e){return this.check(Td(Wp,e))},base64(e){return this.check(Md(Zp,e))},base64url(e){return this.check(Nd(Qp,e))},xid(e){return this.check(Ed(Gp,e))},ksuid(e){return this.check(Dd(Kp,e))},ipv4(e){return this.check(Od(qp,e))},ipv6(e){return this.check(kd(Jp,e))},cidrv4(e){return this.check(Ad(Yp,e))},cidrv6(e){return this.check(jd(Xp,e))},e164(e){return this.check(Pd($p,e))},datetime(e){return this.check(Id(jp,e))},date(e){return this.check(Ld(Mp,e))},time(e){return this.check(Rd(Np,e))},duration(e){return this.check(zd(Pp,e))}});function Ap(e){return pd(kp,e)}var $=K(`ZodStringFormat`,(e,t)=>{Y.init(e,t),Op.init(e,t)}),jp=K(`ZodISODateTime`,(e,t)=>{Rl.init(e,t),$.init(e,t)}),Mp=K(`ZodISODate`,(e,t)=>{zl.init(e,t),$.init(e,t)}),Np=K(`ZodISOTime`,(e,t)=>{Bl.init(e,t),$.init(e,t)}),Pp=K(`ZodISODuration`,(e,t)=>{Vl.init(e,t),$.init(e,t)}),Fp=K(`ZodEmail`,(e,t)=>{Sl.init(e,t),$.init(e,t)});function Ip(e){return md(Fp,e)}var Lp=K(`ZodGUID`,(e,t)=>{bl.init(e,t),$.init(e,t)}),Rp=K(`ZodUUID`,(e,t)=>{xl.init(e,t),$.init(e,t)}),zp=K(`ZodURL`,(e,t)=>{Al.init(e,t),$.init(e,t)}),Bp=K(`ZodEmoji`,(e,t)=>{jl.init(e,t),$.init(e,t)}),Vp=K(`ZodNanoID`,(e,t)=>{Ml.init(e,t),$.init(e,t)}),Hp=K(`ZodCUID`,(e,t)=>{Nl.init(e,t),$.init(e,t)}),Up=K(`ZodCUID2`,(e,t)=>{Pl.init(e,t),$.init(e,t)}),Wp=K(`ZodULID`,(e,t)=>{Fl.init(e,t),$.init(e,t)}),Gp=K(`ZodXID`,(e,t)=>{Il.init(e,t),$.init(e,t)}),Kp=K(`ZodKSUID`,(e,t)=>{Ll.init(e,t),$.init(e,t)}),qp=K(`ZodIPv4`,(e,t)=>{Hl.init(e,t),$.init(e,t)}),Jp=K(`ZodIPv6`,(e,t)=>{Gl.init(e,t),$.init(e,t)}),Yp=K(`ZodCIDRv4`,(e,t)=>{Kl.init(e,t),$.init(e,t)}),Xp=K(`ZodCIDRv6`,(e,t)=>{Jl.init(e,t),$.init(e,t)}),Zp=K(`ZodBase64`,(e,t)=>{Zl.init(e,t),$.init(e,t)}),Qp=K(`ZodBase64URL`,(e,t)=>{eu.init(e,t),$.init(e,t)}),$p=K(`ZodE164`,(e,t)=>{tu.init(e,t),$.init(e,t)}),em=K(`ZodJWT`,(e,t)=>{ru.init(e,t),$.init(e,t)}),tm=K(`ZodNumber`,(e,t)=>{iu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wf(e,t,n,r),e.isFinite=!0},ks({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=zf(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=zf(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=zf(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>zf(e).format??null},{gt(e,t){return this.check(Gd(e,t))},gte(e,t){return this.check(Kd(e,t))},min(e,t){return this.check(Kd(e,t))},lt(e,t){return this.check(Ud(e,t))},lte(e,t){return this.check(Wd(e,t))},max(e,t){return this.check(Wd(e,t))},int(e){return this.check(rm(e))},safe(e){return this.check(rm(e))},positive(e){return this.check(Gd(0,e))},nonnegative(e){return this.check(Kd(0,e))},negative(e){return this.check(Ud(0,e))},nonpositive(e){return this.check(Wd(0,e))},multipleOf(e,t){return this.check(qd(e,t))},step(e,t){return this.check(qd(e,t))},finite(){return this}})),nm=K(`ZodNumberFormat`,(e,t)=>{au.init(e,t),tm.init(e,t)});function rm(e){return Bd(nm,e)}var im=K(`ZodUnknown`,(e,t)=>{ou.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function am(){return Vd(im)}var om=K(`ZodNever`,(e,t)=>{su.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gf(e,t,n,r)});function sm(e){return Hd(om,e)}var cm=K(`ZodArray`,(e,t)=>{Dp(),du.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xf(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Yd(e,t))},nonempty(e){return this.check(Yd(1,e))},max(e,t){return this.check(Jd(e,t))},length(e,t){return this.check(Xd(e,t))},unwrap(){return this.element}});function lm(e,t){return uf(cm,e,t)}var um=K(`ZodObject`,(e,t)=>{Dp(),_u.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qf(e,t,n,r),Fs(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return _m(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(U(this._zod.def,{catchall:e}))},passthrough(){return this.clone(U(this._zod.def,{catchall:am()}))},loose(){return this.clone(U(this._zod.def,{catchall:am()}))},strict(){return this.clone(U(this._zod.def,{catchall:sm()}))},strip(){return this.clone(U(this._zod.def,{catchall:void 0}))},extend(e){return cs(this,e)},safeExtend(e){return us(this,e)},merge(e){return ds(this,e)},pick(e){return as(this,e)},omit(e){return ss(this,e)},partial(...e){return fs(Sm,this,e[0])},exactPartial(...e){return fs(wm,this,e[0],`exactPartial`)},required(...e){return ps(Mm,this,e[0])}});function dm(e,t){return new um({type:`object`,shape:e,catchall:sm(),...W(t)})}var fm=K(`ZodUnion`,(e,t)=>{yu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$f(e,t,n,r),e.options=t.options});function pm(e,t){return new fm({type:`union`,options:e,...W(t)})}var mm=K(`ZodIntersection`,(e,t)=>{bu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ep(e,t,n,r)});function hm(e,t){return new mm({type:`intersection`,left:e,right:t})}var gm=K(`ZodEnum`,(e,t)=>{Cu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kf(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new gm({...t,checks:[],...W(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new gm({...t,checks:[],...W(r),entries:i})}});function _m(e,t){return new gm({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...W(t)})}var vm=K(`ZodLiteral`,(e,t)=>{wu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qf(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function ym(e,t){return new vm({type:`literal`,values:Array.isArray(e)?e:[e],...W(t)})}var bm=K(`ZodTransform`,(e,t)=>{Dp(),Tu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yf(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Us(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ts(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Ts(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function xm(e){return new bm({type:`transform`,transform:e})}var Sm=K(`ZodOptional`,(e,t)=>{Du.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>up(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Cm(e){return new Sm({type:`optional`,innerType:e})}var wm=K(`ZodExactOptional`,(e,t)=>{Ou.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>up(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Tm(e){return new wm({type:`optional`,innerType:e})}var Em=K(`ZodNullable`,(e,t)=>{ku.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tp(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Dm(e){return new Em({type:`nullable`,innerType:e})}var Om=K(`ZodDefault`,(e,t)=>{Au.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ap(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function km(e,t){return new Om({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Zo(t)}})}var Am=K(`ZodPrefault`,(e,t)=>{Mu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>op(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jm(e,t){return new Am({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Zo(t)}})}var Mm=K(`ZodNonOptional`,(e,t)=>{Nu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>np(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Nm(e,t){return new Mm({type:`nonoptional`,innerType:e,...W(t)})}var Pm=K(`ZodCatch`,(e,t)=>{Iu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sp(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Fm(e,t){return new Pm({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Ls(t)})}var Im=K(`ZodPipe`,(e,t)=>{Lu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cp(e,t,n,r),e.in=t.in,e.out=t.out});function Lm(e,t){return new Im({type:`pipe`,in:e,out:t})}var Rm=K(`ZodReadonly`,(e,t)=>{zu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lp(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zm(e){return new Rm({type:`readonly`,innerType:e})}var Bm=K(`ZodCustom`,(e,t)=>{Vu.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jf(e,t,n,r)});function Vm(e,t={}){return df(Bm,e,t)}function Hm(e,t){return ff(e,t)}var Um=[`card_online`,`card_instalments`,`np_cod`,`iban`],Wm=[`np_branch`,`np_locker`,`np_courier`,`ukrposhta`];function Gm(e){let t=e.replace(/[\s\-()]/g,``),n=/^(?:\+?380|0)(\d{9})$/.exec(t)?.[1];if(n&&!n.startsWith(`0`))return`+380${n}`}function Km(e){let t=Gm(e);if(!t)return e;let n=t.slice(4);return`+380 ${n.slice(0,2)} ${n.slice(2,5)} ${n.slice(5,7)} ${n.slice(7)}`}var qm=e=>Ap().trim().min(1).max(e).optional(),Jm=[`np_city_ref`,`np_city_name`,`np_warehouse_ref`,`np_warehouse_name`],Ym=[...Jm,`up_postcode`,`up_region`,`up_city`,`up_address`],Xm={np_branch:{required:Jm,optional:[]},np_locker:{required:Jm,optional:[]},np_courier:{required:[`np_city_ref`,`np_city_name`,`up_address`],optional:[]},ukrposhta:{required:[`up_postcode`,`up_city`,`up_address`],optional:[`up_region`]}},Zm={unit_price_minor:am().optional(),price:am().optional(),subtotal_minor:am().optional(),shipping_minor:am().optional(),total_minor:am().optional()},Qm=dm({lines:lm(dm({variant_id:rm().positive(),quantity:rm().min(1).max(99),...Zm})).min(1).max(20),payment_method:_m(Um),delivery_method:_m(Wm),buyer_name:Ap().trim().min(2).max(100),buyer_phone:Ap().max(32).transform((e,t)=>{let n=Gm(e);return n===void 0&&t.issues.push({code:`custom`,message:`invalid_phone`,input:e}),n??e}),buyer_email:Ap().trim().max(254).pipe(Ip()).optional(),buyer_comment:Ap().trim().max(500).optional(),np_city_ref:qm(64),np_city_name:qm(100),np_warehouse_ref:qm(64),np_warehouse_name:qm(100),up_postcode:Ap().trim().regex(/^\d{5}$/).optional(),up_region:qm(100),up_city:qm(100),up_address:qm(200),consent:ym(!0),website:Ap().optional(),form_elapsed_ms:rm().min(0),...Zm}).superRefine((e,t)=>{let n=Xm[e.delivery_method],r=e;for(let e of Ym){let i=r[e]!==void 0;n.required.includes(e)&&!i?t.addIssue({code:`custom`,path:[e],message:`required`}):i&&!n.required.includes(e)&&!n.optional.includes(e)&&t.addIssue({code:`custom`,path:[e],message:`not_allowed`})}});function $m(e){if(`success`in e)return void window.location.assign(e.success);if(`redirect_url`in e)return void window.location.assign(e.redirect_url);let t=document.createElement(`form`);t.method=`POST`,t.action=e.form.action;for(let[n,r]of Object.entries(e.form.fields)){let e=document.createElement(`input`);e.type=`hidden`,e.name=n,e.value=r,t.append(e)}document.body.append(t),t.submit()}function eh(e){return e.products.flatMap(e=>e.variants.map(t=>({id:t.id,label:`${e.name} — ${t.name}`,disabled:!t.available,unitPriceMinor:t.unit_price_minor})))}function th(e){return Number.isFinite(e)?Math.min(99,Math.max(1,Math.trunc(e))):1}function nh(e,t,n=1){let r=e.find(e=>e.variantId===t);return r?e.map(e=>e===r?{...e,quantity:th(e.quantity+n)}:e):e.length>=20?e:[...e,{variantId:t,quantity:th(n)}]}function rh(e,t,n){return e.map(e=>e.variantId===t?{...e,quantity:th(n)}:e)}function ih(e,t){return e.filter(e=>e.variantId!==t)}function ah(e,t){let n=new Map(eh(e).map(e=>[e.id,e.unitPriceMinor]));return t.reduce((e,t)=>e+(n.get(t.variantId)??0)*t.quantity,0)}function oh(e){return e.map(e=>({variant_id:e.variantId,quantity:e.quantity}))}function sh(e,t){let n=new Set(t.filter(e=>!e.available).map(e=>e.variant_id));return e.filter(e=>n.has(e.variantId)).map(e=>e.variantId)}function ch(e,t,n){if(t===n)return e;let r=e.find(e=>e.variantId===n);if(!r)return e.map(e=>e.variantId===t?{...e,variantId:n}:e);let i=e.find(e=>e.variantId===t);return e.filter(e=>e.variantId!==t).map(e=>e===r?{...e,quantity:th(e.quantity+(i?.quantity??0))}:e)}function lh(e,t){let n=eh(e).filter(e=>!e.disabled),r=new Set(t.map(e=>e.variantId));return(n.find(e=>!r.has(e.id))??n[0])?.id}var uh=`dfgk-cart`;function dh(e){let t=e;return typeof t==`object`&&!!t&&Number.isInteger(t.variantId)&&Number.isInteger(t.quantity)}function fh(e={}){let{persist:t}=e,n=t?.key??uh,r,i=[],a=new Set,o=!t,s=oo(c());function c(){let e=r?eh(r):[],t=new Set(e.filter(e=>!e.disabled).map(e=>e.id)),n=r?i.map(e=>e.variantId).filter(e=>!t.has(e)):[];return{lines:i,unavailableIds:[...new Set([...n,...a])].filter(e=>i.some(t=>t.variantId===e)),options:e,totalMinor:r?ah(r,i):0,count:i.reduce((e,t)=>e+t.quantity,0)}}function l(e,r=!0){if(i=e,s.set(c()),r&&t&&o)try{t.storage.setItem(n,JSON.stringify(i))}catch{}}return{getState:s.getState,subscribe:s.subscribe,setCatalog(e){r=e,s.set(c())},add(e,t=1){let n=e??(r&&lh(r,i));n!==void 0&&l(nh(i,n,t))},setQuantity:(e,t)=>l(rh(i,e,t)),remove(e){a.delete(e),l(ih(i,e))},replaceVariant(e,t){a.delete(e),l(ch(i,e,t))},markUnavailable(e){a=new Set(sh(i,e)),s.set(c())},clear(){a=new Set,l([])},payload:()=>oh(i),hydrate(){if(t&&!o){o=!0;try{let e=JSON.parse(t.storage.getItem(n)??`[]`);Array.isArray(e)&&i.length===0&&l(e.filter(dh).reduce((e,t)=>nh(e,t.variantId,t.quantity),[]),!1)}catch{}}}}}function ph(e,t={}){let n=fh(t),r=co(n);return Kn(()=>an(e),n.setCatalog,{immediate:!0}),lo(()=>n.hydrate()),{controller:n,lines:R(()=>r.value.lines),unavailableIds:R(()=>r.value.unavailableIds),options:R(()=>r.value.options),totalMinor:R(()=>r.value.totalMinor),count:R(()=>r.value.count),add:n.add,setQuantity:n.setQuantity,remove:n.remove,replaceVariant:n.replaceVariant,markUnavailable:n.markUnavailable,clear:n.clear,hydrate:n.hydrate}}function mh(e){let t=oo({status:`idle`,catalog:void 0}),n=0;return{getState:t.getState,subscribe:t.subscribe,async load(){let r=++n;t.set({status:`loading`});try{let i=await e.getCatalog();r===n&&t.set({status:`ready`,catalog:i})}catch{r===n&&t.set({status:`error`})}}}}function hh(e){let t=mh(e),n=co(t);return lo(()=>void t.load()),{controller:t,status:R(()=>n.value.status),catalog:R(()=>n.value.catalog),reload:()=>t.load()}}var gh={buyer_name:`name`,buyer_phone:`phone`,buyer_email:`email`,buyer_comment:`comment`,np_city_ref:`settlement`,np_city_name:`settlement`,np_warehouse_ref:`warehouse`,np_warehouse_name:`warehouse`,up_address:`address`,up_postcode:`postcode`,up_region:`region`,up_city:`city`,consent:`consent`,payment_method:`payment`,delivery_method:`delivery`};function _h(e){return e===`lines`||e.startsWith(`lines.`)?`lines`:gh[e]}function vh(e){let t={fields:{},staleVariantIds:[]};if(!(e instanceof B))return{...t,message:`unexpected`,action:`retry`};switch(e.kind){case`invalid_request`:{let n={};for(let t of e.fields){let e=_h(t.path);e&&!n[e]&&(n[e]=t.code)}return{...t,fields:n,message:`fixFields`,action:`none`}}case`form_too_fast`:return{...t,message:`form_too_fast`,action:`retry_soon`,waitSeconds:3};case`out_of_stock`:return{...t,message:`out_of_stock`,action:`refresh_catalog`,staleVariantIds:e.items.filter(e=>!e.available).map(e=>e.variant_id)};case`payment_method_disabled`:case`payment_method_unavailable`:return{...t,message:e.kind,action:`choose_payment`};case`variant_unavailable`:return{...t,message:e.kind,action:`refresh_catalog`};case`rate_limited`:return{...t,message:`rate_limited`,action:`wait`,waitSeconds:e.retryAfterSeconds??60};case`network`:return{...t,message:`network`,action:`retry`};default:return{...t,message:`unexpected`,action:`retry`}}}function yh(e=()=>Date.now()){let t=e();return{elapsedMs:()=>Math.max(0,Math.round(e()-t))}}var bh=e=>e===`card_online`||e===`card_instalments`;function xh({form_elapsed_ms:e,...t}){return t}function Sh(e){let{api:t,cart:n,delivery:r,lang:i}=e,a=e.navigate??$m,o=fo[i],s=Xa(),c=yh(),l,u=oo({form:{name:``,phone:``,email:``,comment:``,consent:!1,website:``},payment:Um[0],paymentMethods:[...Um],errors:{},formError:``,sending:!1,cooldown:0,created:void 0,cardState:``,redirecting:!1}),d=e=>o.errors[e]??o.errors.generic;function f(e,t){return d(e===`settlement`&&t===`required`?`choose_settlement`:e===`warehouse`&&t===`required`?`choose_warehouse`:e===`consent`?`consent_required`:e===`postcode`?`invalid_postcode`:e===`email`?`invalid_email`:t)}function p(e){clearInterval(l),u.set({cooldown:e}),l=setInterval(()=>{let e=Math.max(0,u.getState().cooldown-1);u.set({cooldown:e}),e||clearInterval(l)},1e3)}function m(){let{form:e,payment:t}=u.getState(),i=e=>e.trim()===``?void 0:e;return{lines:n.payload(),payment_method:t,delivery_method:r.getState().delivery.method,buyer_name:e.name,buyer_phone:e.phone,buyer_email:i(e.email),buyer_comment:i(e.comment),...r.fields(),consent:e.consent,website:e.website,form_elapsed_ms:c.elapsedMs()}}function h(e,t){u.set({errors:e,formError:t})}async function g(e,n){u.set({cardState:``});try{let r=await t.startCheckout(e,n);if(!Ja(r)){u.set({cardState:`unavailable`});return}u.set({redirecting:!0}),a(r)}catch(e){u.set({redirecting:!1,cardState:e instanceof B&&e.kind===`checkout_in_progress`?`in_progress`:e instanceof B&&e.kind===`network`?`network`:`unavailable`})}}async function _(r=!1){let i=u.getState();if(i.sending||i.cooldown||i.created)return;u.set({errors:{},formError:``}),n.markUnavailable([]);let c=Qm.safeParse(m());if(!c.success){let e={};for(let t of c.error.issues){let n=_h(t.path.join(`.`));n&&!e[n]&&(e[n]=f(n,t.code===`custom`?t.message:t.code))}return h(e,o.fixFields)}u.set({sending:!0});try{let e=c.data,n=await t.createOrder(e,s.keyFor(xh(e)));if(s.done(),bh(u.getState().payment))u.set({created:{number:n.number,token:n.status_token}}),await g(n.number,n.status_token);else{let e=new URLSearchParams({number:n.number,t:n.status_token});a({success:`/success?${e}`})}}catch(t){let i=vh(t);if(!r&&i.message===`form_too_fast`)return await new Promise(e=>setTimeout(e,(i.waitSeconds??3)*1e3)),u.set({sending:!1}),_(!0);let a={};for(let[e,t]of Object.entries(i.fields))a[e]=f(e,t);i.action===`choose_payment`&&(a.payment=d(`choose_payment`)),t instanceof B&&t.items.length&&n.markUnavailable(t.items),(i.action===`refresh_catalog`||i.action===`choose_payment`)&&e.onRefreshCatalog?.(),i.waitSeconds&&p(i.waitSeconds);let s=i.message===`fixFields`?o.fixFields:d(i.message);h(a,i.action===`wait`?`${s} ${V(o.waitSeconds,{s:i.waitSeconds??0})}`:s)}finally{u.set({sending:!1})}}let v=!1;return{getState:u.getState,subscribe:u.subscribe,setCatalog(e){if(!e)return;let t=e.payment_methods.filter(e=>Um.includes(e)),{payment:n,errors:i}=u.getState(),a=!t.includes(n);u.set({paymentMethods:t,...a&&{payment:t[0]??n,...v&&{errors:{...i,payment:d(`choose_payment`)}}}});let o=r.getState().delivery.method,s=Wm.filter(t=>e.delivery_methods.includes(t));s.length&&!s.includes(o)&&r.setMethod(s[0])},setField(e,t){u.set({form:{...u.getState().form,[e]:t}})},setPayment(e){v=!0,u.set({payment:e})},start(){c=yh()},formatPhone(){let{form:e}=u.getState();e.phone.trim()&&u.set({form:{...e,phone:Km(e.phone)}})},submit:()=>_(),async retryCard(){let{created:e,redirecting:t}=u.getState();e&&!t&&await g(e.number,e.token)},dispose(){clearInterval(l)}}}function Ch(e){let t=Sh({...e,cart:e.cart.controller,delivery:e.delivery.controller}),n=co(t),{catalog:r}=e;return r!==void 0&&Kn(()=>an(r),t.setCatalog,{immediate:!0}),lo(t.start),je(t.dispose),{controller:t,form:R(()=>n.value.form),payment:R(()=>n.value.payment),paymentMethods:R(()=>n.value.paymentMethods),errors:R(()=>n.value.errors),formError:R(()=>n.value.formError),sending:R(()=>n.value.sending),cooldown:R(()=>n.value.cooldown),created:R(()=>n.value.created),cardState:R(()=>n.value.cardState),redirecting:R(()=>n.value.redirecting),setField:t.setField,setPayment:t.setPayment,formatPhone:t.formatPhone,submit:t.submit,retryCard:t.retryCard}}function wh(e){return{method:e,manual:!1,manualCity:``,manualWarehouse:``,street:``,postcode:``,region:``,city:``,address:``}}var Th=e=>e!==`ukrposhta`;function Eh(e,t){if(t===e.method)return e;let n=wh(t);return Th(t)&&Th(e.method)&&(n.manual=e.manual,n.manualCity=e.manualCity,e.settlement&&(n.settlement=e.settlement)),n}var Dh=e=>e?.trim()?e.trim():void 0;function Oh(e){let t=e.manual?Dh(e.manualCity):e.settlement?.ref,n=e.manual?Dh(e.manualCity):e.settlement?.name;return{...t&&{np_city_ref:t},...n&&{np_city_name:n}}}function kh(e){switch(e.method){case`np_branch`:case`np_locker`:{let t=e.manual?Dh(e.manualWarehouse):e.warehouse?.ref,n=e.manual?Dh(e.manualWarehouse):e.warehouse?.name;return{...Oh(e),...t&&{np_warehouse_ref:t},...n&&{np_warehouse_name:n}}}case`np_courier`:{let t=Dh(e.street);return{...Oh(e),...t&&{up_address:t}}}case`ukrposhta`:{let t=Dh(e.postcode),n=Dh(e.region),r=Dh(e.city),i=Dh(e.address);return{...t&&{up_postcode:t},...n&&{up_region:n},...r&&{up_city:r},...i&&{up_address:i}}}}}function Ah(e){return e instanceof B&&(e.kind===`np_unavailable`||e.kind===`network`||e.status>=500)}function jh(e){let t=new Map,n=new Map,r=0;async function i(e){let t=r-Date.now();if(t>0)throw new B(`rate_limited`,429,{retryAfterSeconds:Math.ceil(t/1e3)});try{return(await e()).items}catch(e){throw e instanceof B&&e.status===429&&(r=Date.now()+(e.retryAfterSeconds??30)*1e3),e}}return{async settlements(n,r){let a=n.trim().toLowerCase(),o=t.get(a);if(o)return o;let s=await i(()=>e.searchSettlements(n.trim(),r));return t.set(a,s),s},async warehouses(t,r,a){let o=`${t}|${r}`,s=n.get(o);if(s)return s;let c=await i(()=>e.getWarehouses(t,r,a));return n.set(o,c),c}}}function Mh(e){let t=e.delayMs??250,n=e.minChars??2,r,i,a=0,o=!1;function s(){clearTimeout(r),r=void 0,i?.abort(),i=void 0,a++}return{input(c){if(s(),o)return;let l=c.trim();if([...l].length<n)return e.onState({status:`idle`,items:[]});let u=a;r=setTimeout(async()=>{i=new AbortController,e.onState({status:`loading`,items:[]});try{let t=await e.search(l,i.signal);u===a&&e.onState({status:`ready`,items:t})}catch(t){u===a&&!(t instanceof B&&t.kind===`aborted`)&&e.onState({status:`error`,items:[],error:t})}},t)},dispose(){o=!0,s()}}}function Nh(e,t={}){let n=jh(e),r=oo({delivery:wh(t.method??`np_branch`),settlementText:``,settlements:{status:`idle`,items:[]},warehouseText:``,warehouses:[],warehousesStatus:`idle`,waitSeconds:0}),i,a=e=>r.set({delivery:{...r.getState().delivery,...e}});function o(e){Ah(e)?(a({manual:!0}),c()):e instanceof B&&e.status===429&&r.set({waitSeconds:e.retryAfterSeconds??30})}let s=Mh({search:(e,t)=>n.settlements(e,t),onState:e=>{r.set({settlements:e}),e.status===`error`&&o(e.error)}});async function c(){i?.abort();let{delivery:e}=r.getState(),t=e.settlement?.ref;if(r.set({warehouses:[],warehousesStatus:`idle`}),!t||e.manual||e.method===`np_courier`)return;let a=i=new AbortController;r.set({warehousesStatus:`loading`});try{let i=await n.warehouses(t,e.method===`np_locker`?`locker`:`branch`,a.signal);a.signal.aborted||r.set({warehouses:i,warehousesStatus:`ready`})}catch(e){if(a.signal.aborted)return;r.set({warehousesStatus:`idle`}),o(e)}}return{getState:r.getState,subscribe:r.subscribe,setMethod(e){let t=r.getState().delivery,n=Eh(t,e);n!==t&&(r.set({delivery:n,warehouseText:``,...!n.settlement&&{settlementText:``}}),c())},inputSettlement(e){let{delivery:t}=r.getState();r.set({settlementText:e,waitSeconds:0}),t.settlement&&e!==t.settlement.name&&(a({settlement:void 0,warehouse:void 0}),c()),s.input(e)},pickSettlement(e){let t=r.getState().settlements.items.find(t=>t.ref===e);t&&(r.set({settlementText:t.name,warehouseText:``}),a({settlement:{ref:t.ref,name:t.name.slice(0,100)},warehouse:void 0}),c())},inputWarehouse(e){let{delivery:t}=r.getState();r.set({warehouseText:e}),t.warehouse&&e!==t.warehouse.name&&a({warehouse:void 0})},pickWarehouse(e){let t=r.getState().warehouses.find(t=>t.ref===e);t&&(r.set({warehouseText:t.name}),a({warehouse:{ref:t.ref,name:t.name.slice(0,100)}}))},setField(e){let t=e.manual!==void 0&&e.manual!==r.getState().delivery.manual;a(e),t&&c()},fields:()=>kh(r.getState().delivery),dispose(){s.dispose(),i?.abort()}}}function Ph(e,t={}){let n=Nh(e,t),r=co(n);return je(n.dispose),{controller:n,delivery:R(()=>r.value.delivery),method:R(()=>r.value.delivery.method),settlementText:R(()=>r.value.settlementText),settlements:R(()=>r.value.settlements),warehouseText:R(()=>r.value.warehouseText),warehouses:R(()=>r.value.warehouses),warehousesStatus:R(()=>r.value.warehousesStatus),waitSeconds:R(()=>r.value.waitSeconds),setMethod:n.setMethod,inputSettlement:n.inputSettlement,pickSettlement:n.pickSettlement,inputWarehouse:n.inputWarehouse,pickWarehouse:n.pickWarehouse,setField:n.setField,fields:n.fields}}var Fh=N({name:`HvBuyerSection`,props:{...go,checkout:{type:Object,required:!0}},setup(e,{slots:t}){let n=H(e);return()=>{let{form:r,errors:i,setField:a,formatPhone:o}=e.checkout,s=i.value;return To(n.value.buyerTitle,`hv-buyer`,[vo(t,`buyer-note`),wo({id:`hv-buyer-name`,label:n.value.name,value:r.value.name,error:s.name,attrs:{name:`name`,autocomplete:`name`},onInput:e=>a(`name`,e)}),wo({id:`hv-buyer-phone`,label:n.value.phone,value:r.value.phone,hint:n.value.phoneHint,error:s.phone,attrs:{name:`phone`,type:`tel`,inputmode:`tel`,autocomplete:`tel`},onInput:e=>a(`phone`,e),onBlur:o}),wo({id:`hv-buyer-email`,label:n.value.email,value:r.value.email,hint:n.value.emailHint,error:s.email,attrs:{name:`email`,type:`email`,autocomplete:`email`},onInput:e=>a(`email`,e)}),Co({id:`hv-buyer-comment`,label:n.value.comment,error:s.comment,control:e=>z(`textarea`,{class:`hv-textarea`,name:`comment`,maxlength:500,value:r.value.comment,...e,onInput:e=>a(`comment`,e.target.value)})}),z(`div`,{class:`hv-hp`,"aria-hidden":`true`},[z(`label`,[`Website `,z(`input`,{name:`website`,tabindex:-1,autocomplete:`off`,value:r.value.website,onInput:e=>a(`website`,e.target.value)})])])])}}}),Ih=N({name:`HvConsentField`,props:{...go,checkout:{type:Object,required:!0},policyLinks:{type:Object,required:!0}},setup(e,{slots:t}){let n=H(e);return()=>{let r=e.checkout.errors.value.consent,i=(e,t)=>z(`a`,{href:e,target:`_blank`,rel:`noopener`},[t,z(`span`,{class:`hv-sr-only`},` ${n.value.newTab}`)]);return z(`div`,{class:`hv-field`},[z(`label`,{class:`hv-consent`},[z(`input`,{id:`hv-consent`,type:`checkbox`,name:`consent`,checked:e.checkout.form.value.consent,"aria-invalid":r?`true`:void 0,"aria-describedby":r?`hv-consent-error`:void 0,onChange:t=>e.checkout.setField(`consent`,t.target.checked)}),z(`span`,[`${n.value.consentPrefix} `,i(e.policyLinks.privacy,n.value.consentPrivacy),`, `,i(e.policyLinks.offer,n.value.consentOffer)])]),vo(t,`consent-extra`),r?z(`p`,{id:`hv-consent-error`,class:`hv-error`},r):null])}}}),Lh=N({name:`HvCombobox`,props:{...go,id:{type:String,required:!0},label:{type:String,required:!0},modelValue:{type:String,required:!0},items:{type:Array,required:!0},status:{type:String,required:!0},hint:String,error:String,required:Boolean},emits:{"update:modelValue":e=>!0,select:e=>!0},setup(e,{emit:t}){let n=H(e),{announce:r,region:i}=So(),a=j(!1),o=j(!1),s=j(-1),c=R(()=>a.value&&!o.value&&e.items.length>0),l=t=>`${e.id}-opt-${t}`;Kn(R(()=>e.status===`loading`?n.value.searching:e.status===`ready`?e.items.length?V(n.value.resultsCount,{n:e.items.length}):n.value.noResults:``),e=>e&&r(e)),Kn(()=>e.items,()=>s.value=-1);function u(t){let n=e.items.length;n&&(o.value=!1,s.value=(t+n)%n)}function d(n){let r=e.items[n];r&&(o.value=!0,s.value=-1,t(`select`,r.key))}function f(t){let n=e=>{t.preventDefault(),e()};switch(t.key){case`ArrowDown`:return n(()=>u(s.value+1));case`ArrowUp`:return n(()=>u(s.value<0?-1:s.value-1));case`Home`:c.value&&n(()=>u(0));return;case`End`:c.value&&n(()=>u(e.items.length-1));return;case`Enter`:c.value&&s.value>=0&&n(()=>d(s.value));return;case`Escape`:c.value&&n(()=>o.value=!0)}}return()=>{let n=e.hint?`${e.id}-hint`:``,r=e.error?`${e.id}-error`:``;return z(`div`,{class:`hv-combobox hv-field`},[z(`label`,{class:`hv-label`,for:`${e.id}-input`},e.label),z(`input`,{id:`${e.id}-input`,class:`hv-input`,type:`text`,role:`combobox`,autocomplete:`off`,"aria-autocomplete":`list`,"aria-expanded":c.value?`true`:`false`,"aria-controls":`${e.id}-list`,"aria-activedescendant":c.value&&s.value>=0?l(s.value):void 0,"aria-invalid":e.error?`true`:void 0,"aria-required":e.required?`true`:void 0,"aria-describedby":[n,r].filter(Boolean).join(` `)||void 0,value:e.modelValue,onInput:e=>{o.value=!1,t(`update:modelValue`,e.target.value)},onKeydown:f,onFocus:()=>a.value=!0,onBlur:()=>a.value=!1}),e.hint?z(`p`,{id:n,class:`hv-hint`},e.hint):null,z(`ul`,{id:`${e.id}-list`,class:`hv-combobox-list`,role:`listbox`,"aria-label":e.label,hidden:!c.value},e.items.map((e,t)=>z(`li`,{id:l(t),key:e.key,class:`hv-combobox-option`,role:`option`,"aria-selected":t===s.value?`true`:`false`,"data-active":t===s.value?`true`:void 0,onMousedown:e=>{e.preventDefault(),d(t)}},[e.label,e.detail?z(`small`,e.detail):null]))),e.error?z(`p`,{id:r,class:`hv-error`},e.error):null,i()])}}}),Rh=50,zh=N({name:`HvDeliverySection`,props:{...go,delivery:{type:Object,required:!0},methods:{type:Array,required:!0},errors:{type:Object,default:()=>({})}},setup(e,{slots:t}){let n=H(e);return Kn(()=>e.delivery.delivery.value.manual,t=>{let{delivery:n,settlementText:r}=e.delivery;t&&!n.value.manualCity&&r.value&&e.delivery.setField({manualCity:r.value})}),()=>{let r=e.delivery,i=r.delivery.value,a=e.errors,o=i.method!==`ukrposhta`,s=i.method===`np_branch`||i.method===`np_locker`,c=e=>()=>r.setField(e),l=(e,t,n,i,a,o={})=>wo({id:e,label:t,value:n,error:i,attrs:o,onInput:e=>r.setField({[a]:e})}),u=r.settlements.value,d=u.items.map(e=>({key:e.ref,label:e.name,detail:[e.area,e.region].filter(Boolean).join(`, `)||void 0})),f=r.warehouseText.value.trim().toLowerCase(),p=i.warehouse,m=(f&&!(p&&f===p.name.toLowerCase())?r.warehouses.value.filter(e=>`${e.number} ${e.name} ${e.address??``}`.toLowerCase().includes(f)):r.warehouses.value).slice(0,Rh).map(e=>({key:e.ref,label:e.name,detail:[e.address,e.max_weight_kg?V(n.value.maxWeight,{kg:e.max_weight_kg}):``].filter(Boolean).join(` · `)||void 0})),h=z(`button`,{type:`button`,class:`hv-button hv-button-secondary`,onClick:c({manual:!0})},n.value.typeManually),g=e.methods.length>1?z(`div`,{class:`hv-choices`,role:`radiogroup`,"aria-label":n.value.deliveryTitle},e.methods.map(e=>z(`label`,{key:e,class:`hv-choice`},[z(`input`,{type:`radio`,name:`hv-delivery`,value:e,checked:i.method===e,onChange:()=>r.setMethod(e)}),z(`span`,{class:`hv-choice-title`},n.value.delivery[e]),z(`span`,{class:`hv-choice-help`},n.value.deliveryHelp[e])]))):z(`p`,{class:`hv-choice-title`},n.value.delivery[i.method]),_=[i.manual?z(`div`,{class:`hv-notice`,role:`status`,"data-kind":`info`},[z(`p`,n.value.directoryDown),z(`button`,{type:`button`,class:`hv-button hv-button-secondary`,onClick:c({manual:!1})},n.value.retryDirectory)]):r.waitSeconds.value?z(`div`,{class:`hv-notice`,role:`status`},[z(`p`,V(n.value.directoryWait,{s:r.waitSeconds.value})),h]):null,...i.manual?[l(`hv-manual-city`,n.value.manualCity,i.manualCity,a.settlement,`manualCity`,{autocomplete:`address-level2`}),s?l(`hv-manual-warehouse`,n.value.manualWarehouse,i.manualWarehouse,a.warehouse,`manualWarehouse`):null]:[z(Lh,{id:`hv-settlement`,lang:e.lang,messages:e.messages,label:n.value.settlement,hint:n.value.settlementHint,modelValue:r.settlementText.value,items:d,status:u.status===`error`?`idle`:u.status,error:a.settlement,required:!0,"onUpdate:modelValue":r.inputSettlement,onSelect:r.pickSettlement}),u.status===`ready`&&!d.length&&r.settlementText.value.trim().length>=2?z(`div`,{class:`hv-field`},[z(`p`,{class:`hv-hint`},n.value.noResults),h]):null,s&&i.settlement?z(Lh,{id:`hv-warehouse`,lang:e.lang,messages:e.messages,label:i.method===`np_locker`?n.value.warehouseLocker:n.value.warehouseBranch,hint:n.value.warehouseFilter,modelValue:r.warehouseText.value,items:m,status:r.warehousesStatus.value===`loading`?`loading`:`ready`,error:a.warehouse,required:!0,"onUpdate:modelValue":r.inputWarehouse,onSelect:r.pickWarehouse}):s?z(`p`,{class:`hv-hint`},n.value.warehouseNeedSettlement):null,r.warehousesStatus.value===`loading`?z(`p`,{class:`hv-hint`},n.value.warehouseLoading):s&&i.settlement&&r.warehousesStatus.value===`ready`&&!r.warehouses.value.length?z(`p`,{class:`hv-hint`},n.value.warehouseNone):null],i.method===`np_courier`?l(`hv-address`,n.value.street,i.street,a.address,`street`,{autocomplete:`street-address`}):null],v=[l(`hv-postcode`,n.value.postcode,i.postcode,a.postcode,`postcode`,{inputmode:`numeric`,maxlength:5,autocomplete:`postal-code`}),l(`hv-region`,n.value.region,i.region,a.region,`region`,{autocomplete:`address-level1`}),l(`hv-city`,n.value.upCity,i.city,a.city,`city`,{autocomplete:`address-level2`}),l(`hv-address`,n.value.upAddress,i.address,a.address,`address`,{autocomplete:`street-address`})];return To(n.value.deliveryTitle,`hv-delivery`,[vo(t,`delivery-note`),g,...o?_:v,a.delivery?z(`p`,{id:`hv-delivery-error`,class:`hv-error`},a.delivery):null])}}}),Bh={lines:[`hv-lines-error`,`hv-line-qty-0`],name:[`hv-buyer-name`],phone:[`hv-buyer-phone`],email:[`hv-buyer-email`],comment:[`hv-buyer-comment`],settlement:[`hv-settlement-input`,`hv-manual-city`],warehouse:[`hv-warehouse-input`,`hv-manual-warehouse`],address:[`hv-address`],postcode:[`hv-postcode`],region:[`hv-region`],city:[`hv-city`],consent:[`hv-consent`],payment:[`hv-payment-group`],delivery:[`hv-delivery-error`]};function Vh(e){for(let t of Bh[e]??[]){let e=document.getElementById(t);if(e)return e.focus(),!0}return!1}var Hh=N({name:`HvErrorSummary`,props:{...go,errors:{type:Object,default:()=>({})},formError:{type:String,default:``}},setup(e){let t=H(e),n=j(null);return Kn(()=>e.errors,async e=>{Object.keys(e).length&&(await En(),n.value?.focus())}),()=>{let r=Object.entries(e.errors);return!r.length&&!e.formError?null:z(`div`,{ref:n,class:`hv-error-summary`,role:`alert`,tabindex:-1},[z(`p`,{class:`hv-error-summary-title`},t.value.errorSummary),e.formError?z(`p`,e.formError):null,r.length?z(`ul`,r.map(([e,t])=>z(`li`,{key:e},[z(`a`,{class:`hv-error-summary-link`,href:`#${Bh[e]?.[0]??e}`,onClick:t=>{Vh(e)&&t.preventDefault()}},t)]))):null])}}});function Uh(e,t){let n=Math.max(1,t?.min??1),r=Math.max(1,t?.step??1),i=n+Math.ceil((Math.min(99,Math.max(n,Math.trunc(e)))-n)/r)*r;return i<=99?i:n+Math.floor((99-n)/r)*r}var Wh=N({name:`HvLinesSection`,props:{...go,cart:{type:Object,required:!0},catalog:{type:Object,required:!0},error:String,quantityRule:Function},setup(e,{slots:t}){let n=H(e),{announce:r,region:i}=So(),a=j(),o=j({}),s=t=>e.quantityRule?.(t),c=t=>e.cart.options.value.find(e=>e.id===t)?.label??``,l=t=>Za(t,e.catalog.landing.currency,e.lang);function u(t,i){let a=Uh(i,s(t));e.cart.setQuantity(t,a),r(V(n.value.qtyNow,{n:a}))}function d(e,t,i){delete o.value[e];let a=t.trim();if(!/^\d+$/.test(a))return r(V(n.value.qtyNow,{n:i}));u(e,Number(a))}function f(){En(()=>{(a.value?.querySelector(`.hv-add`)??a.value?.querySelector(`.hv-stepper-input`))?.focus()})}return()=>{let{lines:p,options:m,unavailableIds:h}=e.cart,g=m.value;if(g.length&&g.every(e=>e.disabled))return To(n.value.linesTitle,`hv-lines`,[z(`div`,{class:`hv-notice`,role:`alert`},[z(`p`,n.value.allSoldOut),vo(t,`sold-out`)])]);let _=p.value.length>=20;return To(n.value.linesTitle,`hv-lines`,[vo(t,`before-lines`),...p.value.map((t,i)=>{let a=t.variantId,m=h.value.includes(a),_=s(a),v=_?.step??1,y=_?.min??1,b=t.quantity-v<y,x=t.quantity+v>99,ee=g.find(e=>e.id===a)?.unitPriceMinor??0,S=c(a),C=`hv-line-gone-${i}`,te=`hv-line-qty-${i}`,ne=[m?C:``,_?`hv-line-rule-${i}`:``].filter(Boolean).join(` `)||void 0;return z(`div`,{key:a,class:`hv-line`,"data-gone":m?`true`:void 0},[g.length>1?z(`div`,{class:`hv-field`},[z(`label`,{class:`hv-label`,for:`hv-line-variant-${i}`},n.value.variant),z(`select`,{id:`hv-line-variant-${i}`,class:`hv-select`,value:a,"aria-describedby":m?C:void 0,onChange:t=>e.cart.replaceVariant(a,Number(t.target.value))},g.map(e=>z(`option`,{key:e.id,value:e.id,disabled:e.disabled,selected:e.id===a},e.disabled?`${e.label} (${n.value.soldOutOption})`:e.label)))]):z(`span`,{class:`hv-line-name`},S),z(`span`,{class:`hv-line-price`},l(ee)),z(`div`,{class:`hv-line-actions`},[z(`div`,{class:`hv-stepper`,role:`group`,"aria-label":V(n.value.qtyLabel,{name:S})},[z(`button`,{type:`button`,class:`hv-stepper-button`,"aria-label":V(n.value.qtyDec,{name:S}),"aria-disabled":b||m?`true`:void 0,onClick:()=>{!b&&!m&&u(a,t.quantity-v)}},`−`),z(`input`,{id:te,class:`hv-stepper-input`,type:`text`,inputmode:`numeric`,pattern:`[0-9]*`,autocomplete:`off`,"aria-label":V(n.value.qtyLabel,{name:S}),"aria-describedby":ne,readonly:m||void 0,value:o.value[a]??String(t.quantity),onInput:e=>{o.value[a]=e.target.value},onBlur:e=>d(a,e.target.value,t.quantity),onKeydown:e=>{e.key===`Enter`&&(e.preventDefault(),d(a,e.target.value,t.quantity))}}),z(`button`,{type:`button`,class:`hv-stepper-button`,"aria-label":V(n.value.qtyInc,{name:S}),"aria-disabled":x||m?`true`:void 0,onClick:()=>{!x&&!m&&u(a,t.quantity+v)}},`+`)]),m?null:z(`span`,{class:`hv-line-price`},l(ee*t.quantity)),z(`button`,{type:`button`,class:`hv-button hv-button-secondary hv-line-remove`,"aria-disabled":p.value.length<2?`true`:void 0,onClick:()=>{p.value.length<2||(e.cart.remove(a),r(V(n.value.lineRemoved,{name:S})),f())}},V(n.value.removeLine,{name:S}))]),x&&!m?z(`p`,{class:`hv-hint`},V(n.value.qtyMax,{max:99})):null,_?z(`p`,{id:`hv-line-rule-${i}`,class:`hv-hint`},V(n.value.qtyRule,{min:_.min,step:_.step})):null,m?z(`p`,{id:C,class:`hv-error`},n.value.lineGone):null])}),z(`button`,{type:`button`,class:`hv-button hv-button-secondary hv-add`,"aria-disabled":_?`true`:void 0,onClick:()=>{_||e.cart.add()}},n.value.addLine),_?z(`p`,{class:`hv-hint`},V(n.value.maxLines,{n:20})):null,e.error?z(`p`,{id:`hv-lines-error`,class:`hv-error`},e.error):null,i()],{ref:a})}}}),Gh=N({name:`HvPaymentSection`,props:{...go,checkout:{type:Object,required:!0},unavailable:{type:Array,default:()=>[]}},setup(e,{slots:t}){let n=H(e);return()=>{let{payment:r,paymentMethods:i,errors:a,setPayment:o}=e.checkout,s=[...i.value].sort((e,t)=>Um.indexOf(e)-Um.indexOf(t)),c=a.value.payment,l=s.length===1?s[0]:void 0;return To(n.value.paymentTitle,`hv-payment`,[l?z(`div`,{class:`hv-choice hv-choice-single`},[z(`span`,{class:`hv-choice-title`},n.value.pay[l]),z(`span`,{class:`hv-choice-help`},n.value.payHelp[l])]):z(`div`,{id:`hv-payment-group`,class:`hv-choices`,role:`radiogroup`,"aria-label":n.value.paymentTitle,"aria-describedby":c?`hv-payment-error`:void 0,"aria-invalid":c?`true`:void 0},s.map(t=>{let i=e.unavailable.includes(t);return z(`label`,{key:t,class:`hv-choice`,"aria-disabled":i?`true`:void 0},[z(`input`,{type:`radio`,name:`hv-payment`,value:t,checked:r.value===t,"aria-disabled":i?`true`:void 0,onChange:()=>{i||o(t)},onClick:e=>i&&e.preventDefault()}),z(`span`,{class:`hv-choice-title`},n.value.pay[t]),i?z(`span`,{class:`hv-choice-flag`},n.value.payUnavailable):null,z(`span`,{class:`hv-choice-help`},n.value.payHelp[t])])})),vo(t,`payment-note`),c?z(`p`,{id:`hv-payment-error`,class:`hv-error`},c):null])}}}),Kh=4e3,qh=5e3,Jh=N({name:`HvSubmitSection`,props:{...go,checkout:{type:Object,required:!0},blockedByStock:{type:Boolean,default:!1},priceChange:{type:Object},canGoToPayment:{type:Boolean,default:!1},slowAfterMs:{type:Number,default:Kh},redirectButtonMs:{type:Number,default:qh}},emits:[`confirm-price`,`go-to-payment`],setup(e,{slots:t,emit:n}){let r=H(e),{announce:i,region:a}=So(),o=j(!1),s;Kn(()=>e.checkout.sending.value,t=>{clearTimeout(s),o.value=!1,t&&(s=setTimeout(()=>{o.value=!0,i(r.value.slowSubmit)},e.slowAfterMs))},{immediate:!0});let c=j(!1),l;return Kn(()=>e.checkout.redirecting.value,t=>{clearTimeout(l),c.value=!1,t&&(l=setTimeout(()=>c.value=!0,e.redirectButtonMs))},{immediate:!0}),je(()=>{clearTimeout(s),clearTimeout(l)}),()=>{let i=e.checkout,s=e.lang,l=i.sending.value||i.redirecting.value,u=i.cooldown.value>0,d=l||u||e.blockedByStock||!!i.created.value,f=i.sending.value?r.value.sending:i.redirecting.value?r.value.redirecting:u?V(r.value.cooldownBtn,{s:i.cooldown.value}):r.value.submit,p=[];return e.blockedByStock&&p.push(z(`p`,{class:`hv-notice`,role:`alert`,"data-kind":`error`},r.value.submitBlockedStock)),o.value&&i.sending.value&&p.push(z(`p`,{class:`hv-notice`,role:`status`},r.value.slowSubmit)),(i.cardState.value===`in_progress`||i.cardState.value===`unavailable`||i.cardState.value===`network`)&&p.push(z(`div`,{class:`hv-notice`,role:`alert`,"data-kind":`error`},[z(`p`,i.cardState.value===`unavailable`?r.value.cardUnavailable:i.cardState.value===`network`?r.value.errors.network:r.value.cardPreparing),i.cardState.value===`unavailable`?null:z(`button`,{type:`button`,class:`hv-button hv-button-secondary`,onClick:()=>void i.retryCard()},r.value.cardRetry),vo(t,`fail-extra`)])),i.redirecting.value&&c.value&&e.canGoToPayment&&p.push(z(`p`,{class:`hv-notice`,role:`status`},[`${r.value.cardGo} `,z(`button`,{type:`button`,class:`hv-button hv-button-secondary`,onClick:()=>n(`go-to-payment`)},r.value.cardGoBtn)])),e.priceChange&&p.push(z(`div`,{class:`hv-notice`,role:`alert`,"data-kind":`warn`},[z(`p`,V(r.value.priceChanged,{old:Za(e.priceChange.oldMinor,e.priceChange.currency,s),new:Za(e.priceChange.newMinor,e.priceChange.currency,s)})),z(`button`,{type:`button`,class:`hv-button hv-button-primary`,onClick:()=>n(`confirm-price`)},r.value.priceConfirm)])),z(`div`,{class:`hv-submit`},[vo(t,`submit-note`),z(`button`,{type:`submit`,class:`hv-button hv-button-primary hv-submit-button`,"aria-disabled":d?`true`:void 0,"aria-busy":i.sending.value?`true`:void 0,onClick:e=>{d&&e.preventDefault()}},f),...p,a()])}}}),Yh=N({name:`HvTotalsSection`,props:{...go,cart:{type:Object,required:!0},catalog:{type:Object,required:!0}},setup(e,{slots:t}){let n=H(e);return()=>{let{lines:r,options:i,unavailableIds:a}=e.cart,o=t=>Za(t,e.catalog.landing.currency,e.lang),s=r.value.filter(e=>!a.value.includes(e.variantId)),c=s.reduce((e,t)=>e+(i.value.find(e=>e.id===t.variantId)?.unitPriceMinor??0)*t.quantity,0),l=s.reduce((e,t)=>e+t.quantity,0),u=(e,t,n=!1)=>z(`div`,{class:n?`hv-totals-row hv-totals-note`:`hv-totals-row`},[z(`dt`,e),z(`dd`,t)]),d=vo(t,`totals-discount`),f=vo(t,`totals-delivery`);return z(`section`,{class:`hv-totals`,"aria-label":n.value.total},[z(`dl`,[u(V(n.value.subtotal,{n:l}),o(c)),d?u(n.value.discount,d,!0):null,f?u(n.value.deliveryFee,f,!0):null,z(`div`,{class:`hv-totals-row hv-totals-total`},[z(`dt`,n.value.total),z(`dd`,{"aria-live":`polite`},o(c))])])])}}}),Xh=N({name:`HvOrderForm`,props:{...go,api:{type:Object,required:!0},policyLinks:{type:Object,required:!0},theme:{type:String,default:`light`},navigate:Function,quantityRule:Function,priceChange:Object},emits:[`refresh-catalog`,`confirm-price`],setup(e,{slots:t,emit:n}){let r=H(e),i=xo(),a=hh(e.api),o=ph(a.catalog),s=Ph(e.api),c=j(),l=Ch({api:e.api,cart:o,delivery:s,lang:e.lang,catalog:a.catalog,navigate:t=>{c.value=t,(e.navigate??$m)(t)},onRefreshCatalog:()=>{n(`refresh-catalog`),a.reload()}});Kn(a.catalog,e=>{e&&!o.lines.value.length&&!o.unavailableIds.value.length&&o.add()},{immediate:!0});let u=R(()=>{let e=a.catalog.value?.delivery_methods,t=Wm.filter(t=>!e||e.includes(t));return t.length?t:[...Wm]});return Kn(l.errors,e=>{e.lines&&o.unavailableIds.value.length&&Vh(`lines`)}),()=>{let d=a.catalog.value,f=a.status.value,p={lang:e.lang,messages:e.messages},m={class:`hv-root`,"data-hv-theme":e.theme};if(!d)return z(`div`,m,[f===`error`?z(`div`,{class:`hv-notice`,role:`alert`,"data-kind":`error`},[z(`p`,r.value.catalogError),z(`button`,{type:`button`,class:`hv-button hv-button-secondary`,onClick:()=>void a.reload()},r.value.retry)]):z(`p`,{class:`hv-skeleton`,role:`status`,"aria-busy":`true`},r.value.loading)]);let h=l.errors.value;return z(`div`,m,[z(`form`,{class:`hv-main`,novalidate:!0,"aria-label":r.value.submit,onSubmit:e=>{e.preventDefault(),l.submit()}},[z(Hh,{...p,errors:h,formError:l.formError.value}),z(Wh,{...p,cart:o,catalog:d,error:h.lines,quantityRule:e.quantityRule},yo(t,[`before-lines`,`sold-out`])),z(Fh,{...p,checkout:l},yo(t,[`buyer-note`])),z(zh,{...p,delivery:s,methods:u.value,errors:h},yo(t,[`delivery-note`])),z(Gh,{...p,checkout:l},yo(t,[`payment-note`])),z(Ih,{...p,checkout:l,policyLinks:e.policyLinks},yo(t,[`consent-extra`])),z(Yh,{...p,cart:o,catalog:d},yo(t,[`totals-discount`,`totals-delivery`])),z(Jh,{...p,checkout:l,blockedByStock:o.unavailableIds.value.length>0,priceChange:e.priceChange,canGoToPayment:!!c.value,onConfirmPrice:()=>n(`confirm-price`),onGoToPayment:()=>c.value&&(e.navigate??$m)(c.value)},yo(t,[`submit-note`,`fail-extra`]))]),z(`p`,{class:`hv-sr-only`,role:`status`},i.text.value)])}}}),Zh=e=>`hoverla:${e}:order`;function Qh(){try{return globalThis.sessionStorage}catch{return}}var $h=e=>typeof e==`string`&&e!==``;function eg(e){let{recipient:t,iban:n,edrpou:r,purpose:i}=e.iban;return{number:e.number,totalMinor:e.totalMinor,currency:e.currency,paymentMethod:e.paymentMethod,iban:{recipient:t,iban:n,...r?{edrpou:r}:{},purpose:i}}}function tg(e,t,n,r=Date.now()){try{let i={...eg(n),savedAt:r};e?.setItem(Zh(t),JSON.stringify(i))}catch{}}function ng(e,t){try{e?.removeItem(Zh(t))}catch{}}function rg(e,t,n=Date.now()){try{let r=e?.getItem(Zh(t));if(!r)return;let i=JSON.parse(r);if(!i||typeof i.savedAt!=`number`||n-i.savedAt>864e5||n<i.savedAt-6e4||!$h(i.number)||typeof i.totalMinor!=`number`||!$h(i.currency)||!$h(i.paymentMethod)||!i.iban||!$h(i.iban.recipient)||!$h(i.iban.iban)||!$h(i.iban.purpose)){ng(e,t);return}return eg(i)}catch{return}}var ig={},ag=()=>ig;function og(e){ig={...ig,...e}}var sg=`https://api-hoverla.dfgk.com.ua`,cg=[`before-lines`,`sold-out`,`buyer-note`,`delivery-note`,`payment-note`,`consent-extra`,`totals-discount`,`totals-delivery`,`submit-note`,`success-extra`,`fail-extra`];function lg(e){return(e?.closest(`[lang]`)?.getAttribute(`lang`)??``).toLowerCase().startsWith(`en`)?`en`:`uk`}var ug=N({name:`HoverlaCheckoutApp`,props:{landing:{type:String,default:``},api:{type:String,default:sg},theme:{type:String,default:`light`},offerHref:{type:String,default:`/offer`},privacyHref:{type:String,default:`/privacy`},homeHref:{type:String,default:`/`}},setup(e){let t=Pi()?.ce,n=()=>lg(t),r=H({get lang(){return n()},get messages(){return ag().messages}}),i=(e,n)=>t?.dispatchEvent(new CustomEvent(`hoverla-${e}`,{detail:n,bubbles:!0,composed:!0})),a=(e,t)=>i(`error`,{where:e,kind:t instanceof B?t.kind:`unexpected`,status:t instanceof B?t.status:0});e.landing||ur(()=>a(`config`,void 0));let o=Qh(),s=j({kind:`form`}),c=R(()=>{let t=Ya({apiBase:e.api.replace(/\/+$/,``),landingSlug:e.landing}),n=Object.fromEntries(Object.entries(t).map(([e,t])=>[e,async(...n)=>{try{return await t(...n)}catch(t){throw t.name!==`AbortError`&&a(e,t),t}}]));return{...n,async createOrder(...e){let t=await n.createOrder(...e);return i(`order-created`,{amount:t.total_minor,currency:t.currency,paymentMethod:t.payment_method}),t},async getStatus(...t){let r=await n.getStatus(...t);return r.iban&&to(r)===`iban_unpaid`&&tg(o,e.landing,{number:r.number,totalMinor:r.total_minor,currency:r.currency,paymentMethod:r.payment_method,iban:r.iban}),r}}}),l=j([]),u=()=>{l.value=Array.from(t?.children??[]).map(e=>e.getAttribute(`slot`)??``).filter(e=>cg.includes(e))},d;ur(()=>{u(),t&&(d=new MutationObserver(u),d.observe(t,{childList:!0,attributes:!0,attributeFilter:[`slot`],subtree:!0}));let n=Qa(window.location.search);if(n){$a(window),s.value={kind:`result`,params:n};return}let r=rg(o,e.landing);r&&(s.value={kind:`stored`,order:r})}),dr(()=>d?.disconnect());let f=e=>Object.fromEntries(e.filter(e=>l.value.includes(e)).map(e=>[e,()=>z(`slot`,{name:e})])),p=()=>{!t||t.getBoundingClientRect().top>=0||t.scrollIntoView({block:`start`,behavior:matchMedia(`(prefers-reduced-motion: reduce)`).matches?`auto`:`smooth`})},m=e=>{if(`success`in e){let t=Qa(new URL(e.success,window.location.href).search);if(t){s.value={kind:`result`,params:t},p();return}}$m(e)},h=j(!1),g=()=>{h.value=!1,ng(o,e.landing),s.value={kind:`form`},p()};return()=>{let t=r.value,i={lang:n(),messages:ag().messages};if(!e.landing)return z(`div`,{class:`hv-root`},[z(`div`,{class:`hv-notice`,role:`alert`,"data-kind":`error`},t.embedNoLanding)]);let a=z(`a`,{class:`hv-button hv-button-secondary`,href:e.homeHref},t.home),o=(e,t)=>z(`button`,{type:`button`,class:`hv-button hv-button-secondary`,onClick:t},e),l=h.value?z(`div`,{class:`hv-notice`,role:`group`},[z(`p`,t.newOrderConfirm),o(t.newOrderYes,g),o(t.newOrderNo,()=>h.value=!1)]):o(t.newOrder,()=>h.value=!0),u=s.value;if(u.kind===`stored`){let n=u.order;return z(`div`,{class:`hv-root hv-result`,"data-hv-theme":e.theme},[z(`h1`,{class:`hv-result-title`,tabindex:-1},t.successTitle),z(`p`,{class:`hv-result-hint`},t.lastOrder),z(`p`,{class:`hv-result-number`},`${t.orderNumber}: ${n.number}`),z(Oo,{...i,iban:n.iban,totalMinor:n.totalMinor,currency:n.currency}),l,a])}return u.kind===`result`?z(`div`,{"data-hv-wrap":``},[z(ko,{...i,api:c.value,params:u.params,theme:e.theme,homeUrl:e.homeHref},f([`success-extra`,`fail-extra`])),z(`div`,{class:`hv-root`},[l])]):z(Xh,{...i,api:c.value,theme:e.theme,navigate:m,policyLinks:{offer:e.offerHref,privacy:e.privacyHref}},f(cg.filter(e=>e!==`success-extra`)))}}}),dg=`1.0.2`,fg=`hoverla-checkout`;function pg(e){return Array.from(e.classList).filter(e=>e.startsWith(`hv-`)&&e!==`hv-sr-only`).map(e=>e.slice(3)).join(` `)}function mg(e){for(let t of e.querySelectorAll(`[class*="hv-"]`)){let e=pg(t);e&&t.getAttribute(`part`)!==e&&t.setAttribute(`part`,e)}}var hg=Ra(ug);function gg(e){let t;try{t=new CSSStyleSheet,t.replaceSync(e)}catch{t=void 0}return class extends hg{constructor(){super();let n=this.shadowRoot;if(n){if(t&&`adoptedStyleSheets`in n)n.adoptedStyleSheets=[t];else{let t=document.createElement(`style`);t.textContent=e,n.prepend(t)}new MutationObserver(()=>mg(n)).observe(n,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`class`]})}}}}function _g(e){typeof customElements<`u`&&(customElements.get(`hoverla-checkout`)||customElements.define(fg,gg(e)))}var vg={configure:og,version:dg};return _g(t),typeof window<`u`&&(window.HoverlaCheckout??=vg),e.HoverlaCheckout=vg,e})({});
|