@liip/liipgpt 1.0.0-rc.9 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -129
- package/button/liipgpt-button.iife.js +231 -0
- package/chat/liipgpt-chat.iife.js +293 -802
- package/config/index.cjs +4307 -0
- package/config/index.d.ts +9437 -949
- package/config/index.js +3457 -2248
- package/configurator/_app/env.js +1 -0
- package/configurator/_app/immutable/chunks/8PzG14q7.js +4 -0
- package/configurator/_app/immutable/chunks/BMvVlUrl.js +15 -0
- package/configurator/_app/immutable/chunks/BcMr1Isb.js +58 -0
- package/configurator/_app/immutable/chunks/BiXZbQqO.js +1 -0
- package/configurator/_app/immutable/chunks/Blpq5ghW.js +3 -0
- package/configurator/_app/immutable/chunks/C6QPkKVb.js +1 -0
- package/configurator/_app/immutable/chunks/Crb1ifvw.js +364 -0
- package/configurator/_app/immutable/chunks/CthtHExI.js +28 -0
- package/configurator/_app/immutable/chunks/D5wkZK_2.js +1 -0
- package/configurator/_app/immutable/chunks/DUt8zN7X.js +1 -0
- package/configurator/_app/immutable/chunks/DpWDGuko.js +1 -0
- package/configurator/_app/immutable/chunks/Dq6jck_i.js +1 -0
- package/configurator/_app/immutable/chunks/HtQdmN-S.js +1 -0
- package/configurator/_app/immutable/chunks/NZTpNUN0.js +1 -0
- package/configurator/_app/immutable/chunks/lxJsdCDD.js +1 -0
- package/configurator/_app/immutable/entry/app.DLjyDu01.js +2 -0
- package/configurator/_app/immutable/entry/start.Dri2trH_.js +1 -0
- package/configurator/_app/immutable/nodes/0.Cu_Gc0Ri.js +58 -0
- package/configurator/_app/immutable/nodes/1.CMbEHgX0.js +1 -0
- package/configurator/_app/immutable/nodes/2.gQZZQ4pa.js +1 -0
- package/configurator/_app/immutable/nodes/3.CnRlwgWw.js +897 -0
- package/configurator/_app/version.json +1 -0
- package/configurator/favicon.png +0 -0
- package/configurator/index.html +38 -0
- package/configurator/sidebar.html +38 -0
- package/index.cjs +10757 -0
- package/index.d.ts +14291 -0
- package/index.js +10736 -0
- package/package.json +20 -13
- package/chat/index.html +0 -242
- package/config/index.umd.cjs +0 -1
- package/lib/config/chat-config.d.ts +0 -957
- package/lib/config/clamp.d.ts +0 -3
- package/lib/config/config-definition.d.ts +0 -1635
- package/lib/config/css-variables.d.ts +0 -9
- package/lib/config/custom-css.d.ts +0 -1
- package/lib/config/demo-chat-history.d.ts +0 -78
- package/lib/config/simple-config.d.ts +0 -458
- package/lib/config/translations-definition.d.ts +0 -221
- package/lib/config/types-index.d.ts +0 -3
- package/lib/config/utils.d.ts +0 -23
- package/lib/lib/agnostic-storage.d.ts +0 -1
- package/lib/lib/chat-message-types.d.ts +0 -53
- package/lib/lib/feedback.d.ts +0 -0
- package/lib/lib/index.d.ts +0 -3
- package/lib/lib/liipgpt-client.d.ts +0 -92
- package/lib/lib/markdown.d.ts +0 -2
- package/lib/lib/message-store.d.ts +0 -15
- package/lib/lib/sse-v2-types.d.ts +0 -57
- package/lib/lib/utils.d.ts +0 -2
- package/lib/liipgpt-client.js +0 -5570
- package/lib/liipgpt-client.umd.cjs +0 -59
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const env={"PUBLIC_API_URL":"https://liipgpt.api.dev.genai.liip.ch/liipgpt","PUBLIC_CI_COMMIT_TAG":"1.0.1"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import"./NZTpNUN0.js";import{I as V,aN as Ze,Y as jt,F as i,L as k,aO as Te,G as B,p as Z,H as j,a as H,b as _,d as J,v,J as oe,f as L,g as C,E as de,r as E,c as $,aP as pe,u as ae,aQ as Yt,o as lt,X as ct,s as A,t as se,e as fe,aD as le,aL as Qt,M as ut,aR as Ue,aE as Xt,K as Gt}from"./DUt8zN7X.js";import{i as z,c as Se,b as Ee}from"./Dq6jck_i.js";import{G as dt,H as _e,J as Zt,K as Jt,L as $t,O as I,Q as ce,T as ye,U as ge,V as q,W as Fe,X as er,Y as Ye,Z as Oe,_ as tr,$ as rr,a0 as nr,a1 as ft,n as F,t as ue,a2 as ht,S as Ke,a3 as Ie,v as or,s as he,a4 as Je,h as Ae,z as sr,a as vt,e as xe,C as pt,b as ke,a5 as ir,M as ar,i as De,E as ze,a6 as lr,a7 as cr,a8 as gt,a9 as mt,aa as bt,ab as ur,P as dr,d as Qe,c as fr,I as Pe,o as yt,ac as hr,p as _t,ad as $e,ae as vr,w as pr,af as gr,N as mr,ag as br,r as yr,u as _r,f as wr}from"./Crb1ifvw.js";import{p,r as we,s as Ce}from"./BiXZbQqO.js";import{O as Sr}from"./DpWDGuko.js";class Er extends Map{#e=new Map;#t=V(0);#r=V(0);#s=Ze||-1;constructor(e){if(super(),e){for(var[t,r]of e)super.set(t,r);this.#r.v=super.size}}#n(e){return Ze===this.#s?V(e):jt(e)}has(e){var t=this.#e,r=t.get(e);if(r===void 0){var o=super.get(e);if(o!==void 0)r=this.#n(0),t.set(e,r);else return i(this.#t),!1}return i(r),!0}forEach(e,t){this.#o(),super.forEach(e,t)}get(e){var t=this.#e,r=t.get(e);if(r===void 0){var o=super.get(e);if(o!==void 0)r=this.#n(0),t.set(e,r);else{i(this.#t);return}}return i(r),super.get(e)}set(e,t){var r=this.#e,o=r.get(e),s=super.get(e),l=super.set(e,t),a=this.#t;if(o===void 0)o=this.#n(0),r.set(e,o),k(this.#r,super.size),Te(a);else if(s!==t){Te(o);var u=a.reactions===null?null:new Set(a.reactions),b=u===null||!o.reactions?.every(h=>u.has(h));b&&Te(a)}return l}delete(e){var t=this.#e,r=t.get(e),o=super.delete(e);return r!==void 0&&(t.delete(e),k(this.#r,super.size),k(r,-1),Te(this.#t)),o}clear(){if(super.size!==0){super.clear();var e=this.#e;k(this.#r,0);for(var t of e.values())k(t,-1);Te(this.#t),e.clear()}}#o(){i(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var t of super.keys())if(!e.has(t)){var r=this.#n(0);e.set(t,r)}}for([,r]of this.#e)i(r)}keys(){return i(this.#t),super.keys()}values(){return this.#o(),super.values()}entries(){return this.#o(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return i(this.#r),super.size}}function Xe(n,e){return setTimeout(e,n)}const wt=typeof document<"u",et=Cr();function Cr(){return wt&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Ve(n){return n instanceof HTMLElement}function Fr(n){return n instanceof Element}function kr(n){return n instanceof HTMLInputElement&&"select"in n}function Nr(n,e){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(e!==void 0&&n===e)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function Tr(n){return{content:`data-${n}-content`,trigger:`data-${n}-trigger`,overlay:`data-${n}-overlay`,title:`data-${n}-title`,description:`data-${n}-description`,close:`data-${n}-close`,cancel:`data-${n}-cancel`,action:`data-${n}-action`}}class Pr{opts;#e=V(null);get triggerNode(){return i(this.#e)}set triggerNode(e){k(this.#e,e,!0)}#t=V(null);get contentNode(){return i(this.#t)}set contentNode(e){k(this.#t,e,!0)}#r=V(null);get descriptionNode(){return i(this.#r)}set descriptionNode(e){k(this.#r,e,!0)}#s=V(void 0);get contentId(){return i(this.#s)}set contentId(e){k(this.#s,e,!0)}#n=V(void 0);get titleId(){return i(this.#n)}set titleId(e){k(this.#n,e,!0)}#o=V(void 0);get triggerId(){return i(this.#o)}set triggerId(e){k(this.#o,e,!0)}#a=V(void 0);get descriptionId(){return i(this.#a)}set descriptionId(e){k(this.#a,e,!0)}#l=V(null);get cancelNode(){return i(this.#l)}set cancelNode(e){k(this.#l,e,!0)}#i=B(()=>Tr(this.opts.variant.current));get attrs(){return i(this.#i)}set attrs(e){k(this.#i,e)}constructor(e){this.opts=e,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this)}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}#c=B(()=>({"data-state":$t(this.opts.open.current)}));get sharedProps(){return i(this.#c)}set sharedProps(e){k(this.#c,e)}}class Or{opts;root;#e=B(()=>this.root.attrs[this.opts.variant.current]);constructor(e,t){this.opts=e,this.root=t,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),_e({...e,deps:()=>this.root.opts.open.current})}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===Zt||e.key===Jt)&&(e.preventDefault(),this.root.handleClose())}#t=B(()=>({id:this.opts.id.current,[i(this.#e)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps}));get props(){return i(this.#t)}set props(e){k(this.#t,e)}}class xr{opts;root;constructor(e,t){this.opts=e,this.root=t,_e({...e,onRefChange:r=>{this.root.titleId=r?.id},deps:()=>this.root.opts.open.current})}#e=B(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.attrs.title]:"",...this.root.sharedProps}));get props(){return i(this.#e)}set props(e){k(this.#e,e)}}class Dr{opts;root;constructor(e,t){this.opts=e,this.root=t,_e({...e,deps:()=>this.root.opts.open.current,onRefChange:r=>{this.root.descriptionNode=r,this.root.descriptionId=r?.id}})}#e=B(()=>({id:this.opts.id.current,[this.root.attrs.description]:"",...this.root.sharedProps}));get props(){return i(this.#e)}set props(e){k(this.#e,e)}}class Ir{opts;root;constructor(e,t){this.opts=e,this.root=t,_e({...e,deps:()=>this.root.opts.open.current,onRefChange:r=>{this.root.contentNode=r,this.root.contentId=r?.id}})}#e=B(()=>({open:this.root.opts.open.current}));get snippetProps(){return i(this.#e)}set snippetProps(e){k(this.#e,e)}#t=B(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.attrs.content]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,...this.root.sharedProps}));get props(){return i(this.#t)}set props(e){k(this.#t,e)}}class Ar{opts;root;constructor(e,t){this.opts=e,this.root=t,_e({...e,deps:()=>this.root.opts.open.current})}#e=B(()=>({open:this.root.opts.open.current}));get snippetProps(){return i(this.#e)}set snippetProps(e){k(this.#e,e)}#t=B(()=>({id:this.opts.id.current,[this.root.attrs.overlay]:"",style:{pointerEvents:"auto"},...this.root.sharedProps}));get props(){return i(this.#t)}set props(e){k(this.#t,e)}}const Ne=new dt("Dialog.Root");function Lr(n){return Ne.set(new Pr(n))}function Mr(n){return new xr(n,Ne.get())}function Br(n){return new Ir(n,Ne.get())}function Rr(n){return new Ar(n,Ne.get())}function Kr(n){return new Dr(n,Ne.get())}function Hr(n){return new Or(n,Ne.get())}var qr=L("<div><!></div>");function St(n,e){Z(e,!0);let t=p(e,"id",23,ce),r=p(e,"ref",15,null),o=p(e,"child",7),s=p(e,"children",7),l=p(e,"level",7,2),a=we(e,["$$slots","$$events","$$legacy","$$host","id","ref","child","children","level"]);const u=Mr({id:I.with(()=>t()),level:I.with(()=>l()),ref:I.with(()=>r(),g=>r(g))}),b=B(()=>ge(a,u.props));var h=j(),w=H(h);{var f=g=>{var S=j(),P=H(S);oe(P,o,()=>({props:i(b)})),_(g,S)},y=g=>{var S=qr();ye(S,()=>({...i(b)}));var P=C(S);oe(P,()=>s()??de),E(S),_(g,S)};z(w,g=>{o()?g(f):g(y,!1)})}return _(n,h),J({get id(){return t()},set id(g=ce()){t(g),v()},get ref(){return r()},set ref(g=null){r(g),v()},get child(){return o()},set child(g){o(g),v()},get children(){return s()},set children(g){s(g),v()},get level(){return l()},set level(g=2){l(g),v()}})}$(St,{id:{},ref:{},child:{},children:{},level:{}},[],[],!0);function Et(n,e,t,r){const o=Array.isArray(e)?e:[e];return o.forEach(s=>n.addEventListener(s,t,r)),()=>{o.forEach(s=>n.removeEventListener(s,t,r))}}class Ct{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){const r=this.createEvent(t);return e.dispatchEvent(r),r}listen(e,t,r){const o=s=>{t(s)};return pe(e,this.eventName,o,r)}}function tt(n,e=500){let t=null;const r=(...o)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...o)},e)};return r.destroy=()=>{t!==null&&(clearTimeout(t),t=null)},r}function Ge(n,e){return n===e||n.contains(e)}function Ft(n){return n?.ownerDocument??document}function Ur(n,e){const{clientX:t,clientY:r}=n,o=e.getBoundingClientRect();return t<o.left||t>o.right||r<o.top||r>o.bottom}globalThis.bitsDismissableLayers??=new Map;class zr{opts;#e;#t;#r={pointerdown:!1};#s=!1;#n=!1;node=I(null);#o=void 0;#a;#l=V(null);get currNode(){return i(this.#l)}set currNode(e){k(this.#l,e,!0)}#i=q;constructor(e){this.opts=e,_e({id:e.id,ref:this.node,deps:()=>e.enabled.current,onRefChange:o=>{this.currNode=o}}),this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#a=e.onFocusOutside,ae(()=>{this.#o=Ft(this.currNode)});let t=q;const r=()=>{this.#d(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),t()};Fe([()=>this.opts.enabled.current,()=>this.currNode],([o,s])=>{if(!(!o||!s))return Xe(1,()=>{this.currNode&&(globalThis.bitsDismissableLayers.set(this,this.#t),t(),t=this.#f())}),r}),er(()=>{this.#d.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),this.#i(),t()})}#c=e=>{e.defaultPrevented||this.currNode&&Ye(()=>{!this.currNode||this.#m(e.target)||e.target&&!this.#n&&this.#a.current?.(e)})};#f(){return Oe(pe(this.#o,"pointerdown",Oe(this.#v,this.#g),{capture:!0}),pe(this.#o,"pointerdown",Oe(this.#p,this.#u)),pe(this.#o,"focusin",this.#c))}#h=e=>{let t=e;t.defaultPrevented&&(t=rt(e)),this.#e.current(e)};#u=tt(e=>{if(!this.currNode){this.#i();return}const t=this.opts.isValidEvent.current(e,this.currNode)||Yr(e,this.currNode);if(!this.#s||this.#b()||!t){this.#i();return}let r=e;if(r.defaultPrevented&&(r=rt(r)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#i();return}e.pointerType==="touch"?(this.#i(),this.#i=Et(this.#o,"click",this.#h,{once:!0})):this.#e.current(r)},10);#v=e=>{this.#r[e.type]=!0};#p=e=>{this.#r[e.type]=!1};#g=()=>{this.node.current&&(this.#s=jr(this.node.current))};#m=e=>this.node.current?Ge(this.node.current,e):!1;#d=tt(()=>{for(const e in this.#r)this.#r[e]=!1;this.#s=!1},20);#b(){return Object.values(this.#r).some(Boolean)}#y=()=>{this.#n=!0};#_=()=>{this.#n=!1};props={onfocuscapture:this.#y,onblurcapture:this.#_}}function Vr(n){return new zr(n)}function Wr(n){return n.findLast(([e,{current:t}])=>t==="close"||t==="ignore")}function jr(n){const e=[...globalThis.bitsDismissableLayers],t=Wr(e);if(t)return t[0].node.current===n;const[r]=e[0];return r.node.current===n}function Yr(n,e){if("button"in n&&n.button>0)return!1;const t=n.target;return Fr(t)?Ft(t).documentElement.contains(t)&&!Ge(e,t)&&Ur(n,e):!1}function rt(n){const e=n.currentTarget,t=n.target;let r;n instanceof PointerEvent?r=new PointerEvent(n.type,n):r=new PointerEvent("pointerdown",n);let o=!1;return new Proxy(r,{get:(l,a)=>a==="currentTarget"?e:a==="target"?t:a==="preventDefault"?()=>{o=!0,typeof l.preventDefault=="function"&&l.preventDefault()}:a==="defaultPrevented"?o:a in l?l[a]:n[a]})}function kt(n,e){Z(e,!0);let t=p(e,"interactOutsideBehavior",7,"close"),r=p(e,"onInteractOutside",7,q),o=p(e,"onFocusOutside",7,q),s=p(e,"id",7),l=p(e,"children",7),a=p(e,"enabled",7),u=p(e,"isValidEvent",7,()=>!1);const b=Vr({id:I.with(()=>s()),interactOutsideBehavior:I.with(()=>t()),onInteractOutside:I.with(()=>r()),enabled:I.with(()=>a()),onFocusOutside:I.with(()=>o()),isValidEvent:I.with(()=>u())});var h=j(),w=H(h);return oe(w,()=>l()??de,()=>({props:b.props})),_(n,h),J({get interactOutsideBehavior(){return t()},set interactOutsideBehavior(f="close"){t(f),v()},get onInteractOutside(){return r()},set onInteractOutside(f=q){r(f),v()},get onFocusOutside(){return o()},set onFocusOutside(f=q){o(f),v()},get id(){return s()},set id(f){s(f),v()},get children(){return l()},set children(f){l(f),v()},get enabled(){return a()},set enabled(f){a(f),v()},get isValidEvent(){return u()},set isValidEvent(f=()=>!1){u(f),v()}})}$(kt,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{}},[],[],!0);globalThis.bitsEscapeLayers??=new Map;class Qr{opts;constructor(e){this.opts=e;let t=q;Fe(()=>e.enabled.current,r=>(r&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>pe(document,"keydown",this.#t,{passive:!1});#t=e=>{if(e.key!==tr||!Gr(this))return;const t=new KeyboardEvent(e.type,e);e.preventDefault();const r=this.opts.escapeKeydownBehavior.current;r!=="close"&&r!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(t)}}function Xr(n){return new Qr(n)}function Gr(n){const e=[...globalThis.bitsEscapeLayers],t=e.findLast(([o,{current:s}])=>s==="close"||s==="ignore");if(t)return t[0]===n;const[r]=e[0];return r===n}function Nt(n,e){Z(e,!0);let t=p(e,"escapeKeydownBehavior",7,"close"),r=p(e,"onEscapeKeydown",7,q),o=p(e,"children",7),s=p(e,"enabled",7);Xr({escapeKeydownBehavior:I.with(()=>t()),onEscapeKeydown:I.with(()=>r()),enabled:I.with(()=>s())});var l=j(),a=H(l);return oe(a,()=>o()??de),_(n,l),J({get escapeKeydownBehavior(){return t()},set escapeKeydownBehavior(u="close"){t(u),v()},get onEscapeKeydown(){return r()},set onEscapeKeydown(u=q){r(u),v()},get children(){return o()},set children(u){o(u),v()},get enabled(){return s()},set enabled(u){s(u),v()}})}$(Nt,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{}},[],[],!0);const me=I([]);function Zr(){return{add(n){const e=me.current[0];e&&n.id!==e.id&&e.pause(),me.current=nt(me.current,n),me.current.unshift(n)},remove(n){me.current=nt(me.current,n),me.current[0]?.resume()},get current(){return me.current}}}function Jr(){let n=V(!1),e=V(!1);return{id:ce(),get paused(){return i(n)},get isHandlingFocus(){return i(e)},set isHandlingFocus(t){k(e,t,!0)},pause(){k(n,!0)},resume(){k(n,!1)}}}function nt(n,e){return[...n].filter(t=>t.id!==e.id)}function $r(n){return n.filter(e=>e.tagName!=="A")}function be(n,{select:e=!1}={}){if(!(n&&n.focus)||document.activeElement===n)return;const t=document.activeElement;n.focus({preventScroll:!0}),n!==t&&kr(n)&&e&&n.select()}function en(n,{select:e=!1}={}){const t=document.activeElement;for(const r of n)if(be(r,{select:e}),document.activeElement!==t)return!0}function ot(n,e){for(const t of n)if(!Nr(t,e))return t}function Tt(n){const e=[],t=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)e.push(t.currentNode);return e}function tn(n){const e=Tt(n),t=ot(e,n),r=ot(e.reverse(),n);return[t,r]}/*!
|
|
2
|
+
* tabbable 6.2.0
|
|
3
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
4
|
+
*/var rn=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],nn=rn.join(","),Pt=typeof Element>"u",Be=Pt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Re=!Pt&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n?.ownerDocument},on=function n(e,t){var r;t===void 0&&(t=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=o===""||o==="true",l=s||t&&e&&n(e.parentNode);return l},sn=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},an=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ln=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||sn(e))&&!an(e)?0:e.tabIndex},Ot=function(e){return e.tagName==="INPUT"},cn=function(e){return Ot(e)&&e.type==="hidden"},un=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},dn=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},fn=function(e){if(!e.name)return!0;var t=e.form||Re(e),r=function(a){return t.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(e.name));else try{o=r(e.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var s=dn(o,e.form);return!s||s===e},hn=function(e){return Ot(e)&&e.type==="radio"},vn=function(e){return hn(e)&&!fn(e)},pn=function(e){var t,r=e&&Re(e),o=(t=r)===null||t===void 0?void 0:t.host,s=!1;if(r&&r!==e){var l,a,u;for(s=!!((l=o)!==null&&l!==void 0&&(a=l.ownerDocument)!==null&&a!==void 0&&a.contains(o)||e!=null&&(u=e.ownerDocument)!==null&&u!==void 0&&u.contains(e));!s&&o;){var b,h,w;r=Re(o),o=(b=r)===null||b===void 0?void 0:b.host,s=!!((h=o)!==null&&h!==void 0&&(w=h.ownerDocument)!==null&&w!==void 0&&w.contains(o))}}return s},st=function(e){var t=e.getBoundingClientRect(),r=t.width,o=t.height;return r===0&&o===0},gn=function(e,t){var r=t.displayCheck,o=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=Be.call(e,"details>summary:first-of-type"),l=s?e.parentElement:e;if(Be.call(l,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=e;e;){var u=e.parentElement,b=Re(e);if(u&&!u.shadowRoot&&o(u)===!0)return st(e);e.assignedSlot?e=e.assignedSlot:!u&&b!==e.ownerDocument?e=b.host:e=u}e=a}if(pn(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return st(e);return!1},mn=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var o=t.children.item(r);if(o.tagName==="LEGEND")return Be.call(t,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}t=t.parentElement}return!1},bn=function(e,t){return!(t.disabled||on(t)||cn(t)||gn(t,e)||un(t)||mn(t))},yn=function(e,t){return!(vn(t)||ln(t)<0||!bn(e,t))},_n=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Be.call(e,nn)===!1?!1:yn(t,e)};const wn=new Ct("focusScope.autoFocusOnMount",{bubbles:!1,cancelable:!0}),Sn=new Ct("focusScope.autoFocusOnDestroy",{bubbles:!1,cancelable:!0}),En=new dt("FocusScope");function Cn({id:n,loop:e,enabled:t,onOpenAutoFocus:r,onCloseAutoFocus:o,forceMount:s}){const l=Zr(),a=Jr(),u=I(null),b=En.getOr({ignoreCloseAutoFocus:!1});let h=null;_e({id:n,ref:u,deps:()=>t.current});function w(d){if(!(a.paused||!u.current||a.isHandlingFocus)){a.isHandlingFocus=!0;try{const c=d.target;if(!Ve(c))return;const m=u.current.contains(c);if(d.type==="focusin")if(m)h=c;else{if(b.ignoreCloseAutoFocus)return;be(h,{select:!0})}else d.type==="focusout"&&!m&&!b.ignoreCloseAutoFocus&&be(h,{select:!0})}finally{a.isHandlingFocus=!1}}}function f(d){if(!h||!u.current)return;let c=!1;for(const m of d){if(m.type==="childList"&&m.removedNodes.length>0)for(const N of m.removedNodes){if(N===h){c=!0;break}if(N.nodeType===Node.ELEMENT_NODE&&N.contains(h)){c=!0;break}}if(c)break}c&&u.current&&!u.current.contains(document.activeElement)&&be(u.current)}Fe([()=>u.current,()=>t.current],([d,c])=>{if(!d||!c)return;const m=Oe(pe(document,"focusin",w),pe(document,"focusout",w)),N=new MutationObserver(f);return N.observe(d,{childList:!0,subtree:!0,attributes:!1}),()=>{m(),N.disconnect()}}),Fe([()=>s.current,()=>u.current],([d,c])=>{if(d)return;const m=document.activeElement;return y(c,m),()=>{c&&g(m)}}),Fe([()=>s.current,()=>u.current,()=>t.current],([d,c])=>{if(!d)return;const m=document.activeElement;return y(c,m),()=>{c&&g(m)}});function y(d,c){if(d||(d=document.getElementById(n.current)),!d||!t.current)return;if(l.add(a),!d.contains(c)){const N=wn.createEvent();r.current(N),N.defaultPrevented||Ye(()=>{if(!d)return;en($r(Tt(d)),{select:!0})||be(d)})}}function g(d){const c=Sn.createEvent();o.current?.(c);const m=b.ignoreCloseAutoFocus;Xe(0,()=>{!c.defaultPrevented&&d&&!m&&be(_n(d)?d:document.body,{select:!0}),l.remove(a)})}function S(d){if(!t.current||!e.current&&!t.current||a.paused)return;const c=d.key===rr&&!d.ctrlKey&&!d.altKey&&!d.metaKey,m=document.activeElement;if(!(c&&m))return;const N=u.current;if(!N)return;const[R,O]=tn(N);R&&O?!d.shiftKey&&m===O?(d.preventDefault(),e.current&&be(R,{select:!0})):d.shiftKey&&m===R&&(d.preventDefault(),e.current&&be(O,{select:!0})):m===N&&d.preventDefault()}const P=B(()=>({id:n.current,tabindex:-1,onkeydown:S}));return{get props(){return i(P)}}}function xt(n,e){Z(e,!0);let t=p(e,"id",7),r=p(e,"trapFocus",7,!1),o=p(e,"loop",7,!1),s=p(e,"onCloseAutoFocus",7,q),l=p(e,"onOpenAutoFocus",7,q),a=p(e,"focusScope",7),u=p(e,"forceMount",7,!1);const b=Cn({enabled:I.with(()=>r()),loop:I.with(()=>o()),onCloseAutoFocus:I.with(()=>s()),onOpenAutoFocus:I.with(()=>l()),id:I.with(()=>t()),forceMount:I.with(()=>u())});var h=j(),w=H(h);return oe(w,()=>a()??de,()=>({props:b.props})),_(n,h),J({get id(){return t()},set id(f){t(f),v()},get trapFocus(){return r()},set trapFocus(f=!1){r(f),v()},get loop(){return o()},set loop(f=!1){o(f),v()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(f=q){s(f),v()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(f=q){l(f),v()},get focusScope(){return a()},set focusScope(f){a(f),v()},get forceMount(){return u()},set forceMount(f=!1){u(f),v()}})}$(xt,{id:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},forceMount:{}},[],[],!0);globalThis.bitsTextSelectionLayers??=new Map;class Fn{opts;#e=q;#t=I(null);constructor(e){this.opts=e,_e({id:e.id,ref:this.#t,deps:()=>this.opts.enabled.current});let t=q;Fe(()=>this.opts.enabled.current,r=>(r&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=this.#r()),()=>{t(),this.#n(),globalThis.bitsTextSelectionLayers.delete(this)}))}#r(){return Oe(pe(document,"pointerdown",this.#s),pe(document,"pointerup",nr(this.#n,this.opts.onPointerUp.current)))}#s=e=>{const t=this.#t.current,r=e.target;!Ve(t)||!Ve(r)||!this.opts.enabled.current||!Tn(this)||!Ge(t,r)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&(this.#e=Nn(t)))};#n=()=>{this.#e(),this.#e=q}}function kn(n){return new Fn(n)}const it=n=>n.style.userSelect||n.style.webkitUserSelect;function Nn(n){const e=document.body,t=it(e),r=it(n);return Le(e,"none"),Le(n,"text"),()=>{Le(e,t),Le(n,r)}}function Le(n,e){n.style.userSelect=e,n.style.webkitUserSelect=e}function Tn(n){const e=[...globalThis.bitsTextSelectionLayers];if(!e.length)return!1;const t=e.at(-1);return t?t[0]===n:!1}function Dt(n,e){Z(e,!0);let t=p(e,"preventOverflowTextSelection",7,!0),r=p(e,"onPointerDown",7,q),o=p(e,"onPointerUp",7,q),s=p(e,"id",7),l=p(e,"children",7),a=p(e,"enabled",7);kn({id:I.with(()=>s()),onPointerDown:I.with(()=>r()),onPointerUp:I.with(()=>o()),enabled:I.with(()=>a()&&t())});var u=j(),b=H(u);return oe(b,()=>l()??de),_(n,u),J({get preventOverflowTextSelection(){return t()},set preventOverflowTextSelection(h=!0){t(h),v()},get onPointerDown(){return r()},set onPointerDown(h=q){r(h),v()},get onPointerUp(){return o()},set onPointerUp(h=q){o(h),v()},get id(){return s()},set id(h){s(h),v()},get children(){return l()},set children(h){l(h),v()},get enabled(){return a()},set enabled(h){a(h),v()}})}$(Dt,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{}},[],[],!0);function Pn(n){let e=0,t=V(void 0),r;function o(){e-=1,r&&e<=0&&(r(),k(t,void 0),r=void 0)}return(...s)=>(e+=1,i(t)===void 0&&(r=Yt(()=>{k(t,n(...s),!0)})),ae(()=>()=>{o()}),i(t))}const On=Pn(()=>{const n=new Er,e=B(()=>{for(const s of n.values())if(s)return!0;return!1});let t=V(null),r=null;function o(){wt&&(document.body.setAttribute("style",i(t)??""),document.body.style.removeProperty("--scrollbar-width"),et&&r?.())}return ae(()=>{const s=i(e);return lt(()=>{if(!s)return;k(t,document.body.getAttribute("style"),!0);const l=getComputedStyle(document.body),a=window.innerWidth-document.documentElement.clientWidth,b={padding:Number.parseInt(l.paddingRight??"0",10)+a,margin:Number.parseInt(l.marginRight??"0",10)};a>0&&(document.body.style.paddingRight=`${b.padding}px`,document.body.style.marginRight=`${b.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`),document.body.style.overflow="hidden"),et&&(r=Et(document,"touchmove",h=>{h.target===document.documentElement&&(h.touches.length>1||h.preventDefault())},{passive:!1})),Ye(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})})}),ae(()=>()=>{r?.()}),{get map(){return n},resetBodyStyle:o}});function xn(n,e=()=>null){const t=ce(),r=On();if(!r)return;const o=B(e);r.map.set(t,n??!1);const s=I.with(()=>r.map.get(t)??!1,l=>r.map.set(t,l));return ae(()=>()=>{r.map.delete(t),!Dn(r.map)&&(i(o)===null?requestAnimationFrame(()=>r.resetBodyStyle()):Xe(i(o),()=>r.resetBodyStyle()))}),s}function Dn(n){for(const[e,t]of n)if(t)return!0;return!1}function We(n,e){Z(e,!0);let t=p(e,"preventScroll",7,!0),r=p(e,"restoreScrollDelay",7,null);return xn(t(),()=>r()),J({get preventScroll(){return t()},set preventScroll(o=!0){t(o),v()},get restoreScrollDelay(){return r()},set restoreScrollDelay(o=null){r(o),v()}})}$(We,{preventScroll:{},restoreScrollDelay:{}},[],[],!0);function In({forceMount:n,present:e,trapFocus:t,open:r}){return n?r&&t:e&&t&&r}var An=L("<div><!></div>");function It(n,e){Z(e,!0);let t=p(e,"id",23,ce),r=p(e,"forceMount",7,!1),o=p(e,"child",7),s=p(e,"children",7),l=p(e,"ref",15,null),a=we(e,["$$slots","$$events","$$legacy","$$host","id","forceMount","child","children","ref"]);const u=Rr({id:I.with(()=>t()),ref:I.with(()=>l(),w=>l(w))}),b=B(()=>ge(a,u.props)),h=B(()=>u.root.opts.open.current||r());return ft(n,{get id(){return t()},get present(){return i(h)},presence:f=>{var y=j(),g=H(y);{var S=d=>{var c=j(),m=H(c),N=ct(()=>({props:ge(i(b)),...u.snippetProps}));oe(m,o,()=>i(N)),_(d,c)},P=d=>{var c=An();ye(c,N=>({...N}),[()=>ge(i(b))]);var m=C(c);oe(m,()=>s()??de,()=>u.snippetProps),E(c),_(d,c)};z(g,d=>{o()?d(S):d(P,!1)})}_(f,y)},$$slots:{presence:!0}}),J({get id(){return t()},set id(w=ce()){t(w),v()},get forceMount(){return r()},set forceMount(w=!1){r(w),v()},get child(){return o()},set child(w){o(w),v()},get children(){return s()},set children(w){s(w),v()},get ref(){return l()},set ref(w=null){l(w),v()}})}$(It,{id:{},forceMount:{},child:{},children:{},ref:{}},[],[],!0);var Ln=L("<div><!></div>");function At(n,e){Z(e,!0);let t=p(e,"id",23,ce),r=p(e,"children",7),o=p(e,"child",7),s=p(e,"ref",15,null),l=we(e,["$$slots","$$events","$$legacy","$$host","id","children","child","ref"]);const a=Kr({id:I.with(()=>t()),ref:I.with(()=>s(),y=>s(y))}),u=B(()=>ge(l,a.props));var b=j(),h=H(b);{var w=y=>{var g=j(),S=H(g);oe(S,o,()=>({props:i(u)})),_(y,g)},f=y=>{var g=Ln();ye(g,()=>({...i(u)}));var S=C(g);oe(S,()=>r()??de),E(g),_(y,g)};z(h,y=>{o()?y(w):y(f,!1)})}return _(n,b),J({get id(){return t()},set id(y=ce()){t(y),v()},get children(){return r()},set children(y){r(y),v()},get child(){return o()},set child(y){o(y),v()},get ref(){return s()},set ref(y=null){s(y),v()}})}$(At,{id:{},children:{},child:{},ref:{}},[],[],!0);function Lt(n,e){Z(e,!0);let t=p(e,"open",15,!1),r=p(e,"onOpenChange",7,q),o=p(e,"children",7);Lr({variant:I.with(()=>"dialog"),open:I.with(()=>t(),a=>{t(a),r()(a)})});var s=j(),l=H(s);return oe(l,()=>o()??de),_(n,s),J({get open(){return t()},set open(a=!1){t(a),v()},get onOpenChange(){return r()},set onOpenChange(a=q){r(a),v()},get children(){return o()},set children(a){o(a),v()}})}$(Lt,{open:{},onOpenChange:{},children:{}},[],[],!0);var Mn=L("<button><!></button>");function je(n,e){Z(e,!0);let t=p(e,"children",7),r=p(e,"child",7),o=p(e,"id",23,ce),s=p(e,"ref",15,null),l=p(e,"disabled",7,!1),a=we(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","disabled"]);const u=Hr({variant:I.with(()=>"close"),id:I.with(()=>o()),ref:I.with(()=>s(),g=>s(g)),disabled:I.with(()=>!!l())}),b=B(()=>ge(a,u.props));var h=j(),w=H(h);{var f=g=>{var S=j(),P=H(S);oe(P,r,()=>({props:i(b)})),_(g,S)},y=g=>{var S=Mn();ye(S,()=>({...i(b)}));var P=C(S);oe(P,()=>t()??de),E(S),_(g,S)};z(w,g=>{r()?g(f):g(y,!1)})}return _(n,h),J({get children(){return t()},set children(g){t(g),v()},get child(){return r()},set child(g){r(g),v()},get id(){return o()},set id(g=ce()){o(g),v()},get ref(){return s()},set ref(g=null){s(g),v()},get disabled(){return l()},set disabled(g=!1){l(g),v()}})}$(je,{children:{},child:{},id:{},ref:{},disabled:{}},[],[],!0);var Bn=L("<!> <!>",1),Rn=L("<!> <div><!></div>",1);function Mt(n,e){Z(e,!0);let t=p(e,"id",23,ce),r=p(e,"children",7),o=p(e,"child",7),s=p(e,"ref",15,null),l=p(e,"forceMount",7,!1),a=p(e,"onCloseAutoFocus",7,q),u=p(e,"onOpenAutoFocus",7,q),b=p(e,"onEscapeKeydown",7,q),h=p(e,"onInteractOutside",7,q),w=p(e,"trapFocus",7,!0),f=p(e,"preventScroll",7,!0),y=p(e,"restoreScrollDelay",7,null),g=we(e,["$$slots","$$events","$$legacy","$$host","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const S=Br({id:I.with(()=>t()),ref:I.with(()=>s(),c=>s(c))}),P=B(()=>ge(g,S.props)),d=B(()=>S.root.opts.open.current||l());return ft(n,Ce(()=>i(P),{get forceMount(){return l()},get present(){return i(d)},presence:m=>{const N=B(()=>In({forceMount:l(),present:S.root.opts.open.current,trapFocus:w(),open:S.root.opts.open.current}));xt(m,{loop:!0,get trapFocus(){return i(N)},get onOpenAutoFocus(){return u()},get id(){return t()},onCloseAutoFocus:O=>{a()(O),!O.defaultPrevented&&S.root.triggerNode?.focus()},focusScope:(O,T)=>{let K=()=>T?.().props;Nt(O,Ce(()=>i(P),{get enabled(){return S.root.opts.open.current},onEscapeKeydown:M=>{b()(M),!M.defaultPrevented&&S.root.handleClose()},children:(M,W)=>{kt(M,Ce(()=>i(P),{get enabled(){return S.root.opts.open.current},onInteractOutside:ee=>{h()(ee),!ee.defaultPrevented&&S.root.handleClose()},children:(ee,Y)=>{Dt(ee,Ce(()=>i(P),{get enabled(){return S.root.opts.open.current},children:(D,Q)=>{var G=j(),U=H(G);{var X=re=>{var ie=Bn(),x=H(ie);{var ne=qe=>{We(qe,{get preventScroll(){return f()},get restoreScrollDelay(){return y()}})};z(x,qe=>{S.root.opts.open.current&&qe(ne)})}var ve=A(x,2),He=ct(()=>({props:ge(i(P),K()),...S.snippetProps}));oe(ve,o,()=>i(He)),_(re,ie)},te=re=>{var ie=Rn(),x=H(ie);We(x,{get preventScroll(){return f()}});var ne=A(x,2);ye(ne,He=>({...He}),[()=>ge(i(P),K())]);var ve=C(ne);oe(ve,()=>r()??de),E(ne),_(re,ie)};z(U,re=>{o()?re(X):re(te,!1)})}_(D,G)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})},$$slots:{presence:!0}})),J({get id(){return t()},set id(c=ce()){t(c),v()},get children(){return r()},set children(c){r(c),v()},get child(){return o()},set child(c){o(c),v()},get ref(){return s()},set ref(c=null){s(c),v()},get forceMount(){return l()},set forceMount(c=!1){l(c),v()},get onCloseAutoFocus(){return a()},set onCloseAutoFocus(c=q){a(c),v()},get onOpenAutoFocus(){return u()},set onOpenAutoFocus(c=q){u(c),v()},get onEscapeKeydown(){return b()},set onEscapeKeydown(c=q){b(c),v()},get onInteractOutside(){return h()},set onInteractOutside(c=q){h(c),v()},get trapFocus(){return w()},set trapFocus(c=!0){w(c),v()},get preventScroll(){return f()},set preventScroll(c=!0){f(c),v()},get restoreScrollDelay(){return y()},set restoreScrollDelay(c=null){y(c),v()}})}$(Mt,{id:{},children:{},child:{},ref:{},forceMount:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},restoreScrollDelay:{}},[],[],!0);var Kn=L("<div></div>"),Hn=L('<span class="sr-only">Close</span> <!>',1),qn=L('<div><div class="dialog-header"><!> <!></div> <!></div>'),Un=L("<!> <!>",1);function Bt(n,e){Z(e,!0);let t=p(e,"open",7),r=p(e,"content",7),o=p(e,"title",7),s=p(e,"onClose",7);const l={duration:Number(F.theme.components.dialog.custom?.transitionDuration)||200,delay:Number(F.theme.components.dialog.custom?.transitionDelay)||0,y:Number(F.theme.components.dialog.custom?.transitionY)||10},a=h=>{h||s()()};var u=j(),b=H(u);return Se(b,()=>Lt,(h,w)=>{w(h,{get open(){return t()},onOpenChange:a,children:(f,y)=>{var g=Un(),S=H(g);Se(S,()=>je,(d,c)=>{c(d,{class:"dialog-overlay-wrapper",children:(m,N)=>{var R=j(),O=H(R);{const T=(K,M)=>{let W=()=>M?.().props,ee=()=>M?.().open;var Y=j(),D=H(Y);{var Q=G=>{var U=Kn();ye(U,()=>({...W(),class:"dialog-overlay"})),ue(3,U,()=>ht,()=>l),_(G,U)};z(D,G=>{ee()&&G(Q)})}_(K,Y)};Se(O,()=>It,(K,M)=>{M(K,{forceMount:!0,child:T,$$slots:{child:!0}})})}_(m,R)},$$slots:{default:!0}})});var P=A(S,2);{const d=(c,m)=>{let N=()=>m?.().props,R=()=>m?.().open;var O=j(),T=H(O);{var K=M=>{var W=qn();ye(W,()=>({...N(),class:"dialog-content"}));var ee=C(W),Y=C(ee);Se(Y,()=>St,(G,U)=>{U(G,{class:"dialog-title",children:(X,te)=>{var re=j(),ie=H(re);oe(ie,()=>o()??de),_(X,re)},$$slots:{default:!0}})});var D=A(Y,2);Se(D,()=>je,(G,U)=>{U(G,{class:"dialog-close",children:(X,te)=>{var re=Hn(),ie=A(H(re),2);Ke(ie,{name:"dismiss"}),_(X,re)},$$slots:{default:!0}})}),E(ee);var Q=A(ee,2);Se(Q,()=>At,(G,U)=>{U(G,{class:"dialog-description",children:(X,te)=>{var re=j(),ie=H(re);oe(ie,r),_(X,re)},$$slots:{default:!0}})}),E(W),ue(3,W,()=>Ie,()=>l),_(M,W)};z(T,M=>{R()&&M(K)})}_(c,O)};Se(P,()=>Mt,(c,m)=>{m(c,{forceMount:!0,child:d,$$slots:{child:!0}})})}_(f,g)},$$slots:{default:!0}})}),_(n,u),J({get open(){return t()},set open(h){t(h),v()},get content(){return r()},set content(h){r(h),v()},get title(){return o()},set title(h){o(h),v()},get onClose(){return s()},set onClose(h){s(h),v()}})}$(Bt,{open:{},content:{},title:{},onClose:{}},[],[],!0);var zn=L('<form name="feedback-form" class="form"><!> <div class="form__item"><label class="form__label" for="feedback"> </label> <textarea id="feedback" class="input"></textarea></div> <div class="form__item"><label class="form__label" for="email"> </label> <input type="email" id="email" class="input"/></div> <button type="submit" class="btn btn--primary"> </button></form>');function Rt(n,e){Z(e,!0);let t=B(()=>F.t),r=p(e,"logic",7),o=V(""),s=V(""),l=V(void 0),a=V(void 0),u=B(()=>i(l)!==void 0||i(a)!==void 0||i(o)!=="");const b=B(()=>!!r().data.feedbackOpenedId||r().data.feedbackOpenedConversation);return Bt(n,{get open(){return i(b)},get onClose(){return r().closeFeedback},title:f=>{var y=j(),g=H(y);Ae(g,()=>i(t).feedbackFormTitle),_(f,y)},content:f=>{var y=zn(),g=C(y);or(g,{get classificationConfig(){return r().data.chatConfig.classification},get impact(){return i(l)},set impact(M){k(l,M,!0)},get quality(){return i(a)},set quality(M){k(a,M,!0)}});var S=A(g,2),P=C(S),d=C(P,!0);E(P);var c=A(P,2);Qt(c),E(S);var m=A(S,2),N=C(m),R=C(N,!0);E(N);var O=A(N,2);sr(O),E(m);var T=A(m,2),K=C(T,!0);E(T),E(y),se(()=>{fe(d,i(t).feedbackFormMessage),he(c,"placeholder",i(t).feedbackFormMessagePlaceholder),fe(R,i(t).feedbackFormEmail),he(O,"placeholder",i(t).feedbackFormEmailPlaceholder),T.disabled=!i(u),fe(K,i(t).send)}),le("submit",y,async M=>{M.preventDefault(),r().data.chatConfig.classification?await r().submitFeedback({email:i(s),message:i(o),classification:{impact:i(l),quality:i(a)}}):await r().submitFeedback({email:i(s),message:i(o)}),k(l,void 0),k(a,void 0),k(o,""),r().closeFeedback()}),Je(c,()=>i(o),M=>k(o,M)),Je(O,()=>i(s),M=>k(s,M)),_(f,y)},$$slots:{title:!0,content:!0}}),J({get logic(){return r()},set logic(h){r(h),v()}})}$(Rt,{logic:{}},[],[],!0);let Me;function Vn(n,e,t,r,o){Me&&cancelAnimationFrame(Me);const s=n instanceof Window?window.scrollY:n[r],l=performance.now();function a(u){const b=u-l,h=Math.min(b/t,1),w=o(h),f=s+(e-s)*w;n instanceof Window?window.scrollTo({top:f,behavior:"instant"}):n[r]=f,h<1?Me=requestAnimationFrame(a):n.dispatchEvent(new CustomEvent("scrollcomplete"))}Me=requestAnimationFrame(a)}var Wn=()=>F.openConverstionFeedback(),jn=L('<button class="chat-page__give-feedback btn btn--primary"> </button>'),Yn=L('<div class="chat-page__footer-text"><!></div>'),Qn=L('<section class="chat-page"><!> <div class="chat-page__body"><div class="chat-page__messages"><!> <div class="chat-page__buttons"><!></div></div></div> <div><div class="chat-page__footer-content"><button><span class="sr-only"> </span> <!></button> <!> <!></div></div></section>');const Xn={hash:"svelte-19wcq0c",code:":host {--chat-footer-height: 0px;}"};function Kt(n,e){Z(e,!0),vt(n,Xn);let t=B(()=>F.t),r=p(e,"history",7),o=p(e,"onSubmit",7),s=V(!1),l=V(!1),a,u,b,h=V(0);const w=90,f=()=>{k(h,b.offsetHeight,!0),a.style.setProperty("--chat-footer-height",`${i(h)}px`)};ae(()=>{const x=new ResizeObserver(f);return x.observe(b),()=>x.disconnect()});const y=()=>{Vn(a,a.scrollHeight-a.clientHeight,1e3,"scrollTop",ir)},g=()=>{if(!a)return;const x=a.scrollHeight-a.scrollTop-a.clientHeight<w;k(l,!x)},S=()=>{g()},P=x=>{if(x.altKey&&x.code==="KeyR"){x.preventDefault();const ne=F.data.history.findLast(ve=>ve.type==="user")?.message;F.goto({name:"start-page",prefill:ne})}},d=x=>{u.offsetHeight>a.offsetHeight&&(u.style.minHeight=`calc(${u.offsetHeight}px + 40cqh)`,requestAnimationFrame(()=>{y()})),o()(x)};ae(()=>{k(s,!0)});var c=Qn();le("resize",Ue,S),le("keypress",Ue,P);var m=C(c);Rt(m,{get logic(){return F}});var N=A(m,2),R=C(N),O=C(R);xe(O,17,r,De,(x,ne)=>{ar(x,{get message(){return i(ne)},onmessageupdate:g,get logic(){return F}})});var T=A(O,2),K=C(T);{var M=x=>{var ne=jn();ne.__click=[Wn];var ve=C(ne,!0);E(ne),se(()=>fe(ve,i(t).giveFeedback)),_(x,ne)};z(K,x=>{F.data.chatConfig.showOverallFeedbackButton&&x(M)})}E(T),E(R),Ee(R,x=>u=x,()=>u),E(N),Ee(N,x=>a=x,()=>a);var W=A(N,2);let ee;var Y=C(W),D=C(Y);D.__click=y;let Q;var G=C(D),U=C(G,!0);E(G);var X=A(G,2);Ke(X,{name:"chevronDown"}),E(D);var te=A(D,2);pt(te,{onSubmit:d,class:"chat-page__chat-input"});var re=A(te,2);{var ie=x=>{var ne=Yn(),ve=C(ne);Ae(ve,()=>i(t).chatFooterText),E(ne),_(x,ne)};z(re,x=>{i(t).chatFooterText!==void 0&&x(ie)})}return E(Y),E(W),Ee(W,x=>b=x,()=>b),E(c),se((x,ne)=>{ee=ke(W,1,"chat-page__footer container",null,ee,x),Q=ke(D,1,"chat-page__scroll-to-bottom btn btn--secondary",null,Q,ne),fe(U,i(t).scrollToBottom)},[()=>({mounted:i(s)}),()=>({"chat-page__scroll-to-bottom--hidden":!i(l)})]),le("scroll",N,g),_(n,c),J({get history(){return r()},set history(x){r(x),v()},get onSubmit(){return o()},set onSubmit(x){o(x),v()}})}ut(["click"]);$(Kt,{history:{},onSubmit:{}},[],[],!0);var Gn=(n,e)=>(n.stopPropagation(),k(e,!i(e))),Zn=L('<div class="context-box__content text-container"><!></div>'),Jn=L('<div><button class="btn btn--secondary btn--header"><span class="sr-only"> </span> <!></button> <!></div>');function Ht(n,e){Z(e,!0);let t=B(()=>F.t),r=V(!1),o,s=V(void 0),l=p(e,"logic",7);const a={duration:Number(l().theme.components.referenceNumberContent.custom?.transitionDuration)||200,delay:Number(l().theme.components.referenceNumberContent.custom?.transitionDelay)||0,y:Number(l().theme.components.referenceNumberContent.custom?.transitionY)||10},u=async()=>{if(!o||!i(s))return;const{x:c,y:m}=await gt(o,i(s),{placement:"bottom-end",middleware:[mt(8),bt({padding:8})]});Object.assign(i(s).style,{left:`${c}px`,top:`${m}px`})};ae(()=>{i(r)&&u()});var b=Jn();let h;var w=C(b);w.__click=[Gn,r];var f=C(w),y=C(f,!0);E(f);var g=A(f,2);const S=B(()=>i(r)?"menuClose":"info");Ke(g,{get name(){return i(S)}}),E(w),Ee(w,c=>o=c,()=>o),ze(w,c=>lr?.(c)),ze(w,(c,m)=>cr?.(c,m),()=>({text:i(t).openInfo,position:"bottom-right",delay:0}));var P=A(w,2);{var d=c=>{var m=Zn(),N=C(m);Ae(N,()=>i(t).aboutThisChat),E(m),Ee(m,R=>k(s,R),()=>i(s)),ue(3,m,()=>Ie,()=>a),_(c,m)};z(P,c=>{i(r)&&c(d)})}return E(b),se(c=>{h=ke(b,1,"context-box context-box--info",null,h,c),he(w,"aria-label",i(r)?i(t).close:i(t).openInfo),fe(y,i(r)?i(t).close:i(t).openInfo)},[()=>({open:i(r)})]),le("clickoutside",w,()=>k(r,!1)),_(n,b),J({get logic(){return l()},set logic(c){l(c),v()}})}ut(["click"]);$(Ht,{logic:{}},[],[],!0);var $n=L('<div><!> <h1 class="introduction__title"><!></h1></div>');function qt(n,e){Z(e,!0);let t=B(()=>F.t),r=p(e,"class",7);var o=$n(),s=C(o);Ke(s,{name:"avatar",class:"introduction__avatar"});var l=A(s,2),a=C(l);return Ae(a,()=>i(t).introductionTitle),E(l),E(o),se(()=>ke(o,1,`introduction ${r()??""}`)),_(n,o),J({get class(){return r()},set class(u){r(u),v()}})}$(qt,{class:{}},[],[],!0);var eo=L("<div></div>");function Ut(n,e){Z(e,!0);let t=p(e,"class",7),r=we(e,["$$slots","$$events","$$legacy","$$host","class"]);var o=eo();return ye(o,s=>({class:`predefined-questions ${t()??""}`,...r,[ur]:s}),[()=>({"predefined-questions--pii-padding":F.data.questionHasPii})]),xe(o,21,()=>F.data.predefinedQuestions,De,(s,l)=>{dr(s,{get predefinedQuestion(){return i(l)},get onSubmit(){return F.onStartConversation}})}),E(o),_(n,o),J({get class(){return t()},set class(s){t(s),v()}})}$(Ut,{class:{}},[],[],!0);var to=L('<div class="introduction-disclaimer text-container fly-in" style="--fly-in-id: 3;"><!></div>'),ro=L("<section><!> <!> <!> <!></section>");function zt(n,e){Z(e,!0);let t=B(()=>F.t),r=V(!1);ae(()=>{k(r,!0)});var o=ro();let s;var l=C(o);qt(l,{class:"start-page__introduction fly-in"});var a=A(l,2);pt(a,{get onSubmit(){return F.onStartConversation},class:"start-page__chat-input fly-in",style:"--fly-in-id: 1;",isStartPage:!0});var u=A(a,2);{var b=f=>{Ut(f,{class:"start-page__predefined-questions fly-in",style:"--fly-in-id: 2;"})};z(u,f=>{F.data.predefinedQuestions&&F.data.predefinedQuestions.length&&f(b)})}var h=A(u,2);{var w=f=>{var y=to(),g=C(y);Ae(g,()=>i(t).introductionDisclaimer),E(y),_(f,y)};z(h,f=>{i(t).introductionDisclaimer&&f(w)})}E(o),se(f=>s=ke(o,1,"start-page container",null,s,f),[()=>({mounted:i(r)})]),_(n,o),J()}$(zt,{},[],[],!0);function at(n,{delay:e=0,duration:t=200,easing:r=l=>l,baseScale:o=0,transformOrigin:s="bottom right"}={}){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return{delay:0,duration:0,css:()=>`opacity: 1; transform: scale(1); transform-origin: ${s};`};const a=getComputedStyle(n),u=+a.opacity,b=a.transform.match(/scale\(([0-9.]+)\)/),h=b?+b[1]:1,w=1-o;return{delay:e,duration:t,css:f=>{const y=r(f),g=y*h*w+o;return`opacity: ${y*u}; transform: scale(${g}); transform-origin: ${s};`}}}var no=L('<div class="loader-container svelte-jdm8uf"><svg width="40" height="40" viewBox="0 0 24 24"><circle cx="4" cy="12" r="3"><animate id="spinner_qFRN" begin="0;spinner_OcgL.end+0.25s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle><circle cx="12" cy="12" r="3"><animate begin="spinner_qFRN.begin+0.1s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle><circle cx="20" cy="12" r="3"><animate id="spinner_OcgL" begin="spinner_qFRN.begin+0.2s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle></svg></div>');const oo={hash:"svelte-jdm8uf",code:".loader-container.svelte-jdm8uf {display:flex;z-index:var(--z-index-loader);position:absolute;top:0;right:0;bottom:0;left:0;align-items:center;justify-content:center;background-color:#fff;}"};function Vt(n,e){Z(e,!0),vt(n,oo);let t=p(e,"color",7),r=p(e,"background",7);var o=no(),s=C(o);return E(o),se(()=>{Qe(o,r()?`background: ${r()};`:""),he(s,"fill",t()??"rgba(127, 127, 127, 0.3)")}),_(n,o),J({get color(){return t()},set color(l){t(l),v()},get background(){return r()},set background(l){r(l),v()}})}$(Vt,{color:{},background:{}},[],[],!0);var so=L('<div class="flyout__content"><!></div>'),io=L('<div><div class="flyout__body"><!></div></div>'),ao=L('<!> <div class="chat-app__main"><div class="chat-app__loader-container"><!></div></div>',1);function Wt(n,e){Z(e,!0);let t=p(e,"children",7),r=p(e,"loaderColor",7),o=p(e,"loaderBackground",7),s=p(e,"flyout",7),l=p(e,"flyoutClass",7),a=p(e,"flyoutStyle",7),u=p(e,"onCloseChat",7),b=p(e,"onError",7),h=we(e,["$$slots","$$events","$$legacy","$$host","children","loaderColor","loaderBackground","flyout","flyoutClass","flyoutStyle","onCloseChat","onError"]),w;const f=d=>{ae(()=>{const c=m=>{w=m};return d.addEventListener("click",c),()=>{d.removeEventListener("click",c),w=void 0}})};var y=j();le("click",Ue,d=>{d!==w&&s()&&u()()});var g=H(y);{var S=d=>{var c=j(),m=H(c);{var N=O=>{},R=O=>{var T=io(),K=C(T),M=C(K);{var W=Y=>{var D=so(),Q=C(D);oe(Q,t),E(D),ue(1,D,()=>at,()=>({delay:0,duration:500,easing:$e,baseScale:.3})),ue(2,D,()=>at,()=>({delay:0,duration:300,easing:$e,baseScale:.7})),_(Y,D)},ee=Y=>{Sr(Y,Ce({get onError(){return b()},onclick:D=>{D.stopPropagation(),F.openFlyout()},buttonClass:"flyout__open-button"},()=>h))};z(M,Y=>{F.data.flyoutIsOpen?Y(W):Y(ee,!1)})}E(K),ze(K,Y=>f?.(Y)),E(T),se(()=>{Qe(T,a()),ke(T,1,fr(["flyout",l()]))}),_(O,T)};z(m,O=>{F.initialized?O(R,!1):O(N)})}_(d,c)},P=d=>{var c=j(),m=H(c);{var N=O=>{var T=ao(),K=H(T);Pe(K,{id:"app-css",get css(){return yt}});var M=A(K,2),W=C(M),ee=C(W);hr(ee,e,"loader",{},Y=>{Vt(Y,{get background(){return o()},get color(){return r()}})}),E(W),E(M),ue(2,W,()=>_t,()=>({duration:200,delay:300})),_(O,T)},R=O=>{var T=j(),K=H(T);oe(K,t),_(O,T)};z(m,O=>{F.initialized?O(R,!1):O(N)})}_(d,c)};z(g,d=>{s()?d(S):d(P,!1)})}return _(n,y),J({get children(){return t()},set children(d){t(d),v()},get loaderColor(){return r()},set loaderColor(d){r(d),v()},get loaderBackground(){return o()},set loaderBackground(d){o(d),v()},get flyout(){return s()},set flyout(d){s(d),v()},get flyoutClass(){return l()},set flyoutClass(d){l(d),v()},get flyoutStyle(){return a()},set flyoutStyle(d){a(d),v()},get onCloseChat(){return u()},set onCloseChat(d){u(d),v()},get onError(){return b()},set onError(d){b(d),v()}})}$(Wt,{children:{},loaderColor:{},loaderBackground:{},flyout:{},flyoutClass:{},flyoutStyle:{},onCloseChat:{},onError:{}},["loader"],[],!0);var lo=L('<strong class="reference-number__content-title"> </strong>'),co=L('<div class="line-clamp line-clamp--12"> </div>'),uo=L('<div class="reference-number__domain transition-colors"><span class="truncate"> </span></div>'),fo=L('<div class="reference-number__content-wrapper" role="tooltip"><a class="reference-number__content transition-colors no-link-styling" target="_blank" rel="noopener noreferrer"><!> <!> <!></a></div>'),ho=L('<div class="reference-number"><a target="_blank" rel="noopener noreferrer" class="reference-number__trigger transition-colors no-link-styling"> </a> <!></div>');function vo(n,e){Z(e,!0);let t=B(()=>F.t),r=p(e,"usedNumber",7),o=p(e,"source",7),s=V(!1),l,a,u=V(void 0);const b=o();let h=B(()=>b.display.card.title),w=B(()=>b.display.card.description),f=B(()=>b.display.card.badge);const y={duration:Number(F.theme.components.referenceNumberContent.custom?.transitionDuration)||200,delay:Number(F.theme.components.referenceNumberContent.custom?.transitionDelay)||0,y:Number(F.theme.components.referenceNumberContent.custom?.transitionY)||10},g=async()=>{if(!a||!i(u))return;const{x:T,y:K}=await gt(a,i(u),{placement:"top",middleware:[mt(8),vr(),bt({padding:8})]});Object.assign(i(u).style,{left:`${T}px`,top:`${K}px`})},S=()=>{l&&(clearTimeout(l),l=void 0)},P=()=>{S(),l=setTimeout(()=>{k(s,!1)},100)},d=()=>{S(),k(s,!0)};ae(()=>{i(s)&&g()});var c=ho(),m=C(c),N=C(m,!0);E(m),Ee(m,T=>a=T,()=>a);var R=A(m,2);{var O=T=>{var K=fo(),M=C(K),W=C(M);{var ee=U=>{var X=lo(),te=C(X,!0);E(X),se(()=>fe(te,i(h))),_(U,X)};z(W,U=>{i(h)&&U(ee)})}var Y=A(W,2);{var D=U=>{var X=co(),te=C(X,!0);E(X),se(()=>fe(te,i(w))),_(U,X)};z(Y,U=>{i(w)&&U(D)})}var Q=A(Y,2);{var G=U=>{var X=uo(),te=C(X),re=C(te,!0);E(te),E(X),se(()=>fe(re,i(f))),_(U,X)};z(Q,U=>{b.url&&U(G)})}E(M),E(K),Ee(K,U=>k(u,U),()=>i(u)),se(()=>he(M,"href",b.url)),le("mouseenter",K,d),le("mouseleave",K,P),ue(3,K,()=>Ie,()=>y),_(T,K)};z(R,T=>{i(s)&&T(O)})}return E(c),se(()=>{he(m,"href",b.url),he(m,"aria-label",`${i(t).referenceLink??""}: ${i(h)??""}`),fe(N,r())}),le("mouseenter",m,d),le("mouseleave",m,P),le("focus",m,()=>k(s,!0)),le("blur",m,()=>k(s,!1)),_(n,c),J({get usedNumber(){return r()},set usedNumber(T){r(T),v()},get source(){return o()},set source(T){o(T),v()}})}customElements.define("liipgpt-reference-number",$(vo,{source:{attribute:"data-source",type:"Object"},refNumber:{attribute:"data-all-index",type:"String"},usedNumber:{attribute:"data-used-index",type:"String"}},[],[],!1));var po=L('<link rel="stylesheet"/>'),go=L('<link rel="stylesheet"/>'),mo=L("<!> <!> <!>",1),bo=L('<link rel="stylesheet"/>'),yo=L("<!> <!> <!> <!>",1),_o=L("<div><!></div>"),wo=L('<div class="chat-app__page-transition"><!></div>'),So=L('<div class="chat-app__container"><div class="chat-app__main"><div class="chat-app__header"><div class="chat-app__header-container"><!> <!> <!> <!></div></div> <div class="chat-app__body"><!></div> <!></div> <div class="chat-app__aside">References</div></div>'),Eo=L('<main class="chat-app"><!> <!></main>');function Co(n,e){Z(e,!0);let t=p(e,"host",7),r=p(e,"onError",7),o=we(e,["$$slots","$$events","$$legacy","$$host","host","onError"]);ae(()=>{const f={forceTheme:e.forceTheme,apiUrl:e.apiUrl,apiKey:e.apiKey,speechRecognitionApiKey:e.speechRecognitionApiKey,lang:e.lang,features:e.features,loaderBackground:e.loaderBackground,loaderColor:e.loaderColor,flyout:e.flyout,flyoutStyle:e.flyoutStyle,flyoutClass:e.flyoutClass};lt(()=>F.init(f).catch(y=>r()(y)))});let s=B(()=>F.data.route.name);const l=()=>{F.closeFlyout(),t().dispatchEvent(new CustomEvent("closechat"))};ae(()=>{F.initialized&&F.data?.chatConfig&&t().dispatchEvent(new CustomEvent("configloaded",{detail:F.data.chatConfig}))});var a=Eo();Xt(f=>{var y=j(),g=H(y);{var S=P=>{var d=mo(),c=H(d);xe(c,17,()=>F.themeBase.fontURLs??[],De,(R,O)=>{var T=po();se(()=>he(T,"href",i(O))),_(R,T)});var m=A(c,2);xe(m,17,()=>F.data.additionalStylesheets,De,(R,O)=>{var T=go();se(()=>he(T,"href",i(O))),_(R,T)});var N=A(m,2);Pe(N,{id:"font-css",get css(){return F.themeBase.fontCSS}}),_(P,d)};z(g,P=>{F.initialized&&P(S)})}_(f,y)});let u;var b=C(a);{var h=f=>{var y=yo(),g=H(y);const S=B(()=>wr(F.theme));Pe(g,{id:"theme-css",get css(){return i(S)}});var P=A(g,2);Pe(P,{id:"app-css",get css(){return yt}});var d=A(P,2);Pe(d,{id:"custom-css",get css(){return F.themeBase.customCSS}});var c=A(d,2);xe(c,17,()=>F.data.additionalStylesheets,De,(m,N)=>{var R=bo();se(()=>he(R,"href",i(N))),_(m,R)}),_(f,y)};z(b,f=>{F.initialized&&f(h)})}var w=A(b,2);return Wt(w,Ce({onCloseChat:l,get onError(){return r()}},()=>o,{children:(f,y)=>{var g=So(),S=C(g),P=C(S),d=C(P),c=C(d);{var m=D=>{var Q=_o(),G=C(Q);mr(G,{}),E(Q),ue(1,Q,()=>Ie,()=>({duration:300,y:30})),ue(2,Q,()=>Ie,()=>({y:15,duration:150,easing:br})),_(D,Q)};z(c,D=>{i(s)!=="start-page"&&D(m)})}var N=A(c,2);{var R=D=>{yr(D,{get chatLogic(){return F}})};z(N,D=>{F.data.chatConfig.showContextMenu&&D(R)})}var O=A(N,2);{var T=D=>{Ht(D,{get logic(){return F}})};z(O,D=>{F.data.chatConfig.showContextInfo&&D(T)})}var K=A(O,2);{var M=D=>{_r(D,{onclick:l})};z(K,D=>{(F.data.chatConfig.showCloseChatButton||F.data.props.flyout)&&D(M)})}E(d),E(P);var W=A(P,2),ee=C(W);pr(ee,()=>i(s),D=>{var Q=wo(),G=C(Q);{var U=te=>{zt(te,{})},X=(te,re)=>{{var ie=x=>{Kt(x,{get history(){return F.data.history},get onSubmit(){return F.onSubmit}})};z(te,x=>{i(s)==="chat-page"&&x(ie)},re)}};z(G,te=>{i(s)==="start-page"?te(U):te(X,!1)})}E(Q),ue(1,Q,()=>ht,()=>({duration:300,delay:250})),ue(2,Q,()=>_t,()=>({duration:150})),_(D,Q)}),E(W);var Y=A(W,2);gr(Y,{position:"top-center"}),E(S),Gt(2),E(g),_(f,g)},$$slots:{default:!0}})),E(a),se(f=>u=Qe(a,"",u,f),[()=>({"color-scheme":F.colorScheme})]),_(n,a),J({get host(){return t()},set host(f){t(f),v()},get onError(){return r()},set onError(f){r(f),v()}})}$(Co,{host:{},onError:{}},[],[],!0);export{Co as C};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import"./NZTpNUN0.js";import{p as J,H as b,a as d,F as k,I as K,b as n,E as x,J as L,d as P,v as q,K as R,f as B,s as E,t as T,e as U,L as S,g as w,r as z,M as j,c as A}from"./DUt8zN7X.js";import{i as F}from"./Dq6jck_i.js";import{a as D}from"./Crb1ifvw.js";import{p as M}from"./BiXZbQqO.js";import{b as G}from"./CthtHExI.js";var N=(u,a)=>a()(),O=B('<div class="chat-app__container"><div class="error-message svelte-4thrqu">Server is unreachable, please try later... <button class="error-message__retry-button svelte-4thrqu">Retry</button></div></div>'),Q=B(" <!>",1);const V={hash:"svelte-4thrqu",code:`
|
|
2
|
+
/* These styles are inline, because at this point theme loading has failed. */.error-message.svelte-4thrqu {display:table;z-index:1000;width:auto;margin:2rem auto;padding:2rem;border-radius:2px;background:white;color:oklch(27.8% 0.033 256.848);font-family:-apple-system,
|
|
3
|
+
BlinkMacSystemFont,
|
|
4
|
+
avenir next,
|
|
5
|
+
avenir,
|
|
6
|
+
segoe ui,
|
|
7
|
+
helvetica neue,
|
|
8
|
+
helvetica,
|
|
9
|
+
Cantarell,
|
|
10
|
+
Ubuntu,
|
|
11
|
+
roboto,
|
|
12
|
+
noto,
|
|
13
|
+
arial,
|
|
14
|
+
sans-serif;}.error-message__retry-button.svelte-4thrqu {border:none;outline:none;background:none;font-size:1rem;text-decoration:underline;&:active {outline:none;}}`};function W(u,a){J(a,!0),D(u,V);const h=(e,o=x,f=x)=>{R();var i=Q(),l=d(i),r=E(l);{var c=t=>{},_=t=>{var p=O(),y=w(p),I=E(w(y));I.__click=[N,f],z(y),z(p),n(t,p)};F(r,t=>{m()?t(c):t(_,!1)})}T(t=>U(l,`${t??""} `),[()=>console.error(`Panic, uncaught error:
|
|
15
|
+
`,o())??""]),n(e,i)};let v=M(a,"body",7),m=M(a,"silent",7),s=K(void 0);const C=e=>{S(s,{error:e},!0)};var g=b(),H=d(g);return G(H,{get failed(){return h}},e=>{var o=b(),f=d(o);{var i=r=>{h(r,()=>k(s).error,()=>()=>{S(s,void 0)})},l=r=>{var c=b(),_=d(c);L(_,v,()=>C),n(r,c)};F(f,r=>{k(s)?r(i):r(l,!1)})}n(e,o)}),n(u,g),P({get body(){return v()},set body(e){v(e),q()},get silent(){return m()},set silent(e){m(e),q()}})}j(["click"]);A(W,{body:{},silent:{}},[],[],!0);export{W as E};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const Vt="https://liipgpt.api.dev.genai.liip.ch/liipgpt",Pt="1.0.1";function Je(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var oe,xe;function Qe(){if(xe)return oe;xe=1;var a=function(k){return e(k)&&!t(k)};function e(g){return!!g&&typeof g=="object"}function t(g){var k=Object.prototype.toString.call(g);return k==="[object RegExp]"||k==="[object Date]"||o(g)}var r=typeof Symbol=="function"&&Symbol.for,n=r?Symbol.for("react.element"):60103;function o(g){return g.$$typeof===n}function s(g){return Array.isArray(g)?[]:{}}function i(g,k){return k.clone!==!1&&k.isMergeableObject(g)?z(s(g),g,k):g}function h(g,k,w){return g.concat(k).map(function(R){return i(R,w)})}function f(g,k){if(!k.customMerge)return z;var w=k.customMerge(g);return typeof w=="function"?w:z}function b(g){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(g).filter(function(k){return Object.propertyIsEnumerable.call(g,k)}):[]}function I(g){return Object.keys(g).concat(b(g))}function G(g,k){try{return k in g}catch{return!1}}function qe(g,k){return G(g,k)&&!(Object.hasOwnProperty.call(g,k)&&Object.propertyIsEnumerable.call(g,k))}function He(g,k,w){var R={};return w.isMergeableObject(g)&&I(g).forEach(function(j){R[j]=i(g[j],w)}),I(k).forEach(function(j){qe(g,j)||(G(g,j)&&w.isMergeableObject(k[j])?R[j]=f(j,w)(g[j],k[j],w):R[j]=i(k[j],w))}),R}function z(g,k,w){w=w||{},w.arrayMerge=w.arrayMerge||h,w.isMergeableObject=w.isMergeableObject||a,w.cloneUnlessOtherwiseSpecified=i;var R=Array.isArray(k),j=Array.isArray(g),Ge=R===j;return Ge?R?w.arrayMerge(g,k,w):He(g,k,w):i(k,w)}z.all=function(k,w){if(!Array.isArray(k))throw new Error("first argument should be an array");return k.reduce(function(R,j){return z(R,j,w)},{})};var Ye=z;return oe=Ye,oe}var Xe=Qe();const Ke=Je(Xe),Le={tokens:{font:{family:"-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif"},colors:{brand:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},highlight:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},grey:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923",1e3:"#000000"}},components:{body:{background:"var(--color-grey-0)",color:"var(--color-grey-900)",focus:{color:"var(--color-highlight-500)"},custom:{selectionColor:"var(--color-grey-0)",selectionBackground:"var(--color-brand-700)"}},header:{background:"transparent"},container:{custom:{maxWidth:"1024px"}},avatar:{color:"var(--color-brand-400)",background:"var(--color-grey-100)"},box:{custom:{shadow:"0px 0px 2px rgba(0, 0, 0, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)"}},anchor:{color:"var(--color-brand-600)",hover:{color:"var(--color-brand-950)"}},line:{color:"color-mix(in srgb, var(--color-brand-950) 20%, transparent)"},btnPrimary:{color:"var(--color-grey-0)",background:"var(--color-brand-700)",borderRadius:{minRem:.5,maxRem:.75},hover:{background:"var(--color-brand-900)"}},btnSecondary:{color:"var(--color-brand-700)",background:"var(--color-brand-100)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},btnTertiary:{color:"var(--color-grey-600)",background:"var(--color-grey-100)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},card:{color:"inherit",background:"var(--color-grey-100)",borderRadius:{minRem:.5,maxRem:.75},boxShadow:"none",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-100)"},custom:{iconColor:"var(--anchor-color)",iconHoverColor:"var(--anchor-hover-color)"}},pillDefault:{color:"var(--color-grey-700)",background:"var(--color-grey-200)",borderRadius:{minRem:.75,maxRem:1},boxShadow:"var(--card-box-shadow)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},input:{background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:{minRem:.25,maxRem:.5},custom:{padding:"var(--spacer-r-16) var(--spacer-r-20)",placeholderColor:"var(--color-grey-500)"}},label:{color:"var(--color-grey-600)"},hr:{color:"var(--line-color)"},contextBox:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",boxShadow:"var(--box-shadow)",custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:"var(--color-grey-1000)",titleFontWeight:"var(--font-weight-bold)",separatorColor:"var(--line-color)"}},contextBoxMenuItem:{background:"transparent",color:"var(--body-color)",borderRadius:{minRem:.25,maxRem:.5},hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{activeColor:"var(--btn-secondary-hover-color)",activeBackground:"var(--btn-secondary-hover-background)"}},chatFooter:{color:"var(--color-grey-400)",background:"var(--body-background)",borderRadius:{minRem:.75,maxRem:1},boxShadow:"0px -10px 20px 5px color-mix(in srgb, var(--body-background) 90%, transparent)"},chatInput:{color:"var(--color-grey-700)",background:"var(--card-background)",borderRadius:{minRem:.75,maxRem:1},borderColor:"transparent",borderWidth:"3px",hover:{background:"var(--card-hover-background)"},focus:{borderColor:"var(--body-focus-color)"}},chatInputSubmit:{color:"var(--btn-primary-color)",background:"var(--btn-primary-background)",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--btn-primary-hover-color)",background:"var(--btn-primary-hover-background)"},custom:{strokeWidth:"2",deactivatedBackground:"var(--color-grey-500)",deactivatedOpacity:"0.25",deactivatedScale:"0.8",deactivatedBorderColor:"var(--color-grey-500)"}},chatInputNotification:{background:"#dd1313",color:"var(--color-grey-0)",borderColor:"#dd1313",borderWidth:"1px",borderRadius:{minRem:.25,maxRem:.5}},dialog:{background:"var(--card-background)",color:"var(--body-color)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",boxShadow:"var(--box-shadow)",custom:{transitionDuration:200,transitionDelay:0,transitionY:30,backgroundOverlay:"rgba(0, 0, 0, 0.25)",headerBorderBottomColor:"var(--line-color)"}},message:{color:"var(--body-color)",custom:{errorColor:"#C91658",transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:"var(--line-color)",borderWidth:"1px",custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageUser:{color:"var(--card-color)",background:"var(--card-background)",boxShadow:"var(--card-box-shadow)",borderRadius:{minRem:.5,maxRem:.75}},openButton:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-background)",borderWidth:"0",borderRadius:{minRem:.25,maxRem:.5},hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"}},referencesTrigger:{color:"var(--anchor-color)",background:"transparent",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--anchor-hover-color)"}},reference:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"}},referenceNumeral:{color:"var(--anchor-color)"},referenceDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",hover:{color:"var(--pill-default-hover-color)",background:"var(--pill-default-hover-background)"}},referenceNumberTrigger:{color:"var(--btn-secondary-color)",background:"var(--btn-secondary-background)",borderRadius:{minRem:.25,maxRem:.25},hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"}},referenceNumberContent:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"},boxShadow:"var(--box-shadow)",custom:{width:"95cqi",maxWidth:"450px",transitionDuration:200,transitionDelay:200,transitionY:8}},referenceNumberDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",hover:{color:"var(--pill-default-hover-color)",background:"var(--pill-default-hover-background)"}},toast:{background:"var(--card-background)",color:"var(--body-color)",boxShadow:"var(--box-shadow)",custom:{iconSuccessColor:"#22c55e",iconErrorColor:"#ef4444",iconWarningColor:"#f97316",iconInfoColor:"#3b82f6"}},tooltip:{background:"var(--color-grey-200)",color:"var(--body-color)",borderRadius:{minRem:.2,maxRem:.3}}},svgs:{predefinedQuestion:'<svg viewBox="0 0 24 24" ><path d="M11 3.5A10.5 10.5 0 0 0 0.5 14v1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M0.5 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M23.5 3.5A10.5 10.5 0 0 0 13 14v1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M13 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',edit:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m15.9 4.7 3.5 3.5-10.8 10.8-3.5-3.5z"/><path d="m5.1 15.4-1.7 5.3 5.3-1.7-3.5-3.5z"/><path d="m19.3 8.1-3.5-3.5.6-.6c1-1 2.6-.9 3.5 0 .9 1 .9 2.5 0 3.5z"/></g></svg>',newConversation:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m12.6 15.3-4.7 1.6 1.5-4.8 7.6-7.6c.6-.6 1.5-.6 2.1 0l1.1 1.1c.6.6.6 1.5 0 2.1l-7.7 7.7z"/><path d="m12.8 15.1-3.3-3.3"/><path d="m20.2 12.1v7.4c0 .8-.7 1.5-1.5 1.5h-13.8c-.8 0-1.5-.7-1.5-1.5v-14.5c0-.8.7-1.5 1.5-1.5h8.4"/></g></svg>',voteUp:'<svg viewBox="0 0 24 24"><path d="M0.5 8.372h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M3.5 19.372c7.339 3.726 6.981 3.235 13.265 3.235 2.632 0 3.958 -1.715 4.732 -4.228l0 -0.016 1.907 -6.4 0 -0.012A2 2 0 0 0 21.5 9.372h-4.9a2 2 0 0 1 -1.934 -2.51l0.882 -3.344a1.713 1.713 0 0 0 -3.06 -1.418L7.6 9.025a2 2 0 0 1 -1.634 0.847H3.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',voteDown:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m.5 2.5h2c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1h-2"/><path d="m3.5 15h2.5c.6 0 1.3.3 1.6.8l4.9 6.9c.4.6 1.1.9 1.8.7.9-.2 1.5-1.2 1.2-2.1l-.9-3.3c0-.2 0-.3 0-.5 0-1.1.9-2 2-2h4.9.6c1.1-.3 1.7-1.4 1.3-2.5s-1.9-6.4-1.9-6.4c-.8-2.5-2.1-4.2-4.7-4.2-6.3 0-5.9-.5-13.3 3.2"/></g></svg>',retry:'<svg viewBox="0 0 24 24"><path d="M5.5 18.928A9.5 9.5 0 0 1 17.061 3.956" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m18.5 9.498 0 -4.5 4.5 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m5.5 14.498 0 4.5 -4.5 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M18.5 5.071A9.5 9.5 0 0 1 6.883 20.006" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',message:'<svg viewBox="0 0 24 24"><path d="m12 1.6c-6 0-10.9 4-10.9 9 0 2.5 1.2 4.8 3.2 6.4l-2.3 5.4 6-3.4c1.3.4 2.6.6 3.9.6 6 0 10.9-4 10.9-9s-4.8-9-10.8-9z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',messageLoading:`<svg viewBox="0 0 24 24" width="24" height="24">
|
|
2
|
+
<circle cx="6" cy="23" r="1.75" fill="currentColor">
|
|
3
|
+
<animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0s"/>
|
|
4
|
+
</circle>
|
|
5
|
+
<circle cx="12" cy="23" r="1.75" fill="currentColor">
|
|
6
|
+
<animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0.3s"/>
|
|
7
|
+
</circle>
|
|
8
|
+
<circle cx="18" cy="23" r="1.75" fill="currentColor">
|
|
9
|
+
<animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0.6s"/>
|
|
10
|
+
</circle>
|
|
11
|
+
</svg>`,thread:'<svg viewBox="0 0 24 24"><path d="M9.5 16.5c0 4.288 5 7.5 9.5 5.5l4 1.5 -1.5 -3a4.994 4.994 0 0 0 2 -4c0 -3.154 -3.134 -6 -7 -6s-7 2.846 -7 6Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.4 8.5a5.822 5.822 0 0 0 0.1 -1c0 -3.866 -3.8 -7 -8.5 -7S0.5 3.634 0.5 7.5a6.434 6.434 0 0 0 2.517 4.97L1 16l4.939 -1.976a9.993 9.993 0 0 0 1.561 0.361" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',submit:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m12 1v22"/><path d="m4 9 8-8 8 8"/></g></svg>',abort:'<svg viewBox="0 0 24 24"><g fill="currentColor" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 5h14v14H5z"/></g></svg>',expand:'<svg viewBox="0 0 24 24"><path d="m22 7-10 10-10-10" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',help:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="m9.75 15.63v-.33c0-1.13.11-2.03.3-2.7.2-.67.49-1.21.87-1.62s.84-.79 1.38-1.12c.4-.26.76-.52 1.08-.8s.57-.58.76-.92.28-.72.28-1.14c0-.44-.11-.83-.32-1.17-.21-.33-.5-.59-.86-.77s-.75-.27-1.19-.27-.82.09-1.2.28c-.38.18-.68.45-.92.81-.24.35-.37.8-.39 1.32h-3.96c.03-1.29.34-2.35.93-3.19s1.37-1.47 2.34-1.88c.97-.42 2.04-.63 3.22-.63 1.29 0 2.43.21 3.42.64.99.42 1.77 1.03 2.33 1.83s.85 1.76.85 2.89c0 .75-.13 1.42-.38 2.01-.25.58-.59 1.1-1.04 1.55-.45.44-.97.85-1.58 1.21-.51.3-.93.62-1.26.95-.32.33-.57.71-.73 1.14s-.24.96-.24 1.59v.33h-3.68zm1.92 6.18c-.65 0-1.2-.23-1.66-.68-.45-.68-1-.67-1.64 0-.63.22-1.17.67-1.62.46-.45 1.01-.68 1.66-.68s1.16.23 1.62.68c.47.45.7.99.71 1.62 0 .43-.12.81-.34 1.17-.21.35-.5.63-.85.84s-.73.31-1.15.31z"/></svg>',attach:'<svg viewBox="0 0 24 24"><path d="m7.618 15.345 8.666 -8.666a2.039 2.039 0 1 1 2.883 2.883L7.461 21.305a4.078 4.078 0 0 1 -5.767 -5.768L13.928 3.305a5.606 5.606 0 0 1 7.929 7.928L13.192 19.9" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',record:'<svg viewBox="0 0 24 24"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" fill="currentColor"/><path d="M19 10v2a7 7 0 0 1-14 0v-2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 19v4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 23h8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',reward:'<svg viewBox="0 0 24 24"><path d="M23.5 10.5a1 1 0 0 1 -1 1h-21a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h21a1 1 0 0 1 1 1Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M21.5 22.5a1 1 0 0 1 -1 1h-17a1 1 0 0 1 -1 -1v-11h19Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m8.5 7.5 0 16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m15.5 23.5 0 -16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.427 3.84C16.663 4.605 13 5.5 13 5.5s0.9 -3.663 1.66 -4.427a1.957 1.957 0 1 1 2.767 2.767Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M6.573 3.84C7.337 4.605 11 5.5 11 5.5s-0.9 -3.663 -1.66 -4.427A1.957 1.957 0 0 0 6.573 3.84Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',share:'<svg viewBox="0 0 24 24"><g><path d="M14.8 12.56a2.25 2.25 0 0 0 3.27 0.1l4.45 -4.45a3.37 3.37 0 0 0 0 -4.76l-2 -2a3.37 3.37 0 0 0 -4.76 0l-4.42 4.48a2.24 2.24 0 0 0 0.1 3.26" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M9.2 11.44a2.26 2.26 0 0 0 -3.27 -0.1l-4.45 4.45a3.37 3.37 0 0 0 0 4.76l2 2a3.37 3.37 0 0 0 4.76 0l4.45 -4.45a2.25 2.25 0 0 0 -0.1 -3.27" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m7.64 16.36 8.72 -8.72" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></g></svg>',audio:'<svg viewBox="0 0 24 24"><path d="M5.5 9H2a1.5 1.5 0 0 0 -1.5 1.5v3A1.5 1.5 0 0 0 2 15h3.5l6.147 6.146a0.5 0.5 0 0 0 0.853 -0.353V3.207a0.5 0.5 0 0 0 -0.853 -0.353Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M20 4a10.893 10.893 0 0 1 0 16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.5 6a7.535 7.535 0 0 1 0 12" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M15.5 8.5c2.677 1.947 2.669 5.06 0 7" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',copy:'<svg viewBox="0 0 24 24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M16.4999 5.5V1.50049c0 -0.552286 -0.4477 -1.000002 -1 -1.000002H1.49988C0.947593 0.500488 0.499878 0.948203 0.499878 1.50049V15.5005c0 0.5523 0.447715 1 1.000002 1H5.5" stroke-width="1.5"></path><path stroke="currentColor" stroke-linejoin="round" d="M7.4999 8.49951c0 -0.55228 0.44772 -1 1 -1h14c0.5523 0 1 0.44772 1 1V22.4995c0 0.5523 -0.4477 1 -1 1h-14c-0.55228 0 -1 -0.4477 -1 -1V8.49951Z" stroke-width="1.5"></path></svg>',dismiss:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="m5.743 5.742 12.514 12.514"/><path d="m18.257 5.742-12.514 12.514"/></g></svg>',menu:'<svg viewBox="0 0 24 24"><g stroke="currentColor" stroke-linecap="round" stroke-width="1.5"><path d="m4 6h16"/><path d="m4 12h16"/><path d="m4 18h16"/></g></svg>',menuClose:'<svg viewBox="0 0 24 24"><path d="m20 16-8-8-8 8" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/></svg>',externalLink:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m18 6-12 12"/><path d="m18 17v-11h-11"/></g></svg>',internalLink:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m20 12h-17"/><path d="m13 19 7-7-7-7"/></g></svg>',chevronDown:'<svg viewBox="0 0 24 24"><path d="m20 8-8 8-8-8" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/></svg>',liip:'<svg viewBox="0 0 199 72"><path d="m125.352941.70588235 14.588235 7.05882353-32.705882 63.29411762-14.5882352-7.0588235zm-37.6470586 0 14.3529416 7.05882353-32.7058828 63.29411762-14.5882353-7.0588235zm78.8235296 45.17647055v23.0588236h-16.235294v-64.9411765h26.117647c14.588235 0 22.588235 10.3529412 22.588235 20.9411765 0 10.8235294-7.764706 20.9411764-22.588235 20.9411764zm0-27.5294117v13.1764706h9.17647c4.470589 0 7.058824-3.2941177 7.058824-6.5882353 0-3.2941177-2.588235-6.5882353-7.058824-6.5882353zm-166.11764729-14.3529412h16.23529409v50.8235294h27.7647059v14.1176471h-43.99999999z" fill="currentColor" fill-rule="evenodd"/></svg>',avatar:`
|
|
12
|
+
<svg viewBox="0 0 24 24">
|
|
13
|
+
<circle cx="12" cy="12" r="11" fill="var(--avatar-background)"/>
|
|
14
|
+
<g fill="var(--avatar-color)" stroke="none" stroke-linecap="round" stroke-linejoin="round">
|
|
15
|
+
<path d="m14.1 12.5c-3.1 1-4.1 2.2-4.8 5-.7-2.9-1.8-4-4.8-5 3.1-1 4.1-2.2 4.8-5 .7 2.9 1.8 4 4.8 5z" vector-effect="non-scaling-stroke" />
|
|
16
|
+
<path d="m17.9 7.8c-1.7.6-2.3 1.2-2.7 2.8-.4-1.6-1-2.3-2.7-2.8 1.7-.6 2.3-1.2 2.7-2.8.4 1.6 1 2.3 2.7 2.8z" vector-effect="non-scaling-stroke" />
|
|
17
|
+
<path d="m18.2 16.1c-1.3.4-1.7.9-2 2.1-.3-1.2-.7-1.6-2-2.1 1.3-.4 1.7-.9 2-2.1.3 1.2.7 1.6 2 2.1z" vector-effect="non-scaling-stroke" />
|
|
18
|
+
</g>
|
|
19
|
+
</svg>
|
|
20
|
+
`,info:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="m6.7 8.5c-.1-4.2 5.1-6.6 8.2-4 3.3 2.5 2 8.1-2.1 8.9-.6.1-1.1.7-1.1 1.3v2.2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="11.8" cy="20.6" r=".4"/></g></svg>',openChat:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m12 4v17"/><path d="m19 11-7-7-7 7"/></g></svg>',speechInput:`
|
|
21
|
+
<svg width="0" height="0">
|
|
22
|
+
<defs>
|
|
23
|
+
<mask id="microphone-mask" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox">
|
|
24
|
+
<rect width="1" height="1" fill="black" />
|
|
25
|
+
<g
|
|
26
|
+
fill="none"
|
|
27
|
+
stroke="white"
|
|
28
|
+
stroke-width="2"
|
|
29
|
+
stroke-linecap="round"
|
|
30
|
+
stroke-linejoin="round"
|
|
31
|
+
transform="translate(0.1, 0.05) scale(0.035, 0.035)"
|
|
32
|
+
>
|
|
33
|
+
<path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path>
|
|
34
|
+
<path d="M19 10v2a7 7 0 0 1-14 0v-2"></path>
|
|
35
|
+
<path d="M12 19v4"></path>
|
|
36
|
+
<path d="M8 23h8"></path>
|
|
37
|
+
</g>
|
|
38
|
+
</mask>
|
|
39
|
+
</defs>
|
|
40
|
+
</svg>
|
|
41
|
+
`,lightMode:`
|
|
42
|
+
<svg viewBox="0 0 24 24" fill="none">
|
|
43
|
+
<path d="M18.5625 12C18.5625 10.2595 17.8711 8.59032 16.6404 7.35961C15.4097 6.1289 13.7405 5.4375 12 5.4375C10.2595 5.4375 8.59032 6.1289 7.35961 7.35961C6.1289 8.59032 5.4375 10.2595 5.4375 12C5.4375 13.7405 6.1289 15.4097 7.35961 16.6404C8.59032 17.8711 10.2595 18.5625 12 18.5625C13.7405 18.5625 15.4097 17.8711 16.6404 16.6404C17.8711 15.4097 18.5625 13.7405 18.5625 12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
44
|
+
<path d="M12 20.4375V22.3125" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
45
|
+
<path d="M20.4375 12H22.3125" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
46
|
+
<path d="M12 3.5625V1.6875" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
47
|
+
<path d="M3.5625 12H1.6875" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
48
|
+
<path d="M6.03469 17.9663L4.70813 19.2929" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
49
|
+
<path d="M17.9662 17.9663L19.2919 19.2919" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
50
|
+
<path d="M17.9672 6.03461L19.2928 4.70898" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
51
|
+
<path d="M6.03375 6.03461L4.70813 4.70898" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
52
|
+
</svg>
|
|
53
|
+
|
|
54
|
+
`,darkMode:`
|
|
55
|
+
<svg viewBox="0 0 24 24" fill="none">
|
|
56
|
+
<path d="M17.4546 19.3866C19.2134 18.1336 20.4574 16.2846 20.9554 14.1833C20.27 14.9892 19.4098 15.6282 18.4403 16.0517C17.4708 16.4753 16.4176 16.6723 15.3605 16.6277C14.3035 16.5831 13.2706 16.2981 12.3402 15.7944C11.4098 15.2908 10.6065 14.5816 9.99136 13.7209C9.37618 12.8601 8.96532 11.8705 8.78999 10.8272C8.61467 9.78384 8.67951 8.71426 8.97957 7.69974C9.27963 6.68522 9.80703 5.75246 10.5217 4.97235C11.2363 4.19223 12.1194 3.5853 13.1038 3.19768C11.6649 3.0599 10.2141 3.2727 8.87542 3.81787C7.53673 4.36304 6.35002 5.22437 5.41679 6.32817C4.48357 7.43197 3.83159 8.7454 3.51665 10.1561C3.2017 11.5668 3.23314 13.0328 3.6083 14.4287C3.98345 15.8246 4.69115 17.1089 5.67085 18.1717C6.65055 19.2344 7.87311 20.0441 9.23394 20.5313C10.5948 21.0186 12.0534 21.169 13.485 20.9696C14.9166 20.7703 16.2787 20.2271 17.4546 19.3866Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
57
|
+
</svg>
|
|
58
|
+
`}}},et=Ke(Le,{tokens:{components:{body:{background:"var(--color-grey-900)",color:"var(--color-grey-100)",focus:{color:"var(--color-highlight-400)"},custom:{selectionColor:"var(--color-grey-1000)",selectionBackground:"var(--color-brand-400)"}},avatar:{color:"var(--color-brand-200)",background:"var(--color-grey-800)"},anchor:{color:"var(--color-brand-300)",hover:{color:"var(--color-brand-50)"}},line:{color:"color-mix(in srgb, var(--color-brand-100) 20%, transparent)"},btnPrimary:{color:"var(--color-grey-1000)",background:"var(--color-brand-300)",hover:{background:"var(--color-brand-100)"}},btnSecondary:{color:"var(--color-brand-100)",background:"var(--color-brand-900)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-800)"}},btnTertiary:{color:"var(--color-grey-0)",background:"var(--color-grey-800)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-800)"}},card:{color:"var(--body-color)",background:"var(--color-grey-800)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-900)"}},pillDefault:{color:"var(--color-grey-200)",background:"var(--color-grey-600)",boxShadow:"var(--card-box-shadow)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-700)"}},input:{background:"var(--color-grey-900)",borderColor:"var(--color-grey-700)",custom:{placeholderColor:"var(--color-grey-400)"}},label:{color:"var(--color-grey-50)"},contextBox:{custom:{titleColor:"var(--color-grey-50)"}},chatFooter:{color:"var(--color-grey-500)"},chatInput:{color:"var(--color-grey-100)"},chatInputSubmit:{custom:{deactivatedBackground:"var(--color-grey-400)",deactivatedBorderColor:"var(--color-grey-400)"}},dialog:{custom:{backgroundOverlay:"rgba(0, 0, 0, 0.5)"}},tooltip:{background:"var(--color-grey-1000)"}}}}),ne={fineGrained:{light:Le,dark:et}},tt=Object.freeze(Object.defineProperty({__proto__:null,theme:ne},Symbol.toStringTag,{value:"Module"})),ge=structuredClone(ne.fineGrained.light);ge.tokens.colors={brand:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},highlight:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},grey:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923",1e3:"#000000"}};const ze=structuredClone(ne.fineGrained.dark);ze.tokens.colors=ge.tokens.colors;const rt={fineGrained:{light:ge,dark:ze}},at=Object.freeze(Object.defineProperty({__proto__:null,theme:rt},Symbol.toStringTag,{value:"Module"}));var x;(function(a){a.assertEqual=n=>{};function e(n){}a.assertIs=e;function t(n){throw new Error}a.assertNever=t,a.arrayToEnum=n=>{const o={};for(const s of n)o[s]=s;return o},a.getValidEnumValues=n=>{const o=a.objectKeys(n).filter(i=>typeof n[n[i]]!="number"),s={};for(const i of o)s[i]=n[i];return a.objectValues(s)},a.objectValues=n=>a.objectKeys(n).map(function(o){return n[o]}),a.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const o=[];for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&o.push(s);return o},a.find=(n,o)=>{for(const s of n)if(o(s))return s},a.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,o=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}a.joinValues=r,a.jsonStringifyReplacer=(n,o)=>typeof o=="bigint"?o.toString():o})(x||(x={}));var we;(function(a){a.mergeShapes=(e,t)=>({...e,...t})})(we||(we={}));const l=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),E=a=>{switch(typeof a){case"undefined":return l.undefined;case"string":return l.string;case"number":return Number.isNaN(a)?l.nan:l.number;case"boolean":return l.boolean;case"function":return l.function;case"bigint":return l.bigint;case"symbol":return l.symbol;case"object":return Array.isArray(a)?l.array:a===null?l.null:a.then&&typeof a.then=="function"&&a.catch&&typeof a.catch=="function"?l.promise:typeof Map<"u"&&a instanceof Map?l.map:typeof Set<"u"&&a instanceof Set?l.set:typeof Date<"u"&&a instanceof Date?l.date:l.object;default:return l.unknown}},c=x.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Z extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(o){return o.message},r={_errors:[]},n=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)r._errors.push(t(s));else{let i=r,h=0;for(;h<s.path.length;){const f=s.path[h];h===s.path.length-1?(i[f]=i[f]||{_errors:[]},i[f]._errors.push(t(s))):i[f]=i[f]||{_errors:[]},i=i[f],h++}}};return n(this),r}static assert(e){if(!(e instanceof Z))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},r=[];for(const n of this.issues)if(n.path.length>0){const o=n.path[0];t[o]=t[o]||[],t[o].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}Z.create=a=>new Z(a);const ce=(a,e)=>{let t;switch(a.code){case c.invalid_type:a.received===l.undefined?t="Required":t=`Expected ${a.expected}, received ${a.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(a.expected,x.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${x.joinValues(a.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${x.joinValues(a.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${x.joinValues(a.options)}, received '${a.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof a.validation=="object"?"includes"in a.validation?(t=`Invalid input: must include "${a.validation.includes}"`,typeof a.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${a.validation.position}`)):"startsWith"in a.validation?t=`Invalid input: must start with "${a.validation.startsWith}"`:"endsWith"in a.validation?t=`Invalid input: must end with "${a.validation.endsWith}"`:x.assertNever(a.validation):a.validation!=="regex"?t=`Invalid ${a.validation}`:t="Invalid";break;case c.too_small:a.type==="array"?t=`Array must contain ${a.exact?"exactly":a.inclusive?"at least":"more than"} ${a.minimum} element(s)`:a.type==="string"?t=`String must contain ${a.exact?"exactly":a.inclusive?"at least":"over"} ${a.minimum} character(s)`:a.type==="number"?t=`Number must be ${a.exact?"exactly equal to ":a.inclusive?"greater than or equal to ":"greater than "}${a.minimum}`:a.type==="bigint"?t=`Number must be ${a.exact?"exactly equal to ":a.inclusive?"greater than or equal to ":"greater than "}${a.minimum}`:a.type==="date"?t=`Date must be ${a.exact?"exactly equal to ":a.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(a.minimum))}`:t="Invalid input";break;case c.too_big:a.type==="array"?t=`Array must contain ${a.exact?"exactly":a.inclusive?"at most":"less than"} ${a.maximum} element(s)`:a.type==="string"?t=`String must contain ${a.exact?"exactly":a.inclusive?"at most":"under"} ${a.maximum} character(s)`:a.type==="number"?t=`Number must be ${a.exact?"exactly":a.inclusive?"less than or equal to":"less than"} ${a.maximum}`:a.type==="bigint"?t=`BigInt must be ${a.exact?"exactly":a.inclusive?"less than or equal to":"less than"} ${a.maximum}`:a.type==="date"?t=`Date must be ${a.exact?"exactly":a.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(a.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${a.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,x.assertNever(a)}return{message:t}};let nt=ce;function ot(){return nt}const st=a=>{const{data:e,path:t,errorMaps:r,issueData:n}=a,o=[...t,...n.path||[]],s={...n,path:o};if(n.message!==void 0)return{...n,path:o,message:n.message};let i="";const h=r.filter(f=>!!f).slice().reverse();for(const f of h)i=f(s,{data:e,defaultError:i}).message;return{...n,path:o,message:i}};function d(a,e){const t=ot(),r=st({issueData:e,data:a.data,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,t,t===ce?void 0:ce].filter(n=>!!n)});a.common.issues.push(r)}class T{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if(n.status==="aborted")return v;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const o=await n.key,s=await n.value;r.push({key:o,value:s})}return T.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:o,value:s}=n;if(o.status==="aborted"||s.status==="aborted")return v;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(r[o.value]=s.value)}return{status:e.value,value:r}}}const v=Object.freeze({status:"aborted"}),q=a=>({status:"dirty",value:a}),O=a=>({status:"valid",value:a}),Ce=a=>a.status==="aborted",je=a=>a.status==="dirty",P=a=>a.status==="valid",Q=a=>typeof Promise<"u"&&a instanceof Promise;var u;(function(a){a.errToObj=e=>typeof e=="string"?{message:e}:e||{},a.toString=e=>typeof e=="string"?e:e?.message})(u||(u={}));class N{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Se=(a,e)=>{if(P(e))return{success:!0,data:e.value};if(!a.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Z(a.common.issues);return this._error=t,this._error}}};function y(a){if(!a)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:n}=a;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(s,i)=>{const{message:h}=a;return s.code==="invalid_enum_value"?{message:h??i.defaultError}:typeof i.data>"u"?{message:h??r??i.defaultError}:s.code!=="invalid_type"?{message:i.defaultError}:{message:h??t??i.defaultError}},description:n}}class _{get description(){return this._def.description}_getType(e){return E(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:E(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new T,ctx:{common:e.parent.common,data:e.data,parsedType:E(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Q(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:E(e)},n=this._parseSync({data:e,path:r.path,parent:r});return Se(r,n)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:E(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:t});return P(r)?{value:r.value}:{issues:t.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(r=>P(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:E(e)},n=this._parse({data:e,path:r.path,parent:r}),o=await(Q(n)?n:Promise.resolve(n));return Se(r,o)}refine(e,t){const r=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,o)=>{const s=e(n),i=()=>o.addIssue({code:c.custom,...r(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(h=>h?!0:(i(),!1)):s?!0:(i(),!1)})}refinement(e,t){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new W({schema:this,typeName:m.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return B.create(this,this._def)}nullable(){return F.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return A.create(this)}promise(){return re.create(this,this._def)}or(e){return K.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new W({...y(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new he({...y(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new Rt({typeName:m.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new fe({...y(this._def),innerType:this,catchValue:t,typeName:m.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ye.create(this,e)}readonly(){return pe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const it=/^c[^\s-]{8,}$/i,ct=/^[0-9a-z]+$/,dt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,lt=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ut=/^[a-z0-9_-]{21}$/i,ht=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ft=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,pt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let se;const vt=/^(?:(?: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])$/,gt=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,yt=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,kt=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_t=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,bt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ve="((\\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])))",xt=new RegExp(`^${Ve}$`);function Pe(a){let e="[0-5]\\d";a.precision?e=`${e}\\.\\d{${a.precision}}`:a.precision==null&&(e=`${e}(\\.\\d+)?`);const t=a.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function wt(a){return new RegExp(`^${Pe(a)}$`)}function Ct(a){let e=`${Ve}T${Pe(a)}`;const t=[];return t.push(a.local?"Z?":"Z"),a.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function jt(a,e){return!!((e==="v4"||!e)&&vt.test(a)||(e==="v6"||!e)&&yt.test(a))}function St(a,e){if(!ht.test(a))return!1;try{const[t]=a.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(r));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function Tt(a,e){return!!((e==="v4"||!e)&>.test(a)||(e==="v6"||!e)&&kt.test(a))}class M extends _{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==l.string){const o=this._getOrReturnCtx(e);return d(o,{code:c.invalid_type,expected:l.string,received:o.parsedType}),v}const r=new T;let n;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")e.data.length>o.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const s=e.data.length>o.value,i=e.data.length<o.value;(s||i)&&(n=this._getOrReturnCtx(e,n),s?d(n,{code:c.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&d(n,{code:c.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")pt.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"email",code:c.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")se||(se=new RegExp(mt,"u")),se.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"emoji",code:c.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")lt.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"uuid",code:c.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")ut.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"nanoid",code:c.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")it.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"cuid",code:c.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")ct.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"cuid2",code:c.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")dt.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"ulid",code:c.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),d(n,{validation:"url",code:c.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"regex",code:c.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?Ct(o).test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?xt.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?wt(o).test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?ft.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"duration",code:c.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?jt(e.data,o.version)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"ip",code:c.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?St(e.data,o.alg)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"jwt",code:c.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?Tt(e.data,o.version)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"cidr",code:c.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?_t.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"base64",code:c.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?bt.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"base64url",code:c.invalid_string,message:o.message}),r.dirty()):x.assertNever(o);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(n=>e.test(n),{validation:t,code:c.invalid_string,...u.errToObj(r)})}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...u.errToObj(e)})}url(e){return this._addCheck({kind:"url",...u.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...u.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...u.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...u.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...u.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...u.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...u.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...u.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...u.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...u.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...u.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...u.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...u.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...u.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...u.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...u.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...u.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...u.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...u.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...u.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...u.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...u.errToObj(t)})}nonempty(e){return this.min(1,u.errToObj(e))}trim(){return new M({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new M({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new M({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}M.create=a=>new M({checks:[],typeName:m.ZodString,coerce:a?.coerce??!1,...y(a)});function Ot(a,e){const t=(a.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,n=t>r?t:r,o=Number.parseInt(a.toFixed(n).replace(".","")),s=Number.parseInt(e.toFixed(n).replace(".",""));return o%s/10**n}class D extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==l.number){const o=this._getOrReturnCtx(e);return d(o,{code:c.invalid_type,expected:l.number,received:o.parsedType}),v}let r;const n=new T;for(const o of this._def.checks)o.kind==="int"?x.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_type,expected:"integer",received:"float",message:o.message}),n.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="multipleOf"?Ot(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_finite,message:o.message}),n.dirty()):x.assertNever(o);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,u.toString(t))}gt(e,t){return this.setLimit("min",e,!1,u.toString(t))}lte(e,t){return this.setLimit("max",e,!0,u.toString(t))}lt(e,t){return this.setLimit("max",e,!1,u.toString(t))}setLimit(e,t,r,n){return new D({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:u.toString(n)}]})}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:u.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:u.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:u.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:u.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:u.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}D.create=a=>new D({checks:[],typeName:m.ZodNumber,coerce:a?.coerce||!1,...y(a)});class H extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==l.bigint)return this._getInvalidInput(e);let r;const n=new T;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):x.assertNever(o);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:l.bigint,received:t.parsedType}),v}gte(e,t){return this.setLimit("min",e,!0,u.toString(t))}gt(e,t){return this.setLimit("min",e,!1,u.toString(t))}lte(e,t){return this.setLimit("max",e,!0,u.toString(t))}lt(e,t){return this.setLimit("max",e,!1,u.toString(t))}setLimit(e,t,r,n){return new H({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:u.toString(n)}]})}_addCheck(e){return new H({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:u.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}H.create=a=>new H({checks:[],typeName:m.ZodBigInt,coerce:a?.coerce??!1,...y(a)});class de extends _{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==l.boolean){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:l.boolean,received:r.parsedType}),v}return O(e.data)}}de.create=a=>new de({typeName:m.ZodBoolean,coerce:a?.coerce||!1,...y(a)});class X extends _{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==l.date){const o=this._getOrReturnCtx(e);return d(o,{code:c.invalid_type,expected:l.date,received:o.parsedType}),v}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return d(o,{code:c.invalid_date}),v}const r=new T;let n;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):x.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:u.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:u.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}X.create=a=>new X({checks:[],coerce:a?.coerce||!1,typeName:m.ZodDate,...y(a)});class Te extends _{_parse(e){if(this._getType(e)!==l.symbol){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:l.symbol,received:r.parsedType}),v}return O(e.data)}}Te.create=a=>new Te({typeName:m.ZodSymbol,...y(a)});class Oe extends _{_parse(e){if(this._getType(e)!==l.undefined){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:l.undefined,received:r.parsedType}),v}return O(e.data)}}Oe.create=a=>new Oe({typeName:m.ZodUndefined,...y(a)});class Re extends _{_parse(e){if(this._getType(e)!==l.null){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:l.null,received:r.parsedType}),v}return O(e.data)}}Re.create=a=>new Re({typeName:m.ZodNull,...y(a)});class Ae extends _{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}Ae.create=a=>new Ae({typeName:m.ZodAny,...y(a)});class Ne extends _{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}Ne.create=a=>new Ne({typeName:m.ZodUnknown,...y(a)});class $ extends _{_parse(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:l.never,received:t.parsedType}),v}}$.create=a=>new $({typeName:m.ZodNever,...y(a)});class Me extends _{_parse(e){if(this._getType(e)!==l.undefined){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:l.void,received:r.parsedType}),v}return O(e.data)}}Me.create=a=>new Me({typeName:m.ZodVoid,...y(a)});class A extends _{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==l.array)return d(t,{code:c.invalid_type,expected:l.array,received:t.parsedType}),v;if(n.exactLength!==null){const s=t.data.length>n.exactLength.value,i=t.data.length<n.exactLength.value;(s||i)&&(d(t,{code:s?c.too_big:c.too_small,minimum:i?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(d(t,{code:c.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(d(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((s,i)=>n.type._parseAsync(new N(t,s,t.path,i)))).then(s=>T.mergeArray(r,s));const o=[...t.data].map((s,i)=>n.type._parseSync(new N(t,s,t.path,i)));return T.mergeArray(r,o)}get element(){return this._def.type}min(e,t){return new A({...this._def,minLength:{value:e,message:u.toString(t)}})}max(e,t){return new A({...this._def,maxLength:{value:e,message:u.toString(t)}})}length(e,t){return new A({...this._def,exactLength:{value:e,message:u.toString(t)}})}nonempty(e){return this.min(1,e)}}A.create=(a,e)=>new A({type:a,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...y(e)});function V(a){if(a instanceof C){const e={};for(const t in a.shape){const r=a.shape[t];e[t]=B.create(V(r))}return new C({...a._def,shape:()=>e})}else return a instanceof A?new A({...a._def,type:V(a.element)}):a instanceof B?B.create(V(a.unwrap())):a instanceof F?F.create(V(a.unwrap())):a instanceof L?L.create(a.items.map(e=>V(e))):a}class C extends _{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=x.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==l.object){const f=this._getOrReturnCtx(e);return d(f,{code:c.invalid_type,expected:l.object,received:f.parsedType}),v}const{status:r,ctx:n}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),i=[];if(!(this._def.catchall instanceof $&&this._def.unknownKeys==="strip"))for(const f in n.data)s.includes(f)||i.push(f);const h=[];for(const f of s){const b=o[f],I=n.data[f];h.push({key:{status:"valid",value:f},value:b._parse(new N(n,I,n.path,f)),alwaysSet:f in n.data})}if(this._def.catchall instanceof $){const f=this._def.unknownKeys;if(f==="passthrough")for(const b of i)h.push({key:{status:"valid",value:b},value:{status:"valid",value:n.data[b]}});else if(f==="strict")i.length>0&&(d(n,{code:c.unrecognized_keys,keys:i}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const b of i){const I=n.data[b];h.push({key:{status:"valid",value:b},value:f._parse(new N(n,I,n.path,b)),alwaysSet:b in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const f=[];for(const b of h){const I=await b.key,G=await b.value;f.push({key:I,value:G,alwaysSet:b.alwaysSet})}return f}).then(f=>T.mergeObjectSync(r,f)):T.mergeObjectSync(r,h)}get shape(){return this._def.shape()}strict(e){return u.errToObj,new C({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{const n=this._def.errorMap?.(t,r).message??r.defaultError;return t.code==="unrecognized_keys"?{message:u.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new C({...this._def,unknownKeys:"strip"})}passthrough(){return new C({...this._def,unknownKeys:"passthrough"})}extend(e){return new C({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new C({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new C({...this._def,catchall:e})}pick(e){const t={};for(const r of x.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new C({...this._def,shape:()=>t})}omit(e){const t={};for(const r of x.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new C({...this._def,shape:()=>t})}deepPartial(){return V(this)}partial(e){const t={};for(const r of x.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new C({...this._def,shape:()=>t})}required(e){const t={};for(const r of x.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof B;)o=o._def.innerType;t[r]=o}return new C({...this._def,shape:()=>t})}keyof(){return De(x.objectKeys(this.shape))}}C.create=(a,e)=>new C({shape:()=>a,unknownKeys:"strip",catchall:$.create(),typeName:m.ZodObject,...y(e)});C.strictCreate=(a,e)=>new C({shape:()=>a,unknownKeys:"strict",catchall:$.create(),typeName:m.ZodObject,...y(e)});C.lazycreate=(a,e)=>new C({shape:a,unknownKeys:"strip",catchall:$.create(),typeName:m.ZodObject,...y(e)});class K extends _{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function n(o){for(const i of o)if(i.result.status==="valid")return i.result;for(const i of o)if(i.result.status==="dirty")return t.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(i=>new Z(i.ctx.common.issues));return d(t,{code:c.invalid_union,unionErrors:s}),v}if(t.common.async)return Promise.all(r.map(async o=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await o._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(n);{let o;const s=[];for(const h of r){const f={...t,common:{...t.common,issues:[]},parent:null},b=h._parseSync({data:t.data,path:t.path,parent:f});if(b.status==="valid")return b;b.status==="dirty"&&!o&&(o={result:b,ctx:f}),f.common.issues.length&&s.push(f.common.issues)}if(o)return t.common.issues.push(...o.ctx.common.issues),o.result;const i=s.map(h=>new Z(h));return d(t,{code:c.invalid_union,unionErrors:i}),v}}get options(){return this._def.options}}K.create=(a,e)=>new K({options:a,typeName:m.ZodUnion,...y(e)});function le(a,e){const t=E(a),r=E(e);if(a===e)return{valid:!0,data:a};if(t===l.object&&r===l.object){const n=x.objectKeys(e),o=x.objectKeys(a).filter(i=>n.indexOf(i)!==-1),s={...a,...e};for(const i of o){const h=le(a[i],e[i]);if(!h.valid)return{valid:!1};s[i]=h.data}return{valid:!0,data:s}}else if(t===l.array&&r===l.array){if(a.length!==e.length)return{valid:!1};const n=[];for(let o=0;o<a.length;o++){const s=a[o],i=e[o],h=le(s,i);if(!h.valid)return{valid:!1};n.push(h.data)}return{valid:!0,data:n}}else return t===l.date&&r===l.date&&+a==+e?{valid:!0,data:a}:{valid:!1}}class ee extends _{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=(o,s)=>{if(Ce(o)||Ce(s))return v;const i=le(o.value,s.value);return i.valid?((je(o)||je(s))&&t.dirty(),{status:t.value,value:i.data}):(d(r,{code:c.invalid_intersection_types}),v)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,s])=>n(o,s)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ee.create=(a,e,t)=>new ee({left:a,right:e,typeName:m.ZodIntersection,...y(t)});class L extends _{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==l.array)return d(r,{code:c.invalid_type,expected:l.array,received:r.parsedType}),v;if(r.data.length<this._def.items.length)return d(r,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),v;!this._def.rest&&r.data.length>this._def.items.length&&(d(r,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const o=[...r.data].map((s,i)=>{const h=this._def.items[i]||this._def.rest;return h?h._parse(new N(r,s,r.path,i)):null}).filter(s=>!!s);return r.common.async?Promise.all(o).then(s=>T.mergeArray(t,s)):T.mergeArray(t,o)}get items(){return this._def.items}rest(e){return new L({...this._def,rest:e})}}L.create=(a,e)=>{if(!Array.isArray(a))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new L({items:a,typeName:m.ZodTuple,rest:null,...y(e)})};class te extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==l.object)return d(r,{code:c.invalid_type,expected:l.object,received:r.parsedType}),v;const n=[],o=this._def.keyType,s=this._def.valueType;for(const i in r.data)n.push({key:o._parse(new N(r,i,r.path,i)),value:s._parse(new N(r,r.data[i],r.path,i)),alwaysSet:i in r.data});return r.common.async?T.mergeObjectAsync(t,n):T.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof _?new te({keyType:e,valueType:t,typeName:m.ZodRecord,...y(r)}):new te({keyType:M.create(),valueType:e,typeName:m.ZodRecord,...y(t)})}}class Ze extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==l.map)return d(r,{code:c.invalid_type,expected:l.map,received:r.parsedType}),v;const n=this._def.keyType,o=this._def.valueType,s=[...r.data.entries()].map(([i,h],f)=>({key:n._parse(new N(r,i,r.path,[f,"key"])),value:o._parse(new N(r,h,r.path,[f,"value"]))}));if(r.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const h of s){const f=await h.key,b=await h.value;if(f.status==="aborted"||b.status==="aborted")return v;(f.status==="dirty"||b.status==="dirty")&&t.dirty(),i.set(f.value,b.value)}return{status:t.value,value:i}})}else{const i=new Map;for(const h of s){const f=h.key,b=h.value;if(f.status==="aborted"||b.status==="aborted")return v;(f.status==="dirty"||b.status==="dirty")&&t.dirty(),i.set(f.value,b.value)}return{status:t.value,value:i}}}}Ze.create=(a,e,t)=>new Ze({valueType:e,keyType:a,typeName:m.ZodMap,...y(t)});class Y extends _{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==l.set)return d(r,{code:c.invalid_type,expected:l.set,received:r.parsedType}),v;const n=this._def;n.minSize!==null&&r.data.size<n.minSize.value&&(d(r,{code:c.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&r.data.size>n.maxSize.value&&(d(r,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const o=this._def.valueType;function s(h){const f=new Set;for(const b of h){if(b.status==="aborted")return v;b.status==="dirty"&&t.dirty(),f.add(b.value)}return{status:t.value,value:f}}const i=[...r.data.values()].map((h,f)=>o._parse(new N(r,h,r.path,f)));return r.common.async?Promise.all(i).then(h=>s(h)):s(i)}min(e,t){return new Y({...this._def,minSize:{value:e,message:u.toString(t)}})}max(e,t){return new Y({...this._def,maxSize:{value:e,message:u.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Y.create=(a,e)=>new Y({valueType:a,minSize:null,maxSize:null,typeName:m.ZodSet,...y(e)});class Ie extends _{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Ie.create=(a,e)=>new Ie({getter:a,typeName:m.ZodLazy,...y(e)});class ue extends _{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return d(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),v}return{status:"valid",value:e.data}}get value(){return this._def.value}}ue.create=(a,e)=>new ue({value:a,typeName:m.ZodLiteral,...y(e)});function De(a,e){return new U({values:a,typeName:m.ZodEnum,...y(e)})}class U extends _{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return d(t,{expected:x.joinValues(r),received:t.parsedType,code:c.invalid_type}),v}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return d(t,{received:t.data,code:c.invalid_enum_value,options:r}),v}return O(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return U.create(e,{...this._def,...t})}exclude(e,t=this._def){return U.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}U.create=De;class Ee extends _{_parse(e){const t=x.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==l.string&&r.parsedType!==l.number){const n=x.objectValues(t);return d(r,{expected:x.joinValues(n),received:r.parsedType,code:c.invalid_type}),v}if(this._cache||(this._cache=new Set(x.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=x.objectValues(t);return d(r,{received:r.data,code:c.invalid_enum_value,options:n}),v}return O(e.data)}get enum(){return this._def.values}}Ee.create=(a,e)=>new Ee({values:a,typeName:m.ZodNativeEnum,...y(e)});class re extends _{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==l.promise&&t.common.async===!1)return d(t,{code:c.invalid_type,expected:l.promise,received:t.parsedType}),v;const r=t.parsedType===l.promise?t.data:Promise.resolve(t.data);return O(r.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}re.create=(a,e)=>new re({type:a,typeName:m.ZodPromise,...y(e)});class W extends _{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,o={addIssue:s=>{d(r,s),s.fatal?t.abort():t.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),n.type==="preprocess"){const s=n.transform(r.data,o);if(r.common.async)return Promise.resolve(s).then(async i=>{if(t.value==="aborted")return v;const h=await this._def.schema._parseAsync({data:i,path:r.path,parent:r});return h.status==="aborted"?v:h.status==="dirty"||t.value==="dirty"?q(h.value):h});{if(t.value==="aborted")return v;const i=this._def.schema._parseSync({data:s,path:r.path,parent:r});return i.status==="aborted"?v:i.status==="dirty"||t.value==="dirty"?q(i.value):i}}if(n.type==="refinement"){const s=i=>{const h=n.refinement(i,o);if(r.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?v:(i.status==="dirty"&&t.dirty(),s(i.value),{status:t.value,value:i.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>i.status==="aborted"?v:(i.status==="dirty"&&t.dirty(),s(i.value).then(()=>({status:t.value,value:i.value}))))}if(n.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!P(s))return v;const i=n.transform(s.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>P(s)?Promise.resolve(n.transform(s.value,o)).then(i=>({status:t.value,value:i})):v);x.assertNever(n)}}W.create=(a,e,t)=>new W({schema:a,typeName:m.ZodEffects,effect:e,...y(t)});W.createWithPreprocess=(a,e,t)=>new W({schema:e,effect:{type:"preprocess",transform:a},typeName:m.ZodEffects,...y(t)});class B extends _{_parse(e){return this._getType(e)===l.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}B.create=(a,e)=>new B({innerType:a,typeName:m.ZodOptional,...y(e)});class F extends _{_parse(e){return this._getType(e)===l.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}F.create=(a,e)=>new F({innerType:a,typeName:m.ZodNullable,...y(e)});class he extends _{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===l.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}he.create=(a,e)=>new he({innerType:a,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class fe extends _{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Q(n)?n.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Z(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Z(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}fe.create=(a,e)=>new fe({innerType:a,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class Be extends _{_parse(e){if(this._getType(e)!==l.nan){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:l.nan,received:r.parsedType}),v}return{status:"valid",value:e.data}}}Be.create=a=>new Be({typeName:m.ZodNaN,...y(a)});class Rt extends _{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ye extends _{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?v:o.status==="dirty"?(t.dirty(),q(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?v:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new ye({in:e,out:t,typeName:m.ZodPipeline})}}class pe extends _{_parse(e){const t=this._def.innerType._parse(e),r=n=>(P(n)&&(n.value=Object.freeze(n.value)),n);return Q(t)?t.then(n=>r(n)):r(t)}unwrap(){return this._def.innerType}}pe.create=(a,e)=>new pe({innerType:a,typeName:m.ZodReadonly,...y(e)});var m;(function(a){a.ZodString="ZodString",a.ZodNumber="ZodNumber",a.ZodNaN="ZodNaN",a.ZodBigInt="ZodBigInt",a.ZodBoolean="ZodBoolean",a.ZodDate="ZodDate",a.ZodSymbol="ZodSymbol",a.ZodUndefined="ZodUndefined",a.ZodNull="ZodNull",a.ZodAny="ZodAny",a.ZodUnknown="ZodUnknown",a.ZodNever="ZodNever",a.ZodVoid="ZodVoid",a.ZodArray="ZodArray",a.ZodObject="ZodObject",a.ZodUnion="ZodUnion",a.ZodDiscriminatedUnion="ZodDiscriminatedUnion",a.ZodIntersection="ZodIntersection",a.ZodTuple="ZodTuple",a.ZodRecord="ZodRecord",a.ZodMap="ZodMap",a.ZodSet="ZodSet",a.ZodFunction="ZodFunction",a.ZodLazy="ZodLazy",a.ZodLiteral="ZodLiteral",a.ZodEnum="ZodEnum",a.ZodEffects="ZodEffects",a.ZodNativeEnum="ZodNativeEnum",a.ZodOptional="ZodOptional",a.ZodNullable="ZodNullable",a.ZodDefault="ZodDefault",a.ZodCatch="ZodCatch",a.ZodPromise="ZodPromise",a.ZodBranded="ZodBranded",a.ZodPipeline="ZodPipeline",a.ZodReadonly="ZodReadonly"})(m||(m={}));const p=M.create,me=D.create,Dt=de.create;$.create;const At=A.create,S=C.create,ke=K.create;ee.create;L.create;const _e=te.create,Ut=ue.create,Ue=U.create;re.create;B.create;F.create;const ve=S({minRem:me(),maxRem:me()}),J=S({0:p().optional(),50:p(),100:p(),200:p(),300:p(),400:p(),500:p(),600:p(),700:p(),800:p(),900:p(),950:p(),1e3:p().optional()}),ie=S({color:p().optional(),background:p().optional(),borderWidth:p().optional(),borderColor:p().optional(),boxShadow:p().optional()}),Nt=S({borderRadius:ve.optional(),custom:_e(p(),ke([p(),me()])).optional(),hover:ie.optional(),focus:ie.optional()}).and(ie),Mt=S({family:p()}),Zt=_e(Ue(["predefinedQuestion","edit","newConversation","voteUp","voteDown","retry","message","messageLoading","thread","submit","abort","expand","help","attach","record","reward","share","audio","copy","dismiss","menu","info","menuClose","chevronDown","internalLink","externalLink","liip","avatar","openChat","speechInput","lightMode","darkMode"]),p()),It=S({font:Mt,colors:S({brand:J,accent:J.optional(),highlight:J,grey:J}),components:_e(p(),Nt),svgs:Zt}),ae=S({customCSS:p().optional(),fontCSS:p().optional(),fontURLs:p().array().optional(),tokens:It});S({light:ae,dark:ae});const Et=S({light:ae,dark:ae}).deepPartial(),We=S({50:p(),100:p(),200:p(),300:p(),400:p(),500:p(),600:p(),700:p(),800:p(),900:p(),950:p()}),Fe=Ue(["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]),$e=ke([We,Fe]),Bt=ke([We.and(S({0:p(),1e3:p()})),Fe]),$t=S({avatarImageUrl:p().optional(),colors:S({brand:$e.optional(),highlight:$e.optional(),grey:Bt.optional(),background:p().optional(),text:p().optional(),anchor:S({default:p().optional(),hover:p().optional()}).optional()}).optional(),font:S({size:ve.optional(),family:p().optional(),urls:At(p()).optional()}).optional(),borderRadius:ve.optional(),fineGrained:Et.optional()}),Lt=a=>a.split("/").pop().split(".")[0],zt=Object.assign({"./default/fallback-dev.theme.ts":at,"./default/fallback.theme.ts":tt}),be=new Map;Object.entries(zt).forEach(([a,e])=>{const{error:t,data:r}=$t.safeParse(e?.theme);if(t){console.error(`Invalid theme in ${a}:`,t);return}be.set(Lt(a),r)});const Wt=a=>{const e=be.get(a);return e||(console.error(`Theme ${a} not found`),ne)};Array.from(be.keys());export{Vt as P,At as a,Dt as b,ne as c,Ke as d,Ue as e,Lt as f,Je as g,Wt as h,Pt as i,Ut as l,me as n,S as o,_e as r,p as s,$t as t,ke as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as S,N as K,O as Y,L as y,P as B,F as d,Q as M,R as $,S as j,T as x,U as Z,V as q,W as z,X as C,Y as F,Z as R,_ as E,$ as D,a0 as p,a1 as g,a2 as T,a3 as w,a4 as G,a5 as Q,a6 as V,o as W,n as X,a7 as H,a8 as J}from"./DUt8zN7X.js";let v=!1,h=Symbol();function ie(e,r,s){const n=s[r]??={store:null,source:K(void 0),unsubscribe:S};if(n.store!==e&&!(h in s))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=S;else{var u=!0;n.unsubscribe=Y(e,t=>{u?n.source.v=t:y(n.source,t)}),u=!1}return e&&h in s?B(e):d(n.source)}function te(e,r,s){let n=s[r];return n&&n.store!==e&&(n.unsubscribe(),n.unsubscribe=S),e}function fe(){const e={};function r(){M(()=>{for(var s in e)e[s].unsubscribe();$(e,h,{enumerable:!1,value:!0})})}return[e,r]}function k(e){var r=v;try{return v=!1,[e(),v]}finally{v=r}}const ee={get(e,r){if(!e.exclude.includes(r))return e.props[r]},set(e,r){return!1},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function le(e,r,s){return new Proxy({props:e,exclude:r},ee)}const re={get(e,r){if(!e.exclude.includes(r))return d(e.version),r in e.special?e.special[r]():e.props[r]},set(e,r,s){if(!(r in e.special)){var n=x;try{E(e.parent_effect),e.special[r]=se({get[r](){return e.props[r]}},r,D)}finally{E(n)}}return e.special[r](s),R(e.version),!0},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},deleteProperty(e,r){return e.exclude.includes(r)||(e.exclude.push(r),R(e.version)),!0},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function ae(e,r){return new Proxy({props:e,exclude:r,special:{},version:F(0),parent_effect:x},re)}const ne={get(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(p(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n)return n[r]}},set(e,r,s){let n=e.props.length;for(;n--;){let u=e.props[n];p(u)&&(u=u());const t=w(u,r);if(t&&t.set)return t.set(s),!0}return!1},getOwnPropertyDescriptor(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(p(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n){const u=w(n,r);return u&&!u.configurable&&(u.configurable=!0),u}}},has(e,r){if(r===g||r===T)return!1;for(let s of e.props)if(p(s)&&(s=s()),s!=null&&r in s)return!0;return!1},ownKeys(e){const r=[];for(let s of e.props)if(p(s)&&(s=s()),!!s){for(const n in s)r.includes(n)||r.push(n);for(const n of Object.getOwnPropertySymbols(s))r.includes(n)||r.push(n)}return r}};function oe(...e){return new Proxy({props:e},ne)}function se(e,r,s,n){var u=!X||(s&H)!==0,t=(s&V)!==0,A=(s&J)!==0,f=n,b=!0,O=()=>(b&&(b=!1,f=A?W(n):n),f),a;if(t){var L=g in e||T in e;a=w(e,r)?.set??(L&&r in e?i=>e[r]=i:void 0)}var o,m=!1;t?[o,m]=k(()=>e[r]):o=e[r],o===void 0&&n!==void 0&&(o=O(),a&&(u&&G(),a(o)));var l;if(u?l=()=>{var i=e[r];return i===void 0?O():(b=!0,i)}:l=()=>{var i=e[r];return i!==void 0&&(f=void 0),i===void 0?f:i},u&&(s&D)===0)return l;if(a){var N=e.$$legacy;return function(i,_){return arguments.length>0?((!u||!_||N||m)&&a(_?l():i),i):l()}}var P=!1,c=((s&Q)!==0?q:C)(()=>(P=!1,l()));t&&d(c);var U=x;return function(i,_){if(arguments.length>0){const I=_?d(c):u&&t?z(i):i;return y(c,I),P=!0,f!==void 0&&(f=I),i}return j&&P||(U.f&Z)!==0?c.v:d(c)}}export{ie as a,fe as b,te as c,ae as l,se as p,le as r,oe as s};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{o as De,s as mt}from"./D5wkZK_2.js";import{bE as ke,I as T,F as x,L as P}from"./DUt8zN7X.js";class le{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Se{constructor(t,n){this.status=t,this.location=n}}class Re extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function _t(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function yt(e){return e.split("%25").map(decodeURI).join("%25")}function wt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function vt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return f=>(n(f),i[o](f));t();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function bt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}function At(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n.buffer}const Et=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&G.delete(Ie(e)),Et(e,t));const G=new Map;function kt(e,t){const n=Ie(e,t),r=document.querySelector(n);if(r?.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&G.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=At(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function St(e,t,n){if(G.size>0){const r=Ie(e,n),a=G.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);G.delete(r)}}return window.fetch(t,n)}function Ie(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${bt(...a)}"]`}return r}const Rt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function It(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Lt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,f)=>{if(f%2){if(c.startsWith("x+"))return _e(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return _e(String.fromCharCode(...c.slice(2).split("-").map(_=>parseInt(_,16))));const d=Rt.exec(c),[,h,u,l,p]=d;return t.push({name:l,matcher:p,optional:!!h,rest:!!u,chained:u?f===1&&i[0]==="":!1}),u?"(.*?)":h?"([^/]*)?":"([^/]+?)"}return _e(c)}).join("")}).join("")}/?$`),params:t}}function Ut(e){return!/^\([^)]+\)$/.test(e)}function Lt(e){return e.slice(1).split("/").filter(Ut)}function Tt(e,t,n){const r={},a=e.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<t.length;o+=1){const c=t[o];let f=a[o-i];if(c.chained&&c.rest&&i&&(f=a.slice(o-i,o+1).filter(d=>d).join("/"),i=0),f===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](f)){r[c.name]=f;const d=t[o+1],h=a[o+1];d&&!d.rest&&d.optional&&h&&c.chained&&(i=0),!d&&!h&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function xt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,f,d]])=>{const{pattern:h,params:u}=It(o),l={id:o,exec:p=>{const _=h.exec(p);if(_)return Tt(_,u,r)},errors:[1,...d||[]].map(p=>e[p]),layouts:[0,...f||[]].map(i),leaf:s(c)};return l.errors.length=l.layouts.length=Math.max(l.errors.length,l.layouts.length),l});function s(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function Ye(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Fe(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const U=globalThis.__sveltekit_1bcgotw?.base??"/configurator",Pt=globalThis.__sveltekit_1bcgotw?.assets??U,Ct="1756279090573",Je="sveltekit:snapshot",ze="sveltekit:scroll",Xe="sveltekit:states",Ot="sveltekit:pageurl",B="sveltekit:history",Y="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Z=location.origin;function Ue(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function fe(){return{x:pageXOffset,y:pageYOffset}}function F(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Be={...j,"":j.hover};function Ze(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Qe(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Ze(e)}}function ve(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||ue(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=r?.origin===Z&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function te(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=F(o,"preload-code")),a===null&&(a=F(o,"preload-data")),t===null&&(t=F(o,"keepfocus")),n===null&&(n=F(o,"noscroll")),s===null&&(s=F(o,"reload")),i===null&&(i=F(o,"replacestate")),o=Ze(o);function c(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Be[r??"off"],preload_data:Be[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function Ve(e){const t=ke(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const et={v:()=>{}};function Nt(){const{set:e,subscribe:t}=ke(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Pt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Ct;return i&&(e(!0),et.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function ue(e,t,n){return e.origin!==Z||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function vn(e){}function Me(e){const t=$t(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,t.charCodeAt(a));return n}const jt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function $t(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",n=0,r=0;for(let a=0;a<e.length;a++)n<<=6,n|=jt.indexOf(e[a]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const Dt=-1,Ft=-2,Bt=-3,Vt=-4,Mt=-5,qt=-6;function Gt(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===Dt)return;if(s===Bt)return NaN;if(s===Vt)return 1/0;if(s===Mt)return-1/0;if(s===qt)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],f=t?.[c];if(f)return r[s]=f(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const d=new Set;r[s]=d;for(let l=1;l<o.length;l+=1)d.add(a(o[l]));break;case"Map":const h=new Map;r[s]=h;for(let l=1;l<o.length;l+=2)h.set(a(o[l]),a(o[l+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const u=Object.create(null);r[s]=u;for(let l=1;l<o.length;l+=2)u[o[l]]=a(o[l+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const l=globalThis[c],p=o[1],_=Me(p),m=new l(_);r[s]=m;break}case"ArrayBuffer":{const l=o[1],p=Me(l);r[s]=p;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let f=0;f<o.length;f+=1){const d=o[f];d!==Ft&&(c[f]=a(d))}}else{const c={};r[s]=c;for(const f in o){const d=o[f];c[f]=a(d)}}return r[s]}return a(0)}const tt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...tt];const Ht=new Set([...tt]);[...Ht];function Kt(e){return e.filter(t=>t!=null)}const Wt="x-sveltekit-invalidated",Yt="x-sveltekit-trailing-slash";function ne(e){return e instanceof le||e instanceof Re?e.status:500}function Jt(e){return e instanceof Re?e.text:"Internal Error"}let k,J,ye;const zt=De.toString().includes("$$")||/function \w+\(\) \{\}/.test(De.toString());zt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},J={current:null},ye={current:!1}):(k=new class{#e=T({});get data(){return x(this.#e)}set data(t){P(this.#e,t)}#t=T(null);get form(){return x(this.#t)}set form(t){P(this.#t,t)}#n=T(null);get error(){return x(this.#n)}set error(t){P(this.#n,t)}#r=T({});get params(){return x(this.#r)}set params(t){P(this.#r,t)}#a=T({id:null});get route(){return x(this.#a)}set route(t){P(this.#a,t)}#o=T({});get state(){return x(this.#o)}set state(t){P(this.#o,t)}#s=T(-1);get status(){return x(this.#s)}set status(t){P(this.#s,t)}#i=T(new URL("https://example.com"));get url(){return x(this.#i)}set url(t){P(this.#i,t)}},J=new class{#e=T(null);get current(){return x(this.#e)}set current(t){P(this.#e,t)}},ye=new class{#e=T(!1);get current(){return x(this.#e)}set current(t){P(this.#e,t)}},et.v=()=>ye.current=!0);function Xt(e){Object.assign(k,e)}const Zt="/__data.json",Qt=".html__data.json";function en(e){return e.endsWith(".html")?e.replace(/\.html$/,Qt):e.replace(/\/$/,"")+Zt}const{tick:tn}=mt,nn=new Set(["icon","shortcut icon","apple-touch-icon"]),D=Ye(ze)??{},z=Ye(Je)??{},N={url:Ve({}),page:Ve({}),navigating:ke(null),updated:Nt()};function Le(e){D[e]=fe()}function rn(e,t){let n=e+1;for(;D[n];)delete D[n],n+=1;for(n=t+1;z[n];)delete z[n],n+=1}function M(e){return location.href=e.href,new Promise(()=>{})}async function nt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(U||"/");e&&await e.update()}}function qe(){}let Te,be,re,C,Ae,v;const ae=[],oe=[];let O=null;const ee=new Map,rt=new Set,an=new Set,H=new Set;let w={branch:[],error:null,url:null},xe=!1,se=!1,Ge=!0,X=!1,q=!1,at=!1,Pe=!1,ot,A,I,$;const K=new Set;async function kn(e,t,n){document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Te=xt(e),C=document.documentElement,Ae=t,be=e.nodes[0],re=e.nodes[1],be(),re(),A=history.state?.[B],I=history.state?.[Y],A||(A=I=Date.now(),history.replaceState({...history.state,[B]:A,[Y]:I},""));const r=D[A];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await gn(Ae,n)):(await W({type:"enter",url:Ue(v.hash?_n(new URL(location.href)):location.href),replace_state:!0}),a()),pn()}function on(){ae.length=0,Pe=!1}function st(e){oe.some(t=>t?.snapshot)&&(z[e]=oe.map(t=>t?.snapshot?.capture()))}function it(e){z[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function He(){Le(A),Fe(ze,D),st(I),Fe(Je,z)}async function Ce(e,t,n,r){return W({type:"goto",url:Ue(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Pe=!0),t.invalidate&&t.invalidate.forEach(hn)}})}async function sn(e){if(e.id!==O?.id){const t={};K.add(t),O={id:e.id,token:t,promise:ft({...e,preload:t}).then(n=>(K.delete(t),n.type==="loaded"&&n.state.error&&(O=null),n))}}return O.promise}async function we(e){const t=(await he(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}function ct(e,t,n){w=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(k,e.props.page),ot=new v.root({target:t,props:{...e.props,stores:N,components:oe},hydrate:n,sync:!1}),it(I),n){const a={from:null,to:{params:w.params,route:{id:w.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};H.forEach(s=>s(a))}se=!0}function ie({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(U&&(e.pathname===U||e.pathname===U+"/"))o="always";else for(const l of n)l?.slash!==void 0&&(o=l.slash);e.pathname=_t(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:Kt(n).map(l=>l.node.component),page:$e(k)}};i!==void 0&&(c.props.form=i);let f={},d=!k,h=0;for(let l=0;l<Math.max(n.length,w.branch.length);l+=1){const p=n[l],_=w.branch[l];p?.data!==_?.data&&(d=!0),p&&(f={...f,...p.data},d&&(c.props[`data_${h}`]=f),h+=1)}return(!w.url||e.href!==w.url.href||w.error!==a||i!==void 0&&i!==k.form||d)&&(c.props.page={error:a,params:t,route:{id:s?.id??null},state:{},status:r,url:new URL(e),form:i??null,data:d?f:k.data}),c}async function Oe({loader:e,parent:t,url:n,params:r,route:a,server_data_node:s}){let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},f=await e();if(f.universal?.load){let d=function(...u){for(const l of u){const{href:p}=new URL(l,n);c.dependencies.add(p)}};const h={route:new Proxy(a,{get:(u,l)=>(o&&(c.route=!0),u[l])}),params:new Proxy(r,{get:(u,l)=>(o&&c.params.add(l),u[l])}),data:s?.data??null,url:vt(n,()=>{o&&(c.url=!0)},u=>{o&&c.search_params.add(u)},v.hash),async fetch(u,l){u instanceof Request&&(l={body:u.method==="GET"||u.method==="HEAD"?void 0:await u.blob(),cache:u.cache,credentials:u.credentials,headers:[...u.headers].length>0?u?.headers:void 0,integrity:u.integrity,keepalive:u.keepalive,method:u.method,mode:u.mode,redirect:u.redirect,referrer:u.referrer,referrerPolicy:u.referrerPolicy,signal:u.signal,...l});const{resolved:p,promise:_}=lt(u,l,n);return o&&d(p.href),_},setHeaders:()=>{},depends:d,parent(){return o&&(c.parent=!0),t()},untrack(u){o=!1;try{return u()}finally{o=!0}}};i=await f.universal.load.call(null,h)??null}return{node:f,loader:e,server:s,universal:f.universal?.load?{type:"data",data:i,uses:c}:null,data:i??s?.data??null,slash:f.universal?.trailingSlash??s?.slash}}function lt(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=se?St(r,a.href,t):kt(r,t);return{resolved:a,promise:s}}function Ke(e,t,n,r,a,s){if(Pe)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==w.params[i])return!0;for(const i of a.dependencies)if(ae.some(o=>o(new URL(i))))return!0;return!1}function Ne(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function cn(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function We({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:$e(k),constructors:[]}}}async function ft({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if(O?.id===e)return K.delete(O.token),O.promise;const{errors:i,layouts:o,leaf:c}=a,f=[...o,c];i.forEach(g=>g?.().catch(()=>{})),f.forEach(g=>g?.[1]().catch(()=>{}));let d=null;const h=w.url?e!==ce(w.url):!1,u=w.route?a.id!==w.route.id:!1,l=cn(w.url,n);let p=!1;const _=f.map((g,y)=>{const b=w.branch[y],E=!!g?.[0]&&(b?.loader!==g[1]||Ke(p,u,h,l,b.server?.uses,r));return E&&(p=!0),E});if(_.some(Boolean)){try{d=await ht(n,_)}catch(g){const y=await V(g,{url:n,params:r,route:{id:e}});return K.has(s)?We({error:y,url:n,params:r,route:a}):de({status:ne(g),error:y,url:n,route:a})}if(d.type==="redirect")return d}const m=d?.nodes;let R=!1;const S=f.map(async(g,y)=>{if(!g)return;const b=w.branch[y],E=m?.[y];if((!E||E.type==="skip")&&g[1]===b?.loader&&!Ke(R,u,h,l,b.universal?.uses,r))return b;if(R=!0,E?.type==="error")throw E;return Oe({loader:g[1],url:n,params:r,route:a,parent:async()=>{const pe={};for(let ge=0;ge<y;ge+=1)Object.assign(pe,(await S[ge])?.data);return pe},server_data_node:Ne(E===void 0&&g[0]?{type:"skip"}:E??null,g[0]?b?.server:void 0)})});for(const g of S)g.catch(()=>{});const L=[];for(let g=0;g<f.length;g+=1)if(f[g])try{L.push(await S[g])}catch(y){if(y instanceof Se)return{type:"redirect",location:y.location};if(K.has(s))return We({error:await V(y,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=ne(y),E;if(m?.includes(y))b=y.status??b,E=y.error;else if(y instanceof le)E=y.body;else{if(await N.updated.check())return await nt(),await M(n);E=await V(y,{params:r,url:n,route:{id:a.id}})}const Q=await ln(g,L,i);return Q?ie({url:n,params:r,branch:L.slice(0,Q.idx).concat(Q.node),status:b,error:E,route:a}):await dt(n,{id:a.id},E,b)}else L.push(void 0);return ie({url:n,params:r,branch:L,status:200,error:null,route:a,form:t?void 0:null})}async function ln(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function de({status:e,error:t,url:n,route:r}){const a={};let s=null;if(v.server_loads[0]===0)try{const o=await ht(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==Z||n.pathname!==location.pathname||xe)&&await M(n)}try{const o=await Oe({loader:be,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ne(s)}),c={node:await re(),loader:re,universal:null,server:null,data:null};return ie({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof Se)return Ce(new URL(o.location,location.href),{},0);throw o}}async function fn(e){const t=e.href;if(ee.has(t))return ee.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(s,i)=>lt(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);v.hash?s.hash=a:s.pathname=a,a=s}return a})();ee.set(t,r),n=await r}catch{ee.delete(t);return}return n}async function he(e,t){if(e&&!ue(e,U,v.hash)){const n=await fn(e);if(!n)return;const r=un(n);for(const a of Te){const s=a.exec(r);if(s)return{id:ce(e),invalidating:t,route:a,params:wt(s),url:e}}}}function un(e){return yt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(U.length))||"/"}function ce(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ut({url:e,type:t,intent:n,delta:r}){let a=!1;const s=je(w,n,e,t);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return X||rt.forEach(o=>o(i)),a?null:s}async function W({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:f=qe,block:d=qe}){const h=$;$=c;const u=await he(t,!1),l=e==="enter"?je(w,u,t,e):ut({url:t,type:e,delta:n?.delta,intent:u});if(!l){d(),$===c&&($=h);return}const p=A,_=I;f(),X=!0,se&&l.navigation.type!=="enter"&&N.navigating.set(J.current=l.navigation);let m=u&&await ft(u);if(!m){if(ue(t,U,v.hash))return await M(t);m=await dt(t,{id:null},await V(new Re(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404)}if(t=u?.url||t,$!==c)return l.reject(new Error("navigation aborted")),!1;if(m.type==="redirect")if(o>=20)m=await de({status:500,error:await V(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}});else return await Ce(new URL(m.location,t).href,{},o+1,c),!1;else m.props.page.status>=400&&await N.updated.check()&&(await nt(),await M(t));if(on(),Le(p),st(_),m.props.page.url.pathname!==t.pathname&&(t.pathname=m.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,y={[B]:A+=g,[Y]:I+=g,[Xe]:i};(s?history.replaceState:history.pushState).call(history,y,"",t),s||rn(A,I)}if(O=null,m.props.page.state=i,se){w=m.state,m.props.page&&(m.props.page.url=t);const g=(await Promise.all(Array.from(an,y=>y(l.navigation)))).filter(y=>typeof y=="function");if(g.length>0){let y=function(){g.forEach(b=>{H.delete(b)})};g.push(y),g.forEach(b=>{H.add(b)})}ot.$set(m.props),Xt(m.props.page),at=!0}else ct(m,Ae,!1);const{activeElement:R}=document;await tn();const S=n?n.scroll:a?fe():null;if(Ge){const g=t.hash&&document.getElementById(gt(t));S?scrollTo(S.x,S.y):g?g.scrollIntoView():scrollTo(0,0)}const L=document.activeElement!==R&&document.activeElement!==document.body;!r&&!L&&mn(t),Ge=!0,m.props.page&&Object.assign(k,m.props.page),X=!1,e==="popstate"&&it(I),l.fulfil(void 0),H.forEach(g=>g(l.navigation)),N.navigating.set(J.current=null)}async function dt(e,t,n,r){return e.origin===Z&&e.pathname===location.pathname&&!xe?await de({status:r,error:n,url:e,route:t}):await M(e)}function dn(){let e,t,n;C.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(e),e=setTimeout(()=>{s(c,j.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],j.tap)}C.addEventListener("mousedown",r),C.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(we(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(o,c){const f=Qe(o,C),d=f===t&&c>=n;if(!f||d)return;const{url:h,external:u,download:l}=ve(f,U,v.hash);if(u||l)return;const p=te(f),_=h&&ce(w.url)===ce(h);if(!(p.reload||_))if(c<=p.preload_data){t=f,n=j.tap;const m=await he(h,!1);if(!m)return;sn(m)}else c<=p.preload_code&&(t=f,n=c,we(h))}function i(){a.disconnect();for(const o of C.querySelectorAll("a")){const{url:c,external:f,download:d}=ve(o,U,v.hash);if(f||d)continue;const h=te(o);h.reload||(h.preload_code===j.viewport&&a.observe(o),h.preload_code===j.eager&&we(c))}}H.add(i),i()}function V(e,t){if(e instanceof le)return e.body;const n=ne(e),r=Jt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Sn(e,t={}){return e=new URL(Ue(e)),e.origin!==Z?Promise.reject(new Error("goto: invalid URL")):Ce(e,t,0)}function hn(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function pn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(He(),!X){const r=je(w,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};rt.forEach(s=>s(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&He()}),navigator.connection?.saveData||dn(),C.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Qe(t.composedPath()[0],C);if(!n)return;const{url:r,external:a,target:s,download:i}=ve(n,U,v.hash);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const o=te(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||i)return;const[f,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),h=f===me(location);if(a||o.reload&&(!h||!d)){ut({url:r,type:"link"})?X=!0:t.preventDefault();return}if(d!==void 0&&h){const[,u]=w.url.href.split("#");if(u===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const l=n.ownerDocument.getElementById(decodeURIComponent(d));l&&(l.scrollIntoView(),l.focus())}return}if(q=!0,Le(A),e(r),!o.replace_state)return;q=!1}t.preventDefault(),await new Promise(u=>{requestAnimationFrame(()=>{setTimeout(u,0)}),setTimeout(u,100)}),await W({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href})}),C.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const i=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(ue(i,U,!1))return;const o=t.target,c=te(o);if(c.reload)return;t.preventDefault(),t.stopPropagation();const f=new FormData(o),d=r?.getAttribute("name");d&&f.append(d,r?.getAttribute("value")??""),i.search=new URLSearchParams(f).toString(),W({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href})}),addEventListener("popstate",async t=>{if(!Ee){if(t.state?.[B]){const n=t.state[B];if($={},n===A)return;const r=D[n],a=t.state[Xe]??{},s=new URL(t.state[Ot]??location.href),i=t.state[Y],o=w.url?me(location)===me(w.url):!1;if(i===I&&(at||o)){a!==k.state&&(k.state=a),e(s),D[A]=fe(),r&&scrollTo(r.x,r.y),A=n;return}const f=n-A;await W({type:"popstate",url:s,popped:{state:a,scroll:r,delta:f},accept:()=>{A=n,I=i},block:()=>{history.go(-f)},nav_token:$})}else if(!q){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{q&&(q=!1,history.replaceState({...history.state,[B]:++A,[Y]:I},"",location.href))});for(const t of document.querySelectorAll("link"))nn.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&N.navigating.set(J.current=null)});function e(t){w.url=k.url=t,N.page.set($e(k)),N.page.notify()}}async function gn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){xe=!0;const f=new URL(location.href);let d;({params:a={},route:s={id:null}}=await he(f,!1)||{}),d=Te.find(({id:l})=>l===s.id);let h,u=!0;try{const l=r.map(async(_,m)=>{const R=o[m];return R?.uses&&(R.uses=pt(R.uses)),Oe({loader:v.nodes[_],url:f,params:a,route:s,parent:async()=>{const S={};for(let L=0;L<m;L+=1)Object.assign(S,(await l[L]).data);return S},server_data_node:Ne(R)})}),p=await Promise.all(l);if(d){const _=d.layouts;for(let m=0;m<_.length;m++)_[m]||p.splice(m,0,void 0)}h=ie({url:f,params:a,branch:p,status:t,error:n,form:c,route:d??null})}catch(l){if(l instanceof Se){await M(new URL(l.location,location.href));return}h=await de({status:ne(l),error:await V(l,{url:f,params:a,route:s}),url:f,route:s}),e.textContent="",u=!1}h.props.page&&(h.props.page.state={}),ct(h,e,u)}async function ht(e,t){const n=new URL(e);n.pathname=en(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(Yt,"1"),n.searchParams.append(Wt,t.map(s=>s?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let s;throw a.headers.get("content-type")?.includes("application/json")?s=await a.json():a.status===404?s="Not Found":a.status===500&&(s="Internal Error"),new le(a.status,s)}return new Promise(async s=>{const i=new Map,o=a.body.getReader(),c=new TextDecoder;function f(h){return Gt(h,{...v.decoders,Promise:u=>new Promise((l,p)=>{i.set(u,{fulfil:l,reject:p})})})}let d="";for(;;){const{done:h,value:u}=await o.read();if(h&&!d)break;for(d+=!u&&d?`
|
|
2
|
+
`:c.decode(u,{stream:!0});;){const l=d.indexOf(`
|
|
3
|
+
`);if(l===-1)break;const p=JSON.parse(d.slice(0,l));if(d=d.slice(l+1),p.type==="redirect")return s(p);if(p.type==="data")p.nodes?.forEach(_=>{_?.type==="data"&&(_.uses=pt(_.uses),_.data=f(_.data))}),s(p);else if(p.type==="chunk"){const{id:_,data:m,error:R}=p,S=i.get(_);i.delete(_),R?S.reject(f(R)):S.fulfil(f(m))}}}})}function pt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Ee=!1;function mn(e){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const n=gt(e);if(n&&document.getElementById(n)){const{x:a,y:s}=fe();setTimeout(()=>{const i=history.state;Ee=!0,location.replace(`#${n}`),v.hash&&location.replace(e.hash),history.replaceState(i,"",e.hash),scrollTo(a,s),Ee=!1})}else{const a=document.body,s=a.getAttribute("tabindex");a.tabIndex=-1,a.focus({preventScroll:!0,focusVisible:!1}),s!==null?a.setAttribute("tabindex",s):a.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s<r.rangeCount;s+=1)a.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===a.length){for(let s=0;s<r.rangeCount;s+=1){const i=a[s],o=r.getRangeAt(s);if(i.commonAncestorContainer!==o.commonAncestorContainer||i.startContainer!==o.startContainer||i.endContainer!==o.endContainer||i.startOffset!==o.startOffset||i.endOffset!==o.endOffset)return}r.removeAllRanges()}})}}}function je(e,t,n,r){let a,s;const i=new Promise((c,f)=>{a=c,s=f});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function $e(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function _n(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function gt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{kn as a,Sn as g,vn as l,k as p,N as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as d,a9 as m,u,au as i,o as h,av as b,F as g,aw as k,V as v,ax as x}from"./DUt8zN7X.js";import{s as y,p as c}from"./Blpq5ghW.js";function V(r=!1){const t=d,e=t.l.u;if(!e)return;let o=()=>k(t.s);if(r){let a=0,s={};const _=v(()=>{let l=!1;const f=t.s;for(const n in f)f[n]!==s[n]&&(s[n]=f[n],l=!0);return l&&a++,a});o=()=>g(_)}e.b.length&&m(()=>{p(t,o),i(e.b)}),u(()=>{const a=h(()=>e.m.map(b));return()=>{for(const s of a)typeof s=="function"&&s()}}),e.a.length&&u(()=>{p(t,o),i(e.a)})}function p(r,t){if(r.l.s)for(const e of r.l.s)g(e);t()}x();const $={get error(){return c.error},get status(){return c.status},get url(){return c.url}};y.updated.check;const j=$;export{V as i,j as p};
|