@liip/liipgpt 2.0.0 → 2.1.0

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.
Files changed (34) hide show
  1. package/button/liipgpt-button.iife.js +175 -172
  2. package/chat/liipgpt-chat.iife.js +201 -198
  3. package/config/index.cjs +30 -6
  4. package/config/index.d.ts +2591 -185
  5. package/config/index.js +30 -6
  6. package/configurator/_app/env.js +1 -1
  7. package/configurator/_app/immutable/chunks/BnCAkRMw.js +1 -0
  8. package/configurator/_app/immutable/chunks/C1CVfDcA.js +209 -0
  9. package/configurator/_app/immutable/chunks/{Daj9x7sZ.js → C7ucs8kz.js} +1 -1
  10. package/configurator/_app/immutable/chunks/{ChcTJagy.js → DNNNN9KC.js} +2 -2
  11. package/configurator/_app/immutable/chunks/DuQTZe3l.js +1 -0
  12. package/configurator/_app/immutable/chunks/{D-Dn-KSg.js → DwsPRhVz.js} +1 -1
  13. package/configurator/_app/immutable/chunks/{pxprCMm0.js → PdZf4Jij.js} +1 -1
  14. package/configurator/_app/immutable/chunks/dZVw-Q0d.js +228 -0
  15. package/configurator/_app/immutable/chunks/{BtLfsQWl.js → lMON6K8G.js} +1 -1
  16. package/configurator/_app/immutable/entry/{app.B4WSrzpv.js → app.CdFUjOEM.js} +2 -2
  17. package/configurator/_app/immutable/entry/start.CnM-eUb6.js +1 -0
  18. package/configurator/_app/immutable/nodes/{0.B7euNXzq.js → 0.-WsI4DHZ.js} +1 -1
  19. package/configurator/_app/immutable/nodes/{1.C9w5e9w0.js → 1.CbwRpfkr.js} +1 -1
  20. package/configurator/_app/immutable/nodes/2.DbP2H5Hu.js +30 -0
  21. package/configurator/_app/immutable/nodes/{3.BaHVKKga.js → 3.CrU_53hy.js} +8 -8
  22. package/configurator/_app/version.json +1 -1
  23. package/configurator/index.html +6 -6
  24. package/configurator/sidebar.html +6 -6
  25. package/index.cjs +30 -6
  26. package/index.d.ts +4233 -333
  27. package/index.js +30 -6
  28. package/package.json +1 -1
  29. package/configurator/_app/immutable/chunks/BWd1KRA2.js +0 -67
  30. package/configurator/_app/immutable/chunks/CBFTM35p.js +0 -367
  31. package/configurator/_app/immutable/chunks/CP9-4jcs.js +0 -1
  32. package/configurator/_app/immutable/chunks/LjIoA1Wm.js +0 -1
  33. package/configurator/_app/immutable/entry/start.GK6q9XMZ.js +0 -1
  34. package/configurator/_app/immutable/nodes/2.CWOgfthk.js +0 -28
