@helpai/elements 0.54.1 → 0.54.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ var Hc=Object.defineProperty;var zc=(e,t,n)=>t in e?Hc(e,t,{enumerable:!0,config
4
4
  `;var vi=`.__P__-standalone-page{margin:0;height:100vh;background:var(--__P__-bg, #fff);display:grid;place-items:stretch}
5
5
  `;var bi=`:host([data-mode="page"]){min-height:0}:host([data-mode="page"]) .__P__-page-shell{display:grid;grid-template-columns:280px 1fr;width:100%;height:100%;min-height:0;background:var(--__P__-bg);color:var(--__P__-fg);transition:grid-template-columns var(--__P__-dur-base) var(--__P__-ease-in-out)}:host([data-mode="page"]) .__P__-page-shell[data-sidebar-collapsed=true]{grid-template-columns:48px 1fr}:host([data-mode="page"]) .__P__-page-chat{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}:host([data-mode="page"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-width:0;min-height:0;flex:1 1 0}:host([data-mode="page"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;border-radius:0;border:0;box-shadow:none;animation:none}:host([data-mode="page"]) .__P__-sidebar{border-inline-end:1px solid var(--__P__-border);display:flex;flex-direction:column;overflow:hidden;background:var(--__P__-surface)}:host([data-mode="page"]) .__P__-sidebar-header{padding:var(--__P__-space-4) var(--__P__-space-5);border-bottom:1px solid var(--__P__-border);display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-2);min-height:56px;box-sizing:border-box}:host([data-mode="page"]) .__P__-sidebar[data-collapsed=true] .__P__-sidebar-header{padding:var(--__P__-space-4) var(--__P__-space-2);justify-content:center}:host([data-mode="page"]) .__P__-sidebar[data-collapsed=true] .__P__-sidebar-logo,:host([data-mode="page"]) .__P__-sidebar[data-collapsed=true] .__P__-sidebar-title{display:none}:host([data-mode="page"]) .__P__-sidebar-toggle{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid var(--__P__-border);border-radius:6px;background:transparent;color:var(--__P__-fg);cursor:pointer;transition:background .12s,border-color .12s}:host([data-mode="page"]) .__P__-sidebar-toggle:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}:host([data-mode="page"]) .__P__-sidebar-toggle:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}:host([data-mode="page"]) .__P__-sidebar-logo{height:32px;display:block}:host([data-mode="page"]) .__P__-sidebar-title{font-size:var(--__P__-text-md);font-weight:600}:host([data-mode="page"]) .__P__-sidebar-section{padding:var(--__P__-space-3) var(--__P__-space-4);border-bottom:1px solid var(--__P__-border)}:host([data-mode="page"]) .__P__-sidebar-nav{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}:host([data-mode="page"]) .__P__-sidebar-nav-item{display:flex;align-items:center;gap:10px;padding:var(--__P__-space-2) var(--__P__-space-3);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);text-decoration:none;font-size:calc(14px * var(--__P__-text-scale));transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}:host([data-mode="page"]) .__P__-sidebar-nav-item:hover{background:var(--__P__-hover)}:host([data-mode="page"]) .__P__-sidebar-nav-item:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}:host([data-mode="page"]) .__P__-sidebar-cards{display:grid;grid-template-columns:1fr;gap:var(--__P__-space-2)}:host([data-mode="page"]) .__P__-sidebar-card{display:block;padding:10px 12px;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-sm);text-decoration:none;color:var(--__P__-fg);transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}:host([data-mode="page"]) .__P__-sidebar-card:hover{border-color:var(--__P__-accent)}:host([data-mode="page"]) .__P__-sidebar-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}:host([data-mode="page"]) .__P__-sidebar-card-label{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}:host([data-mode="page"]) .__P__-sidebar-card-desc{font-size:var(--__P__-text-xs);color:var(--__P__-muted);margin-top:2px}:host([data-mode="page"]) .__P__-sidebar-conversations{flex:1 1 auto;overflow-y:auto;padding:var(--__P__-space-3) var(--__P__-space-4)}:host([data-mode="page"]) .__P__-page-chat{display:flex;flex-direction:column;overflow:hidden}@media(max-width:768px){:host([data-mode="page"]) .__P__-page-shell{grid-template-columns:1fr}:host([data-mode="page"]) .__P__-sidebar{display:none}}
6
6
  `;var Nd="helpai",Dd="#5B5BD6",Od="#FFFFFF",$d="12px",Bd="Inter, system-ui, -apple-system, 'Segoe UI', sans-serif",ko=[fi,gi,hi,vi,bi].join(`
