@botfabrik/engine-webclient 4.106.1 → 4.107.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.
@@ -13,7 +13,7 @@
13
13
  <meta name="theme-color" content="#000000" />
14
14
  <meta name="google" content="notranslate" />
15
15
  <title>Bubble Chat Client</title>
16
- <script type="module" crossorigin src="./assets/index-Di6Q4o71.js"></script>
16
+ <script type="module" crossorigin src="./assets/index-DJ2nppVp.js"></script>
17
17
  <link rel="stylesheet" crossorigin href="./assets/index-CXSidNoh.css">
18
18
  </head>
19
19
 
@@ -1,5 +1,5 @@
1
- (function(){"use strict";const Be=!1;var Tn=Array.isArray,Sn=Array.prototype.indexOf,fe=Array.prototype.includes,On=Array.from,Cn=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,An=Object.getOwnPropertyDescriptors,Rn=Object.prototype,Nn=Array.prototype,wt=Object.getPrototypeOf,mt=Object.isExtensible;const Dn=()=>{};function In(e){for(var t=0;t<e.length;t++)e[t]()}function bt(){var e,t,n=new Promise((i,r)=>{e=i,t=r});return{promise:n,resolve:e,reject:t}}const k=2,ye=4,Ce=8,yt=1<<24,V=16,q=32,ne=64,Et=128,D=512,E=1024,x=2048,F=4096,B=8192,K=16384,Ee=32768,ce=65536,kt=1<<17,Ge=1<<18,de=1<<19,Ln=1<<20,re=65536,Ye=1<<21,Ve=1<<22,Q=1<<23,Ae=Symbol("$state"),Mn=Symbol("legacy props"),Pn=Symbol(""),ie=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Fn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Un(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function zn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Wn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function jn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Hn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function qn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Bn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Gn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Yn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Vn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Kn=1,Xn=4,Zn=8,Jn=16,Qn=1,$n=2,T=Symbol(),xt="http://www.w3.org/1999/xhtml";function er(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Tt(e){return e===this.v}function tr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function nr(e){return!tr(e,this.v)}let rr=!1,A=null;function he(e){A=e}function Re(e,t=!1,n){A={p:A,i:!1,c:null,e:null,s:e,x:null,l:null}}function Ne(e){var t=A,n=t.e;if(n!==null){t.e=null;for(var i of n)Bt(i)}return t.i=!0,A=t.p,{}}function St(){return!0}let ve=[];function ir(){var e=ve;ve=[],In(e)}function _e(e){if(ve.length===0){var t=ve;queueMicrotask(()=>{t===ve&&ir()})}ve.push(e)}function Ot(e){var t=g;if(t===null)return _.f|=Q,e;if((t.f&Ee)===0&&(t.f&ye)===0)throw e;pe(e,t)}function pe(e,t){for(;t!==null;){if((t.f&Et)!==0){if((t.f&Ee)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const sr=-7169;function b(e,t){e.f=e.f&sr|t}function Ke(e){(e.f&D)!==0||e.deps===null?b(e,E):b(e,F)}function Ct(e){if(e!==null)for(const t of e)(t.f&k)===0||(t.f&re)===0||(t.f^=re,Ct(t.deps))}function At(e,t,n){(e.f&x)!==0?t.add(e):(e.f&F)!==0&&n.add(e),Ct(e.deps),b(e,E)}const De=new Set;let m=null,U=null,I=[],Xe=null,Ze=!1;class ${committed=!1;current=new Map;previous=new Map;#t=new Set;#a=new Set;#e=0;#s=0;#o=null;#r=new Set;#n=new Set;#i=new Map;is_fork=!1;#l=!1;is_deferred(){return this.is_fork||this.#s>0}skip_effect(t){this.#i.has(t)||this.#i.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#i.get(t);if(n){this.#i.delete(t);for(var i of n.d)b(i,x),z(i);for(i of n.m)b(i,F),z(i)}}process(t){I=[],this.apply();var n=[],i=[];for(const r of t)this.#f(r,n,i);if(this.is_deferred()){this.#u(i),this.#u(n);for(const[r,s]of this.#i)It(r,s)}else{for(const r of this.#t)r();this.#t.clear(),this.#e===0&&this.#c(),m=null,Rt(i),Rt(n),this.#o?.resolve()}U=null}#f(t,n,i){t.f^=E;for(var r=t.first,s=null;r!==null;){var o=r.f,a=(o&(q|ne))!==0,l=a&&(o&E)!==0,f=l||(o&B)!==0||this.#i.has(r);if(!f&&r.fn!==null){a?r.f^=E:s!==null&&(o&(ye|Ce|yt))!==0?s.b.defer_effect(r):(o&ye)!==0?n.push(r):Te(r)&&((o&V)!==0&&this.#n.add(r),we(r));var c=r.first;if(c!==null){r=c;continue}}var d=r.parent;for(r=r.next;r===null&&d!==null;)d===s&&(s=null),r=d.next,d=d.parent}}#u(t){for(var n=0;n<t.length;n+=1)At(t[n],this.#r,this.#n)}capture(t,n){n!==T&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&Q)===0&&(this.current.set(t,t.v),U?.set(t,t.v))}activate(){m=this,this.apply()}deactivate(){m===this&&(m=null,U=null)}flush(){if(this.activate(),I.length>0){if(or(),m!==null&&m!==this)return}else this.#e===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#a)t(this);this.#a.clear()}#c(){if(De.size>1){this.previous.clear();var t=U,n=!0;for(const r of De){if(r===this){n=!1;continue}const s=[];for(const[a,l]of this.current){if(r.current.has(a))if(n&&l!==r.current.get(a))r.current.set(a,l);else continue;s.push(a)}if(s.length===0)continue;const o=[...r.current.keys()].filter(a=>!this.current.has(a));if(o.length>0){var i=I;I=[];const a=new Set,l=new Map;for(const f of s)Nt(f,o,a,l);if(I.length>0){m=r,r.apply();for(const f of I)r.#f(f,[],[]);r.deactivate()}I=i}}m=null,U=t}this.committed=!0,De.delete(this)}increment(t){this.#e+=1,t&&(this.#s+=1)}decrement(t){this.#e-=1,t&&(this.#s-=1),!this.#l&&(this.#l=!0,_e(()=>{this.#l=!1,this.is_deferred()?I.length>0&&this.flush():this.revive()}))}revive(){for(const t of this.#r)this.#n.delete(t),b(t,x),z(t);for(const t of this.#n)b(t,F),z(t);this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#a.add(t)}settled(){return(this.#o??=bt()).promise}static ensure(){if(m===null){const t=m=new $;De.add(m),_e(()=>{m===t&&t.flush()})}return m}apply(){}}function or(){Ze=!0;var e=null;try{for(var t=0;I.length>0;){var n=$.ensure();if(t++>1e3){var i,r;ar()}n.process(I),ee.clear()}}finally{I=[],Ze=!1,Xe=null}}function ar(){try{Hn()}catch(e){pe(e,Xe)}}let X=null;function Rt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var i=e[n++];if((i.f&(K|B))===0&&Te(i)&&(X=new Set,we(i),i.deps===null&&i.first===null&&i.nodes===null&&i.teardown===null&&i.ac===null&&Yt(i),X?.size>0)){ee.clear();for(const r of X){if((r.f&(K|B))!==0)continue;const s=[r];let o=r.parent;for(;o!==null;)X.has(o)&&(X.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&(K|B))===0&&we(l)}}X.clear()}}X=null}}function Nt(e,t,n,i){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const r of e.reactions){const s=r.f;(s&k)!==0?Nt(r,t,n,i):(s&(Ve|V))!==0&&(s&x)===0&&Dt(r,t,i)&&(b(r,x),z(r))}}function Dt(e,t,n){const i=n.get(e);if(i!==void 0)return i;if(e.deps!==null)for(const r of e.deps){if(fe.call(t,r))return!0;if((r.f&k)!==0&&Dt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function z(e){for(var t=Xe=e;t.parent!==null;){t=t.parent;var n=t.f;if(Ze&&t===g&&(n&V)!==0&&(n&Ge)===0)return;if((n&(ne|q))!==0){if((n&E)===0)return;t.f^=E}}I.push(t)}function It(e,t){if(!((e.f&q)!==0&&(e.f&E)!==0)){(e.f&x)!==0?t.d.push(e):(e.f&F)!==0&&t.m.push(e),b(e,E);for(var n=e.first;n!==null;)It(n,t),n=n.next}}function lr(e){let t=0,n=Ie(0),i;return()=>{nt()&&(S(n),Nr(()=>(t===0&&(i=st(()=>e(()=>ke(n)))),t+=1,()=>{_e(()=>{t-=1,t===0&&(i?.(),i=void 0,ke(n))})})))}}var fr=ce|de|Et;function ur(e,t,n){new cr(e,t,n)}class cr{parent;is_pending=!1;#t;#a=null;#e;#s;#o;#r=null;#n=null;#i=null;#l=null;#f=null;#u=0;#c=0;#v=!1;#h=!1;#_=new Set;#p=new Set;#d=null;#y=lr(()=>(this.#d=Ie(this.#u),()=>{this.#d=null}));constructor(t,n,i){this.#t=t,this.#e=n,this.#s=i,this.parent=g.b,this.is_pending=!!this.#e.pending,this.#o=rt(()=>{g.b=this;{var r=this.#m();try{this.#r=J(()=>i(r))}catch(s){this.error(s)}this.#c>0?this.#w():this.is_pending=!1}return()=>{this.#f?.remove()}},fr)}#E(){try{this.#r=J(()=>this.#s(this.#t))}catch(t){this.error(t)}}#k(){const t=this.#e.pending;t&&(this.#n=J(()=>t(this.#t)),_e(()=>{var n=this.#m();this.#r=this.#g(()=>($.ensure(),J(()=>this.#s(n)))),this.#c>0?this.#w():(xe(this.#n,()=>{this.#n=null}),this.is_pending=!1)}))}#m(){var t=this.#t;return this.is_pending&&(this.#f=ge(),this.#t.before(this.#f),t=this.#f),t}defer_effect(t){At(t,this.#_,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#e.pending}#g(t){var n=g,i=_,r=A;G(this.#o),L(this.#o),he(this.#o.ctx);try{return t()}catch(s){return Ot(s),null}finally{G(n),L(i),he(r)}}#w(){const t=this.#e.pending;this.#r!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#f),Xt(this.#r,this.#l)),this.#n===null&&(this.#n=J(()=>t(this.#t)))}#b(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(t);return}if(this.#c+=t,this.#c===0){this.is_pending=!1;for(const n of this.#_)b(n,x),z(n);for(const n of this.#p)b(n,F),z(n);this.#_.clear(),this.#p.clear(),this.#n&&xe(this.#n,()=>{this.#n=null}),this.#l&&(this.#t.before(this.#l),this.#l=null)}}update_pending_count(t){this.#b(t),this.#u+=t,!(!this.#d||this.#v)&&(this.#v=!0,_e(()=>{this.#v=!1,this.#d&&Le(this.#d,this.#u)}))}get_effect_pending(){return this.#y(),S(this.#d)}error(t){var n=this.#e.onerror;let i=this.#e.failed;if(this.#h||!n&&!i)throw t;this.#r&&(R(this.#r),this.#r=null),this.#n&&(R(this.#n),this.#n=null),this.#i&&(R(this.#i),this.#i=null);var r=!1,s=!1;const o=()=>{if(r){er();return}r=!0,s&&Vn(),$.ensure(),this.#u=0,this.#i!==null&&xe(this.#i,()=>{this.#i=null}),this.is_pending=this.has_pending_snippet(),this.#r=this.#g(()=>(this.#h=!1,J(()=>this.#s(this.#t)))),this.#c>0?this.#w():this.is_pending=!1};_e(()=>{try{s=!0,n?.(t,o),s=!1}catch(a){pe(a,this.#o&&this.#o.parent)}i&&(this.#i=this.#g(()=>{$.ensure(),this.#h=!0;try{return J(()=>{i(this.#t,()=>t,()=>o)})}catch(a){return pe(a,this.#o.parent),null}finally{this.#h=!1}}))})}}function dr(e,t,n,i){const r=Qe;var s=e.filter(u=>!u.settled);if(n.length===0&&s.length===0){i(t.map(r));return}var o=m,a=g,l=hr(),f=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(u=>u.promise)):null;function c(u){l();try{i(u)}catch(h){(a.f&K)===0&&pe(h,a)}o?.deactivate(),Je()}if(n.length===0){f.then(()=>c(t.map(r)));return}function d(){l(),Promise.all(n.map(u=>vr(u))).then(u=>c([...t.map(r),...u])).catch(u=>pe(u,a))}f?f.then(d):d()}function hr(){var e=g,t=_,n=A,i=m;return function(s=!0){G(e),L(t),he(n),s&&i?.activate()}}function Je(){G(null),L(null),he(null)}function Qe(e){var t=k|x,n=_!==null&&(_.f&k)!==0?_:null;return g!==null&&(g.f|=de),{ctx:A,deps:null,effects:null,equals:Tt,f:t,fn:e,reactions:null,rv:0,v:T,wv:0,parent:n??g,ac:null}}function vr(e,t,n){let i=g;i===null&&Un();var r=i.b,s=void 0,o=Ie(T),a=!_,l=new Map;return Rr(()=>{var f=bt();s=f.promise;try{Promise.resolve(e()).then(f.resolve,f.reject).then(()=>{c===m&&c.committed&&c.deactivate(),Je()})}catch(h){f.reject(h),Je()}var c=m;if(a){var d=r.is_rendered();r.update_pending_count(1),c.increment(d),l.get(c)?.reject(ie),l.delete(c),l.set(c,f)}const u=(h,v=void 0)=>{if(c.activate(),v)v!==ie&&(o.f|=Q,Le(o,v));else{(o.f&Q)!==0&&(o.f^=Q),Le(o,h);for(const[p,y]of l){if(l.delete(p),p===c)break;y.reject(ie)}}a&&(r.update_pending_count(-1),c.decrement(d))};f.promise.then(u,h=>u(null,h||"unknown"))}),Sr(()=>{for(const f of l.values())f.reject(ie)}),new Promise(f=>{function c(d){function u(){d===s?f(o):c(s)}d.then(u,u)}c(s)})}function _r(e){const t=Qe(e);return t.equals=nr,t}function pr(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)R(t[n])}}function gr(e){for(var t=e.parent;t!==null;){if((t.f&k)===0)return(t.f&K)===0?t:null;t=t.parent}return null}function $e(e){var t,n=g;G(gr(e));try{e.f&=~re,pr(e),t=tn(e)}finally{G(n)}return t}function Lt(e){var t=$e(e);if(!e.equals(t)&&(e.wv=$t(),(!m?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){b(e,E);return}te||(U!==null?(nt()||m?.is_fork)&&U.set(e,t):Ke(e))}function wr(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ie),t.teardown=Dn,t.ac=null,Se(t,0),it(t))}function Mt(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&we(t)}let et=new Set;const ee=new Map;let Pt=!1;function Ie(e,t){var n={f:0,v:e,reactions:null,equals:Tt,rv:0,wv:0};return n}function W(e,t){const n=Ie(e);return Mr(n),n}function j(e,t,n=!1){_!==null&&(!H||(_.f&kt)!==0)&&St()&&(_.f&(k|V|Ve|kt))!==0&&(M===null||!fe.call(M,e))&&Yn();let i=n?se(t):t;return Le(e,i)}function Le(e,t){if(!e.equals(t)){var n=e.v;te?ee.set(e,t):ee.set(e,n),e.v=t;var i=$.ensure();if(i.capture(e,n),(e.f&k)!==0){const r=e;(e.f&x)!==0&&$e(r),Ke(r)}e.wv=$t(),Ft(e,x),g!==null&&(g.f&E)!==0&&(g.f&(q|ne))===0&&(P===null?Pr([e]):P.push(e)),!i.is_fork&&et.size>0&&!Pt&&mr()}return t}function mr(){Pt=!1;for(const e of et)(e.f&E)!==0&&b(e,F),Te(e)&&we(e);et.clear()}function ke(e){j(e,e.v+1)}function Ft(e,t){var n=e.reactions;if(n!==null)for(var i=n.length,r=0;r<i;r++){var s=n[r],o=s.f,a=(o&x)===0;if(a&&b(s,t),(o&k)!==0){var l=s;U?.delete(l),(o&re)===0&&(o&D&&(s.f|=re),Ft(l,F))}else a&&((o&V)!==0&&X!==null&&X.add(s),z(s))}}function se(e){if(typeof e!="object"||e===null||Ae in e)return e;const t=wt(e);if(t!==Rn&&t!==Nn)return e;var n=new Map,i=Tn(e),r=W(0),s=ae,o=a=>{if(ae===s)return a();var l=_,f=ae;L(null),Qt(s);var c=a();return L(l),Qt(f),c};return i&&n.set("length",W(e.length)),new Proxy(e,{defineProperty(a,l,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Bn();var c=n.get(l);return c===void 0?o(()=>{var d=W(f.value);return n.set(l,d),d}):j(c,f.value,!0),!0},deleteProperty(a,l){var f=n.get(l);if(f===void 0){if(l in a){const c=o(()=>W(T));n.set(l,c),ke(r)}}else j(f,T),ke(r);return!0},get(a,l,f){if(l===Ae)return e;var c=n.get(l),d=l in a;if(c===void 0&&(!d||ue(a,l)?.writable)&&(c=o(()=>{var h=se(d?a[l]:T),v=W(h);return v}),n.set(l,c)),c!==void 0){var u=S(c);return u===T?void 0:u}return Reflect.get(a,l,f)},getOwnPropertyDescriptor(a,l){var f=Reflect.getOwnPropertyDescriptor(a,l);if(f&&"value"in f){var c=n.get(l);c&&(f.value=S(c))}else if(f===void 0){var d=n.get(l),u=d?.v;if(d!==void 0&&u!==T)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return f},has(a,l){if(l===Ae)return!0;var f=n.get(l),c=f!==void 0&&f.v!==T||Reflect.has(a,l);if(f!==void 0||g!==null&&(!c||ue(a,l)?.writable)){f===void 0&&(f=o(()=>{var u=c?se(a[l]):T,h=W(u);return h}),n.set(l,f));var d=S(f);if(d===T)return!1}return c},set(a,l,f,c){var d=n.get(l),u=l in a;if(i&&l==="length")for(var h=f;h<d.v;h+=1){var v=n.get(h+"");v!==void 0?j(v,T):h in a&&(v=o(()=>W(T)),n.set(h+"",v))}if(d===void 0)(!u||ue(a,l)?.writable)&&(d=o(()=>W(void 0)),j(d,se(f)),n.set(l,d));else{u=d.v!==T;var p=o(()=>se(f));j(d,p)}var y=Reflect.getOwnPropertyDescriptor(a,l);if(y?.set&&y.set.call(c,f),!u){if(i&&typeof l=="string"){var Y=n.get("length"),w=Number(l);Number.isInteger(w)&&w>=Y.v&&j(Y,w+1)}ke(r)}return!0},ownKeys(a){S(r);var l=Reflect.ownKeys(a).filter(d=>{var u=n.get(d);return u===void 0||u.v!==T});for(var[f,c]of n)c.v!==T&&!(f in a)&&l.push(f);return l},setPrototypeOf(){Gn()}})}var Ut,zt,Wt,jt;function br(){if(Ut===void 0){Ut=window,zt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Wt=ue(t,"firstChild").get,jt=ue(t,"nextSibling").get,mt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),mt(n)&&(n.__t=void 0)}}function ge(e=""){return document.createTextNode(e)}function Me(e){return Wt.call(e)}function Pe(e){return jt.call(e)}function tt(e,t){return Me(e)}function yr(e,t=!1){{var n=Me(e);return n instanceof Comment&&n.data===""?Pe(n):n}}function Er(e,t=1,n=!1){let i=e;for(;t--;)i=Pe(i);return i}function kr(){return!1}function Ht(e,t,n){return document.createElementNS(xt,e,void 0)}function qt(e){var t=_,n=g;L(null),G(null);try{return e()}finally{L(t),G(n)}}function xr(e){g===null&&(_===null&&jn(),Wn()),te&&zn()}function Tr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Z(e,t,n){var i=g;i!==null&&(i.f&B)!==0&&(e|=B);var r={ctx:A,deps:null,nodes:null,f:e|x|D,first:null,fn:t,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{we(r)}catch(a){throw R(r),a}else t!==null&&z(r);var s=r;if(n&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&de)===0&&(s=s.first,(e&V)!==0&&(e&ce)!==0&&s!==null&&(s.f|=ce)),s!==null&&(s.parent=i,i!==null&&Tr(s,i),_!==null&&(_.f&k)!==0&&(e&ne)===0)){var o=_;(o.effects??=[]).push(s)}return r}function nt(){return _!==null&&!H}function Sr(e){const t=Z(Ce,null,!1);return b(t,E),t.teardown=e,t}function Or(e){xr();var t=g.f,n=!_&&(t&q)!==0&&(t&Ee)===0;if(n){var i=A;(i.e??=[]).push(e)}else return Bt(e)}function Bt(e){return Z(ye|Ln,e,!1)}function Cr(e){$.ensure();const t=Z(ne|de,e,!0);return(n={})=>new Promise(i=>{n.outro?xe(t,()=>{R(t),i(void 0)}):(R(t),i(void 0))})}function Ar(e){return Z(ye,e,!1)}function Rr(e){return Z(Ve|de,e,!0)}function Nr(e,t=0){return Z(Ce|t,e,!0)}function Fe(e,t=[],n=[],i=[]){dr(i,t,n,r=>{Z(Ce,()=>e(...r.map(S)),!0)})}function rt(e,t=0){var n=Z(V|t,e,!0);return n}function J(e){return Z(q|de,e,!0)}function Gt(e){var t=e.teardown;if(t!==null){const n=te,i=_;Zt(!0),L(null);try{t.call(null)}finally{Zt(n),L(i)}}}function it(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const r=n.ac;r!==null&&qt(()=>{r.abort(ie)});var i=n.next;(n.f&ne)!==0?n.parent=null:R(n,t),n=i}}function Dr(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&q)===0&&R(t),t=n}}function R(e,t=!0){var n=!1;(t||(e.f&Ge)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Ir(e.nodes.start,e.nodes.end),n=!0),it(e,t&&!n),Se(e,0),b(e,K);var i=e.nodes&&e.nodes.t;if(i!==null)for(const s of i)s.stop();Gt(e);var r=e.parent;r!==null&&r.first!==null&&Yt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Ir(e,t){for(;e!==null;){var n=e===t?null:Pe(e);e.remove(),e=n}}function Yt(e){var t=e.parent,n=e.prev,i=e.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=n))}function xe(e,t,n=!0){var i=[];Vt(e,i,!0);var r=()=>{n&&R(e),t&&t()},s=i.length;if(s>0){var o=()=>--s||r();for(var a of i)a.out(o)}else r()}function Vt(e,t,n){if((e.f&B)===0){e.f^=B;var i=e.nodes&&e.nodes.t;if(i!==null)for(const a of i)(a.is_global||n)&&t.push(a);for(var r=e.first;r!==null;){var s=r.next,o=(r.f&ce)!==0||(r.f&q)!==0&&(e.f&V)!==0;Vt(r,t,o?n:!1),r=s}}}function Lr(e){Kt(e,!0)}function Kt(e,t){if((e.f&B)!==0){e.f^=B,(e.f&E)===0&&(b(e,x),z(e));for(var n=e.first;n!==null;){var i=n.next,r=(n.f&ce)!==0||(n.f&q)!==0;Kt(n,r?t:!1),n=i}var s=e.nodes&&e.nodes.t;if(s!==null)for(const o of s)(o.is_global||t)&&o.in()}}function Xt(e,t){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end;n!==null;){var r=n===i?null:Pe(n);t.append(n),n=r}}let Ue=!1,te=!1;function Zt(e){te=e}let _=null,H=!1;function L(e){_=e}let g=null;function G(e){g=e}let M=null;function Mr(e){_!==null&&(M===null?M=[e]:M.push(e))}let O=null,N=0,P=null;function Pr(e){P=e}let Jt=1,oe=0,ae=oe;function Qt(e){ae=e}function $t(){return++Jt}function Te(e){var t=e.f;if((t&x)!==0)return!0;if(t&k&&(e.f&=~re),(t&F)!==0){for(var n=e.deps,i=n.length,r=0;r<i;r++){var s=n[r];if(Te(s)&&Lt(s),s.wv>e.wv)return!0}(t&D)!==0&&U===null&&b(e,E)}return!1}function en(e,t,n=!0){var i=e.reactions;if(i!==null&&!(M!==null&&fe.call(M,e)))for(var r=0;r<i.length;r++){var s=i[r];(s.f&k)!==0?en(s,t,!1):t===s&&(n?b(s,x):(s.f&E)!==0&&b(s,F),z(s))}}function tn(e){var t=O,n=N,i=P,r=_,s=M,o=A,a=H,l=ae,f=e.f;O=null,N=0,P=null,_=(f&(q|ne))===0?e:null,M=null,he(e.ctx),H=!1,ae=++oe,e.ac!==null&&(qt(()=>{e.ac.abort(ie)}),e.ac=null);try{e.f|=Ye;var c=e.fn,d=c();e.f|=Ee;var u=e.deps,h=m?.is_fork;if(O!==null){var v;if(h||Se(e,N),u!==null&&N>0)for(u.length=N+O.length,v=0;v<O.length;v++)u[N+v]=O[v];else e.deps=u=O;if(nt()&&(e.f&D)!==0)for(v=N;v<u.length;v++)(u[v].reactions??=[]).push(e)}else!h&&u!==null&&N<u.length&&(Se(e,N),u.length=N);if(St()&&P!==null&&!H&&u!==null&&(e.f&(k|F|x))===0)for(v=0;v<P.length;v++)en(P[v],e);if(r!==null&&r!==e){if(oe++,r.deps!==null)for(let p=0;p<n;p+=1)r.deps[p].rv=oe;if(t!==null)for(const p of t)p.rv=oe;P!==null&&(i===null?i=P:i.push(...P))}return(e.f&Q)!==0&&(e.f^=Q),d}catch(p){return Ot(p)}finally{e.f^=Ye,O=t,N=n,P=i,_=r,M=s,he(o),H=a,ae=l}}function Fr(e,t){let n=t.reactions;if(n!==null){var i=Sn.call(n,e);if(i!==-1){var r=n.length-1;r===0?n=t.reactions=null:(n[i]=n[r],n.pop())}}if(n===null&&(t.f&k)!==0&&(O===null||!fe.call(O,t))){var s=t;(s.f&D)!==0&&(s.f^=D,s.f&=~re),Ke(s),wr(s),Se(s,0)}}function Se(e,t){var n=e.deps;if(n!==null)for(var i=t;i<n.length;i++)Fr(e,n[i])}function we(e){var t=e.f;if((t&K)===0){b(e,E);var n=g,i=Ue;g=e,Ue=!0;try{(t&(V|yt))!==0?Dr(e):it(e),Gt(e);var r=tn(e);e.teardown=typeof r=="function"?r:null,e.wv=Jt;var s;Be&&rr&&(e.f&x)!==0&&e.deps}finally{Ue=i,g=n}}}function S(e){var t=e.f,n=(t&k)!==0;if(_!==null&&!H){var i=g!==null&&(g.f&K)!==0;if(!i&&(M===null||!fe.call(M,e))){var r=_.deps;if((_.f&Ye)!==0)e.rv<oe&&(e.rv=oe,O===null&&r!==null&&r[N]===e?N++:O===null?O=[e]:O.push(e));else{(_.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[_]:fe.call(s,_)||s.push(_)}}}if(te&&ee.has(e))return ee.get(e);if(n){var o=e;if(te){var a=o.v;return((o.f&E)===0&&o.reactions!==null||rn(o))&&(a=$e(o)),ee.set(o,a),a}var l=(o.f&D)===0&&!H&&_!==null&&(Ue||(_.f&D)!==0),f=(o.f&Ee)===0;Te(o)&&(l&&(o.f|=D),Lt(o)),l&&!f&&(Mt(o),nn(o))}if(U?.has(e))return U.get(e);if((e.f&Q)!==0)throw e.v;return e.v}function nn(e){if(e.f|=D,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&k)!==0&&(t.f&D)===0&&(Mt(t),nn(t))}function rn(e){if(e.v===T)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ee.has(t)||(t.f&k)!==0&&rn(t))return!0;return!1}function st(e){var t=H;try{return H=!0,e()}finally{H=t}}const Ur=["touchstart","touchmove"];function zr(e){return Ur.includes(e)}const sn=Symbol("events"),on=new Set,ot=new Set;function an(e,t,n){(t[sn]??={})[e]=n}function Wr(e){for(var t=0;t<e.length;t++)on.add(e[t]);for(var n of ot)n(e)}let ln=null;function fn(e){var t=this,n=t.ownerDocument,i=e.type,r=e.composedPath?.()||[],s=r[0]||e.target;ln=e;var o=0,a=ln===e&&e.__root;if(a){var l=r.indexOf(a);if(l!==-1&&(t===document||t===window)){e.__root=t;return}var f=r.indexOf(t);if(f===-1)return;l<=f&&(o=l)}if(s=r[o]||e.target,s!==t){Cn(e,"currentTarget",{configurable:!0,get(){return s||n}});var c=_,d=g;L(null),G(null);try{for(var u,h=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var p=s[sn]?.[i];p!=null&&(!s.disabled||e.target===s)&&p.call(s,e)}catch(y){u?h.push(y):u=y}if(e.cancelBubble||v===t||v===null)break;s=v}if(u){for(let y of h)queueMicrotask(()=>{throw y});throw u}}finally{e.__root=t,delete e.currentTarget,L(c),G(d)}}}const jr=globalThis?.window?.trustedTypes?.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Hr(e){return jr?.createHTML(e)??e}function qr(e,t=!1){var n=Ht("template");return e=e.replaceAll("<!>","<!---->"),n.innerHTML=t?Hr(e):e,n.content}function at(e,t){var n=g;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Oe(e,t){var n=(t&Qn)!==0,i=(t&$n)!==0,r,s=!e.startsWith("<!>");return()=>{r===void 0&&(r=qr(s?e:"<!>"+e,!0),n||(r=Me(r)));var o=i||zt?document.importNode(r,!0):r.cloneNode(!0);if(n){var a=Me(o),l=o.lastChild;at(a,l)}else at(o,o);return o}}function Br(){var e=document.createDocumentFragment(),t=document.createComment(""),n=ge();return e.append(t,n),at(t,n),e}function me(e,t){e!==null&&e.before(t)}function Gr(e,t){return Yr(e,t)}const ze=new Map;function Yr(e,{target:t,anchor:n,props:i={},events:r,context:s,intro:o=!0}){br();var a=new Set,l=d=>{for(var u=0;u<d.length;u++){var h=d[u];if(!a.has(h)){a.add(h);var v=zr(h);for(const Y of[t,document]){var p=ze.get(Y);p===void 0&&(p=new Map,ze.set(Y,p));var y=p.get(h);y===void 0?(Y.addEventListener(h,fn,{passive:v}),p.set(h,1)):p.set(h,y+1)}}}};l(On(on)),ot.add(l);var f=void 0,c=Cr(()=>{var d=n??t.appendChild(ge());return ur(d,{pending:()=>{}},u=>{Re({});var h=A;s&&(h.c=s),r&&(i.$$events=r),f=e(u,i)||{},Ne()}),()=>{for(var u of a)for(const p of[t,document]){var h=ze.get(p),v=h.get(u);--v==0?(p.removeEventListener(u,fn),h.delete(u),h.size===0&&ze.delete(p)):h.set(u,v)}ot.delete(l),d!==n&&d.parentNode?.removeChild(d)}});return Vr.set(f,c),f}let Vr=new WeakMap;class Kr{anchor;#t=new Map;#a=new Map;#e=new Map;#s=new Set;#o=!0;constructor(t,n=!0){this.anchor=t,this.#o=n}#r=()=>{var t=m;if(this.#t.has(t)){var n=this.#t.get(t),i=this.#a.get(n);if(i)Lr(i),this.#s.delete(n);else{var r=this.#e.get(n);r&&(this.#a.set(n,r.effect),this.#e.delete(n),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),i=r.effect)}for(const[s,o]of this.#t){if(this.#t.delete(s),s===t)break;const a=this.#e.get(o);a&&(R(a.effect),this.#e.delete(o))}for(const[s,o]of this.#a){if(s===n||this.#s.has(s))continue;const a=()=>{if(Array.from(this.#t.values()).includes(s)){var f=document.createDocumentFragment();Xt(o,f),f.append(ge()),this.#e.set(s,{effect:o,fragment:f})}else R(o);this.#s.delete(s),this.#a.delete(s)};this.#o||!i?(this.#s.add(s),xe(o,a,!1)):a()}}};#n=t=>{this.#t.delete(t);const n=Array.from(this.#t.values());for(const[i,r]of this.#e)n.includes(i)||(R(r.effect),this.#e.delete(i))};ensure(t,n){var i=m,r=kr();if(n&&!this.#a.has(t)&&!this.#e.has(t))if(r){var s=document.createDocumentFragment(),o=ge();s.append(o),this.#e.set(t,{effect:J(()=>n(o)),fragment:s})}else this.#a.set(t,J(()=>n(this.anchor)));if(this.#t.set(i,t),r){for(const[a,l]of this.#a)a===t?i.unskip_effect(l):i.skip_effect(l);for(const[a,l]of this.#e)a===t?i.unskip_effect(l.effect):i.skip_effect(l.effect);i.oncommit(this.#r),i.ondiscard(this.#n)}else this.#r()}}function Xr(e,t,n=!1){var i=new Kr(e),r=n?ce:0;function s(o,a){i.ensure(o,a)}rt(()=>{var o=!1;t((a,l=0)=>{o=!0,s(l,a)}),o||s(!1,null)},r)}function Zr(e,t){var n;n=document.head.appendChild(ge()),rt(()=>t(n),Ge)}function lt(e,t){Ar(()=>{var n=e.getRootNode(),i=n.host?n:n.head??n.ownerDocument.head;if(!i.querySelector("#"+t.hash)){const r=Ht("style");r.id=t.hash,r.textContent=t.code,i.appendChild(r)}})}const un=[...`
2
- \r\f \v\uFEFF`];function Jr(e,t,n){var i=e==null?"":""+e;if(t&&(i=i?i+" "+t:t),n){for(var r in n)if(n[r])i=i?i+" "+r:r;else if(i.length)for(var s=r.length,o=0;(o=i.indexOf(r,o))>=0;){var a=o+s;(o===0||un.includes(i[o-1]))&&(a===i.length||un.includes(i[a]))?i=(o===0?"":i.substring(0,o))+i.substring(a+1):o=a}}return i===""?null:i}function cn(e,t,n,i,r,s){var o=e.__className;if(o!==n||o===void 0){var a=Jr(n,i,s);a==null?e.removeAttribute("class"):e.className=a,e.__className=n}else if(s&&r!==s)for(var l in s){var f=!!s[l];(r==null||f!==!!r[l])&&e.classList.toggle(l,f)}return s}const Qr=Symbol("is custom element"),$r=Symbol("is html");function be(e,t,n,i){var r=ei(e);r[t]!==(r[t]=n)&&(t==="loading"&&(e[Pn]=n),n==null?e.removeAttribute(t):typeof n!="string"&&ti(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ei(e){return e.__attributes??={[Qr]:e.nodeName.includes("-"),[$r]:e.namespaceURI===xt}}var dn=new Map;function ti(e){var t=e.getAttribute("is")||e.nodeName,n=dn.get(t);if(n)return n;dn.set(t,n=[]);for(var i,r=e,s=Element.prototype;s!==r;){i=An(r);for(var o in i)i[o].set&&n.push(o);r=wt(r)}return n}let We=!1;function ni(e){var t=We;try{return We=!1,[e(),We]}finally{We=t}}function ft(e,t,n,i){var r=(n&Zn)!==0,s=(n&Jn)!==0,o=i,a=!0,l=()=>(a&&(a=!1,o=s?st(i):i),o),f;if(r){var c=Ae in e||Mn in e;f=ue(e,t)?.set??(c&&t in e?w=>e[t]=w:void 0)}var d,u=!1;r?[d,u]=ni(()=>e[t]):d=e[t],d===void 0&&i!==void 0&&(d=l(),f&&(qn(),f(d)));var h;if(h=()=>{var w=e[t];return w===void 0?l():(a=!0,w)},(n&Xn)===0)return h;if(f){var v=e.$$legacy;return(function(w,C){return arguments.length>0?((!C||v||u)&&f(C?h():w),w):h()})}var p=!1,y=((n&Kn)!==0?Qe:_r)(()=>(p=!1,h()));r&&S(y);var Y=g;return(function(w,C){if(arguments.length>0){const le=C?S(y):r?se(w):w;return j(y,le),p=!0,o!==void 0&&(o=le),w}return te&&p||(Y.f&K)!==0?y.v:S(y)})}function hn(e){A===null&&Fn(),Or(()=>{const t=st(e);if(typeof t=="function")return t})}const ri="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(ri);var ii=Oe('<div><iframe id="chat-frame" title="Chat" class="bot svelte-yhk8rr" frameborder="0" allow="microphone; clipboard-write" allowfullscreen=""></iframe></div>'),si=Oe(`<p class="svelte-yhk8rr">Please make sure that the script tag has 'id="chatbot"' and the attribute
1
+ (function(){"use strict";const Ge=!1;var Tn=Array.isArray,Sn=Array.prototype.indexOf,de=Array.prototype.includes,On=Array.from,Cn=Object.defineProperty,he=Object.getOwnPropertyDescriptor,An=Object.getOwnPropertyDescriptors,Rn=Object.prototype,Nn=Array.prototype,bt=Object.getPrototypeOf,yt=Object.isExtensible;const Dn=()=>{};function In(e){for(var t=0;t<e.length;t++)e[t]()}function Et(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const x=2,Ee=4,Ae=8,kt=1<<24,V=16,B=32,re=64,Ye=128,I=512,E=1024,T=2048,U=4096,G=8192,K=16384,ie=32768,ve=65536,xt=1<<17,Ve=1<<18,se=1<<19,Ln=1<<20,oe=65536,Ke=1<<21,Xe=1<<22,Q=1<<23,Re=Symbol("$state"),Mn=Symbol("legacy props"),Pn=Symbol(""),ae=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Fn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Un(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function zn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function jn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Wn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Hn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function qn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Bn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Gn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Yn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Vn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Kn=1,Xn=4,Zn=8,Jn=16,Qn=1,$n=2,S=Symbol(),Tt="http://www.w3.org/1999/xhtml";function er(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function St(e){return e===this.v}function tr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function nr(e){return!tr(e,this.v)}let rr=!1,A=null;function _e(e){A=e}function Ne(e,t=!1,n){A={p:A,i:!1,c:null,e:null,s:e,x:null,l:null}}function De(e){var t=A,n=t.e;if(n!==null){t.e=null;for(var r of n)Gt(r)}return t.i=!0,A=t.p,{}}function Ot(){return!0}let pe=[];function ir(){var e=pe;pe=[],In(e)}function ge(e){if(pe.length===0){var t=pe;queueMicrotask(()=>{t===pe&&ir()})}pe.push(e)}function Ct(e){var t=w;if(t===null)return _.f|=Q,e;if((t.f&ie)===0&&(t.f&Ee)===0)throw e;$(e,t)}function $(e,t){for(;t!==null;){if((t.f&Ye)!==0){if((t.f&ie)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const sr=-7169;function y(e,t){e.f=e.f&sr|t}function Ze(e){(e.f&I)!==0||e.deps===null?y(e,E):y(e,U)}function At(e){if(e!==null)for(const t of e)(t.f&x)===0||(t.f&oe)===0||(t.f^=oe,At(t.deps))}function Rt(e,t,n){(e.f&T)!==0?t.add(e):(e.f&U)!==0&&n.add(e),At(e.deps),y(e,E)}const Ie=new Set;let m=null,z=null,L=[],Je=null,Qe=!1;class ee{current=new Map;previous=new Map;#t=new Set;#a=new Set;#e=0;#s=0;#n=null;#o=new Set;#r=new Set;#i=new Map;is_fork=!1;#l=!1;#u(){return this.is_fork||this.#s>0}skip_effect(t){this.#i.has(t)||this.#i.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#i.get(t);if(n){this.#i.delete(t);for(var r of n.d)y(r,T),j(r);for(r of n.m)y(r,U),j(r)}}process(t){L=[],this.apply();var n=[],r=[];for(const i of t)this.#f(i,n,r);if(this.#u()){this.#c(r),this.#c(n);for(const[i,s]of this.#i)Lt(i,s)}else{for(const i of this.#t)i();this.#t.clear(),this.#e===0&&this.#h(),m=null,Nt(r),Nt(n),this.#n?.resolve()}z=null}#f(t,n,r){t.f^=E;for(var i=t.first;i!==null;){var s=i.f,o=(s&(B|re))!==0,l=o&&(s&E)!==0,a=l||(s&G)!==0||this.#i.has(i);if(!a&&i.fn!==null){o?i.f^=E:(s&Ee)!==0?n.push(i):Te(i)&&((s&V)!==0&&this.#r.add(i),me(i));var f=i.first;if(f!==null){i=f;continue}}for(;i!==null;){var c=i.next;if(c!==null){i=c;break}i=i.parent}}}#c(t){for(var n=0;n<t.length;n+=1)Rt(t[n],this.#o,this.#r)}capture(t,n){n!==S&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&Q)===0&&(this.current.set(t,t.v),z?.set(t,t.v))}activate(){m=this,this.apply()}deactivate(){m===this&&(m=null,z=null)}flush(){if(this.activate(),L.length>0){if(or(),m!==null&&m!==this)return}else this.#e===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#a)t(this);this.#a.clear()}#h(){if(Ie.size>1){this.previous.clear();var t=z,n=!0;for(const i of Ie){if(i===this){n=!1;continue}const s=[];for(const[l,a]of this.current){if(i.current.has(l))if(n&&a!==i.current.get(l))i.current.set(l,a);else continue;s.push(l)}if(s.length===0)continue;const o=[...i.current.keys()].filter(l=>!this.current.has(l));if(o.length>0){var r=L;L=[];const l=new Set,a=new Map;for(const f of s)Dt(f,o,l,a);if(L.length>0){m=i,i.apply();for(const f of L)i.#f(f,[],[]);i.deactivate()}L=r}}m=null,z=t}Ie.delete(this)}increment(t){this.#e+=1,t&&(this.#s+=1)}decrement(t){this.#e-=1,t&&(this.#s-=1),!this.#l&&(this.#l=!0,ge(()=>{this.#l=!1,this.#u()?L.length>0&&this.flush():this.revive()}))}revive(){for(const t of this.#o)this.#r.delete(t),y(t,T),j(t);for(const t of this.#r)y(t,U),j(t);this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#a.add(t)}settled(){return(this.#n??=Et()).promise}static ensure(){if(m===null){const t=m=new ee;Ie.add(m),ge(()=>{m===t&&t.flush()})}return m}apply(){}}function or(){Qe=!0;var e=null;try{for(var t=0;L.length>0;){var n=ee.ensure();if(t++>1e3){var r,i;ar()}n.process(L),te.clear()}}finally{L=[],Qe=!1,Je=null}}function ar(){try{Hn()}catch(e){$(e,Je)}}let X=null;function Nt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(K|G))===0&&Te(r)&&(X=new Set,me(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Vt(r),X?.size>0)){te.clear();for(const i of X){if((i.f&(K|G))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)X.has(o)&&(X.delete(o),s.push(o)),o=o.parent;for(let l=s.length-1;l>=0;l--){const a=s[l];(a.f&(K|G))===0&&me(a)}}X.clear()}}X=null}}function Dt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&x)!==0?Dt(i,t,n,r):(s&(Xe|V))!==0&&(s&T)===0&&It(i,t,r)&&(y(i,T),j(i))}}function It(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(de.call(t,i))return!0;if((i.f&x)!==0&&It(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function j(e){var t=Je=e,n=t.b;if(n?.is_pending&&(e.f&(Ee|Ae|kt))!==0&&(e.f&ie)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(Qe&&t===w&&(r&V)!==0&&(r&Ve)===0&&(r&ie)!==0)return;if((r&(re|B))!==0){if((r&E)===0)return;t.f^=E}}L.push(t)}function Lt(e,t){if(!((e.f&B)!==0&&(e.f&E)!==0)){(e.f&T)!==0?t.d.push(e):(e.f&U)!==0&&t.m.push(e),y(e,E);for(var n=e.first;n!==null;)Lt(n,t),n=n.next}}function lr(e){let t=0,n=Le(0),r;return()=>{it()&&(O(n),Dr(()=>(t===0&&(r=at(()=>e(()=>ke(n)))),t+=1,()=>{ge(()=>{t-=1,t===0&&(r?.(),r=void 0,ke(n))})})))}}var fr=ve|se;function ur(e,t,n,r){new cr(e,t,n,r)}class cr{parent;is_pending=!1;transform_error;#t;#a=null;#e;#s;#n;#o=null;#r=null;#i=null;#l=null;#u=0;#f=0;#c=!1;#h=new Set;#v=new Set;#d=null;#m=lr(()=>(this.#d=Le(this.#u),()=>{this.#d=null}));constructor(t,n,r,i){this.#t=t,this.#e=n,this.#s=s=>{var o=w;o.b=this,o.f|=Ye,r(s)},this.parent=w.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#n=st(()=>{this.#g()},fr)}#b(){try{this.#o=J(()=>this.#s(this.#t))}catch(t){this.error(t)}}#y(t){const n=this.#e.failed;n&&(this.#i=J(()=>{n(this.#t,()=>t,()=>()=>{})}))}#E(){const t=this.#e.pending;t&&(this.is_pending=!0,this.#r=J(()=>t(this.#t)),ge(()=>{var n=this.#l=document.createDocumentFragment(),r=we();n.append(r),this.#o=this.#p(()=>(ee.ensure(),J(()=>this.#s(r)))),this.#f===0&&(this.#t.before(n),this.#l=null,xe(this.#r,()=>{this.#r=null}),this.#_())}))}#g(){try{if(this.is_pending=this.has_pending_snippet(),this.#f=0,this.#u=0,this.#o=J(()=>{this.#s(this.#t)}),this.#f>0){var t=this.#l=document.createDocumentFragment();Zt(this.#o,t);const n=this.#e.pending;this.#r=J(()=>n(this.#t))}else this.#_()}catch(n){this.error(n)}}#_(){this.is_pending=!1;for(const t of this.#h)y(t,T),j(t);for(const t of this.#v)y(t,U),j(t);this.#h.clear(),this.#v.clear()}defer_effect(t){Rt(t,this.#h,this.#v)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#e.pending}#p(t){var n=w,r=_,i=A;Y(this.#n),M(this.#n),_e(this.#n.ctx);try{return t()}catch(s){return Ct(s),null}finally{Y(n),M(r),_e(i)}}#w(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#w(t);return}this.#f+=t,this.#f===0&&(this.#_(),this.#r&&xe(this.#r,()=>{this.#r=null}),this.#l&&(this.#t.before(this.#l),this.#l=null))}update_pending_count(t){this.#w(t),this.#u+=t,!(!this.#d||this.#c)&&(this.#c=!0,ge(()=>{this.#c=!1,this.#d&&Me(this.#d,this.#u)}))}get_effect_pending(){return this.#m(),O(this.#d)}error(t){var n=this.#e.onerror;let r=this.#e.failed;if(!n&&!r)throw t;this.#o&&(R(this.#o),this.#o=null),this.#r&&(R(this.#r),this.#r=null),this.#i&&(R(this.#i),this.#i=null);var i=!1,s=!1;const o=()=>{if(i){er();return}i=!0,s&&Vn(),this.#i!==null&&xe(this.#i,()=>{this.#i=null}),this.#p(()=>{ee.ensure(),this.#g()})},l=a=>{try{s=!0,n?.(a,o),s=!1}catch(f){$(f,this.#n&&this.#n.parent)}r&&(this.#i=this.#p(()=>{ee.ensure();try{return J(()=>{var f=w;f.b=this,f.f|=Ye,r(this.#t,()=>a,()=>o)})}catch(f){return $(f,this.#n.parent),null}}))};ge(()=>{var a;try{a=this.transform_error(t)}catch(f){$(f,this.#n&&this.#n.parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(l,f=>$(f,this.#n&&this.#n.parent)):l(a)})}}function dr(e,t,n,r){const i=et;var s=e.filter(u=>!u.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var o=w,l=hr(),a=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(u=>u.promise)):null;function f(u){l();try{r(u)}catch(d){(o.f&K)===0&&$(d,o)}$e()}if(n.length===0){a.then(()=>f(t.map(i)));return}function c(){l(),Promise.all(n.map(u=>_r(u))).then(u=>f([...t.map(i),...u])).catch(u=>$(u,o))}a?a.then(c):c()}function hr(){var e=w,t=_,n=A,r=m;return function(s=!0){Y(e),M(t),_e(n),s&&r?.activate()}}function $e(e=!0){Y(null),M(null),_e(null),e&&m?.deactivate()}function vr(){var e=w.b,t=m,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function et(e){var t=x|T,n=_!==null&&(_.f&x)!==0?_:null;return w!==null&&(w.f|=se),{ctx:A,deps:null,effects:null,equals:St,f:t,fn:e,reactions:null,rv:0,v:S,wv:0,parent:n??w,ac:null}}function _r(e,t,n){w===null&&Un();var i=void 0,s=Le(S),o=!_,l=new Map;return Nr(()=>{var a=Et();i=a.promise;try{Promise.resolve(e()).then(a.resolve,a.reject).finally($e)}catch(d){a.reject(d),$e()}var f=m;if(o){var c=vr();l.get(f)?.reject(ae),l.delete(f),l.set(f,a)}const u=(d,v=void 0)=>{if(f.activate(),v)v!==ae&&(s.f|=Q,Me(s,v));else{(s.f&Q)!==0&&(s.f^=Q),Me(s,d);for(const[h,p]of l){if(l.delete(h),h===f)break;p.reject(ae)}}c&&c()};a.promise.then(u,d=>u(null,d||"unknown"))}),Or(()=>{for(const a of l.values())a.reject(ae)}),new Promise(a=>{function f(c){function u(){c===i?a(s):f(i)}c.then(u,u)}f(i)})}function pr(e){const t=et(e);return t.equals=nr,t}function gr(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)R(t[n])}}function wr(e){for(var t=e.parent;t!==null;){if((t.f&x)===0)return(t.f&K)===0?t:null;t=t.parent}return null}function tt(e){var t,n=w;Y(wr(e));try{e.f&=~oe,gr(e),t=nn(e)}finally{Y(n)}return t}function Mt(e){var t=tt(e);if(!e.equals(t)&&(e.wv=en(),(!m?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){y(e,E);return}ne||(z!==null?(it()||m?.is_fork)&&z.set(e,t):Ze(e))}function mr(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ae),t.teardown=Dn,t.ac=null,Se(t,0),ot(t))}function Pt(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&me(t)}let nt=new Set;const te=new Map;let Ft=!1;function Le(e,t){var n={f:0,v:e,reactions:null,equals:St,rv:0,wv:0};return n}function W(e,t){const n=Le(e);return Pr(n),n}function H(e,t,n=!1){_!==null&&(!q||(_.f&xt)!==0)&&Ot()&&(_.f&(x|V|Xe|xt))!==0&&(P===null||!de.call(P,e))&&Yn();let r=n?le(t):t;return Me(e,r)}function Me(e,t){if(!e.equals(t)){var n=e.v;ne?te.set(e,t):te.set(e,n),e.v=t;var r=ee.ensure();if(r.capture(e,n),(e.f&x)!==0){const i=e;(e.f&T)!==0&&tt(i),Ze(i)}e.wv=en(),Ut(e,T),w!==null&&(w.f&E)!==0&&(w.f&(B|re))===0&&(F===null?Fr([e]):F.push(e)),!r.is_fork&&nt.size>0&&!Ft&&br()}return t}function br(){Ft=!1;for(const e of nt)(e.f&E)!==0&&y(e,U),Te(e)&&me(e);nt.clear()}function ke(e){H(e,e.v+1)}function Ut(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i],o=s.f,l=(o&T)===0;if(l&&y(s,t),(o&x)!==0){var a=s;z?.delete(a),(o&oe)===0&&(o&I&&(s.f|=oe),Ut(a,U))}else l&&((o&V)!==0&&X!==null&&X.add(s),j(s))}}function le(e){if(typeof e!="object"||e===null||Re in e)return e;const t=bt(e);if(t!==Rn&&t!==Nn)return e;var n=new Map,r=Tn(e),i=W(0),s=ue,o=l=>{if(ue===s)return l();var a=_,f=ue;M(null),$t(s);var c=l();return M(a),$t(f),c};return r&&n.set("length",W(e.length)),new Proxy(e,{defineProperty(l,a,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Bn();var c=n.get(a);return c===void 0?o(()=>{var u=W(f.value);return n.set(a,u),u}):H(c,f.value,!0),!0},deleteProperty(l,a){var f=n.get(a);if(f===void 0){if(a in l){const c=o(()=>W(S));n.set(a,c),ke(i)}}else H(f,S),ke(i);return!0},get(l,a,f){if(a===Re)return e;var c=n.get(a),u=a in l;if(c===void 0&&(!u||he(l,a)?.writable)&&(c=o(()=>{var v=le(u?l[a]:S),h=W(v);return h}),n.set(a,c)),c!==void 0){var d=O(c);return d===S?void 0:d}return Reflect.get(l,a,f)},getOwnPropertyDescriptor(l,a){var f=Reflect.getOwnPropertyDescriptor(l,a);if(f&&"value"in f){var c=n.get(a);c&&(f.value=O(c))}else if(f===void 0){var u=n.get(a),d=u?.v;if(u!==void 0&&d!==S)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return f},has(l,a){if(a===Re)return!0;var f=n.get(a),c=f!==void 0&&f.v!==S||Reflect.has(l,a);if(f!==void 0||w!==null&&(!c||he(l,a)?.writable)){f===void 0&&(f=o(()=>{var d=c?le(l[a]):S,v=W(d);return v}),n.set(a,f));var u=O(f);if(u===S)return!1}return c},set(l,a,f,c){var u=n.get(a),d=a in l;if(r&&a==="length")for(var v=f;v<u.v;v+=1){var h=n.get(v+"");h!==void 0?H(h,S):v in l&&(h=o(()=>W(S)),n.set(v+"",h))}if(u===void 0)(!d||he(l,a)?.writable)&&(u=o(()=>W(void 0)),H(u,le(f)),n.set(a,u));else{d=u.v!==S;var p=o(()=>le(f));H(u,p)}var b=Reflect.getOwnPropertyDescriptor(l,a);if(b?.set&&b.set.call(c,f),!d){if(r&&typeof a=="string"){var D=n.get("length"),g=Number(a);Number.isInteger(g)&&g>=D.v&&H(D,g+1)}ke(i)}return!0},ownKeys(l){O(i);var a=Reflect.ownKeys(l).filter(u=>{var d=n.get(u);return d===void 0||d.v!==S});for(var[f,c]of n)c.v!==S&&!(f in l)&&a.push(f);return a},setPrototypeOf(){Gn()}})}var zt,jt,Wt,Ht;function yr(){if(zt===void 0){zt=window,jt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Wt=he(t,"firstChild").get,Ht=he(t,"nextSibling").get,yt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),yt(n)&&(n.__t=void 0)}}function we(e=""){return document.createTextNode(e)}function Pe(e){return Wt.call(e)}function Fe(e){return Ht.call(e)}function rt(e,t){return Pe(e)}function Er(e,t=!1){{var n=Pe(e);return n instanceof Comment&&n.data===""?Fe(n):n}}function kr(e,t=1,n=!1){let r=e;for(;t--;)r=Fe(r);return r}function xr(){return!1}function qt(e,t,n){return document.createElementNS(Tt,e,void 0)}function Bt(e){var t=_,n=w;M(null),Y(null);try{return e()}finally{M(t),Y(n)}}function Tr(e){w===null&&(_===null&&Wn(),jn()),ne&&zn()}function Sr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Z(e,t,n){var r=w;r!==null&&(r.f&G)!==0&&(e|=G);var i={ctx:A,deps:null,nodes:null,f:e|T|I,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{me(i)}catch(l){throw R(i),l}else t!==null&&j(i);var s=i;if(n&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&se)===0&&(s=s.first,(e&V)!==0&&(e&ve)!==0&&s!==null&&(s.f|=ve)),s!==null&&(s.parent=r,r!==null&&Sr(s,r),_!==null&&(_.f&x)!==0&&(e&re)===0)){var o=_;(o.effects??=[]).push(s)}return i}function it(){return _!==null&&!q}function Or(e){const t=Z(Ae,null,!1);return y(t,E),t.teardown=e,t}function Cr(e){Tr();var t=w.f,n=!_&&(t&B)!==0&&(t&ie)===0;if(n){var r=A;(r.e??=[]).push(e)}else return Gt(e)}function Gt(e){return Z(Ee|Ln,e,!1)}function Ar(e){ee.ensure();const t=Z(re|se,e,!0);return(n={})=>new Promise(r=>{n.outro?xe(t,()=>{R(t),r(void 0)}):(R(t),r(void 0))})}function Rr(e){return Z(Ee,e,!1)}function Nr(e){return Z(Xe|se,e,!0)}function Dr(e,t=0){return Z(Ae|t,e,!0)}function Ue(e,t=[],n=[],r=[]){dr(r,t,n,i=>{Z(Ae,()=>e(...i.map(O)),!0)})}function st(e,t=0){var n=Z(V|t,e,!0);return n}function J(e){return Z(B|se,e,!0)}function Yt(e){var t=e.teardown;if(t!==null){const n=ne,r=_;Jt(!0),M(null);try{t.call(null)}finally{Jt(n),M(r)}}}function ot(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&Bt(()=>{i.abort(ae)});var r=n.next;(n.f&re)!==0?n.parent=null:R(n,t),n=r}}function Ir(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&B)===0&&R(t),t=n}}function R(e,t=!0){var n=!1;(t||(e.f&Ve)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Lr(e.nodes.start,e.nodes.end),n=!0),ot(e,t&&!n),Se(e,0),y(e,K);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();Yt(e);var i=e.parent;i!==null&&i.first!==null&&Vt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Lr(e,t){for(;e!==null;){var n=e===t?null:Fe(e);e.remove(),e=n}}function Vt(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function xe(e,t,n=!0){var r=[];Kt(e,r,!0);var i=()=>{n&&R(e),t&&t()},s=r.length;if(s>0){var o=()=>--s||i();for(var l of r)l.out(o)}else i()}function Kt(e,t,n){if((e.f&G)===0){e.f^=G;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var i=e.first;i!==null;){var s=i.next,o=(i.f&ve)!==0||(i.f&B)!==0&&(e.f&V)!==0;Kt(i,t,o?n:!1),i=s}}}function Mr(e){Xt(e,!0)}function Xt(e,t){if((e.f&G)!==0){e.f^=G,(e.f&E)===0&&(y(e,T),j(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&ve)!==0||(n.f&B)!==0;Xt(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const o of s)(o.is_global||t)&&o.in()}}function Zt(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Fe(n);t.append(n),n=i}}let ze=!1,ne=!1;function Jt(e){ne=e}let _=null,q=!1;function M(e){_=e}let w=null;function Y(e){w=e}let P=null;function Pr(e){_!==null&&(P===null?P=[e]:P.push(e))}let C=null,N=0,F=null;function Fr(e){F=e}let Qt=1,fe=0,ue=fe;function $t(e){ue=e}function en(){return++Qt}function Te(e){var t=e.f;if((t&T)!==0)return!0;if(t&x&&(e.f&=~oe),(t&U)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(Te(s)&&Mt(s),s.wv>e.wv)return!0}(t&I)!==0&&z===null&&y(e,E)}return!1}function tn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(P!==null&&de.call(P,e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&x)!==0?tn(s,t,!1):t===s&&(n?y(s,T):(s.f&E)!==0&&y(s,U),j(s))}}function nn(e){var t=C,n=N,r=F,i=_,s=P,o=A,l=q,a=ue,f=e.f;C=null,N=0,F=null,_=(f&(B|re))===0?e:null,P=null,_e(e.ctx),q=!1,ue=++fe,e.ac!==null&&(Bt(()=>{e.ac.abort(ae)}),e.ac=null);try{e.f|=Ke;var c=e.fn,u=c();e.f|=ie;var d=e.deps,v=m?.is_fork;if(C!==null){var h;if(v||Se(e,N),d!==null&&N>0)for(d.length=N+C.length,h=0;h<C.length;h++)d[N+h]=C[h];else e.deps=d=C;if(it()&&(e.f&I)!==0)for(h=N;h<d.length;h++)(d[h].reactions??=[]).push(e)}else!v&&d!==null&&N<d.length&&(Se(e,N),d.length=N);if(Ot()&&F!==null&&!q&&d!==null&&(e.f&(x|U|T))===0)for(h=0;h<F.length;h++)tn(F[h],e);if(i!==null&&i!==e){if(fe++,i.deps!==null)for(let p=0;p<n;p+=1)i.deps[p].rv=fe;if(t!==null)for(const p of t)p.rv=fe;F!==null&&(r===null?r=F:r.push(...F))}return(e.f&Q)!==0&&(e.f^=Q),u}catch(p){return Ct(p)}finally{e.f^=Ke,C=t,N=n,F=r,_=i,P=s,_e(o),q=l,ue=a}}function Ur(e,t){let n=t.reactions;if(n!==null){var r=Sn.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&x)!==0&&(C===null||!de.call(C,t))){var s=t;(s.f&I)!==0&&(s.f^=I,s.f&=~oe),Ze(s),mr(s),Se(s,0)}}function Se(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Ur(e,n[r])}function me(e){var t=e.f;if((t&K)===0){y(e,E);var n=w,r=ze;w=e,ze=!0;try{(t&(V|kt))!==0?Ir(e):ot(e),Yt(e);var i=nn(e);e.teardown=typeof i=="function"?i:null,e.wv=Qt;var s;Ge&&rr&&(e.f&T)!==0&&e.deps}finally{ze=r,w=n}}}function O(e){var t=e.f,n=(t&x)!==0;if(_!==null&&!q){var r=w!==null&&(w.f&K)!==0;if(!r&&(P===null||!de.call(P,e))){var i=_.deps;if((_.f&Ke)!==0)e.rv<fe&&(e.rv=fe,C===null&&i!==null&&i[N]===e?N++:C===null?C=[e]:C.push(e));else{(_.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[_]:de.call(s,_)||s.push(_)}}}if(ne&&te.has(e))return te.get(e);if(n){var o=e;if(ne){var l=o.v;return((o.f&E)===0&&o.reactions!==null||sn(o))&&(l=tt(o)),te.set(o,l),l}var a=(o.f&I)===0&&!q&&_!==null&&(ze||(_.f&I)!==0),f=(o.f&ie)===0;Te(o)&&(a&&(o.f|=I),Mt(o)),a&&!f&&(Pt(o),rn(o))}if(z?.has(e))return z.get(e);if((e.f&Q)!==0)throw e.v;return e.v}function rn(e){if(e.f|=I,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&x)!==0&&(t.f&I)===0&&(Pt(t),rn(t))}function sn(e){if(e.v===S)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(te.has(t)||(t.f&x)!==0&&sn(t))return!0;return!1}function at(e){var t=q;try{return q=!0,e()}finally{q=t}}const zr=["touchstart","touchmove"];function jr(e){return zr.includes(e)}const Oe=Symbol("events"),on=new Set,lt=new Set;function an(e,t,n){(t[Oe]??={})[e]=n}function Wr(e){for(var t=0;t<e.length;t++)on.add(e[t]);for(var n of lt)n(e)}let ln=null;function fn(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;ln=e;var o=0,l=ln===e&&e[Oe];if(l){var a=i.indexOf(l);if(a!==-1&&(t===document||t===window)){e[Oe]=t;return}var f=i.indexOf(t);if(f===-1)return;a<=f&&(o=a)}if(s=i[o]||e.target,s!==t){Cn(e,"currentTarget",{configurable:!0,get(){return s||n}});var c=_,u=w;M(null),Y(null);try{for(var d,v=[];s!==null;){var h=s.assignedSlot||s.parentNode||s.host||null;try{var p=s[Oe]?.[r];p!=null&&(!s.disabled||e.target===s)&&p.call(s,e)}catch(b){d?v.push(b):d=b}if(e.cancelBubble||h===t||h===null)break;s=h}if(d){for(let b of v)queueMicrotask(()=>{throw b});throw d}}finally{e[Oe]=t,delete e.currentTarget,M(c),Y(u)}}}const Hr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function qr(e){return Hr?.createHTML(e)??e}function Br(e){var t=qt("template");return t.innerHTML=qr(e.replaceAll("<!>","<!---->")),t.content}function ft(e,t){var n=w;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Ce(e,t){var n=(t&Qn)!==0,r=(t&$n)!==0,i,s=!e.startsWith("<!>");return()=>{i===void 0&&(i=Br(s?e:"<!>"+e),n||(i=Pe(i)));var o=r||jt?document.importNode(i,!0):i.cloneNode(!0);if(n){var l=Pe(o),a=o.lastChild;ft(l,a)}else ft(o,o);return o}}function Gr(){var e=document.createDocumentFragment(),t=document.createComment(""),n=we();return e.append(t,n),ft(t,n),e}function be(e,t){e!==null&&e.before(t)}function Yr(e,t){return Vr(e,t)}const je=new Map;function Vr(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:o=!0,transformError:l}){yr();var a=void 0,f=Ar(()=>{var c=n??t.appendChild(we());ur(c,{pending:()=>{}},v=>{Ne({});var h=A;s&&(h.c=s),i&&(r.$$events=i),a=e(v,r)||{},De()},l);var u=new Set,d=v=>{for(var h=0;h<v.length;h++){var p=v[h];if(!u.has(p)){u.add(p);var b=jr(p);for(const k of[t,document]){var D=je.get(k);D===void 0&&(D=new Map,je.set(k,D));var g=D.get(p);g===void 0?(k.addEventListener(p,fn,{passive:b}),D.set(p,1)):D.set(p,g+1)}}}};return d(On(on)),lt.add(d),()=>{for(var v of u)for(const b of[t,document]){var h=je.get(b),p=h.get(v);--p==0?(b.removeEventListener(v,fn),h.delete(v),h.size===0&&je.delete(b)):h.set(v,p)}lt.delete(d),c!==n&&c.parentNode?.removeChild(c)}});return Kr.set(a,f),a}let Kr=new WeakMap;class Xr{anchor;#t=new Map;#a=new Map;#e=new Map;#s=new Set;#n=!0;constructor(t,n=!0){this.anchor=t,this.#n=n}#o=()=>{var t=m;if(this.#t.has(t)){var n=this.#t.get(t),r=this.#a.get(n);if(r)Mr(r),this.#s.delete(n);else{var i=this.#e.get(n);i&&(this.#a.set(n,i.effect),this.#e.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,o]of this.#t){if(this.#t.delete(s),s===t)break;const l=this.#e.get(o);l&&(R(l.effect),this.#e.delete(o))}for(const[s,o]of this.#a){if(s===n||this.#s.has(s))continue;const l=()=>{if(Array.from(this.#t.values()).includes(s)){var f=document.createDocumentFragment();Zt(o,f),f.append(we()),this.#e.set(s,{effect:o,fragment:f})}else R(o);this.#s.delete(s),this.#a.delete(s)};this.#n||!r?(this.#s.add(s),xe(o,l,!1)):l()}}};#r=t=>{this.#t.delete(t);const n=Array.from(this.#t.values());for(const[r,i]of this.#e)n.includes(r)||(R(i.effect),this.#e.delete(r))};ensure(t,n){var r=m,i=xr();if(n&&!this.#a.has(t)&&!this.#e.has(t))if(i){var s=document.createDocumentFragment(),o=we();s.append(o),this.#e.set(t,{effect:J(()=>n(o)),fragment:s})}else this.#a.set(t,J(()=>n(this.anchor)));if(this.#t.set(r,t),i){for(const[l,a]of this.#a)l===t?r.unskip_effect(a):r.skip_effect(a);for(const[l,a]of this.#e)l===t?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(this.#o),r.ondiscard(this.#r)}else this.#o()}}function Zr(e,t,n=!1){var r=new Xr(e),i=n?ve:0;function s(o,l){r.ensure(o,l)}st(()=>{var o=!1;t((l,a=0)=>{o=!0,s(a,l)}),o||s(!1,null)},i)}function Jr(e,t){var n;n=document.head.appendChild(we()),st(()=>t(n),Ve|se)}function ut(e,t){Rr(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=qt("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}const un=[...`
2
+ \r\f \v\uFEFF`];function Qr(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var s=i.length,o=0;(o=r.indexOf(i,o))>=0;){var l=o+s;(o===0||un.includes(r[o-1]))&&(l===r.length||un.includes(r[l]))?r=(o===0?"":r.substring(0,o))+r.substring(l+1):o=l}}return r===""?null:r}function cn(e,t,n,r,i,s){var o=e.__className;if(o!==n||o===void 0){var l=Qr(n,r,s);l==null?e.removeAttribute("class"):e.className=l,e.__className=n}else if(s&&i!==s)for(var a in s){var f=!!s[a];(i==null||f!==!!i[a])&&e.classList.toggle(a,f)}return s}const $r=Symbol("is custom element"),ei=Symbol("is html");function ye(e,t,n,r){var i=ti(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[Pn]=n),n==null?e.removeAttribute(t):typeof n!="string"&&ni(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ti(e){return e.__attributes??={[$r]:e.nodeName.includes("-"),[ei]:e.namespaceURI===Tt}}var dn=new Map;function ni(e){var t=e.getAttribute("is")||e.nodeName,n=dn.get(t);if(n)return n;dn.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=An(i);for(var o in r)r[o].set&&n.push(o);i=bt(i)}return n}let We=!1;function ri(e){var t=We;try{return We=!1,[e(),We]}finally{We=t}}function ct(e,t,n,r){var i=(n&Zn)!==0,s=(n&Jn)!==0,o=r,l=!0,a=()=>(l&&(l=!1,o=s?at(r):r),o),f;if(i){var c=Re in e||Mn in e;f=he(e,t)?.set??(c&&t in e?g=>e[t]=g:void 0)}var u,d=!1;i?[u,d]=ri(()=>e[t]):u=e[t],u===void 0&&r!==void 0&&(u=a(),f&&(qn(),f(u)));var v;if(v=()=>{var g=e[t];return g===void 0?a():(l=!0,g)},(n&Xn)===0)return v;if(f){var h=e.$$legacy;return(function(g,k){return arguments.length>0?((!k||h||d)&&f(k?v():g),g):v()})}var p=!1,b=((n&Kn)!==0?et:pr)(()=>(p=!1,v()));i&&O(b);var D=w;return(function(g,k){if(arguments.length>0){const ce=k?O(b):i?le(g):g;return H(b,ce),p=!0,o!==void 0&&(o=ce),g}return ne&&p||(D.f&K)!==0?b.v:O(b)})}function hn(e){A===null&&Fn(),Cr(()=>{const t=at(e);if(typeof t=="function")return t})}const ii="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(ii);var si=Ce('<div><iframe id="chat-frame" title="Chat" class="bot svelte-yhk8rr" frameborder="0" allow="microphone; clipboard-write" allowfullscreen=""></iframe></div>'),oi=Ce(`<p class="svelte-yhk8rr">Please make sure that the script tag has 'id="chatbot"' and the attribute
3
3
  'data-server' with the full qualified URL to the chatbot-server.</p> <pre class="svelte-yhk8rr">
4
4
  <code class="svelte-yhk8rr">
5
5
  &lt;script
@@ -12,7 +12,7 @@
12
12
  <br class="svelte-yhk8rr"/>
13
13
  src="https://server.com/webclient/embed/bundle.js"&gt; &lt;/script&gt;
14
14
  </code>
15
- </pre>`,1);const oi={hash:"svelte-yhk8rr",code:`.svelte-yhk8rr,
15
+ </pre>`,1);const ai={hash:"svelte-yhk8rr",code:`.svelte-yhk8rr,
16
16
  .svelte-yhk8rr:before,
17
17
  .svelte-yhk8rr:after {box-sizing:border-box;}.bot-border.svelte-yhk8rr {position:fixed;display:flex;flex-direction:column;top:0;bottom:env(safe-area-inset-bottom);height:100%;max-height:100vh;width:100%;border-width:0;border-radius:var(--window-border-radius, 8px);box-shadow:rgba(0, 0, 0, 0.24) 0px 16px 40px;background:transparent;opacity:1;transition:transform 200ms,
18
18
  opacity 100ms 100ms,
@@ -20,10 +20,10 @@
20
20
 
21
21
  @media screen and (min-width: 768px) {#chat-frame.svelte-yhk8rr {border-radius:var(--window-border-radius, 8px);}.bot-border.svelte-yhk8rr {height:var(--window-height, 46em);max-height:var(--window-max-height, calc(100vh - 2em));width:var(--window-width, 26em);top:var(--window-top, auto);right:var(--window-right, 1em);bottom:var(--window-bottom, 1em);left:var(--window-left, auto);border-radius:var(--window-border-radius, 8px);}.bot-border.closed.svelte-yhk8rr {transform:translateY(var(--window-height, 46em));opacity:0;}
22
22
  }p.svelte-yhk8rr,
23
- pre.svelte-yhk8rr {max-width:300px;}pre.svelte-yhk8rr {font-size:0.6em;line-height:0.5;}`};function ai(e,t){Re(t,!0),lt(e,oi),hn(()=>{document.getElementById("chat-frame")?.addEventListener("load",t.onLoad)});var n=Br(),i=yr(n);{var r=o=>{var a=ii();let l;var f=tt(a);Fe(c=>{l=cn(a,1,"bot-border svelte-yhk8rr",null,l,{closed:!t.open}),be(a,"aria-hidden",t.open?"false":"true"),be(f,"src",c)},[()=>`${t.server}${t.server.indexOf("?")===-1?"?":"&"}referrer=${encodeURIComponent(t.referrer??"")}`]),me(o,a)},s=o=>{var a=si();me(o,a)};Xr(i,o=>{t.server?o(r):o(s,!1)})}me(e,n),Ne()}var li=Oe('<div class="chat-button-wrapper svelte-1xi58vz" tabindex="0" role="button" aria-label="Open chat window"><img class="chat-button svelte-1xi58vz" alt="Open chat window"/></div>');const fi={hash:"svelte-1xi58vz",code:`.svelte-1xi58vz,
23
+ pre.svelte-yhk8rr {max-width:300px;}pre.svelte-yhk8rr {font-size:0.6em;line-height:0.5;}`};function li(e,t){Ne(t,!0),ut(e,ai),hn(()=>{document.getElementById("chat-frame")?.addEventListener("load",t.onLoad)});var n=Gr(),r=Er(n);{var i=o=>{var l=si();let a;var f=rt(l);Ue(c=>{a=cn(l,1,"bot-border svelte-yhk8rr",null,a,{closed:!t.open}),ye(l,"aria-hidden",t.open?"false":"true"),ye(f,"src",c)},[()=>`${t.server}${t.server.indexOf("?")===-1?"?":"&"}referrer=${encodeURIComponent(t.referrer??"")}`]),be(o,l)},s=o=>{var l=oi();be(o,l)};Zr(r,o=>{t.server?o(i):o(s,!1)})}be(e,n),De()}var fi=Ce('<div class="chat-button-wrapper svelte-1xi58vz" tabindex="0" role="button" aria-label="Open chat window"><img class="chat-button svelte-1xi58vz" alt="Open chat window"/></div>');const ui={hash:"svelte-1xi58vz",code:`.svelte-1xi58vz,
24
24
  .svelte-1xi58vz:before,
25
25
  .svelte-1xi58vz:after {box-sizing:border-box;}.chat-button-wrapper.svelte-1xi58vz {position:fixed;top:var(--fab-top-mobile, var(--fab-top, auto));right:var(--fab-right-mobile, var(--fab-right, 1.5em));bottom:var(--fab-bottom-mobile, var(--fab-bottom, 1.5em));left:var(--fab-left-mobile, var(--fab-left, auto));width:var(--fab-size-mobile, var(--fab-size, 5em));height:var(--fab-size-mobile, var(--fab-size, 5em));z-index:999;}
26
26
 
27
27
  @media screen and (min-width: 768px) {.chat-button-wrapper.svelte-1xi58vz {top:var(--fab-top, auto);right:var(--fab-right, 1.5em);bottom:var(--fab-bottom, 1.5em);left:var(--fab-left, auto);width:var(--fab-size, 6em);height:var(--fab-size, 6em);}
28
28
  }.chat-button.svelte-1xi58vz {display:block;height:100%;cursor:pointer;border-radius:50%;box-shadow:9px 9px 16px rgba(0, 0, 0, 0.25);transition:transform 100ms,
29
- box-shadow 100ms;}.chat-button.svelte-1xi58vz:hover {box-shadow:16px 16px 16px rgba(0, 0, 0, 0.2);transform:translateY(-2px);}`};function ui(e,t){Re(t,!0),lt(e,fi);function n(s){const o=s.key;(o==="ArrowDown"||o==="ArrowRight"||o==="Enter"||o===" "||o==="Space")&&(s.stopPropagation(),t.onToggle())}var i=li(),r=tt(i);Fe(()=>{be(i,"aria-expanded",t.open?"true":"false"),be(r,"src",`${t.assetsUrl}/fab.svg`)}),an("click",i,function(...s){t.onToggle?.apply(this,s)}),an("keydown",i,n),me(e,i),Ne()}Wr(["click","keydown"]);let vn=!1;function ci(e){vn=e}function di(){return vn}function je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)e[i]=n[i]}return e}var hi={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ut(e,t){function n(r,s,o){if(!(typeof document>"u")){o=je({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=r+"="+e.write(s,r)+a}}function i(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var s=document.cookie?document.cookie.split("; "):[],o={},a=0;a<s.length;a++){var l=s[a].split("="),f=l.slice(1).join("=");try{var c=decodeURIComponent(l[0]);if(o[c]=e.read(f,c),r===c)break}catch{}}return r?o[r]:o}}return Object.create({set:n,get:i,remove:function(r,s){n(r,"",je({},s,{expires:-1}))},withAttributes:function(r){return ut(this.converter,je({},this.attributes,r))},withConverter:function(r){return ut(je({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var _n=ut(hi,{path:"/"});const pn="bubble-chat-window-state",gn=()=>{switch(_n.get(pn)){case"open":return!0;case"closed":return!1;default:return}},wn=e=>{const t=new Date(new Date().getTime()+288e5);_n.set(pn,e,{expires:t})},ct=[];let dt=gn();function ht(){dt=!0,wn("open"),ct.forEach(function(e){e.call(window,!0)})}function He(){dt=!1,wn("closed"),ct.forEach(function(e){e.call(window,!1)})}function mn(){dt?He():ht()}function vi(){vt({type:"RESTART_CHAT"})}function _i(e){vt({type:"CHAT_MESSAGE_FROM_GUEST",text:e})}function pi(e){vt({type:"TRIGGER_STORY",story:e})}function bn(){return document.getElementById("chat-frame")}function gi(){const e=bn();if(e?.src)try{return new URL(e.src).origin}catch{return null}return null}function vt(e){const t=bn(),n=gi();if(!n){console.warn("Cannot send message: chat iframe origin could not be determined");return}t?.contentWindow?.postMessage(e,n)}function yn(e,t){if(e==="ON_CHAT_WINDOW_STATE_CHANGE")ct.push(t);else throw new Error("Unsupported event "+e)}const wi=Object.freeze(Object.defineProperty({__proto__:null,closeChatWindow:He,enterGuestMessage:_i,isChatbotLoaded:di,openChatWindow:ht,restartChat:vi,subscribe:yn,toggleChatWindow:mn,triggerStory:pi},Symbol.toStringTag,{value:"Module"})),mi=e=>{if(!e||typeof e!="object"||Array.isArray(e)){console.warn("Invalid tracking payload received:",e);return}"gtag"in window&&typeof window.gtag=="function"?window.gtag("event","",e):"dataLayer"in window&&Array.isArray(window.dataLayer)&&window.dataLayer.push(e)},bi=(e,t,n,i,r)=>{const s=()=>{const f=document.getElementById("chat-frame");if(f?.src)try{return new URL(f.src).origin}catch{return null}return null},o={CHAT_STARTED:"webclient.chat.started",CHAT_ENDED:"webclient.chat.ended",WINDOW_EXPAND:"webclient.window.expand",WINDOW_CLOSE:"webclient.window.close",CHANGE_URL:"webclient.change.url",GOOGLE_TAG_EVENT:"google.tag.event"},a=Object.values(o),l=f=>{if(!f.data?.type||!a.includes(f.data.type))return;const c=s();if(c&&f.origin!==c){console.warn("Rejected postMessage from untrusted origin:",f.origin);return}const d=f.data;switch(d.type){case o.CHAT_STARTED:e();break;case o.CHAT_ENDED:t();break;case o.WINDOW_EXPAND:n(d.devices,d.initial);break;case o.WINDOW_CLOSE:i();break;case o.CHANGE_URL:r(d.url);break;case o.GOOGLE_TAG_EVENT:mi(d.payload);break}};window.addEventListener("message",l,!1)},yi=e=>new Promise(t=>{const n=document.getElementById(e);n?(n.onload=()=>{t(!0)},n.onerror=()=>{console.error("Failed to load CSS file: custom.css"),t(!1)}):(console.error("No custom.css file found"),t(!1))});var Ei=Oe('<link rel="stylesheet"/>'),ki=Oe("<div><!> <!></div>");const xi={hash:"svelte-1n46o8q",code:".bubble-chat.svelte-1n46o8q {font-size:16px;visibility:hidden;opacity:0;}.bubble-chat.chatbot-ready.svelte-1n46o8q {visibility:visible;opacity:1;}"};function Ti(e,t){Re(t,!0),lt(e,xi);let n=ft(t,"assetsUrl",19,()=>t.server?t.server.split("?")[0]:void 0),i=ft(t,"linkHandling",3,"default"),r=ft(t,"chatStarted",7,!1);const s="chatbot-style";let o=W(!1),a=W(!1),l=W(se(gn()));yn("ON_CHAT_WINDOW_STATE_CHANGE",function(C){j(l,C,!0)});function f(){r(!0)}function c(){r(!1)}function d(w,C){const le=window.innerWidth,pt=w==null||w==="all",gt=w==="desktop"&&le>=768,Ri=w==="mobile"&&le<768,Ni=pt||gt||Ri;(!C||S(l)!==!1)&&Ni&&ht()}function u(){He()}function h(w){const C=window.innerWidth,le=window.location.hostname,pt=new URL(w).hostname,gt=le===pt;C<768&&He(),i()==="new-tab"?window.open(w,"_blank"):i()==="existing-tab"||gt?document.location.href=w:window.open(w,"_blank")}function v(){j(a,!0)}bi(f,c,d,u,h),hn(async()=>{j(o,await yi(s),!0)});var p=ki();Zr("1n46o8q",w=>{var C=Ei();be(C,"id",s),Fe(()=>be(C,"href",`${n()}/custom.css`)),me(w,C)});var y=tt(p);ui(y,{get assetsUrl(){return n()},get open(){return S(l)},get onToggle(){return mn}});var Y=Er(y,2);ai(Y,{get server(){return t.server},get referrer(){return t.referrer},get open(){return S(l)},onLoad:v}),Fe(()=>cn(p,1,`bubble-chat ${S(o)&&S(a)?"chatbot-ready":""}`,"svelte-1n46o8q")),me(e,p),Ne()}const Si=e=>e.replace(/\/embed\/bundle\.js/,""),Oi=e=>e.dataset?.server,Ci=e=>{if(e&&"src"in e&&typeof e.src=="string")return Oi(e)||Si(e.src)},_t=document.querySelector("script#chatbot"),En=Ci(_t),Ai=_t?.getAttribute("link-handling")?_t.getAttribute("link-handling"):"default";window.chatbot=wi;const kn=()=>{console.log("Chatbot is loading from",En),Gr(Ti,{target:document.body,props:{server:En,referrer:window.location.href,linkHandling:Ai}}),ci(!0)},xn=(e=0)=>{e>=3||document.readyState==="complete"?setTimeout(kn,500):setTimeout(()=>{xn(e+1)},500)};xn();const qe=document.getElementById("chatbot");qe&&"src"in qe&&typeof qe.src=="string"&&qe.src.indexOf("caller=bookmarklet")>0&&setTimeout(kn,500)})();
29
+ box-shadow 100ms;}.chat-button.svelte-1xi58vz:hover {box-shadow:16px 16px 16px rgba(0, 0, 0, 0.2);transform:translateY(-2px);}`};function ci(e,t){Ne(t,!0),ut(e,ui);function n(s){const o=s.key;(o==="ArrowDown"||o==="ArrowRight"||o==="Enter"||o===" "||o==="Space")&&(s.stopPropagation(),t.onToggle())}var r=fi(),i=rt(r);Ue(()=>{ye(r,"aria-expanded",t.open?"true":"false"),ye(i,"src",`${t.assetsUrl}/fab.svg`)}),an("click",r,function(...s){t.onToggle?.apply(this,s)}),an("keydown",r,n),be(e,r),De()}Wr(["click","keydown"]);let vn=!1;function di(e){vn=e}function hi(){return vn}function He(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var vi={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function dt(e,t){function n(i,s,o){if(!(typeof document>"u")){o=He({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var a in o)o[a]&&(l+="; "+a,o[a]!==!0&&(l+="="+o[a].split(";")[0]));return document.cookie=i+"="+e.write(s,i)+l}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var s=document.cookie?document.cookie.split("; "):[],o={},l=0;l<s.length;l++){var a=s[l].split("="),f=a.slice(1).join("=");try{var c=decodeURIComponent(a[0]);if(o[c]=e.read(f,c),i===c)break}catch{}}return i?o[i]:o}}return Object.create({set:n,get:r,remove:function(i,s){n(i,"",He({},s,{expires:-1}))},withAttributes:function(i){return dt(this.converter,He({},this.attributes,i))},withConverter:function(i){return dt(He({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var _n=dt(vi,{path:"/"});const pn="bubble-chat-window-state",gn=()=>{switch(_n.get(pn)){case"open":return!0;case"closed":return!1;default:return}},wn=e=>{const t=new Date(new Date().getTime()+288e5);_n.set(pn,e,{expires:t})},ht=[];let vt=gn();function _t(){vt=!0,wn("open"),ht.forEach(function(e){e.call(window,!0)})}function qe(){vt=!1,wn("closed"),ht.forEach(function(e){e.call(window,!1)})}function mn(){vt?qe():_t()}function _i(){pt({type:"RESTART_CHAT"})}function pi(e){pt({type:"CHAT_MESSAGE_FROM_GUEST",text:e})}function gi(e){pt({type:"TRIGGER_STORY",story:e})}function bn(){return document.getElementById("chat-frame")}function wi(){const e=bn();if(e?.src)try{return new URL(e.src).origin}catch{return null}return null}function pt(e){const t=bn(),n=wi();if(!n){console.warn("Cannot send message: chat iframe origin could not be determined");return}t?.contentWindow?.postMessage(e,n)}function yn(e,t){if(e==="ON_CHAT_WINDOW_STATE_CHANGE")ht.push(t);else throw new Error("Unsupported event "+e)}const mi=Object.freeze(Object.defineProperty({__proto__:null,closeChatWindow:qe,enterGuestMessage:pi,isChatbotLoaded:hi,openChatWindow:_t,restartChat:_i,subscribe:yn,toggleChatWindow:mn,triggerStory:gi},Symbol.toStringTag,{value:"Module"})),bi=e=>{if(!e||typeof e!="object"||Array.isArray(e)){console.warn("Invalid tracking payload received:",e);return}"gtag"in window&&typeof window.gtag=="function"?window.gtag("event","",e):"dataLayer"in window&&Array.isArray(window.dataLayer)&&window.dataLayer.push(e)},yi=(e,t,n,r,i)=>{const s=()=>{const f=document.getElementById("chat-frame");if(f?.src)try{return new URL(f.src).origin}catch{return null}return null},o={CHAT_STARTED:"webclient.chat.started",CHAT_ENDED:"webclient.chat.ended",WINDOW_EXPAND:"webclient.window.expand",WINDOW_CLOSE:"webclient.window.close",CHANGE_URL:"webclient.change.url",GOOGLE_TAG_EVENT:"google.tag.event"},l=Object.values(o),a=f=>{if(!f.data?.type||!l.includes(f.data.type))return;const c=s();if(c&&f.origin!==c){console.warn("Rejected postMessage from untrusted origin:",f.origin);return}const u=f.data;switch(u.type){case o.CHAT_STARTED:e();break;case o.CHAT_ENDED:t();break;case o.WINDOW_EXPAND:n(u.devices,u.initial);break;case o.WINDOW_CLOSE:r();break;case o.CHANGE_URL:i(u.url);break;case o.GOOGLE_TAG_EVENT:bi(u.payload);break}};window.addEventListener("message",a,!1)},Ei=e=>new Promise(t=>{const n=document.getElementById(e);n?(n.onload=()=>{t(!0)},n.onerror=()=>{console.error("Failed to load CSS file: custom.css"),t(!1)}):(console.error("No custom.css file found"),t(!1))});var ki=Ce('<link rel="stylesheet"/>'),xi=Ce("<div><!> <!></div>");const Ti={hash:"svelte-1n46o8q",code:".bubble-chat.svelte-1n46o8q {font-size:16px;visibility:hidden;opacity:0;}.bubble-chat.chatbot-ready.svelte-1n46o8q {visibility:visible;opacity:1;}"};function Si(e,t){Ne(t,!0),ut(e,Ti);let n=ct(t,"assetsUrl",19,()=>t.server?t.server.split("?")[0]:void 0),r=ct(t,"linkHandling",3,"default"),i=ct(t,"chatStarted",7,!1);const s="chatbot-style";let o=W(!1),l=W(!1),a=W(le(gn()));yn("ON_CHAT_WINDOW_STATE_CHANGE",function(k){H(a,k,!0)});function f(){i(!0)}function c(){i(!1)}function u(g,k){const ce=window.innerWidth,wt=g==null||g==="all",mt=g==="desktop"&&ce>=768,Ni=g==="mobile"&&ce<768,Di=wt||mt||Ni;(!k||O(a)!==!1)&&Di&&_t()}function d(){qe()}function v(g){const k=window.innerWidth,ce=window.location.hostname,wt=new URL(g).hostname,mt=ce===wt;k<768&&qe(),r()==="new-tab"?window.open(g,"_blank"):r()==="existing-tab"||mt?document.location.href=g:window.open(g,"_blank")}function h(){H(l,!0)}yi(f,c,u,d,v),hn(async()=>{H(o,await Ei(s),!0)});var p=xi();Jr("1n46o8q",g=>{var k=ki();ye(k,"id",s),Ue(()=>ye(k,"href",`${n()}/custom.css`)),be(g,k)});var b=rt(p);ci(b,{get assetsUrl(){return n()},get open(){return O(a)},get onToggle(){return mn}});var D=kr(b,2);li(D,{get server(){return t.server},get referrer(){return t.referrer},get open(){return O(a)},onLoad:h}),Ue(()=>cn(p,1,`bubble-chat ${O(o)&&O(l)?"chatbot-ready":""}`,"svelte-1n46o8q")),be(e,p),De()}const Oi=e=>e.replace(/\/embed\/bundle\.js/,""),Ci=e=>e.dataset?.server,Ai=e=>{if(e&&"src"in e&&typeof e.src=="string")return Ci(e)||Oi(e.src)},gt=document.querySelector("script#chatbot"),En=Ai(gt),Ri=gt?.getAttribute("link-handling")?gt.getAttribute("link-handling"):"default";window.chatbot=mi;const kn=()=>{console.log("Chatbot is loading from",En),Yr(Si,{target:document.body,props:{server:En,referrer:window.location.href,linkHandling:Ri}}),di(!0)},xn=(e=0)=>{e>=3||document.readyState==="complete"?setTimeout(kn,500):setTimeout(()=>{xn(e+1)},500)};xn();const Be=document.getElementById("chatbot");Be&&"src"in Be&&typeof Be.src=="string"&&Be.src.indexOf("caller=bookmarklet")>0&&setTimeout(kn,500)})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botfabrik/engine-webclient",
3
- "version": "4.106.1",
3
+ "version": "4.107.0",
4
4
  "description": "Webclient for Botfabriks Bot Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -31,9 +31,9 @@
31
31
  "dev:embed": "tsx --watch ./run-embed-local.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@botfabrik/engine-domain": "^4.106.1",
35
- "@botfabrik/engine-transcript-export": "^4.106.1",
36
- "@botfabrik/engine-utils": "^4.106.1",
34
+ "@botfabrik/engine-domain": "^4.107.0",
35
+ "@botfabrik/engine-transcript-export": "^4.107.0",
36
+ "@botfabrik/engine-utils": "^4.107.0",
37
37
  "@google-cloud/speech": "^7.2.1",
38
38
  "@node-saml/passport-saml": "^5.1.0",
39
39
  "express": "^5.2.1",
@@ -50,5 +50,5 @@
50
50
  "tsx": "^4.21.0",
51
51
  "typescript": "5.9.3"
52
52
  },
53
- "gitHead": "faefea398dbc66d704a5f4a17986d554c84d2344"
53
+ "gitHead": "af0f2383299d6801a51b73556dc65c8de1b61496"
54
54
  }