@@ -1,5 +1,5 @@
1
- var LiipGPTButton=function(qr){"use strict";const Go="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Go);const Ho=1,Yo=2,Qo=16,Ko=1,Jo=2,Xo=4,ei=8,ti=16,ri=1,ni=2,Wr="[",cr="[!",Gr="]",it={},q=Symbol(),ai="http://www.w3.org/1999/xhtml",oi="http://www.w3.org/2000/svg",ii="@attach",qn=!1;var ur=Array.isArray,si=Array.prototype.indexOf,Hr=Array.from,dr=Object.keys,yt=Object.defineProperty,Le=Object.getOwnPropertyDescriptor,li=Object.getOwnPropertyDescriptors,ci=Object.prototype,ui=Array.prototype,Wn=Object.getPrototypeOf,Gn=Object.isExtensible;function Vt(t){return typeof t=="function"}const fr=()=>{};function Hn(t){return typeof t?.then=="function"}function Yn(t){for(var e=0;e<t.length;e++)t[e]()}function di(){var t,e,r=new Promise((n,a)=>{t=n,e=a});return{promise:r,resolve:t,reject:e}}const le=2,Yr=4,Qr=8,Ut=16,Pe=32,st=64,Kr=128,ce=256,hr=512,H=1024,ue=2048,lt=4096,ke=8192,ct=16384,Jr=32768,wt=65536,Qn=1<<17,Kn=1<<18,pr=1<<19,Jn=1<<20,Xr=1<<21,en=1<<22,ut=1<<23,Ge=Symbol("$state"),tn=Symbol("legacy props"),fi=Symbol(""),rn=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},hi=1,pi=3,dt=8;function vi(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function mi(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function gi(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function bi(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function _i(t){throw new Error("https://svelte.dev/e/effect_orphan")}function ki(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function yi(){throw new Error("https://svelte.dev/e/hydration_failed")}function wi(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function xi(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ci(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ri(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function qt(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function Si(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}let E=!1;function J(t){E=t}let I;function X(t){if(t===null)throw qt(),it;return I=t}function Ce(){return X(fe(I))}function Re(t){if(E){if(fe(I)!==null)throw qt(),it;I=t}}function Xn(t=1){if(E){for(var e=t,r=I;e--;)r=fe(r);I=r}}function Wt(){for(var t=0,e=I;;){if(e.nodeType===dt){var r=e.data;if(r===Gr){if(t===0)return e;t-=1}else(r===Wr||r===cr)&&(t+=1)}var n=fe(e);e.remove(),e=n}}function ea(t){if(!t||t.nodeType!==dt)throw qt(),it;return t.data}function ta(t){return t===this.v}function Ti(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function ra(t){return!Ti(t,this.v)}let Gt=!1,Ei=!1;function $i(){Gt=!0}let Y=null;function He(t){Y=t}function xt(t,e=!1,r){Y={p:Y,c:null,e:null,s:t,x:null,l:Gt&&!e?{s:null,u:null,$:[]}:null}}function Ct(t){var e=Y,r=e.e;if(r!==null){e.e=null;for(var n of r)_a(n)}return t!==void 0&&(e.x=t),Y=e.p,t??{}}function Rt(){return!Gt||Y!==null&&Y.l===null}const Mi=new WeakMap;function Ai(t){var e=A;if(e===null)return j.f|=ut,t;if((e.f&Jr)===0){if((e.f&Kr)===0)throw!e.parent&&t instanceof Error&&na(t),t;e.b.error(t)}else vr(t,e)}function vr(t,e){for(;e!==null;){if((e.f&Kr)!==0)try{e.b.error(t);return}catch{}e=e.parent}throw t instanceof Error&&na(t),t}function na(t){const e=Mi.get(t);e&&(yt(t,"message",{value:e.message}),yt(t,"stack",{value:e.stack}))}let Ht=[],nn=[];function aa(){var t=Ht;Ht=[],Yn(t)}function Oi(){var t=nn;nn=[],Yn(t)}function ft(t){Ht.length===0&&queueMicrotask(aa),Ht.push(t)}function Ii(){Ht.length>0&&aa(),nn.length>0&&Oi()}function ji(t){let e=0,r=Fe(0),n;return()=>{Gi()&&(T(r),un(()=>(e===0&&(n=Rr(()=>t(()=>kr(r)))),e+=1,()=>{ft(()=>{e-=1,e===0&&(n?.(),n=void 0)})})))}}var Ni=wt|pr|Kr;function Li(t,e,r){new Pi(t,e,r)}class Pi{pending=!1;parent;#e;#t;#a;#l;#u;#o=null;#r=null;#i=null;#s=null;#n=0;#c=!1;#d=null;#h=()=>{this.#d&&Qe(this.#d,this.#n)};#f=ji(()=>(this.#d=Fe(this.#n),()=>{this.#d=null}));constructor(e,r,n){this.#e=e,this.#a=r,this.#l=n,this.#t=I,this.parent=A.b,this.pending=!!this.#a.pending,this.#u=Be(()=>{A.b=this,E&&Ce();const a=this.#a.pending;if(E&&a)this.#r=W(()=>a(this.#e)),queueMicrotask(()=>{this.#o=this.#p(()=>(ht.ensure(),W(()=>this.#l(this.#e)))),this.#n>0?this.#v():(Ee(this.#r,()=>{this.#r=null}),this.pending=!1)});else{try{this.#o=W(()=>n(this.#e))}catch(o){this.error(o)}this.#n>0?this.#v():this.pending=!1}},Ni),E&&(this.#e=I)}has_pending_snippet(){return!!this.#a.pending}#p(e){var r=A,n=j,a=Y;ve(this.#u),te(this.#u),He(this.#u.ctx);try{return e()}finally{ve(r),te(n),He(a)}}#v(){const e=this.#a.pending;this.#o!==null&&(this.#s=document.createDocumentFragment(),Fi(this.#o,this.#s)),this.#r===null&&(this.#r=W(()=>e(this.#e)))}#m(e){this.#n+=e,this.#n===0&&(this.pending=!1,this.#r&&Ee(this.#r,()=>{this.#r=null}),this.#s&&(this.#e.before(this.#s),this.#s=null))}update_pending_count(e){this.has_pending_snippet()?this.#m(e):this.parent&&this.parent.#m(e),sn.add(this.#h)}get_effect_pending(){return this.#f(),T(this.#d)}error(e){var r=this.#a.onerror;let n=this.#a.failed;const a=()=>{this.#n=0,this.#i!==null&&Ee(this.#i,()=>{this.#i=null}),this.pending=!0,this.#o=this.#p(()=>(this.#c=!1,W(()=>this.#l(this.#e)))),this.#n>0?this.#v():this.pending=!1};if(this.#c||!r&&!n)throw e;var o=j;try{te(null),r?.(e,a)}finally{te(o)}this.#o&&(Q(this.#o),this.#o=null),this.#r&&(Q(this.#r),this.#r=null),this.#i&&(Q(this.#i),this.#i=null),E&&(X(this.#t),Xn(),X(Wt())),n&&ft(()=>{this.#i=this.#p(()=>{this.#c=!0;try{return W(()=>{n(this.#e,()=>e,()=>a)})}catch(i){return vr(i,this.#u.parent),null}finally{this.#c=!1}})})}}function Fi(t,e){for(var r=t.nodes_start,n=t.nodes_end;r!==null;){var a=r===n?null:fe(r);e.append(r),r=a}}function Bi(){for(var t=A.b;t!==null&&!t.has_pending_snippet();)t=t.parent;return t===null&&vi(),t}function mr(t){var e=le|ue,r=j!==null&&(j.f&le)!==0?j:null;return A===null||r!==null&&(r.f&ce)!==0?e|=ce:A.f|=pr,{ctx:Y,deps:null,effects:null,equals:ta,f:e,fn:t,reactions:null,rv:0,v:q,wv:0,parent:r??A,ac:null}}function zi(t,e){let r=A;r===null&&mi();var n=r.b,a=void 0,o=Fe(q),i=null,s=!j;return Ki(()=>{try{var l=t()}catch(g){l=Promise.reject(g)}var c=()=>l;a=i?.then(c,c)??Promise.resolve(l),i=a;var u=ae,h=n.pending;s&&(n.update_pending_count(1),h||u.increment());const d=(g,b=void 0)=>{i=null,h||u.activate(),b?b!==rn&&(o.f|=ut,Qe(o,b)):((o.f&ut)!==0&&(o.f^=ut),Qe(o,g)),s&&(n.update_pending_count(-1),h||u.decrement()),la()};if(a.then(d,g=>d(null,g||"unknown")),u)return()=>{queueMicrotask(()=>u.neuter())}}),new Promise(l=>{function c(u){function h(){u===a?l(o):c(a)}u.then(h,h)}c(a)})}function ye(t){const e=mr(t);return Ea(e),e}function an(t){const e=mr(t);return e.equals=ra,e}function oa(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)Q(e[r])}}function Di(t){for(var e=t.parent;e!==null;){if((e.f&le)===0)return e;e=e.parent}return null}function on(t){var e,r=A;ve(Di(t));try{oa(t),e=Oa(t)}finally{ve(r)}return e}function ia(t){var e=on(t);if(t.equals(e)||(t.v=e,t.wv=Ma()),!vt)if(St!==null)St.set(t,t.v);else{var r=(Xe||(t.f&ce)!==0)&&t.deps!==null?lt:H;ee(t,r)}}function sa(t,e,r){const n=Rt()?mr:an;if(e.length===0){r(t.map(n));return}var a=ae,o=A,i=Zi(),s=Bi();Promise.all(e.map(l=>zi(l))).then(l=>{a?.activate(),i();try{r([...t.map(n),...l])}catch(c){(o.f&ct)===0&&vr(c,o)}a?.deactivate(),la()}).catch(l=>{s.error(l)})}function Zi(){var t=A,e=j,r=Y;return function(){ve(t),te(e),He(r)}}function la(){ve(null),te(null),He(null)}const gr=new Set;let ae=null,St=null,sn=new Set,Tt=[],br=null,ln=!1;class ht{#e=new Map;#t=new Map;#a=new Set;#l=0;#u=null;#o=!1;#r=[];#i=[];#s=[];#n=[];#c=[];skipped_effects=new Set;#d(e){Tt=[];var r=null;if(gr.size>1){r=new Map,St=new Map;for(const[o,i]of this.#e)r.set(o,{v:o.v,wv:o.wv}),o.v=i;for(const o of gr)if(o!==this)for(const[i,s]of o.#t)r.has(i)||(r.set(i,{v:i.v,wv:i.wv}),i.v=s)}for(const o of e)this.#h(o);if(this.#r.length===0&&this.#l===0){var n=this.#s,a=this.#n;this.#s=[],this.#n=[],this.#c=[],this.#f(),ca(n),ca(a),this.#u?.resolve()}else{for(const o of this.#s)ee(o,H);for(const o of this.#n)ee(o,H);for(const o of this.#c)ee(o,H)}if(r){for(const[o,{v:i,wv:s}]of r)o.wv<=s&&(o.v=i);St=null}for(const o of this.#r)Kt(o);for(const o of this.#i)Kt(o);this.#r=[],this.#i=[]}#h(e){e.f^=H;for(var r=e.first;r!==null;){var n=r.f,a=(n&(Pe|st))!==0,o=a&&(n&H)!==0,i=o||(n&ke)!==0||this.skipped_effects.has(r);if(!i&&r.fn!==null){if(a)r.f^=H;else if((n&Yr)!==0)this.#n.push(r);else if(xr(r))if((n&en)!==0){var s=r.b?.pending?this.#i:this.#r;s.push(r)}else(r.f&Ut)!==0&&this.#c.push(r),Kt(r);var l=r.first;if(l!==null){r=l;continue}}var c=r.parent;for(r=r.next;r===null&&c!==null;)r=c.next,c=c.parent}}capture(e,r){this.#t.has(e)||this.#t.set(e,r),this.#e.set(e,e.v)}activate(){ae=this}deactivate(){ae=null;for(const e of sn)if(sn.delete(e),e(),ae!==null)break}neuter(){this.#o=!0}flush(){Tt.length>0?this.flush_effects():this.#f(),ae===this&&(this.#l===0&&gr.delete(this),this.deactivate())}flush_effects(){var e=Mt;ln=!0;try{var r=0;for(Sa(!0);Tt.length>0;){if(r++>1e3){var n,a;Vi()}this.#d(Tt),pt.clear()}}finally{ln=!1,Sa(e),br=null}}#f(){if(!this.#o)for(const e of this.#a)e();this.#a.clear()}increment(){this.#l+=1}decrement(){if(this.#l-=1,this.#l===0){for(const e of this.#s)ee(e,ue),Ye(e);for(const e of this.#n)ee(e,ue),Ye(e);for(const e of this.#c)ee(e,ue),Ye(e);this.#s=[],this.#n=[],this.flush()}else this.deactivate()}add_callback(e){this.#a.add(e)}settled(){return(this.#u??=di()).promise}static ensure(e=!0){if(ae===null){const r=ae=new ht;gr.add(ae),e&&queueMicrotask(()=>{ae===r&&r.flush()})}return ae}}function V(t){var e;const r=ht.ensure(!1);for(;;){if(Ii(),Tt.length===0)return r===ae&&r.flush(),br=null,e;r.flush_effects()}}function Vi(){try{ki()}catch(t){vr(t,br)}}function ca(t){var e=t.length;if(e!==0){for(var r=0;r<e;r++){var n=t[r];if((n.f&(ct|ke))===0&&xr(n)){var a=wr;if(Kt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?xa(n):n.fn=null),wr>a&&(n.f&Jn)!==0)break}}for(;r<e;r+=1)Ye(t[r])}}function Ye(t){for(var e=br=t;e.parent!==null;){e=e.parent;var r=e.f;if(ln&&e===A&&(r&Ut)!==0)return;if((r&(st|Pe))!==0){if((r&H)===0)return;e.f^=H}}Tt.push(e)}const pt=new Map;function Fe(t,e){var r={f:0,v:t,reactions:null,equals:ta,rv:0,wv:0};return r}function de(t,e){const r=Fe(t);return Ea(r),r}function _r(t,e=!1,r=!0){const n=Fe(t);return e||(n.equals=ra),Gt&&r&&Y!==null&&Y.l!==null&&(Y.l.s??=[]).push(n),n}function oe(t,e,r=!1){j!==null&&(!we||(j.f&Qn)!==0)&&Rt()&&(j.f&(le|Ut|en|Qn))!==0&&!ze?.includes(t)&&Ri();let n=r?Et(e):e;return Qe(t,n)}function Qe(t,e){if(!t.equals(e)){var r=t.v;vt?pt.set(t,e):pt.set(t,r),t.v=e,ht.ensure().capture(t,r),(t.f&le)!==0&&((t.f&ue)!==0&&on(t),ee(t,(t.f&ce)===0?H:lt)),t.wv=Ma(),ua(t,ue),Rt()&&A!==null&&(A.f&H)!==0&&(A.f&(Pe|st))===0&&(me===null?Xi([t]):me.push(t))}return e}function kr(t){oe(t,t.v+1)}function ua(t,e){var r=t.reactions;if(r!==null)for(var n=Rt(),a=r.length,o=0;o<a;o++){var i=r[o],s=i.f;(s&ue)===0&&(!n&&i===A||(ee(i,e),(s&(H|ce))!==0&&((s&le)!==0?ua(i,lt):Ye(i))))}}function Et(t){if(typeof t!="object"||t===null||Ge in t)return t;const e=Wn(t);if(e!==ci&&e!==ui)return t;var r=new Map,n=ur(t),a=de(0),o=mt,i=s=>{if(mt===o)return s();var l=j,c=mt;te(null),$a(o);var u=s();return te(l),$a(c),u};return n&&r.set("length",de(t.length)),new Proxy(t,{defineProperty(s,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&xi();var u=r.get(l);return u===void 0?u=i(()=>{var h=de(c.value);return r.set(l,h),h}):oe(u,c.value,!0),!0},deleteProperty(s,l){var c=r.get(l);if(c===void 0){if(l in s){const u=i(()=>de(q));r.set(l,u),kr(a)}}else oe(c,q),kr(a);return!0},get(s,l,c){if(l===Ge)return t;var u=r.get(l),h=l in s;if(u===void 0&&(!h||Le(s,l)?.writable)&&(u=i(()=>{var g=Et(h?s[l]:q),b=de(g);return b}),r.set(l,u)),u!==void 0){var d=T(u);return d===q?void 0:d}return Reflect.get(s,l,c)},getOwnPropertyDescriptor(s,l){var c=Reflect.getOwnPropertyDescriptor(s,l);if(c&&"value"in c){var u=r.get(l);u&&(c.value=T(u))}else if(c===void 0){var h=r.get(l),d=h?.v;if(h!==void 0&&d!==q)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return c},has(s,l){if(l===Ge)return!0;var c=r.get(l),u=c!==void 0&&c.v!==q||Reflect.has(s,l);if(c!==void 0||A!==null&&(!u||Le(s,l)?.writable)){c===void 0&&(c=i(()=>{var d=u?Et(s[l]):q,g=de(d);return g}),r.set(l,c));var h=T(c);if(h===q)return!1}return u},set(s,l,c,u){var h=r.get(l),d=l in s;if(n&&l==="length")for(var g=c;g<h.v;g+=1){var b=r.get(g+"");b!==void 0?oe(b,q):g in s&&(b=i(()=>de(q)),r.set(g+"",b))}if(h===void 0)(!d||Le(s,l)?.writable)&&(h=i(()=>de(void 0)),oe(h,Et(c)),r.set(l,h));else{d=h.v!==q;var v=i(()=>Et(c));oe(h,v)}var S=Reflect.getOwnPropertyDescriptor(s,l);if(S?.set&&S.set.call(u,c),!d){if(n&&typeof l=="string"){var m=r.get("length"),k=Number(l);Number.isInteger(k)&&k>=m.v&&oe(m,k+1)}kr(a)}return!0},ownKeys(s){T(a);var l=Reflect.ownKeys(s).filter(h=>{var d=r.get(h);return d===void 0||d.v!==q});for(var[c,u]of r)u.v!==q&&!(c in s)&&l.push(c);return l},setPrototypeOf(){Ci()}})}function da(t){try{if(t!==null&&typeof t=="object"&&Ge in t)return t[Ge]}catch{}return t}function Ui(t,e){return Object.is(da(t),da(e))}var fa,ha,pa,va;function cn(){if(fa===void 0){fa=window,ha=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;pa=Le(e,"firstChild").get,va=Le(e,"nextSibling").get,Gn(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Gn(r)&&(r.__t=void 0)}}function Ke(t=""){return document.createTextNode(t)}function pe(t){return pa.call(t)}function fe(t){return va.call(t)}function Se(t,e){if(!E)return pe(t);var r=pe(I);return r===null&&(r=I.appendChild(Ke())),X(r),r}function ie(t,e){if(!E){var r=pe(t);return r instanceof Comment&&r.data===""?fe(r):r}return I}function Je(t,e=1,r=!1){let n=E?I:t;for(var a;e--;)a=n,n=fe(n);if(!E)return n;if(r&&n?.nodeType!==pi){var o=Ke();return n===null?a?.after(o):n.before(o),X(o),o}return X(n),n}function ma(t){t.textContent=""}function ga(){return!1}function qi(t){A===null&&j===null&&_i(),j!==null&&(j.f&ce)!==0&&A===null&&bi(),vt&&gi()}function Wi(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function Te(t,e,r,n=!0){var a=A;a!==null&&(a.f&ke)!==0&&(t|=ke);var o={ctx:Y,deps:null,nodes_start:null,nodes_end:null,f:t|ue,first:null,fn:e,last:null,next:null,parent:a,b:a&&a.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{Kt(o),o.f|=Jr}catch(l){throw Q(o),l}else e!==null&&Ye(o);var i=r&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&pr)===0;if(!i&&n&&(a!==null&&Wi(o,a),j!==null&&(j.f&le)!==0)){var s=j;(s.effects??=[]).push(o)}return o}function Gi(){return j!==null&&!we}function ba(t){const e=Te(Qr,null,!1);return ee(e,H),e.teardown=t,e}function Hi(t){qi();var e=A.f,r=!j&&(e&Pe)!==0&&(e&Jr)===0;if(r){var n=Y;(n.e??=[]).push(t)}else return _a(t)}function _a(t){return Te(Yr|Jn,t,!1)}function Yi(t){ht.ensure();const e=Te(st,t,!0);return()=>{Q(e)}}function Qi(t){ht.ensure();const e=Te(st,t,!0);return(r={})=>new Promise(n=>{r.outro?Ee(e,()=>{Q(e),n(void 0)}):(Q(e),n(void 0))})}function yr(t){return Te(Yr,t,!1)}function Ki(t){return Te(en|pr,t,!0)}function un(t,e=0){return Te(Qr|e,t,!0)}function Yt(t,e=[],r=[]){sa(e,r,n=>{Te(Qr,()=>t(...n.map(T)),!0)})}function Be(t,e=0){var r=Te(Ut|e,t,!0);return r}function W(t,e=!0){return Te(Pe,t,!0,e)}function ka(t){var e=t.teardown;if(e!==null){const r=vt,n=j;Ta(!0),te(null);try{e.call(null)}finally{Ta(r),te(n)}}}function ya(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){r.ac?.abort(rn);var n=r.next;(r.f&st)!==0?r.parent=null:Q(r,e),r=n}}function Ji(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&Pe)===0&&Q(e),e=r}}function Q(t,e=!0){var r=!1;(e||(t.f&Kn)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(wa(t.nodes_start,t.nodes_end),r=!0),ya(t,e&&!r),Cr(t,0),ee(t,ct);var n=t.transitions;if(n!==null)for(const o of n)o.stop();ka(t);var a=t.parent;a!==null&&a.first!==null&&xa(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function wa(t,e){for(;t!==null;){var r=t===e?null:fe(t);t.remove(),t=r}}function xa(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Ee(t,e){var r=[];dn(t,r,!0),Ca(r,()=>{Q(t),e&&e()})}function Ca(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var a of t)a.out(n)}else e()}function dn(t,e,r){if((t.f&ke)===0){if(t.f^=ke,t.transitions!==null)for(const i of t.transitions)(i.is_global||r)&&e.push(i);for(var n=t.first;n!==null;){var a=n.next,o=(n.f&wt)!==0||(n.f&Pe)!==0;dn(n,e,o?r:!1),n=a}}}function $t(t){Ra(t,!0)}function Ra(t,e){if((t.f&ke)!==0){t.f^=ke,(t.f&H)===0&&(ee(t,ue),Ye(t));for(var r=t.first;r!==null;){var n=r.next,a=(r.f&wt)!==0||(r.f&Pe)!==0;Ra(r,a?e:!1),r=n}if(t.transitions!==null)for(const o of t.transitions)(o.is_global||e)&&o.in()}}let Mt=!1;function Sa(t){Mt=t}let vt=!1;function Ta(t){vt=t}let j=null,we=!1;function te(t){j=t}let A=null;function ve(t){A=t}let ze=null;function Ea(t){j!==null&&(ze===null?ze=[t]:ze.push(t))}let re=null,he=0,me=null;function Xi(t){me=t}let wr=1,Qt=0,mt=Qt;function $a(t){mt=t}let Xe=!1;function Ma(){return++wr}function xr(t){var e=t.f;if((e&ue)!==0)return!0;if((e&lt)!==0){var r=t.deps,n=(e&ce)!==0;if(r!==null){var a,o,i=(e&hr)!==0,s=n&&A!==null&&!Xe,l=r.length;if((i||s)&&(A===null||(A.f&ct)===0)){var c=t,u=c.parent;for(a=0;a<l;a++)o=r[a],(i||!o?.reactions?.includes(c))&&(o.reactions??=[]).push(c);i&&(c.f^=hr),s&&u!==null&&(u.f&ce)===0&&(c.f^=ce)}for(a=0;a<l;a++)if(o=r[a],xr(o)&&ia(o),o.wv>t.wv)return!0}(!n||A!==null&&!Xe)&&ee(t,H)}return!1}function Aa(t,e,r=!0){var n=t.reactions;if(n!==null&&!ze?.includes(t))for(var a=0;a<n.length;a++){var o=n[a];(o.f&le)!==0?Aa(o,e,!1):e===o&&(r?ee(o,ue):(o.f&H)!==0&&ee(o,lt),Ye(o))}}function Oa(t){var e=re,r=he,n=me,a=j,o=Xe,i=ze,s=Y,l=we,c=mt,u=t.f;re=null,he=0,me=null,Xe=(u&ce)!==0&&(we||!Mt||j===null),j=(u&(Pe|st))===0?t:null,ze=null,He(t.ctx),we=!1,mt=++Qt,t.ac!==null&&(t.ac.abort(rn),t.ac=null);try{t.f|=Xr;var h=(0,t.fn)(),d=t.deps;if(re!==null){var g;if(Cr(t,he),d!==null&&he>0)for(d.length=he+re.length,g=0;g<re.length;g++)d[he+g]=re[g];else t.deps=d=re;if(!Xe||(u&le)!==0&&t.reactions!==null)for(g=he;g<d.length;g++)(d[g].reactions??=[]).push(t)}else d!==null&&he<d.length&&(Cr(t,he),d.length=he);if(Rt()&&me!==null&&!we&&d!==null&&(t.f&(le|lt|ue))===0)for(g=0;g<me.length;g++)Aa(me[g],t);return a!==null&&a!==t&&(Qt++,me!==null&&(n===null?n=me:n.push(...me))),(t.f&ut)!==0&&(t.f^=ut),h}catch(b){return Ai(b)}finally{t.f^=Xr,re=e,he=r,me=n,j=a,Xe=o,ze=i,He(s),we=l,mt=c}}function es(t,e){let r=e.reactions;if(r!==null){var n=si.call(r,t);if(n!==-1){var a=r.length-1;a===0?r=e.reactions=null:(r[n]=r[a],r.pop())}}r===null&&(e.f&le)!==0&&(re===null||!re.includes(e))&&(ee(e,lt),(e.f&(ce|hr))===0&&(e.f^=hr),oa(e),Cr(e,0))}function Cr(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)es(t,r[n])}function Kt(t){var e=t.f;if((e&ct)===0){ee(t,H);var r=A,n=Mt;A=t,Mt=!0;try{(e&Ut)!==0?Ji(t):ya(t),ka(t);var a=Oa(t);t.teardown=typeof a=="function"?a:null,t.wv=wr;var o;qn&&Ei&&(t.f&ue)!==0&&t.deps}finally{Mt=n,A=r}}}function T(t){var e=t.f,r=(e&le)!==0;if(j!==null&&!we){var n=A!==null&&(A.f&ct)!==0;if(!n&&!ze?.includes(t)){var a=j.deps;if((j.f&Xr)!==0)t.rv<Qt&&(t.rv=Qt,re===null&&a!==null&&a[he]===t?he++:re===null?re=[t]:(!Xe||!re.includes(t))&&re.push(t));else{(j.deps??=[]).push(t);var o=t.reactions;o===null?t.reactions=[j]:o.includes(j)||o.push(j)}}}else if(r&&t.deps===null&&t.effects===null){var i=t,s=i.parent;s!==null&&(s.f&ce)===0&&(i.f^=ce)}if(vt){if(pt.has(t))return pt.get(t);if(r){i=t;var l=i.v;return((i.f&H)!==0||Ia(i))&&(l=on(i)),pt.set(i,l),l}}else if(r){if(i=t,St?.has(i))return St.get(i);xr(i)&&ia(i)}if((t.f&ut)!==0)throw t.v;return t.v}function Ia(t){if(t.v===q)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(pt.has(e)||(e.f&le)!==0&&Ia(e))return!0;return!1}function Rr(t){var e=we;try{return we=!0,t()}finally{we=e}}const ts=-7169;function ee(t,e){t.f=t.f&ts|e}function rs(t,e){if(e){const r=document.body;t.autofocus=!0,ft(()=>{document.activeElement===r&&t.focus()})}}function ns(t){var e=j,r=A;te(null),ve(null);try{return t()}finally{te(e),ve(r)}}const ja=new Set,fn=new Set;function Na(t,e,r,n={}){function a(o){if(n.capture||Jt.call(e,o),!o.cancelBubble)return ns(()=>r?.call(this,o))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?ft(()=>{e.addEventListener(t,a,n)}):e.addEventListener(t,a,n),a}function Sr(t,e,r,n,a){var o={capture:n,passive:a},i=Na(t,e,r,o);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&ba(()=>{e.removeEventListener(t,i,o)})}function hn(t){for(var e=0;e<t.length;e++)ja.add(t[e]);for(var r of fn)r(t)}function Jt(t){var e=this,r=e.ownerDocument,n=t.type,a=t.composedPath?.()||[],o=a[0]||t.target,i=0,s=t.__root;if(s){var l=a.indexOf(s);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var c=a.indexOf(e);if(c===-1)return;l<=c&&(i=l)}if(o=a[i]||t.target,o!==e){yt(t,"currentTarget",{configurable:!0,get(){return o||r}});var u=j,h=A;te(null),ve(null);try{for(var d,g=[];o!==null;){var b=o.assignedSlot||o.parentNode||o.host||null;try{var v=o["__"+n];if(v!=null&&(!o.disabled||t.target===o))if(ur(v)){var[S,...m]=v;S.apply(o,[t,...m])}else v.call(o,t)}catch(k){d?g.push(k):d=k}if(t.cancelBubble||b===e||b===null)break;o=b}if(d){for(let k of g)queueMicrotask(()=>{throw k});throw d}}finally{t.__root=e,delete t.currentTarget,te(u),ve(h)}}}let ge;function as(){ge=void 0}function os(t){let e=null,r=E;var n;if(E){for(e=I,ge===void 0&&(ge=pe(document.head));ge!==null&&(ge.nodeType!==dt||ge.data!==Wr);)ge=fe(ge);ge===null?J(!1):ge=X(fe(ge))}E||(n=document.head.appendChild(Ke()));try{Be(()=>t(n),Kn)}finally{r&&(J(!0),ge=I,X(e))}}function La(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function De(t,e){var r=A;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function xe(t,e){var r=(e&ri)!==0,n=(e&ni)!==0,a,o=!t.startsWith("<!>");return()=>{if(E)return De(I,null),I;a===void 0&&(a=La(o?t:"<!>"+t),r||(a=pe(a)));var i=n||ha?document.importNode(a,!0):a.cloneNode(!0);if(r){var s=pe(i),l=i.lastChild;De(s,l)}else De(i,i);return i}}function $e(){if(E)return De(I,null),I;var t=document.createDocumentFragment(),e=document.createComment(""),r=Ke();return t.append(e,r),De(e,r),t}function Z(t,e){if(E){A.nodes_end=I,Ce();return}t!==null&&t.before(e)}function is(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const ss=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function ls(t){return ss.includes(t)}const cs={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function us(t){return t=t.toLowerCase(),cs[t]??t}const ds=["touchstart","touchmove"];function fs(t){return ds.includes(t)}const hs=["textarea","script","style","title"];function ps(t){return hs.includes(t)}function vs(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=r+"")}function Pa(t,e){return Fa(t,e)}function ms(t,e){cn(),e.intro=e.intro??!1;const r=e.target,n=E,a=I;try{for(var o=pe(r);o&&(o.nodeType!==dt||o.data!==Wr);)o=fe(o);if(!o)throw it;J(!0),X(o),Ce();const i=Fa(t,{...e,anchor:o});if(I===null||I.nodeType!==dt||I.data!==Gr)throw qt(),it;return J(!1),i}catch(i){if(i===it)return e.recover===!1&&yi(),cn(),ma(r),J(!1),Pa(t,e);throw i}finally{J(n),X(a),as()}}const At=new Map;function Fa(t,{target:e,anchor:r,props:n={},events:a,context:o,intro:i=!0}){cn();var s=new Set,l=h=>{for(var d=0;d<h.length;d++){var g=h[d];if(!s.has(g)){s.add(g);var b=fs(g);e.addEventListener(g,Jt,{passive:b});var v=At.get(g);v===void 0?(document.addEventListener(g,Jt,{passive:b}),At.set(g,1)):At.set(g,v+1)}}};l(Hr(ja)),fn.add(l);var c=void 0,u=Qi(()=>{var h=r??e.appendChild(Ke());return W(()=>{if(o){xt({});var d=Y;d.c=o}a&&(n.$$events=a),E&&De(h,null),c=t(h,n)||{},E&&(A.nodes_end=I),o&&Ct()}),()=>{for(var d of s){e.removeEventListener(d,Jt);var g=At.get(d);--g===0?(document.removeEventListener(d,Jt),At.delete(d)):At.set(d,g)}fn.delete(l),h!==r&&h.parentNode?.removeChild(h)}});return pn.set(c,u),c}let pn=new WeakMap;function gs(t,e){const r=pn.get(t);return r?(pn.delete(t),r(e)):Promise.resolve()}function vn(t,e,...r){var n=t,a=fr,o;Be(()=>{a!==(a=e())&&(o&&(Q(o),o=null),o=W(()=>a(n,...r)))},wt),E&&(n=I)}const mn=0,Tr=1,gn=2;function Ba(t,e,r,n,a){E&&Ce();var o=t,i=Rt(),s=Y,l=q,c,u,h,d=i?Fe(void 0):_r(void 0,!1,!1),g=i?Fe(void 0):_r(void 0,!1,!1),b=!1;function v(m,k){b=!0,k&&(ve(S),te(S),He(s));try{m===mn&&r&&(c?$t(c):c=W(()=>r(o))),m===Tr&&n&&(u?$t(u):u=W(()=>n(o,d))),m!==mn&&c&&Ee(c,()=>c=null),m!==Tr&&u&&Ee(u,()=>u=null),m!==gn&&h&&Ee(h,()=>h=null)}finally{k&&(He(null),te(null),ve(null),V())}}var S=Be(()=>{if(l===(l=e()))return;let m=E&&Hn(l)===(o.data===cr);if(m&&(o=Wt(),X(o),J(!1),m=!0),Hn(l)){var k=l;b=!1,k.then(p=>{k===l&&(Qe(d,p),v(Tr,!0))},p=>{if(k===l)throw Qe(g,p),v(gn,!0),g.v}),E?r&&(c=W(()=>r(o))):ft(()=>{b||v(mn,!0)})}else Qe(d,l),v(Tr,!1);return m&&J(!0),()=>l=q});E&&(o=I)}function Ze(t,e,r=!1){E&&Ce();var n=t,a=null,o=null,i=q,s=r?wt:0,l=!1;const c=(g,b=!0)=>{l=!0,d(b,g)};var u=null;function h(){u!==null&&(u.lastChild.remove(),n.before(u),u=null);var g=i?a:o,b=i?o:a;g&&$t(g),b&&Ee(b,()=>{i?o=null:a=null})}const d=(g,b)=>{if(i===(i=g))return;let v=!1;if(E){const C=ea(n)===cr;!!i===C&&(n=Wt(),X(n),J(!1),v=!0)}var S=ga(),m=n;if(S&&(u=document.createDocumentFragment(),u.append(m=Ke())),i?a??=b&&W(()=>b(m)):o??=b&&W(()=>b(m)),S){var k=ae,p=i?a:o,y=i?o:a;p&&k.skipped_effects.delete(p),y&&k.skipped_effects.add(y),k.add_callback(h)}else h();v&&J(!0)};Be(()=>{l=!1,e(c),l||d(null,null)},s),E&&(n=I)}function bs(t,e){return e}function _s(t,e,r){for(var n=t.items,a=[],o=e.length,i=0;i<o;i++)dn(e[i].e,a,!0);var s=o>0&&a.length===0&&r!==null;if(s){var l=r.parentNode;ma(l),l.append(r),n.clear(),Me(t,e[0].prev,e[o-1].next)}Ca(a,()=>{for(var c=0;c<o;c++){var u=e[c];s||(n.delete(u.k),Me(t,u.prev,u.next)),Q(u.e,!s)}})}function ks(t,e,r,n,a,o=null){var i=t,s={flags:e,items:new Map,first:null};E&&Ce();var l=null,c=!1,u=new Map,h=an(()=>{var v=r();return ur(v)?v:v==null?[]:Hr(v)}),d,g;function b(){ys(g,d,s,u,i,a,e,n,r),o!==null&&(d.length===0?l?$t(l):l=W(()=>o(i)):l!==null&&Ee(l,()=>{l=null}))}Be(()=>{g??=A,d=T(h);var v=d.length;if(c&&v===0)return;c=v===0;let S=!1;if(E){var m=ea(i)===cr;m!==(v===0)&&(i=Wt(),X(i),J(!1),S=!0)}if(E){for(var k=null,p,y=0;y<v;y++){if(I.nodeType===dt&&I.data===Gr){i=I,S=!0,J(!1);break}var C=d[y],L=n(C,y);p=bn(I,s,k,null,C,L,y,a,e,r),s.items.set(L,p),k=p}v>0&&X(Wt())}if(E)v===0&&o&&(l=W(()=>o(i)));else if(ga()){var B=new Set,z=ae;for(y=0;y<v;y+=1){C=d[y],L=n(C,y);var D=s.items.get(L)??u.get(L);D?za(D,C,y):(p=bn(null,s,null,null,C,L,y,a,e,r,!0),u.set(L,p)),B.add(L)}for(const[se,K]of s.items)B.has(se)||z.skipped_effects.add(K.e);z.add_callback(b)}else b();S&&J(!0),T(h)}),E&&(i=I)}function ys(t,e,r,n,a,o,i,s,l){var c=e.length,u=r.items,h=r.first,d=h,g,b=null,v=[],S=[],m,k,p,y;for(y=0;y<c;y+=1){if(m=e[y],k=s(m,y),p=u.get(k),p===void 0){var C=n.get(k);if(C!==void 0){n.delete(k),u.set(k,C);var L=b?b.next:d;Me(r,b,C),Me(r,C,L),_n(C,L,a),b=C}else{var B=d?d.e.nodes_start:a;b=bn(B,r,b,b===null?r.first:b.next,m,k,y,o,i,l)}u.set(k,b),v=[],S=[],d=b.next;continue}if(za(p,m,y),(p.e.f&ke)!==0&&$t(p.e),p!==d){if(g!==void 0&&g.has(p)){if(v.length<S.length){var z=S[0],D;b=z.prev;var se=v[0],K=v[v.length-1];for(D=0;D<v.length;D+=1)_n(v[D],z,a);for(D=0;D<S.length;D+=1)g.delete(S[D]);Me(r,se.prev,K.next),Me(r,b,se),Me(r,K,z),d=z,b=K,y-=1,v=[],S=[]}else g.delete(p),_n(p,d,a),Me(r,p.prev,p.next),Me(r,p,b===null?r.first:b.next),Me(r,b,p),b=p;continue}for(v=[],S=[];d!==null&&d.k!==k;)(d.e.f&ke)===0&&(g??=new Set).add(d),S.push(d),d=d.next;if(d===null)continue;p=d}v.push(p),b=p,d=p.next}if(d!==null||g!==void 0){for(var qe=g===void 0?[]:Hr(g);d!==null;)(d.e.f&ke)===0&&qe.push(d),d=d.next;var je=qe.length;if(je>0){var Ne=null;_s(r,qe,Ne)}}t.first=r.first&&r.first.e,t.last=b&&b.e;for(var We of n.values())Q(We.e);n.clear()}function za(t,e,r,n){Qe(t.v,e),t.i=r}function bn(t,e,r,n,a,o,i,s,l,c,u){var h=(l&Ho)!==0,d=(l&Qo)===0,g=h?d?_r(a,!1,!1):Fe(a):a,b=(l&Yo)===0?i:Fe(i),v={i:b,v:g,k:o,a:null,e:null,prev:r,next:n};try{if(t===null){var S=document.createDocumentFragment();S.append(t=Ke())}return v.e=W(()=>s(t,g,b,c),E),v.e.prev=r&&r.e,v.e.next=n&&n.e,r===null?u||(e.first=v):(r.next=v,r.e.next=v.e),n!==null&&(n.prev=v,n.e.prev=v.e),v}finally{}}function _n(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,a=e?e.e.nodes_start:r,o=t.e.nodes_start;o!==null&&o!==n;){var i=fe(o);a.before(o),o=i}}function Me(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function kn(t,e,r=!1,n=!1,a=!1){var o=t,i="";Yt(()=>{var s=A;if(i===(i=e()??"")){E&&Ce();return}if(s.nodes_start!==null&&(wa(s.nodes_start,s.nodes_end),s.nodes_start=s.nodes_end=null),i!==""){if(E){I.data;for(var l=Ce(),c=l;l!==null&&(l.nodeType!==dt||l.data!=="");)c=l,l=fe(l);if(l===null)throw qt(),it;De(I,c),o=X(l);return}var u=i+"";r?u=`<svg>${u}</svg>`:n&&(u=`<math>${u}</math>`);var h=La(u);if((r||n)&&(h=pe(h)),De(pe(h),h.lastChild),r||n)for(;pe(h);)o.before(pe(h));else o.before(h)}})}function ws(t,e,r,n,a,o){let i=E;E&&Ce();var s,l,c=null;E&&I.nodeType===hi&&(c=I,Ce());var u=E?I:t,h;Be(()=>{const d=e()||null;var g=d==="svg"?oi:null;d!==s&&(h&&(d===null?Ee(h,()=>{h=null,l=null}):d===l?$t(h):Q(h)),d&&d!==l&&(h=W(()=>{if(c=E?c:g?document.createElementNS(g,d):document.createElement(d),De(c,c),n){E&&ps(d)&&c.append(document.createComment(""));var b=E?pe(c):c.appendChild(Ke());E&&(b===null?J(!1):X(b)),n(c,b)}A.nodes_end=c,u.before(c)})),s=d,s&&(l=s))},wt),i&&(J(!0),X(u))}function xs(t,e){ft(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const a=document.createElement("style");a.id=e.hash,a.textContent=e.code,n.appendChild(a)}})}function Cs(t,e,r){yr(()=>{var n=Rr(()=>e(t,r?.())||{});if(n?.destroy)return()=>n.destroy()})}function Rs(t,e){var r=void 0,n;Be(()=>{r!==(r=e())&&(n&&(Q(n),n=null),r&&(n=W(()=>{yr(()=>r(t))})))})}function Da(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=Da(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Ss(){for(var t,e,r=0,n="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=Da(t))&&(n&&(n+=" "),n+=e);return n}function yn(t){return typeof t=="object"?Ss(t):t??""}const Za=[...`
2
- \r\f \v\uFEFF`];function Ts(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var a in r)if(r[a])n=n?n+" "+a:a;else if(n.length)for(var o=a.length,i=0;(i=n.indexOf(a,i))>=0;){var s=i+o;(i===0||Za.includes(n[i-1]))&&(s===n.length||Za.includes(n[s]))?n=(i===0?"":n.substring(0,i))+n.substring(s+1):i=s}}return n===""?null:n}function Va(t,e=!1){var r=e?" !important;":";",n="";for(var a in t){var o=t[a];o!=null&&o!==""&&(n+=" "+a+": "+o+r)}return n}function wn(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Es(t,e){if(e){var r="",n,a;if(Array.isArray(e)?(n=e[0],a=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,i=0,s=!1,l=[];n&&l.push(...Object.keys(n).map(wn)),a&&l.push(...Object.keys(a).map(wn));var c=0,u=-1;const v=t.length;for(var h=0;h<v;h++){var d=t[h];if(s?d==="/"&&t[h-1]==="*"&&(s=!1):o?o===d&&(o=!1):d==="/"&&t[h+1]==="*"?s=!0:d==='"'||d==="'"?o=d:d==="("?i++:d===")"&&i--,!s&&o===!1&&i===0){if(d===":"&&u===-1)u=h;else if(d===";"||h===v-1){if(u!==-1){var g=wn(t.substring(c,u).trim());if(!l.includes(g)){d!==";"&&h++;var b=t.substring(c,h).trim();r+=" "+b+";"}}c=h+1,u=-1}}}}return n&&(r+=Va(n)),a&&(r+=Va(a,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function xn(t,e,r,n,a,o){var i=t.__className;if(E||i!==r||i===void 0){var s=Ts(r,n,o);(!E||s!==t.getAttribute("class"))&&(s==null?t.removeAttribute("class"):e?t.className=s:t.setAttribute("class",s)),t.__className=r}else if(o&&a!==o)for(var l in o){var c=!!o[l];(a==null||c!==!!a[l])&&t.classList.toggle(l,c)}return o}function Cn(t,e={},r,n){for(var a in r){var o=r[a];e[a]!==o&&(r[a]==null?t.style.removeProperty(a):t.style.setProperty(a,o,n))}}function Rn(t,e,r,n){var a=t.__style;if(E||a!==e){var o=Es(e,n);(!E||o!==t.getAttribute("style"))&&(o==null?t.removeAttribute("style"):t.style.cssText=o),t.__style=e}else n&&(Array.isArray(n)?(Cn(t,r?.[0],n[0]),Cn(t,r?.[1],n[1],"important")):Cn(t,r,n));return n}function Sn(t,e,r=!1){if(t.multiple){if(e==null)return;if(!ur(e))return Si();for(var n of t.options)n.selected=e.includes(Ua(n));return}for(n of t.options){var a=Ua(n);if(Ui(a,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function $s(t){var e=new MutationObserver(()=>{Sn(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ba(()=>{e.disconnect()})}function Ua(t){return"__value"in t?t.__value:t.value}const Xt=Symbol("class"),er=Symbol("style"),qa=Symbol("is custom element"),Wa=Symbol("is html");function Ms(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Er(t,e,r,n){var a=Ga(t);E&&(a[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||a[e]!==(a[e]=r)&&(e==="loading"&&(t[fi]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Ya(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function As(t,e,r,n,a=!1){var o=Ga(t),i=o[qa],s=!o[Wa];let l=E&&i;l&&J(!1);var c=e||{},u=t.tagName==="OPTION";for(var h in e)h in r||(r[h]=null);r.class?r.class=yn(r.class):r[Xt]&&(r.class=null),r[er]&&(r.style??=null);var d=Ya(t);for(const p in r){let y=r[p];if(u&&p==="value"&&y==null){t.value=t.__value="",c[p]=y;continue}if(p==="class"){var g=t.namespaceURI==="http://www.w3.org/1999/xhtml";xn(t,g,y,n,e?.[Xt],r[Xt]),c[p]=y,c[Xt]=r[Xt];continue}if(p==="style"){Rn(t,y,e?.[er],r[er]),c[p]=y,c[er]=r[er];continue}var b=c[p];if(!(y===b&&!(y===void 0&&t.hasAttribute(p)))){c[p]=y;var v=p[0]+p[1];if(v!=="$$")if(v==="on"){const C={},L="$$"+p;let B=p.slice(2);var S=ls(B);if(is(B)&&(B=B.slice(0,-7),C.capture=!0),!S&&b){if(y!=null)continue;t.removeEventListener(B,c[L],C),c[L]=null}if(y!=null)if(S)t[`__${B}`]=y,hn([B]);else{let z=function(D){c[p].call(this,D)};c[L]=Na(B,t,z,C)}else S&&(t[`__${B}`]=void 0)}else if(p==="style")Er(t,p,y);else if(p==="autofocus")rs(t,!!y);else if(!i&&(p==="__value"||p==="value"&&y!=null))t.value=t.__value=y;else if(p==="selected"&&u)Ms(t,y);else{var m=p;s||(m=us(m));var k=m==="defaultValue"||m==="defaultChecked";if(y==null&&!i&&!k)if(o[p]=null,m==="value"||m==="checked"){let C=t;const L=e===void 0;if(m==="value"){let B=C.defaultValue;C.removeAttribute(m),C.defaultValue=B,C.value=C.__value=L?B:null}else{let B=C.defaultChecked;C.removeAttribute(m),C.defaultChecked=B,C.checked=L?B:!1}}else t.removeAttribute(p);else k||d.includes(m)&&(i||typeof y!="string")?t[m]=y:typeof y!="function"&&Er(t,m,y)}}}return l&&J(!0),c}function Os(t,e,r=[],n=[],a,o=!1){sa(r,n,i=>{var s=void 0,l={},c=t.nodeName==="SELECT",u=!1;if(Be(()=>{var d=e(...i.map(T)),g=As(t,s,d,a,o);u&&c&&"value"in d&&Sn(t,d.value);for(let v of Object.getOwnPropertySymbols(l))d[v]||Q(l[v]);for(let v of Object.getOwnPropertySymbols(d)){var b=d[v];v.description===ii&&(!s||b!==s[v])&&(l[v]&&Q(l[v]),l[v]=W(()=>Rs(t,()=>b))),g[v]=b}s=g}),c){var h=t;yr(()=>{Sn(h,s.value,!0),$s(h)})}u=!0})}function Ga(t){return t.__attributes??={[qa]:t.nodeName.includes("-"),[Wa]:t.namespaceURI===ai}}var Ha=new Map;function Ya(t){var e=Ha.get(t.nodeName);if(e)return e;Ha.set(t.nodeName,e=[]);for(var r,n=t,a=Element.prototype;a!==n;){r=li(n);for(var o in r)r[o].set&&e.push(o);n=Wn(n)}return e}function Qa(t,e){return t===e||t?.[Ge]===e}function Ka(t={},e,r,n){return yr(()=>{var a,o;return un(()=>{a=o,o=[],Rr(()=>{t!==r(...o)&&(e(t,...o),a&&Qa(r(...a),t)&&e(null,...a))})}),()=>{ft(()=>{o&&Qa(r(...o),t)&&e(null,...o)})}}),t}let $r=!1;function Is(t){var e=$r;try{return $r=!1,[t(),$r]}finally{$r=e}}const js={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Ja(t,e,r){return new Proxy({props:t,exclude:e},js)}const Ns={get(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(Vt(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n)return n[e]}},set(t,e,r){let n=t.props.length;for(;n--;){let a=t.props[n];Vt(a)&&(a=a());const o=Le(a,e);if(o&&o.set)return o.set(r),!0}return!1},getOwnPropertyDescriptor(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(Vt(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const a=Le(n,e);return a&&!a.configurable&&(a.configurable=!0),a}}},has(t,e){if(e===Ge||e===tn)return!1;for(let r of t.props)if(Vt(r)&&(r=r()),r!=null&&e in r)return!0;return!1},ownKeys(t){const e=[];for(let r of t.props)if(Vt(r)&&(r=r()),!!r){for(const n in r)e.includes(n)||e.push(n);for(const n of Object.getOwnPropertySymbols(r))e.includes(n)||e.push(n)}return e}};function Ls(...t){return new Proxy({props:t},Ns)}function G(t,e,r,n){var a=!Gt||(r&Jo)!==0,o=(r&ei)!==0,i=(r&ti)!==0,s=n,l=!0,c=()=>(l&&(l=!1,s=i?Rr(n):n),s),u;if(o){var h=Ge in t||tn in t;u=Le(t,e)?.set??(h&&e in t?p=>t[e]=p:void 0)}var d,g=!1;o?[d,g]=Is(()=>t[e]):d=t[e],d===void 0&&n!==void 0&&(d=c(),u&&(a&&wi(),u(d)));var b;if(a?b=()=>{var p=t[e];return p===void 0?c():(l=!0,p)}:b=()=>{var p=t[e];return p!==void 0&&(s=void 0),p===void 0?s:p},a&&(r&Xo)===0)return b;if(u){var v=t.$$legacy;return function(p,y){return arguments.length>0?((!a||!y||v||g)&&u(y?b():p),p):b()}}var S=!1,m=((r&Ko)!==0?mr:an)(()=>(S=!1,b()));o&&T(m);var k=A;return function(p,y){if(arguments.length>0){const C=y?T(m):a&&o?Et(p):p;return oe(m,C),S=!0,s!==void 0&&(s=C),p}return vt&&S||(k.f&ct)!==0?m.v:T(m)}}function Ps(t){return new Fs(t)}class Fs{#e;#t;constructor(e){var r=new Map,n=(o,i)=>{var s=_r(i,!1,!1);return r.set(o,s),s};const a=new Proxy({...e.props||{},$$events:{}},{get(o,i){return T(r.get(i)??n(i,Reflect.get(o,i)))},has(o,i){return i===tn?!0:(T(r.get(i)??n(i,Reflect.get(o,i))),Reflect.has(o,i))},set(o,i,s){return oe(r.get(i)??n(i,s),s),Reflect.set(o,i,s)}});this.#t=(e.hydrate?ms:Pa)(e.component,{target:e.target,anchor:e.anchor,props:a,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&V(),this.#e=a.$$events;for(const o of Object.keys(this.#t))o==="$set"||o==="$destroy"||o==="$on"||yt(this,o,{get(){return this.#t[o]},set(i){this.#t[o]=i},enumerable:!0});this.#t.$set=o=>{Object.assign(a,o)},this.#t.$destroy=()=>{gs(this.#t)}}$set(e){this.#t.$set(e)}$on(e,r){this.#e[e]=this.#e[e]||[];const n=(...a)=>r.call(this,...a);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(a=>a!==n)}}$destroy(){this.#t.$destroy()}}let Xa;typeof HTMLElement=="function"&&(Xa=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,r){super(),this.$$ctor=t,this.$$s=e,r&&this.attachShadow({mode:"open"})}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return a=>{const o=document.createElement("slot");n!=="default"&&(o.name=n),Z(a,o)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=Bs(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const a=this.$$g_p(n.name);a in this.$$d||(this.$$d[a]=Mr(a,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=Ps({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=Yi(()=>{un(()=>{this.$$r=!0;for(const n of dr(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const a=Mr(n,this.$$d[n],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,a)}this.$$r=!1})});for(const n in this.$$l)for(const a of this.$$l[n]){const o=this.$$c.$on(n,a);this.$$l_u.set(a,o)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Mr(t,r,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return dr(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Mr(t,e,r,n){const a=r[t]?.type;if(e=a==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(a){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(a){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Bs(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function tr(t,e,r,n,a,o){let i=class extends Xa{constructor(){super(t,r,a),this.$$p_d=e}static get observedAttributes(){return dr(e).map(s=>(e[s].attribute||s).toLowerCase())}};return dr(e).forEach(s=>{yt(i.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(l){l=Mr(s,l,e),this.$$d[s]=l;var c=this.$$c;if(c){var u=Le(c,s)?.get;u?c[s]=l:c.$set({[s]:l})}}})}),n.forEach(s=>{yt(i.prototype,s,{get(){return this.$$c?.[s]}})}),t.element=i,i}var zs=(t,e)=>e()(),Ds=xe('<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>'),Zs=xe(" <!>",1);const Vs={hash:"svelte-4thrqu",code:`
1
+ var LiipGPTButton=function(Wr){"use strict";const Go="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Go);const Yo=1,Qo=2,Ko=16,Xo=1,Jo=2,ei=4,ti=8,ri=16,ni=1,ai=2,Gr="[",ur="[!",Yr="]",it={},q=Symbol(),oi="http://www.w3.org/1999/xhtml",ii="http://www.w3.org/2000/svg",si="@attach",Wn=!1;var dr=Array.isArray,li=Array.prototype.indexOf,Qr=Array.from,fr=Object.keys,wt=Object.defineProperty,Pe=Object.getOwnPropertyDescriptor,ci=Object.getOwnPropertyDescriptors,ui=Object.prototype,di=Array.prototype,Gn=Object.getPrototypeOf,Yn=Object.isExtensible;function Vt(t){return typeof t=="function"}const hr=()=>{};function Qn(t){return typeof t?.then=="function"}function Kn(t){for(var e=0;e<t.length;e++)t[e]()}function fi(){var t,e,r=new Promise((n,a)=>{t=n,e=a});return{promise:r,resolve:t,reject:e}}const ce=2,Kr=4,Xr=8,Ut=16,ze=32,st=64,Jr=128,ue=256,pr=512,G=1024,de=2048,lt=4096,ye=8192,ct=16384,en=32768,xt=65536,Xn=1<<17,Jn=1<<18,vr=1<<19,ea=1<<20,tn=1<<21,rn=1<<22,ut=1<<23,Ge=Symbol("$state"),nn=Symbol("legacy props"),hi=Symbol(""),an=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},pi=1,vi=3,dt=8;function mi(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function gi(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function bi(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function _i(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ki(t){throw new Error("https://svelte.dev/e/effect_orphan")}function yi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function wi(){throw new Error("https://svelte.dev/e/hydration_failed")}function xi(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ci(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Si(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ti(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function qt(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function Ei(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}let $=!1;function X(t){$=t}let I;function J(t){if(t===null)throw qt(),it;return I=t}function Se(){return J(he(I))}function Te(t){if($){if(he(I)!==null)throw qt(),it;I=t}}function ta(t=1){if($){for(var e=t,r=I;e--;)r=he(r);I=r}}function Ht(){for(var t=0,e=I;;){if(e.nodeType===dt){var r=e.data;if(r===Yr){if(t===0)return e;t-=1}else(r===Gr||r===ur)&&(t+=1)}var n=he(e);e.remove(),e=n}}function ra(t){if(!t||t.nodeType!==dt)throw qt(),it;return t.data}function na(t){return t===this.v}function $i(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function aa(t){return!$i(t,this.v)}let Wt=!1,Oi=!1;function Ai(){Wt=!0}let Y=null;function Ye(t){Y=t}function Ct(t,e=!1,r){Y={p:Y,c:null,e:null,s:t,x:null,l:Wt&&!e?{s:null,u:null,$:[]}:null}}function St(t){var e=Y,r=e.e;if(r!==null){e.e=null;for(var n of r)ya(n)}return t!==void 0&&(e.x=t),Y=e.p,t??{}}function Tt(){return!Wt||Y!==null&&Y.l===null}const Mi=new WeakMap;function Ri(t){var e=M;if(e===null)return j.f|=ut,t;if((e.f&en)===0){if((e.f&Jr)===0)throw!e.parent&&t instanceof Error&&oa(t),t;e.b.error(t)}else mr(t,e)}function mr(t,e){for(;e!==null;){if((e.f&Jr)!==0)try{e.b.error(t);return}catch{}e=e.parent}throw t instanceof Error&&oa(t),t}function oa(t){const e=Mi.get(t);e&&(wt(t,"message",{value:e.message}),wt(t,"stack",{value:e.stack}))}let Gt=[],on=[];function ia(){var t=Gt;Gt=[],Kn(t)}function Ii(){var t=on;on=[],Kn(t)}function ft(t){Gt.length===0&&queueMicrotask(ia),Gt.push(t)}function ji(){Gt.length>0&&ia(),on.length>0&&Ii()}function Ni(t){let e=0,r=Be(0),n;return()=>{Gi()&&(E(r),fn(()=>(e===0&&(n=Tr(()=>t(()=>yr(r)))),e+=1,()=>{ft(()=>{e-=1,e===0&&(n?.(),n=void 0)})})))}}var Li=xt|vr|Jr;function Pi(t,e,r){new zi(t,e,r)}class zi{pending=!1;parent;#e;#t;#a;#l;#u;#o=null;#r=null;#i=null;#s=null;#n=0;#c=!1;#d=null;#h=()=>{this.#d&&Ke(this.#d,this.#n)};#f=Ni(()=>(this.#d=Be(this.#n),()=>{this.#d=null}));constructor(e,r,n){this.#e=e,this.#a=r,this.#l=n,this.#t=I,this.parent=M.b,this.pending=!!this.#a.pending,this.#u=Fe(()=>{M.b=this,$&&Se();const a=this.#a.pending;if($&&a)this.#r=H(()=>a(this.#e)),queueMicrotask(()=>{this.#o=this.#p(()=>(ht.ensure(),H(()=>this.#l(this.#e)))),this.#n>0?this.#v():(Oe(this.#r,()=>{this.#r=null}),this.pending=!1)});else{try{this.#o=H(()=>n(this.#e))}catch(o){this.error(o)}this.#n>0?this.#v():this.pending=!1}},Li),$&&(this.#e=I)}has_pending_snippet(){return!!this.#a.pending}#p(e){var r=M,n=j,a=Y;me(this.#u),te(this.#u),Ye(this.#u.ctx);try{return e()}finally{me(r),te(n),Ye(a)}}#v(){const e=this.#a.pending;this.#o!==null&&(this.#s=document.createDocumentFragment(),Bi(this.#o,this.#s)),this.#r===null&&(this.#r=H(()=>e(this.#e)))}#m(e){this.#n+=e,this.#n===0&&(this.pending=!1,this.#r&&Oe(this.#r,()=>{this.#r=null}),this.#s&&(this.#e.before(this.#s),this.#s=null))}update_pending_count(e){this.has_pending_snippet()?this.#m(e):this.parent&&this.parent.#m(e),cn.add(this.#h)}get_effect_pending(){return this.#f(),E(this.#d)}error(e){var r=this.#a.onerror;let n=this.#a.failed;const a=()=>{this.#n=0,this.#i!==null&&Oe(this.#i,()=>{this.#i=null}),this.pending=!0,this.#o=this.#p(()=>(this.#c=!1,H(()=>this.#l(this.#e)))),this.#n>0?this.#v():this.pending=!1};if(this.#c||!r&&!n)throw e;var o=j;try{te(null),r?.(e,a)}finally{te(o)}this.#o&&(Q(this.#o),this.#o=null),this.#r&&(Q(this.#r),this.#r=null),this.#i&&(Q(this.#i),this.#i=null),$&&(J(this.#t),ta(),J(Ht())),n&&ft(()=>{this.#i=this.#p(()=>{this.#c=!0;try{return H(()=>{n(this.#e,()=>e,()=>a)})}catch(i){return mr(i,this.#u.parent),null}finally{this.#c=!1}})})}}function Bi(t,e){for(var r=t.nodes_start,n=t.nodes_end;r!==null;){var a=r===n?null:he(r);e.append(r),r=a}}function Fi(){for(var t=M.b;t!==null&&!t.has_pending_snippet();)t=t.parent;return t===null&&mi(),t}function gr(t){var e=ce|de,r=j!==null&&(j.f&ce)!==0?j:null;return M===null||r!==null&&(r.f&ue)!==0?e|=ue:M.f|=vr,{ctx:Y,deps:null,effects:null,equals:na,f:e,fn:t,reactions:null,rv:0,v:q,wv:0,parent:r??M,ac:null}}function Di(t,e){let r=M;r===null&&gi();var n=r.b,a=void 0,o=Be(q),i=null,s=!j;return Xi(()=>{try{var l=t()}catch(g){l=Promise.reject(g)}var c=()=>l;a=i?.then(c,c)??Promise.resolve(l),i=a;var u=oe,h=n.pending;s&&(n.update_pending_count(1),h||u.increment());const d=(g,b=void 0)=>{i=null,h||u.activate(),b?b!==an&&(o.f|=ut,Ke(o,b)):((o.f&ut)!==0&&(o.f^=ut),Ke(o,g)),s&&(n.update_pending_count(-1),h||u.decrement()),ua()};if(a.then(d,g=>d(null,g||"unknown")),u)return()=>{queueMicrotask(()=>u.neuter())}}),new Promise(l=>{function c(u){function h(){u===a?l(o):c(a)}u.then(h,h)}c(a)})}function we(t){const e=gr(t);return Aa(e),e}function sn(t){const e=gr(t);return e.equals=aa,e}function sa(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)Q(e[r])}}function Zi(t){for(var e=t.parent;e!==null;){if((e.f&ce)===0)return e;e=e.parent}return null}function ln(t){var e,r=M;me(Zi(t));try{sa(t),e=ja(t)}finally{me(r)}return e}function la(t){var e=ln(t);if(t.equals(e)||(t.v=e,t.wv=Ra()),!vt)if(Et!==null)Et.set(t,t.v);else{var r=(et||(t.f&ue)!==0)&&t.deps!==null?lt:G;ee(t,r)}}function ca(t,e,r){const n=Tt()?gr:sn;if(e.length===0){r(t.map(n));return}var a=oe,o=M,i=Vi(),s=Fi();Promise.all(e.map(l=>Di(l))).then(l=>{a?.activate(),i();try{r([...t.map(n),...l])}catch(c){(o.f&ct)===0&&mr(c,o)}a?.deactivate(),ua()}).catch(l=>{s.error(l)})}function Vi(){var t=M,e=j,r=Y;return function(){me(t),te(e),Ye(r)}}function ua(){me(null),te(null),Ye(null)}const br=new Set;let oe=null,Et=null,cn=new Set,$t=[],_r=null,un=!1;class ht{#e=new Map;#t=new Map;#a=new Set;#l=0;#u=null;#o=!1;#r=[];#i=[];#s=[];#n=[];#c=[];skipped_effects=new Set;#d(e){$t=[];var r=null;if(br.size>1){r=new Map,Et=new Map;for(const[o,i]of this.#e)r.set(o,{v:o.v,wv:o.wv}),o.v=i;for(const o of br)if(o!==this)for(const[i,s]of o.#t)r.has(i)||(r.set(i,{v:i.v,wv:i.wv}),i.v=s)}for(const o of e)this.#h(o);if(this.#r.length===0&&this.#l===0){var n=this.#s,a=this.#n;this.#s=[],this.#n=[],this.#c=[],this.#f(),da(n),da(a),this.#u?.resolve()}else{for(const o of this.#s)ee(o,G);for(const o of this.#n)ee(o,G);for(const o of this.#c)ee(o,G)}if(r){for(const[o,{v:i,wv:s}]of r)o.wv<=s&&(o.v=i);Et=null}for(const o of this.#r)Kt(o);for(const o of this.#i)Kt(o);this.#r=[],this.#i=[]}#h(e){e.f^=G;for(var r=e.first;r!==null;){var n=r.f,a=(n&(ze|st))!==0,o=a&&(n&G)!==0,i=o||(n&ye)!==0||this.skipped_effects.has(r);if(!i&&r.fn!==null){if(a)r.f^=G;else if((n&Kr)!==0)this.#n.push(r);else if(Cr(r))if((n&rn)!==0){var s=r.b?.pending?this.#i:this.#r;s.push(r)}else(r.f&Ut)!==0&&this.#c.push(r),Kt(r);var l=r.first;if(l!==null){r=l;continue}}var c=r.parent;for(r=r.next;r===null&&c!==null;)r=c.next,c=c.parent}}capture(e,r){this.#t.has(e)||this.#t.set(e,r),this.#e.set(e,e.v)}activate(){oe=this}deactivate(){oe=null;for(const e of cn)if(cn.delete(e),e(),oe!==null)break}neuter(){this.#o=!0}flush(){$t.length>0?this.flush_effects():this.#f(),oe===this&&(this.#l===0&&br.delete(this),this.deactivate())}flush_effects(){var e=Mt;un=!0;try{var r=0;for($a(!0);$t.length>0;){if(r++>1e3){var n,a;Ui()}this.#d($t),pt.clear()}}finally{un=!1,$a(e),_r=null}}#f(){if(!this.#o)for(const e of this.#a)e();this.#a.clear()}increment(){this.#l+=1}decrement(){if(this.#l-=1,this.#l===0){for(const e of this.#s)ee(e,de),Qe(e);for(const e of this.#n)ee(e,de),Qe(e);for(const e of this.#c)ee(e,de),Qe(e);this.#s=[],this.#n=[],this.flush()}else this.deactivate()}add_callback(e){this.#a.add(e)}settled(){return(this.#u??=fi()).promise}static ensure(e=!0){if(oe===null){const r=oe=new ht;br.add(oe),e&&queueMicrotask(()=>{oe===r&&r.flush()})}return oe}}function V(t){var e;const r=ht.ensure(!1);for(;;){if(ji(),$t.length===0)return r===oe&&r.flush(),_r=null,e;r.flush_effects()}}function Ui(){try{yi()}catch(t){mr(t,_r)}}function da(t){var e=t.length;if(e!==0){for(var r=0;r<e;r++){var n=t[r];if((n.f&(ct|ye))===0&&Cr(n)){var a=xr;if(Kt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Sa(n):n.fn=null),xr>a&&(n.f&ea)!==0)break}}for(;r<e;r+=1)Qe(t[r])}}function Qe(t){for(var e=_r=t;e.parent!==null;){e=e.parent;var r=e.f;if(un&&e===M&&(r&Ut)!==0)return;if((r&(st|ze))!==0){if((r&G)===0)return;e.f^=G}}$t.push(e)}const pt=new Map;function Be(t,e){var r={f:0,v:t,reactions:null,equals:na,rv:0,wv:0};return r}function fe(t,e){const r=Be(t);return Aa(r),r}function kr(t,e=!1,r=!0){const n=Be(t);return e||(n.equals=aa),Wt&&r&&Y!==null&&Y.l!==null&&(Y.l.s??=[]).push(n),n}function ie(t,e,r=!1){j!==null&&(!xe||(j.f&Xn)!==0)&&Tt()&&(j.f&(ce|Ut|rn|Xn))!==0&&!De?.includes(t)&&Ti();let n=r?Ot(e):e;return Ke(t,n)}function Ke(t,e){if(!t.equals(e)){var r=t.v;vt?pt.set(t,e):pt.set(t,r),t.v=e,ht.ensure().capture(t,r),(t.f&ce)!==0&&((t.f&de)!==0&&ln(t),ee(t,(t.f&ue)===0?G:lt)),t.wv=Ra(),fa(t,de),Tt()&&M!==null&&(M.f&G)!==0&&(M.f&(ze|st))===0&&(ge===null?es([t]):ge.push(t))}return e}function yr(t){ie(t,t.v+1)}function fa(t,e){var r=t.reactions;if(r!==null)for(var n=Tt(),a=r.length,o=0;o<a;o++){var i=r[o],s=i.f;(s&de)===0&&(!n&&i===M||(ee(i,e),(s&(G|ue))!==0&&((s&ce)!==0?fa(i,lt):Qe(i))))}}function Ot(t){if(typeof t!="object"||t===null||Ge in t)return t;const e=Gn(t);if(e!==ui&&e!==di)return t;var r=new Map,n=dr(t),a=fe(0),o=mt,i=s=>{if(mt===o)return s();var l=j,c=mt;te(null),Ma(o);var u=s();return te(l),Ma(c),u};return n&&r.set("length",fe(t.length)),new Proxy(t,{defineProperty(s,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&Ci();var u=r.get(l);return u===void 0?u=i(()=>{var h=fe(c.value);return r.set(l,h),h}):ie(u,c.value,!0),!0},deleteProperty(s,l){var c=r.get(l);if(c===void 0){if(l in s){const u=i(()=>fe(q));r.set(l,u),yr(a)}}else ie(c,q),yr(a);return!0},get(s,l,c){if(l===Ge)return t;var u=r.get(l),h=l in s;if(u===void 0&&(!h||Pe(s,l)?.writable)&&(u=i(()=>{var g=Ot(h?s[l]:q),b=fe(g);return b}),r.set(l,u)),u!==void 0){var d=E(u);return d===q?void 0:d}return Reflect.get(s,l,c)},getOwnPropertyDescriptor(s,l){var c=Reflect.getOwnPropertyDescriptor(s,l);if(c&&"value"in c){var u=r.get(l);u&&(c.value=E(u))}else if(c===void 0){var h=r.get(l),d=h?.v;if(h!==void 0&&d!==q)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return c},has(s,l){if(l===Ge)return!0;var c=r.get(l),u=c!==void 0&&c.v!==q||Reflect.has(s,l);if(c!==void 0||M!==null&&(!u||Pe(s,l)?.writable)){c===void 0&&(c=i(()=>{var d=u?Ot(s[l]):q,g=fe(d);return g}),r.set(l,c));var h=E(c);if(h===q)return!1}return u},set(s,l,c,u){var h=r.get(l),d=l in s;if(n&&l==="length")for(var g=c;g<h.v;g+=1){var b=r.get(g+"");b!==void 0?ie(b,q):g in s&&(b=i(()=>fe(q)),r.set(g+"",b))}if(h===void 0)(!d||Pe(s,l)?.writable)&&(h=i(()=>fe(void 0)),ie(h,Ot(c)),r.set(l,h));else{d=h.v!==q;var v=i(()=>Ot(c));ie(h,v)}var T=Reflect.getOwnPropertyDescriptor(s,l);if(T?.set&&T.set.call(u,c),!d){if(n&&typeof l=="string"){var m=r.get("length"),k=Number(l);Number.isInteger(k)&&k>=m.v&&ie(m,k+1)}yr(a)}return!0},ownKeys(s){E(a);var l=Reflect.ownKeys(s).filter(h=>{var d=r.get(h);return d===void 0||d.v!==q});for(var[c,u]of r)u.v!==q&&!(c in s)&&l.push(c);return l},setPrototypeOf(){Si()}})}function ha(t){try{if(t!==null&&typeof t=="object"&&Ge in t)return t[Ge]}catch{}return t}function qi(t,e){return Object.is(ha(t),ha(e))}var pa,va,ma,ga;function dn(){if(pa===void 0){pa=window,va=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;ma=Pe(e,"firstChild").get,ga=Pe(e,"nextSibling").get,Yn(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Yn(r)&&(r.__t=void 0)}}function Xe(t=""){return document.createTextNode(t)}function ve(t){return ma.call(t)}function he(t){return ga.call(t)}function Ee(t,e){if(!$)return ve(t);var r=ve(I);return r===null&&(r=I.appendChild(Xe())),J(r),r}function se(t,e){if(!$){var r=ve(t);return r instanceof Comment&&r.data===""?he(r):r}return I}function Je(t,e=1,r=!1){let n=$?I:t;for(var a;e--;)a=n,n=he(n);if(!$)return n;if(r&&n?.nodeType!==vi){var o=Xe();return n===null?a?.after(o):n.before(o),J(o),o}return J(n),n}function ba(t){t.textContent=""}function _a(){return!1}function Hi(t){M===null&&j===null&&ki(),j!==null&&(j.f&ue)!==0&&M===null&&_i(),vt&&bi()}function Wi(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function $e(t,e,r,n=!0){var a=M;a!==null&&(a.f&ye)!==0&&(t|=ye);var o={ctx:Y,deps:null,nodes_start:null,nodes_end:null,f:t|de,first:null,fn:e,last:null,next:null,parent:a,b:a&&a.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{Kt(o),o.f|=en}catch(l){throw Q(o),l}else e!==null&&Qe(o);var i=r&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&vr)===0;if(!i&&n&&(a!==null&&Wi(o,a),j!==null&&(j.f&ce)!==0)){var s=j;(s.effects??=[]).push(o)}return o}function Gi(){return j!==null&&!xe}function ka(t){const e=$e(Xr,null,!1);return ee(e,G),e.teardown=t,e}function Yi(t){Hi();var e=M.f,r=!j&&(e&ze)!==0&&(e&en)===0;if(r){var n=Y;(n.e??=[]).push(t)}else return ya(t)}function ya(t){return $e(Kr|ea,t,!1)}function Qi(t){ht.ensure();const e=$e(st,t,!0);return()=>{Q(e)}}function Ki(t){ht.ensure();const e=$e(st,t,!0);return(r={})=>new Promise(n=>{r.outro?Oe(e,()=>{Q(e),n(void 0)}):(Q(e),n(void 0))})}function wr(t){return $e(Kr,t,!1)}function Xi(t){return $e(rn|vr,t,!0)}function fn(t,e=0){return $e(Xr|e,t,!0)}function Yt(t,e=[],r=[]){ca(e,r,n=>{$e(Xr,()=>t(...n.map(E)),!0)})}function Fe(t,e=0){var r=$e(Ut|e,t,!0);return r}function H(t,e=!0){return $e(ze,t,!0,e)}function wa(t){var e=t.teardown;if(e!==null){const r=vt,n=j;Oa(!0),te(null);try{e.call(null)}finally{Oa(r),te(n)}}}function xa(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){r.ac?.abort(an);var n=r.next;(r.f&st)!==0?r.parent=null:Q(r,e),r=n}}function Ji(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&ze)===0&&Q(e),e=r}}function Q(t,e=!0){var r=!1;(e||(t.f&Jn)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(Ca(t.nodes_start,t.nodes_end),r=!0),xa(t,e&&!r),Sr(t,0),ee(t,ct);var n=t.transitions;if(n!==null)for(const o of n)o.stop();wa(t);var a=t.parent;a!==null&&a.first!==null&&Sa(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function Ca(t,e){for(;t!==null;){var r=t===e?null:he(t);t.remove(),t=r}}function Sa(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Oe(t,e){var r=[];hn(t,r,!0),Ta(r,()=>{Q(t),e&&e()})}function Ta(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var a of t)a.out(n)}else e()}function hn(t,e,r){if((t.f&ye)===0){if(t.f^=ye,t.transitions!==null)for(const i of t.transitions)(i.is_global||r)&&e.push(i);for(var n=t.first;n!==null;){var a=n.next,o=(n.f&xt)!==0||(n.f&ze)!==0;hn(n,e,o?r:!1),n=a}}}function At(t){Ea(t,!0)}function Ea(t,e){if((t.f&ye)!==0){t.f^=ye,(t.f&G)===0&&(ee(t,de),Qe(t));for(var r=t.first;r!==null;){var n=r.next,a=(r.f&xt)!==0||(r.f&ze)!==0;Ea(r,a?e:!1),r=n}if(t.transitions!==null)for(const o of t.transitions)(o.is_global||e)&&o.in()}}let Mt=!1;function $a(t){Mt=t}let vt=!1;function Oa(t){vt=t}let j=null,xe=!1;function te(t){j=t}let M=null;function me(t){M=t}let De=null;function Aa(t){j!==null&&(De===null?De=[t]:De.push(t))}let re=null,pe=0,ge=null;function es(t){ge=t}let xr=1,Qt=0,mt=Qt;function Ma(t){mt=t}let et=!1;function Ra(){return++xr}function Cr(t){var e=t.f;if((e&de)!==0)return!0;if((e&lt)!==0){var r=t.deps,n=(e&ue)!==0;if(r!==null){var a,o,i=(e&pr)!==0,s=n&&M!==null&&!et,l=r.length;if((i||s)&&(M===null||(M.f&ct)===0)){var c=t,u=c.parent;for(a=0;a<l;a++)o=r[a],(i||!o?.reactions?.includes(c))&&(o.reactions??=[]).push(c);i&&(c.f^=pr),s&&u!==null&&(u.f&ue)===0&&(c.f^=ue)}for(a=0;a<l;a++)if(o=r[a],Cr(o)&&la(o),o.wv>t.wv)return!0}(!n||M!==null&&!et)&&ee(t,G)}return!1}function Ia(t,e,r=!0){var n=t.reactions;if(n!==null&&!De?.includes(t))for(var a=0;a<n.length;a++){var o=n[a];(o.f&ce)!==0?Ia(o,e,!1):e===o&&(r?ee(o,de):(o.f&G)!==0&&ee(o,lt),Qe(o))}}function ja(t){var e=re,r=pe,n=ge,a=j,o=et,i=De,s=Y,l=xe,c=mt,u=t.f;re=null,pe=0,ge=null,et=(u&ue)!==0&&(xe||!Mt||j===null),j=(u&(ze|st))===0?t:null,De=null,Ye(t.ctx),xe=!1,mt=++Qt,t.ac!==null&&(t.ac.abort(an),t.ac=null);try{t.f|=tn;var h=(0,t.fn)(),d=t.deps;if(re!==null){var g;if(Sr(t,pe),d!==null&&pe>0)for(d.length=pe+re.length,g=0;g<re.length;g++)d[pe+g]=re[g];else t.deps=d=re;if(!et||(u&ce)!==0&&t.reactions!==null)for(g=pe;g<d.length;g++)(d[g].reactions??=[]).push(t)}else d!==null&&pe<d.length&&(Sr(t,pe),d.length=pe);if(Tt()&&ge!==null&&!xe&&d!==null&&(t.f&(ce|lt|de))===0)for(g=0;g<ge.length;g++)Ia(ge[g],t);return a!==null&&a!==t&&(Qt++,ge!==null&&(n===null?n=ge:n.push(...ge))),(t.f&ut)!==0&&(t.f^=ut),h}catch(b){return Ri(b)}finally{t.f^=tn,re=e,pe=r,ge=n,j=a,et=o,De=i,Ye(s),xe=l,mt=c}}function ts(t,e){let r=e.reactions;if(r!==null){var n=li.call(r,t);if(n!==-1){var a=r.length-1;a===0?r=e.reactions=null:(r[n]=r[a],r.pop())}}r===null&&(e.f&ce)!==0&&(re===null||!re.includes(e))&&(ee(e,lt),(e.f&(ue|pr))===0&&(e.f^=pr),sa(e),Sr(e,0))}function Sr(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)ts(t,r[n])}function Kt(t){var e=t.f;if((e&ct)===0){ee(t,G);var r=M,n=Mt;M=t,Mt=!0;try{(e&Ut)!==0?Ji(t):xa(t),wa(t);var a=ja(t);t.teardown=typeof a=="function"?a:null,t.wv=xr;var o;Wn&&Oi&&(t.f&de)!==0&&t.deps}finally{Mt=n,M=r}}}function E(t){var e=t.f,r=(e&ce)!==0;if(j!==null&&!xe){var n=M!==null&&(M.f&ct)!==0;if(!n&&!De?.includes(t)){var a=j.deps;if((j.f&tn)!==0)t.rv<Qt&&(t.rv=Qt,re===null&&a!==null&&a[pe]===t?pe++:re===null?re=[t]:(!et||!re.includes(t))&&re.push(t));else{(j.deps??=[]).push(t);var o=t.reactions;o===null?t.reactions=[j]:o.includes(j)||o.push(j)}}}else if(r&&t.deps===null&&t.effects===null){var i=t,s=i.parent;s!==null&&(s.f&ue)===0&&(i.f^=ue)}if(vt){if(pt.has(t))return pt.get(t);if(r){i=t;var l=i.v;return((i.f&G)!==0||Na(i))&&(l=ln(i)),pt.set(i,l),l}}else if(r){if(i=t,Et?.has(i))return Et.get(i);Cr(i)&&la(i)}if((t.f&ut)!==0)throw t.v;return t.v}function Na(t){if(t.v===q)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(pt.has(e)||(e.f&ce)!==0&&Na(e))return!0;return!1}function Tr(t){var e=xe;try{return xe=!0,t()}finally{xe=e}}const rs=-7169;function ee(t,e){t.f=t.f&rs|e}function ns(t,e){if(e){const r=document.body;t.autofocus=!0,ft(()=>{document.activeElement===r&&t.focus()})}}function as(t){var e=j,r=M;te(null),me(null);try{return t()}finally{te(e),me(r)}}const La=new Set,pn=new Set;function Pa(t,e,r,n={}){function a(o){if(n.capture||Xt.call(e,o),!o.cancelBubble)return as(()=>r?.call(this,o))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?ft(()=>{e.addEventListener(t,a,n)}):e.addEventListener(t,a,n),a}function Er(t,e,r,n,a){var o={capture:n,passive:a},i=Pa(t,e,r,o);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&ka(()=>{e.removeEventListener(t,i,o)})}function vn(t){for(var e=0;e<t.length;e++)La.add(t[e]);for(var r of pn)r(t)}function Xt(t){var e=this,r=e.ownerDocument,n=t.type,a=t.composedPath?.()||[],o=a[0]||t.target,i=0,s=t.__root;if(s){var l=a.indexOf(s);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var c=a.indexOf(e);if(c===-1)return;l<=c&&(i=l)}if(o=a[i]||t.target,o!==e){wt(t,"currentTarget",{configurable:!0,get(){return o||r}});var u=j,h=M;te(null),me(null);try{for(var d,g=[];o!==null;){var b=o.assignedSlot||o.parentNode||o.host||null;try{var v=o["__"+n];if(v!=null&&(!o.disabled||t.target===o))if(dr(v)){var[T,...m]=v;T.apply(o,[t,...m])}else v.call(o,t)}catch(k){d?g.push(k):d=k}if(t.cancelBubble||b===e||b===null)break;o=b}if(d){for(let k of g)queueMicrotask(()=>{throw k});throw d}}finally{t.__root=e,delete t.currentTarget,te(u),me(h)}}}let be;function os(){be=void 0}function is(t){let e=null,r=$;var n;if($){for(e=I,be===void 0&&(be=ve(document.head));be!==null&&(be.nodeType!==dt||be.data!==Gr);)be=he(be);be===null?X(!1):be=J(he(be))}$||(n=document.head.appendChild(Xe()));try{Fe(()=>t(n),Jn)}finally{r&&(X(!0),be=I,J(e))}}function za(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Ze(t,e){var r=M;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function Ce(t,e){var r=(e&ni)!==0,n=(e&ai)!==0,a,o=!t.startsWith("<!>");return()=>{if($)return Ze(I,null),I;a===void 0&&(a=za(o?t:"<!>"+t),r||(a=ve(a)));var i=n||va?document.importNode(a,!0):a.cloneNode(!0);if(r){var s=ve(i),l=i.lastChild;Ze(s,l)}else Ze(i,i);return i}}function Ae(){if($)return Ze(I,null),I;var t=document.createDocumentFragment(),e=document.createComment(""),r=Xe();return t.append(e,r),Ze(e,r),t}function Z(t,e){if($){M.nodes_end=I,Se();return}t!==null&&t.before(e)}function ss(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const ls=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function cs(t){return ls.includes(t)}const us={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function ds(t){return t=t.toLowerCase(),us[t]??t}const fs=["touchstart","touchmove"];function hs(t){return fs.includes(t)}const ps=["textarea","script","style","title"];function vs(t){return ps.includes(t)}function ms(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=r+"")}function Ba(t,e){return Fa(t,e)}function gs(t,e){dn(),e.intro=e.intro??!1;const r=e.target,n=$,a=I;try{for(var o=ve(r);o&&(o.nodeType!==dt||o.data!==Gr);)o=he(o);if(!o)throw it;X(!0),J(o),Se();const i=Fa(t,{...e,anchor:o});if(I===null||I.nodeType!==dt||I.data!==Yr)throw qt(),it;return X(!1),i}catch(i){if(i===it)return e.recover===!1&&wi(),dn(),ba(r),X(!1),Ba(t,e);throw i}finally{X(n),J(a),os()}}const Rt=new Map;function Fa(t,{target:e,anchor:r,props:n={},events:a,context:o,intro:i=!0}){dn();var s=new Set,l=h=>{for(var d=0;d<h.length;d++){var g=h[d];if(!s.has(g)){s.add(g);var b=hs(g);e.addEventListener(g,Xt,{passive:b});var v=Rt.get(g);v===void 0?(document.addEventListener(g,Xt,{passive:b}),Rt.set(g,1)):Rt.set(g,v+1)}}};l(Qr(La)),pn.add(l);var c=void 0,u=Ki(()=>{var h=r??e.appendChild(Xe());return H(()=>{if(o){Ct({});var d=Y;d.c=o}a&&(n.$$events=a),$&&Ze(h,null),c=t(h,n)||{},$&&(M.nodes_end=I),o&&St()}),()=>{for(var d of s){e.removeEventListener(d,Xt);var g=Rt.get(d);--g===0?(document.removeEventListener(d,Xt),Rt.delete(d)):Rt.set(d,g)}pn.delete(l),h!==r&&h.parentNode?.removeChild(h)}});return mn.set(c,u),c}let mn=new WeakMap;function bs(t,e){const r=mn.get(t);return r?(mn.delete(t),r(e)):Promise.resolve()}function gn(t,e,...r){var n=t,a=hr,o;Fe(()=>{a!==(a=e())&&(o&&(Q(o),o=null),o=H(()=>a(n,...r)))},xt),$&&(n=I)}const bn=0,$r=1,_n=2;function Da(t,e,r,n,a){$&&Se();var o=t,i=Tt(),s=Y,l=q,c,u,h,d=i?Be(void 0):kr(void 0,!1,!1),g=i?Be(void 0):kr(void 0,!1,!1),b=!1;function v(m,k){b=!0,k&&(me(T),te(T),Ye(s));try{m===bn&&r&&(c?At(c):c=H(()=>r(o))),m===$r&&n&&(u?At(u):u=H(()=>n(o,d))),m!==bn&&c&&Oe(c,()=>c=null),m!==$r&&u&&Oe(u,()=>u=null),m!==_n&&h&&Oe(h,()=>h=null)}finally{k&&(Ye(null),te(null),me(null),V())}}var T=Fe(()=>{if(l===(l=e()))return;let m=$&&Qn(l)===(o.data===ur);if(m&&(o=Ht(),J(o),X(!1),m=!0),Qn(l)){var k=l;b=!1,k.then(p=>{k===l&&(Ke(d,p),v($r,!0))},p=>{if(k===l)throw Ke(g,p),v(_n,!0),g.v}),$?r&&(c=H(()=>r(o))):ft(()=>{b||v(bn,!0)})}else Ke(d,l),v($r,!1);return m&&X(!0),()=>l=q});$&&(o=I)}function Ve(t,e,r=!1){$&&Se();var n=t,a=null,o=null,i=q,s=r?xt:0,l=!1;const c=(g,b=!0)=>{l=!0,d(b,g)};var u=null;function h(){u!==null&&(u.lastChild.remove(),n.before(u),u=null);var g=i?a:o,b=i?o:a;g&&At(g),b&&Oe(b,()=>{i?o=null:a=null})}const d=(g,b)=>{if(i===(i=g))return;let v=!1;if($){const C=ra(n)===ur;!!i===C&&(n=Ht(),J(n),X(!1),v=!0)}var T=_a(),m=n;if(T&&(u=document.createDocumentFragment(),u.append(m=Xe())),i?a??=b&&H(()=>b(m)):o??=b&&H(()=>b(m)),T){var k=oe,p=i?a:o,y=i?o:a;p&&k.skipped_effects.delete(p),y&&k.skipped_effects.add(y),k.add_callback(h)}else h();v&&X(!0)};Fe(()=>{l=!1,e(c),l||d(null,null)},s),$&&(n=I)}function _s(t,e){return e}function ks(t,e,r){for(var n=t.items,a=[],o=e.length,i=0;i<o;i++)hn(e[i].e,a,!0);var s=o>0&&a.length===0&&r!==null;if(s){var l=r.parentNode;ba(l),l.append(r),n.clear(),Me(t,e[0].prev,e[o-1].next)}Ta(a,()=>{for(var c=0;c<o;c++){var u=e[c];s||(n.delete(u.k),Me(t,u.prev,u.next)),Q(u.e,!s)}})}function ys(t,e,r,n,a,o=null){var i=t,s={flags:e,items:new Map,first:null};$&&Se();var l=null,c=!1,u=new Map,h=sn(()=>{var v=r();return dr(v)?v:v==null?[]:Qr(v)}),d,g;function b(){ws(g,d,s,u,i,a,e,n,r),o!==null&&(d.length===0?l?At(l):l=H(()=>o(i)):l!==null&&Oe(l,()=>{l=null}))}Fe(()=>{g??=M,d=E(h);var v=d.length;if(c&&v===0)return;c=v===0;let T=!1;if($){var m=ra(i)===ur;m!==(v===0)&&(i=Ht(),J(i),X(!1),T=!0)}if($){for(var k=null,p,y=0;y<v;y++){if(I.nodeType===dt&&I.data===Yr){i=I,T=!0,X(!1);break}var C=d[y],L=n(C,y);p=kn(I,s,k,null,C,L,y,a,e,r),s.items.set(L,p),k=p}v>0&&J(Ht())}if($)v===0&&o&&(l=H(()=>o(i)));else if(_a()){var B=new Set,F=oe;for(y=0;y<v;y+=1){C=d[y],L=n(C,y);var D=s.items.get(L)??u.get(L);D?Za(D,C,y):(p=kn(null,s,null,null,C,L,y,a,e,r,!0),u.set(L,p)),B.add(L)}for(const[le,K]of s.items)B.has(le)||F.skipped_effects.add(K.e);F.add_callback(b)}else b();T&&X(!0),E(h)}),$&&(i=I)}function ws(t,e,r,n,a,o,i,s,l){var c=e.length,u=r.items,h=r.first,d=h,g,b=null,v=[],T=[],m,k,p,y;for(y=0;y<c;y+=1){if(m=e[y],k=s(m,y),p=u.get(k),p===void 0){var C=n.get(k);if(C!==void 0){n.delete(k),u.set(k,C);var L=b?b.next:d;Me(r,b,C),Me(r,C,L),yn(C,L,a),b=C}else{var B=d?d.e.nodes_start:a;b=kn(B,r,b,b===null?r.first:b.next,m,k,y,o,i,l)}u.set(k,b),v=[],T=[],d=b.next;continue}if(Za(p,m,y),(p.e.f&ye)!==0&&At(p.e),p!==d){if(g!==void 0&&g.has(p)){if(v.length<T.length){var F=T[0],D;b=F.prev;var le=v[0],K=v[v.length-1];for(D=0;D<v.length;D+=1)yn(v[D],F,a);for(D=0;D<T.length;D+=1)g.delete(T[D]);Me(r,le.prev,K.next),Me(r,b,le),Me(r,K,F),d=F,b=K,y-=1,v=[],T=[]}else g.delete(p),yn(p,d,a),Me(r,p.prev,p.next),Me(r,p,b===null?r.first:b.next),Me(r,b,p),b=p;continue}for(v=[],T=[];d!==null&&d.k!==k;)(d.e.f&ye)===0&&(g??=new Set).add(d),T.push(d),d=d.next;if(d===null)continue;p=d}v.push(p),b=p,d=p.next}if(d!==null||g!==void 0){for(var He=g===void 0?[]:Qr(g);d!==null;)(d.e.f&ye)===0&&He.push(d),d=d.next;var Ne=He.length;if(Ne>0){var Le=null;ks(r,He,Le)}}t.first=r.first&&r.first.e,t.last=b&&b.e;for(var We of n.values())Q(We.e);n.clear()}function Za(t,e,r,n){Ke(t.v,e),t.i=r}function kn(t,e,r,n,a,o,i,s,l,c,u){var h=(l&Yo)!==0,d=(l&Ko)===0,g=h?d?kr(a,!1,!1):Be(a):a,b=(l&Qo)===0?i:Be(i),v={i:b,v:g,k:o,a:null,e:null,prev:r,next:n};try{if(t===null){var T=document.createDocumentFragment();T.append(t=Xe())}return v.e=H(()=>s(t,g,b,c),$),v.e.prev=r&&r.e,v.e.next=n&&n.e,r===null?u||(e.first=v):(r.next=v,r.e.next=v.e),n!==null&&(n.prev=v,n.e.prev=v.e),v}finally{}}function yn(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,a=e?e.e.nodes_start:r,o=t.e.nodes_start;o!==null&&o!==n;){var i=he(o);a.before(o),o=i}}function Me(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function wn(t,e,r=!1,n=!1,a=!1){var o=t,i="";Yt(()=>{var s=M;if(i===(i=e()??"")){$&&Se();return}if(s.nodes_start!==null&&(Ca(s.nodes_start,s.nodes_end),s.nodes_start=s.nodes_end=null),i!==""){if($){I.data;for(var l=Se(),c=l;l!==null&&(l.nodeType!==dt||l.data!=="");)c=l,l=he(l);if(l===null)throw qt(),it;Ze(I,c),o=J(l);return}var u=i+"";r?u=`<svg>${u}</svg>`:n&&(u=`<math>${u}</math>`);var h=za(u);if((r||n)&&(h=ve(h)),Ze(ve(h),h.lastChild),r||n)for(;ve(h);)o.before(ve(h));else o.before(h)}})}function xs(t,e,r,n,a,o){let i=$;$&&Se();var s,l,c=null;$&&I.nodeType===pi&&(c=I,Se());var u=$?I:t,h;Fe(()=>{const d=e()||null;var g=d==="svg"?ii:null;d!==s&&(h&&(d===null?Oe(h,()=>{h=null,l=null}):d===l?At(h):Q(h)),d&&d!==l&&(h=H(()=>{if(c=$?c:g?document.createElementNS(g,d):document.createElement(d),Ze(c,c),n){$&&vs(d)&&c.append(document.createComment(""));var b=$?ve(c):c.appendChild(Xe());$&&(b===null?X(!1):J(b)),n(c,b)}M.nodes_end=c,u.before(c)})),s=d,s&&(l=s))},xt),i&&(X(!0),J(u))}function Cs(t,e){ft(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const a=document.createElement("style");a.id=e.hash,a.textContent=e.code,n.appendChild(a)}})}function Ss(t,e,r){wr(()=>{var n=Tr(()=>e(t,r?.())||{});if(n?.destroy)return()=>n.destroy()})}function Ts(t,e){var r=void 0,n;Fe(()=>{r!==(r=e())&&(n&&(Q(n),n=null),r&&(n=H(()=>{wr(()=>r(t))})))})}function Va(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=Va(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Es(){for(var t,e,r=0,n="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=Va(t))&&(n&&(n+=" "),n+=e);return n}function xn(t){return typeof t=="object"?Es(t):t??""}const Ua=[...`
2
+ \r\f \v\uFEFF`];function $s(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var a in r)if(r[a])n=n?n+" "+a:a;else if(n.length)for(var o=a.length,i=0;(i=n.indexOf(a,i))>=0;){var s=i+o;(i===0||Ua.includes(n[i-1]))&&(s===n.length||Ua.includes(n[s]))?n=(i===0?"":n.substring(0,i))+n.substring(s+1):i=s}}return n===""?null:n}function qa(t,e=!1){var r=e?" !important;":";",n="";for(var a in t){var o=t[a];o!=null&&o!==""&&(n+=" "+a+": "+o+r)}return n}function Cn(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Os(t,e){if(e){var r="",n,a;if(Array.isArray(e)?(n=e[0],a=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,i=0,s=!1,l=[];n&&l.push(...Object.keys(n).map(Cn)),a&&l.push(...Object.keys(a).map(Cn));var c=0,u=-1;const v=t.length;for(var h=0;h<v;h++){var d=t[h];if(s?d==="/"&&t[h-1]==="*"&&(s=!1):o?o===d&&(o=!1):d==="/"&&t[h+1]==="*"?s=!0:d==='"'||d==="'"?o=d:d==="("?i++:d===")"&&i--,!s&&o===!1&&i===0){if(d===":"&&u===-1)u=h;else if(d===";"||h===v-1){if(u!==-1){var g=Cn(t.substring(c,u).trim());if(!l.includes(g)){d!==";"&&h++;var b=t.substring(c,h).trim();r+=" "+b+";"}}c=h+1,u=-1}}}}return n&&(r+=qa(n)),a&&(r+=qa(a,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function Sn(t,e,r,n,a,o){var i=t.__className;if($||i!==r||i===void 0){var s=$s(r,n,o);(!$||s!==t.getAttribute("class"))&&(s==null?t.removeAttribute("class"):e?t.className=s:t.setAttribute("class",s)),t.__className=r}else if(o&&a!==o)for(var l in o){var c=!!o[l];(a==null||c!==!!a[l])&&t.classList.toggle(l,c)}return o}function Tn(t,e={},r,n){for(var a in r){var o=r[a];e[a]!==o&&(r[a]==null?t.style.removeProperty(a):t.style.setProperty(a,o,n))}}function En(t,e,r,n){var a=t.__style;if($||a!==e){var o=Os(e,n);(!$||o!==t.getAttribute("style"))&&(o==null?t.removeAttribute("style"):t.style.cssText=o),t.__style=e}else n&&(Array.isArray(n)?(Tn(t,r?.[0],n[0]),Tn(t,r?.[1],n[1],"important")):Tn(t,r,n));return n}function $n(t,e,r=!1){if(t.multiple){if(e==null)return;if(!dr(e))return Ei();for(var n of t.options)n.selected=e.includes(Ha(n));return}for(n of t.options){var a=Ha(n);if(qi(a,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function As(t){var e=new MutationObserver(()=>{$n(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ka(()=>{e.disconnect()})}function Ha(t){return"__value"in t?t.__value:t.value}const Jt=Symbol("class"),er=Symbol("style"),Wa=Symbol("is custom element"),Ga=Symbol("is html");function Ms(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Or(t,e,r,n){var a=Ya(t);$&&(a[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||a[e]!==(a[e]=r)&&(e==="loading"&&(t[hi]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Ka(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function Rs(t,e,r,n,a=!1){var o=Ya(t),i=o[Wa],s=!o[Ga];let l=$&&i;l&&X(!1);var c=e||{},u=t.tagName==="OPTION";for(var h in e)h in r||(r[h]=null);r.class?r.class=xn(r.class):r[Jt]&&(r.class=null),r[er]&&(r.style??=null);var d=Ka(t);for(const p in r){let y=r[p];if(u&&p==="value"&&y==null){t.value=t.__value="",c[p]=y;continue}if(p==="class"){var g=t.namespaceURI==="http://www.w3.org/1999/xhtml";Sn(t,g,y,n,e?.[Jt],r[Jt]),c[p]=y,c[Jt]=r[Jt];continue}if(p==="style"){En(t,y,e?.[er],r[er]),c[p]=y,c[er]=r[er];continue}var b=c[p];if(!(y===b&&!(y===void 0&&t.hasAttribute(p)))){c[p]=y;var v=p[0]+p[1];if(v!=="$$")if(v==="on"){const C={},L="$$"+p;let B=p.slice(2);var T=cs(B);if(ss(B)&&(B=B.slice(0,-7),C.capture=!0),!T&&b){if(y!=null)continue;t.removeEventListener(B,c[L],C),c[L]=null}if(y!=null)if(T)t[`__${B}`]=y,vn([B]);else{let F=function(D){c[p].call(this,D)};c[L]=Pa(B,t,F,C)}else T&&(t[`__${B}`]=void 0)}else if(p==="style")Or(t,p,y);else if(p==="autofocus")ns(t,!!y);else if(!i&&(p==="__value"||p==="value"&&y!=null))t.value=t.__value=y;else if(p==="selected"&&u)Ms(t,y);else{var m=p;s||(m=ds(m));var k=m==="defaultValue"||m==="defaultChecked";if(y==null&&!i&&!k)if(o[p]=null,m==="value"||m==="checked"){let C=t;const L=e===void 0;if(m==="value"){let B=C.defaultValue;C.removeAttribute(m),C.defaultValue=B,C.value=C.__value=L?B:null}else{let B=C.defaultChecked;C.removeAttribute(m),C.defaultChecked=B,C.checked=L?B:!1}}else t.removeAttribute(p);else k||d.includes(m)&&(i||typeof y!="string")?t[m]=y:typeof y!="function"&&Or(t,m,y)}}}return l&&X(!0),c}function Is(t,e,r=[],n=[],a,o=!1){ca(r,n,i=>{var s=void 0,l={},c=t.nodeName==="SELECT",u=!1;if(Fe(()=>{var d=e(...i.map(E)),g=Rs(t,s,d,a,o);u&&c&&"value"in d&&$n(t,d.value);for(let v of Object.getOwnPropertySymbols(l))d[v]||Q(l[v]);for(let v of Object.getOwnPropertySymbols(d)){var b=d[v];v.description===si&&(!s||b!==s[v])&&(l[v]&&Q(l[v]),l[v]=H(()=>Ts(t,()=>b))),g[v]=b}s=g}),c){var h=t;wr(()=>{$n(h,s.value,!0),As(h)})}u=!0})}function Ya(t){return t.__attributes??={[Wa]:t.nodeName.includes("-"),[Ga]:t.namespaceURI===oi}}var Qa=new Map;function Ka(t){var e=Qa.get(t.nodeName);if(e)return e;Qa.set(t.nodeName,e=[]);for(var r,n=t,a=Element.prototype;a!==n;){r=ci(n);for(var o in r)r[o].set&&e.push(o);n=Gn(n)}return e}function Xa(t,e){return t===e||t?.[Ge]===e}function Ja(t={},e,r,n){return wr(()=>{var a,o;return fn(()=>{a=o,o=[],Tr(()=>{t!==r(...o)&&(e(t,...o),a&&Xa(r(...a),t)&&e(null,...a))})}),()=>{ft(()=>{o&&Xa(r(...o),t)&&e(null,...o)})}}),t}let Ar=!1;function js(t){var e=Ar;try{return Ar=!1,[t(),Ar]}finally{Ar=e}}const Ns={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function eo(t,e,r){return new Proxy({props:t,exclude:e},Ns)}const Ls={get(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(Vt(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n)return n[e]}},set(t,e,r){let n=t.props.length;for(;n--;){let a=t.props[n];Vt(a)&&(a=a());const o=Pe(a,e);if(o&&o.set)return o.set(r),!0}return!1},getOwnPropertyDescriptor(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(Vt(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const a=Pe(n,e);return a&&!a.configurable&&(a.configurable=!0),a}}},has(t,e){if(e===Ge||e===nn)return!1;for(let r of t.props)if(Vt(r)&&(r=r()),r!=null&&e in r)return!0;return!1},ownKeys(t){const e=[];for(let r of t.props)if(Vt(r)&&(r=r()),!!r){for(const n in r)e.includes(n)||e.push(n);for(const n of Object.getOwnPropertySymbols(r))e.includes(n)||e.push(n)}return e}};function Ps(...t){return new Proxy({props:t},Ls)}function W(t,e,r,n){var a=!Wt||(r&Jo)!==0,o=(r&ti)!==0,i=(r&ri)!==0,s=n,l=!0,c=()=>(l&&(l=!1,s=i?Tr(n):n),s),u;if(o){var h=Ge in t||nn in t;u=Pe(t,e)?.set??(h&&e in t?p=>t[e]=p:void 0)}var d,g=!1;o?[d,g]=js(()=>t[e]):d=t[e],d===void 0&&n!==void 0&&(d=c(),u&&(a&&xi(),u(d)));var b;if(a?b=()=>{var p=t[e];return p===void 0?c():(l=!0,p)}:b=()=>{var p=t[e];return p!==void 0&&(s=void 0),p===void 0?s:p},a&&(r&ei)===0)return b;if(u){var v=t.$$legacy;return function(p,y){return arguments.length>0?((!a||!y||v||g)&&u(y?b():p),p):b()}}var T=!1,m=((r&Xo)!==0?gr:sn)(()=>(T=!1,b()));o&&E(m);var k=M;return function(p,y){if(arguments.length>0){const C=y?E(m):a&&o?Ot(p):p;return ie(m,C),T=!0,s!==void 0&&(s=C),p}return vt&&T||(k.f&ct)!==0?m.v:E(m)}}function zs(t){return new Bs(t)}class Bs{#e;#t;constructor(e){var r=new Map,n=(o,i)=>{var s=kr(i,!1,!1);return r.set(o,s),s};const a=new Proxy({...e.props||{},$$events:{}},{get(o,i){return E(r.get(i)??n(i,Reflect.get(o,i)))},has(o,i){return i===nn?!0:(E(r.get(i)??n(i,Reflect.get(o,i))),Reflect.has(o,i))},set(o,i,s){return ie(r.get(i)??n(i,s),s),Reflect.set(o,i,s)}});this.#t=(e.hydrate?gs:Ba)(e.component,{target:e.target,anchor:e.anchor,props:a,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&V(),this.#e=a.$$events;for(const o of Object.keys(this.#t))o==="$set"||o==="$destroy"||o==="$on"||wt(this,o,{get(){return this.#t[o]},set(i){this.#t[o]=i},enumerable:!0});this.#t.$set=o=>{Object.assign(a,o)},this.#t.$destroy=()=>{bs(this.#t)}}$set(e){this.#t.$set(e)}$on(e,r){this.#e[e]=this.#e[e]||[];const n=(...a)=>r.call(this,...a);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(a=>a!==n)}}$destroy(){this.#t.$destroy()}}let to;typeof HTMLElement=="function"&&(to=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,r){super(),this.$$ctor=t,this.$$s=e,r&&this.attachShadow({mode:"open"})}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return a=>{const o=document.createElement("slot");n!=="default"&&(o.name=n),Z(a,o)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=Fs(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const a=this.$$g_p(n.name);a in this.$$d||(this.$$d[a]=Mr(a,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=zs({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=Qi(()=>{fn(()=>{this.$$r=!0;for(const n of fr(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const a=Mr(n,this.$$d[n],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,a)}this.$$r=!1})});for(const n in this.$$l)for(const a of this.$$l[n]){const o=this.$$c.$on(n,a);this.$$l_u.set(a,o)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Mr(t,r,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return fr(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Mr(t,e,r,n){const a=r[t]?.type;if(e=a==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(a){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(a){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Fs(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function tr(t,e,r,n,a,o){let i=class extends to{constructor(){super(t,r,a),this.$$p_d=e}static get observedAttributes(){return fr(e).map(s=>(e[s].attribute||s).toLowerCase())}};return fr(e).forEach(s=>{wt(i.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(l){l=Mr(s,l,e),this.$$d[s]=l;var c=this.$$c;if(c){var u=Pe(c,s)?.get;u?c[s]=l:c.$set({[s]:l})}}})}),n.forEach(s=>{wt(i.prototype,s,{get(){return this.$$c?.[s]}})}),t.element=i,i}var Ds=(t,e)=>e()(),Zs=Ce('<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>'),Vs=Ce(" <!>",1);const Us={hash:"svelte-4thrqu",code:`
3
3
  /* 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,
4
4
  BlinkMacSystemFont,
5
5
  avenir next,
@@ -12,166 +12,15 @@ var LiipGPTButton=function(qr){"use strict";const Go="5";typeof window<"u"&&((wi
12
12
  roboto,
13
13
  noto,
14
14
  arial,
15
- sans-serif;}.error-message__retry-button.svelte-4thrqu {border:none;outline:none;background:none;font-size:1rem;text-decoration:underline;&:active {outline:none;}}`};function eo(t,e){xt(e,!0),xs(t,Vs);const r=(c,u=fr,h=fr)=>{Xn();var d=Zs(),g=ie(d),b=Je(g);{var v=m=>{},S=m=>{var k=Ds(),p=Se(k),y=Je(Se(p));y.__click=[zs,h],Re(p),Re(k),Z(m,k)};Ze(b,m=>{a()?m(v):m(S,!1)})}Yt(m=>vs(g,`${m??""} `),[()=>console.error(`Panic, uncaught error:
16
- `,u())??""]),Z(c,d)};let n=G(e,"body",7),a=G(e,"silent",7),o=de(void 0);const i=c=>{oe(o,{error:c},!0)};var s=$e(),l=ie(s);return Li(l,{get failed(){return r}},c=>{var u=$e(),h=ie(u);{var d=b=>{r(b,()=>T(o).error,()=>()=>{oe(o,void 0)})},g=b=>{var v=$e(),S=ie(v);vn(S,n,()=>i),Z(b,v)};Ze(h,b=>{T(o)?b(d):b(g,!1)})}Z(c,u)}),Z(t,s),Ct({get body(){return n()},set body(c){n(c),V()},get silent(){return a()},set silent(c){a(c),V()}})}hn(["click"]),tr(eo,{body:{},silent:{}},[],[],!0);const Us='@layer base,utilities,components;/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::-moz-placeholder{color:currentcolor}@supports (color: color-mix(in lab,red,red)){{color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor}@supports (color: color-mix(in lab,red,red)){{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer base{.chat-app{--spacer-1: .0625rem;--spacer-2: .125rem;--spacer-3: .1875rem;--spacer-4: .25rem;--spacer-5: .3125rem;--spacer-6: .375rem;--spacer-8: .5rem;--spacer-10: .625rem;--spacer-12: .75rem;--spacer-16: 1rem;--spacer-20: 1.25rem;--spacer-24: 1.5rem;--spacer-28: 1.75rem;--spacer-32: 2rem;--spacer-40: 2.5rem;--spacer-48: 3rem;--spacer-56: 3.5rem;--spacer-64: 4rem;--spacer-80: 5rem;--spacer-120: 7.5rem;--spacer-r-8: clamp(.375rem, .3182rem + .2841cqw, .5rem);--spacer-r-12: clamp(.625rem, .5682rem + .2841cqw, .75rem);--spacer-r-16: clamp(.75rem, .6364rem + .5682cqw, 1rem);--spacer-r-20: clamp(.875rem, .7045rem + .8523cqw, 1.25rem);--spacer-r-24: clamp(1rem, .7727rem + 1.1364cqw, 1.5rem);--spacer-r-28: clamp(1.125rem, .8409rem + 1.4205cqw, 1.75rem);--spacer-r-32: clamp(1.25rem, .9091rem + 1.7045cqw, 2rem);--spacer-r-40: clamp(1.5rem, 1.0455rem + 2.2727cqw, 2.5rem);--spacer-r-48: clamp(1.625rem, 1rem + 3.125cqw, 3rem);--spacer-r-56: clamp(1.75rem, .9545rem + 3.9773cqw, 3.5rem);--spacer-r-64: clamp(2rem, 1.0909rem + 4.5455cqw, 4rem);--spacer-r-80: clamp(3rem, 2.0909rem + 4.5455cqw, 5rem);--spacer-r-96: clamp(3.5rem, 2.3636rem + 5.6818cqw, 6rem);--spacer-r-120: clamp(4rem, 2.4091rem + 7.9545cqw, 7.5rem);--font-xs: .75em;--font-sm: .875em;--font-body: 1rem;--font-h3: clamp(1.125rem, .9545rem + .8523cqw, 1.5rem);--font-h2: clamp(1.25rem, .7955rem + 2.2727cqw, 2.25rem);--font-h1: clamp(1.5rem, .8182rem + 3.4091cqw, 3rem);--font-weight-normal: 400;--font-weight-bold: 700;--line-height-default: 1.5;--line-height-snug: 1.375;--line-height-tight: 1.25;--default-transition-duration: .2s;--default-transition-timing-function: ease-in-out;--z-index-flyout: 10000;--z-index-dialog: 600;--z-index-loader: 500;--z-index-reference-number: 400;--z-index-footer: 300;--z-index-tooltip: 200;--z-index-header: 100;--z-index-local-overlay: 10;--ease-out-quart: cubic-bezier(.165, .84, .44, 1);--ease-in-quart: cubic-bezier(.895, .03, .685, .22);--ease-in-out-quart: cubic-bezier(.77, 0, .175, 1);--fly-in-id: 0;--chat-footer-height: 0}}@value container-sm,container-md,container-lg from "./viewports.css";@layer base{.chat-app :where(h1,h2,h3,h4,h5,h6){font-weight:var(--font-weight-bold);line-height:var(--line-height-tight)}.chat-app :where(b,strong){font-weight:var(--font-weight-bold)}.chat-app :where(button){cursor:pointer}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea){width:100%;padding:var(--input-padding);border-width:var(--input-border-width);border-radius:var(--input-border-radius);border-color:var(--input-border-color);background:var(--input-background);box-shadow:var(--input-box-shadow, none);color:var(--input-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::-moz-placeholder{color:var(--input-placeholder-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::placeholder{color:var(--input-placeholder-color)}.chat-app :where(input[type=radio],input[type=checkbox]){margin:0}.chat-app :where(*:focus-visible){border-radius:var(--btn-primary-border-radius);outline-color:var(--body-focus-color);outline-style:solid;outline-width:var(--spacer-3);outline-offset:var(--spacer-2)}.chat-app *::-moz-selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app *::selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app>*{color:var(--body-color);font-style:normal;font-weight:var(--font-weight-normal);font-size:var(--body-font-size, var(--font-body));line-height:var(--line-height-default);font-family:var(--font-family);font-optical-sizing:auto}.chat-app ::-webkit-scrollbar{width:8px;height:8px}.chat-app ::-webkit-scrollbar-track{background:transparent}.chat-app ::-webkit-scrollbar-thumb{border-radius:4px;background-color:#0000004d;-webkit-transition:background-color .2s;transition:background-color .2s}.chat-app ::-webkit-scrollbar-thumb:hover{background-color:#00000080}.chat-app *{scrollbar-color:rgba(0,0,0,.3) transparent;scrollbar-width:thin}.chat-app ::-webkit-scrollbar-thumb{visibility:hidden}.chat-app *:hover::-webkit-scrollbar-thumb,.chat-app *:active::-webkit-scrollbar-thumb,.chat-app *:focus::-webkit-scrollbar-thumb{visibility:visible}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{position:absolute;inset:0;background-color:transparent;content:""}.chat-app :where(.sr-only){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.chat-app :where(.transition-colors){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,box-shadow;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.transition){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.fly-in){--fly-in-id: 0;--fly-in-duration: .4s;--fly-out-duration: .2s;--fly-in-delay: .3s;--fly-in-delay-additional: .1s;--fly-in-y: var(--spacer-r-64);transform:translateY(var(--fly-in-y));opacity:0;transition-delay:0s,1s;transition-duration:var(--fly-out-duration);transition-property:opacity,transform;transition-timing-function:ease,var(--ease-out-quart)}.chat-app :where(.mounted .fly-in){transform:translateY(0);opacity:1;transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional));transition-duration:var(--fly-in-duration)}.chat-app :where(.truncate){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-app :where(.line-clamp){display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat-app :where(.line-clamp--2){-webkit-line-clamp:2}.chat-app :where(.line-clamp--3){-webkit-line-clamp:3}.chat-app :where(.line-clamp--12){-webkit-line-clamp:12}.chat-app :where(.container){width:100%;max-width:var(--container-max-width, 1024px);margin:0 auto;padding-right:var(--spacer-16);padding-left:var(--spacer-16)}@container chat-container (min-width: 640px){.chat-app :where(.container){padding-right:var(--spacer-32);padding-left:var(--spacer-32)}}@container chat-container (min-width: 768px){.chat-app :where(.container){padding-right:var(--spacer-48);padding-left:var(--spacer-48)}}.chat-app :where(.text-container)>:where(h1){font-size:var(--font-h1)}.chat-app :where(.text-container)>:where(h2){font-size:var(--font-h2)}.chat-app :where(.text-container)>:where(h3){font-size:var(--font-h3)}.chat-app :where(.text-container)>:where(h4,h5,h6){font-size:var(--body-font-size)}.chat-app :where(.text-container)>:where(p,ul,ol,img,table){display:block;margin-bottom:var(--spacer-r-24)}.chat-app :where(.text-container)>:where(div){margin:var(--spacer-r-40) 0}.chat-app :where(.text-container)>:where(h1,.h1){margin-bottom:var(--spacer-r-28)}.chat-app :where(.text-container)>:where(h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-bottom:var(--spacer-r-20)}.chat-app :where(.text-container)>:where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-top:var(--spacer-r-40)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li){margin-bottom:var(--spacer-12)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li):last-child{margin-bottom:0}.chat-app :where(.text-container)>:where(ol){padding-left:1.5em;list-style-position:outside;list-style-type:decimal}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li){position:relative;padding-left:1em}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{position:absolute;top:0;left:0;content:"•";font-size:.9em}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;border:none;background-color:var(--color-grey-700);background-color:var(--hr-color)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)){color:var(--anchor-color);font-weight:var(--anchor-font-weight, var(--font-weight-normal));-webkit-text-decoration:var(--anchor-text-decoration, underline);text-decoration:var(--anchor-text-decoration, underline);text-underline-offset:var(--anchor-text-underline-offset, .15em);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)):hover{color:var(--anchor-hover-color)}.chat-app :where(.text-container):first-child{margin-top:0}.chat-app :where(.text-container):last-child{margin-bottom:0}.chat-app :where(.text-container) :where(table){display:block;width:100%;overflow-x:auto;border-collapse:collapse;border-spacing:0;-webkit-overflow-scrolling:touch}.chat-app :where(.text-container) :where(th){width:1000px;padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);line-height:var(--line-height-tight);text-align:left;vertical-align:bottom}.chat-app :where(.text-container) :where(td){padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);vertical-align:top}.chat-app :where(.text-container) :where(tr:last-child td){border-bottom:none}.chat-app :where(.animated-height){transition:height .5s var(--ease-in-out-quart)}}@layer base{.svg{width:var(--spacer-r-24);height:auto}.svg svg{display:block;width:100%;height:auto;overflow:visible}}@layer components{.chat-app{display:contents}.chat-app__container{display:flex;height:100%;overflow-x:hidden}.chat-app__main{container-name:chat-container;container-type:inline-size;display:block;width:100%;height:100%;transform:scale(1);background:var(--body-background)}.chat-app__loader-container{display:flex;z-index:var(--z-index-loader);position:relative;align-items:center;justify-content:center;width:100%;height:100%}.chat-app__header{z-index:var(--z-index-header);position:fixed;top:0;right:0;left:0;padding:var(--spacer-16);border-width:var(--header-border-width);border-style:solid;border-color:var(--header-border-color);background:var(--header-background);box-shadow:var(--header-box-shadow);pointer-events:none}@container chat-container (min-width: 640px){.chat-app__header{padding:var(--spacer-12)}}.chat-app__header-container{display:flex;align-items:center;justify-content:flex-end;gap:var(--spacer-r-12)}.chat-app__header-container>:where(*){pointer-events:auto}.chat-app__body{position:relative;width:100%;height:100%}.chat-app__page-transition{width:100%;height:100%}.chat-app__aside{--duration-in: .65s;--duration-out: .5s;visibility:hidden;flex-grow:1;width:0;transition-delay:0s,var(--duration-out);transition-duration:var(--duration-out),0s;transition-property:width,visibility;transition-timing-function:var(--ease-in-out-quart),linear}.chat-app__aside.open{visibility:visible;width:var(--aside-width);transition-delay:0s;transition-duration:var(--duration-in),0s;transition-timing-function:var(--ease-out-quart),linear}.chat-app__aside-container{position:relative;width:var(--aside-width);height:100%;overflow-y:auto;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable}.chat-app__aside-header,.chat-app__sheet-header{display:flex;z-index:var(--z-index-flyout);position:sticky;top:0;flex-wrap:no-wrap;align-items:center;justify-content:space-between;padding:var(--spacer-12) var(--spacer-12) var(--spacer-12) var(--spacer-24);gap:var(--spacer-24);border-bottom-width:var(--aside-header-border-width);border-color:var(--aside-header-border-color);background:var(--aside-background);color:var(--aside-header-color)}.chat-app__sheet-close{position:relative}.chat-app__sheet-overlay{z-index:var(--z-index-dialog);position:fixed;inset:0;background:var(--aside-background-overlay)}.chat-app__sheet-content{z-index:var(--z-index-flyout);position:fixed;top:0;right:0;width:100%;max-width:var(--aside-width);height:100%;overflow-y:auto;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable}:is(.chat-app__aside-close,.chat-app__sheet-close) :where(.btn){background-color:transparent}}@layer components{.open-button{--open-button-avatar-height: var(--spacer-r-80);--open-button-avatar-width: var(--spacer-r-80);--open-button-duration: .4s;--open-button-delay: .3s;--open-button-ease: ease-in-out;display:flex;flex-direction:row;align-items:flex-end;cursor:pointer}.open-button__text{display:flex;position:absolute;right:100%;bottom:50%;flex-direction:column;align-items:flex-start;justify-content:center;margin-right:calc(var(--open-button-avatar-width) * -.5);padding-top:var(--spacer-r-12);padding-right:0;padding-bottom:var(--spacer-r-12);padding-left:0;overflow:hidden;transform:translateY(50%);border-width:var(--open-button-border-width);border-radius:var(--open-button-border-radius);border-color:var(--open-button-border-color);background:var(--open-button-background);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;color:var(--open-button-color);text-align:left;transition:transform var(--open-button-duration) var(--open-button-ease),padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button:hover .open-button__text{transform:translateY(0);background:var(--open-button-hover-background, var(--open-button-background));color:var(--open-button-hover-color, var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button__title{max-width:240px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);font-weight:700}.open-button__mask{width:0;height:0;overflow:hidden;transition:width var(--open-button-duration) var(--open-button-delay) var(--open-button-ease),height var(--open-button-duration) var(--open-button-ease)}.open-button:hover .open-button__mask{transition:width var(--open-button-duration) var(--open-button-ease),height var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button__description{position:relative;width:50cqw;max-width:260px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);text-wrap:balance}.open-button__avatar{z-index:var(--z-index-local-overlay);position:relative;width:var(--open-button-avatar-width);height:var(--open-button-avatar-height);overflow:clip;border-radius:var(--spacer-r-80);filter:drop-shadow(0 0 8px rgba(0,0,0,.2));transition:transform .2s var(--open-button-ease)}.open-button:hover .open-button__avatar{transform:scale(1.05)}.open-button__link-icon{display:none;position:absolute;right:0;width:var(--spacer-r-80);height:var(--spacer-r-80);padding:var(--spacer-r-20);color:var(--open-button-color)}:where(.open-button--standalone){position:fixed;right:var(--spacer-r-16);bottom:var(--spacer-r-16)}@media (prefers-reduced-motion: reduce){.open-button__text,.open-button__mask,.open-button:hover .open-button__text,.open-button:hover .open-button__mask{transition:none!important}.open-button__avatar,.open-button:hover .open-button__avatar{filter:none!important;transition:none!important}}}',qs=()=>{const t=localStorage.getItem("liipgpt-color-scheme");return t==="light"||t==="dark"?t:"system"},Ws=t=>{let e=qs();return e==="system"&&(e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),t.includes(e)?e:t[0]??"light"},Gs=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),Hs=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),Ys=new RegExp("(\\d)(\\p{Ll})","gu"),Qs=new RegExp("(\\p{L})(\\d)","gu"),Ks=/[^\p{L}\d]+/giu,Ar="$1\0$2",Js="";function Xs(t,e){let r=t.trim();r=r.replace(Gs,Ar).replace(Hs,Ar),e?.separateNumbers&&(r=r.replace(Ys,Ar).replace(Qs,Ar)),r=r.replace(Ks,"\0");let n=0,a=r.length;for(;r.charAt(n)==="\0";)n++;if(n===a)return[];for(;r.charAt(a-1)==="\0";)a--;return r.slice(n,a).split(/\0/g)}function el(t,e){return nl(t,e?.prefixCharacters)+Xs(t,e).map(rl(e?.locale)).join(e?.delimiter??" ")}function tl(t,e){return el(t,{delimiter:"-",...e})}function rl(t){return t===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t)}function nl(t,e=Js){let r="";for(let n=0;n<t.length;n++){const a=t.charAt(n);if(e.includes(a))r+=a;else break}return r}const Or=tl;var P;(function(t){t.assertEqual=a=>{};function e(a){}t.assertIs=e;function r(a){throw new Error}t.assertNever=r,t.arrayToEnum=a=>{const o={};for(const i of a)o[i]=i;return o},t.getValidEnumValues=a=>{const o=t.objectKeys(a).filter(s=>typeof a[a[s]]!="number"),i={};for(const s of o)i[s]=a[s];return t.objectValues(i)},t.objectValues=a=>t.objectKeys(a).map(function(o){return a[o]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const o=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&o.push(i);return o},t.find=(a,o)=>{for(const i of a)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function n(a,o=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=n,t.jsonStringifyReplacer=(a,o)=>typeof o=="bigint"?o.toString():o})(P||(P={}));var to;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(to||(to={}));const x=P.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),et=t=>{switch(typeof t){case"undefined":return x.undefined;case"string":return x.string;case"number":return Number.isNaN(t)?x.nan:x.number;case"boolean":return x.boolean;case"function":return x.function;case"bigint":return x.bigint;case"symbol":return x.symbol;case"object":return Array.isArray(t)?x.array:t===null?x.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?x.promise:typeof Map<"u"&&t instanceof Map?x.map:typeof Set<"u"&&t instanceof Set?x.set:typeof Date<"u"&&t instanceof Date?x.date:x.object;default:return x.unknown}},_=P.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 Ve extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(o){return o.message},n={_errors:[]},a=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let s=n,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(r(i))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return a(this),n}static assert(e){if(!(e instanceof Ve))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,P.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const a of this.issues)if(a.path.length>0){const o=a.path[0];r[o]=r[o]||[],r[o].push(e(a))}else n.push(e(a));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Ve.create=t=>new Ve(t);const Tn=(t,e)=>{let r;switch(t.code){case _.invalid_type:t.received===x.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case _.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,P.jsonStringifyReplacer)}`;break;case _.unrecognized_keys:r=`Unrecognized key(s) in object: ${P.joinValues(t.keys,", ")}`;break;case _.invalid_union:r="Invalid input";break;case _.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${P.joinValues(t.options)}`;break;case _.invalid_enum_value:r=`Invalid enum value. Expected ${P.joinValues(t.options)}, received '${t.received}'`;break;case _.invalid_arguments:r="Invalid function arguments";break;case _.invalid_return_type:r="Invalid function return type";break;case _.invalid_date:r="Invalid date";break;case _.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:P.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case _.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case _.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case _.custom:r="Invalid input";break;case _.invalid_intersection_types:r="Intersection results could not be merged";break;case _.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case _.not_finite:r="Number must be finite";break;default:r=e.defaultError,P.assertNever(t)}return{message:r}};let al=Tn;function ol(){return al}const il=t=>{const{data:e,path:r,errorMaps:n,issueData:a}=t,o=[...r,...a.path||[]],i={...a,path:o};if(a.message!==void 0)return{...a,path:o,message:a.message};let s="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)s=c(i,{data:e,defaultError:s}).message;return{...a,path:o,message:s}};function w(t,e){const r=ol(),n=il({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Tn?void 0:Tn].filter(a=>!!a)});t.common.issues.push(n)}class ne{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const a of r){if(a.status==="aborted")return M;a.status==="dirty"&&e.dirty(),n.push(a.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const a of r){const o=await a.key,i=await a.value;n.push({key:o,value:i})}return ne.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const a of r){const{key:o,value:i}=a;if(o.status==="aborted"||i.status==="aborted")return M;o.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(n[o.value]=i.value)}return{status:e.value,value:n}}}const M=Object.freeze({status:"aborted"}),rr=t=>({status:"dirty",value:t}),be=t=>({status:"valid",value:t}),ro=t=>t.status==="aborted",no=t=>t.status==="dirty",Ot=t=>t.status==="valid",Ir=t=>typeof Promise<"u"&&t instanceof Promise;var R;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(R||(R={}));class Ae{constructor(e,r,n,a){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=a}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 ao=(t,e)=>{if(Ot(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Ve(t.common.issues);return this._error=r,this._error}}};function O(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:a}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,s)=>{const{message:l}=t;return i.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??n??s.defaultError}:i.code!=="invalid_type"?{message:s.defaultError}:{message:l??r??s.defaultError}},description:a}}class N{get description(){return this._def.description}_getType(e){return et(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:et(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ne,ctx:{common:e.parent.common,data:e.data,parsedType:et(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Ir(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:et(e)},a=this._parseSync({data:e,path:n.path,parent:n});return ao(n,a)}"~validate"(e){const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:et(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:r});return Ot(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>Ot(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:et(e)},a=this._parse({data:e,path:n.path,parent:n}),o=await(Ir(a)?a:Promise.resolve(a));return ao(n,o)}refine(e,r){const n=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,o)=>{const i=e(a),s=()=>o.addIssue({code:_.custom,...n(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(s(),!1)):i?!0:(s(),!1)})}refinement(e,r){return this._refinement((n,a)=>e(n)?!0:(a.addIssue(typeof r=="function"?r(n,a):r),!1))}_refinement(e){return new Lt({schema:this,typeName:$.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:r=>this["~validate"](r)}}optional(){return rt.create(this,this._def)}nullable(){return Pt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Oe.create(this)}promise(){return Fr.create(this,this._def)}or(e){return Nr.create([this,e],this._def)}and(e){return Lr.create(this,e,this._def)}transform(e){return new Lt({...O(this._def),schema:this,typeName:$.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new On({...O(this._def),innerType:this,defaultValue:r,typeName:$.ZodDefault})}brand(){return new $l({typeName:$.ZodBranded,type:this,...O(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new In({...O(this._def),innerType:this,catchValue:r,typeName:$.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return jn.create(this,e)}readonly(){return Nn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const sl=/^c[^\s-]{8,}$/i,ll=/^[0-9a-z]+$/,cl=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ul=/^[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,dl=/^[a-z0-9_-]{21}$/i,fl=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,hl=/^[-+]?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)?)??$/,pl=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,vl="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let En;const ml=/^(?:(?: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])$/,gl=/^(?:(?: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])$/,bl=/^(([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]))$/,_l=/^(([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])$/,kl=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,yl=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,oo="((\\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])))",wl=new RegExp(`^${oo}$`);function io(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function xl(t){return new RegExp(`^${io(t)}$`)}function Cl(t){let e=`${oo}T${io(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Rl(t,e){return!!((e==="v4"||!e)&&ml.test(t)||(e==="v6"||!e)&&bl.test(t))}function Sl(t,e){if(!fl.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(n));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function Tl(t,e){return!!((e==="v4"||!e)&&gl.test(t)||(e==="v6"||!e)&&_l.test(t))}class Ue extends N{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==x.string){const o=this._getOrReturnCtx(e);return w(o,{code:_.invalid_type,expected:x.string,received:o.parsedType}),M}const n=new ne;let a;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:_.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:_.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const i=e.data.length>o.value,s=e.data.length<o.value;(i||s)&&(a=this._getOrReturnCtx(e,a),i?w(a,{code:_.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&w(a,{code:_.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")pl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"email",code:_.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")En||(En=new RegExp(vl,"u")),En.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"emoji",code:_.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")ul.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"uuid",code:_.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")dl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"nanoid",code:_.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")sl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"cuid",code:_.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")ll.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"cuid2",code:_.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")cl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"ulid",code:_.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),w(a,{validation:"url",code:_.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"regex",code:_.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(a=this._getOrReturnCtx(e,a),w(a,{code:_.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.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)||(a=this._getOrReturnCtx(e,a),w(a,{code:_.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(a=this._getOrReturnCtx(e,a),w(a,{code:_.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Cl(o).test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:_.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?wl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:_.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?xl(o).test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:_.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?hl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"duration",code:_.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?Rl(e.data,o.version)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"ip",code:_.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?Sl(e.data,o.alg)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"jwt",code:_.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?Tl(e.data,o.version)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"cidr",code:_.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?kl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"base64",code:_.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?yl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"base64url",code:_.invalid_string,message:o.message}),n.dirty()):P.assertNever(o);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(a=>e.test(a),{validation:r,code:_.invalid_string,...R.errToObj(n)})}_addCheck(e){return new Ue({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...R.errToObj(e)})}url(e){return this._addCheck({kind:"url",...R.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...R.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...R.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...R.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...R.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...R.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...R.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...R.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...R.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...R.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...R.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...R.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,...R.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,...R.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...R.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...R.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...R.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...R.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...R.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...R.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...R.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...R.errToObj(r)})}nonempty(e){return this.min(1,R.errToObj(e))}trim(){return new Ue({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ue({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ue({...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 r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Ue.create=t=>new Ue({checks:[],typeName:$.ZodString,coerce:t?.coerce??!1,...O(t)});function El(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,a=r>n?r:n,o=Number.parseInt(t.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return o%i/10**a}class It extends N{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)!==x.number){const o=this._getOrReturnCtx(e);return w(o,{code:_.invalid_type,expected:x.number,received:o.parsedType}),M}let n;const a=new ne;for(const o of this._def.checks)o.kind==="int"?P.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{code:_.invalid_type,expected:"integer",received:"float",message:o.message}),a.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),w(n,{code:_.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),w(n,{code:_.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="multipleOf"?El(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),w(n,{code:_.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{code:_.not_finite,message:o.message}),a.dirty()):P.assertNever(o);return{status:a.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,R.toString(r))}gt(e,r){return this.setLimit("min",e,!1,R.toString(r))}lte(e,r){return this.setLimit("max",e,!0,R.toString(r))}lt(e,r){return this.setLimit("max",e,!1,R.toString(r))}setLimit(e,r,n,a){return new It({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:R.toString(a)}]})}_addCheck(e){return new It({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:R.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:R.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:R.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:R.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:R.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:R.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:R.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:R.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:R.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&P.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}It.create=t=>new It({checks:[],typeName:$.ZodNumber,coerce:t?.coerce||!1,...O(t)});class nr extends N{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)!==x.bigint)return this._getInvalidInput(e);let n;const a=new ne;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),w(n,{code:_.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),w(n,{code:_.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),w(n,{code:_.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):P.assertNever(o);return{status:a.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return w(r,{code:_.invalid_type,expected:x.bigint,received:r.parsedType}),M}gte(e,r){return this.setLimit("min",e,!0,R.toString(r))}gt(e,r){return this.setLimit("min",e,!1,R.toString(r))}lte(e,r){return this.setLimit("max",e,!0,R.toString(r))}lt(e,r){return this.setLimit("max",e,!1,R.toString(r))}setLimit(e,r,n,a){return new nr({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:R.toString(a)}]})}_addCheck(e){return new nr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:R.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:R.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:R.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:R.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:R.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}nr.create=t=>new nr({checks:[],typeName:$.ZodBigInt,coerce:t?.coerce??!1,...O(t)});class $n extends N{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==x.boolean){const n=this._getOrReturnCtx(e);return w(n,{code:_.invalid_type,expected:x.boolean,received:n.parsedType}),M}return be(e.data)}}$n.create=t=>new $n({typeName:$.ZodBoolean,coerce:t?.coerce||!1,...O(t)});class jr extends N{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==x.date){const o=this._getOrReturnCtx(e);return w(o,{code:_.invalid_type,expected:x.date,received:o.parsedType}),M}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return w(o,{code:_.invalid_date}),M}const n=new ne;let a;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:_.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:_.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):P.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new jr({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:R.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:R.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}jr.create=t=>new jr({checks:[],coerce:t?.coerce||!1,typeName:$.ZodDate,...O(t)});class so extends N{_parse(e){if(this._getType(e)!==x.symbol){const n=this._getOrReturnCtx(e);return w(n,{code:_.invalid_type,expected:x.symbol,received:n.parsedType}),M}return be(e.data)}}so.create=t=>new so({typeName:$.ZodSymbol,...O(t)});class lo extends N{_parse(e){if(this._getType(e)!==x.undefined){const n=this._getOrReturnCtx(e);return w(n,{code:_.invalid_type,expected:x.undefined,received:n.parsedType}),M}return be(e.data)}}lo.create=t=>new lo({typeName:$.ZodUndefined,...O(t)});class co extends N{_parse(e){if(this._getType(e)!==x.null){const n=this._getOrReturnCtx(e);return w(n,{code:_.invalid_type,expected:x.null,received:n.parsedType}),M}return be(e.data)}}co.create=t=>new co({typeName:$.ZodNull,...O(t)});class uo extends N{constructor(){super(...arguments),this._any=!0}_parse(e){return be(e.data)}}uo.create=t=>new uo({typeName:$.ZodAny,...O(t)});class fo extends N{constructor(){super(...arguments),this._unknown=!0}_parse(e){return be(e.data)}}fo.create=t=>new fo({typeName:$.ZodUnknown,...O(t)});class tt extends N{_parse(e){const r=this._getOrReturnCtx(e);return w(r,{code:_.invalid_type,expected:x.never,received:r.parsedType}),M}}tt.create=t=>new tt({typeName:$.ZodNever,...O(t)});class ho extends N{_parse(e){if(this._getType(e)!==x.undefined){const n=this._getOrReturnCtx(e);return w(n,{code:_.invalid_type,expected:x.void,received:n.parsedType}),M}return be(e.data)}}ho.create=t=>new ho({typeName:$.ZodVoid,...O(t)});class Oe extends N{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),a=this._def;if(r.parsedType!==x.array)return w(r,{code:_.invalid_type,expected:x.array,received:r.parsedType}),M;if(a.exactLength!==null){const i=r.data.length>a.exactLength.value,s=r.data.length<a.exactLength.value;(i||s)&&(w(r,{code:i?_.too_big:_.too_small,minimum:s?a.exactLength.value:void 0,maximum:i?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(w(r,{code:_.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(w(r,{code:_.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,s)=>a.type._parseAsync(new Ae(r,i,r.path,s)))).then(i=>ne.mergeArray(n,i));const o=[...r.data].map((i,s)=>a.type._parseSync(new Ae(r,i,r.path,s)));return ne.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new Oe({...this._def,minLength:{value:e,message:R.toString(r)}})}max(e,r){return new Oe({...this._def,maxLength:{value:e,message:R.toString(r)}})}length(e,r){return new Oe({...this._def,exactLength:{value:e,message:R.toString(r)}})}nonempty(e){return this.min(1,e)}}Oe.create=(t,e)=>new Oe({type:t,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...O(e)});function jt(t){if(t instanceof U){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=rt.create(jt(n))}return new U({...t._def,shape:()=>e})}else return t instanceof Oe?new Oe({...t._def,type:jt(t.element)}):t instanceof rt?rt.create(jt(t.unwrap())):t instanceof Pt?Pt.create(jt(t.unwrap())):t instanceof gt?gt.create(t.items.map(e=>jt(e))):t}class U extends N{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=P.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==x.object){const c=this._getOrReturnCtx(e);return w(c,{code:_.invalid_type,expected:x.object,received:c.parsedType}),M}const{status:n,ctx:a}=this._processInputParams(e),{shape:o,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof tt&&this._def.unknownKeys==="strip"))for(const c in a.data)i.includes(c)||s.push(c);const l=[];for(const c of i){const u=o[c],h=a.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Ae(a,h,a.path,c)),alwaysSet:c in a.data})}if(this._def.catchall instanceof tt){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:a.data[u]}});else if(c==="strict")s.length>0&&(w(a,{code:_.unrecognized_keys,keys:s}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const h=a.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Ae(a,h,a.path,u)),alwaysSet:u in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const h=await u.key,d=await u.value;c.push({key:h,value:d,alwaysSet:u.alwaysSet})}return c}).then(c=>ne.mergeObjectSync(n,c)):ne.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return R.errToObj,new U({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{const a=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:R.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new U({...this._def,unknownKeys:"strip"})}passthrough(){return new U({...this._def,unknownKeys:"passthrough"})}extend(e){return new U({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new U({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:$.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new U({...this._def,catchall:e})}pick(e){const r={};for(const n of P.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new U({...this._def,shape:()=>r})}omit(e){const r={};for(const n of P.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new U({...this._def,shape:()=>r})}deepPartial(){return jt(this)}partial(e){const r={};for(const n of P.objectKeys(this.shape)){const a=this.shape[n];e&&!e[n]?r[n]=a:r[n]=a.optional()}return new U({...this._def,shape:()=>r})}required(e){const r={};for(const n of P.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof rt;)o=o._def.innerType;r[n]=o}return new U({...this._def,shape:()=>r})}keyof(){return mo(P.objectKeys(this.shape))}}U.create=(t,e)=>new U({shape:()=>t,unknownKeys:"strip",catchall:tt.create(),typeName:$.ZodObject,...O(e)}),U.strictCreate=(t,e)=>new U({shape:()=>t,unknownKeys:"strict",catchall:tt.create(),typeName:$.ZodObject,...O(e)}),U.lazycreate=(t,e)=>new U({shape:t,unknownKeys:"strip",catchall:tt.create(),typeName:$.ZodObject,...O(e)});class Nr extends N{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function a(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;const i=o.map(s=>new Ve(s.ctx.common.issues));return w(r,{code:_.invalid_union,unionErrors:i}),M}if(r.common.async)return Promise.all(n.map(async o=>{const i={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(a);{let o;const i=[];for(const l of n){const c={...r,common:{...r.common,issues:[]},parent:null},u=l._parseSync({data:r.data,path:r.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const s=i.map(l=>new Ve(l));return w(r,{code:_.invalid_union,unionErrors:s}),M}}get options(){return this._def.options}}Nr.create=(t,e)=>new Nr({options:t,typeName:$.ZodUnion,...O(e)});function Mn(t,e){const r=et(t),n=et(e);if(t===e)return{valid:!0,data:t};if(r===x.object&&n===x.object){const a=P.objectKeys(e),o=P.objectKeys(t).filter(s=>a.indexOf(s)!==-1),i={...t,...e};for(const s of o){const l=Mn(t[s],e[s]);if(!l.valid)return{valid:!1};i[s]=l.data}return{valid:!0,data:i}}else if(r===x.array&&n===x.array){if(t.length!==e.length)return{valid:!1};const a=[];for(let o=0;o<t.length;o++){const i=t[o],s=e[o],l=Mn(i,s);if(!l.valid)return{valid:!1};a.push(l.data)}return{valid:!0,data:a}}else return r===x.date&&n===x.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Lr extends N{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),a=(o,i)=>{if(ro(o)||ro(i))return M;const s=Mn(o.value,i.value);return s.valid?((no(o)||no(i))&&r.dirty(),{status:r.value,value:s.data}):(w(n,{code:_.invalid_intersection_types}),M)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,i])=>a(o,i)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Lr.create=(t,e,r)=>new Lr({left:t,right:e,typeName:$.ZodIntersection,...O(r)});class gt extends N{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==x.array)return w(n,{code:_.invalid_type,expected:x.array,received:n.parsedType}),M;if(n.data.length<this._def.items.length)return w(n,{code:_.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),M;!this._def.rest&&n.data.length>this._def.items.length&&(w(n,{code:_.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...n.data].map((i,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Ae(n,i,n.path,s)):null}).filter(i=>!!i);return n.common.async?Promise.all(o).then(i=>ne.mergeArray(r,i)):ne.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new gt({...this._def,rest:e})}}gt.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new gt({items:t,typeName:$.ZodTuple,rest:null,...O(e)})};class Pr extends N{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==x.object)return w(n,{code:_.invalid_type,expected:x.object,received:n.parsedType}),M;const a=[],o=this._def.keyType,i=this._def.valueType;for(const s in n.data)a.push({key:o._parse(new Ae(n,s,n.path,s)),value:i._parse(new Ae(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?ne.mergeObjectAsync(r,a):ne.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof N?new Pr({keyType:e,valueType:r,typeName:$.ZodRecord,...O(n)}):new Pr({keyType:Ue.create(),valueType:e,typeName:$.ZodRecord,...O(r)})}}class po extends N{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==x.map)return w(n,{code:_.invalid_type,expected:x.map,received:n.parsedType}),M;const a=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([s,l],c)=>({key:a._parse(new Ae(n,s,n.path,[c,"key"])),value:o._parse(new Ae(n,l,n.path,[c,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return M;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(c.value,u.value)}return{status:r.value,value:s}})}else{const s=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return M;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(c.value,u.value)}return{status:r.value,value:s}}}}po.create=(t,e,r)=>new po({valueType:e,keyType:t,typeName:$.ZodMap,...O(r)});class ar extends N{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==x.set)return w(n,{code:_.invalid_type,expected:x.set,received:n.parsedType}),M;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(w(n,{code:_.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(w(n,{code:_.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const o=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return M;u.status==="dirty"&&r.dirty(),c.add(u.value)}return{status:r.value,value:c}}const s=[...n.data.values()].map((l,c)=>o._parse(new Ae(n,l,n.path,c)));return n.common.async?Promise.all(s).then(l=>i(l)):i(s)}min(e,r){return new ar({...this._def,minSize:{value:e,message:R.toString(r)}})}max(e,r){return new ar({...this._def,maxSize:{value:e,message:R.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}ar.create=(t,e)=>new ar({valueType:t,minSize:null,maxSize:null,typeName:$.ZodSet,...O(e)});class vo extends N{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}vo.create=(t,e)=>new vo({getter:t,typeName:$.ZodLazy,...O(e)});class An extends N{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return w(r,{received:r.data,code:_.invalid_literal,expected:this._def.value}),M}return{status:"valid",value:e.data}}get value(){return this._def.value}}An.create=(t,e)=>new An({value:t,typeName:$.ZodLiteral,...O(e)});function mo(t,e){return new Nt({values:t,typeName:$.ZodEnum,...O(e)})}class Nt extends N{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return w(r,{expected:P.joinValues(n),received:r.parsedType,code:_.invalid_type}),M}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return w(r,{received:r.data,code:_.invalid_enum_value,options:n}),M}return be(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return Nt.create(e,{...this._def,...r})}exclude(e,r=this._def){return Nt.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}Nt.create=mo;class go extends N{_parse(e){const r=P.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==x.string&&n.parsedType!==x.number){const a=P.objectValues(r);return w(n,{expected:P.joinValues(a),received:n.parsedType,code:_.invalid_type}),M}if(this._cache||(this._cache=new Set(P.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=P.objectValues(r);return w(n,{received:n.data,code:_.invalid_enum_value,options:a}),M}return be(e.data)}get enum(){return this._def.values}}go.create=(t,e)=>new go({values:t,typeName:$.ZodNativeEnum,...O(e)});class Fr extends N{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==x.promise&&r.common.async===!1)return w(r,{code:_.invalid_type,expected:x.promise,received:r.parsedType}),M;const n=r.parsedType===x.promise?r.data:Promise.resolve(r.data);return be(n.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Fr.create=(t,e)=>new Fr({type:t,typeName:$.ZodPromise,...O(e)});class Lt extends N{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),a=this._def.effect||null,o={addIssue:i=>{w(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),a.type==="preprocess"){const i=a.transform(n.data,o);if(n.common.async)return Promise.resolve(i).then(async s=>{if(r.value==="aborted")return M;const l=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return l.status==="aborted"?M:l.status==="dirty"||r.value==="dirty"?rr(l.value):l});{if(r.value==="aborted")return M;const s=this._def.schema._parseSync({data:i,path:n.path,parent:n});return s.status==="aborted"?M:s.status==="dirty"||r.value==="dirty"?rr(s.value):s}}if(a.type==="refinement"){const i=s=>{const l=a.refinement(s,o);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?M:(s.status==="dirty"&&r.dirty(),i(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?M:(s.status==="dirty"&&r.dirty(),i(s.value).then(()=>({status:r.value,value:s.value}))))}if(a.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ot(i))return M;const s=a.transform(i.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>Ot(i)?Promise.resolve(a.transform(i.value,o)).then(s=>({status:r.value,value:s})):M);P.assertNever(a)}}Lt.create=(t,e,r)=>new Lt({schema:t,typeName:$.ZodEffects,effect:e,...O(r)}),Lt.createWithPreprocess=(t,e,r)=>new Lt({schema:e,effect:{type:"preprocess",transform:t},typeName:$.ZodEffects,...O(r)});class rt extends N{_parse(e){return this._getType(e)===x.undefined?be(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}rt.create=(t,e)=>new rt({innerType:t,typeName:$.ZodOptional,...O(e)});class Pt extends N{_parse(e){return this._getType(e)===x.null?be(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Pt.create=(t,e)=>new Pt({innerType:t,typeName:$.ZodNullable,...O(e)});class On extends N{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===x.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}On.create=(t,e)=>new On({innerType:t,typeName:$.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...O(e)});class In extends N{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ir(a)?a.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ve(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ve(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}In.create=(t,e)=>new In({innerType:t,typeName:$.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...O(e)});class bo extends N{_parse(e){if(this._getType(e)!==x.nan){const n=this._getOrReturnCtx(e);return w(n,{code:_.invalid_type,expected:x.nan,received:n.parsedType}),M}return{status:"valid",value:e.data}}}bo.create=t=>new bo({typeName:$.ZodNaN,...O(t)});class $l extends N{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class jn extends N{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?M:o.status==="dirty"?(r.dirty(),rr(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?M:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(e,r){return new jn({in:e,out:r,typeName:$.ZodPipeline})}}class Nn extends N{_parse(e){const r=this._def.innerType._parse(e),n=a=>(Ot(a)&&(a.value=Object.freeze(a.value)),a);return Ir(r)?r.then(a=>n(a)):n(r)}unwrap(){return this._def.innerType}}Nn.create=(t,e)=>new Nn({innerType:t,typeName:$.ZodReadonly,...O(e)});var $;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})($||($={}));const f=Ue.create,Br=It.create,Ie=$n.create;tt.create;const or=Oe.create,F=U.create,zr=Nr.create;Lr.create,gt.create;const nt=Pr.create,Ml=An.create,Dr=Nt.create;Fr.create,rt.create,Pt.create;const Al=640,Ol=1024;let Zr=null;const Il=()=>{if(Zr)return Zr;if(!globalThis.document)return 16;const t=globalThis.document.querySelector(":root");return Zr=Number(getComputedStyle(t).fontSize.slice(0,-2)),Zr},_o=({minRem:t,maxRem:e})=>{const r=Il(),n=Al/r,a=Ol/r,o=(e-t)/(a-n),i=-n*o+t;return`clamp( ${t}rem, ${i}rem + ${o*100}cqw, ${e}rem )`},Ln=F({minRem:Br(),maxRem:Br()}),jl=Ln.or(f()),Vr=F({0:f().optional(),50:f(),100:f(),200:f(),300:f(),400:f(),500:f(),600:f(),700:f(),800:f(),900:f(),950:f(),1e3:f().optional()}),Pn=F({color:f().optional(),background:f().optional(),borderWidth:f().optional(),borderColor:f().optional(),boxShadow:f().optional()}),Nl=F({borderRadius:jl.optional(),custom:nt(f(),zr([f(),Br()])).optional(),hover:Pn.optional(),focus:Pn.optional()}).and(Pn),Ll=F({family:f()}),Pl=nt(Dr(["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","listUnordered","lightMode","darkMode"]),f()),Fl=F({font:Ll,colors:F({brand:Vr,accent:Vr.optional(),highlight:Vr,grey:Vr}),base:F({}),components:nt(f(),Nl),svgs:Pl}),Ur=F({customCSS:f().optional(),fontCSS:f().optional(),fontURLs:f().array().optional(),tokens:Fl});F({light:Ur,dark:Ur});const Bl=F({light:Ur,dark:Ur}).deepPartial(),ko=t=>typeof t=="string"?t:typeof t=="number"?String(t):typeof t=="object"?t.minRem===t.maxRem?`${t.minRem}rem`:_o(t):"",Fn=(t,e,r,n=!1)=>{let a="";return r.forEach(o=>{let i=e[o];n&&!i&&o==="borderWidth"&&(i="0px"),n&&!i&&o==="borderColor"&&(i="transparent"),i&&(a+=`--${Or(t)}-${Or(o)}:${ko(i)}; `)}),a},yo=(t,e)=>Object.entries(e).map(([r,n])=>`--${t}-${Or(r)}:${ko(n)}`).join("; ")+"; ",zl=(t,e)=>{let r="";return r+=Fn(t,e,["background","borderWidth","borderColor","boxShadow","borderRadius","color"],!0),e.hover&&(r+=Fn(`${t}-hover`,e.hover,["background","borderWidth","borderColor","boxShadow","color"])),e.focus&&(r+=Fn(`${t}-focus`,e.focus,["background","borderWidth","borderColor","boxShadow","color"])),e.custom&&(r+=yo(t,e.custom)),r},Dl=(t,e)=>Object.entries(e).map(([r,n])=>`--color-${t}-${r}:${n}`).join("; ")+"; ",Zl=t=>`--font-family: ${t.family};`,Vl=t=>{const e=Zl(t.font),r=Object.entries(t.colors).map(([o,i])=>Dl(o,i)).join(""),n=yo("base",t.base),a=Object.entries(t.components).map(([o,i])=>zl(Or(o),i)).join("");return`.chat-app {${e} ${r} ${n} ${a}};`};var Bn={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};const wo=F({50:f(),100:f(),200:f(),300:f(),400:f(),500:f(),600:f(),700:f(),800:f(),900:f(),950:f()}),xo=Dr(["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]),Co=zr([wo,xo]),Ul=zr([wo.and(F({0:f(),1e3:f()})),xo]),Ro=F({avatarImageUrl:f().optional(),colors:F({brand:Co.optional(),highlight:Co.optional(),grey:Ul.optional(),background:f().optional(),text:f().optional(),anchor:F({default:f().optional(),hover:f().optional()}).optional()}).optional(),font:F({size:Ln.optional(),family:f().optional(),urls:or(f()).optional()}).optional(),borderRadius:Ln.optional(),fineGrained:Bl.optional()}),ql=F({blocked:f(),maintenance:f(),"rate-limit":f(),"server-error":f(),"too-short":f(),"too-long":f(),"quota-reached":f(),aborted:f(),"sse-error":f(),"client-error":f(),"unexpected-call":f(),"incomplete-error":f(),"feedback-failed":f(),"speech-not-supported":f(),"speech-transcription-failed":f(),"speech-no-text-detected":f(),"speech-microphone-access-denied":f(),"pii-detected":f()}),Wl=F({email:f(),creditCard:f(),ahv:f(),phoneSwiss:f(),phoneInternational:f(),swissPassport:f(),longNumber:f()}),So=F({predefinedQuestions:f(),introductionTitle:f(),introductionDisclaimer:f().optional(),chatInputPlaceholder:f(),chatInputPlaceholderListening:f().optional(),chatInputSubmit:f(),chatInputStartListening:f(),chatInputStopListening:f(),referenceLink:f(),referencesDisplay:f(),referencesHide:f(),referencesTitle:f(),referencesFurtherTitle:f(),newChat:f(),maintenanceModeError:f(),messageBotLoading:f(),messageBotError:f(),messageBotDefaultError:f(),chatFooterText:f().optional(),scrollToBottom:f(),openButtonTitle:f().optional(),openButtonDescription:f().optional(),openMenu:f(),openInfo:f(),aboutThisChat:f().optional(),closeMenu:f(),closeChat:f(),close:f(),send:f(),thankYouForFeedback:f(),giveFeedback:f(),sendFeedback:f(),feedbackFormTitle:f(),feedbackFormMessage:f(),feedbackFormMessagePlaceholder:f(),feedbackFormEmail:f(),feedbackFormEmailPlaceholder:f(),answerGood:f(),answerBad:f(),classificationSubmit:f(),classificationThankYou:f(),classificationTitle:f(),selectLanguage:f(),lightMode:f(),darkMode:f()}),Ft=Dr(["en","de","fr","it"]),To=nt(Ft,So.partial());nt(Ft,ql),nt(Ft,Wl);const Eo=F({label:f(),options:or(F({label:f(),value:Br()}))}),Gl=F({label:f(),icon:f(),url:f(),target:Dr(["_blank","_self"]).optional()}),Hl=F({label:f().nullable(),question:f()}),$o=F({impact:Eo.optional(),quality:Eo.optional()});F({classification:$o.optional()}),F({predefinedQuestions:or(Hl)}),zr([F({maintenance:Ml(!0)}),F({id:f(),cID:f()})]),nt(Ft,So);const Yl=F({showPredefinedQuestions:Ie(),showOverallFeedbackButton:Ie(),showCloseChatButton:Ie(),showContextMenu:Ie(),showContextInfo:Ie(),allowAudioInput:Ie(),blockPII:Ie(),questionPrefix:f(),menu:nt(Ft,or(Gl)).optional(),supportedLanguages:or(Ft),classification:$o.optional(),showTextFeedback:Ie(),theme:Ro,translations:To,buttonHref:f().optional(),addQueryToUrlParams:Ie().optional(),renderKatex:Ie().optional()}).partial().and(F({theme:F({name:f().optional()}).optional()})),zn=t=>typeof t=="string"?Bn[t]:t,Ql=t=>{const e=zn(t?.colors?.brand||Bn.gray),r=zn(t?.colors?.highlight||e),n={0:"#ffffff",1e3:"#000000",...zn(t?.colors?.grey||Bn.gray)},a={avatarImageUrl:t.avatarImageUrl,colors:{brand:e,highlight:r,grey:n,background:t?.colors?.background||n[0],text:t?.colors?.text||n[900],anchor:{default:t?.colors?.anchor?.default||e[600],hover:t?.colors?.anchor?.hover||e[800]}},font:{size:t.font?.size||{minRem:1,maxRem:1.2},family:t.font?.family||"-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif",urls:t.font?.urls||[]},borderRadius:t.borderRadius||{minRem:.25,maxRem:.5}};let o="";return a.avatarImageUrl?o=`<img src="${a.avatarImageUrl}" alt="Avatar" style="width: 100%; height: 100%; object-fit: cover; border-radius: 50%; aspect-ratio: 1 / 1; display: block; filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.1));" />`:o=`
17
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" width="100" height="100" shape-rendering="geometricPrecision" text-rendering="geometricPrecision">
18
- <style>
19
- .svg--avatar {
20
- --logo-color1: ${a.colors.brand[500]}; /* Denser blue */
21
- --logo-color1-transparent: ${a.colors.brand[400]};
22
-
23
- --logo-color2: ${a.colors.highlight[400]}; /* Light purple */
24
- --logo-color2-transparent: ${a.colors.highlight[500]};
25
-
26
- --logo-color3: ${a.colors.brand[400]}; /* Pink-orange */
27
- --logo-color3-transparent: ${a.colors.highlight[500]};
28
-
29
- --logo-color4: ${a.colors.highlight[400]}; /* Magenta */
30
- --logo-color4-transparent: ${a.colors.brand[500]};
31
-
32
- --logo-glass-color: oklch(1 0 0 / 0.2); /* Soft white glass effect */
33
- }
34
-
35
- #group1 {
36
- animation: group1_anim 8000ms ease-in-out infinite normal forwards;
37
- }
38
-
39
- @keyframes group1_anim {
40
- 0% { transform: translate(30px, 30px); }
41
- 25% { transform: translate(50px, 100px); }
42
- 50% { transform: translate(90px, 30px); }
43
- 75% { transform: translate(50px, 50px); }
44
- 100% { transform: translate(30px, 30px); }
45
- }
46
-
47
- #group2 {
48
- animation: group2_anim 8000ms ease-in-out infinite normal forwards;
49
- }
50
-
51
- @keyframes group2_anim {
52
- 0% { transform: translate(-35px, -35px); }
53
- 25% { transform: translate(25px, 40px); }
54
- 50% { transform: translate(100px, 35px); }
55
- 75% { transform: translate(25px, 25px); }
56
- 100% { transform: translate(-35px, -35px); }
57
- }
58
-
59
- #group3 {
60
- overflow: visible;
61
- animation: group3_anim 8000ms ease-in-out infinite normal forwards;
62
- }
63
-
64
- @keyframes group3_anim {
65
- 0% { transform: translate(120px, 20px); }
66
- 25% { transform: translate(30px, 17px); }
67
- 50% { transform: translate(35px, 20px); }
68
- 75% { transform: translate(30px, 120px); }
69
- 100% { transform: translate(120px, 20px); }
70
- }
71
-
72
- #group4 {
73
- animation: group4_anim 12000ms ease-in-out infinite normal forwards;
74
- }
75
-
76
- @keyframes group4_anim {
77
- 0% { transform: translate(40px, -40px); }
78
- 25% { transform: translate(25px, 45px); }
79
- 50% { transform: translate(-20px, 120px); }
80
- 75% { transform: translate(50px, 0px); }
81
- 100% { transform: translate(40px, -40px); }
82
- }
83
- </style>
84
- <defs>
85
- <!-- Define the circular masks -->
86
- <mask id="circleMask1">
87
- <rect width="100" height="100" fill="black" />
88
- <circle cx="50" cy="50" r="50" fill="white" />
89
- </mask>
90
- <mask id="circleMask2">
91
- <rect width="100" height="100" fill="black" />
92
- <circle cx="50" cy="50" r="46" fill="white" />
93
- </mask>
94
-
95
- <!-- Radial Gradients for Animations -->
96
- <radialGradient id="gradient1" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
97
- <stop offset="0%" stop-color="var(--logo-color1)" />
98
- <stop offset="80%" stop-color="var(--logo-color1-transparent)" />
99
- </radialGradient>
100
- <radialGradient id="gradient2" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
101
- <stop offset="0%" stop-color="var(--logo-color2)" />
102
- <stop offset="80%" stop-color="var(--logo-color2-transparent)" />
103
- </radialGradient>
104
- <radialGradient id="gradient3" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
105
- <stop offset="0%" stop-color="var(--logo-color3)" />
106
- <stop offset="50%" stop-color="var(--logo-color3-transparent)" />
107
- </radialGradient>
108
- <radialGradient id="gradient4" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
109
- <stop offset="0%" stop-color="var(--logo-color4)" />
110
- <stop offset="80%" stop-color="var(--logo-color4-transparent)" />
111
- </radialGradient>
112
-
113
- <!-- Radial Gradient for Centered Disc -->
114
- <radialGradient id="centerGradient" cx="0.5" cy="0.5" r="0.5" spreadMethod="pad">
115
- <stop offset="0%" stop-color="rgba(255, 255, 255, 0)" />
116
- <stop offset="75%" stop-color="rgba(255, 255, 255, 0)" />
117
- <stop offset="100%" stop-color="var(--logo-glass-color)" />
118
- </radialGradient>
119
-
120
- <!-- Gaussian blur filter -->
121
- <filter id="blurFilter" x="-150%" y="-150%" width="400%" height="400%">
122
- <feGaussianBlur stdDeviation="8" />
123
- </filter>
124
-
125
-
126
-
127
-
128
- </defs>
129
-
130
- <!-- Larger Disc (border) -->
131
- <g mask="url(#circleMask1)">
132
- <circle cx="50" cy="50" r="50" fill="var(--logo-color2)" />
133
- <g id="group1">
134
- <ellipse x="50" rx="500" ry="80" fill="url(#gradient3)" filter="url(#blurFilter)" />
135
- </g>
136
- <g id="group2">
137
- <ellipse rx="100" ry="100" fill="url(#gradient2)" filter="url(#blurFilter)" />
138
- </g>
139
- <g id="group3">
140
- <ellipse rx="100" ry="100" fill="url(#gradient1)" filter="url(#blurFilter)" />
141
- </g>
142
- </g>
143
-
144
- <!-- Smaller Disc -->
145
- <g mask="url(#circleMask2)">
146
- <circle cx="50" cy="50" r="46" fill="var(--logo-color1)" />
147
- <g id="group1">
148
- <ellipse x="50" rx="100" ry="80" fill="url(#gradient1)" filter="url(#blurFilter)" />
149
- </g>
150
- <g id="group2">
151
- <ellipse rx="80" ry="50" fill="url(#gradient2)" filter="url(#blurFilter)" />
152
- </g>
153
- <g id="group3">
154
- <ellipse rx="60" ry="40" fill="url(#gradient3)" filter="url(#blurFilter)" />
155
- </g>
156
- <g id="group4">
157
- <ellipse rx="30" ry="40" fill="url(#gradient4)" filter="url(#blurFilter)" />
158
- </g>
159
-
160
- <!-- Grain -->
161
- <circle cx="50" cy="50" r="46" fill="url(#centerGradient)" filter='url(#grainFilter)' style="mix-blend-mode: soft-light;" />
162
- </g>
163
-
164
- <!-- Grain -->
165
- <circle cx="50" cy="50" r="46" fill="url(#centerGradient)" />
166
- </svg>
167
- `,{fontURLs:a.font.urls,tokens:{font:{family:a.font.family},colors:{brand:a.colors.brand,highlight:a.colors.highlight,grey:a.colors.grey},base:{},components:{body:{background:a.colors.background,color:a.colors.text,custom:{fontSize:_o(a.font.size)}},anchor:{color:a.colors.anchor.default,hover:{color:a.colors.anchor.hover}},btnPrimary:{background:a.colors.brand[600],color:a.colors.grey[0],borderRadius:{minRem:a.borderRadius.minRem,maxRem:a.borderRadius.maxRem},hover:{background:a.colors.brand[700],color:a.colors.grey[0]}},btnSecondary:{background:a.colors.grey[100],color:a.colors.brand[700],borderRadius:{minRem:a.borderRadius.minRem,maxRem:a.borderRadius.maxRem},hover:{background:a.colors.brand[100],color:a.colors.grey[800]}},btnTertiary:{background:a.colors.grey[100],color:a.colors.grey[700],borderRadius:{minRem:a.borderRadius.minRem,maxRem:a.borderRadius.maxRem},hover:{background:a.colors.grey[300],color:a.colors.grey[800]}},input:{borderRadius:{minRem:a.borderRadius.minRem,maxRem:a.borderRadius.maxRem}},chatMenu:{borderRadius:{minRem:a.borderRadius.minRem,maxRem:a.borderRadius.maxRem}},chatMenuItem:{borderRadius:{minRem:a.borderRadius.minRem/2,maxRem:a.borderRadius.maxRem/2}},card:{borderRadius:{minRem:a.borderRadius.minRem,maxRem:a.borderRadius.maxRem}},chatFooter:{borderRadius:{minRem:a.borderRadius.minRem,maxRem:a.borderRadius.maxRem}},chatInput:{borderRadius:{minRem:a.borderRadius.minRem,maxRem:a.borderRadius.maxRem}},chatInputSubmit:{background:a.colors.brand[600],borderRadius:{minRem:a.borderRadius.minRem/1.25,maxRem:a.borderRadius.maxRem/1.25}},dialog:{background:a.colors.grey[50],borderRadius:{minRem:a.borderRadius.minRem,maxRem:a.borderRadius.maxRem}},message:{borderRadius:{minRem:a.borderRadius.minRem,maxRem:a.borderRadius.maxRem}},messageUser:{borderRadius:{minRem:a.borderRadius.minRem,maxRem:a.borderRadius.maxRem}},reference:{borderRadius:{minRem:a.borderRadius.minRem,maxRem:a.borderRadius.maxRem}},referenceNumberContent:{borderRadius:{minRem:a.borderRadius.minRem,maxRem:a.borderRadius.maxRem}},referenceNumberTrigger:{borderRadius:{minRem:a.borderRadius.minRem/2,maxRem:a.borderRadius.maxRem/2}},toast:{borderRadius:{minRem:a.borderRadius.minRem,maxRem:a.borderRadius.maxRem}},tooltip:{borderRadius:{minRem:a.borderRadius.minRem/2,maxRem:a.borderRadius.maxRem/2}}},svgs:{avatar:o,predefinedQuestion:`
168
- <svg viewBox="0 0 24 24" >
169
- <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>
170
- <path d="M0.5 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
171
- <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>
172
- <path d="M13 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
173
- </svg>
174
- `}}}};function Kl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Dn,Mo;function Jl(){if(Mo)return Dn;Mo=1;var t=function(k){return e(k)&&!r(k)};function e(m){return!!m&&typeof m=="object"}function r(m){var k=Object.prototype.toString.call(m);return k==="[object RegExp]"||k==="[object Date]"||o(m)}var n=typeof Symbol=="function"&&Symbol.for,a=n?Symbol.for("react.element"):60103;function o(m){return m.$$typeof===a}function i(m){return Array.isArray(m)?[]:{}}function s(m,k){return k.clone!==!1&&k.isMergeableObject(m)?v(i(m),m,k):m}function l(m,k,p){return m.concat(k).map(function(y){return s(y,p)})}function c(m,k){if(!k.customMerge)return v;var p=k.customMerge(m);return typeof p=="function"?p:v}function u(m){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(m).filter(function(k){return Object.propertyIsEnumerable.call(m,k)}):[]}function h(m){return Object.keys(m).concat(u(m))}function d(m,k){try{return k in m}catch{return!1}}function g(m,k){return d(m,k)&&!(Object.hasOwnProperty.call(m,k)&&Object.propertyIsEnumerable.call(m,k))}function b(m,k,p){var y={};return p.isMergeableObject(m)&&h(m).forEach(function(C){y[C]=s(m[C],p)}),h(k).forEach(function(C){g(m,C)||(d(m,C)&&p.isMergeableObject(k[C])?y[C]=c(C,p)(m[C],k[C],p):y[C]=s(k[C],p))}),y}function v(m,k,p){p=p||{},p.arrayMerge=p.arrayMerge||l,p.isMergeableObject=p.isMergeableObject||t,p.cloneUnlessOtherwiseSpecified=s;var y=Array.isArray(k),C=Array.isArray(m),L=y===C;return L?y?p.arrayMerge(m,k,p):b(m,k,p):s(k,p)}v.all=function(k,p){if(!Array.isArray(k))throw new Error("first argument should be an array");return k.reduce(function(y,C){return v(y,C,p)},{})};var S=v;return Dn=S,Dn}var Xl=Jl();const at=Kl(Xl),Ao={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"}},base:{},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)"}},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)"}},aside:{background:"var(--card-background)",custom:{width:"400px",containerWidthForMobileLayout:768,backgroundOverlay:"rgba(0, 0, 0, 0.4)",headerColor:"var(--card-color)",headerBorderColor:"var(--line-color)",headerBorderWidth:"1px"}},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}},messageReferences:{color:"var(--anchor-color)",background:"transparent",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--anchor-hover-color)"}},messageUser:{color:"var(--body-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)"}},referencesToggle:{color:"var(--anchor-color)",hover:{color:"var(--anchor-hover-color)"}},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)"},custom:{padding:"1px 0.4em 0"}},referenceDomain:{color:"var(--anchor-color)",hover:{color:"var(--anchor-hover-color)"},custom:{padding:"0px"}},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}},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(--body-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"}},referenceDescription:{color:"var(--reference-color)",hover:{color:"var(--reference-hover-color)"}},referenceNumber:{color:"var(--reference-number-trigger-color)",background:"var(--body-background)",borderColor:"var(--reference-number-trigger-border-color)",borderWidth:"var(--reference-number-trigger-border-width)",borderRadius:"var(--reference-number-trigger-border-radius)",hover:{color:"var(--reference-number-trigger-color)",background:"var(--reference-number-trigger-background)",borderColor:"var(--reference-number-trigger-border-color)",borderWidth:"var(--reference-number-trigger-border-width)"},custom:{padding:"1px 0.4em 0"}},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">
15
+ sans-serif;}.error-message__retry-button.svelte-4thrqu {border:none;outline:none;background:none;font-size:1rem;text-decoration:underline;&:active {outline:none;}}`};function ro(t,e){Ct(e,!0),Cs(t,Us);const r=(c,u=hr,h=hr)=>{ta();var d=Vs(),g=se(d),b=Je(g);{var v=m=>{},T=m=>{var k=Zs(),p=Ee(k),y=Je(Ee(p));y.__click=[Ds,h],Te(p),Te(k),Z(m,k)};Ve(b,m=>{a()?m(v):m(T,!1)})}Yt(m=>ms(g,`${m??""} `),[()=>console.error(`Panic, uncaught error:
16
+ `,u())??""]),Z(c,d)};let n=W(e,"body",7),a=W(e,"silent",7),o=fe(void 0);const i=c=>{ie(o,{error:c},!0)};var s=Ae(),l=se(s);return Pi(l,{get failed(){return r}},c=>{var u=Ae(),h=se(u);{var d=b=>{r(b,()=>E(o).error,()=>()=>{ie(o,void 0)})},g=b=>{var v=Ae(),T=se(v);gn(T,n,()=>i),Z(b,v)};Ve(h,b=>{E(o)?b(d):b(g,!1)})}Z(c,u)}),Z(t,s),St({get body(){return n()},set body(c){n(c),V()},get silent(){return a()},set silent(c){a(c),V()}})}vn(["click"]),tr(ro,{body:{},silent:{}},[],[],!0);const qs='@layer base,utilities,components;/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::-moz-placeholder{color:currentcolor}@supports (color: color-mix(in lab,red,red)){{color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor}@supports (color: color-mix(in lab,red,red)){{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer base{.chat-app{--spacer-1: .0625rem;--spacer-2: .125rem;--spacer-3: .1875rem;--spacer-4: .25rem;--spacer-5: .3125rem;--spacer-6: .375rem;--spacer-8: .5rem;--spacer-10: .625rem;--spacer-12: .75rem;--spacer-16: 1rem;--spacer-20: 1.25rem;--spacer-24: 1.5rem;--spacer-28: 1.75rem;--spacer-32: 2rem;--spacer-40: 2.5rem;--spacer-48: 3rem;--spacer-56: 3.5rem;--spacer-64: 4rem;--spacer-80: 5rem;--spacer-120: 7.5rem;--spacer-r-8: clamp(.375rem, .3182rem + .2841cqw, .5rem);--spacer-r-12: clamp(.625rem, .5682rem + .2841cqw, .75rem);--spacer-r-16: clamp(.75rem, .6364rem + .5682cqw, 1rem);--spacer-r-20: clamp(.875rem, .7045rem + .8523cqw, 1.25rem);--spacer-r-24: clamp(1rem, .7727rem + 1.1364cqw, 1.5rem);--spacer-r-28: clamp(1.125rem, .8409rem + 1.4205cqw, 1.75rem);--spacer-r-32: clamp(1.25rem, .9091rem + 1.7045cqw, 2rem);--spacer-r-40: clamp(1.5rem, 1.0455rem + 2.2727cqw, 2.5rem);--spacer-r-48: clamp(1.625rem, 1rem + 3.125cqw, 3rem);--spacer-r-56: clamp(1.75rem, .9545rem + 3.9773cqw, 3.5rem);--spacer-r-64: clamp(2rem, 1.0909rem + 4.5455cqw, 4rem);--spacer-r-80: clamp(3rem, 2.0909rem + 4.5455cqw, 5rem);--spacer-r-96: clamp(3.5rem, 2.3636rem + 5.6818cqw, 6rem);--spacer-r-120: clamp(4rem, 2.4091rem + 7.9545cqw, 7.5rem);--default-transition-duration: .2s;--default-transition-timing-function: ease-in-out;--z-index-flyout: 10000;--z-index-dialog: 600;--z-index-loader: 500;--z-index-reference-number: 400;--z-index-footer: 300;--z-index-header: 200;--z-index-tooltip: 100;--z-index-local-overlay: 10;--ease-out-quart: cubic-bezier(.165, .84, .44, 1);--ease-in-quart: cubic-bezier(.895, .03, .685, .22);--ease-in-out-quart: cubic-bezier(.77, 0, .175, 1);--fly-in-id: 0}}@value container-sm,container-md,container-lg from "./viewports.css";@layer base{.chat-app :where(h1,h2,h3,h4,h5,h6){font-weight:var(--base-font-weight-title);line-height:var(--base-line-height-tight)}.chat-app :where(b,strong){font-weight:var(--base-font-weight-bold)}.chat-app :where(button){cursor:pointer}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea){width:100%;padding:var(--input-padding);border-width:var(--input-border-width);border-radius:var(--input-border-radius);border-color:var(--input-border-color);background:var(--input-background);box-shadow:var(--input-box-shadow, none);color:var(--input-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::-moz-placeholder{color:var(--input-placeholder-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::placeholder{color:var(--input-placeholder-color)}.chat-app :where(input[type=radio],input[type=checkbox]){margin:0}.chat-app :where(*:focus-visible){border-radius:var(--btn-primary-border-radius);outline-color:var(--body-focus-color);outline-style:solid;outline-width:var(--spacer-3);outline-offset:var(--spacer-2)}.chat-app *::-moz-selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app *::selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app ::-webkit-scrollbar{width:8px;height:8px}.chat-app ::-webkit-scrollbar-track{background:transparent}.chat-app ::-webkit-scrollbar-thumb{border-radius:4px;background-color:#0000004d;-webkit-transition:background-color .2s;transition:background-color .2s}.chat-app ::-webkit-scrollbar-thumb:hover{background-color:#00000080}.chat-app *{scrollbar-color:rgba(0,0,0,.3) transparent;scrollbar-width:thin}.chat-app ::-webkit-scrollbar-thumb{visibility:hidden}.chat-app *:hover::-webkit-scrollbar-thumb,.chat-app *:active::-webkit-scrollbar-thumb,.chat-app *:focus::-webkit-scrollbar-thumb{visibility:visible}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{position:absolute;inset:0;background-color:transparent;content:""}.chat-app :where(.sr-only){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.chat-app :where(.transition-colors){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,box-shadow;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.transition){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.fly-in){--fly-in-id: 0;--fly-in-duration: .4s;--fly-out-duration: .2s;--fly-in-delay: .3s;--fly-in-delay-additional: .1s;--fly-in-y: var(--spacer-r-64);transform:translateY(var(--fly-in-y));opacity:0;transition-delay:0s,1s;transition-duration:var(--fly-out-duration);transition-property:opacity,transform;transition-timing-function:ease,var(--ease-out-quart)}.chat-app :where(.mounted .fly-in){transform:translateY(0);opacity:1;transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional));transition-duration:var(--fly-in-duration)}.chat-app :where(.truncate){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-app :where(.line-clamp){display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat-app :where(.line-clamp--2){-webkit-line-clamp:2}.chat-app :where(.line-clamp--3){-webkit-line-clamp:3}.chat-app :where(.line-clamp--12){-webkit-line-clamp:12}.chat-app :where(.container){width:100%;max-width:var(--container-max-width, 1024px);margin:0 auto;padding-right:var(--spacer-16);padding-left:var(--spacer-16)}@container chat-container (min-width: 640px){.chat-app :where(.container){padding-right:var(--spacer-32);padding-left:var(--spacer-32)}}@container chat-container (min-width: 768px){.chat-app :where(.container){padding-right:var(--spacer-48);padding-left:var(--spacer-48)}}.chat-app :where(h1){font-size:var(--base-font-size-h1)}.chat-app :where(h2){font-size:var(--base-font-size-h2)}.chat-app :where(h3){font-size:var(--base-font-size-h3)}.chat-app :where(h4,h5,h6){font-size:var(--body-font-size)}.chat-app :where(.h1){font-size:var(--base-font-size-h1)}.chat-app :where(.h2){font-size:var(--base-font-size-h2)}.chat-app :where(.h3){font-size:var(--base-font-size-h3)}.chat-app :where(.h4,.h5,.h6){font-size:var(--body-font-size)}.chat-app :where(.text-container)>:where(p,ul,ol,img,table){display:block;margin-bottom:var(--spacer-r-24)}.chat-app :where(.text-container)>:where(div){margin:var(--spacer-r-40) 0}.chat-app :where(.text-container)>:where(h1,.h1){margin-bottom:var(--spacer-r-28)}.chat-app :where(.text-container)>:where(h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-bottom:var(--spacer-r-20)}.chat-app :where(.text-container)>:where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-top:var(--spacer-r-40)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li){margin-bottom:var(--spacer-12)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li):last-child{margin-bottom:0}.chat-app :where(.text-container)>:where(ol){padding-left:1.5em;list-style-position:outside;list-style-type:decimal}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li){position:relative;padding-left:1em}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{position:absolute;top:0;left:0;content:"•";font-size:.9em}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;border:none;background-color:var(--color-grey-700);background-color:var(--hr-color)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)){color:var(--anchor-color);font-weight:var(--anchor-font-weight, var(--base-font-weight-normal));-webkit-text-decoration:var(--anchor-text-decoration, underline);text-decoration:var(--anchor-text-decoration, underline);text-underline-offset:var(--anchor-text-underline-offset, .15em);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)):hover{color:var(--anchor-hover-color)}.chat-app :where(.text-container):first-child{margin-top:0}.chat-app :where(.text-container):last-child{margin-bottom:0}.chat-app :where(.text-container) :where(table){display:block;width:100%;overflow-x:auto;border-collapse:collapse;border-spacing:0;-webkit-overflow-scrolling:touch}.chat-app :where(.text-container) :where(th){width:1000px;padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);line-height:var(--base-line-height-tight);text-align:left;vertical-align:bottom}.chat-app :where(.text-container) :where(td){padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);vertical-align:top}.chat-app :where(.text-container) :where(tr:last-child td){border-bottom:none}.chat-app :where(.animated-height){transition:height .5s var(--ease-in-out-quart)}}@layer base{.svg{width:var(--spacer-r-24);height:auto}.svg svg{display:block;width:100%;height:auto;overflow:visible}}@layer components{.chat-app{display:contents}.chat-app__container{container-name:chat-container;container-type:inline-size;display:flex;align-items:flex-start;height:100%;overflow:hidden}.chat-app__container>:where(*){color:var(--body-color);font-style:normal;font-weight:var(--base-font-weight-normal);font-size:var(--base-font-size-body);line-height:var(--base-line-height-default);font-family:var(--font-family);font-optical-sizing:auto}.chat-app__main{display:flex;flex-direction:column;width:100%;height:100%;overflow-y:auto;overscroll-behavior:contain;background:var(--body-background);scrollbar-gutter:stable}.chat-app__loader-container{display:flex;z-index:var(--z-index-loader);position:relative;align-items:center;justify-content:center;width:100%;height:100%}.chat-app__header{z-index:var(--z-index-header);position:sticky;top:0}.chat-app__header-content{display:flex;-moz-column-gap:var(--spacer-r-12);column-gap:var(--spacer-r-12);flex-wrap:wrap;align-items:flex-end;justify-content:flex-end;padding-top:var(--spacer-12);background:var(--body-background);box-shadow:0 12px 20px 6px color-mix(in srgb,var(--body-background) 100%,transparent)}.chat-app__header-content>:where(*){pointer-events:auto}.chat-app__body{display:flex;position:relative;flex-grow:1;flex-direction:column;width:100%}.chat-app__page-transition{display:flex;flex-grow:1;flex-direction:column;width:100%;height:100%}.chat-app__aside{--duration-in: .65s;--duration-out: .5s;visibility:hidden;flex-grow:1;width:0;height:100%;transition-delay:0s,var(--duration-out);transition-duration:var(--duration-out),0s;transition-property:width,visibility;transition-timing-function:var(--ease-in-out-quart),linear}.chat-app__aside.open{visibility:visible;width:var(--aside-width);transition-delay:0s;transition-duration:var(--duration-in),0s;transition-timing-function:var(--ease-out-quart),linear}.chat-app__aside-container{position:relative;width:var(--aside-width);height:100%;overflow-y:auto;overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable}.chat-app__aside-header,.chat-app__sheet-header{display:flex;z-index:var(--z-index-flyout);position:sticky;top:0;flex-wrap:no-wrap;align-items:center;justify-content:space-between;padding:var(--spacer-12) var(--spacer-12) var(--spacer-12) var(--spacer-24);gap:var(--spacer-24);border-bottom-width:var(--aside-header-border-width);border-color:var(--aside-header-border-color);background:var(--aside-background);color:var(--aside-header-color)}.chat-app__sheet-close{position:relative}.chat-app__sheet-overlay{z-index:var(--z-index-dialog);position:fixed;inset:0;background:var(--aside-background-overlay)}.chat-app__sheet-content{z-index:var(--z-index-flyout);position:fixed;top:0;right:0;width:100%;max-width:var(--aside-width);height:100%;overflow-y:auto;overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable}:is(.chat-app__aside-close,.chat-app__sheet-close) :where(.btn){background-color:transparent}.chat-app__aside-title,.chat-app__sheet-title{font-size:var(--base-font-size-sm)}}@layer components{.open-button{--open-button-avatar-height: var(--spacer-r-80);--open-button-avatar-width: var(--spacer-r-80);--open-button-duration: .4s;--open-button-delay: .3s;--open-button-ease: ease-in-out;display:flex;flex-direction:row;align-items:flex-end;cursor:pointer}.open-button__text{display:flex;position:absolute;right:100%;bottom:50%;flex-direction:column;align-items:flex-start;justify-content:center;margin-right:calc(var(--open-button-avatar-width) * -.5);padding-top:var(--spacer-r-12);padding-right:0;padding-bottom:var(--spacer-r-12);padding-left:0;overflow:hidden;transform:translateY(50%);border-width:var(--open-button-border-width);border-radius:var(--open-button-border-radius);border-color:var(--open-button-border-color);background:var(--open-button-background);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;color:var(--open-button-color);text-align:left;transition:transform var(--open-button-duration) var(--open-button-ease),padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button:hover .open-button__text{transform:translateY(0);background:var(--open-button-hover-background, var(--open-button-background));color:var(--open-button-hover-color, var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button__title{max-width:240px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);font-weight:700}.open-button__mask{width:0;height:0;overflow:hidden;transition:width var(--open-button-duration) var(--open-button-delay) var(--open-button-ease),height var(--open-button-duration) var(--open-button-ease)}.open-button:hover .open-button__mask{transition:width var(--open-button-duration) var(--open-button-ease),height var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button__description{position:relative;width:50cqw;max-width:260px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);text-wrap:balance}.open-button__avatar{z-index:var(--z-index-local-overlay);position:relative;width:var(--open-button-avatar-width);height:var(--open-button-avatar-height);overflow:clip;border-radius:var(--spacer-r-80);filter:drop-shadow(0 0 8px rgba(0,0,0,.2));transition:transform .2s var(--open-button-ease)}.open-button:hover .open-button__avatar{transform:scale(1.05)}.open-button__link-icon{display:none;position:absolute;right:0;width:var(--spacer-r-80);height:var(--spacer-r-80);padding:var(--spacer-r-20);color:var(--open-button-color)}:where(.open-button--standalone){position:fixed;right:var(--spacer-r-16);bottom:var(--spacer-r-16)}@media (prefers-reduced-motion: reduce){.open-button__text,.open-button__mask,.open-button:hover .open-button__text,.open-button:hover .open-button__mask{transition:none!important}.open-button__avatar,.open-button:hover .open-button__avatar{filter:none!important;transition:none!important}}}',Hs=()=>{const t=localStorage.getItem("liipgpt-color-scheme");return t==="light"||t==="dark"?t:"system"},Ws=t=>{let e=Hs();return e==="system"&&(e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),t.includes(e)?e:t[0]??"light"},Gs=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),Ys=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),Qs=new RegExp("(\\d)(\\p{Ll})","gu"),Ks=new RegExp("(\\p{L})(\\d)","gu"),Xs=/[^\p{L}\d]+/giu,Rr="$1\0$2",Js="";function el(t,e){let r=t.trim();r=r.replace(Gs,Rr).replace(Ys,Rr),e?.separateNumbers&&(r=r.replace(Qs,Rr).replace(Ks,Rr)),r=r.replace(Xs,"\0");let n=0,a=r.length;for(;r.charAt(n)==="\0";)n++;if(n===a)return[];for(;r.charAt(a-1)==="\0";)a--;return r.slice(n,a).split(/\0/g)}function tl(t,e){return al(t,e?.prefixCharacters)+el(t,e).map(nl(e?.locale)).join(e?.delimiter??" ")}function rl(t,e){return tl(t,{delimiter:"-",...e})}function nl(t){return t===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t)}function al(t,e=Js){let r="";for(let n=0;n<t.length;n++){const a=t.charAt(n);if(e.includes(a))r+=a;else break}return r}const Ir=rl;var P;(function(t){t.assertEqual=a=>{};function e(a){}t.assertIs=e;function r(a){throw new Error}t.assertNever=r,t.arrayToEnum=a=>{const o={};for(const i of a)o[i]=i;return o},t.getValidEnumValues=a=>{const o=t.objectKeys(a).filter(s=>typeof a[a[s]]!="number"),i={};for(const s of o)i[s]=a[s];return t.objectValues(i)},t.objectValues=a=>t.objectKeys(a).map(function(o){return a[o]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const o=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&o.push(i);return o},t.find=(a,o)=>{for(const i of a)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function n(a,o=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=n,t.jsonStringifyReplacer=(a,o)=>typeof o=="bigint"?o.toString():o})(P||(P={}));var no;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(no||(no={}));const x=P.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),tt=t=>{switch(typeof t){case"undefined":return x.undefined;case"string":return x.string;case"number":return Number.isNaN(t)?x.nan:x.number;case"boolean":return x.boolean;case"function":return x.function;case"bigint":return x.bigint;case"symbol":return x.symbol;case"object":return Array.isArray(t)?x.array:t===null?x.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?x.promise:typeof Map<"u"&&t instanceof Map?x.map:typeof Set<"u"&&t instanceof Set?x.set:typeof Date<"u"&&t instanceof Date?x.date:x.object;default:return x.unknown}},_=P.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 Ue extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(o){return o.message},n={_errors:[]},a=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let s=n,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(r(i))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return a(this),n}static assert(e){if(!(e instanceof Ue))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,P.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const a of this.issues)if(a.path.length>0){const o=a.path[0];r[o]=r[o]||[],r[o].push(e(a))}else n.push(e(a));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Ue.create=t=>new Ue(t);const On=(t,e)=>{let r;switch(t.code){case _.invalid_type:t.received===x.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case _.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,P.jsonStringifyReplacer)}`;break;case _.unrecognized_keys:r=`Unrecognized key(s) in object: ${P.joinValues(t.keys,", ")}`;break;case _.invalid_union:r="Invalid input";break;case _.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${P.joinValues(t.options)}`;break;case _.invalid_enum_value:r=`Invalid enum value. Expected ${P.joinValues(t.options)}, received '${t.received}'`;break;case _.invalid_arguments:r="Invalid function arguments";break;case _.invalid_return_type:r="Invalid function return type";break;case _.invalid_date:r="Invalid date";break;case _.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:P.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case _.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case _.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case _.custom:r="Invalid input";break;case _.invalid_intersection_types:r="Intersection results could not be merged";break;case _.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case _.not_finite:r="Number must be finite";break;default:r=e.defaultError,P.assertNever(t)}return{message:r}};let ol=On;function il(){return ol}const sl=t=>{const{data:e,path:r,errorMaps:n,issueData:a}=t,o=[...r,...a.path||[]],i={...a,path:o};if(a.message!==void 0)return{...a,path:o,message:a.message};let s="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)s=c(i,{data:e,defaultError:s}).message;return{...a,path:o,message:s}};function w(t,e){const r=il(),n=sl({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===On?void 0:On].filter(a=>!!a)});t.common.issues.push(n)}class ne{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const a of r){if(a.status==="aborted")return A;a.status==="dirty"&&e.dirty(),n.push(a.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const a of r){const o=await a.key,i=await a.value;n.push({key:o,value:i})}return ne.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const a of r){const{key:o,value:i}=a;if(o.status==="aborted"||i.status==="aborted")return A;o.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(n[o.value]=i.value)}return{status:e.value,value:n}}}const A=Object.freeze({status:"aborted"}),rr=t=>({status:"dirty",value:t}),_e=t=>({status:"valid",value:t}),ao=t=>t.status==="aborted",oo=t=>t.status==="dirty",It=t=>t.status==="valid",jr=t=>typeof Promise<"u"&&t instanceof Promise;var S;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(S||(S={}));class Re{constructor(e,r,n,a){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=a}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 io=(t,e)=>{if(It(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Ue(t.common.issues);return this._error=r,this._error}}};function R(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:a}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,s)=>{const{message:l}=t;return i.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??n??s.defaultError}:i.code!=="invalid_type"?{message:s.defaultError}:{message:l??r??s.defaultError}},description:a}}class N{get description(){return this._def.description}_getType(e){return tt(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:tt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ne,ctx:{common:e.parent.common,data:e.data,parsedType:tt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(jr(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:tt(e)},a=this._parseSync({data:e,path:n.path,parent:n});return io(n,a)}"~validate"(e){const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:tt(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:r});return It(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>It(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:tt(e)},a=this._parse({data:e,path:n.path,parent:n}),o=await(jr(a)?a:Promise.resolve(a));return io(n,o)}refine(e,r){const n=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,o)=>{const i=e(a),s=()=>o.addIssue({code:_.custom,...n(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(s(),!1)):i?!0:(s(),!1)})}refinement(e,r){return this._refinement((n,a)=>e(n)?!0:(a.addIssue(typeof r=="function"?r(n,a):r),!1))}_refinement(e){return new Pt({schema:this,typeName:O.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:r=>this["~validate"](r)}}optional(){return nt.create(this,this._def)}nullable(){return zt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ie.create(this)}promise(){return Br.create(this,this._def)}or(e){return Lr.create([this,e],this._def)}and(e){return Pr.create(this,e,this._def)}transform(e){return new Pt({...R(this._def),schema:this,typeName:O.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new jn({...R(this._def),innerType:this,defaultValue:r,typeName:O.ZodDefault})}brand(){return new Al({typeName:O.ZodBranded,type:this,...R(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new Nn({...R(this._def),innerType:this,catchValue:r,typeName:O.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Ln.create(this,e)}readonly(){return Pn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ll=/^c[^\s-]{8,}$/i,cl=/^[0-9a-z]+$/,ul=/^[0-9A-HJKMNP-TV-Z]{26}$/i,dl=/^[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,fl=/^[a-z0-9_-]{21}$/i,hl=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,pl=/^[-+]?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)?)??$/,vl=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ml="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let An;const gl=/^(?:(?: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])$/,bl=/^(?:(?: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])$/,_l=/^(([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]))$/,kl=/^(([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])$/,yl=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,wl=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,so="((\\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])))",xl=new RegExp(`^${so}$`);function lo(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function Cl(t){return new RegExp(`^${lo(t)}$`)}function Sl(t){let e=`${so}T${lo(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Tl(t,e){return!!((e==="v4"||!e)&&gl.test(t)||(e==="v6"||!e)&&_l.test(t))}function El(t,e){if(!hl.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(n));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function $l(t,e){return!!((e==="v4"||!e)&&bl.test(t)||(e==="v6"||!e)&&kl.test(t))}class qe extends N{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==x.string){const o=this._getOrReturnCtx(e);return w(o,{code:_.invalid_type,expected:x.string,received:o.parsedType}),A}const n=new ne;let a;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:_.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:_.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const i=e.data.length>o.value,s=e.data.length<o.value;(i||s)&&(a=this._getOrReturnCtx(e,a),i?w(a,{code:_.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&w(a,{code:_.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")vl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"email",code:_.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")An||(An=new RegExp(ml,"u")),An.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"emoji",code:_.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")dl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"uuid",code:_.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")fl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"nanoid",code:_.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")ll.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"cuid",code:_.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")cl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"cuid2",code:_.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")ul.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"ulid",code:_.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),w(a,{validation:"url",code:_.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"regex",code:_.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(a=this._getOrReturnCtx(e,a),w(a,{code:_.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.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)||(a=this._getOrReturnCtx(e,a),w(a,{code:_.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(a=this._getOrReturnCtx(e,a),w(a,{code:_.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Sl(o).test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:_.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?xl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:_.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?Cl(o).test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:_.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?pl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"duration",code:_.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?Tl(e.data,o.version)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"ip",code:_.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?El(e.data,o.alg)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"jwt",code:_.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?$l(e.data,o.version)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"cidr",code:_.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?yl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"base64",code:_.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?wl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"base64url",code:_.invalid_string,message:o.message}),n.dirty()):P.assertNever(o);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(a=>e.test(a),{validation:r,code:_.invalid_string,...S.errToObj(n)})}_addCheck(e){return new qe({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...S.errToObj(e)})}url(e){return this._addCheck({kind:"url",...S.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...S.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...S.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...S.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...S.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...S.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...S.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...S.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...S.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...S.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...S.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...S.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,...S.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,...S.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...S.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...S.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...S.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...S.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...S.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...S.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...S.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...S.errToObj(r)})}nonempty(e){return this.min(1,S.errToObj(e))}trim(){return new qe({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new qe({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new qe({...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 r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}qe.create=t=>new qe({checks:[],typeName:O.ZodString,coerce:t?.coerce??!1,...R(t)});function Ol(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,a=r>n?r:n,o=Number.parseInt(t.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return o%i/10**a}class jt extends N{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)!==x.number){const o=this._getOrReturnCtx(e);return w(o,{code:_.invalid_type,expected:x.number,received:o.parsedType}),A}let n;const a=new ne;for(const o of this._def.checks)o.kind==="int"?P.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{code:_.invalid_type,expected:"integer",received:"float",message:o.message}),a.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),w(n,{code:_.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),w(n,{code:_.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="multipleOf"?Ol(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),w(n,{code:_.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{code:_.not_finite,message:o.message}),a.dirty()):P.assertNever(o);return{status:a.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,S.toString(r))}gt(e,r){return this.setLimit("min",e,!1,S.toString(r))}lte(e,r){return this.setLimit("max",e,!0,S.toString(r))}lt(e,r){return this.setLimit("max",e,!1,S.toString(r))}setLimit(e,r,n,a){return new jt({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:S.toString(a)}]})}_addCheck(e){return new jt({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:S.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:S.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:S.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:S.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:S.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&P.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}jt.create=t=>new jt({checks:[],typeName:O.ZodNumber,coerce:t?.coerce||!1,...R(t)});class nr extends N{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)!==x.bigint)return this._getInvalidInput(e);let n;const a=new ne;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),w(n,{code:_.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),w(n,{code:_.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),w(n,{code:_.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):P.assertNever(o);return{status:a.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return w(r,{code:_.invalid_type,expected:x.bigint,received:r.parsedType}),A}gte(e,r){return this.setLimit("min",e,!0,S.toString(r))}gt(e,r){return this.setLimit("min",e,!1,S.toString(r))}lte(e,r){return this.setLimit("max",e,!0,S.toString(r))}lt(e,r){return this.setLimit("max",e,!1,S.toString(r))}setLimit(e,r,n,a){return new nr({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:S.toString(a)}]})}_addCheck(e){return new nr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:S.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}nr.create=t=>new nr({checks:[],typeName:O.ZodBigInt,coerce:t?.coerce??!1,...R(t)});class Mn extends N{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==x.boolean){const n=this._getOrReturnCtx(e);return w(n,{code:_.invalid_type,expected:x.boolean,received:n.parsedType}),A}return _e(e.data)}}Mn.create=t=>new Mn({typeName:O.ZodBoolean,coerce:t?.coerce||!1,...R(t)});class Nr extends N{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==x.date){const o=this._getOrReturnCtx(e);return w(o,{code:_.invalid_type,expected:x.date,received:o.parsedType}),A}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return w(o,{code:_.invalid_date}),A}const n=new ne;let a;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:_.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:_.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):P.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Nr({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:S.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:S.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}Nr.create=t=>new Nr({checks:[],coerce:t?.coerce||!1,typeName:O.ZodDate,...R(t)});class co extends N{_parse(e){if(this._getType(e)!==x.symbol){const n=this._getOrReturnCtx(e);return w(n,{code:_.invalid_type,expected:x.symbol,received:n.parsedType}),A}return _e(e.data)}}co.create=t=>new co({typeName:O.ZodSymbol,...R(t)});class uo extends N{_parse(e){if(this._getType(e)!==x.undefined){const n=this._getOrReturnCtx(e);return w(n,{code:_.invalid_type,expected:x.undefined,received:n.parsedType}),A}return _e(e.data)}}uo.create=t=>new uo({typeName:O.ZodUndefined,...R(t)});class fo extends N{_parse(e){if(this._getType(e)!==x.null){const n=this._getOrReturnCtx(e);return w(n,{code:_.invalid_type,expected:x.null,received:n.parsedType}),A}return _e(e.data)}}fo.create=t=>new fo({typeName:O.ZodNull,...R(t)});class ho extends N{constructor(){super(...arguments),this._any=!0}_parse(e){return _e(e.data)}}ho.create=t=>new ho({typeName:O.ZodAny,...R(t)});class po extends N{constructor(){super(...arguments),this._unknown=!0}_parse(e){return _e(e.data)}}po.create=t=>new po({typeName:O.ZodUnknown,...R(t)});class rt extends N{_parse(e){const r=this._getOrReturnCtx(e);return w(r,{code:_.invalid_type,expected:x.never,received:r.parsedType}),A}}rt.create=t=>new rt({typeName:O.ZodNever,...R(t)});class vo extends N{_parse(e){if(this._getType(e)!==x.undefined){const n=this._getOrReturnCtx(e);return w(n,{code:_.invalid_type,expected:x.void,received:n.parsedType}),A}return _e(e.data)}}vo.create=t=>new vo({typeName:O.ZodVoid,...R(t)});class Ie extends N{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),a=this._def;if(r.parsedType!==x.array)return w(r,{code:_.invalid_type,expected:x.array,received:r.parsedType}),A;if(a.exactLength!==null){const i=r.data.length>a.exactLength.value,s=r.data.length<a.exactLength.value;(i||s)&&(w(r,{code:i?_.too_big:_.too_small,minimum:s?a.exactLength.value:void 0,maximum:i?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(w(r,{code:_.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(w(r,{code:_.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,s)=>a.type._parseAsync(new Re(r,i,r.path,s)))).then(i=>ne.mergeArray(n,i));const o=[...r.data].map((i,s)=>a.type._parseSync(new Re(r,i,r.path,s)));return ne.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new Ie({...this._def,minLength:{value:e,message:S.toString(r)}})}max(e,r){return new Ie({...this._def,maxLength:{value:e,message:S.toString(r)}})}length(e,r){return new Ie({...this._def,exactLength:{value:e,message:S.toString(r)}})}nonempty(e){return this.min(1,e)}}Ie.create=(t,e)=>new Ie({type:t,minLength:null,maxLength:null,exactLength:null,typeName:O.ZodArray,...R(e)});function Nt(t){if(t instanceof U){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=nt.create(Nt(n))}return new U({...t._def,shape:()=>e})}else return t instanceof Ie?new Ie({...t._def,type:Nt(t.element)}):t instanceof nt?nt.create(Nt(t.unwrap())):t instanceof zt?zt.create(Nt(t.unwrap())):t instanceof gt?gt.create(t.items.map(e=>Nt(e))):t}class U extends N{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=P.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==x.object){const c=this._getOrReturnCtx(e);return w(c,{code:_.invalid_type,expected:x.object,received:c.parsedType}),A}const{status:n,ctx:a}=this._processInputParams(e),{shape:o,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof rt&&this._def.unknownKeys==="strip"))for(const c in a.data)i.includes(c)||s.push(c);const l=[];for(const c of i){const u=o[c],h=a.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Re(a,h,a.path,c)),alwaysSet:c in a.data})}if(this._def.catchall instanceof rt){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:a.data[u]}});else if(c==="strict")s.length>0&&(w(a,{code:_.unrecognized_keys,keys:s}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const h=a.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Re(a,h,a.path,u)),alwaysSet:u in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const h=await u.key,d=await u.value;c.push({key:h,value:d,alwaysSet:u.alwaysSet})}return c}).then(c=>ne.mergeObjectSync(n,c)):ne.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return S.errToObj,new U({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{const a=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:S.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new U({...this._def,unknownKeys:"strip"})}passthrough(){return new U({...this._def,unknownKeys:"passthrough"})}extend(e){return new U({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new U({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:O.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new U({...this._def,catchall:e})}pick(e){const r={};for(const n of P.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new U({...this._def,shape:()=>r})}omit(e){const r={};for(const n of P.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new U({...this._def,shape:()=>r})}deepPartial(){return Nt(this)}partial(e){const r={};for(const n of P.objectKeys(this.shape)){const a=this.shape[n];e&&!e[n]?r[n]=a:r[n]=a.optional()}return new U({...this._def,shape:()=>r})}required(e){const r={};for(const n of P.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof nt;)o=o._def.innerType;r[n]=o}return new U({...this._def,shape:()=>r})}keyof(){return bo(P.objectKeys(this.shape))}}U.create=(t,e)=>new U({shape:()=>t,unknownKeys:"strip",catchall:rt.create(),typeName:O.ZodObject,...R(e)}),U.strictCreate=(t,e)=>new U({shape:()=>t,unknownKeys:"strict",catchall:rt.create(),typeName:O.ZodObject,...R(e)}),U.lazycreate=(t,e)=>new U({shape:t,unknownKeys:"strip",catchall:rt.create(),typeName:O.ZodObject,...R(e)});class Lr extends N{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function a(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;const i=o.map(s=>new Ue(s.ctx.common.issues));return w(r,{code:_.invalid_union,unionErrors:i}),A}if(r.common.async)return Promise.all(n.map(async o=>{const i={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(a);{let o;const i=[];for(const l of n){const c={...r,common:{...r.common,issues:[]},parent:null},u=l._parseSync({data:r.data,path:r.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const s=i.map(l=>new Ue(l));return w(r,{code:_.invalid_union,unionErrors:s}),A}}get options(){return this._def.options}}Lr.create=(t,e)=>new Lr({options:t,typeName:O.ZodUnion,...R(e)});function Rn(t,e){const r=tt(t),n=tt(e);if(t===e)return{valid:!0,data:t};if(r===x.object&&n===x.object){const a=P.objectKeys(e),o=P.objectKeys(t).filter(s=>a.indexOf(s)!==-1),i={...t,...e};for(const s of o){const l=Rn(t[s],e[s]);if(!l.valid)return{valid:!1};i[s]=l.data}return{valid:!0,data:i}}else if(r===x.array&&n===x.array){if(t.length!==e.length)return{valid:!1};const a=[];for(let o=0;o<t.length;o++){const i=t[o],s=e[o],l=Rn(i,s);if(!l.valid)return{valid:!1};a.push(l.data)}return{valid:!0,data:a}}else return r===x.date&&n===x.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Pr extends N{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),a=(o,i)=>{if(ao(o)||ao(i))return A;const s=Rn(o.value,i.value);return s.valid?((oo(o)||oo(i))&&r.dirty(),{status:r.value,value:s.data}):(w(n,{code:_.invalid_intersection_types}),A)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,i])=>a(o,i)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Pr.create=(t,e,r)=>new Pr({left:t,right:e,typeName:O.ZodIntersection,...R(r)});class gt extends N{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==x.array)return w(n,{code:_.invalid_type,expected:x.array,received:n.parsedType}),A;if(n.data.length<this._def.items.length)return w(n,{code:_.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),A;!this._def.rest&&n.data.length>this._def.items.length&&(w(n,{code:_.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...n.data].map((i,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Re(n,i,n.path,s)):null}).filter(i=>!!i);return n.common.async?Promise.all(o).then(i=>ne.mergeArray(r,i)):ne.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new gt({...this._def,rest:e})}}gt.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new gt({items:t,typeName:O.ZodTuple,rest:null,...R(e)})};class zr extends N{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==x.object)return w(n,{code:_.invalid_type,expected:x.object,received:n.parsedType}),A;const a=[],o=this._def.keyType,i=this._def.valueType;for(const s in n.data)a.push({key:o._parse(new Re(n,s,n.path,s)),value:i._parse(new Re(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?ne.mergeObjectAsync(r,a):ne.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof N?new zr({keyType:e,valueType:r,typeName:O.ZodRecord,...R(n)}):new zr({keyType:qe.create(),valueType:e,typeName:O.ZodRecord,...R(r)})}}class mo extends N{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==x.map)return w(n,{code:_.invalid_type,expected:x.map,received:n.parsedType}),A;const a=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([s,l],c)=>({key:a._parse(new Re(n,s,n.path,[c,"key"])),value:o._parse(new Re(n,l,n.path,[c,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return A;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(c.value,u.value)}return{status:r.value,value:s}})}else{const s=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return A;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(c.value,u.value)}return{status:r.value,value:s}}}}mo.create=(t,e,r)=>new mo({valueType:e,keyType:t,typeName:O.ZodMap,...R(r)});class ar extends N{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==x.set)return w(n,{code:_.invalid_type,expected:x.set,received:n.parsedType}),A;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(w(n,{code:_.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(w(n,{code:_.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const o=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return A;u.status==="dirty"&&r.dirty(),c.add(u.value)}return{status:r.value,value:c}}const s=[...n.data.values()].map((l,c)=>o._parse(new Re(n,l,n.path,c)));return n.common.async?Promise.all(s).then(l=>i(l)):i(s)}min(e,r){return new ar({...this._def,minSize:{value:e,message:S.toString(r)}})}max(e,r){return new ar({...this._def,maxSize:{value:e,message:S.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}ar.create=(t,e)=>new ar({valueType:t,minSize:null,maxSize:null,typeName:O.ZodSet,...R(e)});class go extends N{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}go.create=(t,e)=>new go({getter:t,typeName:O.ZodLazy,...R(e)});class In extends N{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return w(r,{received:r.data,code:_.invalid_literal,expected:this._def.value}),A}return{status:"valid",value:e.data}}get value(){return this._def.value}}In.create=(t,e)=>new In({value:t,typeName:O.ZodLiteral,...R(e)});function bo(t,e){return new Lt({values:t,typeName:O.ZodEnum,...R(e)})}class Lt extends N{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return w(r,{expected:P.joinValues(n),received:r.parsedType,code:_.invalid_type}),A}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return w(r,{received:r.data,code:_.invalid_enum_value,options:n}),A}return _e(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return Lt.create(e,{...this._def,...r})}exclude(e,r=this._def){return Lt.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}Lt.create=bo;class _o extends N{_parse(e){const r=P.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==x.string&&n.parsedType!==x.number){const a=P.objectValues(r);return w(n,{expected:P.joinValues(a),received:n.parsedType,code:_.invalid_type}),A}if(this._cache||(this._cache=new Set(P.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=P.objectValues(r);return w(n,{received:n.data,code:_.invalid_enum_value,options:a}),A}return _e(e.data)}get enum(){return this._def.values}}_o.create=(t,e)=>new _o({values:t,typeName:O.ZodNativeEnum,...R(e)});class Br extends N{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==x.promise&&r.common.async===!1)return w(r,{code:_.invalid_type,expected:x.promise,received:r.parsedType}),A;const n=r.parsedType===x.promise?r.data:Promise.resolve(r.data);return _e(n.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Br.create=(t,e)=>new Br({type:t,typeName:O.ZodPromise,...R(e)});class Pt extends N{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===O.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),a=this._def.effect||null,o={addIssue:i=>{w(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),a.type==="preprocess"){const i=a.transform(n.data,o);if(n.common.async)return Promise.resolve(i).then(async s=>{if(r.value==="aborted")return A;const l=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return l.status==="aborted"?A:l.status==="dirty"||r.value==="dirty"?rr(l.value):l});{if(r.value==="aborted")return A;const s=this._def.schema._parseSync({data:i,path:n.path,parent:n});return s.status==="aborted"?A:s.status==="dirty"||r.value==="dirty"?rr(s.value):s}}if(a.type==="refinement"){const i=s=>{const l=a.refinement(s,o);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?A:(s.status==="dirty"&&r.dirty(),i(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?A:(s.status==="dirty"&&r.dirty(),i(s.value).then(()=>({status:r.value,value:s.value}))))}if(a.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!It(i))return A;const s=a.transform(i.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>It(i)?Promise.resolve(a.transform(i.value,o)).then(s=>({status:r.value,value:s})):A);P.assertNever(a)}}Pt.create=(t,e,r)=>new Pt({schema:t,typeName:O.ZodEffects,effect:e,...R(r)}),Pt.createWithPreprocess=(t,e,r)=>new Pt({schema:e,effect:{type:"preprocess",transform:t},typeName:O.ZodEffects,...R(r)});class nt extends N{_parse(e){return this._getType(e)===x.undefined?_e(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}nt.create=(t,e)=>new nt({innerType:t,typeName:O.ZodOptional,...R(e)});class zt extends N{_parse(e){return this._getType(e)===x.null?_e(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}zt.create=(t,e)=>new zt({innerType:t,typeName:O.ZodNullable,...R(e)});class jn extends N{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===x.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}jn.create=(t,e)=>new jn({innerType:t,typeName:O.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...R(e)});class Nn extends N{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return jr(a)?a.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ue(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ue(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Nn.create=(t,e)=>new Nn({innerType:t,typeName:O.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...R(e)});class ko extends N{_parse(e){if(this._getType(e)!==x.nan){const n=this._getOrReturnCtx(e);return w(n,{code:_.invalid_type,expected:x.nan,received:n.parsedType}),A}return{status:"valid",value:e.data}}}ko.create=t=>new ko({typeName:O.ZodNaN,...R(t)});class Al extends N{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Ln extends N{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?A:o.status==="dirty"?(r.dirty(),rr(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?A:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(e,r){return new Ln({in:e,out:r,typeName:O.ZodPipeline})}}class Pn extends N{_parse(e){const r=this._def.innerType._parse(e),n=a=>(It(a)&&(a.value=Object.freeze(a.value)),a);return jr(r)?r.then(a=>n(a)):n(r)}unwrap(){return this._def.innerType}}Pn.create=(t,e)=>new Pn({innerType:t,typeName:O.ZodReadonly,...R(e)});var O;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(O||(O={}));const f=qe.create,Fr=jt.create,je=Mn.create;rt.create;const or=Ie.create,z=U.create,Dr=Lr.create;Pr.create,gt.create;const at=zr.create,Ml=In.create,Zr=Lt.create;Br.create,nt.create,zt.create;const Rl=640,Il=1024;let Vr=null;const jl=()=>{if(Vr)return Vr;if(!globalThis.document)return 16;const t=globalThis.document.querySelector(":root");return Vr=Number(getComputedStyle(t).fontSize.slice(0,-2)),Vr},Nl=({minRem:t,maxRem:e})=>{const r=jl(),n=Rl/r,a=Il/r,o=(e-t)/(a-n),i=-n*o+t;return`clamp( ${t}rem, ${i}rem + ${o*100}cqw, ${e}rem )`},ae=z({minRem:Fr(),maxRem:Fr()}).or(f()),Ur=z({0:f().optional(),50:f(),100:f(),200:f(),300:f(),400:f(),500:f(),600:f(),700:f(),800:f(),900:f(),950:f(),1e3:f().optional()}),zn=z({color:f().optional(),background:f().optional(),borderWidth:f().optional(),borderColor:f().optional(),boxShadow:f().optional()}),Ll=z({borderRadius:ae.optional(),custom:at(f(),Dr([f(),Fr()])).optional(),hover:zn.optional(),focus:zn.optional()}).and(zn),Pl=z({family:f().optional()}),zl=at(Zr(["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","listUnordered","lightMode","darkMode"]),f()),Bl=z({font:Pl.optional(),colors:z({brand:Ur,accent:Ur.optional(),highlight:Ur,grey:Ur}),base:z({fontSizeXs:ae.optional(),fontSizeSm:ae.optional(),fontSizeBody:ae.optional(),fontSizeH3:ae.optional(),fontSizeH2:ae.optional(),fontSizeH1:ae.optional(),fontWeightNormal:f().optional(),fontWeightBold:f().optional(),fontWeightTitle:f().optional(),lineHeightDefault:f().optional(),lineHeightSnug:f().optional(),lineHeightTight:f().optional(),borderRadius:ae.optional(),lineColor:f().optional(),boxShadow:f().optional()}),components:at(f(),Ll),svgs:zl}),qr=z({customCSS:f().optional(),fontCSS:f().optional(),fontURLs:f().array().optional(),tokens:Bl});z({light:qr,dark:qr});const Fl=z({light:qr,dark:qr}).deepPartial(),yo=t=>typeof t=="string"?t:typeof t=="number"?String(t):typeof t=="object"?t.minRem===t.maxRem?`${t.minRem}rem`:Nl(t):"",Bn=(t,e,r,n=!1)=>{let a="";return r.forEach(o=>{let i=e[o];n&&!i&&o==="borderWidth"&&(i="0px"),n&&!i&&o==="borderColor"&&(i="transparent"),i&&(a+=`--${Ir(t)}-${Ir(o)}:${yo(i)}; `)}),a},wo=(t,e)=>Object.entries(e).map(([r,n])=>`--${t}-${Ir(r)}:${yo(n)}`).join("; ")+"; ",Dl=(t,e)=>{let r="";return r+=Bn(t,e,["background","borderWidth","borderColor","boxShadow","borderRadius","color"],!0),e.hover&&(r+=Bn(`${t}-hover`,e.hover,["background","borderWidth","borderColor","boxShadow","color"])),e.focus&&(r+=Bn(`${t}-focus`,e.focus,["background","borderWidth","borderColor","boxShadow","color"])),e.custom&&(r+=wo(t,e.custom)),r},Zl=(t,e)=>Object.entries(e).map(([r,n])=>`--color-${t}-${r}:${n}`).join("; ")+"; ",Vl=t=>`--font-family: ${t?.family||"inherit"};`,Ul=t=>{const e=Vl(t.font),r=Object.entries(t.colors).map(([o,i])=>Zl(o,i)).join(""),n=wo("base",t.base),a=Object.entries(t.components).map(([o,i])=>Dl(Ir(o),i)).join("");return`.chat-app {${e} ${r} ${n} ${a}};`};var Fn={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};const xo=z({50:f(),100:f(),200:f(),300:f(),400:f(),500:f(),600:f(),700:f(),800:f(),900:f(),950:f()}),Co=Zr(["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]),So=Dr([xo,Co]),ql=Dr([xo.and(z({0:f(),1e3:f()})),Co]),To=z({avatarImageUrl:f().optional(),colors:z({brand:So.optional(),highlight:So.optional(),grey:ql.optional(),background:f().optional(),text:f().optional(),anchor:z({default:f().optional(),hover:f().optional()}).optional()}).optional(),font:z({family:f().optional(),urls:or(f()).optional(),sizeXs:ae.optional(),sizeSm:ae.optional(),sizeBody:ae.optional(),sizeH3:ae.optional(),sizeH2:ae.optional(),sizeH1:ae.optional(),weightNormal:f().optional(),weightBold:f().optional(),weightTitle:f().optional()}).optional(),borderRadius:ae.optional(),fineGrained:Fl.optional()}),Hl=z({blocked:f(),maintenance:f(),"rate-limit":f(),"server-error":f(),"too-short":f(),"too-long":f(),"quota-reached":f(),aborted:f(),"sse-error":f(),"client-error":f(),"unexpected-call":f(),"incomplete-error":f(),"feedback-failed":f(),"speech-not-supported":f(),"speech-transcription-failed":f(),"speech-no-text-detected":f(),"speech-microphone-access-denied":f(),"pii-detected":f()}),Wl=z({email:f(),creditCard:f(),ahv:f(),phoneSwiss:f(),phoneInternational:f(),swissPassport:f(),longNumber:f()}),Eo=z({predefinedQuestions:f(),introductionTitle:f(),introductionDisclaimer:f().optional(),chatInputPlaceholder:f(),chatInputPlaceholderListening:f().optional(),chatInputSubmit:f(),chatInputStartListening:f(),chatInputStopListening:f(),referenceLink:f(),referencesDisplay:f(),referencesHide:f(),referencesTitle:f(),referencesFurtherTitle:f(),newChat:f(),maintenanceModeError:f(),messageBotLoading:f(),messageBotError:f(),messageBotDefaultError:f(),chatFooterText:f().optional(),scrollToBottom:f(),openButtonTitle:f().optional(),openButtonDescription:f().optional(),openMenu:f(),openInfo:f(),aboutThisChat:f().optional(),closeMenu:f(),closeChat:f(),close:f(),send:f(),thankYouForFeedback:f(),giveFeedback:f(),sendFeedback:f(),feedbackFormTitle:f(),feedbackFormMessage:f(),feedbackFormMessagePlaceholder:f(),feedbackFormEmail:f(),feedbackFormEmailPlaceholder:f(),answerGood:f(),answerBad:f(),classificationSubmit:f(),classificationThankYou:f(),classificationTitle:f(),selectLanguage:f(),lightMode:f(),darkMode:f()}),Bt=Zr(["en","de","fr","it"]),$o=at(Bt,Eo.partial());at(Bt,Hl),at(Bt,Wl);const Oo=z({label:f(),options:or(z({label:f(),value:Fr()}))}),Gl=z({label:f(),icon:f(),url:f(),target:Zr(["_blank","_self"]).optional()}),Yl=z({label:f().nullable(),question:f()}),Ao=z({impact:Oo.optional(),quality:Oo.optional()});z({classification:Ao.optional()}),z({predefinedQuestions:or(Yl)}),Dr([z({maintenance:Ml(!0)}),z({id:f(),cID:f()})]),at(Bt,Eo);const Ql=z({showPredefinedQuestions:je(),showOverallFeedbackButton:je(),showCloseChatButton:je(),showContextMenu:je(),showContextInfo:je(),allowAudioInput:je(),blockPII:je(),questionPrefix:f(),menu:at(Bt,or(Gl)).optional(),supportedLanguages:or(Bt),classification:Ao.optional(),showTextFeedback:je(),theme:To,translations:$o,buttonHref:f().optional(),addQueryToUrlParams:je().optional(),renderKatex:je().optional()}).partial().and(z({theme:z({name:f().optional()}).optional()}));function Kl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Dn,Mo;function Xl(){if(Mo)return Dn;Mo=1;var t=function(k){return e(k)&&!r(k)};function e(m){return!!m&&typeof m=="object"}function r(m){var k=Object.prototype.toString.call(m);return k==="[object RegExp]"||k==="[object Date]"||o(m)}var n=typeof Symbol=="function"&&Symbol.for,a=n?Symbol.for("react.element"):60103;function o(m){return m.$$typeof===a}function i(m){return Array.isArray(m)?[]:{}}function s(m,k){return k.clone!==!1&&k.isMergeableObject(m)?v(i(m),m,k):m}function l(m,k,p){return m.concat(k).map(function(y){return s(y,p)})}function c(m,k){if(!k.customMerge)return v;var p=k.customMerge(m);return typeof p=="function"?p:v}function u(m){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(m).filter(function(k){return Object.propertyIsEnumerable.call(m,k)}):[]}function h(m){return Object.keys(m).concat(u(m))}function d(m,k){try{return k in m}catch{return!1}}function g(m,k){return d(m,k)&&!(Object.hasOwnProperty.call(m,k)&&Object.propertyIsEnumerable.call(m,k))}function b(m,k,p){var y={};return p.isMergeableObject(m)&&h(m).forEach(function(C){y[C]=s(m[C],p)}),h(k).forEach(function(C){g(m,C)||(d(m,C)&&p.isMergeableObject(k[C])?y[C]=c(C,p)(m[C],k[C],p):y[C]=s(k[C],p))}),y}function v(m,k,p){p=p||{},p.arrayMerge=p.arrayMerge||l,p.isMergeableObject=p.isMergeableObject||t,p.cloneUnlessOtherwiseSpecified=s;var y=Array.isArray(k),C=Array.isArray(m),L=y===C;return L?y?p.arrayMerge(m,k,p):b(m,k,p):s(k,p)}v.all=function(k,p){if(!Array.isArray(k))throw new Error("first argument should be an array");return k.reduce(function(y,C){return v(y,C,p)},{})};var T=v;return Dn=T,Dn}var Jl=Xl();const ir=Kl(Jl),ec=t=>t===null||typeof t!="object",Zn=t=>{if(ec(t))return t;if(Array.isArray(t))return t.map(Zn);const e=Object.entries(t).filter(([r,n])=>n!==void 0).map(([r,n])=>[r,Zn(n)]);return Object.fromEntries(e)},Hr=(t,e)=>{const r=Zn(e);return ir(t,r)},Ro={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"}},base:{fontSizeXs:{minRem:.75,maxRem:.875},fontSizeSm:{minRem:1,maxRem:1},fontSizeBody:{minRem:1,maxRem:1.25},fontSizeH3:{minRem:1.125,maxRem:1.5},fontSizeH2:{minRem:1.25,maxRem:1.75},fontSizeH1:{minRem:1.5,maxRem:2},fontWeightNormal:"400",fontWeightBold:"700",fontWeightTitle:"700",lineHeightDefault:"1.5",lineHeightSnug:"1.375",lineHeightTight:"1.25",borderRadius:{minRem:.5,maxRem:.75},lineColor:"color-mix(in srgb, var(--color-brand-950) 20%, transparent)",boxShadow:"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)"},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)"}},container:{custom:{maxWidth:"1024px"}},avatar:{color:"var(--color-brand-400)",background:"var(--color-grey-100)"},anchor:{color:"var(--color-brand-600)",hover:{color:"var(--color-brand-950)"}},btnPrimary:{color:"var(--color-grey-0)",background:"var(--color-brand-700)",borderRadius:"var(--base-border-radius)",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:"var(--base-border-radius)",boxShadow:"none",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-100)"},custom:{iconColor:"var(--anchor-color)",iconHoverColor:"var(--anchor-hover-color)"}},input:{background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:"var(--base-border-radius)",custom:{padding:"var(--spacer-r-16) var(--spacer-r-20)",placeholderColor:"var(--color-grey-500)"}},label:{color:"var(--color-grey-600)"},hr:{color:"var(--base-line-color)"},contextBox:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",borderRadius:"var(--card-border-radius)",boxShadow:"var(--base-box-shadow)",custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:"var(--color-grey-1000)",titleFontWeight:"var(--base-font-weight-bold)",separatorColor:"var(--base-line-color)"}},contextBoxMenuItem:{background:"transparent",color:"var(--body-color)",borderRadius:"calc(var(--base-border-radius) / 2)",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:"var(--base-border-radius)",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:"var(--base-border-radius)",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:"calc(var(--base-border-radius) / 1.25)",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:"calc(var(--base-border-radius) / 2)"},dialog:{background:"var(--card-background)",color:"var(--body-color)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",borderRadius:"var(--card-border-radius)",boxShadow:"var(--base-box-shadow)",custom:{transitionDuration:200,transitionDelay:0,transitionY:30,backgroundOverlay:"rgba(0, 0, 0, 0.25)",headerBorderBottomColor:"var(--base-line-color)"}},aside:{background:"var(--card-background)",custom:{width:"400px",containerWidthForMobileLayout:768,backgroundOverlay:"rgba(0, 0, 0, 0.4)",headerColor:"var(--card-color)",headerBorderColor:"var(--base-line-color)",headerBorderWidth:"1px"}},message:{color:"var(--body-color)",custom:{errorColor:"#C91658",transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:"var(--base-line-color)",borderWidth:"1px",custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageReferences:{color:"var(--anchor-color)",background:"transparent",borderRadius:"var(--card-border-radius)",hover:{color:"var(--anchor-hover-color)"}},messageUser:{color:"var(--body-color)",background:"var(--card-background)",boxShadow:"var(--card-box-shadow)",borderRadius:"var(--card-border-radius)"},openButton:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-background)",borderWidth:"0",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"}},referencesToggle:{color:"var(--anchor-color)",hover:{color:"var(--anchor-hover-color)"}},referenceNumberTrigger:{color:"var(--btn-secondary-color)",background:"var(--btn-secondary-background)",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{padding:"0.25em"}},referenceDomain:{color:"var(--anchor-color)",hover:{color:"var(--anchor-hover-color)"},custom:{padding:"0px"}},referenceNumberContent:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",borderRadius:"var(--card-border-radius)",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(--base-box-shadow)",custom:{width:"95cqi",maxWidth:"450px",transitionDuration:200,transitionDelay:200,transitionY:8}},reference:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",borderRadius:"var(--card-border-radius)",hover:{color:"var(--card-hover-color)",background:"var(--body-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"}},referenceDescription:{color:"var(--reference-color)",hover:{color:"var(--reference-hover-color)"}},referenceNumber:{color:"var(--reference-number-trigger-color)",background:"var(--body-background)",borderColor:"var(--reference-number-trigger-border-color)",borderWidth:"var(--reference-number-trigger-border-width)",borderRadius:"var(--reference-number-trigger-border-radius)",hover:{color:"var(--reference-number-trigger-color)",background:"var(--reference-number-trigger-background)",borderColor:"var(--reference-number-trigger-border-color)",borderWidth:"var(--reference-number-trigger-border-width)"},custom:{padding:"var(--reference-number-trigger-padding)"}},toast:{background:"var(--card-background)",color:"var(--body-color)",boxShadow:"var(--base-box-shadow)",borderRadius:"var(--card-border-radius)",custom:{iconSuccessColor:"#22c55e",iconErrorColor:"#ef4444",iconWarningColor:"#f97316",iconInfoColor:"#3b82f6"}},tooltip:{background:"var(--color-grey-200)",color:"var(--body-color)",borderRadius:"calc(var(--base-border-radius) / 2)"}},svgs:{predefinedQuestion:`
17
+ <svg viewBox="0 0 24 24" >
18
+ <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>
19
+ <path d="M0.5 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
20
+ <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>
21
+ <path d="M13 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
22
+ </svg>
23
+ `,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">
175
24
  <circle cx="6" cy="23" r="1.75" fill="currentColor">
176
25
  <animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0s"/>
177
26
  </circle>
@@ -182,15 +31,169 @@ var LiipGPTButton=function(qr){"use strict";const Go="5";typeof window<"u"&&((wi
182
31
  <animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0.6s"/>
183
32
  </circle>
184
33
  </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 fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12"><path d="M5.04 7.955v-.161c.004-.555.053-.998.148-1.328.099-.33.241-.596.429-.799.187-.203.412-.387.675-.552.197-.127.373-.258.528-.395a1.71 1.71 0 0 0 .371-.452 1.15 1.15 0 0 0 .138-.561c0-.219-.052-.41-.157-.576a1.045 1.045 0 0 0-.423-.38 1.26 1.26 0 0 0-.58-.133c-.207 0-.402.046-.586.138a1.117 1.117 0 0 0-.452.4c-.117.174-.18.39-.19.65H3c.016-.633.168-1.157.457-1.569.288-.416.67-.725 1.146-.928.476-.206 1-.309 1.575-.309.631 0 1.19.105 1.675.314.485.206.865.506 1.141.9.276.392.414.867.414 1.422 0 .37-.062.7-.185.99-.12.285-.29.538-.51.76a3.943 3.943 0 0 1-.775.595c-.25.15-.457.304-.618.466a1.584 1.584 0 0 0-.357.562 2.42 2.42 0 0 0-.119.785v.161H5.041ZM5.984 11c-.317 0-.588-.111-.814-.333a1.095 1.095 0 0 1-.328-.809c-.003-.31.106-.577.328-.799.226-.222.497-.333.814-.333.301 0 .566.111.794.333a1.092 1.092 0 0 1 .181 1.375 1.23 1.23 0 0 1-.414.414 1.081 1.081 0 0 1-.561.152Z" fill="currentColor"/></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:`
185
- <svg viewBox="0 0 24 24">
186
- <circle cx="12" cy="12" r="11" fill="var(--avatar-background)"/>
187
- <g fill="var(--avatar-color)" stroke="none" stroke-linecap="round" stroke-linejoin="round">
188
- <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" />
189
- <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" />
190
- <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" />
191
- </g>
192
- </svg>
193
- `,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:`
34
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" width="100" height="100" shape-rendering="geometricPrecision" text-rendering="geometricPrecision">
35
+ <style>
36
+ .svg--avatar {
37
+ --logo-color1: var(--color-brand-500);
38
+ --logo-color1-transparent: var(--color-brand-400);
39
+
40
+ --logo-color2: var(--color-highlight-400);
41
+ --logo-color2-transparent: var(--color-highlight-500);
42
+
43
+ --logo-color3: var(--color-brand-400);
44
+ --logo-color3-transparent: var(--color-highlight-500);
45
+
46
+ --logo-color4: var(--color-highlight-400);
47
+ --logo-color4-transparent: var(--color-brand-500);
48
+
49
+ --logo-glass-color: oklch(1 0 0 / 0.2); /* Soft white glass effect */
50
+ }
51
+
52
+ #group1 {
53
+ animation: group1_anim 8000ms ease-in-out infinite normal forwards;
54
+ /* Delay animation after fly-in animation */
55
+ transform: translate(30px, 30px);
56
+ animation-delay: 0.8s;
57
+ }
58
+
59
+ @keyframes group1_anim {
60
+ 0% { transform: translate(30px, 30px); }
61
+ 25% { transform: translate(50px, 100px); }
62
+ 50% { transform: translate(90px, 30px); }
63
+ 75% { transform: translate(50px, 50px); }
64
+ 100% { transform: translate(30px, 30px); }
65
+ }
66
+
67
+ #group2 {
68
+ animation: group2_anim 8000ms ease-in-out infinite normal forwards;
69
+ /* Delay animation after fly-in animation */
70
+ transform: translate(-35px, -35px);
71
+ animation-delay: 0.8s;
72
+ }
73
+
74
+ @keyframes group2_anim {
75
+ 0% { transform: translate(-35px, -35px); }
76
+ 25% { transform: translate(25px, 40px); }
77
+ 50% { transform: translate(100px, 35px); }
78
+ 75% { transform: translate(25px, 25px); }
79
+ 100% { transform: translate(-35px, -35px); }
80
+ }
81
+
82
+ #group3 {
83
+ overflow: visible;
84
+ animation: group3_anim 8000ms ease-in-out infinite normal forwards;
85
+ /* Delay animation after fly-in animation */
86
+ transform: translate(120px, 20px);
87
+ animation-delay: 0.8s;
88
+ }
89
+
90
+ @keyframes group3_anim {
91
+ 0% { transform: translate(120px, 20px); }
92
+ 25% { transform: translate(30px, 17px); }
93
+ 50% { transform: translate(35px, 20px); }
94
+ 75% { transform: translate(30px, 120px); }
95
+ 100% { transform: translate(120px, 20px); }
96
+ }
97
+
98
+ #group4 {
99
+ animation: group4_anim 12000ms ease-in-out infinite normal forwards;
100
+ /* Delay animation after fly-in animation */
101
+ transform: translate(40px, -40px);
102
+ animation-delay: 0.8s;
103
+ }
104
+
105
+ @keyframes group4_anim {
106
+ 0% { transform: translate(40px, -40px); }
107
+ 25% { transform: translate(25px, 45px); }
108
+ 50% { transform: translate(-20px, 120px); }
109
+ 75% { transform: translate(50px, 0px); }
110
+ 100% { transform: translate(40px, -40px); }
111
+ }
112
+ </style>
113
+ <defs>
114
+ <!-- Define the circular masks -->
115
+ <mask id="circleMask1">
116
+ <rect width="100" height="100" fill="black" />
117
+ <circle cx="50" cy="50" r="50" fill="white" />
118
+ </mask>
119
+ <mask id="circleMask2">
120
+ <rect width="100" height="100" fill="black" />
121
+ <circle cx="50" cy="50" r="46" fill="white" />
122
+ </mask>
123
+
124
+ <!-- Radial Gradients for Animations -->
125
+ <radialGradient id="gradient1" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
126
+ <stop offset="0%" stop-color="var(--logo-color1)" />
127
+ <stop offset="80%" stop-color="var(--logo-color1-transparent)" />
128
+ </radialGradient>
129
+ <radialGradient id="gradient2" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
130
+ <stop offset="0%" stop-color="var(--logo-color2)" />
131
+ <stop offset="80%" stop-color="var(--logo-color2-transparent)" />
132
+ </radialGradient>
133
+ <radialGradient id="gradient3" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
134
+ <stop offset="0%" stop-color="var(--logo-color3)" />
135
+ <stop offset="50%" stop-color="var(--logo-color3-transparent)" />
136
+ </radialGradient>
137
+ <radialGradient id="gradient4" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
138
+ <stop offset="0%" stop-color="var(--logo-color4)" />
139
+ <stop offset="80%" stop-color="var(--logo-color4-transparent)" />
140
+ </radialGradient>
141
+
142
+ <!-- Radial Gradient for Centered Disc -->
143
+ <radialGradient id="centerGradient" cx="0.5" cy="0.5" r="0.5" spreadMethod="pad">
144
+ <stop offset="0%" stop-color="rgba(255, 255, 255, 0)" />
145
+ <stop offset="75%" stop-color="rgba(255, 255, 255, 0)" />
146
+ <stop offset="100%" stop-color="var(--logo-glass-color)" />
147
+ </radialGradient>
148
+
149
+ <!-- Gaussian blur filter -->
150
+ <filter id="blurFilter" x="-150%" y="-150%" width="400%" height="400%">
151
+ <feGaussianBlur stdDeviation="8" />
152
+ </filter>
153
+
154
+
155
+
156
+
157
+ </defs>
158
+
159
+ <!-- Larger Disc (border) -->
160
+ <g mask="url(#circleMask1)">
161
+ <circle cx="50" cy="50" r="50" fill="var(--logo-color2)" />
162
+ <g id="group1">
163
+ <ellipse x="50" rx="500" ry="80" fill="url(#gradient3)" filter="url(#blurFilter)" />
164
+ </g>
165
+ <g id="group2">
166
+ <ellipse rx="100" ry="100" fill="url(#gradient2)" filter="url(#blurFilter)" />
167
+ </g>
168
+ <g id="group3">
169
+ <ellipse rx="100" ry="100" fill="url(#gradient1)" filter="url(#blurFilter)" />
170
+ </g>
171
+ </g>
172
+
173
+ <!-- Smaller Disc -->
174
+ <g mask="url(#circleMask2)">
175
+ <circle cx="50" cy="50" r="46" fill="var(--logo-color1)" />
176
+ <g id="group1">
177
+ <ellipse x="50" rx="100" ry="80" fill="url(#gradient1)" filter="url(#blurFilter)" />
178
+ </g>
179
+ <g id="group2">
180
+ <ellipse rx="80" ry="50" fill="url(#gradient2)" filter="url(#blurFilter)" />
181
+ </g>
182
+ <g id="group3">
183
+ <ellipse rx="60" ry="40" fill="url(#gradient3)" filter="url(#blurFilter)" />
184
+ </g>
185
+ <g id="group4">
186
+ <ellipse rx="30" ry="40" fill="url(#gradient4)" filter="url(#blurFilter)" />
187
+ </g>
188
+
189
+ <!-- Grain -->
190
+ <circle cx="50" cy="50" r="46" fill="url(#centerGradient)" filter='url(#grainFilter)' style="mix-blend-mode: soft-light;" />
191
+ </g>
192
+
193
+ <!-- Grain -->
194
+ <circle cx="50" cy="50" r="46" fill="url(#centerGradient)" />
195
+ </svg>
196
+ `,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:`
194
197
  <svg width="0" height="0">