7
- `).replace(/__P__/g,Nd).replaceAll("__BRAND_ACCENT_TEXT__",Od).replaceAll("__BRAND_ACCENT__",Dd).replaceAll("__BRAND_RADIUS__",$d).replaceAll("__BRAND_FONT__",Bd);var Hd=J.scope("mount"),Pi=new WeakMap,xi={floating:"all: initial; position: fixed; z-index: 2147483600;",flow:"all: initial; display: block; position: relative; width: 100%; height: 100%; z-index: 1; contain: size;",viewport:"all: initial; display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1;"};function yi(e,t){e.style.cssText=xi[t]}function Kn(e){return e==="floating"||e==="modal"||e==="drawer"?"floating":e==="standalone"||e==="page"?"viewport":"flow"}function Si(e={}){let t=e.position??"flow";Hd.debug("createShadowMount",{position:t,hasTarget:!!e.target,hasHost:!!e.existingHost});let n=`${x.cssPrefix}-chat-host`;typeof customElements<"u"&&!customElements.get(n)&&customElements.define(n,class extends HTMLElement{});let r;e.existingHost?r=e.existingHost:(r=document.createElement(n),(e.target??document.body).appendChild(r)),r.setAttribute("data-brand",x.id),r.style.cssText=xi[t];let a=r.shadowRoot??r.attachShadow({mode:"open"}),i=r.ownerDocument;if(!zd(a,i)){let s=i.createElement("style");s.textContent=ko,a.appendChild(s)}let l=document.createElement("div");return l.className=`${x.cssPrefix}-app`,a.appendChild(l),{appRoot:l,destroy:()=>r.remove(),hostElement:r,shadowRoot:a}}function zd(e,t){if(!("adoptedStyleSheets"in e))return!1;let n=t.defaultView;if(!n||typeof n.CSSStyleSheet!="function")return!1;let r=Pi.get(t);if(!r)try{r=new n.CSSStyleSheet,r.replaceSync(ko),Pi.set(t,r)}catch{return!1}try{return e.adoptedStyleSheets=[r],!0}catch{return!1}}function Fd(e,t){let n=x.cssPrefix;t.accent&&e.style.setProperty(`--${n}-accent-user`,t.accent),t.accentText&&e.style.setProperty(`--${n}-accent-text-user`,t.accentText),t.radius&&e.style.setProperty(`--${n}-radius`,t.radius),t.fontFamily&&e.style.setProperty(`--${n}-font`,t.fontFamily)}function Ud(e,t){e.dataset.theme=t}function qd(e,t){let n=x.cssPrefix;t.width!==void 0&&e.style.setProperty(`--${n}-panel-w`,t.width),t.height!==void 0&&e.style.setProperty(`--${n}-panel-h`,t.height),t.expanded?.width!==void 0&&e.style.setProperty(`--${n}-expanded-w`,t.expanded.width),t.expanded?.height!==void 0&&e.style.setProperty(`--${n}-expanded-h`,t.expanded.height),t.inset!==void 0&&e.style.setProperty(`--${n}-panel-inset`,t.inset)}function Wd(e,t){e.dataset.position=t}function jn(e,t){e.dataset.mode=t}function wi(e,t){Ud(e,t.themeMode),Fd(e,t.themeOverrides),Wd(e,t.position),qd(e,t.size)}var Lt,pe,Co,ki,en=0,Mi=[],fe=Z,Ci=fe.__b,Ti=fe.__r,Ei=fe.diffed,Ri=fe.__c,Ai=fe.unmount,Ii=fe.__;function Yn(e,t){fe.__h&&fe.__h(pe,e,en||t),en=0;var n=pe.__H||(pe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function A(e){return en=1,Gd(Ni,e)}function Gd(e,t,n){var r=Yn(Lt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ni(void 0,t),function(s){var c=r.__N?r.__N[0]:r.__[0],d=r.t(c,s);c!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=pe,!pe.__f)){var a=function(s,c,d){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(g){return g.__c});if(u.every(function(g){return!g.__N}))return!i||i.call(this,s,c,d);var _=r.__c.props!==s;return u.some(function(g){if(g.__N){var f=g.__[0];g.__=g.__N,g.__N=void 0,f!==g.__[0]&&(_=!0)}}),i&&i.call(this,s,c,d)||_};pe.__f=!0;var i=pe.shouldComponentUpdate,l=pe.componentWillUpdate;pe.componentWillUpdate=function(s,c,d){if(this.__e){var u=i;i=void 0,a(s,c,d),i=u}l&&l.call(this,s,c,d)},pe.shouldComponentUpdate=a}return r.__N||r.__}function E(e,t){var n=Yn(Lt++,3);!fe.__s&&Eo(n.__H,t)&&(n.__=e,n.u=t,pe.__H.__h.push(n))}function ht(e,t){var n=Yn(Lt++,4);!fe.__s&&Eo(n.__H,t)&&(n.__=e,n.u=t,pe.__h.push(n))}function D(e){return en=5,Re(function(){return{current:e}},[])}function Re(e,t){var n=Yn(Lt++,7);return Eo(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function O(e,t){return en=8,Re(function(){return e},t)}function Vd(){for(var e;e=Mi.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Xn),t.__h.some(To),t.__h=[]}catch(n){t.__h=[],fe.__e(n,e.__v)}}}fe.__b=function(e){pe=null,Ci&&Ci(e)},fe.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ii&&Ii(e,t)},fe.__r=function(e){Ti&&Ti(e),Lt=0;var t=(pe=e.__c).__H;t&&(Co===pe?(t.__h=[],pe.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(Xn),t.__h.some(To),t.__h=[],Lt=0)),Co=pe},fe.diffed=function(e){Ei&&Ei(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Mi.push(t)!==1&&ki===fe.requestAnimationFrame||((ki=fe.requestAnimationFrame)||Kd)(Vd)),t.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Co=pe=null},fe.__c=function(e,t){t.some(function(n){try{n.__h.some(Xn),n.__h=n.__h.filter(function(r){return!r.__||To(r)})}catch(r){t.some(function(a){a.__h&&(a.__h=[])}),t=[],fe.__e(r,n.__v)}}),Ri&&Ri(e,t)},fe.unmount=function(e){Ai&&Ai(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(r){try{Xn(r)}catch(a){t=a}}),n.__H=void 0,t&&fe.__e(t,n.__v))};var Li=typeof requestAnimationFrame=="function";function Kd(e){var t,n=function(){clearTimeout(r),Li&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Li&&(t=requestAnimationFrame(n))}function Xn(e){var t=pe,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),pe=t}function To(e){var t=pe;e.__c=e.__(),pe=t}function Eo(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Ni(e,t){return typeof t=="function"?t(e):t}var jd=Symbol.for("preact-signals");function er(){if(tt>1)tt--;else{var e,t=!1;for((function(){var a=Qn;for(Qn=void 0;a!==void 0;)a.S.v===a.v&&(a.S.i=a.i),a=a.o})();tn!==void 0;){var n=tn;for(tn=void 0,Jn++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&$i(n))try{n.c()}catch(a){t||(e=a,t=!0)}n=r}}if(Jn=0,tt--,t)throw e}}function Mt(e){if(tt>0)return e();Ro=++Xd,tt++;try{return e()}finally{er()}}var le=void 0;function nn(e){var t=le;le=void 0;try{return e()}finally{le=t}}var Di,tn=void 0,tt=0,Jn=0,Xd=0,Ro=0,Qn=void 0,Zn=0;function Oi(e){if(le!==void 0){var t=e.n;if(t===void 0||t.t!==le)return t={i:0,S:e,p:le.s,n:void 0,t:le,e:void 0,x:void 0,r:t},le.s!==void 0&&(le.s.n=t),le.s=t,e.n=t,32&le.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=le.s,t.n=void 0,le.s.n=t,le.s=t),t}}function ve(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}ve.prototype.brand=jd;ve.prototype.h=function(){return!0};ve.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n!==void 0?n.e=e:nn(function(){var r;(r=t.W)==null||r.call(t)}))};ve.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&nn(function(){var a;(a=t.Z)==null||a.call(t)}))}};ve.prototype.subscribe=function(e){var t=this;return nt(function(){var n=t.value;nn(function(){return e(n)})},{name:"sub"})};ve.prototype.valueOf=function(){return this.value};ve.prototype.toString=function(){return this.value+""};ve.prototype.toJSON=function(){return this.value};ve.prototype.peek=function(){var e=this;return nn(function(){return e.value})};Object.defineProperty(ve.prototype,"value",{get:function(){var e=Oi(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Jn>100)throw new Error("Cycle detected");(function(n){tt!==0&&Jn===0&&n.l!==Ro&&(n.l=Ro,Qn={S:n,v:n.v,i:n.i,o:Qn})})(this),this.v=e,this.i++,Zn++,tt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{er()}}}});function B(e,t){return new ve(e,t)}function $i(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Bi(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Hi(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function vt(e,t){ve.call(this,void 0,t),this.x=e,this.s=void 0,this.g=Zn-1,this.f=4}vt.prototype=new ve;vt.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Zn))return!0;if(this.g=Zn,this.f|=1,this.i>0&&!$i(this))return this.f&=-2,!0;var e=le;try{Bi(this),le=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return le=e,Hi(this),this.f&=-2,!0};vt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ve.prototype.S.call(this,e)};vt.prototype.U=function(e){if(this.t!==void 0&&(ve.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};vt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(vt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Oi(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function rn(e,t){return new vt(e,t)}function zi(e){var t=e.m;if(e.m=void 0,typeof t=="function"){tt++;var n=le;le=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Ao(e),r}finally{le=n,er()}}}function Ao(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,zi(e)}function Yd(e){if(le!==this)throw new Error("Out-of-order effect");Hi(this),le=e,this.f&=-2,8&this.f&&Ao(this),er()}function Nt(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,Di&&Di.push(this)}Nt.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.m=t)}finally{e()}};Nt.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,zi(this),Bi(this),tt++;var e=le;return le=this,Yd.bind(this,e)};Nt.prototype.N=function(){2&this.f||(this.f|=2,this.u=tn,tn=this)};Nt.prototype.d=function(){this.f|=8,1&this.f||Ao(this)};Nt.prototype.dispose=function(){this.d()};function nt(e,t){var n=new Nt(e,t);try{n.c()}catch(a){throw n.d(),a}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var Fi,rr,tr,Jd=typeof window<"u"&&!!window.__PREACT_SIGNALS_DEVTOOLS__;var Ui=[];nt(function(){Fi=this.N})();function Dt(e,t){Z[e]=t.bind(null,Z[e]||function(){})}function nr(e){if(tr){var t=tr;tr=void 0,t()}tr=e&&e.S()}function qi(e){var t=this,n=e.data,r=on(n);r.value=n;var a=Re(function(){for(var s=t,c=t.__v;c=c.__;)if(c.__c){c.__c.__$f|=4;break}var d=rn(function(){var f=r.value.value;return f===0?0:f===!0?"":f||""}),u=rn(function(){return!Array.isArray(d.value)&&!lo(d.value)}),_=nt(function(){if(this.N=Wi,u.value){var f=d.value;s.__v&&s.__v.__e&&s.__v.__e.nodeType===3&&(s.__v.__e.data=f)}}),g=t.__$u.d;return t.__$u.d=function(){_(),g.call(this)},[u,d]},[]),i=a[0],l=a[1];return i.value?l.peek():l.value}qi.displayName="ReactiveTextNode";Object.defineProperties(ve.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:qi},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}});Dt("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var a in r)if(a!=="children"){var i=r[a];i instanceof ve&&(n||(t.__np=n={}),n[a]=i,r[a]=i.peek())}}e(t)});Dt("__r",function(e,t){if(e(t),t.type!==te){nr();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=(function(a,i){var l;return nt(function(){l=this},{name:i}),l.c=a,l})(function(){var a;Jd&&((a=n.y)==null||a.call(n)),r.__$f|=1,r.setState({})},typeof t.type=="function"?t.type.displayName||t.type.name:""))),rr=r,nr(n)}});Dt("__e",function(e,t,n,r){nr(),rr=void 0,e(t,n,r)});Dt("diffed",function(e,t){nr(),rr=void 0;var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,a=t.props;if(r){var i=n.U;if(i)for(var l in i){var s=i[l];s!==void 0&&!(l in r)&&(s.d(),i[l]=void 0)}else i={},n.U=i;for(var c in r){var d=i[c],u=r[c];d===void 0?(d=Qd(n,c,u,a),i[c]=d):d.o(u,a)}}}e(t)});function Qd(e,t,n,r){var a=t in e&&e.ownerSVGElement===void 0,i=B(n);return{o:function(l,s){i.value=l,r=s},d:nt(function(){this.N=Wi;var l=i.value.value;r[t]!==l&&(r[t]=l,a?e[t]=l:l!=null&&(l!==!1||t[4]==="-")?e.setAttribute(t,l):e.removeAttribute(t))})}}Dt("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var a in r){var i=r[a];i&&i.d()}}}var l=t.__np;if(l){var s=t.props;for(var c in l)s[c]=l[c]}t.__np=void 0}else{var d=t.__c;if(d){var u=d.__$u;u&&(d.__$u=void 0,u.d())}}e(t)});Dt("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)});lt.prototype.shouldComponentUpdate=function(e,t){if(this.__R)return!0;var n=this.__$u,r=n&&n.s!==void 0;for(var a in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){var i=2&this.__$f;if(!(r||i||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var l in e)if(l!=="__source"&&e[l]!==this.props[l])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};function on(e,t){return Re(function(){return B(e,t)},[])}function Y(e,t){var n=D(e);return n.current=e,rr.__$f|=4,Re(function(){return rn(function(){return n.current()},t)},[])}var Zd=function(e){queueMicrotask(function(){queueMicrotask(e)})};function e_(){Mt(function(){for(var e;e=Ui.shift();)Fi.call(e)})}function Wi(){Ui.push(this)===1&&(Z.requestAnimationFrame||Zd)(e_)}function Gi(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Vi(e){return Gi(e)}function Ki(e){return!(!Gi(e)||e.navigation!==void 0&&!Array.isArray(e.navigation)||e.linkCards!==void 0&&!Array.isArray(e.linkCards))}function t_(e){return`${x.cssPrefix}:${e}`}function ji(e,t){let r=Object.entries(t).map(([a,i])=>{let l=t_(a),s=c=>i(c.detail);return e.addEventListener(l,s),[l,s]});return()=>{for(let[a,i]of r)e.removeEventListener(a,i)}}function or(e,t,n){return e==="page"?"page":e==="standalone"?"standalone":e==="inline"?t==="fullscreen"?"fullscreen":"inline":e==="modal"||e==="drawer"?n?t==="fullscreen"?"fullscreen":e:"closed":n?t==="fullscreen"?"fullscreen":t==="expanded"?"expanded":"open":"closed"}var n_=900;function Io(e,t,n){if(e==="standalone"||e==="page")return"fullscreen";let r=t.initialSize;if(r==="expanded"||r==="fullscreen"||r==="normal")return r;if(r==="auto"){let a=t.autoSizeBreakpoint??n_;return n>=a?"expanded":"normal"}return"normal"}function an(e,t,n,r=null){let i=e.mode==="inline"||e.mode==="standalone"||e.mode==="page"||(n??!e.startMinimized),s=e.mode!=="standalone"&&e.mode!=="page"&&e.mode!=="inline"&&r?r:Io(e.mode,e.size,t);return{panelOpen:i,panelSize:s}}function Ot(){return typeof window>"u"?0:window.innerWidth}var r_="x-public-key",o_="x-ai-agent-deployment-id";function Xi(e){return{headers(){let t={};return e.aiAgentDeploymentId&&(t[o_]=e.aiAgentDeploymentId),e.publicKey&&(t[e.publicKeyHeader??r_]=e.publicKey),t}}}var ar="0.54.1";var qe=class extends Error{constructor(n,r,a,i){super(n);q(this,"code",r);q(this,"status",a);q(this,"cause",i);this.name="StreamError"}};var Yi=J.scope("parser");async function*Lo(e,t){if(!e.ok){let a=await e.text().catch(()=>"");throw new qe(`server responded ${e.status}: ${a.slice(0,200)}`,"server",e.status)}if(!e.body)throw new qe("response has no body","no-body");let n=e.body.pipeThrough(new TextDecoderStream).getReader(),r="";try{for(;;){if(t.aborted)throw new DOMException("aborted","AbortError");let{done:a,value:i}=await n.read();if(a){let s=r.trim();if(s){let c=Ji(s);c&&(yield c)}return}r+=i;let l;for(;(l=r.indexOf(`
7
+ `).replace(/__P__/g,Nd).replaceAll("__BRAND_ACCENT_TEXT__",Od).replaceAll("__BRAND_ACCENT__",Dd).replaceAll("__BRAND_RADIUS__",$d).replaceAll("__BRAND_FONT__",Bd);var Hd=J.scope("mount"),Pi=new WeakMap,xi={floating:"all: initial; position: fixed; z-index: 2147483600;",flow:"all: initial; display: block; position: relative; width: 100%; height: 100%; z-index: 1; contain: size;",viewport:"all: initial; display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1;"};function yi(e,t){e.style.cssText=xi[t]}function Kn(e){return e==="floating"||e==="modal"||e==="drawer"?"floating":e==="standalone"||e==="page"?"viewport":"flow"}function Si(e={}){let t=e.position??"flow";Hd.debug("createShadowMount",{position:t,hasTarget:!!e.target,hasHost:!!e.existingHost});let n=`${x.cssPrefix}-chat-host`;typeof customElements<"u"&&!customElements.get(n)&&customElements.define(n,class extends HTMLElement{});let r;e.existingHost?r=e.existingHost:(r=document.createElement(n),(e.target??document.body).appendChild(r)),r.setAttribute("data-brand",x.id),r.style.cssText=xi[t];let a=r.shadowRoot??r.attachShadow({mode:"open"}),i=r.ownerDocument;if(!zd(a,i)){let s=i.createElement("style");s.textContent=ko,a.appendChild(s)}let l=document.createElement("div");return l.className=`${x.cssPrefix}-app`,a.appendChild(l),{appRoot:l,destroy:()=>r.remove(),hostElement:r,shadowRoot:a}}function zd(e,t){if(!("adoptedStyleSheets"in e))return!1;let n=t.defaultView;if(!n||typeof n.CSSStyleSheet!="function")return!1;let r=Pi.get(t);if(!r)try{r=new n.CSSStyleSheet,r.replaceSync(ko),Pi.set(t,r)}catch{return!1}try{return e.adoptedStyleSheets=[r],!0}catch{return!1}}function Fd(e,t){let n=x.cssPrefix;t.accent&&e.style.setProperty(`--${n}-accent-user`,t.accent),t.accentText&&e.style.setProperty(`--${n}-accent-text-user`,t.accentText),t.radius&&e.style.setProperty(`--${n}-radius`,t.radius),t.fontFamily&&e.style.setProperty(`--${n}-font`,t.fontFamily)}function Ud(e,t){e.dataset.theme=t}function qd(e,t){let n=x.cssPrefix;t.width!==void 0&&e.style.setProperty(`--${n}-panel-w`,t.width),t.height!==void 0&&e.style.setProperty(`--${n}-panel-h`,t.height),t.expanded?.width!==void 0&&e.style.setProperty(`--${n}-expanded-w`,t.expanded.width),t.expanded?.height!==void 0&&e.style.setProperty(`--${n}-expanded-h`,t.expanded.height),t.inset!==void 0&&e.style.setProperty(`--${n}-panel-inset`,t.inset)}function Wd(e,t){e.dataset.position=t}function jn(e,t){e.dataset.mode=t}function wi(e,t){Ud(e,t.themeMode),Fd(e,t.themeOverrides),Wd(e,t.position),qd(e,t.size)}var Lt,pe,Co,ki,en=0,Mi=[],fe=Z,Ci=fe.__b,Ti=fe.__r,Ei=fe.diffed,Ri=fe.__c,Ai=fe.unmount,Ii=fe.__;function Yn(e,t){fe.__h&&fe.__h(pe,e,en||t),en=0;var n=pe.__H||(pe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function A(e){return en=1,Gd(Ni,e)}function Gd(e,t,n){var r=Yn(Lt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ni(void 0,t),function(s){var c=r.__N?r.__N[0]:r.__[0],d=r.t(c,s);c!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=pe,!pe.__f)){var a=function(s,c,d){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(g){return g.__c});if(u.every(function(g){return!g.__N}))return!i||i.call(this,s,c,d);var _=r.__c.props!==s;return u.some(function(g){if(g.__N){var f=g.__[0];g.__=g.__N,g.__N=void 0,f!==g.__[0]&&(_=!0)}}),i&&i.call(this,s,c,d)||_};pe.__f=!0;var i=pe.shouldComponentUpdate,l=pe.componentWillUpdate;pe.componentWillUpdate=function(s,c,d){if(this.__e){var u=i;i=void 0,a(s,c,d),i=u}l&&l.call(this,s,c,d)},pe.shouldComponentUpdate=a}return r.__N||r.__}function E(e,t){var n=Yn(Lt++,3);!fe.__s&&Eo(n.__H,t)&&(n.__=e,n.u=t,pe.__H.__h.push(n))}function ht(e,t){var n=Yn(Lt++,4);!fe.__s&&Eo(n.__H,t)&&(n.__=e,n.u=t,pe.__h.push(n))}function D(e){return en=5,Re(function(){return{current:e}},[])}function Re(e,t){var n=Yn(Lt++,7);return Eo(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function O(e,t){return en=8,Re(function(){return e},t)}function Vd(){for(var e;e=Mi.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Xn),t.__h.some(To),t.__h=[]}catch(n){t.__h=[],fe.__e(n,e.__v)}}}fe.__b=function(e){pe=null,Ci&&Ci(e)},fe.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ii&&Ii(e,t)},fe.__r=function(e){Ti&&Ti(e),Lt=0;var t=(pe=e.__c).__H;t&&(Co===pe?(t.__h=[],pe.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(Xn),t.__h.some(To),t.__h=[],Lt=0)),Co=pe},fe.diffed=function(e){Ei&&Ei(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Mi.push(t)!==1&&ki===fe.requestAnimationFrame||((ki=fe.requestAnimationFrame)||Kd)(Vd)),t.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Co=pe=null},fe.__c=function(e,t){t.some(function(n){try{n.__h.some(Xn),n.__h=n.__h.filter(function(r){return!r.__||To(r)})}catch(r){t.some(function(a){a.__h&&(a.__h=[])}),t=[],fe.__e(r,n.__v)}}),Ri&&Ri(e,t)},fe.unmount=function(e){Ai&&Ai(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(r){try{Xn(r)}catch(a){t=a}}),n.__H=void 0,t&&fe.__e(t,n.__v))};var Li=typeof requestAnimationFrame=="function";function Kd(e){var t,n=function(){clearTimeout(r),Li&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Li&&(t=requestAnimationFrame(n))}function Xn(e){var t=pe,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),pe=t}function To(e){var t=pe;e.__c=e.__(),pe=t}function Eo(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Ni(e,t){return typeof t=="function"?t(e):t}var jd=Symbol.for("preact-signals");function er(){if(tt>1)tt--;else{var e,t=!1;for((function(){var a=Qn;for(Qn=void 0;a!==void 0;)a.S.v===a.v&&(a.S.i=a.i),a=a.o})();tn!==void 0;){var n=tn;for(tn=void 0,Jn++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&$i(n))try{n.c()}catch(a){t||(e=a,t=!0)}n=r}}if(Jn=0,tt--,t)throw e}}function Mt(e){if(tt>0)return e();Ro=++Xd,tt++;try{return e()}finally{er()}}var le=void 0;function nn(e){var t=le;le=void 0;try{return e()}finally{le=t}}var Di,tn=void 0,tt=0,Jn=0,Xd=0,Ro=0,Qn=void 0,Zn=0;function Oi(e){if(le!==void 0){var t=e.n;if(t===void 0||t.t!==le)return t={i:0,S:e,p:le.s,n:void 0,t:le,e:void 0,x:void 0,r:t},le.s!==void 0&&(le.s.n=t),le.s=t,e.n=t,32&le.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=le.s,t.n=void 0,le.s.n=t,le.s=t),t}}function ve(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}ve.prototype.brand=jd;ve.prototype.h=function(){return!0};ve.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n!==void 0?n.e=e:nn(function(){var r;(r=t.W)==null||r.call(t)}))};ve.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&nn(function(){var a;(a=t.Z)==null||a.call(t)}))}};ve.prototype.subscribe=function(e){var t=this;return nt(function(){var n=t.value;nn(function(){return e(n)})},{name:"sub"})};ve.prototype.valueOf=function(){return this.value};ve.prototype.toString=function(){return this.value+""};ve.prototype.toJSON=function(){return this.value};ve.prototype.peek=function(){var e=this;return nn(function(){return e.value})};Object.defineProperty(ve.prototype,"value",{get:function(){var e=Oi(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Jn>100)throw new Error("Cycle detected");(function(n){tt!==0&&Jn===0&&n.l!==Ro&&(n.l=Ro,Qn={S:n,v:n.v,i:n.i,o:Qn})})(this),this.v=e,this.i++,Zn++,tt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{er()}}}});function B(e,t){return new ve(e,t)}function $i(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Bi(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Hi(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function vt(e,t){ve.call(this,void 0,t),this.x=e,this.s=void 0,this.g=Zn-1,this.f=4}vt.prototype=new ve;vt.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Zn))return!0;if(this.g=Zn,this.f|=1,this.i>0&&!$i(this))return this.f&=-2,!0;var e=le;try{Bi(this),le=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return le=e,Hi(this),this.f&=-2,!0};vt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ve.prototype.S.call(this,e)};vt.prototype.U=function(e){if(this.t!==void 0&&(ve.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};vt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(vt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Oi(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function rn(e,t){return new vt(e,t)}function zi(e){var t=e.m;if(e.m=void 0,typeof t=="function"){tt++;var n=le;le=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Ao(e),r}finally{le=n,er()}}}function Ao(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,zi(e)}function Yd(e){if(le!==this)throw new Error("Out-of-order effect");Hi(this),le=e,this.f&=-2,8&this.f&&Ao(this),er()}function Nt(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,Di&&Di.push(this)}Nt.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.m=t)}finally{e()}};Nt.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,zi(this),Bi(this),tt++;var e=le;return le=this,Yd.bind(this,e)};Nt.prototype.N=function(){2&this.f||(this.f|=2,this.u=tn,tn=this)};Nt.prototype.d=function(){this.f|=8,1&this.f||Ao(this)};Nt.prototype.dispose=function(){this.d()};function nt(e,t){var n=new Nt(e,t);try{n.c()}catch(a){throw n.d(),a}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var Fi,rr,tr,Jd=typeof window<"u"&&!!window.__PREACT_SIGNALS_DEVTOOLS__;var Ui=[];nt(function(){Fi=this.N})();function Dt(e,t){Z[e]=t.bind(null,Z[e]||function(){})}function nr(e){if(tr){var t=tr;tr=void 0,t()}tr=e&&e.S()}function qi(e){var t=this,n=e.data,r=on(n);r.value=n;var a=Re(function(){for(var s=t,c=t.__v;c=c.__;)if(c.__c){c.__c.__$f|=4;break}var d=rn(function(){var f=r.value.value;return f===0?0:f===!0?"":f||""}),u=rn(function(){return!Array.isArray(d.value)&&!lo(d.value)}),_=nt(function(){if(this.N=Wi,u.value){var f=d.value;s.__v&&s.__v.__e&&s.__v.__e.nodeType===3&&(s.__v.__e.data=f)}}),g=t.__$u.d;return t.__$u.d=function(){_(),g.call(this)},[u,d]},[]),i=a[0],l=a[1];return i.value?l.peek():l.value}qi.displayName="ReactiveTextNode";Object.defineProperties(ve.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:qi},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}});Dt("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var a in r)if(a!=="children"){var i=r[a];i instanceof ve&&(n||(t.__np=n={}),n[a]=i,r[a]=i.peek())}}e(t)});Dt("__r",function(e,t){if(e(t),t.type!==te){nr();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=(function(a,i){var l;return nt(function(){l=this},{name:i}),l.c=a,l})(function(){var a;Jd&&((a=n.y)==null||a.call(n)),r.__$f|=1,r.setState({})},typeof t.type=="function"?t.type.displayName||t.type.name:""))),rr=r,nr(n)}});Dt("__e",function(e,t,n,r){nr(),rr=void 0,e(t,n,r)});Dt("diffed",function(e,t){nr(),rr=void 0;var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,a=t.props;if(r){var i=n.U;if(i)for(var l in i){var s=i[l];s!==void 0&&!(l in r)&&(s.d(),i[l]=void 0)}else i={},n.U=i;for(var c in r){var d=i[c],u=r[c];d===void 0?(d=Qd(n,c,u,a),i[c]=d):d.o(u,a)}}}e(t)});function Qd(e,t,n,r){var a=t in e&&e.ownerSVGElement===void 0,i=B(n);return{o:function(l,s){i.value=l,r=s},d:nt(function(){this.N=Wi;var l=i.value.value;r[t]!==l&&(r[t]=l,a?e[t]=l:l!=null&&(l!==!1||t[4]==="-")?e.setAttribute(t,l):e.removeAttribute(t))})}}Dt("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var a in r){var i=r[a];i&&i.d()}}}var l=t.__np;if(l){var s=t.props;for(var c in l)s[c]=l[c]}t.__np=void 0}else{var d=t.__c;if(d){var u=d.__$u;u&&(d.__$u=void 0,u.d())}}e(t)});Dt("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)});lt.prototype.shouldComponentUpdate=function(e,t){if(this.__R)return!0;var n=this.__$u,r=n&&n.s!==void 0;for(var a in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){var i=2&this.__$f;if(!(r||i||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var l in e)if(l!=="__source"&&e[l]!==this.props[l])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};function on(e,t){return Re(function(){return B(e,t)},[])}function Y(e,t){var n=D(e);return n.current=e,rr.__$f|=4,Re(function(){return rn(function(){return n.current()},t)},[])}var Zd=function(e){queueMicrotask(function(){queueMicrotask(e)})};function e_(){Mt(function(){for(var e;e=Ui.shift();)Fi.call(e)})}function Wi(){Ui.push(this)===1&&(Z.requestAnimationFrame||Zd)(e_)}function Gi(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Vi(e){return Gi(e)}function Ki(e){return!(!Gi(e)||e.navigation!==void 0&&!Array.isArray(e.navigation)||e.linkCards!==void 0&&!Array.isArray(e.linkCards))}function t_(e){return`${x.cssPrefix}:${e}`}function ji(e,t){let r=Object.entries(t).map(([a,i])=>{let l=t_(a),s=c=>i(c.detail);return e.addEventListener(l,s),[l,s]});return()=>{for(let[a,i]of r)e.removeEventListener(a,i)}}function or(e,t,n){return e==="page"?"page":e==="standalone"?"standalone":e==="inline"?t==="fullscreen"?"fullscreen":"inline":e==="modal"||e==="drawer"?n?t==="fullscreen"?"fullscreen":e:"closed":n?t==="fullscreen"?"fullscreen":t==="expanded"?"expanded":"open":"closed"}var n_=900;function Io(e,t,n){if(e==="standalone"||e==="page")return"fullscreen";let r=t.initialSize;if(r==="expanded"||r==="fullscreen"||r==="normal")return r;if(r==="auto"){let a=t.autoSizeBreakpoint??n_;return n>=a?"expanded":"normal"}return"normal"}function an(e,t,n,r=null){let i=e.mode==="inline"||e.mode==="standalone"||e.mode==="page"||(n??!e.startMinimized),s=e.mode!=="standalone"&&e.mode!=="page"&&e.mode!=="inline"&&r?r:Io(e.mode,e.size,t);return{panelOpen:i,panelSize:s}}function Ot(){return typeof window>"u"?0:window.innerWidth}var r_="x-public-key",o_="x-ai-agent-deployment-id";function Xi(e){return{headers(){let t={};return e.aiAgentDeploymentId&&(t[o_]=e.aiAgentDeploymentId),e.publicKey&&(t[e.publicKeyHeader??r_]=e.publicKey),t}}}var ar="0.54.2";var qe=class extends Error{constructor(n,r,a,i){super(n);q(this,"code",r);q(this,"status",a);q(this,"cause",i);this.name="StreamError"}};var Yi=J.scope("parser");async function*Lo(e,t){if(!e.ok){let a=await e.text().catch(()=>"");throw new qe(`server responded ${e.status}: ${a.slice(0,200)}`,"server",e.status)}if(!e.body)throw new qe("response has no body","no-body");let n=e.body.pipeThrough(new TextDecoderStream).getReader(),r="";try{for(;;){if(t.aborted)throw new DOMException("aborted","AbortError");let{done:a,value:i}=await n.read();if(a){let s=r.trim();if(s){let c=Ji(s);c&&(yield c)}return}r+=i;let l;for(;(l=r.indexOf(`
8
8
 
9
9
  `))!==-1;){let s=r.slice(0,l);r=r.slice(l+2);let c=Ji(s);c&&(yield c)}}}finally{n.releaseLock()}}function Ji(e){let t="",n;for(let r of e.split(`
10
10
  `))if(!(r===""||r.startsWith(":"))){if(r.startsWith("data:")){let a=r.slice(5).replace(/^ /,"");t=t?`${t}