195
198
  <defs>
196
199
  <mask id="microphone-mask" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox">
@@ -237,4 +240,4 @@ var LiipGPTButton=function(qr){"use strict";const Go="5";typeof window<"u"&&((wi
237
240
  <svg viewBox="0 0 24 24" fill="none">
238
241
  <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"/>
239
242
  </svg>
240
- `}}},ec=at(Ao,{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)"}},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)"}},referenceDescription:{color:"var(--color-grey-300)",hover:{color:"var(--color-grey-300)"}},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)"}}}}),Bt={fineGrained:{light:Ao,dark:ec}},tc=Object.freeze(Object.defineProperty({__proto__:null,theme:Bt},Symbol.toStringTag,{value:"Module"})),rc=t=>{const e=Ql(t);return{light:at(Bt.fineGrained.light,e)}},nc=t=>{const e={};return t.dark&&(e.dark=at(Bt.fineGrained.dark,t.dark)),t.light&&(e.light=at(Bt.fineGrained.light,t.light)),!t.dark&&!t.light&&(e.light=t.light),e},zt={de:{answerGood:"Gute Antwort",answerBad:"Schlechte Antwort",predefinedQuestions:"Vordefinierte Fragen:",chatInputPlaceholder:"Fragen Sie mich etwas",chatInputPlaceholderListening:"Ich höre zu...",chatInputSubmit:"Aufforderung senden",chatInputStartListening:"Spracherkennung starten",chatInputStopListening:"Spracherkennung beenden",introductionTitle:'Ich bin <span class="liipgpt-gradient-text">LiipGPT</span>. Wie kann ich Ihnen heute helfen?',newChat:"Neuer Chat",maintenanceModeError:"Der Chat ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut.",messageBotLoading:"Lass mich nachdenken",messageBotError:"Es ist ein Fehler aufgetreten:",messageBotDefaultError:"Unbekannter Fehler",referenceLink:"Link zur Referenz",referencesDisplay:"Referenzen anzeigen",referencesHide:"Referenzen ausblenden",referencesTitle:"Referenzen",referencesFurtherTitle:"Weitere Referenzen",chatFooterText:"",scrollToBottom:"Nach unten scrollen",openMenu:"Menü öffnen",closeMenu:"Menü schließen",closeChat:"Chat schließen",close:"Schließen",openInfo:"Info öffnen",send:"Abschicken",thankYouForFeedback:"Danke für Dein Feedback!",giveFeedback:"Feedback geben",sendFeedback:"Feedback senden",feedbackFormTitle:"<h4>Feedback geben, um unseren Chatbot zu verbessern</h4>",feedbackFormMessage:"Ihre Nachricht",feedbackFormMessagePlaceholder:"Schreiben Sie hier Ihre Nachricht...",feedbackFormEmail:"E-Mail",feedbackFormEmailPlaceholder:"Ihre E-Mail eingeben...",classificationSubmit:"Abschicken",classificationThankYou:"Danke für Dein Feedback!",classificationTitle:"Bitte bewerten Sie den Einfluss und die Qualität der Nachricht oben",selectLanguage:"Sprache auswählen",lightMode:"Hell",darkMode:"Dunkel"},en:{answerGood:"Good answer",answerBad:"Bad answer",predefinedQuestions:"Predefined Questions:",chatInputPlaceholder:"Ask me something",chatInputPlaceholderListening:"I'm listening...",chatInputSubmit:"Send prompt",chatInputStartListening:"Start speech recognition",chatInputStopListening:"Stop speech recognition",introductionTitle:'I am <span class="liipgpt-gradient-text">LiipGPT</span>. How can I help you out today?',newChat:"New discussion",maintenanceModeError:"The chat is currently not available. Please try again later.",messageBotLoading:"Let me think",messageBotError:"An error occurred:",messageBotDefaultError:"Unknown error",referenceLink:"Link to reference",referencesDisplay:"Show references",referencesHide:"Hide references",referencesTitle:"References",referencesFurtherTitle:"More references",chatFooterText:"",scrollToBottom:"Scroll to bottom",openMenu:"Open menu",closeMenu:"Close menu",closeChat:"Close chat",openInfo:"Open info",close:"Close",send:"Send",thankYouForFeedback:"Thank you for your feedback!",giveFeedback:"Give feedback",sendFeedback:"Send feedback",feedbackFormTitle:"<h4>Give feedback to improve our Chatbot</h4>",feedbackFormMessage:"Your message",feedbackFormMessagePlaceholder:"Write your message here...",feedbackFormEmail:"E-Mail",feedbackFormEmailPlaceholder:"Enter your E-Mail",classificationSubmit:"Submit",classificationThankYou:"Thank you for your feedback!",classificationTitle:"Please rate the impact and quality of the message above",selectLanguage:"Select language",lightMode:"Light",darkMode:"Dark"},it:{answerGood:"Risposta buona",answerBad:"Risposta cattiva",predefinedQuestions:"Domande predefinite:",chatInputPlaceholder:"Chiedimi qualcosa",chatInputPlaceholderListening:"Sto ascoltando...",chatInputSubmit:"Invia richiesta",chatInputStartListening:"Avvia il riconoscimento vocale",chatInputStopListening:"Ferma il riconoscimento vocale",introductionTitle:'Sono <span class="liipgpt-gradient-text">LiipGPT</span>. Come posso aiutarti oggi?',newChat:"Nuova discussione",maintenanceModeError:"Il chat è attualmente non disponibile. Per favore riprova più tardi.",messageBotLoading:"Fammi pensare",messageBotError:"Si è verificato un errore:",messageBotDefaultError:"Errore sconosciuto",referenceLink:"Link alla referenza",referencesDisplay:"Mostra riferimenti",referencesHide:"Nascondi riferimenti",referencesTitle:"Riferimenti",referencesFurtherTitle:"Più riferimenti",chatFooterText:"",scrollToBottom:"Scorri verso il basso",openMenu:"Apri menu",closeMenu:"Chiudi menu",closeChat:"Chiudi chat",openInfo:"Apri info",close:"Chiudi",send:"Invia",thankYouForFeedback:"Grazie per il tuo feedback!",giveFeedback:"Invia feedback",sendFeedback:"Invia feedback",feedbackFormTitle:"<h4>Invia feedback per migliorare il nostro Chatbot</h4>",feedbackFormMessage:"Il tuo messaggio",feedbackFormMessagePlaceholder:"Scrivi qui il tuo messaggio...",feedbackFormEmail:"E-Mail",feedbackFormEmailPlaceholder:"Inserisci il tuo E-Mail",classificationSubmit:"Invia",classificationThankYou:"Grazie per il tuo feedback!",classificationTitle:"Per favore valuta l'impatto e la qualità del messaggio sopra",selectLanguage:"Selezionare la lingua",lightMode:"Chiaro",darkMode:"Scuro"},fr:{answerGood:"Réponse bonne",answerBad:"Réponse mauvaise",predefinedQuestions:"Questions prédéfinies:",chatInputPlaceholder:"Posez-moi une question",chatInputPlaceholderListening:"J'écoute...",chatInputSubmit:"Envoyer la demande",chatInputStartListening:"Démarrer la reconnaissance vocale",chatInputStopListening:"Arrêter la reconnaissance vocale",introductionTitle:"Je suis <span class='liipgpt-gradient-text'>LiipGPT</span>. Comment puis-je vous aider aujourd'hui?",newChat:"Nouvelle discussion",maintenanceModeError:"Le chat est actuellement indisponible. Veuillez réessayer plus tard.",messageBotLoading:"Laissez-moi réfléchir",messageBotError:"Une erreur est survenue:",messageBotDefaultError:"Erreur inconnue",referenceLink:"Lien vers la référence",referencesDisplay:"Afficher les références",referencesHide:"Masquer les références",referencesTitle:"Références",referencesFurtherTitle:"Plus de références",chatFooterText:"",scrollToBottom:"Scroller vers le bas",openMenu:"Ouvrir le menu",closeMenu:"Fermer le menu",closeChat:"Fermer le chat",openInfo:"Ouvrir info",close:"Fermer",send:"Envoyer",thankYouForFeedback:"Merci pour votre feedback!",giveFeedback:"Donner un feedback",sendFeedback:"Envoyer un feedback",feedbackFormTitle:"<h4>Donnez un feedback pour améliorer notre Chatbot</h4>",feedbackFormMessage:"Votre message",feedbackFormMessagePlaceholder:"Écrivez votre message ici...",feedbackFormEmail:"E-Mail",feedbackFormEmailPlaceholder:"Entrez votre E-Mail",classificationSubmit:"Envoyer",classificationThankYou:"Merci pour votre feedback!",classificationTitle:"Veuillez évaluer l'impact et la qualité du message ci-dessus",selectLanguage:"Choisir la langue",lightMode:"Clair",darkMode:"Sombre"}},ac=Object.freeze(Object.defineProperty({__proto__:null,translations:zt},Symbol.toStringTag,{value:"Module"})),oc=t=>{t=t??zt;const e={};return t.de&&(e.de=at(zt.de,t.de)),t.en&&(e.en=at(zt.en,t.en)),t.fr&&(e.fr=at(zt.fr,t.fr)),t.it&&(e.it=at(zt.it,t.it)),e},ic=t=>{let e;t.theme?.fineGrained?e=nc(t.theme?.fineGrained):e=rc(t?.theme??{});const r=oc(t?.translations),n={...t,showPredefinedQuestions:t.showPredefinedQuestions??!0,showOverallFeedbackButton:t.showOverallFeedbackButton??!1,showCloseChatButton:t.showCloseChatButton??!1,showContextInfo:t.showContextInfo??!1,showContextMenu:t.showContextMenu??!1,showTextFeedback:t.showTextFeedback??!0,questionPrefix:t.questionPrefix??"",blockPII:t.blockPII??!1,allowAudioInput:t.allowAudioInput??!1,supportedLanguages:t.supportedLanguages??Object.keys(r),fullTheme:e,translations:r,buttonHref:t.buttonHref,addQueryToUrlParams:t.addQueryToUrlParams??!0,renderKatex:t.renderKatex??!1};return t.classification&&(n.classification=t.classification),t.menu&&(n.menu=t.menu),n},Zn=structuredClone(Bt.fineGrained.light);Zn.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 Oo=structuredClone(Bt.fineGrained.dark);Oo.tokens.colors=Zn.tokens.colors;const sc=Object.freeze(Object.defineProperty({__proto__:null,theme:{fineGrained:{light:Zn,dark:Oo}}},Symbol.toStringTag,{value:"Module"})),Io=t=>t.split("/").pop().split(".")[0],lc=Object.assign({"./default/fallback-dev.theme.ts":sc,"./default/fallback.theme.ts":tc}),jo=new Map;Object.entries(lc).forEach(([t,e])=>{const{error:r,data:n}=Ro.safeParse(e?.theme);if(r){console.error(`Invalid theme in ${t}:`,r);return}jo.set(Io(t),n)}),Array.from(jo.keys());const cc=Object.assign({"./default/fallback.translations.ts":ac}),No=new Map;Object.entries(cc).forEach(([t,e])=>{const{error:r,data:n}=To.safeParse(e?.translations);if(r){console.error(`Invalid translations in ${t}:`,r);return}No.set(Io(t),n)}),Array.from(No.keys());const uc=["en","de","fr","it"],dc="en",Lo=t=>uc.includes(t),Po=t=>{if(Lo(t))return t;const e=fc();return Lo(e)?e:dc},fc=()=>navigator.language.split("-")[0],hc=()=>Po(localStorage.getItem("liipgpt:selectedLanguage"));var _e=typeof window<"u"?window:{screen:{},navigator:{}},Dt=(_e.matchMedia||function(){return{matches:!1}}).bind(_e),pc={get passive(){return!0}},Fo=function(){};_e.addEventListener&&_e.addEventListener("p",Fo,pc),_e.removeEventListener&&_e.removeEventListener("p",Fo,!1);var Vn="ontouchstart"in _e,vc="TouchEvent"in _e,mc=Vn||vc&&Dt("(any-pointer: coarse)").matches,Bo=(_e.navigator.maxTouchPoints||0)>0||mc,zo=_e.navigator.userAgent||"",gc=Dt("(pointer: coarse)").matches&&/iPad|Macintosh/.test(zo)&&Math.min(_e.screen.width||0,_e.screen.height||0)>=768,Do=(Dt("(pointer: coarse)").matches||!Dt("(pointer: fine)").matches&&Vn)&&!/Windows.*Firefox/.test(zo),bc=Dt("(any-pointer: fine)").matches||Dt("(any-hover: hover)").matches||gc||!Vn,Zo=Bo&&(bc||!Do)?"hybrid":Bo?"touchOnly":"mouseOnly",_c=Zo==="mouseOnly"?"mouse":Zo==="touchOnly"||Do?"touch":"mouse";$i();var kc=xe("<a><!></a>"),yc=xe('<button type="button"><!></button>');function Vo(t,e){xt(e,!1);let r=G(e,"href",12),n=G(e,"onclick",12),a=G(e,"onmouseenter",12),o=G(e,"onmouseleave",12),i=G(e,"style",12),s=G(e,"className",12),l=G(e,"isStandalone",12,!1),c=G(e,"children",12);const u=Array.isArray(s())?s():s()?[s()]:[];var h=$e(),d=ie(h);{var g=v=>{var S=kc();let m;var k=Se(S);vn(k,c),Re(S),Yt(p=>{Er(S,"href",r()),m=xn(S,1,yn(u),null,m,p),Rn(S,i())},[()=>({"open-button--standalone":l()})]),Sr("mouseenter",S,function(...p){a()?.apply(this,p)}),Sr("mouseleave",S,function(...p){o()?.apply(this,p)}),Z(v,S)},b=v=>{var S=yc();S.__click=function(...p){n()?.apply(this,p)};let m;var k=Se(S);vn(k,c),Re(S),Yt(p=>{m=xn(S,1,yn(u),null,m,p),Rn(S,i())},[()=>({"open-button--standalone":l()})]),Sr("mouseenter",S,function(...p){a()?.apply(this,p)}),Sr("mouseleave",S,function(...p){o()?.apply(this,p)}),Z(v,S)};Ze(d,v=>{r()?v(g):v(b,!1)})}return Z(t,h),Ct({get href(){return r()},set href(v){r(v),V()},get onclick(){return n()},set onclick(v){n(v),V()},get onmouseenter(){return a()},set onmouseenter(v){a(v),V()},get onmouseleave(){return o()},set onmouseleave(v){o(v),V()},get style(){return i()},set style(v){i(v),V()},get className(){return s()},set className(v){s(v),V()},get isStandalone(){return l()},set isStandalone(v){l(v),V()},get children(){return c()},set children(v){c(v),V()}})}hn(["click"]),tr(Vo,{href:{},onclick:{},onmouseenter:{},onmouseleave:{},style:{},className:{},isStandalone:{},children:{}},[],[],!0);function ir(t,e){xt(e,!0);let r=G(e,"css",7),n=Ja(e,["$$slots","$$events","$$legacy","$$host","css"]);const a=l=>{Hi(()=>{r()&&(l.innerHTML=r())})};var o=$e(),i=ie(o);{var s=l=>{var c=$e(),u=ie(c);ws(u,()=>"style",!1,(h,d)=>{Cs(h,g=>a?.(g)),Os(h,()=>({...n}))}),Z(l,c)};Ze(i,l=>{r()&&l(s)})}return Z(t,o),Ct({get css(){return r()},set css(l){r(l),V()}})}tr(ir,{css:{}},[],[],!0);var wc=xe('<div class="open-button__title"><!></div>'),xc=xe('<div class="open-button__mask"><div class="open-button__description"><!></div></div>'),Cc=xe('<div class="open-button__text"><!> <!></div>'),Rc=xe('<!> <div class="svg svg--avatar open-button__avatar" aria-hidden="true"><!></div>',1),Sc=xe('<link rel="stylesheet"/>'),Tc=xe("<!> <!>",1),Ec=xe('<!> <!> <!> <main class="chat-app"><!></main>',1);function Uo(t,e){xt(e,!0);const r=(y,C)=>{let L=()=>C?.().theme,B=()=>C?.().language;const z=ye(()=>{const{openButtonTitle:se,openButtonDescription:K}=L().translations[B()];return{openButtonTitle:se,openButtonDescription:K}}),D=ye(()=>L().fullTheme[T(n)].tokens.svgs);{let se=ye(()=>["open-button",e.buttonClass]);Vo(y,{get href(){return L().buttonHref},get onclick(){return e.onclick},onmouseenter:v,onmouseleave:S,get style(){return e.buttonStyle},get className(){return T(se)},get isStandalone(){return T(c)},children:(K,qe)=>{var je=Rc(),Ne=ie(je);{var We=_t=>{var Zt=Cc(),Wo=Se(Zt);{var $c=kt=>{var ot=wc(),lr=Se(ot);kn(lr,()=>T(z).openButtonTitle),Re(ot),Z(kt,ot)};Ze(Wo,kt=>{T(z).openButtonTitle&&kt($c)})}var Mc=Je(Wo,2);{var Ac=kt=>{var ot=xc(),lr=Se(ot),Oc=Se(lr);kn(Oc,()=>T(z).openButtonDescription),Re(lr),Ka(lr,Un=>oe(d,Un),()=>T(d)),Re(ot),Ka(ot,Un=>oe(h,Un),()=>T(h)),Z(kt,ot)};Ze(Mc,kt=>{T(z).openButtonDescription&&_c==="mouse"&&kt(Ac)})}Re(Zt),Z(_t,Zt)};Ze(Ne,_t=>{(T(z).openButtonTitle||T(z).openButtonDescription)&&_t(We)})}var bt=Je(Ne,2),sr=Se(bt);kn(sr,()=>T(D).avatar),Re(bt),Z(K,je)},$$slots:{default:!0}})}};let n=de("light"),a=G(e,"host",7),o=G(e,"onError",7),i=Ja(e,["$$slots","$$events","$$legacy","$$host","host","onError"]);const s=async y=>{const L=await(await fetch(`${y}/chatconfig`)).json();return Yl.parse(L)},l=async({forceTheme:y,lang:C,apiUrl:L})=>{const B=window.CHAT_CONFIG_OVERRIDE?window.CHAT_CONFIG_OVERRIDE:await s(L);let z;C?z=Po(C):z=hc();const D=ic(B),se=Object.keys(D.fullTheme);return oe(n,Ws(se),!0),{theme:D,language:z}};let c=ye(()=>!!a()),u=de(!1),h=de(void 0),d=de(void 0),g=ye(()=>T(d)?.offsetWidth??0),b=ye(()=>T(d)?.offsetHeight??0);function v(){!T(d)||!T(h)||(T(h).style.width=`${T(g)}px`,T(h).style.height=`${T(b)}px`)}function S(){!T(u)&&T(h)&&(T(h).style.width="0",T(h).style.height="0")}let m=ye(()=>l(i).catch(y=>o()(y)));var k=$e();os(y=>{var C=$e(),L=ie(C);{var B=z=>{var D=$e(),se=ie(D);Ba(se,()=>T(m),null,(K,qe)=>{var je=Tc();const Ne=ye(()=>T(qe).theme.fullTheme[T(n)]);var We=ie(je);ks(We,17,()=>T(Ne).fontURLs??[],bs,(sr,_t)=>{var Zt=Sc();Yt(()=>Er(Zt,"href",T(_t))),Z(sr,Zt)});var bt=Je(We,2);ir(bt,{id:"font-css",get css(){return T(Ne).fontCSS}}),Z(K,je)}),Z(z,D)};Ze(L,z=>{T(c)&&z(B)})}Z(y,C)});var p=ie(k);return Ba(p,()=>T(m),y=>{},(y,C)=>{var L=$e();const B=ye(()=>T(C).theme.fullTheme[T(n)]);var z=ie(L);{var D=K=>{var qe=Ec(),je=ie(qe);{let _t=ye(()=>Vl(T(B).tokens));ir(je,{id:"theme-css",get css(){return T(_t)}})}var Ne=Je(je,2);ir(Ne,{id:"app-css",get css(){return Us}});var We=Je(Ne,2);ir(We,{id:"custom-css",get css(){return T(B).customCSS}});var bt=Je(We,2),sr=Se(bt);r(sr,()=>T(C)),Re(bt),Z(K,qe)},se=K=>{r(K,()=>T(C))};Ze(z,K=>{T(c)?K(D):K(se,!1)})}Z(y,L)}),Z(t,k),Ct({get host(){return a()},set host(y){a(y),V()},get onError(){return o()},set onError(y){o(y),V()}})}tr(Uo,{host:{},onError:{}},[],[],!0);function qo(t,e){xt(e,!0);let r=G(e,"onclick",7),n=G(e,"buttonClass",7),a=G(e,"buttonStyle",7),o=G(e,"apiUrl",7),i=G(e,"forceTheme",7),s=G(e,"lang",7),l=ye(()=>({onclick:r(),buttonClass:n(),buttonStyle:a(),apiUrl:o(),forceTheme:i(),lang:s()}));return eo(t,{silent:!0,body:(u,h=fr)=>{Uo(u,Ls({host:e.$$host,get onError(){return h()}},()=>T(l)))},$$slots:{body:!0}}),Ct({get onclick(){return r()},set onclick(c){r(c),V()},get buttonClass(){return n()},set buttonClass(c){n(c),V()},get buttonStyle(){return a()},set buttonStyle(c){a(c),V()},get apiUrl(){return o()},set apiUrl(c){o(c),V()},get forceTheme(){return i()},set forceTheme(c){i(c),V()},get lang(){return s()},set lang(c){s(c),V()}})}return customElements.define("liipgpt-button",tr(qo,{forceTheme:{attribute:"force-theme",type:"String"},buttonClass:{attribute:"button-class",type:"String"},buttonStyle:{attribute:"button-style",type:"String"},apiUrl:{attribute:"api-url",type:"String"},lang:{attribute:"lang",type:"String"},onclick:{}},[],[],!0)),qr.LiipGPTButton=qo,Object.defineProperty(qr,Symbol.toStringTag,{value:"Module"}),qr}({});
243
+ `}}},tc=Hr(Ro,{tokens:{base:{lineColor:"color-mix(in srgb, var(--color-brand-100) 20%, transparent)"},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)"}},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)"}},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)"}},referenceDescription:{color:"var(--color-grey-300)",hover:{color:"var(--color-grey-300)"}},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)"}}}}),bt={fineGrained:{light:Ro,dark:tc}},rc=Object.freeze(Object.defineProperty({__proto__:null,theme:bt},Symbol.toStringTag,{value:"Module"})),Vn=t=>typeof t=="string"?Fn[t]:t,nc=t=>{const e=Vn(t?.colors?.brand||Fn.gray),r=Vn(t?.colors?.highlight||e),n={0:"#ffffff",1e3:"#000000",...Vn(t?.colors?.grey||Fn.gray)};let a="";return t.avatarImageUrl?a=`<img src="${t.avatarImageUrl}" alt="Avatar" style="width: 100%; height: 100%; object-fit: cover; border-radius: 50%; aspect-ratio: 1 / 1; display: block; filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.1));" />`:a=bt.fineGrained.light.tokens.svgs.avatar,{fontURLs:t.font?.urls,tokens:{font:{family:t.font?.family},colors:{brand:e,highlight:r,grey:n},base:{fontSizeXs:t.font?.sizeXs,fontSizeSm:t.font?.sizeSm,fontSizeBody:t.font?.sizeBody,fontSizeH3:t.font?.sizeH3,fontSizeH2:t.font?.sizeH2,fontSizeH1:t.font?.sizeH1,fontWeightNormal:t.font?.weightBold,fontWeightBold:t.font?.weightNormal,fontWeightTitle:t.font?.weightTitle,borderRadius:t.borderRadius},components:{body:{background:t.colors?.background,color:t.colors?.text},anchor:{color:t.colors?.anchor?.default,hover:{color:t.colors?.anchor?.hover}}},svgs:{avatar:a}}}},ac=t=>{const e=nc(t);return{light:Hr(bt.fineGrained.light,e)}},oc=t=>{const e={};return t.dark&&(e.dark=Hr(bt.fineGrained.dark,t.dark)),t.light&&(e.light=Hr(bt.fineGrained.light,t.light)),!t.dark&&!t.light&&(e.light=t.light),e},Ft={de:{answerGood:"Gute Antwort",answerBad:"Schlechte Antwort",predefinedQuestions:"Vordefinierte Fragen:",chatInputPlaceholder:"Fragen Sie mich etwas",chatInputPlaceholderListening:"Ich höre zu...",chatInputSubmit:"Aufforderung senden",chatInputStartListening:"Spracherkennung starten",chatInputStopListening:"Spracherkennung beenden",introductionTitle:'Ich bin <span class="liipgpt-gradient-text">LiipGPT</span>. Wie kann ich Ihnen heute helfen?',newChat:"Neuer Chat",maintenanceModeError:"Der Chat ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut.",messageBotLoading:"Lass mich nachdenken",messageBotError:"Es ist ein Fehler aufgetreten:",messageBotDefaultError:"Unbekannter Fehler",referenceLink:"Link zur Referenz",referencesDisplay:"Referenzen anzeigen",referencesHide:"Referenzen ausblenden",referencesTitle:"Referenzen",referencesFurtherTitle:"Weitere Referenzen",chatFooterText:"",scrollToBottom:"Nach unten scrollen",openMenu:"Menü öffnen",closeMenu:"Menü schließen",closeChat:"Chat schließen",close:"Schließen",openInfo:"Info öffnen",send:"Abschicken",thankYouForFeedback:"Danke für Dein Feedback!",giveFeedback:"Feedback geben",sendFeedback:"Feedback senden",feedbackFormTitle:"<h4>Feedback geben, um unseren Chatbot zu verbessern</h4>",feedbackFormMessage:"Ihre Nachricht",feedbackFormMessagePlaceholder:"Schreiben Sie hier Ihre Nachricht...",feedbackFormEmail:"E-Mail",feedbackFormEmailPlaceholder:"Ihre E-Mail eingeben...",classificationSubmit:"Abschicken",classificationThankYou:"Danke für Dein Feedback!",classificationTitle:"Bitte bewerten Sie den Einfluss und die Qualität der Nachricht oben",selectLanguage:"Sprache auswählen",lightMode:"Hell",darkMode:"Dunkel"},en:{answerGood:"Good answer",answerBad:"Bad answer",predefinedQuestions:"Predefined Questions:",chatInputPlaceholder:"Ask me something",chatInputPlaceholderListening:"I'm listening...",chatInputSubmit:"Send prompt",chatInputStartListening:"Start speech recognition",chatInputStopListening:"Stop speech recognition",introductionTitle:'I am <span class="liipgpt-gradient-text">LiipGPT</span>. How can I help you out today?',newChat:"New discussion",maintenanceModeError:"The chat is currently not available. Please try again later.",messageBotLoading:"Let me think",messageBotError:"An error occurred:",messageBotDefaultError:"Unknown error",referenceLink:"Link to reference",referencesDisplay:"Show references",referencesHide:"Hide references",referencesTitle:"References",referencesFurtherTitle:"More references",chatFooterText:"",scrollToBottom:"Scroll to bottom",openMenu:"Open menu",closeMenu:"Close menu",closeChat:"Close chat",openInfo:"Open info",close:"Close",send:"Send",thankYouForFeedback:"Thank you for your feedback!",giveFeedback:"Give feedback",sendFeedback:"Send feedback",feedbackFormTitle:"<h4>Give feedback to improve our Chatbot</h4>",feedbackFormMessage:"Your message",feedbackFormMessagePlaceholder:"Write your message here...",feedbackFormEmail:"E-Mail",feedbackFormEmailPlaceholder:"Enter your E-Mail",classificationSubmit:"Submit",classificationThankYou:"Thank you for your feedback!",classificationTitle:"Please rate the impact and quality of the message above",selectLanguage:"Select language",lightMode:"Light",darkMode:"Dark"},it:{answerGood:"Risposta buona",answerBad:"Risposta cattiva",predefinedQuestions:"Domande predefinite:",chatInputPlaceholder:"Chiedimi qualcosa",chatInputPlaceholderListening:"Sto ascoltando...",chatInputSubmit:"Invia richiesta",chatInputStartListening:"Avvia il riconoscimento vocale",chatInputStopListening:"Ferma il riconoscimento vocale",introductionTitle:'Sono <span class="liipgpt-gradient-text">LiipGPT</span>. Come posso aiutarti oggi?',newChat:"Nuova discussione",maintenanceModeError:"Il chat è attualmente non disponibile. Per favore riprova più tardi.",messageBotLoading:"Fammi pensare",messageBotError:"Si è verificato un errore:",messageBotDefaultError:"Errore sconosciuto",referenceLink:"Link alla referenza",referencesDisplay:"Mostra riferimenti",referencesHide:"Nascondi riferimenti",referencesTitle:"Riferimenti",referencesFurtherTitle:"Più riferimenti",chatFooterText:"",scrollToBottom:"Scorri verso il basso",openMenu:"Apri menu",closeMenu:"Chiudi menu",closeChat:"Chiudi chat",openInfo:"Apri info",close:"Chiudi",send:"Invia",thankYouForFeedback:"Grazie per il tuo feedback!",giveFeedback:"Invia feedback",sendFeedback:"Invia feedback",feedbackFormTitle:"<h4>Invia feedback per migliorare il nostro Chatbot</h4>",feedbackFormMessage:"Il tuo messaggio",feedbackFormMessagePlaceholder:"Scrivi qui il tuo messaggio...",feedbackFormEmail:"E-Mail",feedbackFormEmailPlaceholder:"Inserisci il tuo E-Mail",classificationSubmit:"Invia",classificationThankYou:"Grazie per il tuo feedback!",classificationTitle:"Per favore valuta l'impatto e la qualità del messaggio sopra",selectLanguage:"Selezionare la lingua",lightMode:"Chiaro",darkMode:"Scuro"},fr:{answerGood:"Réponse bonne",answerBad:"Réponse mauvaise",predefinedQuestions:"Questions prédéfinies:",chatInputPlaceholder:"Posez-moi une question",chatInputPlaceholderListening:"J'écoute...",chatInputSubmit:"Envoyer la demande",chatInputStartListening:"Démarrer la reconnaissance vocale",chatInputStopListening:"Arrêter la reconnaissance vocale",introductionTitle:"Je suis <span class='liipgpt-gradient-text'>LiipGPT</span>. Comment puis-je vous aider aujourd'hui?",newChat:"Nouvelle discussion",maintenanceModeError:"Le chat est actuellement indisponible. Veuillez réessayer plus tard.",messageBotLoading:"Laissez-moi réfléchir",messageBotError:"Une erreur est survenue:",messageBotDefaultError:"Erreur inconnue",referenceLink:"Lien vers la référence",referencesDisplay:"Afficher les références",referencesHide:"Masquer les références",referencesTitle:"Références",referencesFurtherTitle:"Plus de références",chatFooterText:"",scrollToBottom:"Scroller vers le bas",openMenu:"Ouvrir le menu",closeMenu:"Fermer le menu",closeChat:"Fermer le chat",openInfo:"Ouvrir info",close:"Fermer",send:"Envoyer",thankYouForFeedback:"Merci pour votre feedback!",giveFeedback:"Donner un feedback",sendFeedback:"Envoyer un feedback",feedbackFormTitle:"<h4>Donnez un feedback pour améliorer notre Chatbot</h4>",feedbackFormMessage:"Votre message",feedbackFormMessagePlaceholder:"Écrivez votre message ici...",feedbackFormEmail:"E-Mail",feedbackFormEmailPlaceholder:"Entrez votre E-Mail",classificationSubmit:"Envoyer",classificationThankYou:"Merci pour votre feedback!",classificationTitle:"Veuillez évaluer l'impact et la qualité du message ci-dessus",selectLanguage:"Choisir la langue",lightMode:"Clair",darkMode:"Sombre"}},ic=Object.freeze(Object.defineProperty({__proto__:null,translations:Ft},Symbol.toStringTag,{value:"Module"})),sc=t=>{t=t??Ft;const e={};return t.de&&(e.de=ir(Ft.de,t.de)),t.en&&(e.en=ir(Ft.en,t.en)),t.fr&&(e.fr=ir(Ft.fr,t.fr)),t.it&&(e.it=ir(Ft.it,t.it)),e},lc=t=>{let e;t.theme?.fineGrained?e=oc(t.theme?.fineGrained):e=ac(t?.theme??{});const r=sc(t?.translations),n={...t,showPredefinedQuestions:t.showPredefinedQuestions??!0,showOverallFeedbackButton:t.showOverallFeedbackButton??!1,showCloseChatButton:t.showCloseChatButton??!1,showContextInfo:t.showContextInfo??!1,showContextMenu:t.showContextMenu??!1,showTextFeedback:t.showTextFeedback??!0,questionPrefix:t.questionPrefix??"",blockPII:t.blockPII??!1,allowAudioInput:t.allowAudioInput??!1,supportedLanguages:t.supportedLanguages??Object.keys(r),fullTheme:e,translations:r,buttonHref:t.buttonHref,addQueryToUrlParams:t.addQueryToUrlParams??!0,renderKatex:t.renderKatex??!1};return t.classification&&(n.classification=t.classification),t.menu&&(n.menu=t.menu),n},Un=structuredClone(bt.fineGrained.light);Un.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 Io=structuredClone(bt.fineGrained.dark);Io.tokens.colors=Un.tokens.colors;const cc=Object.freeze(Object.defineProperty({__proto__:null,theme:{fineGrained:{light:Un,dark:Io}}},Symbol.toStringTag,{value:"Module"})),jo=t=>t.split("/").pop().split(".")[0],uc=Object.assign({"./default/fallback-dev.theme.ts":cc,"./default/fallback.theme.ts":rc}),No=new Map;Object.entries(uc).forEach(([t,e])=>{const{error:r,data:n}=To.safeParse(e?.theme);if(r){console.error(`Invalid theme in ${t}:`,r);return}No.set(jo(t),n)}),Array.from(No.keys());const dc=Object.assign({"./default/fallback.translations.ts":ic}),Lo=new Map;Object.entries(dc).forEach(([t,e])=>{const{error:r,data:n}=$o.safeParse(e?.translations);if(r){console.error(`Invalid translations in ${t}:`,r);return}Lo.set(jo(t),n)}),Array.from(Lo.keys());const fc=["en","de","fr","it"],hc="en",Po=t=>fc.includes(t),zo=t=>{if(Po(t))return t;const e=pc();return Po(e)?e:hc},pc=()=>navigator.language.split("-")[0],vc=()=>zo(localStorage.getItem("liipgpt:selectedLanguage"));var ke=typeof window<"u"?window:{screen:{},navigator:{}},Dt=(ke.matchMedia||function(){return{matches:!1}}).bind(ke),mc={get passive(){return!0}},Bo=function(){};ke.addEventListener&&ke.addEventListener("p",Bo,mc),ke.removeEventListener&&ke.removeEventListener("p",Bo,!1);var qn="ontouchstart"in ke,gc="TouchEvent"in ke,bc=qn||gc&&Dt("(any-pointer: coarse)").matches,Fo=(ke.navigator.maxTouchPoints||0)>0||bc,Do=ke.navigator.userAgent||"",_c=Dt("(pointer: coarse)").matches&&/iPad|Macintosh/.test(Do)&&Math.min(ke.screen.width||0,ke.screen.height||0)>=768,Zo=(Dt("(pointer: coarse)").matches||!Dt("(pointer: fine)").matches&&qn)&&!/Windows.*Firefox/.test(Do),kc=Dt("(any-pointer: fine)").matches||Dt("(any-hover: hover)").matches||_c||!qn,Vo=Fo&&(kc||!Zo)?"hybrid":Fo?"touchOnly":"mouseOnly",yc=Vo==="mouseOnly"?"mouse":Vo==="touchOnly"||Zo?"touch":"mouse";Ai();var wc=Ce("<a><!></a>"),xc=Ce('<button type="button"><!></button>');function Uo(t,e){Ct(e,!1);let r=W(e,"href",12),n=W(e,"onclick",12),a=W(e,"onmouseenter",12),o=W(e,"onmouseleave",12),i=W(e,"style",12),s=W(e,"className",12),l=W(e,"isStandalone",12,!1),c=W(e,"children",12);const u=Array.isArray(s())?s():s()?[s()]:[];var h=Ae(),d=se(h);{var g=v=>{var T=wc();let m;var k=Ee(T);gn(k,c),Te(T),Yt(p=>{Or(T,"href",r()),m=Sn(T,1,xn(u),null,m,p),En(T,i())},[()=>({"open-button--standalone":l()})]),Er("mouseenter",T,function(...p){a()?.apply(this,p)}),Er("mouseleave",T,function(...p){o()?.apply(this,p)}),Z(v,T)},b=v=>{var T=xc();T.__click=function(...p){n()?.apply(this,p)};let m;var k=Ee(T);gn(k,c),Te(T),Yt(p=>{m=Sn(T,1,xn(u),null,m,p),En(T,i())},[()=>({"open-button--standalone":l()})]),Er("mouseenter",T,function(...p){a()?.apply(this,p)}),Er("mouseleave",T,function(...p){o()?.apply(this,p)}),Z(v,T)};Ve(d,v=>{r()?v(g):v(b,!1)})}return Z(t,h),St({get href(){return r()},set href(v){r(v),V()},get onclick(){return n()},set onclick(v){n(v),V()},get onmouseenter(){return a()},set onmouseenter(v){a(v),V()},get onmouseleave(){return o()},set onmouseleave(v){o(v),V()},get style(){return i()},set style(v){i(v),V()},get className(){return s()},set className(v){s(v),V()},get isStandalone(){return l()},set isStandalone(v){l(v),V()},get children(){return c()},set children(v){c(v),V()}})}vn(["click"]),tr(Uo,{href:{},onclick:{},onmouseenter:{},onmouseleave:{},style:{},className:{},isStandalone:{},children:{}},[],[],!0);function sr(t,e){Ct(e,!0);let r=W(e,"css",7),n=eo(e,["$$slots","$$events","$$legacy","$$host","css"]);const a=l=>{Yi(()=>{r()&&(l.innerHTML=r())})};var o=Ae(),i=se(o);{var s=l=>{var c=Ae(),u=se(c);xs(u,()=>"style",!1,(h,d)=>{Ss(h,g=>a?.(g)),Is(h,()=>({...n}))}),Z(l,c)};Ve(i,l=>{r()&&l(s)})}return Z(t,o),St({get css(){return r()},set css(l){r(l),V()}})}tr(sr,{css:{}},[],[],!0);var Cc=Ce('<div class="open-button__title"><!></div>'),Sc=Ce('<div class="open-button__mask"><div class="open-button__description"><!></div></div>'),Tc=Ce('<div class="open-button__text"><!> <!></div>'),Ec=Ce('<!> <div class="svg svg--avatar open-button__avatar" aria-hidden="true"><!></div>',1),$c=Ce('<link rel="stylesheet"/>'),Oc=Ce("<!> <!>",1),Ac=Ce('<!> <!> <!> <main class="chat-app"><!></main>',1);function qo(t,e){Ct(e,!0);const r=(y,C)=>{let L=()=>C?.().theme,B=()=>C?.().language;const F=we(()=>{const{openButtonTitle:le,openButtonDescription:K}=L().translations[B()];return{openButtonTitle:le,openButtonDescription:K}}),D=we(()=>L().fullTheme[E(n)].tokens.svgs);{let le=we(()=>["open-button",e.buttonClass]);Uo(y,{get href(){return L().buttonHref},get onclick(){return e.onclick},onmouseenter:v,onmouseleave:T,get style(){return e.buttonStyle},get className(){return E(le)},get isStandalone(){return E(c)},children:(K,He)=>{var Ne=Ec(),Le=se(Ne);{var We=kt=>{var Zt=Tc(),Wo=Ee(Zt);{var Mc=yt=>{var ot=Cc(),cr=Ee(ot);wn(cr,()=>E(F).openButtonTitle),Te(ot),Z(yt,ot)};Ve(Wo,yt=>{E(F).openButtonTitle&&yt(Mc)})}var Rc=Je(Wo,2);{var Ic=yt=>{var ot=Sc(),cr=Ee(ot),jc=Ee(cr);wn(jc,()=>E(F).openButtonDescription),Te(cr),Ja(cr,Hn=>ie(d,Hn),()=>E(d)),Te(ot),Ja(ot,Hn=>ie(h,Hn),()=>E(h)),Z(yt,ot)};Ve(Rc,yt=>{E(F).openButtonDescription&&yc==="mouse"&&yt(Ic)})}Te(Zt),Z(kt,Zt)};Ve(Le,kt=>{(E(F).openButtonTitle||E(F).openButtonDescription)&&kt(We)})}var _t=Je(Le,2),lr=Ee(_t);wn(lr,()=>E(D).avatar),Te(_t),Z(K,Ne)},$$slots:{default:!0}})}};let n=fe("light"),a=W(e,"host",7),o=W(e,"onError",7),i=eo(e,["$$slots","$$events","$$legacy","$$host","host","onError"]);const s=async y=>{const L=await(await fetch(`${y}/chatconfig`)).json();return Ql.parse(L)},l=async({forceTheme:y,lang:C,apiUrl:L})=>{const B=window.CHAT_CONFIG_OVERRIDE?window.CHAT_CONFIG_OVERRIDE:await s(L);let F;C?F=zo(C):F=vc();const D=lc(B),le=Object.keys(D.fullTheme);return ie(n,Ws(le),!0),{theme:D,language:F}};let c=we(()=>!!a()),u=fe(!1),h=fe(void 0),d=fe(void 0),g=we(()=>E(d)?.offsetWidth??0),b=we(()=>E(d)?.offsetHeight??0);function v(){!E(d)||!E(h)||(E(h).style.width=`${E(g)}px`,E(h).style.height=`${E(b)}px`)}function T(){!E(u)&&E(h)&&(E(h).style.width="0",E(h).style.height="0")}let m=we(()=>l(i).catch(y=>o()(y)));var k=Ae();is(y=>{var C=Ae(),L=se(C);{var B=F=>{var D=Ae(),le=se(D);Da(le,()=>E(m),null,(K,He)=>{var Ne=Oc();const Le=we(()=>E(He).theme.fullTheme[E(n)]);var We=se(Ne);ys(We,17,()=>E(Le).fontURLs??[],_s,(lr,kt)=>{var Zt=$c();Yt(()=>Or(Zt,"href",E(kt))),Z(lr,Zt)});var _t=Je(We,2);sr(_t,{id:"font-css",get css(){return E(Le).fontCSS}}),Z(K,Ne)}),Z(F,D)};Ve(L,F=>{E(c)&&F(B)})}Z(y,C)});var p=se(k);return Da(p,()=>E(m),y=>{},(y,C)=>{var L=Ae();const B=we(()=>E(C).theme.fullTheme[E(n)]);var F=se(L);{var D=K=>{var He=Ac(),Ne=se(He);{let kt=we(()=>Ul(E(B).tokens));sr(Ne,{id:"theme-css",get css(){return E(kt)}})}var Le=Je(Ne,2);sr(Le,{id:"app-css",get css(){return qs}});var We=Je(Le,2);sr(We,{id:"custom-css",get css(){return E(B).customCSS}});var _t=Je(We,2),lr=Ee(_t);r(lr,()=>E(C)),Te(_t),Z(K,He)},le=K=>{r(K,()=>E(C))};Ve(F,K=>{E(c)?K(D):K(le,!1)})}Z(y,L)}),Z(t,k),St({get host(){return a()},set host(y){a(y),V()},get onError(){return o()},set onError(y){o(y),V()}})}tr(qo,{host:{},onError:{}},[],[],!0);function Ho(t,e){Ct(e,!0);let r=W(e,"onclick",7),n=W(e,"buttonClass",7),a=W(e,"buttonStyle",7),o=W(e,"apiUrl",7),i=W(e,"forceTheme",7),s=W(e,"lang",7),l=we(()=>({onclick:r(),buttonClass:n(),buttonStyle:a(),apiUrl:o(),forceTheme:i(),lang:s()}));return ro(t,{silent:!0,body:(u,h=hr)=>{qo(u,Ps({host:e.$$host,get onError(){return h()}},()=>E(l)))},$$slots:{body:!0}}),St({get onclick(){return r()},set onclick(c){r(c),V()},get buttonClass(){return n()},set buttonClass(c){n(c),V()},get buttonStyle(){return a()},set buttonStyle(c){a(c),V()},get apiUrl(){return o()},set apiUrl(c){o(c),V()},get forceTheme(){return i()},set forceTheme(c){i(c),V()},get lang(){return s()},set lang(c){s(c),V()}})}return customElements.define("liipgpt-button",tr(Ho,{forceTheme:{attribute:"force-theme",type:"String"},buttonClass:{attribute:"button-class",type:"String"},buttonStyle:{attribute:"button-style",type:"String"},apiUrl:{attribute:"api-url",type:"String"},lang:{attribute:"lang",type:"String"},onclick:{}},[],[],!0)),Wr.LiipGPTButton=Ho,Object.defineProperty(Wr,Symbol.toStringTag,{value:"Module"}),Wr}({});