@nlxai/touchpoint-ui 1.2.2-alpha.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.umd.js CHANGED
@@ -38,7 +38,7 @@
38
38
  `).replace(WP,"")}function nd(i,s,c){if(s=Gb(s),Gb(i)!==s&&c)throw Error(t(425))}function rd(){}var hp=null,pp=null;function mp(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var gp=typeof setTimeout=="function"?setTimeout:void 0,HP=typeof clearTimeout=="function"?clearTimeout:void 0,Kb=typeof Promise=="function"?Promise:void 0,$P=typeof queueMicrotask=="function"?queueMicrotask:typeof Kb<"u"?function(i){return Kb.resolve(null).then(i).catch(qP)}:gp;function qP(i){setTimeout(function(){throw i})}function vp(i,s){var c=s,m=0;do{var b=c.nextSibling;if(i.removeChild(c),b&&b.nodeType===8)if(c=b.data,c==="/$"){if(m===0){i.removeChild(b),Dn(s);return}m--}else c!=="$"&&c!=="$?"&&c!=="$!"||m++;c=b}while(c);Dn(s)}function No(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function Jb(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return i;s--}else c==="/$"&&s++}i=i.previousSibling}return null}var ja=Math.random().toString(36).slice(2),Ai="__reactFiber$"+ja,lc="__reactProps$"+ja,to="__reactContainer$"+ja,yp="__reactEvents$"+ja,GP="__reactListeners$"+ja,KP="__reactHandles$"+ja;function Ms(i){var s=i[Ai];if(s)return s;for(var c=i.parentNode;c;){if(s=c[to]||c[Ai]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=Jb(i);i!==null;){if(c=i[Ai])return c;i=Jb(i)}return s}i=c,c=i.parentNode}return null}function cc(i){return i=i[Ai]||i[to],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Fa(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(t(33))}function id(i){return i[lc]||null}var bp=[],Ua=-1;function jo(i){return{current:i}}function jt(i){0>Ua||(i.current=bp[Ua],bp[Ua]=null,Ua--)}function Ot(i,s){Ua++,bp[Ua]=i.current,i.current=s}var Fo={},Fn=jo(Fo),dr=jo(!1),As=Fo;function Ba(i,s){var c=i.type.contextTypes;if(!c)return Fo;var m=i.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===s)return m.__reactInternalMemoizedMaskedChildContext;var b={},k;for(k in c)b[k]=s[k];return m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=b),b}function fr(i){return i=i.childContextTypes,i!=null}function od(){jt(dr),jt(Fn)}function Yb(i,s,c){if(Fn.current!==Fo)throw Error(t(168));Ot(Fn,s),Ot(dr,c)}function Qb(i,s,c){var m=i.stateNode;if(s=s.childContextTypes,typeof m.getChildContext!="function")return c;m=m.getChildContext();for(var b in m)if(!(b in s))throw Error(t(108,tt(i)||"Unknown",b));return de({},c,m)}function sd(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Fo,As=Fn.current,Ot(Fn,i),Ot(dr,dr.current),!0}function Xb(i,s,c){var m=i.stateNode;if(!m)throw Error(t(169));c?(i=Qb(i,s,As),m.__reactInternalMemoizedMergedChildContext=i,jt(dr),jt(Fn),Ot(Fn,i)):jt(dr),Ot(dr,c)}var no=null,ad=!1,kp=!1;function Zb(i){no===null?no=[i]:no.push(i)}function JP(i){ad=!0,Zb(i)}function Uo(){if(!kp&&no!==null){kp=!0;var i=0,s=vt;try{var c=no;for(vt=1;i<c.length;i++){var m=c[i];do m=m(!0);while(m!==null)}no=null,ad=!1}catch(b){throw no!==null&&(no=no.slice(i+1)),jl(ka,Uo),b}finally{vt=s,kp=!1}}return null}var Va=[],za=0,ld=null,cd=0,Vr=[],zr=0,Os=null,ro=1,io="";function Ls(i,s){Va[za++]=cd,Va[za++]=ld,ld=i,cd=s}function e1(i,s,c){Vr[zr++]=ro,Vr[zr++]=io,Vr[zr++]=Os,Os=i;var m=ro;i=io;var b=32-En(m)-1;m&=~(1<<b),c+=1;var k=32-En(s)+b;if(30<k){var E=b-b%5;k=(m&(1<<E)-1).toString(32),m>>=E,b-=E,ro=1<<32-En(s)+b|c<<b|m,io=k+i}else ro=1<<k|c<<b|m,io=i}function wp(i){i.return!==null&&(Ls(i,1),e1(i,1,0))}function Cp(i){for(;i===ld;)ld=Va[--za],Va[za]=null,cd=Va[--za],Va[za]=null;for(;i===Os;)Os=Vr[--zr],Vr[zr]=null,io=Vr[--zr],Vr[zr]=null,ro=Vr[--zr],Vr[zr]=null}var Sr=null,Tr=null,Bt=!1,ci=null;function t1(i,s){var c=qr(5,null,null,0);c.elementType="DELETED",c.stateNode=s,c.return=i,s=i.deletions,s===null?(i.deletions=[c],i.flags|=16):s.push(c)}function n1(i,s){switch(i.tag){case 5:var c=i.type;return s=s.nodeType!==1||c.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Sr=i,Tr=No(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Sr=i,Tr=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=Os!==null?{id:ro,overflow:io}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=qr(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,Sr=i,Tr=null,!0):!1;default:return!1}}function Sp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Tp(i){if(Bt){var s=Tr;if(s){var c=s;if(!n1(i,s)){if(Sp(i))throw Error(t(418));s=No(c.nextSibling);var m=Sr;s&&n1(i,s)?t1(m,c):(i.flags=i.flags&-4097|2,Bt=!1,Sr=i)}}else{if(Sp(i))throw Error(t(418));i.flags=i.flags&-4097|2,Bt=!1,Sr=i}}}function r1(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Sr=i}function ud(i){if(i!==Sr)return!1;if(!Bt)return r1(i),Bt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!mp(i.type,i.memoizedProps)),s&&(s=Tr)){if(Sp(i))throw i1(),Error(t(418));for(;s;)t1(i,s),s=No(s.nextSibling)}if(r1(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(t(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"){if(s===0){Tr=No(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}Tr=null}}else Tr=Sr?No(i.stateNode.nextSibling):null;return!0}function i1(){for(var i=Tr;i;)i=No(i.nextSibling)}function Wa(){Tr=Sr=null,Bt=!1}function _p(i){ci===null?ci=[i]:ci.push(i)}var YP=L.ReactCurrentBatchConfig;function uc(i,s,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(t(309));var m=c.stateNode}if(!m)throw Error(t(147,i));var b=m,k=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===k?s.ref:(s=function(E){var D=b.refs;E===null?delete D[k]:D[k]=E},s._stringRef=k,s)}if(typeof i!="string")throw Error(t(284));if(!c._owner)throw Error(t(290,i))}return i}function dd(i,s){throw i=Object.prototype.toString.call(s),Error(t(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function o1(i){var s=i._init;return s(i._payload)}function s1(i){function s(Z,W){if(i){var ie=Z.deletions;ie===null?(Z.deletions=[W],Z.flags|=16):ie.push(W)}}function c(Z,W){if(!i)return null;for(;W!==null;)s(Z,W),W=W.sibling;return null}function m(Z,W){for(Z=new Map;W!==null;)W.key!==null?Z.set(W.key,W):Z.set(W.index,W),W=W.sibling;return Z}function b(Z,W){return Z=Go(Z,W),Z.index=0,Z.sibling=null,Z}function k(Z,W,ie){return Z.index=ie,i?(ie=Z.alternate,ie!==null?(ie=ie.index,ie<W?(Z.flags|=2,W):ie):(Z.flags|=2,W)):(Z.flags|=1048576,W)}function E(Z){return i&&Z.alternate===null&&(Z.flags|=2),Z}function D(Z,W,ie,Ee){return W===null||W.tag!==6?(W=gm(ie,Z.mode,Ee),W.return=Z,W):(W=b(W,ie),W.return=Z,W)}function V(Z,W,ie,Ee){var He=ie.type;return He===se?we(Z,W,ie.props.children,Ee,ie.key):W!==null&&(W.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===Ie&&o1(He)===W.type)?(Ee=b(W,ie.props),Ee.ref=uc(Z,W,ie),Ee.return=Z,Ee):(Ee=Dd(ie.type,ie.key,ie.props,null,Z.mode,Ee),Ee.ref=uc(Z,W,ie),Ee.return=Z,Ee)}function ae(Z,W,ie,Ee){return W===null||W.tag!==4||W.stateNode.containerInfo!==ie.containerInfo||W.stateNode.implementation!==ie.implementation?(W=vm(ie,Z.mode,Ee),W.return=Z,W):(W=b(W,ie.children||[]),W.return=Z,W)}function we(Z,W,ie,Ee,He){return W===null||W.tag!==7?(W=zs(ie,Z.mode,Ee,He),W.return=Z,W):(W=b(W,ie),W.return=Z,W)}function Te(Z,W,ie){if(typeof W=="string"&&W!==""||typeof W=="number")return W=gm(""+W,Z.mode,ie),W.return=Z,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case F:return ie=Dd(W.type,W.key,W.props,null,Z.mode,ie),ie.ref=uc(Z,null,W),ie.return=Z,ie;case G:return W=vm(W,Z.mode,ie),W.return=Z,W;case Ie:var Ee=W._init;return Te(Z,Ee(W._payload),ie)}if(Gi(W)||_e(W))return W=zs(W,Z.mode,ie,null),W.return=Z,W;dd(Z,W)}return null}function ke(Z,W,ie,Ee){var He=W!==null?W.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number")return He!==null?null:D(Z,W,""+ie,Ee);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case F:return ie.key===He?V(Z,W,ie,Ee):null;case G:return ie.key===He?ae(Z,W,ie,Ee):null;case Ie:return He=ie._init,ke(Z,W,He(ie._payload),Ee)}if(Gi(ie)||_e(ie))return He!==null?null:we(Z,W,ie,Ee,null);dd(Z,ie)}return null}function je(Z,W,ie,Ee,He){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number")return Z=Z.get(ie)||null,D(W,Z,""+Ee,He);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case F:return Z=Z.get(Ee.key===null?ie:Ee.key)||null,V(W,Z,Ee,He);case G:return Z=Z.get(Ee.key===null?ie:Ee.key)||null,ae(W,Z,Ee,He);case Ie:var Ye=Ee._init;return je(Z,W,ie,Ye(Ee._payload),He)}if(Gi(Ee)||_e(Ee))return Z=Z.get(ie)||null,we(W,Z,Ee,He,null);dd(W,Ee)}return null}function Be(Z,W,ie,Ee){for(var He=null,Ye=null,Qe=W,rt=W=0,kn=null;Qe!==null&&rt<ie.length;rt++){Qe.index>rt?(kn=Qe,Qe=null):kn=Qe.sibling;var kt=ke(Z,Qe,ie[rt],Ee);if(kt===null){Qe===null&&(Qe=kn);break}i&&Qe&&kt.alternate===null&&s(Z,Qe),W=k(kt,W,rt),Ye===null?He=kt:Ye.sibling=kt,Ye=kt,Qe=kn}if(rt===ie.length)return c(Z,Qe),Bt&&Ls(Z,rt),He;if(Qe===null){for(;rt<ie.length;rt++)Qe=Te(Z,ie[rt],Ee),Qe!==null&&(W=k(Qe,W,rt),Ye===null?He=Qe:Ye.sibling=Qe,Ye=Qe);return Bt&&Ls(Z,rt),He}for(Qe=m(Z,Qe);rt<ie.length;rt++)kn=je(Qe,Z,rt,ie[rt],Ee),kn!==null&&(i&&kn.alternate!==null&&Qe.delete(kn.key===null?rt:kn.key),W=k(kn,W,rt),Ye===null?He=kn:Ye.sibling=kn,Ye=kn);return i&&Qe.forEach(function(Ko){return s(Z,Ko)}),Bt&&Ls(Z,rt),He}function ze(Z,W,ie,Ee){var He=_e(ie);if(typeof He!="function")throw Error(t(150));if(ie=He.call(ie),ie==null)throw Error(t(151));for(var Ye=He=null,Qe=W,rt=W=0,kn=null,kt=ie.next();Qe!==null&&!kt.done;rt++,kt=ie.next()){Qe.index>rt?(kn=Qe,Qe=null):kn=Qe.sibling;var Ko=ke(Z,Qe,kt.value,Ee);if(Ko===null){Qe===null&&(Qe=kn);break}i&&Qe&&Ko.alternate===null&&s(Z,Qe),W=k(Ko,W,rt),Ye===null?He=Ko:Ye.sibling=Ko,Ye=Ko,Qe=kn}if(kt.done)return c(Z,Qe),Bt&&Ls(Z,rt),He;if(Qe===null){for(;!kt.done;rt++,kt=ie.next())kt=Te(Z,kt.value,Ee),kt!==null&&(W=k(kt,W,rt),Ye===null?He=kt:Ye.sibling=kt,Ye=kt);return Bt&&Ls(Z,rt),He}for(Qe=m(Z,Qe);!kt.done;rt++,kt=ie.next())kt=je(Qe,Z,rt,kt.value,Ee),kt!==null&&(i&&kt.alternate!==null&&Qe.delete(kt.key===null?rt:kt.key),W=k(kt,W,rt),Ye===null?He=kt:Ye.sibling=kt,Ye=kt);return i&&Qe.forEach(function(RR){return s(Z,RR)}),Bt&&Ls(Z,rt),He}function nn(Z,W,ie,Ee){if(typeof ie=="object"&&ie!==null&&ie.type===se&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case F:e:{for(var He=ie.key,Ye=W;Ye!==null;){if(Ye.key===He){if(He=ie.type,He===se){if(Ye.tag===7){c(Z,Ye.sibling),W=b(Ye,ie.props.children),W.return=Z,Z=W;break e}}else if(Ye.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===Ie&&o1(He)===Ye.type){c(Z,Ye.sibling),W=b(Ye,ie.props),W.ref=uc(Z,Ye,ie),W.return=Z,Z=W;break e}c(Z,Ye);break}else s(Z,Ye);Ye=Ye.sibling}ie.type===se?(W=zs(ie.props.children,Z.mode,Ee,ie.key),W.return=Z,Z=W):(Ee=Dd(ie.type,ie.key,ie.props,null,Z.mode,Ee),Ee.ref=uc(Z,W,ie),Ee.return=Z,Z=Ee)}return E(Z);case G:e:{for(Ye=ie.key;W!==null;){if(W.key===Ye)if(W.tag===4&&W.stateNode.containerInfo===ie.containerInfo&&W.stateNode.implementation===ie.implementation){c(Z,W.sibling),W=b(W,ie.children||[]),W.return=Z,Z=W;break e}else{c(Z,W);break}else s(Z,W);W=W.sibling}W=vm(ie,Z.mode,Ee),W.return=Z,Z=W}return E(Z);case Ie:return Ye=ie._init,nn(Z,W,Ye(ie._payload),Ee)}if(Gi(ie))return Be(Z,W,ie,Ee);if(_e(ie))return ze(Z,W,ie,Ee);dd(Z,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"?(ie=""+ie,W!==null&&W.tag===6?(c(Z,W.sibling),W=b(W,ie),W.return=Z,Z=W):(c(Z,W),W=gm(ie,Z.mode,Ee),W.return=Z,Z=W),E(Z)):c(Z,W)}return nn}var Ha=s1(!0),a1=s1(!1),fd=jo(null),hd=null,$a=null,xp=null;function Ep(){xp=$a=hd=null}function Pp(i){var s=fd.current;jt(fd),i._currentValue=s}function Rp(i,s,c){for(;i!==null;){var m=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),i===c)break;i=i.return}}function qa(i,s){hd=i,xp=$a=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(hr=!0),i.firstContext=null)}function Wr(i){var s=i._currentValue;if(xp!==i)if(i={context:i,memoizedValue:s,next:null},$a===null){if(hd===null)throw Error(t(308));$a=i,hd.dependencies={lanes:0,firstContext:i}}else $a=$a.next=i;return s}var Ds=null;function Ip(i){Ds===null?Ds=[i]:Ds.push(i)}function l1(i,s,c,m){var b=s.interleaved;return b===null?(c.next=c,Ip(s)):(c.next=b.next,b.next=c),s.interleaved=c,oo(i,m)}function oo(i,s){i.lanes|=s;var c=i.alternate;for(c!==null&&(c.lanes|=s),c=i,i=i.return;i!==null;)i.childLanes|=s,c=i.alternate,c!==null&&(c.childLanes|=s),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Bo=!1;function Mp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function c1(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function so(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Vo(i,s,c){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,(bt&2)!==0){var b=m.pending;return b===null?s.next=s:(s.next=b.next,b.next=s),m.pending=s,oo(i,c)}return b=m.interleaved,b===null?(s.next=s,Ip(m)):(s.next=b.next,b.next=s),m.interleaved=s,oo(i,c)}function pd(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var m=s.lanes;m&=i.pendingLanes,c|=m,s.lanes=c,ps(i,c)}}function u1(i,s){var c=i.updateQueue,m=i.alternate;if(m!==null&&(m=m.updateQueue,c===m)){var b=null,k=null;if(c=c.firstBaseUpdate,c!==null){do{var E={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};k===null?b=k=E:k=k.next=E,c=c.next}while(c!==null);k===null?b=k=s:k=k.next=s}else b=k=s;c={baseState:m.baseState,firstBaseUpdate:b,lastBaseUpdate:k,shared:m.shared,effects:m.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}function md(i,s,c,m){var b=i.updateQueue;Bo=!1;var k=b.firstBaseUpdate,E=b.lastBaseUpdate,D=b.shared.pending;if(D!==null){b.shared.pending=null;var V=D,ae=V.next;V.next=null,E===null?k=ae:E.next=ae,E=V;var we=i.alternate;we!==null&&(we=we.updateQueue,D=we.lastBaseUpdate,D!==E&&(D===null?we.firstBaseUpdate=ae:D.next=ae,we.lastBaseUpdate=V))}if(k!==null){var Te=b.baseState;E=0,we=ae=V=null,D=k;do{var ke=D.lane,je=D.eventTime;if((m&ke)===ke){we!==null&&(we=we.next={eventTime:je,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var Be=i,ze=D;switch(ke=s,je=c,ze.tag){case 1:if(Be=ze.payload,typeof Be=="function"){Te=Be.call(je,Te,ke);break e}Te=Be;break e;case 3:Be.flags=Be.flags&-65537|128;case 0:if(Be=ze.payload,ke=typeof Be=="function"?Be.call(je,Te,ke):Be,ke==null)break e;Te=de({},Te,ke);break e;case 2:Bo=!0}}D.callback!==null&&D.lane!==0&&(i.flags|=64,ke=b.effects,ke===null?b.effects=[D]:ke.push(D))}else je={eventTime:je,lane:ke,tag:D.tag,payload:D.payload,callback:D.callback,next:null},we===null?(ae=we=je,V=Te):we=we.next=je,E|=ke;if(D=D.next,D===null){if(D=b.shared.pending,D===null)break;ke=D,D=ke.next,ke.next=null,b.lastBaseUpdate=ke,b.shared.pending=null}}while(!0);if(we===null&&(V=Te),b.baseState=V,b.firstBaseUpdate=ae,b.lastBaseUpdate=we,s=b.shared.interleaved,s!==null){b=s;do E|=b.lane,b=b.next;while(b!==s)}else k===null&&(b.shared.lanes=0);Fs|=E,i.lanes=E,i.memoizedState=Te}}function d1(i,s,c){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var m=i[s],b=m.callback;if(b!==null){if(m.callback=null,m=c,typeof b!="function")throw Error(t(191,b));b.call(m)}}}var dc={},Oi=jo(dc),fc=jo(dc),hc=jo(dc);function Ns(i){if(i===dc)throw Error(t(174));return i}function Ap(i,s){switch(Ot(hc,s),Ot(fc,i),Ot(Oi,dc),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:M(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=M(s,i)}jt(Oi),Ot(Oi,s)}function Ga(){jt(Oi),jt(fc),jt(hc)}function f1(i){Ns(hc.current);var s=Ns(Oi.current),c=M(s,i.type);s!==c&&(Ot(fc,i),Ot(Oi,c))}function Op(i){fc.current===i&&(jt(Oi),jt(fc))}var Ht=jo(0);function gd(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Lp=[];function Dp(){for(var i=0;i<Lp.length;i++)Lp[i]._workInProgressVersionPrimary=null;Lp.length=0}var vd=L.ReactCurrentDispatcher,Np=L.ReactCurrentBatchConfig,js=0,$t=null,hn=null,yn=null,yd=!1,pc=!1,mc=0,QP=0;function Un(){throw Error(t(321))}function jp(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!ur(i[c],s[c]))return!1;return!0}function Fp(i,s,c,m,b,k){if(js=k,$t=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,vd.current=i===null||i.memoizedState===null?tR:nR,i=c(m,b),pc){k=0;do{if(pc=!1,mc=0,25<=k)throw Error(t(301));k+=1,yn=hn=null,s.updateQueue=null,vd.current=rR,i=c(m,b)}while(pc)}if(vd.current=wd,s=hn!==null&&hn.next!==null,js=0,yn=hn=$t=null,yd=!1,s)throw Error(t(300));return i}function Up(){var i=mc!==0;return mc=0,i}function Li(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yn===null?$t.memoizedState=yn=i:yn=yn.next=i,yn}function Hr(){if(hn===null){var i=$t.alternate;i=i!==null?i.memoizedState:null}else i=hn.next;var s=yn===null?$t.memoizedState:yn.next;if(s!==null)yn=s,hn=i;else{if(i===null)throw Error(t(310));hn=i,i={memoizedState:hn.memoizedState,baseState:hn.baseState,baseQueue:hn.baseQueue,queue:hn.queue,next:null},yn===null?$t.memoizedState=yn=i:yn=yn.next=i}return yn}function gc(i,s){return typeof s=="function"?s(i):s}function Bp(i){var s=Hr(),c=s.queue;if(c===null)throw Error(t(311));c.lastRenderedReducer=i;var m=hn,b=m.baseQueue,k=c.pending;if(k!==null){if(b!==null){var E=b.next;b.next=k.next,k.next=E}m.baseQueue=b=k,c.pending=null}if(b!==null){k=b.next,m=m.baseState;var D=E=null,V=null,ae=k;do{var we=ae.lane;if((js&we)===we)V!==null&&(V=V.next={lane:0,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),m=ae.hasEagerState?ae.eagerState:i(m,ae.action);else{var Te={lane:we,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null};V===null?(D=V=Te,E=m):V=V.next=Te,$t.lanes|=we,Fs|=we}ae=ae.next}while(ae!==null&&ae!==k);V===null?E=m:V.next=D,ur(m,s.memoizedState)||(hr=!0),s.memoizedState=m,s.baseState=E,s.baseQueue=V,c.lastRenderedState=m}if(i=c.interleaved,i!==null){b=i;do k=b.lane,$t.lanes|=k,Fs|=k,b=b.next;while(b!==i)}else b===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Vp(i){var s=Hr(),c=s.queue;if(c===null)throw Error(t(311));c.lastRenderedReducer=i;var m=c.dispatch,b=c.pending,k=s.memoizedState;if(b!==null){c.pending=null;var E=b=b.next;do k=i(k,E.action),E=E.next;while(E!==b);ur(k,s.memoizedState)||(hr=!0),s.memoizedState=k,s.baseQueue===null&&(s.baseState=k),c.lastRenderedState=k}return[k,m]}function h1(){}function p1(i,s){var c=$t,m=Hr(),b=s(),k=!ur(m.memoizedState,b);if(k&&(m.memoizedState=b,hr=!0),m=m.queue,zp(v1.bind(null,c,m,i),[i]),m.getSnapshot!==s||k||yn!==null&&yn.memoizedState.tag&1){if(c.flags|=2048,vc(9,g1.bind(null,c,m,b,s),void 0,null),bn===null)throw Error(t(349));(js&30)!==0||m1(c,s,b)}return b}function m1(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=$t.updateQueue,s===null?(s={lastEffect:null,stores:null},$t.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function g1(i,s,c,m){s.value=c,s.getSnapshot=m,y1(s)&&b1(i)}function v1(i,s,c){return c(function(){y1(s)&&b1(i)})}function y1(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!ur(i,c)}catch{return!0}}function b1(i){var s=oo(i,1);s!==null&&hi(s,i,1,-1)}function k1(i){var s=Li();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gc,lastRenderedState:i},s.queue=i,i=i.dispatch=eR.bind(null,$t,i),[s.memoizedState,i]}function vc(i,s,c,m){return i={tag:i,create:s,destroy:c,deps:m,next:null},s=$t.updateQueue,s===null?(s={lastEffect:null,stores:null},$t.updateQueue=s,s.lastEffect=i.next=i):(c=s.lastEffect,c===null?s.lastEffect=i.next=i:(m=c.next,c.next=i,i.next=m,s.lastEffect=i)),i}function w1(){return Hr().memoizedState}function bd(i,s,c,m){var b=Li();$t.flags|=i,b.memoizedState=vc(1|s,c,void 0,m===void 0?null:m)}function kd(i,s,c,m){var b=Hr();m=m===void 0?null:m;var k=void 0;if(hn!==null){var E=hn.memoizedState;if(k=E.destroy,m!==null&&jp(m,E.deps)){b.memoizedState=vc(s,c,k,m);return}}$t.flags|=i,b.memoizedState=vc(1|s,c,k,m)}function C1(i,s){return bd(8390656,8,i,s)}function zp(i,s){return kd(2048,8,i,s)}function S1(i,s){return kd(4,2,i,s)}function T1(i,s){return kd(4,4,i,s)}function _1(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function x1(i,s,c){return c=c!=null?c.concat([i]):null,kd(4,4,_1.bind(null,s,i),c)}function Wp(){}function E1(i,s){var c=Hr();s=s===void 0?null:s;var m=c.memoizedState;return m!==null&&s!==null&&jp(s,m[1])?m[0]:(c.memoizedState=[i,s],i)}function P1(i,s){var c=Hr();s=s===void 0?null:s;var m=c.memoizedState;return m!==null&&s!==null&&jp(s,m[1])?m[0]:(i=i(),c.memoizedState=[i,s],i)}function R1(i,s,c){return(js&21)===0?(i.baseState&&(i.baseState=!1,hr=!0),i.memoizedState=c):(ur(c,s)||(c=Bl(),$t.lanes|=c,Fs|=c,i.baseState=!0),s)}function XP(i,s){var c=vt;vt=c!==0&&4>c?c:4,i(!0);var m=Np.transition;Np.transition={};try{i(!1),s()}finally{vt=c,Np.transition=m}}function I1(){return Hr().memoizedState}function ZP(i,s,c){var m=$o(i);if(c={lane:m,action:c,hasEagerState:!1,eagerState:null,next:null},M1(i))A1(s,c);else if(c=l1(i,s,c,m),c!==null){var b=nr();hi(c,i,m,b),O1(c,s,m)}}function eR(i,s,c){var m=$o(i),b={lane:m,action:c,hasEagerState:!1,eagerState:null,next:null};if(M1(i))A1(s,b);else{var k=i.alternate;if(i.lanes===0&&(k===null||k.lanes===0)&&(k=s.lastRenderedReducer,k!==null))try{var E=s.lastRenderedState,D=k(E,c);if(b.hasEagerState=!0,b.eagerState=D,ur(D,E)){var V=s.interleaved;V===null?(b.next=b,Ip(s)):(b.next=V.next,V.next=b),s.interleaved=b;return}}catch{}finally{}c=l1(i,s,b,m),c!==null&&(b=nr(),hi(c,i,m,b),O1(c,s,m))}}function M1(i){var s=i.alternate;return i===$t||s!==null&&s===$t}function A1(i,s){pc=yd=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function O1(i,s,c){if((c&4194240)!==0){var m=s.lanes;m&=i.pendingLanes,c|=m,s.lanes=c,ps(i,c)}}var wd={readContext:Wr,useCallback:Un,useContext:Un,useEffect:Un,useImperativeHandle:Un,useInsertionEffect:Un,useLayoutEffect:Un,useMemo:Un,useReducer:Un,useRef:Un,useState:Un,useDebugValue:Un,useDeferredValue:Un,useTransition:Un,useMutableSource:Un,useSyncExternalStore:Un,useId:Un,unstable_isNewReconciler:!1},tR={readContext:Wr,useCallback:function(i,s){return Li().memoizedState=[i,s===void 0?null:s],i},useContext:Wr,useEffect:C1,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,bd(4194308,4,_1.bind(null,s,i),c)},useLayoutEffect:function(i,s){return bd(4194308,4,i,s)},useInsertionEffect:function(i,s){return bd(4,2,i,s)},useMemo:function(i,s){var c=Li();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var m=Li();return s=c!==void 0?c(s):s,m.memoizedState=m.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},m.queue=i,i=i.dispatch=ZP.bind(null,$t,i),[m.memoizedState,i]},useRef:function(i){var s=Li();return i={current:i},s.memoizedState=i},useState:k1,useDebugValue:Wp,useDeferredValue:function(i){return Li().memoizedState=i},useTransition:function(){var i=k1(!1),s=i[0];return i=XP.bind(null,i[1]),Li().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var m=$t,b=Li();if(Bt){if(c===void 0)throw Error(t(407));c=c()}else{if(c=s(),bn===null)throw Error(t(349));(js&30)!==0||m1(m,s,c)}b.memoizedState=c;var k={value:c,getSnapshot:s};return b.queue=k,C1(v1.bind(null,m,k,i),[i]),m.flags|=2048,vc(9,g1.bind(null,m,k,c,s),void 0,null),c},useId:function(){var i=Li(),s=bn.identifierPrefix;if(Bt){var c=io,m=ro;c=(m&~(1<<32-En(m)-1)).toString(32)+c,s=":"+s+"R"+c,c=mc++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=QP++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},nR={readContext:Wr,useCallback:E1,useContext:Wr,useEffect:zp,useImperativeHandle:x1,useInsertionEffect:S1,useLayoutEffect:T1,useMemo:P1,useReducer:Bp,useRef:w1,useState:function(){return Bp(gc)},useDebugValue:Wp,useDeferredValue:function(i){var s=Hr();return R1(s,hn.memoizedState,i)},useTransition:function(){var i=Bp(gc)[0],s=Hr().memoizedState;return[i,s]},useMutableSource:h1,useSyncExternalStore:p1,useId:I1,unstable_isNewReconciler:!1},rR={readContext:Wr,useCallback:E1,useContext:Wr,useEffect:zp,useImperativeHandle:x1,useInsertionEffect:S1,useLayoutEffect:T1,useMemo:P1,useReducer:Vp,useRef:w1,useState:function(){return Vp(gc)},useDebugValue:Wp,useDeferredValue:function(i){var s=Hr();return hn===null?s.memoizedState=i:R1(s,hn.memoizedState,i)},useTransition:function(){var i=Vp(gc)[0],s=Hr().memoizedState;return[i,s]},useMutableSource:h1,useSyncExternalStore:p1,useId:I1,unstable_isNewReconciler:!1};function ui(i,s){if(i&&i.defaultProps){s=de({},s),i=i.defaultProps;for(var c in i)s[c]===void 0&&(s[c]=i[c]);return s}return s}function Hp(i,s,c,m){s=i.memoizedState,c=c(m,s),c=c==null?s:de({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var Cd={isMounted:function(i){return(i=i._reactInternals)?Si(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var m=nr(),b=$o(i),k=so(m,b);k.payload=s,c!=null&&(k.callback=c),s=Vo(i,k,b),s!==null&&(hi(s,i,b,m),pd(s,i,b))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var m=nr(),b=$o(i),k=so(m,b);k.tag=1,k.payload=s,c!=null&&(k.callback=c),s=Vo(i,k,b),s!==null&&(hi(s,i,b,m),pd(s,i,b))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=nr(),m=$o(i),b=so(c,m);b.tag=2,s!=null&&(b.callback=s),s=Vo(i,b,m),s!==null&&(hi(s,i,m,c),pd(s,i,m))}};function L1(i,s,c,m,b,k,E){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(m,k,E):s.prototype&&s.prototype.isPureReactComponent?!Do(c,m)||!Do(b,k):!0}function D1(i,s,c){var m=!1,b=Fo,k=s.contextType;return typeof k=="object"&&k!==null?k=Wr(k):(b=fr(s)?As:Fn.current,m=s.contextTypes,k=(m=m!=null)?Ba(i,b):Fo),s=new s(c,k),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Cd,i.stateNode=s,s._reactInternals=i,m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=b,i.__reactInternalMemoizedMaskedChildContext=k),s}function N1(i,s,c,m){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,m),s.state!==i&&Cd.enqueueReplaceState(s,s.state,null)}function $p(i,s,c,m){var b=i.stateNode;b.props=c,b.state=i.memoizedState,b.refs={},Mp(i);var k=s.contextType;typeof k=="object"&&k!==null?b.context=Wr(k):(k=fr(s)?As:Fn.current,b.context=Ba(i,k)),b.state=i.memoizedState,k=s.getDerivedStateFromProps,typeof k=="function"&&(Hp(i,s,k,c),b.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(s=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),s!==b.state&&Cd.enqueueReplaceState(b,b.state,null),md(i,c,b,m),b.state=i.memoizedState),typeof b.componentDidMount=="function"&&(i.flags|=4194308)}function Ka(i,s){try{var c="",m=s;do c+=Xe(m),m=m.return;while(m);var b=c}catch(k){b=`
39
39
  Error generating stack: `+k.message+`
40
40
  `+k.stack}return{value:i,source:s,stack:b,digest:null}}function qp(i,s,c){return{value:i,source:null,stack:c??null,digest:s??null}}function Gp(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var iR=typeof WeakMap=="function"?WeakMap:Map;function j1(i,s,c){c=so(-1,c),c.tag=3,c.payload={element:null};var m=s.value;return c.callback=function(){Rd||(Rd=!0,lm=m),Gp(i,s)},c}function F1(i,s,c){c=so(-1,c),c.tag=3;var m=i.type.getDerivedStateFromError;if(typeof m=="function"){var b=s.value;c.payload=function(){return m(b)},c.callback=function(){Gp(i,s)}}var k=i.stateNode;return k!==null&&typeof k.componentDidCatch=="function"&&(c.callback=function(){Gp(i,s),typeof m!="function"&&(Wo===null?Wo=new Set([this]):Wo.add(this));var E=s.stack;this.componentDidCatch(s.value,{componentStack:E!==null?E:""})}),c}function U1(i,s,c){var m=i.pingCache;if(m===null){m=i.pingCache=new iR;var b=new Set;m.set(s,b)}else b=m.get(s),b===void 0&&(b=new Set,m.set(s,b));b.has(c)||(b.add(c),i=yR.bind(null,i,s,c),s.then(i,i))}function B1(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function V1(i,s,c,m,b){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=so(-1,1),s.tag=2,Vo(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=b,i)}var oR=L.ReactCurrentOwner,hr=!1;function tr(i,s,c,m){s.child=i===null?a1(s,null,c,m):Ha(s,i.child,c,m)}function z1(i,s,c,m,b){c=c.render;var k=s.ref;return qa(s,b),m=Fp(i,s,c,m,k,b),c=Up(),i!==null&&!hr?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~b,ao(i,s,b)):(Bt&&c&&wp(s),s.flags|=1,tr(i,s,m,b),s.child)}function W1(i,s,c,m,b){if(i===null){var k=c.type;return typeof k=="function"&&!mm(k)&&k.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=k,H1(i,s,k,m,b)):(i=Dd(c.type,null,m,s,s.mode,b),i.ref=s.ref,i.return=s,s.child=i)}if(k=i.child,(i.lanes&b)===0){var E=k.memoizedProps;if(c=c.compare,c=c!==null?c:Do,c(E,m)&&i.ref===s.ref)return ao(i,s,b)}return s.flags|=1,i=Go(k,m),i.ref=s.ref,i.return=s,s.child=i}function H1(i,s,c,m,b){if(i!==null){var k=i.memoizedProps;if(Do(k,m)&&i.ref===s.ref)if(hr=!1,s.pendingProps=m=k,(i.lanes&b)!==0)(i.flags&131072)!==0&&(hr=!0);else return s.lanes=i.lanes,ao(i,s,b)}return Kp(i,s,c,m,b)}function $1(i,s,c){var m=s.pendingProps,b=m.children,k=i!==null?i.memoizedState:null;if(m.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ot(Ya,_r),_r|=c;else{if((c&1073741824)===0)return i=k!==null?k.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,Ot(Ya,_r),_r|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=k!==null?k.baseLanes:c,Ot(Ya,_r),_r|=m}else k!==null?(m=k.baseLanes|c,s.memoizedState=null):m=c,Ot(Ya,_r),_r|=m;return tr(i,s,b,c),s.child}function q1(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Kp(i,s,c,m,b){var k=fr(c)?As:Fn.current;return k=Ba(s,k),qa(s,b),c=Fp(i,s,c,m,k,b),m=Up(),i!==null&&!hr?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~b,ao(i,s,b)):(Bt&&m&&wp(s),s.flags|=1,tr(i,s,c,b),s.child)}function G1(i,s,c,m,b){if(fr(c)){var k=!0;sd(s)}else k=!1;if(qa(s,b),s.stateNode===null)Td(i,s),D1(s,c,m),$p(s,c,m,b),m=!0;else if(i===null){var E=s.stateNode,D=s.memoizedProps;E.props=D;var V=E.context,ae=c.contextType;typeof ae=="object"&&ae!==null?ae=Wr(ae):(ae=fr(c)?As:Fn.current,ae=Ba(s,ae));var we=c.getDerivedStateFromProps,Te=typeof we=="function"||typeof E.getSnapshotBeforeUpdate=="function";Te||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(D!==m||V!==ae)&&N1(s,E,m,ae),Bo=!1;var ke=s.memoizedState;E.state=ke,md(s,m,E,b),V=s.memoizedState,D!==m||ke!==V||dr.current||Bo?(typeof we=="function"&&(Hp(s,c,we,m),V=s.memoizedState),(D=Bo||L1(s,c,D,m,ke,V,ae))?(Te||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(s.flags|=4194308)):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=V),E.props=m,E.state=V,E.context=ae,m=D):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{E=s.stateNode,c1(i,s),D=s.memoizedProps,ae=s.type===s.elementType?D:ui(s.type,D),E.props=ae,Te=s.pendingProps,ke=E.context,V=c.contextType,typeof V=="object"&&V!==null?V=Wr(V):(V=fr(c)?As:Fn.current,V=Ba(s,V));var je=c.getDerivedStateFromProps;(we=typeof je=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(D!==Te||ke!==V)&&N1(s,E,m,V),Bo=!1,ke=s.memoizedState,E.state=ke,md(s,m,E,b);var Be=s.memoizedState;D!==Te||ke!==Be||dr.current||Bo?(typeof je=="function"&&(Hp(s,c,je,m),Be=s.memoizedState),(ae=Bo||L1(s,c,ae,m,ke,Be,V)||!1)?(we||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(m,Be,V),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(m,Be,V)),typeof E.componentDidUpdate=="function"&&(s.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof E.componentDidUpdate!="function"||D===i.memoizedProps&&ke===i.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&ke===i.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=Be),E.props=m,E.state=Be,E.context=V,m=ae):(typeof E.componentDidUpdate!="function"||D===i.memoizedProps&&ke===i.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&ke===i.memoizedState||(s.flags|=1024),m=!1)}return Jp(i,s,c,m,k,b)}function Jp(i,s,c,m,b,k){q1(i,s);var E=(s.flags&128)!==0;if(!m&&!E)return b&&Xb(s,c,!1),ao(i,s,k);m=s.stateNode,oR.current=s;var D=E&&typeof c.getDerivedStateFromError!="function"?null:m.render();return s.flags|=1,i!==null&&E?(s.child=Ha(s,i.child,null,k),s.child=Ha(s,null,D,k)):tr(i,s,D,k),s.memoizedState=m.state,b&&Xb(s,c,!0),s.child}function K1(i){var s=i.stateNode;s.pendingContext?Yb(i,s.pendingContext,s.pendingContext!==s.context):s.context&&Yb(i,s.context,!1),Ap(i,s.containerInfo)}function J1(i,s,c,m,b){return Wa(),_p(b),s.flags|=256,tr(i,s,c,m),s.child}var Yp={dehydrated:null,treeContext:null,retryLane:0};function Qp(i){return{baseLanes:i,cachePool:null,transitions:null}}function Y1(i,s,c){var m=s.pendingProps,b=Ht.current,k=!1,E=(s.flags&128)!==0,D;if((D=E)||(D=i!==null&&i.memoizedState===null?!1:(b&2)!==0),D?(k=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(b|=1),Ot(Ht,b&1),i===null)return Tp(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(E=m.children,i=m.fallback,k?(m=s.mode,k=s.child,E={mode:"hidden",children:E},(m&1)===0&&k!==null?(k.childLanes=0,k.pendingProps=E):k=Nd(E,m,0,null),i=zs(i,m,c,null),k.return=s,i.return=s,k.sibling=i,s.child=k,s.child.memoizedState=Qp(c),s.memoizedState=Yp,i):Xp(s,E));if(b=i.memoizedState,b!==null&&(D=b.dehydrated,D!==null))return sR(i,s,E,m,D,b,c);if(k){k=m.fallback,E=s.mode,b=i.child,D=b.sibling;var V={mode:"hidden",children:m.children};return(E&1)===0&&s.child!==b?(m=s.child,m.childLanes=0,m.pendingProps=V,s.deletions=null):(m=Go(b,V),m.subtreeFlags=b.subtreeFlags&14680064),D!==null?k=Go(D,k):(k=zs(k,E,c,null),k.flags|=2),k.return=s,m.return=s,m.sibling=k,s.child=m,m=k,k=s.child,E=i.child.memoizedState,E=E===null?Qp(c):{baseLanes:E.baseLanes|c,cachePool:null,transitions:E.transitions},k.memoizedState=E,k.childLanes=i.childLanes&~c,s.memoizedState=Yp,m}return k=i.child,i=k.sibling,m=Go(k,{mode:"visible",children:m.children}),(s.mode&1)===0&&(m.lanes=c),m.return=s,m.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=m,s.memoizedState=null,m}function Xp(i,s){return s=Nd({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Sd(i,s,c,m){return m!==null&&_p(m),Ha(s,i.child,null,c),i=Xp(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function sR(i,s,c,m,b,k,E){if(c)return s.flags&256?(s.flags&=-257,m=qp(Error(t(422))),Sd(i,s,E,m)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(k=m.fallback,b=s.mode,m=Nd({mode:"visible",children:m.children},b,0,null),k=zs(k,b,E,null),k.flags|=2,m.return=s,k.return=s,m.sibling=k,s.child=m,(s.mode&1)!==0&&Ha(s,i.child,null,E),s.child.memoizedState=Qp(E),s.memoizedState=Yp,k);if((s.mode&1)===0)return Sd(i,s,E,null);if(b.data==="$!"){if(m=b.nextSibling&&b.nextSibling.dataset,m)var D=m.dgst;return m=D,k=Error(t(419)),m=qp(k,m,void 0),Sd(i,s,E,m)}if(D=(E&i.childLanes)!==0,hr||D){if(m=bn,m!==null){switch(E&-E){case 4:b=2;break;case 16:b=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:b=32;break;case 536870912:b=268435456;break;default:b=0}b=(b&(m.suspendedLanes|E))!==0?0:b,b!==0&&b!==k.retryLane&&(k.retryLane=b,oo(i,b),hi(m,i,b,-1))}return pm(),m=qp(Error(t(421))),Sd(i,s,E,m)}return b.data==="$?"?(s.flags|=128,s.child=i.child,s=bR.bind(null,i),b._reactRetry=s,null):(i=k.treeContext,Tr=No(b.nextSibling),Sr=s,Bt=!0,ci=null,i!==null&&(Vr[zr++]=ro,Vr[zr++]=io,Vr[zr++]=Os,ro=i.id,io=i.overflow,Os=s),s=Xp(s,m.children),s.flags|=4096,s)}function Q1(i,s,c){i.lanes|=s;var m=i.alternate;m!==null&&(m.lanes|=s),Rp(i.return,s,c)}function Zp(i,s,c,m,b){var k=i.memoizedState;k===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:c,tailMode:b}:(k.isBackwards=s,k.rendering=null,k.renderingStartTime=0,k.last=m,k.tail=c,k.tailMode=b)}function X1(i,s,c){var m=s.pendingProps,b=m.revealOrder,k=m.tail;if(tr(i,s,m.children,c),m=Ht.current,(m&2)!==0)m=m&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Q1(i,c,s);else if(i.tag===19)Q1(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}m&=1}if(Ot(Ht,m),(s.mode&1)===0)s.memoizedState=null;else switch(b){case"forwards":for(c=s.child,b=null;c!==null;)i=c.alternate,i!==null&&gd(i)===null&&(b=c),c=c.sibling;c=b,c===null?(b=s.child,s.child=null):(b=c.sibling,c.sibling=null),Zp(s,!1,b,c,k);break;case"backwards":for(c=null,b=s.child,s.child=null;b!==null;){if(i=b.alternate,i!==null&&gd(i)===null){s.child=b;break}i=b.sibling,b.sibling=c,c=b,b=i}Zp(s,!0,c,null,k);break;case"together":Zp(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Td(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function ao(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Fs|=s.lanes,(c&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(t(153));if(s.child!==null){for(i=s.child,c=Go(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Go(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function aR(i,s,c){switch(s.tag){case 3:K1(s),Wa();break;case 5:f1(s);break;case 1:fr(s.type)&&sd(s);break;case 4:Ap(s,s.stateNode.containerInfo);break;case 10:var m=s.type._context,b=s.memoizedProps.value;Ot(fd,m._currentValue),m._currentValue=b;break;case 13:if(m=s.memoizedState,m!==null)return m.dehydrated!==null?(Ot(Ht,Ht.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?Y1(i,s,c):(Ot(Ht,Ht.current&1),i=ao(i,s,c),i!==null?i.sibling:null);Ot(Ht,Ht.current&1);break;case 19:if(m=(c&s.childLanes)!==0,(i.flags&128)!==0){if(m)return X1(i,s,c);s.flags|=128}if(b=s.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),Ot(Ht,Ht.current),m)break;return null;case 22:case 23:return s.lanes=0,$1(i,s,c)}return ao(i,s,c)}var Z1,em,ek,tk;Z1=function(i,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},em=function(){},ek=function(i,s,c,m){var b=i.memoizedProps;if(b!==m){i=s.stateNode,Ns(Oi.current);var k=null;switch(c){case"input":b=Ar(i,b),m=Ar(i,m),k=[];break;case"select":b=de({},b,{value:void 0}),m=de({},m,{value:void 0}),k=[];break;case"textarea":b=Ki(i,b),m=Ki(i,m),k=[];break;default:typeof b.onClick!="function"&&typeof m.onClick=="function"&&(i.onclick=rd)}Yt(c,m);var E;c=null;for(ae in b)if(!m.hasOwnProperty(ae)&&b.hasOwnProperty(ae)&&b[ae]!=null)if(ae==="style"){var D=b[ae];for(E in D)D.hasOwnProperty(E)&&(c||(c={}),c[E]="")}else ae!=="dangerouslySetInnerHTML"&&ae!=="children"&&ae!=="suppressContentEditableWarning"&&ae!=="suppressHydrationWarning"&&ae!=="autoFocus"&&(o.hasOwnProperty(ae)?k||(k=[]):(k=k||[]).push(ae,null));for(ae in m){var V=m[ae];if(D=b!=null?b[ae]:void 0,m.hasOwnProperty(ae)&&V!==D&&(V!=null||D!=null))if(ae==="style")if(D){for(E in D)!D.hasOwnProperty(E)||V&&V.hasOwnProperty(E)||(c||(c={}),c[E]="");for(E in V)V.hasOwnProperty(E)&&D[E]!==V[E]&&(c||(c={}),c[E]=V[E])}else c||(k||(k=[]),k.push(ae,c)),c=V;else ae==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,D=D?D.__html:void 0,V!=null&&D!==V&&(k=k||[]).push(ae,V)):ae==="children"?typeof V!="string"&&typeof V!="number"||(k=k||[]).push(ae,""+V):ae!=="suppressContentEditableWarning"&&ae!=="suppressHydrationWarning"&&(o.hasOwnProperty(ae)?(V!=null&&ae==="onScroll"&&Nt("scroll",i),k||D===V||(k=[])):(k=k||[]).push(ae,V))}c&&(k=k||[]).push("style",c);var ae=k;(s.updateQueue=ae)&&(s.flags|=4)}},tk=function(i,s,c,m){c!==m&&(s.flags|=4)};function yc(i,s){if(!Bt)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var m=null;c!==null;)c.alternate!==null&&(m=c),c=c.sibling;m===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:m.sibling=null}}function Bn(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,m=0;if(s)for(var b=i.child;b!==null;)c|=b.lanes|b.childLanes,m|=b.subtreeFlags&14680064,m|=b.flags&14680064,b.return=i,b=b.sibling;else for(b=i.child;b!==null;)c|=b.lanes|b.childLanes,m|=b.subtreeFlags,m|=b.flags,b.return=i,b=b.sibling;return i.subtreeFlags|=m,i.childLanes=c,s}function lR(i,s,c){var m=s.pendingProps;switch(Cp(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bn(s),null;case 1:return fr(s.type)&&od(),Bn(s),null;case 3:return m=s.stateNode,Ga(),jt(dr),jt(Fn),Dp(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(i===null||i.child===null)&&(ud(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,ci!==null&&(dm(ci),ci=null))),em(i,s),Bn(s),null;case 5:Op(s);var b=Ns(hc.current);if(c=s.type,i!==null&&s.stateNode!=null)ek(i,s,c,m,b),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!m){if(s.stateNode===null)throw Error(t(166));return Bn(s),null}if(i=Ns(Oi.current),ud(s)){m=s.stateNode,c=s.type;var k=s.memoizedProps;switch(m[Ai]=s,m[lc]=k,i=(s.mode&1)!==0,c){case"dialog":Nt("cancel",m),Nt("close",m);break;case"iframe":case"object":case"embed":Nt("load",m);break;case"video":case"audio":for(b=0;b<eo.length;b++)Nt(eo[b],m);break;case"source":Nt("error",m);break;case"img":case"image":case"link":Nt("error",m),Nt("load",m);break;case"details":Nt("toggle",m);break;case"input":Or(m,k),Nt("invalid",m);break;case"select":m._wrapperState={wasMultiple:!!k.multiple},Nt("invalid",m);break;case"textarea":pa(m,k),Nt("invalid",m)}Yt(c,k),b=null;for(var E in k)if(k.hasOwnProperty(E)){var D=k[E];E==="children"?typeof D=="string"?m.textContent!==D&&(k.suppressHydrationWarning!==!0&&nd(m.textContent,D,i),b=["children",D]):typeof D=="number"&&m.textContent!==""+D&&(k.suppressHydrationWarning!==!0&&nd(m.textContent,D,i),b=["children",""+D]):o.hasOwnProperty(E)&&D!=null&&E==="onScroll"&&Nt("scroll",m)}switch(c){case"input":Jt(m),ha(m,k,!0);break;case"textarea":Jt(m),y(m);break;case"select":case"option":break;default:typeof k.onClick=="function"&&(m.onclick=rd)}m=b,s.updateQueue=m,m!==null&&(s.flags|=4)}else{E=b.nodeType===9?b:b.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=S(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=E.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof m.is=="string"?i=E.createElement(c,{is:m.is}):(i=E.createElement(c),c==="select"&&(E=i,m.multiple?E.multiple=!0:m.size&&(E.size=m.size))):i=E.createElementNS(i,c),i[Ai]=s,i[lc]=m,Z1(i,s,!1,!1),s.stateNode=i;e:{switch(E=Rt(c,m),c){case"dialog":Nt("cancel",i),Nt("close",i),b=m;break;case"iframe":case"object":case"embed":Nt("load",i),b=m;break;case"video":case"audio":for(b=0;b<eo.length;b++)Nt(eo[b],i);b=m;break;case"source":Nt("error",i),b=m;break;case"img":case"image":case"link":Nt("error",i),Nt("load",i),b=m;break;case"details":Nt("toggle",i),b=m;break;case"input":Or(i,m),b=Ar(i,m),Nt("invalid",i);break;case"option":b=m;break;case"select":i._wrapperState={wasMultiple:!!m.multiple},b=de({},m,{value:void 0}),Nt("invalid",i);break;case"textarea":pa(i,m),b=Ki(i,m),Nt("invalid",i);break;default:b=m}Yt(c,b),D=b;for(k in D)if(D.hasOwnProperty(k)){var V=D[k];k==="style"?at(i,V):k==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,V!=null&&ue(i,V)):k==="children"?typeof V=="string"?(c!=="textarea"||V!=="")&&be(i,V):typeof V=="number"&&be(i,""+V):k!=="suppressContentEditableWarning"&&k!=="suppressHydrationWarning"&&k!=="autoFocus"&&(o.hasOwnProperty(k)?V!=null&&k==="onScroll"&&Nt("scroll",i):V!=null&&U(i,k,V,E))}switch(c){case"input":Jt(i),ha(i,m,!1);break;case"textarea":Jt(i),y(i);break;case"option":m.value!=null&&i.setAttribute("value",""+qe(m.value));break;case"select":i.multiple=!!m.multiple,k=m.value,k!=null?Qn(i,!!m.multiple,k,!1):m.defaultValue!=null&&Qn(i,!!m.multiple,m.defaultValue,!0);break;default:typeof b.onClick=="function"&&(i.onclick=rd)}switch(c){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}}m&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return Bn(s),null;case 6:if(i&&s.stateNode!=null)tk(i,s,i.memoizedProps,m);else{if(typeof m!="string"&&s.stateNode===null)throw Error(t(166));if(c=Ns(hc.current),Ns(Oi.current),ud(s)){if(m=s.stateNode,c=s.memoizedProps,m[Ai]=s,(k=m.nodeValue!==c)&&(i=Sr,i!==null))switch(i.tag){case 3:nd(m.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&nd(m.nodeValue,c,(i.mode&1)!==0)}k&&(s.flags|=4)}else m=(c.nodeType===9?c:c.ownerDocument).createTextNode(m),m[Ai]=s,s.stateNode=m}return Bn(s),null;case 13:if(jt(Ht),m=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Bt&&Tr!==null&&(s.mode&1)!==0&&(s.flags&128)===0)i1(),Wa(),s.flags|=98560,k=!1;else if(k=ud(s),m!==null&&m.dehydrated!==null){if(i===null){if(!k)throw Error(t(318));if(k=s.memoizedState,k=k!==null?k.dehydrated:null,!k)throw Error(t(317));k[Ai]=s}else Wa(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Bn(s),k=!1}else ci!==null&&(dm(ci),ci=null),k=!0;if(!k)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(m=m!==null,m!==(i!==null&&i.memoizedState!==null)&&m&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(Ht.current&1)!==0?pn===0&&(pn=3):pm())),s.updateQueue!==null&&(s.flags|=4),Bn(s),null);case 4:return Ga(),em(i,s),i===null&&sc(s.stateNode.containerInfo),Bn(s),null;case 10:return Pp(s.type._context),Bn(s),null;case 17:return fr(s.type)&&od(),Bn(s),null;case 19:if(jt(Ht),k=s.memoizedState,k===null)return Bn(s),null;if(m=(s.flags&128)!==0,E=k.rendering,E===null)if(m)yc(k,!1);else{if(pn!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(E=gd(i),E!==null){for(s.flags|=128,yc(k,!1),m=E.updateQueue,m!==null&&(s.updateQueue=m,s.flags|=4),s.subtreeFlags=0,m=c,c=s.child;c!==null;)k=c,i=m,k.flags&=14680066,E=k.alternate,E===null?(k.childLanes=0,k.lanes=i,k.child=null,k.subtreeFlags=0,k.memoizedProps=null,k.memoizedState=null,k.updateQueue=null,k.dependencies=null,k.stateNode=null):(k.childLanes=E.childLanes,k.lanes=E.lanes,k.child=E.child,k.subtreeFlags=0,k.deletions=null,k.memoizedProps=E.memoizedProps,k.memoizedState=E.memoizedState,k.updateQueue=E.updateQueue,k.type=E.type,i=E.dependencies,k.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return Ot(Ht,Ht.current&1|2),s.child}i=i.sibling}k.tail!==null&&Wt()>Qa&&(s.flags|=128,m=!0,yc(k,!1),s.lanes=4194304)}else{if(!m)if(i=gd(E),i!==null){if(s.flags|=128,m=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),yc(k,!0),k.tail===null&&k.tailMode==="hidden"&&!E.alternate&&!Bt)return Bn(s),null}else 2*Wt()-k.renderingStartTime>Qa&&c!==1073741824&&(s.flags|=128,m=!0,yc(k,!1),s.lanes=4194304);k.isBackwards?(E.sibling=s.child,s.child=E):(c=k.last,c!==null?c.sibling=E:s.child=E,k.last=E)}return k.tail!==null?(s=k.tail,k.rendering=s,k.tail=s.sibling,k.renderingStartTime=Wt(),s.sibling=null,c=Ht.current,Ot(Ht,m?c&1|2:c&1),s):(Bn(s),null);case 22:case 23:return hm(),m=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==m&&(s.flags|=8192),m&&(s.mode&1)!==0?(_r&1073741824)!==0&&(Bn(s),s.subtreeFlags&6&&(s.flags|=8192)):Bn(s),null;case 24:return null;case 25:return null}throw Error(t(156,s.tag))}function cR(i,s){switch(Cp(s),s.tag){case 1:return fr(s.type)&&od(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Ga(),jt(dr),jt(Fn),Dp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Op(s),null;case 13:if(jt(Ht),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(t(340));Wa()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return jt(Ht),null;case 4:return Ga(),null;case 10:return Pp(s.type._context),null;case 22:case 23:return hm(),null;case 24:return null;default:return null}}var _d=!1,Vn=!1,uR=typeof WeakSet=="function"?WeakSet:Set,Ue=null;function Ja(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(m){Qt(i,s,m)}else c.current=null}function tm(i,s,c){try{c()}catch(m){Qt(i,s,m)}}var nk=!1;function dR(i,s){if(hp=kr,i=oc(),d(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var m=c.getSelection&&c.getSelection();if(m&&m.rangeCount!==0){c=m.anchorNode;var b=m.anchorOffset,k=m.focusNode;m=m.focusOffset;try{c.nodeType,k.nodeType}catch{c=null;break e}var E=0,D=-1,V=-1,ae=0,we=0,Te=i,ke=null;t:for(;;){for(var je;Te!==c||b!==0&&Te.nodeType!==3||(D=E+b),Te!==k||m!==0&&Te.nodeType!==3||(V=E+m),Te.nodeType===3&&(E+=Te.nodeValue.length),(je=Te.firstChild)!==null;)ke=Te,Te=je;for(;;){if(Te===i)break t;if(ke===c&&++ae===b&&(D=E),ke===k&&++we===m&&(V=E),(je=Te.nextSibling)!==null)break;Te=ke,ke=Te.parentNode}Te=je}c=D===-1||V===-1?null:{start:D,end:V}}else c=null}c=c||{start:0,end:0}}else c=null;for(pp={focusedElem:i,selectionRange:c},kr=!1,Ue=s;Ue!==null;)if(s=Ue,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Ue=i;else for(;Ue!==null;){s=Ue;try{var Be=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Be!==null){var ze=Be.memoizedProps,nn=Be.memoizedState,Z=s.stateNode,W=Z.getSnapshotBeforeUpdate(s.elementType===s.type?ze:ui(s.type,ze),nn);Z.__reactInternalSnapshotBeforeUpdate=W}break;case 3:var ie=s.stateNode.containerInfo;ie.nodeType===1?ie.textContent="":ie.nodeType===9&&ie.documentElement&&ie.removeChild(ie.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Ee){Qt(s,s.return,Ee)}if(i=s.sibling,i!==null){i.return=s.return,Ue=i;break}Ue=s.return}return Be=nk,nk=!1,Be}function bc(i,s,c){var m=s.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var b=m=m.next;do{if((b.tag&i)===i){var k=b.destroy;b.destroy=void 0,k!==void 0&&tm(s,c,k)}b=b.next}while(b!==m)}}function xd(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var m=c.create;c.destroy=m()}c=c.next}while(c!==s)}}function nm(i){var s=i.ref;if(s!==null){var c=i.stateNode;switch(i.tag){case 5:i=c;break;default:i=c}typeof s=="function"?s(i):s.current=i}}function rk(i){var s=i.alternate;s!==null&&(i.alternate=null,rk(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Ai],delete s[lc],delete s[yp],delete s[GP],delete s[KP])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function ik(i){return i.tag===5||i.tag===3||i.tag===4}function ok(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||ik(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function rm(i,s,c){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=rd));else if(m!==4&&(i=i.child,i!==null))for(rm(i,s,c),i=i.sibling;i!==null;)rm(i,s,c),i=i.sibling}function im(i,s,c){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(m!==4&&(i=i.child,i!==null))for(im(i,s,c),i=i.sibling;i!==null;)im(i,s,c),i=i.sibling}var Rn=null,di=!1;function zo(i,s,c){for(c=c.child;c!==null;)sk(i,s,c),c=c.sibling}function sk(i,s,c){if(On&&typeof On.onCommitFiberUnmount=="function")try{On.onCommitFiberUnmount(Nr,c)}catch{}switch(c.tag){case 5:Vn||Ja(c,s);case 6:var m=Rn,b=di;Rn=null,zo(i,s,c),Rn=m,di=b,Rn!==null&&(di?(i=Rn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):Rn.removeChild(c.stateNode));break;case 18:Rn!==null&&(di?(i=Rn,c=c.stateNode,i.nodeType===8?vp(i.parentNode,c):i.nodeType===1&&vp(i,c),Dn(i)):vp(Rn,c.stateNode));break;case 4:m=Rn,b=di,Rn=c.stateNode.containerInfo,di=!0,zo(i,s,c),Rn=m,di=b;break;case 0:case 11:case 14:case 15:if(!Vn&&(m=c.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){b=m=m.next;do{var k=b,E=k.destroy;k=k.tag,E!==void 0&&((k&2)!==0||(k&4)!==0)&&tm(c,s,E),b=b.next}while(b!==m)}zo(i,s,c);break;case 1:if(!Vn&&(Ja(c,s),m=c.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=c.memoizedProps,m.state=c.memoizedState,m.componentWillUnmount()}catch(D){Qt(c,s,D)}zo(i,s,c);break;case 21:zo(i,s,c);break;case 22:c.mode&1?(Vn=(m=Vn)||c.memoizedState!==null,zo(i,s,c),Vn=m):zo(i,s,c);break;default:zo(i,s,c)}}function ak(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new uR),s.forEach(function(m){var b=kR.bind(null,i,m);c.has(m)||(c.add(m),m.then(b,b))})}}function fi(i,s){var c=s.deletions;if(c!==null)for(var m=0;m<c.length;m++){var b=c[m];try{var k=i,E=s,D=E;e:for(;D!==null;){switch(D.tag){case 5:Rn=D.stateNode,di=!1;break e;case 3:Rn=D.stateNode.containerInfo,di=!0;break e;case 4:Rn=D.stateNode.containerInfo,di=!0;break e}D=D.return}if(Rn===null)throw Error(t(160));sk(k,E,b),Rn=null,di=!1;var V=b.alternate;V!==null&&(V.return=null),b.return=null}catch(ae){Qt(b,s,ae)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)lk(s,i),s=s.sibling}function lk(i,s){var c=i.alternate,m=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(fi(s,i),Di(i),m&4){try{bc(3,i,i.return),xd(3,i)}catch(ze){Qt(i,i.return,ze)}try{bc(5,i,i.return)}catch(ze){Qt(i,i.return,ze)}}break;case 1:fi(s,i),Di(i),m&512&&c!==null&&Ja(c,c.return);break;case 5:if(fi(s,i),Di(i),m&512&&c!==null&&Ja(c,c.return),i.flags&32){var b=i.stateNode;try{be(b,"")}catch(ze){Qt(i,i.return,ze)}}if(m&4&&(b=i.stateNode,b!=null)){var k=i.memoizedProps,E=c!==null?c.memoizedProps:k,D=i.type,V=i.updateQueue;if(i.updateQueue=null,V!==null)try{D==="input"&&k.type==="radio"&&k.name!=null&&xo(b,k),Rt(D,E);var ae=Rt(D,k);for(E=0;E<V.length;E+=2){var we=V[E],Te=V[E+1];we==="style"?at(b,Te):we==="dangerouslySetInnerHTML"?ue(b,Te):we==="children"?be(b,Te):U(b,we,Te,ae)}switch(D){case"input":qi(b,k);break;case"textarea":P(b,k);break;case"select":var ke=b._wrapperState.wasMultiple;b._wrapperState.wasMultiple=!!k.multiple;var je=k.value;je!=null?Qn(b,!!k.multiple,je,!1):ke!==!!k.multiple&&(k.defaultValue!=null?Qn(b,!!k.multiple,k.defaultValue,!0):Qn(b,!!k.multiple,k.multiple?[]:"",!1))}b[lc]=k}catch(ze){Qt(i,i.return,ze)}}break;case 6:if(fi(s,i),Di(i),m&4){if(i.stateNode===null)throw Error(t(162));b=i.stateNode,k=i.memoizedProps;try{b.nodeValue=k}catch(ze){Qt(i,i.return,ze)}}break;case 3:if(fi(s,i),Di(i),m&4&&c!==null&&c.memoizedState.isDehydrated)try{Dn(s.containerInfo)}catch(ze){Qt(i,i.return,ze)}break;case 4:fi(s,i),Di(i);break;case 13:fi(s,i),Di(i),b=i.child,b.flags&8192&&(k=b.memoizedState!==null,b.stateNode.isHidden=k,!k||b.alternate!==null&&b.alternate.memoizedState!==null||(am=Wt())),m&4&&ak(i);break;case 22:if(we=c!==null&&c.memoizedState!==null,i.mode&1?(Vn=(ae=Vn)||we,fi(s,i),Vn=ae):fi(s,i),Di(i),m&8192){if(ae=i.memoizedState!==null,(i.stateNode.isHidden=ae)&&!we&&(i.mode&1)!==0)for(Ue=i,we=i.child;we!==null;){for(Te=Ue=we;Ue!==null;){switch(ke=Ue,je=ke.child,ke.tag){case 0:case 11:case 14:case 15:bc(4,ke,ke.return);break;case 1:Ja(ke,ke.return);var Be=ke.stateNode;if(typeof Be.componentWillUnmount=="function"){m=ke,c=ke.return;try{s=m,Be.props=s.memoizedProps,Be.state=s.memoizedState,Be.componentWillUnmount()}catch(ze){Qt(m,c,ze)}}break;case 5:Ja(ke,ke.return);break;case 22:if(ke.memoizedState!==null){dk(Te);continue}}je!==null?(je.return=ke,Ue=je):dk(Te)}we=we.sibling}e:for(we=null,Te=i;;){if(Te.tag===5){if(we===null){we=Te;try{b=Te.stateNode,ae?(k=b.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none"):(D=Te.stateNode,V=Te.memoizedProps.style,E=V!=null&&V.hasOwnProperty("display")?V.display:null,D.style.display=Le("display",E))}catch(ze){Qt(i,i.return,ze)}}}else if(Te.tag===6){if(we===null)try{Te.stateNode.nodeValue=ae?"":Te.memoizedProps}catch(ze){Qt(i,i.return,ze)}}else if((Te.tag!==22&&Te.tag!==23||Te.memoizedState===null||Te===i)&&Te.child!==null){Te.child.return=Te,Te=Te.child;continue}if(Te===i)break e;for(;Te.sibling===null;){if(Te.return===null||Te.return===i)break e;we===Te&&(we=null),Te=Te.return}we===Te&&(we=null),Te.sibling.return=Te.return,Te=Te.sibling}}break;case 19:fi(s,i),Di(i),m&4&&ak(i);break;case 21:break;default:fi(s,i),Di(i)}}function Di(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(ik(c)){var m=c;break e}c=c.return}throw Error(t(160))}switch(m.tag){case 5:var b=m.stateNode;m.flags&32&&(be(b,""),m.flags&=-33);var k=ok(i);im(i,k,b);break;case 3:case 4:var E=m.stateNode.containerInfo,D=ok(i);rm(i,D,E);break;default:throw Error(t(161))}}catch(V){Qt(i,i.return,V)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function fR(i,s,c){Ue=i,ck(i)}function ck(i,s,c){for(var m=(i.mode&1)!==0;Ue!==null;){var b=Ue,k=b.child;if(b.tag===22&&m){var E=b.memoizedState!==null||_d;if(!E){var D=b.alternate,V=D!==null&&D.memoizedState!==null||Vn;D=_d;var ae=Vn;if(_d=E,(Vn=V)&&!ae)for(Ue=b;Ue!==null;)E=Ue,V=E.child,E.tag===22&&E.memoizedState!==null?fk(b):V!==null?(V.return=E,Ue=V):fk(b);for(;k!==null;)Ue=k,ck(k),k=k.sibling;Ue=b,_d=D,Vn=ae}uk(i)}else(b.subtreeFlags&8772)!==0&&k!==null?(k.return=b,Ue=k):uk(i)}}function uk(i){for(;Ue!==null;){var s=Ue;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Vn||xd(5,s);break;case 1:var m=s.stateNode;if(s.flags&4&&!Vn)if(c===null)m.componentDidMount();else{var b=s.elementType===s.type?c.memoizedProps:ui(s.type,c.memoizedProps);m.componentDidUpdate(b,c.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var k=s.updateQueue;k!==null&&d1(s,k,m);break;case 3:var E=s.updateQueue;if(E!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}d1(s,E,c)}break;case 5:var D=s.stateNode;if(c===null&&s.flags&4){c=D;var V=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":V.autoFocus&&c.focus();break;case"img":V.src&&(c.src=V.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var ae=s.alternate;if(ae!==null){var we=ae.memoizedState;if(we!==null){var Te=we.dehydrated;Te!==null&&Dn(Te)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Vn||s.flags&512&&nm(s)}catch(ke){Qt(s,s.return,ke)}}if(s===i){Ue=null;break}if(c=s.sibling,c!==null){c.return=s.return,Ue=c;break}Ue=s.return}}function dk(i){for(;Ue!==null;){var s=Ue;if(s===i){Ue=null;break}var c=s.sibling;if(c!==null){c.return=s.return,Ue=c;break}Ue=s.return}}function fk(i){for(;Ue!==null;){var s=Ue;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{xd(4,s)}catch(V){Qt(s,c,V)}break;case 1:var m=s.stateNode;if(typeof m.componentDidMount=="function"){var b=s.return;try{m.componentDidMount()}catch(V){Qt(s,b,V)}}var k=s.return;try{nm(s)}catch(V){Qt(s,k,V)}break;case 5:var E=s.return;try{nm(s)}catch(V){Qt(s,E,V)}}}catch(V){Qt(s,s.return,V)}if(s===i){Ue=null;break}var D=s.sibling;if(D!==null){D.return=s.return,Ue=D;break}Ue=s.return}}var hR=Math.ceil,Ed=L.ReactCurrentDispatcher,om=L.ReactCurrentOwner,$r=L.ReactCurrentBatchConfig,bt=0,bn=null,sn=null,In=0,_r=0,Ya=jo(0),pn=0,kc=null,Fs=0,Pd=0,sm=0,wc=null,pr=null,am=0,Qa=1/0,lo=null,Rd=!1,lm=null,Wo=null,Id=!1,Ho=null,Md=0,Cc=0,cm=null,Ad=-1,Od=0;function nr(){return(bt&6)!==0?Wt():Ad!==-1?Ad:Ad=Wt()}function $o(i){return(i.mode&1)===0?1:(bt&2)!==0&&In!==0?In&-In:YP.transition!==null?(Od===0&&(Od=Bl()),Od):(i=vt,i!==0||(i=window.event,i=i===void 0?16:Uu(i.type)),i)}function hi(i,s,c,m){if(50<Cc)throw Cc=0,cm=null,Error(t(185));It(i,c,m),((bt&2)===0||i!==bn)&&(i===bn&&((bt&2)===0&&(Pd|=c),pn===4&&qo(i,In)),mr(i,m),c===1&&bt===0&&(s.mode&1)===0&&(Qa=Wt()+500,ad&&Uo()))}function mr(i,s){var c=i.callbackNode;Fr(i,s);var m=ot(i,i===bn?In:0);if(m===0)c!==null&&lr(c),i.callbackNode=null,i.callbackPriority=0;else if(s=m&-m,i.callbackPriority!==s){if(c!=null&&lr(c),s===1)i.tag===0?JP(pk.bind(null,i)):Zb(pk.bind(null,i)),$P(function(){(bt&6)===0&&Uo()}),c=null;else{switch(Ur(m)){case 1:c=ka;break;case 4:c=Ul;break;case 16:c=us;break;case 536870912:c=wa;break;default:c=us}c=Ck(c,hk.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function hk(i,s){if(Ad=-1,Od=0,(bt&6)!==0)throw Error(t(327));var c=i.callbackNode;if(Xa()&&i.callbackNode!==c)return null;var m=ot(i,i===bn?In:0);if(m===0)return null;if((m&30)!==0||(m&i.expiredLanes)!==0||s)s=Ld(i,m);else{s=m;var b=bt;bt|=2;var k=gk();(bn!==i||In!==s)&&(lo=null,Qa=Wt()+500,Bs(i,s));do try{gR();break}catch(D){mk(i,D)}while(!0);Ep(),Ed.current=k,bt=b,sn!==null?s=0:(bn=null,In=0,s=pn)}if(s!==0){if(s===2&&(b=Ta(i),b!==0&&(m=b,s=um(i,b))),s===1)throw c=kc,Bs(i,0),qo(i,m),mr(i,Wt()),c;if(s===6)qo(i,m);else{if(b=i.current.alternate,(m&30)===0&&!pR(b)&&(s=Ld(i,m),s===2&&(k=Ta(i),k!==0&&(m=k,s=um(i,k))),s===1))throw c=kc,Bs(i,0),qo(i,m),mr(i,Wt()),c;switch(i.finishedWork=b,i.finishedLanes=m,s){case 0:case 1:throw Error(t(345));case 2:Vs(i,pr,lo);break;case 3:if(qo(i,m),(m&130023424)===m&&(s=am+500-Wt(),10<s)){if(ot(i,0)!==0)break;if(b=i.suspendedLanes,(b&m)!==m){nr(),i.pingedLanes|=i.suspendedLanes&b;break}i.timeoutHandle=gp(Vs.bind(null,i,pr,lo),s);break}Vs(i,pr,lo);break;case 4:if(qo(i,m),(m&4194240)===m)break;for(s=i.eventTimes,b=-1;0<m;){var E=31-En(m);k=1<<E,E=s[E],E>b&&(b=E),m&=~k}if(m=b,m=Wt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*hR(m/1960))-m,10<m){i.timeoutHandle=gp(Vs.bind(null,i,pr,lo),m);break}Vs(i,pr,lo);break;case 5:Vs(i,pr,lo);break;default:throw Error(t(329))}}}return mr(i,Wt()),i.callbackNode===c?hk.bind(null,i):null}function um(i,s){var c=wc;return i.current.memoizedState.isDehydrated&&(Bs(i,s).flags|=256),i=Ld(i,s),i!==2&&(s=pr,pr=c,s!==null&&dm(s)),i}function dm(i){pr===null?pr=i:pr.push.apply(pr,i)}function pR(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var m=0;m<c.length;m++){var b=c[m],k=b.getSnapshot;b=b.value;try{if(!ur(k(),b))return!1}catch{return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function qo(i,s){for(s&=~sm,s&=~Pd,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-En(s),m=1<<c;i[c]=-1,s&=~m}}function pk(i){if((bt&6)!==0)throw Error(t(327));Xa();var s=ot(i,0);if((s&1)===0)return mr(i,Wt()),null;var c=Ld(i,s);if(i.tag!==0&&c===2){var m=Ta(i);m!==0&&(s=m,c=um(i,m))}if(c===1)throw c=kc,Bs(i,0),qo(i,s),mr(i,Wt()),c;if(c===6)throw Error(t(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Vs(i,pr,lo),mr(i,Wt()),null}function fm(i,s){var c=bt;bt|=1;try{return i(s)}finally{bt=c,bt===0&&(Qa=Wt()+500,ad&&Uo())}}function Us(i){Ho!==null&&Ho.tag===0&&(bt&6)===0&&Xa();var s=bt;bt|=1;var c=$r.transition,m=vt;try{if($r.transition=null,vt=1,i)return i()}finally{vt=m,$r.transition=c,bt=s,(bt&6)===0&&Uo()}}function hm(){_r=Ya.current,jt(Ya)}function Bs(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,HP(c)),sn!==null)for(c=sn.return;c!==null;){var m=c;switch(Cp(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&od();break;case 3:Ga(),jt(dr),jt(Fn),Dp();break;case 5:Op(m);break;case 4:Ga();break;case 13:jt(Ht);break;case 19:jt(Ht);break;case 10:Pp(m.type._context);break;case 22:case 23:hm()}c=c.return}if(bn=i,sn=i=Go(i.current,null),In=_r=s,pn=0,kc=null,sm=Pd=Fs=0,pr=wc=null,Ds!==null){for(s=0;s<Ds.length;s++)if(c=Ds[s],m=c.interleaved,m!==null){c.interleaved=null;var b=m.next,k=c.pending;if(k!==null){var E=k.next;k.next=b,m.next=E}c.pending=m}Ds=null}return i}function mk(i,s){do{var c=sn;try{if(Ep(),vd.current=wd,yd){for(var m=$t.memoizedState;m!==null;){var b=m.queue;b!==null&&(b.pending=null),m=m.next}yd=!1}if(js=0,yn=hn=$t=null,pc=!1,mc=0,om.current=null,c===null||c.return===null){pn=1,kc=s,sn=null;break}e:{var k=i,E=c.return,D=c,V=s;if(s=In,D.flags|=32768,V!==null&&typeof V=="object"&&typeof V.then=="function"){var ae=V,we=D,Te=we.tag;if((we.mode&1)===0&&(Te===0||Te===11||Te===15)){var ke=we.alternate;ke?(we.updateQueue=ke.updateQueue,we.memoizedState=ke.memoizedState,we.lanes=ke.lanes):(we.updateQueue=null,we.memoizedState=null)}var je=B1(E);if(je!==null){je.flags&=-257,V1(je,E,D,k,s),je.mode&1&&U1(k,ae,s),s=je,V=ae;var Be=s.updateQueue;if(Be===null){var ze=new Set;ze.add(V),s.updateQueue=ze}else Be.add(V);break e}else{if((s&1)===0){U1(k,ae,s),pm();break e}V=Error(t(426))}}else if(Bt&&D.mode&1){var nn=B1(E);if(nn!==null){(nn.flags&65536)===0&&(nn.flags|=256),V1(nn,E,D,k,s),_p(Ka(V,D));break e}}k=V=Ka(V,D),pn!==4&&(pn=2),wc===null?wc=[k]:wc.push(k),k=E;do{switch(k.tag){case 3:k.flags|=65536,s&=-s,k.lanes|=s;var Z=j1(k,V,s);u1(k,Z);break e;case 1:D=V;var W=k.type,ie=k.stateNode;if((k.flags&128)===0&&(typeof W.getDerivedStateFromError=="function"||ie!==null&&typeof ie.componentDidCatch=="function"&&(Wo===null||!Wo.has(ie)))){k.flags|=65536,s&=-s,k.lanes|=s;var Ee=F1(k,D,s);u1(k,Ee);break e}}k=k.return}while(k!==null)}yk(c)}catch(He){s=He,sn===c&&c!==null&&(sn=c=c.return);continue}break}while(!0)}function gk(){var i=Ed.current;return Ed.current=wd,i===null?wd:i}function pm(){(pn===0||pn===3||pn===2)&&(pn=4),bn===null||(Fs&268435455)===0&&(Pd&268435455)===0||qo(bn,In)}function Ld(i,s){var c=bt;bt|=2;var m=gk();(bn!==i||In!==s)&&(lo=null,Bs(i,s));do try{mR();break}catch(b){mk(i,b)}while(!0);if(Ep(),bt=c,Ed.current=m,sn!==null)throw Error(t(261));return bn=null,In=0,pn}function mR(){for(;sn!==null;)vk(sn)}function gR(){for(;sn!==null&&!ya();)vk(sn)}function vk(i){var s=wk(i.alternate,i,_r);i.memoizedProps=i.pendingProps,s===null?yk(i):sn=s,om.current=null}function yk(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=lR(c,s,_r),c!==null){sn=c;return}}else{if(c=cR(c,s),c!==null){c.flags&=32767,sn=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{pn=6,sn=null;return}}if(s=s.sibling,s!==null){sn=s;return}sn=s=i}while(s!==null);pn===0&&(pn=5)}function Vs(i,s,c){var m=vt,b=$r.transition;try{$r.transition=null,vt=1,vR(i,s,c,m)}finally{$r.transition=b,vt=m}return null}function vR(i,s,c,m){do Xa();while(Ho!==null);if((bt&6)!==0)throw Error(t(327));c=i.finishedWork;var b=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(t(177));i.callbackNode=null,i.callbackPriority=0;var k=c.lanes|c.childLanes;if(hs(i,k),i===bn&&(sn=bn=null,In=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Id||(Id=!0,Ck(us,function(){return Xa(),null})),k=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||k){k=$r.transition,$r.transition=null;var E=vt;vt=1;var D=bt;bt|=4,om.current=null,dR(i,c),lk(c,i),h(pp),kr=!!hp,pp=hp=null,i.current=c,fR(c),Fl(),bt=D,vt=E,$r.transition=k}else i.current=c;if(Id&&(Id=!1,Ho=i,Md=b),k=i.pendingLanes,k===0&&(Wo=null),Ca(c.stateNode),mr(i,Wt()),s!==null)for(m=i.onRecoverableError,c=0;c<s.length;c++)b=s[c],m(b.value,{componentStack:b.stack,digest:b.digest});if(Rd)throw Rd=!1,i=lm,lm=null,i;return(Md&1)!==0&&i.tag!==0&&Xa(),k=i.pendingLanes,(k&1)!==0?i===cm?Cc++:(Cc=0,cm=i):Cc=0,Uo(),null}function Xa(){if(Ho!==null){var i=Ur(Md),s=$r.transition,c=vt;try{if($r.transition=null,vt=16>i?16:i,Ho===null)var m=!1;else{if(i=Ho,Ho=null,Md=0,(bt&6)!==0)throw Error(t(331));var b=bt;for(bt|=4,Ue=i.current;Ue!==null;){var k=Ue,E=k.child;if((Ue.flags&16)!==0){var D=k.deletions;if(D!==null){for(var V=0;V<D.length;V++){var ae=D[V];for(Ue=ae;Ue!==null;){var we=Ue;switch(we.tag){case 0:case 11:case 15:bc(8,we,k)}var Te=we.child;if(Te!==null)Te.return=we,Ue=Te;else for(;Ue!==null;){we=Ue;var ke=we.sibling,je=we.return;if(rk(we),we===ae){Ue=null;break}if(ke!==null){ke.return=je,Ue=ke;break}Ue=je}}}var Be=k.alternate;if(Be!==null){var ze=Be.child;if(ze!==null){Be.child=null;do{var nn=ze.sibling;ze.sibling=null,ze=nn}while(ze!==null)}}Ue=k}}if((k.subtreeFlags&2064)!==0&&E!==null)E.return=k,Ue=E;else e:for(;Ue!==null;){if(k=Ue,(k.flags&2048)!==0)switch(k.tag){case 0:case 11:case 15:bc(9,k,k.return)}var Z=k.sibling;if(Z!==null){Z.return=k.return,Ue=Z;break e}Ue=k.return}}var W=i.current;for(Ue=W;Ue!==null;){E=Ue;var ie=E.child;if((E.subtreeFlags&2064)!==0&&ie!==null)ie.return=E,Ue=ie;else e:for(E=W;Ue!==null;){if(D=Ue,(D.flags&2048)!==0)try{switch(D.tag){case 0:case 11:case 15:xd(9,D)}}catch(He){Qt(D,D.return,He)}if(D===E){Ue=null;break e}var Ee=D.sibling;if(Ee!==null){Ee.return=D.return,Ue=Ee;break e}Ue=D.return}}if(bt=b,Uo(),On&&typeof On.onPostCommitFiberRoot=="function")try{On.onPostCommitFiberRoot(Nr,i)}catch{}m=!0}return m}finally{vt=c,$r.transition=s}}return!1}function bk(i,s,c){s=Ka(c,s),s=j1(i,s,1),i=Vo(i,s,1),s=nr(),i!==null&&(It(i,1,s),mr(i,s))}function Qt(i,s,c){if(i.tag===3)bk(i,i,c);else for(;s!==null;){if(s.tag===3){bk(s,i,c);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Wo===null||!Wo.has(m))){i=Ka(c,i),i=F1(s,i,1),s=Vo(s,i,1),i=nr(),s!==null&&(It(s,1,i),mr(s,i));break}}s=s.return}}function yR(i,s,c){var m=i.pingCache;m!==null&&m.delete(s),s=nr(),i.pingedLanes|=i.suspendedLanes&c,bn===i&&(In&c)===c&&(pn===4||pn===3&&(In&130023424)===In&&500>Wt()-am?Bs(i,0):sm|=c),mr(i,s)}function kk(i,s){s===0&&((i.mode&1)===0?s=1:(s=Pn,Pn<<=1,(Pn&130023424)===0&&(Pn=4194304)));var c=nr();i=oo(i,s),i!==null&&(It(i,s,c),mr(i,c))}function bR(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),kk(i,c)}function kR(i,s){var c=0;switch(i.tag){case 13:var m=i.stateNode,b=i.memoizedState;b!==null&&(c=b.retryLane);break;case 19:m=i.stateNode;break;default:throw Error(t(314))}m!==null&&m.delete(s),kk(i,c)}var wk;wk=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||dr.current)hr=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return hr=!1,aR(i,s,c);hr=(i.flags&131072)!==0}else hr=!1,Bt&&(s.flags&1048576)!==0&&e1(s,cd,s.index);switch(s.lanes=0,s.tag){case 2:var m=s.type;Td(i,s),i=s.pendingProps;var b=Ba(s,Fn.current);qa(s,c),b=Fp(null,s,m,i,b,c);var k=Up();return s.flags|=1,typeof b=="object"&&b!==null&&typeof b.render=="function"&&b.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,fr(m)?(k=!0,sd(s)):k=!1,s.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,Mp(s),b.updater=Cd,s.stateNode=b,b._reactInternals=s,$p(s,m,i,c),s=Jp(null,s,m,!0,k,c)):(s.tag=0,Bt&&k&&wp(s),tr(null,s,b,c),s=s.child),s;case 16:m=s.elementType;e:{switch(Td(i,s),i=s.pendingProps,b=m._init,m=b(m._payload),s.type=m,b=s.tag=CR(m),i=ui(m,i),b){case 0:s=Kp(null,s,m,i,c);break e;case 1:s=G1(null,s,m,i,c);break e;case 11:s=z1(null,s,m,i,c);break e;case 14:s=W1(null,s,m,ui(m.type,i),c);break e}throw Error(t(306,m,""))}return s;case 0:return m=s.type,b=s.pendingProps,b=s.elementType===m?b:ui(m,b),Kp(i,s,m,b,c);case 1:return m=s.type,b=s.pendingProps,b=s.elementType===m?b:ui(m,b),G1(i,s,m,b,c);case 3:e:{if(K1(s),i===null)throw Error(t(387));m=s.pendingProps,k=s.memoizedState,b=k.element,c1(i,s),md(s,m,null,c);var E=s.memoizedState;if(m=E.element,k.isDehydrated)if(k={element:m,isDehydrated:!1,cache:E.cache,pendingSuspenseBoundaries:E.pendingSuspenseBoundaries,transitions:E.transitions},s.updateQueue.baseState=k,s.memoizedState=k,s.flags&256){b=Ka(Error(t(423)),s),s=J1(i,s,m,c,b);break e}else if(m!==b){b=Ka(Error(t(424)),s),s=J1(i,s,m,c,b);break e}else for(Tr=No(s.stateNode.containerInfo.firstChild),Sr=s,Bt=!0,ci=null,c=a1(s,null,m,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Wa(),m===b){s=ao(i,s,c);break e}tr(i,s,m,c)}s=s.child}return s;case 5:return f1(s),i===null&&Tp(s),m=s.type,b=s.pendingProps,k=i!==null?i.memoizedProps:null,E=b.children,mp(m,b)?E=null:k!==null&&mp(m,k)&&(s.flags|=32),q1(i,s),tr(i,s,E,c),s.child;case 6:return i===null&&Tp(s),null;case 13:return Y1(i,s,c);case 4:return Ap(s,s.stateNode.containerInfo),m=s.pendingProps,i===null?s.child=Ha(s,null,m,c):tr(i,s,m,c),s.child;case 11:return m=s.type,b=s.pendingProps,b=s.elementType===m?b:ui(m,b),z1(i,s,m,b,c);case 7:return tr(i,s,s.pendingProps,c),s.child;case 8:return tr(i,s,s.pendingProps.children,c),s.child;case 12:return tr(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(m=s.type._context,b=s.pendingProps,k=s.memoizedProps,E=b.value,Ot(fd,m._currentValue),m._currentValue=E,k!==null)if(ur(k.value,E)){if(k.children===b.children&&!dr.current){s=ao(i,s,c);break e}}else for(k=s.child,k!==null&&(k.return=s);k!==null;){var D=k.dependencies;if(D!==null){E=k.child;for(var V=D.firstContext;V!==null;){if(V.context===m){if(k.tag===1){V=so(-1,c&-c),V.tag=2;var ae=k.updateQueue;if(ae!==null){ae=ae.shared;var we=ae.pending;we===null?V.next=V:(V.next=we.next,we.next=V),ae.pending=V}}k.lanes|=c,V=k.alternate,V!==null&&(V.lanes|=c),Rp(k.return,c,s),D.lanes|=c;break}V=V.next}}else if(k.tag===10)E=k.type===s.type?null:k.child;else if(k.tag===18){if(E=k.return,E===null)throw Error(t(341));E.lanes|=c,D=E.alternate,D!==null&&(D.lanes|=c),Rp(E,c,s),E=k.sibling}else E=k.child;if(E!==null)E.return=k;else for(E=k;E!==null;){if(E===s){E=null;break}if(k=E.sibling,k!==null){k.return=E.return,E=k;break}E=E.return}k=E}tr(i,s,b.children,c),s=s.child}return s;case 9:return b=s.type,m=s.pendingProps.children,qa(s,c),b=Wr(b),m=m(b),s.flags|=1,tr(i,s,m,c),s.child;case 14:return m=s.type,b=ui(m,s.pendingProps),b=ui(m.type,b),W1(i,s,m,b,c);case 15:return H1(i,s,s.type,s.pendingProps,c);case 17:return m=s.type,b=s.pendingProps,b=s.elementType===m?b:ui(m,b),Td(i,s),s.tag=1,fr(m)?(i=!0,sd(s)):i=!1,qa(s,c),D1(s,m,b),$p(s,m,b,c),Jp(null,s,m,!0,i,c);case 19:return X1(i,s,c);case 22:return $1(i,s,c)}throw Error(t(156,s.tag))};function Ck(i,s){return jl(i,s)}function wR(i,s,c,m){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qr(i,s,c,m){return new wR(i,s,c,m)}function mm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function CR(i){if(typeof i=="function")return mm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===fe)return 11;if(i===oe)return 14}return 2}function Go(i,s){var c=i.alternate;return c===null?(c=qr(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function Dd(i,s,c,m,b,k){var E=2;if(m=i,typeof i=="function")mm(i)&&(E=1);else if(typeof i=="string")E=5;else e:switch(i){case se:return zs(c.children,b,k,s);case Q:E=8,b|=8;break;case $:return i=qr(12,c,s,b|2),i.elementType=$,i.lanes=k,i;case Re:return i=qr(13,c,s,b),i.elementType=Re,i.lanes=k,i;case We:return i=qr(19,c,s,b),i.elementType=We,i.lanes=k,i;case pe:return Nd(c,b,k,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case q:E=10;break e;case Y:E=9;break e;case fe:E=11;break e;case oe:E=14;break e;case Ie:E=16,m=null;break e}throw Error(t(130,i==null?i:typeof i,""))}return s=qr(E,c,s,b),s.elementType=i,s.type=m,s.lanes=k,s}function zs(i,s,c,m){return i=qr(7,i,m,s),i.lanes=c,i}function Nd(i,s,c,m){return i=qr(22,i,m,s),i.elementType=pe,i.lanes=c,i.stateNode={isHidden:!1},i}function gm(i,s,c){return i=qr(6,i,null,s),i.lanes=c,i}function vm(i,s,c){return s=qr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function SR(i,s,c,m,b){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_a(0),this.expirationTimes=_a(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_a(0),this.identifierPrefix=m,this.onRecoverableError=b,this.mutableSourceEagerHydrationData=null}function ym(i,s,c,m,b,k,E,D,V){return i=new SR(i,s,c,D,V),s===1?(s=1,k===!0&&(s|=8)):s=0,k=qr(3,null,null,s),i.current=k,k.stateNode=i,k.memoizedState={element:m,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mp(k),i}function TR(i,s,c){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:G,key:m==null?null:""+m,children:i,containerInfo:s,implementation:c}}function Sk(i){if(!i)return Fo;i=i._reactInternals;e:{if(Si(i)!==i||i.tag!==1)throw Error(t(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(fr(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(t(171))}if(i.tag===1){var c=i.type;if(fr(c))return Qb(i,c,s)}return s}function Tk(i,s,c,m,b,k,E,D,V){return i=ym(c,m,!0,i,b,k,E,D,V),i.context=Sk(null),c=i.current,m=nr(),b=$o(c),k=so(m,b),k.callback=s??null,Vo(c,k,b),i.current.lanes=b,It(i,b,m),mr(i,m),i}function jd(i,s,c,m){var b=s.current,k=nr(),E=$o(b);return c=Sk(c),s.context===null?s.context=c:s.pendingContext=c,s=so(k,E),s.payload={element:i},m=m===void 0?null:m,m!==null&&(s.callback=m),i=Vo(b,s,E),i!==null&&(hi(i,b,E,k),pd(i,b,E)),E}function Fd(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function _k(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function bm(i,s){_k(i,s),(i=i.alternate)&&_k(i,s)}function _R(){return null}var xk=typeof reportError=="function"?reportError:function(i){console.error(i)};function km(i){this._internalRoot=i}Ud.prototype.render=km.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(t(409));jd(i,s,null,null)},Ud.prototype.unmount=km.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Us(function(){jd(null,i,null,null)}),s[to]=null}};function Ud(i){this._internalRoot=i}Ud.prototype.unstable_scheduleHydration=function(i){if(i){var s=Po();i={blockedOn:null,target:i,priority:s};for(var c=0;c<br.length&&s!==0&&s<br[c].priority;c++);br.splice(c,0,i),c===0&&Ji(i)}};function wm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Bd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Ek(){}function xR(i,s,c,m,b){if(b){if(typeof m=="function"){var k=m;m=function(){var ae=Fd(E);k.call(ae)}}var E=Tk(s,m,i,0,null,!1,!1,"",Ek);return i._reactRootContainer=E,i[to]=E.current,sc(i.nodeType===8?i.parentNode:i),Us(),E}for(;b=i.lastChild;)i.removeChild(b);if(typeof m=="function"){var D=m;m=function(){var ae=Fd(V);D.call(ae)}}var V=ym(i,0,!1,null,null,!1,!1,"",Ek);return i._reactRootContainer=V,i[to]=V.current,sc(i.nodeType===8?i.parentNode:i),Us(function(){jd(s,V,c,m)}),V}function Vd(i,s,c,m,b){var k=c._reactRootContainer;if(k){var E=k;if(typeof b=="function"){var D=b;b=function(){var V=Fd(E);D.call(V)}}jd(s,E,i,b)}else E=xR(c,s,i,b,m);return Fd(E)}xa=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=jr(s.pendingLanes);c!==0&&(ps(s,c|1),mr(s,Wt()),(bt&6)===0&&(Qa=Wt()+500,Uo()))}break;case 13:Us(function(){var m=oo(i,1);if(m!==null){var b=nr();hi(m,i,1,b)}}),bm(i,1)}},ri=function(i){if(i.tag===13){var s=oo(i,134217728);if(s!==null){var c=nr();hi(s,i,134217728,c)}bm(i,134217728)}},Vl=function(i){if(i.tag===13){var s=$o(i),c=oo(i,s);if(c!==null){var m=nr();hi(c,i,s,m)}bm(i,s)}},Po=function(){return vt},ms=function(i,s){var c=vt;try{return vt=i,s()}finally{vt=c}},xn=function(i,s,c){switch(s){case"input":if(qi(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var m=c[s];if(m!==i&&m.form===i.form){var b=id(m);if(!b)throw Error(t(90));ar(m),qi(m,b)}}}break;case"textarea":P(i,c);break;case"select":s=c.value,s!=null&&Qn(i,!!c.multiple,s,!1)}},Zn=fm,mt=Us;var ER={usingClientEntryPoint:!1,Events:[cc,Fa,id,et,Dr,fm]},Sc={findFiberByHostInstance:Ms,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},PR={bundleType:Sc.bundleType,version:Sc.version,rendererPackageName:Sc.rendererPackageName,rendererConfig:Sc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:L.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=ju(i),i===null?null:i.stateNode},findFiberByHostInstance:Sc.findFiberByHostInstance||_R,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zd.isDisabled&&zd.supportsFiber)try{Nr=zd.inject(PR),On=zd}catch{}}return rr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ER,rr.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wm(s))throw Error(t(200));return TR(i,s,null,c)},rr.createRoot=function(i,s){if(!wm(i))throw Error(t(299));var c=!1,m="",b=xk;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onRecoverableError!==void 0&&(b=s.onRecoverableError)),s=ym(i,1,!1,null,null,c,!1,m,b),i[to]=s.current,sc(i.nodeType===8?i.parentNode:i),new km(s)},rr.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(t(188)):(i=Object.keys(i).join(","),Error(t(268,i)));return i=ju(s),i=i===null?null:i.stateNode,i},rr.flushSync=function(i){return Us(i)},rr.hydrate=function(i,s,c){if(!Bd(s))throw Error(t(200));return Vd(null,i,s,!0,c)},rr.hydrateRoot=function(i,s,c){if(!wm(i))throw Error(t(405));var m=c!=null&&c.hydratedSources||null,b=!1,k="",E=xk;if(c!=null&&(c.unstable_strictMode===!0&&(b=!0),c.identifierPrefix!==void 0&&(k=c.identifierPrefix),c.onRecoverableError!==void 0&&(E=c.onRecoverableError)),s=Tk(s,null,i,1,c??null,b,!1,k,E),i[to]=s.current,sc(i),m)for(i=0;i<m.length;i++)c=m[i],b=c._getVersion,b=b(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,b]:s.mutableSourceEagerHydrationData.push(c,b);return new Ud(s)},rr.render=function(i,s,c){if(!Bd(s))throw Error(t(200));return Vd(null,i,s,!1,c)},rr.unmountComponentAtNode=function(i){if(!Bd(i))throw Error(t(40));return i._reactRootContainer?(Us(function(){Vd(null,null,i,!1,function(){i._reactRootContainer=null,i[to]=null})}),!0):!1},rr.unstable_batchedUpdates=fm,rr.unstable_renderSubtreeIntoContainer=function(i,s,c,m){if(!Bd(c))throw Error(t(200));if(i==null||i._reactInternals===void 0)throw Error(t(38));return Vd(i,s,c,!1,m)},rr.version="18.3.1-next-f1338f8080-20240426",rr}var Am;function Dk(){if(Am)return $d.exports;Am=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),$d.exports=Lk(),$d.exports}var Om;function Nk(){if(Om)return _c;Om=1;var n=Dk();return _c.createRoot=n.createRoot,_c.hydrateRoot=n.hydrateRoot,_c}var jk=Nk(),Lm=function(n,e,t,r){var o;e[0]=0;for(var a=1;a<e.length;a++){var l=e[a++],u=e[a]?(e[0]|=l?1:2,t[e[a++]]):e[++a];l===3?r[0]=u:l===4?r[1]=Object.assign(r[1]||{},u):l===5?(r[1]=r[1]||{})[e[++a]]=u:l===6?r[1][e[++a]]+=u+"":l?(o=n.apply(u,Lm(n,u,t,["",null])),r.push(o),u[0]?e[0]|=2:(e[a-2]=0,e[a]=o)):r.push(u)}return r},Dm=new Map;function Fk(n){var e=Dm.get(this);return e||(e=new Map,Dm.set(this,e)),(e=Lm(this,e.get(n)||(e.set(n,e=function(t){for(var r,o,a=1,l="",u="",f=[0],p=function(_){a===1&&(_||(l=l.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?f.push(0,_,l):a===3&&(_||l)?(f.push(3,_,l),a=2):a===2&&l==="..."&&_?f.push(4,_,0):a===2&&l&&!_?f.push(5,0,!0,l):a>=5&&((l||!_&&a===5)&&(f.push(a,0,l,o),a=6),_&&(f.push(a,_,0,o),a=6)),l=""},g=0;g<t.length;g++){g&&(a===1&&p(),p(g));for(var C=0;C<t[g].length;C++)r=t[g][C],a===1?r==="<"?(p(),f=[f],a=3):l+=r:a===4?l==="--"&&r===">"?(a=1,l=""):l=r+l[0]:u?r===u?u="":l+=r:r==='"'||r==="'"?u=r:r===">"?(p(),a=1):a&&(r==="="?(a=5,o=l,l=""):r==="/"&&(a<5||t[g][C+1]===">")?(p(),a===3&&(f=f[0]),a=f,(f=f[0]).push(2,0,a),a=0):r===" "||r===" "||r===`
41
- `||r==="\r"?(p(),a=2):l+=r),a===3&&l==="!--"&&(a=4,f=f[0])}return p(),f}(n)),e),arguments,[])).length>1?e:e[0]}function Ws(n){return n!=null&&typeof n=="object"&&n["@@functional/placeholder"]===!0}function Jo(n){return function e(t){return arguments.length===0||Ws(t)?e:n.apply(this,arguments)}}function Kd(n){return function e(t,r){switch(arguments.length){case 0:return e;case 1:return Ws(t)?e:Jo(function(o){return n(t,o)});default:return Ws(t)&&Ws(r)?e:Ws(t)?Jo(function(o){return n(o,r)}):Ws(r)?Jo(function(o){return n(t,o)}):n(t,r)}}}const Uk=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)==="[object Array]"};function Bk(n){return n!=null&&typeof n["@@transducer/step"]=="function"}function Nm(n,e,t){return function(){if(arguments.length===0)return t();var r=arguments[arguments.length-1];if(!Uk(r)){for(var o=0;o<n.length;){if(typeof r[n[o]]=="function")return r[n[o]].apply(r,Array.prototype.slice.call(arguments,0,-1));o+=1}if(Bk(r)){var a=e.apply(null,Array.prototype.slice.call(arguments,0,-1));return a(r)}}return t.apply(this,arguments)}}const Jd={init:function(){return this.xf["@@transducer/init"]()},result:function(n){return this.xf["@@transducer/result"](n)}};function jm(n){for(var e=[],t;!(t=n.next()).done;)e.push(t.value);return e}function Fm(n,e,t){for(var r=0,o=t.length;r<o;){if(n(e,t[r]))return!0;r+=1}return!1}function Vk(n){var e=String(n).match(/^function (\w*)/);return e==null?"":e[1]}function xc(n,e){return Object.prototype.hasOwnProperty.call(e,n)}function zk(n,e){return n===e?n!==0||1/n===1/e:n!==n&&e!==e}const Yd=typeof Object.is=="function"?Object.is:zk;var Um=Object.prototype.toString,Wk=function(){return Um.call(arguments)==="[object Arguments]"?function(e){return Um.call(e)==="[object Arguments]"}:function(e){return xc("callee",e)}}(),Hk=!{toString:null}.propertyIsEnumerable("toString"),Bm=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Vm=function(){return arguments.propertyIsEnumerable("length")}(),$k=function(e,t){for(var r=0;r<e.length;){if(e[r]===t)return!0;r+=1}return!1},zm=Jo(typeof Object.keys=="function"&&!Vm?function(e){return Object(e)!==e?[]:Object.keys(e)}:function(e){if(Object(e)!==e)return[];var t,r,o=[],a=Vm&&Wk(e);for(t in e)xc(t,e)&&(!a||t!=="length")&&(o[o.length]=t);if(Hk)for(r=Bm.length-1;r>=0;)t=Bm[r],xc(t,e)&&!$k(o,t)&&(o[o.length]=t),r-=1;return o}),Wm=Jo(function(e){return e===null?"Null":e===void 0?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function Hm(n,e,t,r){var o=jm(n),a=jm(e);function l(u,f){return Qd(u,f,t.slice(),r.slice())}return!Fm(function(u,f){return!Fm(l,f,u)},a,o)}function Qd(n,e,t,r){if(Yd(n,e))return!0;var o=Wm(n);if(o!==Wm(e))return!1;if(typeof n["fantasy-land/equals"]=="function"||typeof e["fantasy-land/equals"]=="function")return typeof n["fantasy-land/equals"]=="function"&&n["fantasy-land/equals"](e)&&typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](n);if(typeof n.equals=="function"||typeof e.equals=="function")return typeof n.equals=="function"&&n.equals(e)&&typeof e.equals=="function"&&e.equals(n);switch(o){case"Arguments":case"Array":case"Object":if(typeof n.constructor=="function"&&Vk(n.constructor)==="Promise")return n===e;break;case"Boolean":case"Number":case"String":if(!(typeof n==typeof e&&Yd(n.valueOf(),e.valueOf())))return!1;break;case"Date":if(!Yd(n.valueOf(),e.valueOf()))return!1;break;case"Error":return n.name===e.name&&n.message===e.message;case"RegExp":if(!(n.source===e.source&&n.global===e.global&&n.ignoreCase===e.ignoreCase&&n.multiline===e.multiline&&n.sticky===e.sticky&&n.unicode===e.unicode))return!1;break}for(var a=t.length-1;a>=0;){if(t[a]===n)return r[a]===e;a-=1}switch(o){case"Map":return n.size!==e.size?!1:Hm(n.entries(),e.entries(),t.concat([n]),r.concat([e]));case"Set":return n.size!==e.size?!1:Hm(n.values(),e.values(),t.concat([n]),r.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var l=zm(n);if(l.length!==zm(e).length)return!1;var u=t.concat([n]),f=r.concat([e]);for(a=l.length-1;a>=0;){var p=l[a];if(!(xc(p,e)&&Qd(e[p],n[p],u,f)))return!1;a-=1}return!0}var Xd=Kd(function(e,t){return Qd(e,t,[],[])});function qk(n,e,t){var r,o;if(typeof n.indexOf=="function")switch(typeof e){case"number":if(e===0){for(r=1/e;t<n.length;){if(o=n[t],o===0&&1/o===r)return t;t+=1}return-1}else if(e!==e){for(;t<n.length;){if(o=n[t],typeof o=="number"&&o!==o)return t;t+=1}return-1}return n.indexOf(e,t);case"string":case"boolean":case"function":case"undefined":return n.indexOf(e,t);case"object":if(e===null)return n.indexOf(e,t)}for(;t<n.length;){if(Xd(n[t],e))return t;t+=1}return-1}function $m(n,e){return qk(e,n,0)>=0}function Gk(n){return n}var Kk=Jo(Gk),qm=function(){function n(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return n.prototype.add=function(e){return!Gm(e,!0,this)},n.prototype.has=function(e){return Gm(e,!1,this)},n}();function Gm(n,e,t){var r=typeof n,o,a;switch(r){case"string":case"number":return n===0&&1/n===-1/0?t._items["-0"]?!0:(e&&(t._items["-0"]=!0),!1):t._nativeSet!==null?e?(o=t._nativeSet.size,t._nativeSet.add(n),a=t._nativeSet.size,a===o):t._nativeSet.has(n):r in t._items?n in t._items[r]?!0:(e&&(t._items[r][n]=!0),!1):(e&&(t._items[r]={},t._items[r][n]=!0),!1);case"boolean":if(r in t._items){var l=n?1:0;return t._items[r][l]?!0:(e&&(t._items[r][l]=!0),!1)}else return e&&(t._items[r]=n?[!1,!0]:[!0,!1]),!1;case"function":return t._nativeSet!==null?e?(o=t._nativeSet.size,t._nativeSet.add(n),a=t._nativeSet.size,a===o):t._nativeSet.has(n):r in t._items?$m(n,t._items[r])?!0:(e&&t._items[r].push(n),!1):(e&&(t._items[r]=[n]),!1);case"undefined":return t._items[r]?!0:(e&&(t._items[r]=!0),!1);case"object":if(n===null)return t._items.null?!0:(e&&(t._items.null=!0),!1);default:return r=Object.prototype.toString.call(n),r in t._items?$m(n,t._items[r])?!0:(e&&t._items[r].push(n),!1):(e&&(t._items[r]=[n]),!1)}}var Jk=function(){function n(e,t){this.xf=t,this.f=e,this.idx=-1,this.lastIdx=-1}return n.prototype["@@transducer/init"]=Jd.init,n.prototype["@@transducer/result"]=function(e){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](e,this.lastIdx))},n.prototype["@@transducer/step"]=function(e,t){return this.idx+=1,this.f(t)&&(this.lastIdx=this.idx),e},n}();function Yk(n){return function(e){return new Jk(n,e)}}var Km=Kd(Nm([],Yk,function(e,t){for(var r=t.length-1;r>=0;){if(e(t[r]))return r;r-=1}return-1})),Qk=function(){function n(e,t){this.xf=t,this.f=e,this.set=new qm}return n.prototype["@@transducer/init"]=Jd.init,n.prototype["@@transducer/result"]=Jd.result,n.prototype["@@transducer/step"]=function(e,t){return this.set.add(this.f(t))?this.xf["@@transducer/step"](e,t):e},n}();function Xk(n){return function(e){return new Qk(n,e)}}var Zk=Kd(Nm([],Xk,function(n,e){for(var t=new qm,r=[],o=0,a,l;o<e.length;)l=e[o],a=n(l),t.add(a)&&r.push(l),o+=1;return r})),ew=Zk(Kk);const tw={version:"1.2.2-alpha.1"};var wn=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global||{},zn={searchParams:"URLSearchParams"in wn,iterable:"Symbol"in wn&&"iterator"in Symbol,blob:"FileReader"in wn&&"Blob"in wn&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in wn,arrayBuffer:"ArrayBuffer"in wn};function nw(n){return n&&DataView.prototype.isPrototypeOf(n)}if(zn.arrayBuffer)var rw=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],iw=ArrayBuffer.isView||function(n){return n&&rw.indexOf(Object.prototype.toString.call(n))>-1};function Hs(n){if(typeof n!="string"&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(n)||n==="")throw new TypeError('Invalid character in header field name: "'+n+'"');return n.toLowerCase()}function Zd(n){return typeof n!="string"&&(n=String(n)),n}function ef(n){var e={next:function(){var t=n.shift();return{done:t===void 0,value:t}}};return zn.iterable&&(e[Symbol.iterator]=function(){return e}),e}function an(n){this.map={},n instanceof an?n.forEach(function(e,t){this.append(t,e)},this):Array.isArray(n)?n.forEach(function(e){if(e.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):n&&Object.getOwnPropertyNames(n).forEach(function(e){this.append(e,n[e])},this)}an.prototype.append=function(n,e){n=Hs(n),e=Zd(e);var t=this.map[n];this.map[n]=t?t+", "+e:e},an.prototype.delete=function(n){delete this.map[Hs(n)]},an.prototype.get=function(n){return n=Hs(n),this.has(n)?this.map[n]:null},an.prototype.has=function(n){return this.map.hasOwnProperty(Hs(n))},an.prototype.set=function(n,e){this.map[Hs(n)]=Zd(e)},an.prototype.forEach=function(n,e){for(var t in this.map)this.map.hasOwnProperty(t)&&n.call(e,this.map[t],t,this)},an.prototype.keys=function(){var n=[];return this.forEach(function(e,t){n.push(t)}),ef(n)},an.prototype.values=function(){var n=[];return this.forEach(function(e){n.push(e)}),ef(n)},an.prototype.entries=function(){var n=[];return this.forEach(function(e,t){n.push([t,e])}),ef(n)},zn.iterable&&(an.prototype[Symbol.iterator]=an.prototype.entries);function tf(n){if(!n._noBody){if(n.bodyUsed)return Promise.reject(new TypeError("Already read"));n.bodyUsed=!0}}function Jm(n){return new Promise(function(e,t){n.onload=function(){e(n.result)},n.onerror=function(){t(n.error)}})}function ow(n){var e=new FileReader,t=Jm(e);return e.readAsArrayBuffer(n),t}function sw(n){var e=new FileReader,t=Jm(e),r=/charset=([A-Za-z0-9_-]+)/.exec(n.type),o=r?r[1]:"utf-8";return e.readAsText(n,o),t}function aw(n){for(var e=new Uint8Array(n),t=new Array(e.length),r=0;r<e.length;r++)t[r]=String.fromCharCode(e[r]);return t.join("")}function Ym(n){if(n.slice)return n.slice(0);var e=new Uint8Array(n.byteLength);return e.set(new Uint8Array(n)),e.buffer}function Qm(){return this.bodyUsed=!1,this._initBody=function(n){this.bodyUsed=this.bodyUsed,this._bodyInit=n,n?typeof n=="string"?this._bodyText=n:zn.blob&&Blob.prototype.isPrototypeOf(n)?this._bodyBlob=n:zn.formData&&FormData.prototype.isPrototypeOf(n)?this._bodyFormData=n:zn.searchParams&&URLSearchParams.prototype.isPrototypeOf(n)?this._bodyText=n.toString():zn.arrayBuffer&&zn.blob&&nw(n)?(this._bodyArrayBuffer=Ym(n.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):zn.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(n)||iw(n))?this._bodyArrayBuffer=Ym(n):this._bodyText=n=Object.prototype.toString.call(n):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof n=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):zn.searchParams&&URLSearchParams.prototype.isPrototypeOf(n)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},zn.blob&&(this.blob=function(){var n=tf(this);if(n)return n;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var n=tf(this);return n||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(zn.blob)return this.blob().then(ow);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var n=tf(this);if(n)return n;if(this._bodyBlob)return sw(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(aw(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},zn.formData&&(this.formData=function(){return this.text().then(uw)}),this.json=function(){return this.text().then(JSON.parse)},this}var lw=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function cw(n){var e=n.toUpperCase();return lw.indexOf(e)>-1?e:n}function Yo(n,e){if(!(this instanceof Yo))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e=e||{};var t=e.body;if(n instanceof Yo){if(n.bodyUsed)throw new TypeError("Already read");this.url=n.url,this.credentials=n.credentials,e.headers||(this.headers=new an(n.headers)),this.method=n.method,this.mode=n.mode,this.signal=n.signal,!t&&n._bodyInit!=null&&(t=n._bodyInit,n.bodyUsed=!0)}else this.url=String(n);if(this.credentials=e.credentials||this.credentials||"same-origin",(e.headers||!this.headers)&&(this.headers=new an(e.headers)),this.method=cw(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in wn){var a=new AbortController;return a.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&t)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(t),(this.method==="GET"||this.method==="HEAD")&&(e.cache==="no-store"||e.cache==="no-cache")){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+new Date().getTime());else{var o=/\?/;this.url+=(o.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}Yo.prototype.clone=function(){return new Yo(this,{body:this._bodyInit})};function uw(n){var e=new FormData;return n.trim().split("&").forEach(function(t){if(t){var r=t.split("="),o=r.shift().replace(/\+/g," "),a=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(a))}}),e}function dw(n){var e=new an,t=n.replace(/\r?\n[\t ]+/g," ");return t.split("\r").map(function(r){return r.indexOf(`
41
+ `||r==="\r"?(p(),a=2):l+=r),a===3&&l==="!--"&&(a=4,f=f[0])}return p(),f}(n)),e),arguments,[])).length>1?e:e[0]}function Ws(n){return n!=null&&typeof n=="object"&&n["@@functional/placeholder"]===!0}function Jo(n){return function e(t){return arguments.length===0||Ws(t)?e:n.apply(this,arguments)}}function Kd(n){return function e(t,r){switch(arguments.length){case 0:return e;case 1:return Ws(t)?e:Jo(function(o){return n(t,o)});default:return Ws(t)&&Ws(r)?e:Ws(t)?Jo(function(o){return n(o,r)}):Ws(r)?Jo(function(o){return n(t,o)}):n(t,r)}}}const Uk=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)==="[object Array]"};function Bk(n){return n!=null&&typeof n["@@transducer/step"]=="function"}function Nm(n,e,t){return function(){if(arguments.length===0)return t();var r=arguments[arguments.length-1];if(!Uk(r)){for(var o=0;o<n.length;){if(typeof r[n[o]]=="function")return r[n[o]].apply(r,Array.prototype.slice.call(arguments,0,-1));o+=1}if(Bk(r)){var a=e.apply(null,Array.prototype.slice.call(arguments,0,-1));return a(r)}}return t.apply(this,arguments)}}const Jd={init:function(){return this.xf["@@transducer/init"]()},result:function(n){return this.xf["@@transducer/result"](n)}};function jm(n){for(var e=[],t;!(t=n.next()).done;)e.push(t.value);return e}function Fm(n,e,t){for(var r=0,o=t.length;r<o;){if(n(e,t[r]))return!0;r+=1}return!1}function Vk(n){var e=String(n).match(/^function (\w*)/);return e==null?"":e[1]}function xc(n,e){return Object.prototype.hasOwnProperty.call(e,n)}function zk(n,e){return n===e?n!==0||1/n===1/e:n!==n&&e!==e}const Yd=typeof Object.is=="function"?Object.is:zk;var Um=Object.prototype.toString,Wk=function(){return Um.call(arguments)==="[object Arguments]"?function(e){return Um.call(e)==="[object Arguments]"}:function(e){return xc("callee",e)}}(),Hk=!{toString:null}.propertyIsEnumerable("toString"),Bm=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Vm=function(){return arguments.propertyIsEnumerable("length")}(),$k=function(e,t){for(var r=0;r<e.length;){if(e[r]===t)return!0;r+=1}return!1},zm=Jo(typeof Object.keys=="function"&&!Vm?function(e){return Object(e)!==e?[]:Object.keys(e)}:function(e){if(Object(e)!==e)return[];var t,r,o=[],a=Vm&&Wk(e);for(t in e)xc(t,e)&&(!a||t!=="length")&&(o[o.length]=t);if(Hk)for(r=Bm.length-1;r>=0;)t=Bm[r],xc(t,e)&&!$k(o,t)&&(o[o.length]=t),r-=1;return o}),Wm=Jo(function(e){return e===null?"Null":e===void 0?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function Hm(n,e,t,r){var o=jm(n),a=jm(e);function l(u,f){return Qd(u,f,t.slice(),r.slice())}return!Fm(function(u,f){return!Fm(l,f,u)},a,o)}function Qd(n,e,t,r){if(Yd(n,e))return!0;var o=Wm(n);if(o!==Wm(e))return!1;if(typeof n["fantasy-land/equals"]=="function"||typeof e["fantasy-land/equals"]=="function")return typeof n["fantasy-land/equals"]=="function"&&n["fantasy-land/equals"](e)&&typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](n);if(typeof n.equals=="function"||typeof e.equals=="function")return typeof n.equals=="function"&&n.equals(e)&&typeof e.equals=="function"&&e.equals(n);switch(o){case"Arguments":case"Array":case"Object":if(typeof n.constructor=="function"&&Vk(n.constructor)==="Promise")return n===e;break;case"Boolean":case"Number":case"String":if(!(typeof n==typeof e&&Yd(n.valueOf(),e.valueOf())))return!1;break;case"Date":if(!Yd(n.valueOf(),e.valueOf()))return!1;break;case"Error":return n.name===e.name&&n.message===e.message;case"RegExp":if(!(n.source===e.source&&n.global===e.global&&n.ignoreCase===e.ignoreCase&&n.multiline===e.multiline&&n.sticky===e.sticky&&n.unicode===e.unicode))return!1;break}for(var a=t.length-1;a>=0;){if(t[a]===n)return r[a]===e;a-=1}switch(o){case"Map":return n.size!==e.size?!1:Hm(n.entries(),e.entries(),t.concat([n]),r.concat([e]));case"Set":return n.size!==e.size?!1:Hm(n.values(),e.values(),t.concat([n]),r.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var l=zm(n);if(l.length!==zm(e).length)return!1;var u=t.concat([n]),f=r.concat([e]);for(a=l.length-1;a>=0;){var p=l[a];if(!(xc(p,e)&&Qd(e[p],n[p],u,f)))return!1;a-=1}return!0}var Xd=Kd(function(e,t){return Qd(e,t,[],[])});function qk(n,e,t){var r,o;if(typeof n.indexOf=="function")switch(typeof e){case"number":if(e===0){for(r=1/e;t<n.length;){if(o=n[t],o===0&&1/o===r)return t;t+=1}return-1}else if(e!==e){for(;t<n.length;){if(o=n[t],typeof o=="number"&&o!==o)return t;t+=1}return-1}return n.indexOf(e,t);case"string":case"boolean":case"function":case"undefined":return n.indexOf(e,t);case"object":if(e===null)return n.indexOf(e,t)}for(;t<n.length;){if(Xd(n[t],e))return t;t+=1}return-1}function $m(n,e){return qk(e,n,0)>=0}function Gk(n){return n}var Kk=Jo(Gk),qm=function(){function n(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return n.prototype.add=function(e){return!Gm(e,!0,this)},n.prototype.has=function(e){return Gm(e,!1,this)},n}();function Gm(n,e,t){var r=typeof n,o,a;switch(r){case"string":case"number":return n===0&&1/n===-1/0?t._items["-0"]?!0:(e&&(t._items["-0"]=!0),!1):t._nativeSet!==null?e?(o=t._nativeSet.size,t._nativeSet.add(n),a=t._nativeSet.size,a===o):t._nativeSet.has(n):r in t._items?n in t._items[r]?!0:(e&&(t._items[r][n]=!0),!1):(e&&(t._items[r]={},t._items[r][n]=!0),!1);case"boolean":if(r in t._items){var l=n?1:0;return t._items[r][l]?!0:(e&&(t._items[r][l]=!0),!1)}else return e&&(t._items[r]=n?[!1,!0]:[!0,!1]),!1;case"function":return t._nativeSet!==null?e?(o=t._nativeSet.size,t._nativeSet.add(n),a=t._nativeSet.size,a===o):t._nativeSet.has(n):r in t._items?$m(n,t._items[r])?!0:(e&&t._items[r].push(n),!1):(e&&(t._items[r]=[n]),!1);case"undefined":return t._items[r]?!0:(e&&(t._items[r]=!0),!1);case"object":if(n===null)return t._items.null?!0:(e&&(t._items.null=!0),!1);default:return r=Object.prototype.toString.call(n),r in t._items?$m(n,t._items[r])?!0:(e&&t._items[r].push(n),!1):(e&&(t._items[r]=[n]),!1)}}var Jk=function(){function n(e,t){this.xf=t,this.f=e,this.idx=-1,this.lastIdx=-1}return n.prototype["@@transducer/init"]=Jd.init,n.prototype["@@transducer/result"]=function(e){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](e,this.lastIdx))},n.prototype["@@transducer/step"]=function(e,t){return this.idx+=1,this.f(t)&&(this.lastIdx=this.idx),e},n}();function Yk(n){return function(e){return new Jk(n,e)}}var Km=Kd(Nm([],Yk,function(e,t){for(var r=t.length-1;r>=0;){if(e(t[r]))return r;r-=1}return-1})),Qk=function(){function n(e,t){this.xf=t,this.f=e,this.set=new qm}return n.prototype["@@transducer/init"]=Jd.init,n.prototype["@@transducer/result"]=Jd.result,n.prototype["@@transducer/step"]=function(e,t){return this.set.add(this.f(t))?this.xf["@@transducer/step"](e,t):e},n}();function Xk(n){return function(e){return new Qk(n,e)}}var Zk=Kd(Nm([],Xk,function(n,e){for(var t=new qm,r=[],o=0,a,l;o<e.length;)l=e[o],a=n(l),t.add(a)&&r.push(l),o+=1;return r})),ew=Zk(Kk);const tw={version:"1.2.2"};var wn=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global||{},zn={searchParams:"URLSearchParams"in wn,iterable:"Symbol"in wn&&"iterator"in Symbol,blob:"FileReader"in wn&&"Blob"in wn&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in wn,arrayBuffer:"ArrayBuffer"in wn};function nw(n){return n&&DataView.prototype.isPrototypeOf(n)}if(zn.arrayBuffer)var rw=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],iw=ArrayBuffer.isView||function(n){return n&&rw.indexOf(Object.prototype.toString.call(n))>-1};function Hs(n){if(typeof n!="string"&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(n)||n==="")throw new TypeError('Invalid character in header field name: "'+n+'"');return n.toLowerCase()}function Zd(n){return typeof n!="string"&&(n=String(n)),n}function ef(n){var e={next:function(){var t=n.shift();return{done:t===void 0,value:t}}};return zn.iterable&&(e[Symbol.iterator]=function(){return e}),e}function an(n){this.map={},n instanceof an?n.forEach(function(e,t){this.append(t,e)},this):Array.isArray(n)?n.forEach(function(e){if(e.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):n&&Object.getOwnPropertyNames(n).forEach(function(e){this.append(e,n[e])},this)}an.prototype.append=function(n,e){n=Hs(n),e=Zd(e);var t=this.map[n];this.map[n]=t?t+", "+e:e},an.prototype.delete=function(n){delete this.map[Hs(n)]},an.prototype.get=function(n){return n=Hs(n),this.has(n)?this.map[n]:null},an.prototype.has=function(n){return this.map.hasOwnProperty(Hs(n))},an.prototype.set=function(n,e){this.map[Hs(n)]=Zd(e)},an.prototype.forEach=function(n,e){for(var t in this.map)this.map.hasOwnProperty(t)&&n.call(e,this.map[t],t,this)},an.prototype.keys=function(){var n=[];return this.forEach(function(e,t){n.push(t)}),ef(n)},an.prototype.values=function(){var n=[];return this.forEach(function(e){n.push(e)}),ef(n)},an.prototype.entries=function(){var n=[];return this.forEach(function(e,t){n.push([t,e])}),ef(n)},zn.iterable&&(an.prototype[Symbol.iterator]=an.prototype.entries);function tf(n){if(!n._noBody){if(n.bodyUsed)return Promise.reject(new TypeError("Already read"));n.bodyUsed=!0}}function Jm(n){return new Promise(function(e,t){n.onload=function(){e(n.result)},n.onerror=function(){t(n.error)}})}function ow(n){var e=new FileReader,t=Jm(e);return e.readAsArrayBuffer(n),t}function sw(n){var e=new FileReader,t=Jm(e),r=/charset=([A-Za-z0-9_-]+)/.exec(n.type),o=r?r[1]:"utf-8";return e.readAsText(n,o),t}function aw(n){for(var e=new Uint8Array(n),t=new Array(e.length),r=0;r<e.length;r++)t[r]=String.fromCharCode(e[r]);return t.join("")}function Ym(n){if(n.slice)return n.slice(0);var e=new Uint8Array(n.byteLength);return e.set(new Uint8Array(n)),e.buffer}function Qm(){return this.bodyUsed=!1,this._initBody=function(n){this.bodyUsed=this.bodyUsed,this._bodyInit=n,n?typeof n=="string"?this._bodyText=n:zn.blob&&Blob.prototype.isPrototypeOf(n)?this._bodyBlob=n:zn.formData&&FormData.prototype.isPrototypeOf(n)?this._bodyFormData=n:zn.searchParams&&URLSearchParams.prototype.isPrototypeOf(n)?this._bodyText=n.toString():zn.arrayBuffer&&zn.blob&&nw(n)?(this._bodyArrayBuffer=Ym(n.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):zn.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(n)||iw(n))?this._bodyArrayBuffer=Ym(n):this._bodyText=n=Object.prototype.toString.call(n):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof n=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):zn.searchParams&&URLSearchParams.prototype.isPrototypeOf(n)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},zn.blob&&(this.blob=function(){var n=tf(this);if(n)return n;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var n=tf(this);return n||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(zn.blob)return this.blob().then(ow);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var n=tf(this);if(n)return n;if(this._bodyBlob)return sw(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(aw(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},zn.formData&&(this.formData=function(){return this.text().then(uw)}),this.json=function(){return this.text().then(JSON.parse)},this}var lw=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function cw(n){var e=n.toUpperCase();return lw.indexOf(e)>-1?e:n}function Yo(n,e){if(!(this instanceof Yo))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e=e||{};var t=e.body;if(n instanceof Yo){if(n.bodyUsed)throw new TypeError("Already read");this.url=n.url,this.credentials=n.credentials,e.headers||(this.headers=new an(n.headers)),this.method=n.method,this.mode=n.mode,this.signal=n.signal,!t&&n._bodyInit!=null&&(t=n._bodyInit,n.bodyUsed=!0)}else this.url=String(n);if(this.credentials=e.credentials||this.credentials||"same-origin",(e.headers||!this.headers)&&(this.headers=new an(e.headers)),this.method=cw(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in wn){var a=new AbortController;return a.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&t)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(t),(this.method==="GET"||this.method==="HEAD")&&(e.cache==="no-store"||e.cache==="no-cache")){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+new Date().getTime());else{var o=/\?/;this.url+=(o.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}Yo.prototype.clone=function(){return new Yo(this,{body:this._bodyInit})};function uw(n){var e=new FormData;return n.trim().split("&").forEach(function(t){if(t){var r=t.split("="),o=r.shift().replace(/\+/g," "),a=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(a))}}),e}function dw(n){var e=new an,t=n.replace(/\r?\n[\t ]+/g," ");return t.split("\r").map(function(r){return r.indexOf(`
42
42
  `)===0?r.substr(1,r.length):r}).forEach(function(r){var o=r.split(":"),a=o.shift().trim();if(a){var l=o.join(":").trim();try{e.append(a,l)}catch(u){console.warn("Response "+u.message)}}}),e}Qm.call(Yo.prototype);function pi(n,e){if(!(this instanceof pi))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e||(e={}),this.type="default",this.status=e.status===void 0?200:e.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText===void 0?"":""+e.statusText,this.headers=new an(e.headers),this.url=e.url||"",this._initBody(n)}Qm.call(pi.prototype),pi.prototype.clone=function(){return new pi(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new an(this.headers),url:this.url})},pi.error=function(){var n=new pi(null,{status:200,statusText:""});return n.ok=!1,n.status=0,n.type="error",n};var fw=[301,302,303,307,308];pi.redirect=function(n,e){if(fw.indexOf(e)===-1)throw new RangeError("Invalid status code");return new pi(null,{status:e,headers:{location:n}})};var Qo=wn.DOMException;try{new Qo}catch{Qo=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},Qo.prototype=Object.create(Error.prototype),Qo.prototype.constructor=Qo}function Xm(n,e){return new Promise(function(t,r){var o=new Yo(n,e);if(o.signal&&o.signal.aborted)return r(new Qo("Aborted","AbortError"));var a=new XMLHttpRequest;function l(){a.abort()}a.onload=function(){var p={statusText:a.statusText,headers:dw(a.getAllResponseHeaders()||"")};o.url.indexOf("file://")===0&&(a.status<200||a.status>599)?p.status=200:p.status=a.status,p.url="responseURL"in a?a.responseURL:p.headers.get("X-Request-URL");var g="response"in a?a.response:a.responseText;setTimeout(function(){t(new pi(g,p))},0)},a.onerror=function(){setTimeout(function(){r(new TypeError("Network request failed"))},0)},a.ontimeout=function(){setTimeout(function(){r(new TypeError("Network request timed out"))},0)},a.onabort=function(){setTimeout(function(){r(new Qo("Aborted","AbortError"))},0)};function u(p){try{return p===""&&wn.location.href?wn.location.href:p}catch{return p}}if(a.open(o.method,u(o.url),!0),o.credentials==="include"?a.withCredentials=!0:o.credentials==="omit"&&(a.withCredentials=!1),"responseType"in a&&(zn.blob?a.responseType="blob":zn.arrayBuffer&&(a.responseType="arraybuffer")),e&&typeof e.headers=="object"&&!(e.headers instanceof an||wn.Headers&&e.headers instanceof wn.Headers)){var f=[];Object.getOwnPropertyNames(e.headers).forEach(function(p){f.push(Hs(p)),a.setRequestHeader(p,Zd(e.headers[p]))}),o.headers.forEach(function(p,g){f.indexOf(g)===-1&&a.setRequestHeader(g,p)})}else o.headers.forEach(function(p,g){a.setRequestHeader(g,p)});o.signal&&(o.signal.addEventListener("abort",l),a.onreadystatechange=function(){a.readyState===4&&o.signal.removeEventListener("abort",l)}),a.send(typeof o._bodyInit>"u"?null:o._bodyInit)})}Xm.polyfill=!0,wn.fetch||(wn.fetch=Xm,wn.Headers=an,wn.Request=Yo,wn.Response=pi);var nf,Zm;function hw(){return Zm||(Zm=1,nf=self.fetch.bind(self)),nf}var pw=hw();const rf=Tt(pw);function Vt(n){return n!=null&&typeof n=="object"&&n["@@functional/placeholder"]===!0}function Xo(n){return function e(t){return arguments.length===0||Vt(t)?e:n.apply(this,arguments)}}function $s(n){return function e(t,r){switch(arguments.length){case 0:return e;case 1:return Vt(t)?e:Xo(function(o){return n(t,o)});default:return Vt(t)&&Vt(r)?e:Vt(t)?Xo(function(o){return n(o,r)}):Vt(r)?Xo(function(o){return n(t,o)}):n(t,r)}}}function mw(n,e){n=n||[],e=e||[];var t,r=n.length,o=e.length,a=[];for(t=0;t<r;)a[a.length]=n[t],t+=1;for(t=0;t<o;)a[a.length]=e[t],t+=1;return a}function gw(n){return function e(t,r,o){switch(arguments.length){case 0:return e;case 1:return Vt(t)?e:$s(function(a,l){return n(t,a,l)});case 2:return Vt(t)&&Vt(r)?e:Vt(t)?$s(function(a,l){return n(a,r,l)}):Vt(r)?$s(function(a,l){return n(t,a,l)}):Xo(function(a){return n(t,r,a)});default:return Vt(t)&&Vt(r)&&Vt(o)?e:Vt(t)&&Vt(r)?$s(function(a,l){return n(a,l,o)}):Vt(t)&&Vt(o)?$s(function(a,l){return n(a,r,l)}):Vt(r)&&Vt(o)?$s(function(a,l){return n(t,a,l)}):Vt(t)?Xo(function(a){return n(a,r,o)}):Vt(r)?Xo(function(a){return n(t,a,o)}):Vt(o)?Xo(function(a){return n(t,r,a)}):n(t,r,o)}}}var eg=gw(function(e,t,r){var o=r.length;if(e>=o||e<-o)return r;var a=(o+e)%o,l=mw(r);return l[a]=t(r[a]),l});/*! *****************************************************************************
43
43
  Copyright (c) Microsoft Corporation. All rights reserved.
44
44
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -57,7 +57,7 @@ Error generating stack: `+k.message+`
57
57
  * by Pedro Ladaria <pedro.ladaria@gmail.com>
58
58
  * https://github.com/pladaria/reconnecting-websocket
59
59
  * License MIT
60
- */var Cw=function(){if(typeof WebSocket<"u")return WebSocket},Sw=function(n){return typeof n<"u"&&!!n&&n.CLOSING===2},Zo={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},sf=function(){function n(e,t,r){var o=this;r===void 0&&(r={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(a){o._debug("open event");var l=o._options.minUptime,u=l===void 0?Zo.minUptime:l;clearTimeout(o._connectTimeout),o._uptimeTimeout=setTimeout(function(){return o._acceptOpen()},u),o._ws.binaryType=o._binaryType,o._messageQueue.forEach(function(f){return o._ws.send(f)}),o._messageQueue=[],o.onopen&&o.onopen(a),o._listeners.open.forEach(function(f){return o._callEventListener(a,f)})},this._handleMessage=function(a){o._debug("message event"),o.onmessage&&o.onmessage(a),o._listeners.message.forEach(function(l){return o._callEventListener(a,l)})},this._handleError=function(a){o._debug("error event",a.message),o._disconnect(void 0,a.message==="TIMEOUT"?"timeout":void 0),o.onerror&&o.onerror(a),o._debug("exec error listeners"),o._listeners.error.forEach(function(l){return o._callEventListener(a,l)}),o._connect()},this._handleClose=function(a){o._debug("close event"),o._clearTimeouts(),o._shouldReconnect&&o._connect(),o.onclose&&o.onclose(a),o._listeners.close.forEach(function(l){return o._callEventListener(a,l)})},this._url=e,this._protocols=t,this._options=r,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(n,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(n,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CONNECTING",{get:function(){return n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"OPEN",{get:function(){return n.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSING",{get:function(){return n.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSED",{get:function(){return n.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bufferedAmount",{get:function(){var e=this._messageQueue.reduce(function(t,r){return typeof r=="string"?t+=r.length:r instanceof Blob?t+=r.size:t+=r.byteLength,t},0);return e+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?n.CLOSED:n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),n.prototype.close=function(e,t){if(e===void 0&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(e,t)},n.prototype.reconnect=function(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(e,t),this._connect())},n.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var t=this._options.maxEnqueuedMessages,r=t===void 0?Zo.maxEnqueuedMessages:t;this._messageQueue.length<r&&(this._debug("enqueue",e),this._messageQueue.push(e))}},n.prototype.addEventListener=function(e,t){this._listeners[e]&&this._listeners[e].push(t)},n.prototype.dispatchEvent=function(e){var t,r,o=this._listeners[e.type];if(o)try{for(var a=vw(o),l=a.next();!l.done;l=a.next()){var u=l.value;this._callEventListener(e,u)}}catch(f){t={error:f}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return!0},n.prototype.removeEventListener=function(e,t){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(function(r){return r!==t}))},n.prototype._debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._options.debug&&console.log.apply(console,bw(["RWS>"],e))},n.prototype._getNextDelay=function(){var e=this._options,t=e.reconnectionDelayGrowFactor,r=t===void 0?Zo.reconnectionDelayGrowFactor:t,o=e.minReconnectionDelay,a=o===void 0?Zo.minReconnectionDelay:o,l=e.maxReconnectionDelay,u=l===void 0?Zo.maxReconnectionDelay:l,f=0;return this._retryCount>0&&(f=a*Math.pow(r,this._retryCount-1),f>u&&(f=u)),this._debug("next delay",f),f},n.prototype._wait=function(){var e=this;return new Promise(function(t){setTimeout(t,e._getNextDelay())})},n.prototype._getNextUrl=function(e){if(typeof e=="string")return Promise.resolve(e);if(typeof e=="function"){var t=e();if(typeof t=="string")return Promise.resolve(t);if(t.then)return t}throw Error("Invalid URL")},n.prototype._connect=function(){var e=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var t=this._options,r=t.maxRetries,o=r===void 0?Zo.maxRetries:r,a=t.connectionTimeout,l=a===void 0?Zo.connectionTimeout:a,u=t.WebSocket,f=u===void 0?Cw():u;if(this._retryCount>=o){this._debug("max retries reached",this._retryCount,">=",o);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!Sw(f))throw Error("No valid WebSocket class provided");this._wait().then(function(){return e._getNextUrl(e._url)}).then(function(p){e._closeCalled||(e._debug("connect",{url:p,protocols:e._protocols}),e._ws=e._protocols?new f(p,e._protocols):new f(p),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout(function(){return e._handleTimeout()},l))})}},n.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new kw(Error("TIMEOUT"),this))},n.prototype._disconnect=function(e,t){if(e===void 0&&(e=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(e,t),this._handleClose(new ww(e,t,this))}catch{}}},n.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},n.prototype._callEventListener=function(e,t){"handleEvent"in t?t.handleEvent(e):t(e)},n.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},n.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},n.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},n}();let Ec;const Tw=new Uint8Array(16);function _w(){if(!Ec&&(Ec=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ec))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ec(Tw)}const Cn=[];for(let n=0;n<256;++n)Cn.push((n+256).toString(16).slice(1));function xw(n,e=0){return Cn[n[e+0]]+Cn[n[e+1]]+Cn[n[e+2]]+Cn[n[e+3]]+"-"+Cn[n[e+4]]+Cn[n[e+5]]+"-"+Cn[n[e+6]]+Cn[n[e+7]]+"-"+Cn[n[e+8]]+Cn[n[e+9]]+"-"+Cn[n[e+10]]+Cn[n[e+11]]+Cn[n[e+12]]+Cn[n[e+13]]+Cn[n[e+14]]+Cn[n[e+15]]}const rg={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ig(n,e,t){if(rg.randomUUID&&!n)return rg.randomUUID();n=n||{};const r=n.random||(n.rng||_w)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,xw(r)}var Ew="@nlxai/core",Pw="1.1.8-alpha.0",Rw="Low-level SDK for building NLX experiences",Iw="module",Mw="lib/index.cjs",Aw="lib/index.esm.js",Ow="lib/index.umd.js",Lw="lib/index.d.ts",Dw={".":{types:"./lib/index.d.ts",import:"./lib/index.esm.js",require:"./lib/index.cjs"}},Nw={build:"rm -rf lib && rollup -c --configPlugin typescript --configImportAttributesKey with",docs:"rm -rf docs/ && typedoc && concat-md --decrease-title-levels --dir-name-as-title docs/ > docs/index.md","lint:check":"eslint src/ --ext .ts,.tsx,.js,.jsx --max-warnings 0",lint:"eslint src/ --ext .ts,.tsx,.js,.jsx --fix",prepublish:"npm run build","preview-docs":"npm run docs && comrak --unsafe --gfm -o docs/index.html docs/index.md && open docs/index.html","publish-docs":"npm run docs && mv docs/index.md ../website/src/content/headless-api-reference.md",test:"typedoc --emit none",tsc:"tsc"},jw="Peter Szerzo <peter@nlx.ai>",Fw="MIT",Uw={"@types/isomorphic-fetch":"^0.0.36","@types/node":"^22.10.1","@types/ramda":"0.29.1","@types/uuid":"^9.0.7","concat-md":"^0.5.1","eslint-config-nlx":"*",prettier:"^3.1.0","rollup-config-nlx":"*",typedoc:"^0.25.13","typedoc-plugin-markdown":"^3.17.1",typescript:"^5.5.4"},Bw={"isomorphic-fetch":"^3.0.0",ramda:"^0.29.1","reconnecting-websocket":"^4.4.0",uuid:"^9.0.1"},Vw={access:"public"},zw="c701b502f0398e9956a8b35b711a45f264fa7603",af={name:Ew,version:Pw,description:Rw,type:Iw,main:Mw,module:Aw,browser:Ow,types:Lw,exports:Dw,scripts:Nw,author:jw,license:Fw,devDependencies:Uw,dependencies:Bw,publishConfig:Vw,gitHead:zw};const qs=console;var Wn;(function(n){n.Application="bot",n.User="user",n.Failure="failure"})(Wn||(Wn={}));const og="NLX.Welcome",Ww="We encountered an issue. Please try again soon.",sg=n=>Array.isArray(n)?n:Object.entries(n).map(([e,t])=>({slotId:e,value:t})),ag=n=>({...n,intentId:n.flowId??n.intentId,slots:n.slots!=null?sg(n.slots):n.slots}),lg=n=>n.responses,lf=n=>{try{return JSON.parse(n)}catch{return null}},cg=n=>{var e;return((e=n.match(/(bots\.dev\.studio\.nlx\.ai|bots\.studio\.nlx\.ai|apps\.nlx\.ai|dev\.apps\.nlx\.ai)/g))==null?void 0:e[0])??"apps.nlx.ai"},Hw=n=>{if(fo(n))return n;const e=cg(n),r=new URL(n).pathname.split("/"),o=r[2],a=r[3];return`wss://us-east-1-ws.${e}?deploymentKey=${o}&channelKey=${a}`},ug=n=>{if(!fo(n))return n;const e=cg(n),t=new URL(n),r=new URLSearchParams(t.search),o=r.get("channelKey"),a=r.get("deploymentKey");return`https://${e}/c/${a}/${o}`},fo=n=>n.indexOf("wss://")===0,$w=n=>(n.applicationUrl??"").length>0;function qw(n){let e,t=[],r=null,o,a=[],l=null;const u=n.applicationUrl??"";/[-|_][a-z]{2,}[-|_][A-Z]{2,}$/.test(u)&&qs.warn("Since v1.0.0, the language code is no longer added at the end of the application URL. Please remove the modifier (e.g. '-en-US') from the URL, and specify it in the `languageCode` parameter instead.");const f={voicePlusCommand:[]},p=n.conversationId??ig();let g={responses:n.responses??[],languageCode:n.languageCode,userId:n.userId,conversationId:p};const C=()=>{var oe;return`${ug(u)}${((oe=n.experimental)==null?void 0:oe.completeApplicationUrl)===!0?"":`-${g.languageCode}`}`},_=(oe,Ie)=>{g={...g,...oe},ee.forEach(pe=>{pe(lg(g),Ie)})},T=()=>{const oe={type:Wn.Failure,receivedAt:new Date().getTime(),payload:{text:n.failureMessage??Ww}};_({responses:[...g.responses,oe]},oe)},N=oe=>{if((oe==null?void 0:oe.messages.length)>0){const Ie={type:Wn.Application,receivedAt:new Date().getTime(),payload:{...oe,messages:oe.messages.map(pe=>({nodeId:pe.nodeId,messageId:pe.messageId,text:pe.text,choices:pe.choices??[]}))}};_({responses:[...g.responses,Ie]},Ie),oe.metadata.hasPendingDataRequest&&($({poll:!0}),setTimeout(()=>{z({request:{structured:{poll:!0}}})},1500))}else qs.warn("Invalid message structure, expected object with field 'messages'."),T()};let A;const H=oe=>{(o==null?void 0:o.readyState)===1?o.send(JSON.stringify(oe)):a=[...a,oe]},z=async oe=>{var pe;if(A!=null){A(oe,le=>{const _e={type:Wn.Application,receivedAt:new Date().getTime(),payload:le};_({responses:[...g.responses,_e]},_e)});return}const Ie={userId:g.userId,conversationId:g.conversationId,...oe,languageCode:g.languageCode,channelType:(pe=n.experimental)==null?void 0:pe.channelType,environment:n.environment};if(fo(u))(e==null?void 0:e.readyState)===1?e.send(JSON.stringify(Ie)):t=[...t,Ie];else try{const le=await rf(C(),{method:"POST",headers:{...n.headers??{},Accept:"application/json","Content-Type":"application/json","nlx-sdk-version":af.version},body:JSON.stringify(Ie)});if(le.status>=400)throw new Error(`Responded with ${le.status}`);const _e=await le.json();N(_e)}catch(le){qs.warn(le),T()}};let ee=[];const U=async()=>{(e==null?void 0:e.readyState)===1&&t[0]!=null&&(await z(t[0]),t=t.slice(1))},L=()=>{(o==null?void 0:o.readyState)===1&&a[0]!=null&&(H(a[0]),a=a.slice(1))},F=()=>{var Ie;se();const oe=new URL(u);((Ie=n.experimental)==null?void 0:Ie.completeApplicationUrl)!==!0&&(oe.searchParams.set("languageCode",g.languageCode),oe.searchParams.set("channelKey",`${oe.searchParams.get("channelKey")??""}-${g.languageCode}`)),oe.searchParams.set("conversationId",g.conversationId),e=new sf(oe.href),r=setInterval(()=>{U()},500),e.onmessage=function(pe){typeof(pe==null?void 0:pe.data)=="string"&&N(lf(pe.data))},oe.searchParams.set("voice-plus","true"),o=new sf(oe.href),l=setInterval(()=>{L()},500),o.onmessage=pe=>{if(typeof(pe==null?void 0:pe.data)=="string"){const le=lf(pe.data);le!=null&&f.voicePlusCommand.forEach(_e=>{_e(le)})}}},G=()=>{var pe;if(Q(),n.bidirectional!==!0)return;const oe=new URL(Hw(u));((pe=n.experimental)==null?void 0:pe.completeApplicationUrl)!==!0&&(oe.searchParams.set("languageCode",g.languageCode),oe.searchParams.set("channelKey",`${oe.searchParams.get("channelKey")??""}-${g.languageCode}`)),oe.searchParams.set("conversationId",g.conversationId),oe.searchParams.set("type","voice-plus");const Ie=n.headers["nlx-api-key"];!fo(u)&&Ie!=null&&oe.searchParams.set("apiKey",Ie),o=new sf(oe.href),l=setInterval(()=>{L()},500),o.onmessage=le=>{if(typeof(le==null?void 0:le.data)=="string"){const _e=lf(le.data);_e!=null&&f.voicePlusCommand.forEach(de=>{de(_e)})}}},se=()=>{r!=null&&clearInterval(r),e!=null&&(e.onmessage=null,e.close(),e=void 0)},Q=()=>{l!=null&&clearInterval(l),o!=null&&(o.onmessage=null,o.close(),o=void 0)};fo(u)&&F(),G();const $=(oe,Ie)=>{const pe={type:Wn.User,receivedAt:new Date().getTime(),payload:{type:"structured",...ag(oe),context:Ie}};_({responses:[...g.responses,pe]},pe)},q=(oe,Ie)=>{$({intentId:oe},Ie),z({context:Ie,request:{structured:{intentId:oe}}})},Y=(oe,Ie)=>{const pe={type:Wn.User,receivedAt:new Date().getTime(),payload:{type:"text",text:oe,context:Ie}};_({responses:[...g.responses,pe]},pe),z({context:Ie,request:{unstructured:{text:oe}}})},fe=(oe,Ie,pe)=>{let le=[...g.responses];const _e={type:Wn.User,receivedAt:new Date().getTime(),payload:{type:"choice",choiceId:oe}},de=(pe==null?void 0:pe.responseIndex)??-1,O=(pe==null?void 0:pe.messageIndex)??-1;de>-1&&O>-1&&(le=eg(de,te=>te.type===Wn.Application?{...te,payload:{...te.payload,messages:eg(O,Ve=>({...Ve,selectedChoiceId:oe}),te.payload.messages)}}:te,le)),le=[...le,_e],_({responses:le},_e),z({context:Ie,request:{structured:{nodeId:pe==null?void 0:pe.nodeId,intentId:pe==null?void 0:pe.intentId,choiceId:oe}}})},Re=oe=>{ee=ee.filter(Ie=>Ie!==oe)};return{sendText:Y,sendContext:async oe=>{const Ie=await rf(`${C()}/context`,{method:"POST",headers:{...n.headers??{},Accept:"application/json","Content-Type":"application/json","nlx-conversation-id":g.conversationId,"nlx-sdk-version":af.version},body:JSON.stringify({languageCode:g.languageCode,conversationId:g.conversationId,userId:g.userId,context:oe})});if(Ie.status>=400)throw new Error(`Responded with ${Ie.status}`)},sendStructured:(oe,Ie)=>{$(oe,Ie),z({context:Ie,request:{structured:ag(oe)}})},sendSlots:(oe,Ie)=>{$({slots:oe},Ie),z({context:Ie,request:{structured:{slots:sg(oe)}}})},sendFlow:q,sendIntent:(oe,Ie)=>{qs.warn("Calling `sendIntent` is deprecated and will be removed in a future version of the SDK. Use `sendFlow` instead."),q(oe,Ie)},sendWelcomeFlow:oe=>{q(og,oe)},sendWelcomeIntent:oe=>{qs.warn("Calling `sendWelcomeIntent` is deprecated and will be removed in a future version of the SDK. Use `sendWelcomeFlow` instead."),q(og,oe)},sendChoice:fe,currentConversationId:()=>g.conversationId,setLanguageCode:oe=>{if(oe===g.languageCode){qs.warn("Attempted to set language code to the one already active.");return}fo(u)&&F(),G(),_({languageCode:oe})},currentLanguageCode:()=>g.languageCode,getVoiceCredentials:async oe=>{const Ie=ug(u),pe=await rf(`${Ie}-${g.languageCode}/requestToken`,{method:"POST",headers:{...n.headers??{},Accept:"application/json","Content-Type":"application/json","nlx-conversation-id":g.conversationId,"nlx-sdk-version":af.version},body:JSON.stringify({languageCode:g.languageCode,conversationId:g.conversationId,userId:g.userId,requestToken:!0,context:oe})});if(pe.status>=400)throw new Error(`Responded with ${pe.status}`);const le=await pe.json();if((le==null?void 0:le.url)==null)throw new Error("Invalid response");return le},subscribe:oe=>(ee=[...ee,oe],oe(lg(g)),()=>{Re(oe)}),unsubscribe:Re,unsubscribeAll:()=>{ee=[]},reset:oe=>{_({conversationId:ig(),responses:(oe==null?void 0:oe.clearResponses)===!0?[]:g.responses}),fo(u)&&F(),G()},destroy:()=>{ee=[],fo(u)&&se(),Q()},setRequestOverride:oe=>{A=oe},addEventListener:(oe,Ie)=>{f[oe]=[...f[oe],Ie]},removeEventListener:(oe,Ie)=>{f[oe]=f[oe].filter(pe=>pe!==Ie)},sendVoicePlusContext:oe=>{H({context:oe})}}}function dg(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var o=n.length;for(e=0;e<o;e++)n[e]&&(t=dg(n[e]))&&(r&&(r+=" "),r+=t)}else for(t in n)n[t]&&(r&&(r+=" "),r+=t);return r}function st(){for(var n,e,t=0,r="",o=arguments.length;t<o;t++)(n=arguments[t])&&(e=dg(n))&&(r&&(r+=" "),r+=e);return r}const lt=n=>({width:n.size!=null?`${n.size}px`:"100%",height:n.size!=null?`${n.size}px`:"100%",className:n.className}),Gw=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M11 21H10L11 14H7.5C6.92 14 6.93 13.68 7.12 13.34C7.31 13 7.17 13.26 7.19 13.22C8.48 10.94 10.42 7.54 13 3H14L13 10H16.5C16.99 10 17.06 10.33 16.97 10.51L16.9 10.66C12.96 17.55 11 21 11 21Z",fill:"currentColor"})}),el=n=>R.jsxs("svg",{viewBox:"0 0 24 24",...lt(n),children:[R.jsx("path",{d:"M13.5562 5.34835C12.2796 6.62498 12.4866 8.90179 14.0186 10.4337C14.3377 10.7529 14.5571 11.134 14.6767 11.5383C14.8007 11.9572 14.8177 12.4011 14.7277 12.8268C14.6656 13.1203 14.5526 13.4051 14.3887 13.6672C14.3259 13.7677 14.2557 13.865 14.1778 13.9581C14.1279 14.018 14.0747 14.0761 14.0186 14.1322C13.3341 14.8166 12.3641 15.0421 11.4917 14.8092L11.4728 14.8042C9.38654 14.2543 7.32235 15.2129 6.85652 16.9516C6.5761 17.9979 5.50065 18.6188 4.45431 18.3385C3.40798 18.0581 2.787 16.9826 3.06729 15.9363C3.34209 14.9111 4.38012 14.2942 5.40615 14.5335L5.40666 14.5317C5.42748 14.5378 5.44842 14.5437 5.46962 14.5493C7.21342 15.0166 9.08173 13.699 9.64244 11.6062C9.64857 11.5835 9.65521 11.5608 9.66185 11.5383C9.7815 11.134 10.0009 10.7529 10.32 10.4337L10.332 10.4214C10.339 10.4142 10.346 10.407 10.3533 10.4C11.8549 8.86865 12.0496 6.61566 10.7824 5.34835C10.0163 4.58237 10.0163 3.34047 10.7824 2.57449C11.5483 1.8085 12.7903 1.8085 13.5562 2.57449C14.3066 3.32501 14.3218 4.53237 13.6016 5.30135L13.6029 5.30263C13.5872 5.3177 13.5716 5.33289 13.5562 5.34835Z",fill:"currentColor"}),R.jsx("path",{d:"M19.327 6.83185C20.0311 6.83185 20.6019 7.40264 20.6019 8.10675C20.6019 8.81087 20.0311 9.38166 19.327 9.38166C18.6229 9.38166 18.0521 8.81087 18.0521 8.10675C18.0521 7.40264 18.6229 6.83185 19.327 6.83185Z",fill:"currentColor"}),R.jsx("path",{d:"M21.3237 16.4754C21.3237 15.3741 20.4309 14.4813 19.3297 14.4813C18.2284 14.4813 17.3356 15.3741 17.3356 16.4754C17.3356 17.5767 18.2284 18.4695 19.3297 18.4695C20.4309 18.4695 21.3237 17.5767 21.3237 16.4754Z",fill:"currentColor"}),R.jsx("path",{d:"M12.1025 19.3194C12.8246 19.3194 13.4101 19.9195 13.4101 20.6597C13.4101 21.4 12.8246 22 12.1025 22C11.3804 22 10.7949 21.4 10.7949 20.6597C10.7949 19.9195 11.3804 19.3194 12.1025 19.3194Z",fill:"currentColor"}),R.jsx("path",{d:"M6.28367 8.13944C6.28367 7.41726 5.68363 6.83185 4.94339 6.83185C4.20314 6.83185 3.6031 7.41726 3.6031 8.13944C3.6031 8.86163 4.20314 9.44704 4.94339 9.44704C5.68363 9.44704 6.28367 8.86163 6.28367 8.13944Z",fill:"currentColor"})]}),Kw=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M6 13C5.45 13 5 13.45 5 14C5 14.55 5.45 15 6 15C6.55 15 7 14.55 7 14C7 13.45 6.55 13 6 13ZM6 17C5.45 17 5 17.45 5 18C5 18.55 5.45 19 6 19C6.55 19 7 18.55 7 18C7 17.45 6.55 17 6 17ZM6 9C5.45 9 5 9.45 5 10C5 10.55 5.45 11 6 11C6.55 11 7 10.55 7 10C7 9.45 6.55 9 6 9ZM3 9.5C2.72 9.5 2.5 9.72 2.5 10C2.5 10.28 2.72 10.5 3 10.5C3.28 10.5 3.5 10.28 3.5 10C3.5 9.72 3.28 9.5 3 9.5ZM6 5C5.45 5 5 5.45 5 6C5 6.55 5.45 7 6 7C6.55 7 7 6.55 7 6C7 5.45 6.55 5 6 5ZM21 10.5C21.28 10.5 21.5 10.28 21.5 10C21.5 9.72 21.28 9.5 21 9.5C20.72 9.5 20.5 9.72 20.5 10C20.5 10.28 20.72 10.5 21 10.5ZM14 7C14.55 7 15 6.55 15 6C15 5.45 14.55 5 14 5C13.45 5 13 5.45 13 6C13 6.55 13.45 7 14 7ZM14 3.5C14.28 3.5 14.5 3.28 14.5 3C14.5 2.72 14.28 2.5 14 2.5C13.72 2.5 13.5 2.72 13.5 3C13.5 3.28 13.72 3.5 14 3.5ZM3 13.5C2.72 13.5 2.5 13.72 2.5 14C2.5 14.28 2.72 14.5 3 14.5C3.28 14.5 3.5 14.28 3.5 14C3.5 13.72 3.28 13.5 3 13.5ZM10 20.5C9.72 20.5 9.5 20.72 9.5 21C9.5 21.28 9.72 21.5 10 21.5C10.28 21.5 10.5 21.28 10.5 21C10.5 20.72 10.28 20.5 10 20.5ZM10 3.5C10.28 3.5 10.5 3.28 10.5 3C10.5 2.72 10.28 2.5 10 2.5C9.72 2.5 9.5 2.72 9.5 3C9.5 3.28 9.72 3.5 10 3.5ZM10 7C10.55 7 11 6.55 11 6C11 5.45 10.55 5 10 5C9.45 5 9 5.45 9 6C9 6.55 9.45 7 10 7ZM10 12.5C9.17 12.5 8.5 13.17 8.5 14C8.5 14.83 9.17 15.5 10 15.5C10.83 15.5 11.5 14.83 11.5 14C11.5 13.17 10.83 12.5 10 12.5ZM18 13C17.45 13 17 13.45 17 14C17 14.55 17.45 15 18 15C18.55 15 19 14.55 19 14C19 13.45 18.55 13 18 13ZM18 17C17.45 17 17 17.45 17 18C17 18.55 17.45 19 18 19C18.55 19 19 18.55 19 18C19 17.45 18.55 17 18 17ZM18 9C17.45 9 17 9.45 17 10C17 10.55 17.45 11 18 11C18.55 11 19 10.55 19 10C19 9.45 18.55 9 18 9ZM18 5C17.45 5 17 5.45 17 6C17 6.55 17.45 7 18 7C18.55 7 19 6.55 19 6C19 5.45 18.55 5 18 5ZM21 13.5C20.72 13.5 20.5 13.72 20.5 14C20.5 14.28 20.72 14.5 21 14.5C21.28 14.5 21.5 14.28 21.5 14C21.5 13.72 21.28 13.5 21 13.5ZM14 17C13.45 17 13 17.45 13 18C13 18.55 13.45 19 14 19C14.55 19 15 18.55 15 18C15 17.45 14.55 17 14 17ZM14 20.5C13.72 20.5 13.5 20.72 13.5 21C13.5 21.28 13.72 21.5 14 21.5C14.28 21.5 14.5 21.28 14.5 21C14.5 20.72 14.28 20.5 14 20.5ZM10 8.5C9.17 8.5 8.5 9.17 8.5 10C8.5 10.83 9.17 11.5 10 11.5C10.83 11.5 11.5 10.83 11.5 10C11.5 9.17 10.83 8.5 10 8.5ZM10 17C9.45 17 9 17.45 9 18C9 18.55 9.45 19 10 19C10.55 19 11 18.55 11 18C11 17.45 10.55 17 10 17ZM14 12.5C13.17 12.5 12.5 13.17 12.5 14C12.5 14.83 13.17 15.5 14 15.5C14.83 15.5 15.5 14.83 15.5 14C15.5 13.17 14.83 12.5 14 12.5ZM14 8.5C13.17 8.5 12.5 9.17 12.5 10C12.5 10.83 13.17 11.5 14 11.5C14.83 11.5 15.5 10.83 15.5 10C15.5 9.17 14.83 8.5 14 8.5Z",fill:"currentColor"})}),Jw=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z",fill:"currentColor"})}),fg=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M12 15.41L6 9.40997L7.41 7.99997L12 12.58L16.59 7.99997L18 9.40997L12 15.41Z",fill:"currentColor"})}),Yw=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M7.59001 12L13.59 18L15 16.59L10.42 12L15 7.41002L13.59 6.00002L7.59001 12Z",fill:"currentColor"})}),hg=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M15 12L9.00005 18L7.59005 16.59L12.17 12L7.59005 7.41002L9.00005 6.00002L15 12Z",fill:"currentColor"})}),Qw=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M12 8L6 14L7.41 15.41L12 10.83L16.59 15.41L18 14L12 8Z",fill:"currentColor"})}),Pc=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M12 4L10.59 5.41L16.17 11H4V13H16.17L10.59 18.59L12 20L20 12L12 4Z",fill:"currentColor"})}),cf=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M18.5 16H7C4.79 16 3 14.21 3 12C3 9.79 4.79 8 7 8H19.5C20.88 8 22 9.12 22 10.5C22 11.88 20.88 13 19.5 13H9C8.45 13 8 12.55 8 12C8 11.45 8.45 11 9 11H18.5V9.5H9C7.62 9.5 6.5 10.62 6.5 12C6.5 13.38 7.62 14.5 9 14.5H19.5C21.71 14.5 23.5 12.71 23.5 10.5C23.5 8.29 21.71 6.5 19.5 6.5H7C3.96 6.5 1.5 8.96 1.5 12C1.5 15.04 3.96 17.5 7 17.5H18.5V16Z",fill:"currentColor"})}),Xw=n=>R.jsxs("svg",{viewBox:"0 0 24 24",...lt(n),children:[R.jsx("path",{d:"M12 15.2C13.7673 15.2 15.2 13.7673 15.2 12C15.2 10.2327 13.7673 8.8 12 8.8C10.2327 8.8 8.8 10.2327 8.8 12C8.8 13.7673 10.2327 15.2 12 15.2Z",fill:"currentColor"}),R.jsx("path",{d:"M9 2L7.17 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6C22 4.9 21.1 4 20 4H16.83L15 2H9ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17Z",fill:"currentColor"})]}),pg=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M8.99991 16.17L4.82991 12L3.40991 13.41L8.99991 19L20.9999 7L19.5899 5.59L8.99991 16.17Z",fill:"currentColor"})}),tl=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"currentColor"})}),Zw=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM19 5H8C6.9 5 6 5.9 6 7V21C6 22.1 6.9 23 8 23H19C20.1 23 21 22.1 21 21V7C21 5.9 20.1 5 19 5ZM19 21H8V7H19V21Z",fill:"currentColor"})}),mg=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M19 4H18V2H16V4H8V2H6V4H5C3.89 4 3.01 4.9 3.01 6L3 20C3 21.1 3.89 22 5 22H19C20.1 22 21 21.1 21 20V6C21 4.9 20.1 4 19 4ZM19 20H5V9H19V20Z",fill:"currentColor"})}),gg=n=>R.jsxs("svg",{viewBox:"0 0 24 24",...lt(n),children:[R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 21C6.9 21 6 20.1 6 19V7H18V19C18 20.1 17.1 21 16 21H8ZM9.33337 9H8V19H9.33337V9ZM11.3334 9V19H12.6666V9H11.3334ZM16 19H14.6666V9H16V19Z",fill:"currentColor"}),R.jsx("path",{d:"M15.5 4H19V6H5V4H8.5L9.5 3H14.5L15.5 4Z",fill:"currentColor"})]}),vg=n=>R.jsxs("svg",{viewBox:"0 0 24 24",...lt(n),children:[R.jsx("path",{d:"M21 12.22C21 6.73 16.74 3 12 3C7.31 3 3 6.65 3 12.28C2.4 12.62 2 13.26 2 14V16C2 17.1 2.9 18 4 18H5V11.9C5 8.03 8.13 4.9 12 4.9C15.87 4.9 19 8.03 19 11.9V19H11V21H19C20.1 21 21 20.1 21 19V17.78C21.59 17.47 22 16.86 22 16.14V13.84C22 13.14 21.59 12.53 21 12.22Z",fill:"currentColor"}),R.jsx("path",{d:"M9 14C9.55228 14 10 13.5523 10 13C10 12.4477 9.55228 12 9 12C8.44772 12 8 12.4477 8 13C8 13.5523 8.44772 14 9 14Z",fill:"currentColor"}),R.jsx("path",{d:"M15 14C15.5523 14 16 13.5523 16 13C16 12.4477 15.5523 12 15 12C14.4477 12 14 12.4477 14 13C14 13.5523 14.4477 14 15 14Z",fill:"currentColor"}),R.jsx("path",{d:"M18 11.03C17.52 8.18 15.04 6 12.05 6C9.02 6 5.76 8.51 6.02 12.45C8.49 11.44 10.35 9.24 10.88 6.56C12.19 9.19 14.88 11 18 11.03Z",fill:"currentColor"})]}),uf=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 17H11V15H13V17ZM13 13H11V7H13V13Z",fill:"currentColor"})}),eC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M7 14H5V19H10V17H7V14ZM5 10H7V7H10V5H5V10ZM17 17H14V19H19V14H17V17ZM14 5V7H17V10H19V5H14Z",fill:"currentColor"})}),Rc=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M12 15C13.66 15 14.99 13.66 14.99 12L15 6C15 4.34 13.66 3 12 3C10.34 3 9 4.34 9 6V12C9 13.66 10.34 15 12 15ZM17.3 12C17.3 15 14.76 17.1 12 17.1C9.24 17.1 6.7 15 6.7 12H5C5 15.42 7.72 18.23 11 18.72V22H13V18.72C16.28 18.24 19 15.42 19 12H17.3Z",fill:"currentColor"})}),df=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M19 11H17.3C17.3 11.74 17.14 12.43 16.87 13.05L18.1 14.28C18.66 13.3 19 12.19 19 11ZM14.98 11.17C14.98 11.11 15 11.06 15 11V5C15 3.34 13.66 2 12 2C10.34 2 9 3.34 9 5V5.18L14.98 11.17ZM4.27 3L3 4.27L9.01 10.28V11C9.01 12.66 10.34 14 12 14C12.22 14 12.44 13.97 12.65 13.92L14.31 15.58C13.6 15.91 12.81 16.1 12 16.1C9.24 16.1 6.7 14 6.7 11H5C5 14.41 7.72 17.23 11 17.72V21H13V17.72C13.91 17.59 14.77 17.27 15.54 16.82L19.73 21L21 19.73L4.27 3Z",fill:"currentColor"})}),tC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M12 2C8.13 2 5 5.13 5 9C5 14.25 12 22 12 22C12 22 19 14.25 19 9C19 5.13 15.87 2 12 2ZM12 11.5C10.62 11.5 9.5 10.38 9.5 9C9.5 7.62 10.62 6.5 12 6.5C13.38 6.5 14.5 7.62 14.5 9C14.5 10.38 13.38 11.5 12 11.5Z",fill:"currentColor"})}),Ic=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M3 9.99999V14C3 14.55 3.45 15 4 15H7L10.29 18.29C10.92 18.92 12 18.47 12 17.58V6.40999C12 5.51999 10.92 5.06999 10.29 5.69999L7 8.99999H4C3.45 8.99999 3 9.44999 3 9.99999ZM16.5 12C16.5 10.23 15.48 8.70999 14 7.96999V16.02C15.48 15.29 16.5 13.77 16.5 12ZM14 4.44999V4.64999C14 5.02999 14.25 5.35999 14.6 5.49999C17.18 6.52999 19 9.05999 19 12C19 14.94 17.18 17.47 14.6 18.5C14.24 18.64 14 18.97 14 19.35V19.55C14 20.18 14.63 20.62 15.21 20.4C18.6 19.11 21 15.84 21 12C21 8.15999 18.6 4.88999 15.21 3.59999C14.63 3.36999 14 3.81999 14 4.44999Z",fill:"currentColor"})}),ff=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M16.5 12C16.5 10.23 15.48 8.71 14 7.97V10.18L16.45 12.63C16.48 12.43 16.5 12.22 16.5 12ZM19 12C19 12.94 18.8 13.82 18.46 14.64L19.97 16.15C20.63 14.91 21 13.5 21 12C21 7.72 18.01 4.14 14 3.23V5.29C16.89 6.15 19 8.83 19 12ZM4.27 3L3 4.27L7.73 9H3V15H7L12 20V13.27L16.25 17.52C15.58 18.04 14.83 18.45 14 18.7V20.76C15.38 20.45 16.63 19.81 17.69 18.95L19.73 21L21 19.73L12 10.73L4.27 3ZM12 4L9.91 6.09L12 8.18V4Z",fill:"currentColor"})}),nC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M12.87 15.07L10.33 12.56L10.36 12.53C12.1 10.59 13.34 8.36 14.07 6H17V4H10V2H8V4H1V5.99H12.17C11.5 7.92 10.44 9.75 9 11.35C8.07 10.32 7.3 9.19 6.69 8H4.69C5.42 9.63 6.42 11.17 7.67 12.56L2.58 17.58L4 19L9 14L12.11 17.11L12.87 15.07ZM18.5 10H16.5L12 22H14L15.12 19H19.87L21 22H23L18.5 10ZM15.88 17L17.5 12.67L19.12 17H15.88Z",fill:"currentColor"})}),rC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M19 19H5V5H12V3H5C3.89 3 3 3.9 3 5V19C3 20.1 3.89 21 5 21H19C20.1 21 21 20.1 21 19V12H19V19ZM14 3V5H17.59L7.76 14.83L9.17 16.24L19 6.41V10H21V3H14Z",fill:"currentColor"})}),iC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M8 5V19L19 12L8 5Z",fill:"currentColor"})}),oC=n=>R.jsxs("svg",{viewBox:"0 0 24 24",...lt(n),children:[R.jsx("path",{d:"M13 14.5C13 15.3284 12.3284 16 11.5 16C10.6716 16 10 15.3284 10 14.5C10 13.6716 10.6716 13 11.5 13C12.3284 13 13 13.6716 13 14.5Z",fill:"currentColor"}),R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2H14L20 8V20C20 21.1 19.1 22 18 22H5.99C4.89 22 4 21.1 4 20V4C4 2.9 4.9 2 6 2ZM13.16 17.57L15.04 19.45L16.45 18.04L14.57 16.16C15.29 14.83 15.1 13.15 13.98 12.03C12.61 10.66 10.4 10.66 9.03 12.03C7.66 13.4 7.66 15.61 9.03 16.98C10.15 18.1 11.83 18.28 13.16 17.57ZM13 3.5V9H18.5L13 3.5Z",fill:"currentColor"})]}),sC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M3 15H21V13H3V15ZM3 19H21V17H3V19ZM3 11H21V9H3V11ZM3 5V7H21V5H3Z",fill:"currentColor"})}),nl=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M10 3C14.97 3 19 7.03 19 12H22L18.11 15.89L18.04 16.03L14 12H17C17 8.13 13.87 5 10 5C6.13 5 3 8.13 3 12C3 15.87 6.13 19 10 19V21C5.03 21 1 16.97 1 12C1 7.03 5.03 3 10 3Z",fill:"currentColor"})}),yg=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M19.1064 12.9302C19.1459 12.6333 19.1657 12.3266 19.1657 12C19.1657 11.6833 19.1459 11.3667 19.0965 11.0698L21.1053 9.50625C21.2834 9.36771 21.3329 9.10052 21.2241 8.9026L19.3241 5.61719C19.2053 5.39948 18.9579 5.33021 18.7402 5.39948L16.3751 6.34948C15.8803 5.97344 15.3558 5.65677 14.772 5.41927L14.4157 2.90573C14.3761 2.66823 14.1782 2.5 13.9407 2.5H10.1407C9.90323 2.5 9.71521 2.66823 9.67563 2.90573L9.31938 5.41927C8.73552 5.65677 8.20115 5.98333 7.71625 6.34948L5.35115 5.39948C5.13344 5.32031 4.88604 5.39948 4.7673 5.61719L2.87719 8.9026C2.75844 9.11042 2.79802 9.36771 2.99594 9.50625L5.00479 11.0698C4.95532 11.3667 4.91573 11.6932 4.91573 12C4.91573 12.3068 4.93552 12.6333 4.985 12.9302L2.97615 14.4938C2.79802 14.6323 2.74855 14.8995 2.8574 15.0974L4.7574 18.3828C4.87615 18.6005 5.12354 18.6698 5.34125 18.6005L7.70636 17.6505C8.20115 18.0266 8.72563 18.3432 9.30948 18.5807L9.66573 21.0943C9.71521 21.3318 9.90323 21.5 10.1407 21.5H13.9407C14.1782 21.5 14.3761 21.3318 14.4058 21.0943L14.7621 18.5807C15.3459 18.3432 15.8803 18.0266 16.3652 17.6505L18.7303 18.6005C18.948 18.6797 19.1954 18.6005 19.3142 18.3828L21.2142 15.0974C21.3329 14.8797 21.2834 14.6323 21.0954 14.4938L19.1064 12.9302ZM12.0407 15.5625C10.0814 15.5625 8.47823 13.9594 8.47823 12C8.47823 10.0406 10.0814 8.4375 12.0407 8.4375C14.0001 8.4375 15.6032 10.0406 15.6032 12C15.6032 13.9594 14.0001 15.5625 12.0407 15.5625Z",fill:"currentColor"})}),aC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M15.5 14H14.71L14.43 13.73C15.41 12.59 16 11.11 16 9.5C16 5.91 13.09 3 9.5 3C5.91 3 3 5.91 3 9.5C3 13.09 5.91 16 9.5 16C11.11 16 12.59 15.41 13.73 14.43L14 14.71V15.5L19 20.49L20.49 19L15.5 14ZM9.5 14C7.01 14 5 11.99 5 9.5C5 7.01 7.01 5 9.5 5C11.99 5 14 7.01 14 9.5C14 11.99 11.99 14 9.5 14Z",fill:"currentColor"})}),lC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M18 16.08C17.24 16.08 16.56 16.38 16.04 16.85L8.91 12.7C8.96 12.47 9 12.24 9 12C9 11.76 8.96 11.53 8.91 11.3L15.96 7.19C16.5 7.69 17.21 8 18 8C19.66 8 21 6.66 21 5C21 3.34 19.66 2 18 2C16.34 2 15 3.34 15 5C15 5.24 15.04 5.47 15.09 5.7L8.04 9.81C7.5 9.31 6.79 9 6 9C4.34 9 3 10.34 3 12C3 13.66 4.34 15 6 15C6.79 15 7.5 14.69 8.04 14.19L15.16 18.35C15.11 18.56 15.08 18.78 15.08 19C15.08 20.61 16.39 21.92 18 21.92C19.61 21.92 20.92 20.61 20.92 19C20.92 17.39 19.61 16.08 18 16.08Z",fill:"currentColor"})}),bg=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z",fill:"currentColor"})}),cC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M15 3H6C5.17 3 4.46 3.5 4.16 4.22L1.14 11.27C1.05 11.5 1 11.74 1 12V14C1 15.1 1.9 16 3 16H9.31L8.36 20.57L8.33 20.89C8.33 21.3 8.5 21.68 8.77 21.95L9.83 23L16.42 16.41C16.78 16.05 17 15.55 17 15V5C17 3.9 16.1 3 15 3ZM19 3V15H23V3H19Z",fill:"currentColor"})}),uC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M1 21H5V9H1V21ZM23 10C23 8.9 22.1 8 21 8H14.69L15.64 3.43L15.67 3.11C15.67 2.7 15.5 2.32 15.23 2.05L14.17 1L7.59 7.59C7.22 7.95 7 8.45 7 9V19C7 20.1 7.9 21 9 21H18C18.83 21 19.54 20.5 19.84 19.78L22.86 12.73C22.95 12.5 23 12.26 23 12V10Z",fill:"currentColor"})}),dC=n=>R.jsxs("svg",{viewBox:"0 0 24 24",...lt(n),children:[R.jsx("path",{d:"M11 7H12.5V12.25L17 14.92L16.25 16.15L11 13V7Z",fill:"currentColor"}),R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 12C2 6.47997 6.47 1.99997 11.99 1.99997C17.52 1.99997 22 6.47997 22 12C22 17.52 17.52 22 11.99 22C6.47 22 2 17.52 2 12ZM4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.57997 16.42 3.99997 12 3.99997C7.58 3.99997 4 7.57997 4 12Z",fill:"currentColor"})]}),kg=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M13 3C8.03 3 4 7.03 4 12H1L4.89 15.89L4.96 16.03L9 12H6C6 8.13 9.13 5 13 5C16.87 5 20 8.13 20 12C20 15.87 16.87 19 13 19V21C17.97 21 22 16.97 22 12C22 7.03 17.97 3 13 3Z",fill:"currentColor"})}),fC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M12 4V1L8 5L12 9V6C15.31 6 18 8.69 18 12C18 13.01 17.75 13.97 17.3 14.8L18.76 16.26C19.54 15.03 20 13.57 20 12C20 7.58 16.42 4 12 4ZM12 18C8.69 18 6 15.31 6 12C6 10.99 6.25 10.03 6.7 9.2L5.24 7.74C4.46 8.97 4 10.43 4 12C4 16.42 7.58 20 12 20V23L16 19L12 15V18Z",fill:"currentColor"})}),hC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M11 18H13V16H11V18ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM12 6C9.79 6 8 7.79 8 10H10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 12 11 11.75 11 15H13C13 12.75 16 12.5 16 10C16 7.79 14.21 6 12 6Z",fill:"currentColor"})}),wg=n=>R.jsxs("svg",{viewBox:"0 0 16 16",...lt(n),fill:"currentColor",children:[R.jsx("path",{d:"M12.6667 7.33326V12.6666H3.33333V3.33326H8.66667V1.99992H3.33333C2.6 1.99992 2 2.59992 2 3.33326V12.6666C2 13.3999 2.6 13.9999 3.33333 13.9999H12.6667C13.4 13.9999 14 13.3999 14 12.6666V7.33326H12.6667Z"}),R.jsx("path",{d:"M14.0183 1.97412L10.0699 1.97412L11.5506 3.45477L7.66668 7.33327L8.65378 8.32037L12.5377 4.44188L14.0183 5.92253V1.97412Z"})]}),Cg=Object.freeze(Object.defineProperty({__proto__:null,Action:Gw,Add:Jw,ArrowDown:fg,ArrowForward:Pc,ArrowLeft:Yw,ArrowRight:hg,ArrowUp:Qw,AssistantOld:Kw,Attachment:cf,Camera:Xw,Check:pg,Close:tl,Copy:Zw,Date:mg,Delete:gg,Error:uf,Escalate:vg,FullScreen:eC,Help:hC,Location:tC,Mic:Rc,MicOff:df,OpenInNew:rC,OpenLink:wg,Play:iC,Preview:oC,Refresh:fC,Reorder:sC,Restart:nl,Search:aC,Settings:yg,Share:lC,ThumbDown:cC,ThumbUp:uC,Time:dC,Touchpoint:el,Translate:nC,Undo:kg,Volume:Ic,VolumeOff:ff,Warning:bg},Symbol.toStringTag,{value:"Module"})),pC=n=>{const{Custom:e}=n;return e!=null?R.jsx(e,{className:n.className,onClick:n.onClick}):R.jsxs("button",{className:st("p-3 w-fit bg-background text-primary-80 rounded-outer","after:content-[''] after:rounded-outer after:absolute after:inset-0 after:pointer-events-none","hover:after:bg-primary-10",n.className),disabled:n.onClick==null,onClick:n.onClick,children:[R.jsx("span",{className:"block flex-none w-8 h-8",children:n.iconUrl==null?R.jsx(el,{}):R.jsx("img",{src:n.iconUrl,className:"w-8 h-8"})}),n.showLabel??!1?R.jsx("span",{children:n.label}):null]})},Sg="p-3 w-10 h-10 transition-colors rounded-inner relative z-10 overflow-hidden before:content-[''] before:absolute before:transition-colors before:-z-10 before:inset-0 before:bg-transparent focus:outline-0",Tg="bg-primary-80 text-secondary-80 enabled:hover:before:bg-primary-80 focus:before:bg-primary-80 enabled:active:before:bg-secondary-10 disabled:bg-primary-10 disabled:text-secondary-40",_g="bg-primary-5 text-primary-80 enabled:hover:before:bg-primary-10 focus:before:bg-primary-10 enabled:active:before:bg-secondary-10 disabled:bg-primary-5 disabled:text-primary-20",xg="bg-accent text-secondary-80 enabled:hover:before:bg-primary-40 focus:before:bg-primary-40 enabled:active:before:bg-secondary-10 disabled:bg-accent-20",Eg="bg-secondary-60 backdrop-blur-sm text-primary-80 enabled:hover:before:bg-primary-10 focus:before:bg-primary-10 enabled:active:before:bg-secondary-10 disabled:bg-secondary-20 disabled:text-primary-20",Pg="bg-background backdrop-blur-sm text-primary-80 enabled:hover:before:bg-primary-10 focus:before:bg-primary-10 enabled:active:before:bg-secondary-10 disabled:bg-secondary-20 disabled:text-primary-20",Rg="bg-error-primary text-secondary-80 enabled:hover:before:bg-primary-10",mC=({type:n,Icon:e})=>R.jsx("span",{className:st(Sg,"block",n==="main"?Tg:null,n==="ghost"?_g:null,n==="activated"?xg:null,n==="coverup"?Eg:null,n==="overlay"?Pg:null,n==="error"?Rg:null),children:R.jsx(e,{})}),mn=({onClick:n,type:e,label:t,className:r,Icon:o})=>{const a=n==null;return R.jsx("button",{onClick:a?void 0:n,disabled:a,"aria-label":t,className:st(Sg,e==="main"?Tg:null,e==="ghost"?_g:null,e==="activated"?xg:null,e==="coverup"?Eg:null,e==="overlay"?Pg:null,e==="error"?Rg:null,r),children:R.jsx(o,{})})};function gC(n){const e=ye.useRef(n);return e.current=n,ye.useMemo(()=>Object.freeze({get current(){return e.current}}),[])}function vC(n){const e=gC(n);ye.useEffect(()=>()=>{e.current()},[])}function yC(n,e,t,r=0){const o=ye.useRef(),a=ye.useRef(),l=ye.useRef(n),u=ye.useRef(),f=()=>{o.current&&(clearTimeout(o.current),o.current=void 0),a.current&&(clearTimeout(a.current),a.current=void 0)};return vC(f),ye.useEffect(()=>{l.current=n},e),ye.useMemo(()=>{const p=()=>{if(f(),!u.current)return;const C=u.current;u.current=void 0,l.current.apply(C.this,C.args)},g=function(...C){o.current&&clearTimeout(o.current),u.current={args:C,this:this},o.current=setTimeout(p,t),r>0&&!a.current&&(a.current=setTimeout(p,r))};return Object.defineProperties(g,{length:{value:n.length},name:{value:`${n.name||"anonymous"}__debounced__${t}`}}),g},[t,r,...e])}const bC=typeof globalThis<"u"&&typeof navigator<"u"&&typeof document<"u";function Ig(n,e,t=0){const[r,o]=ye.useState(n);return[r,yC(o,[],e,t)]}const Gs=new Map,Mg=n=>{const e=matchMedia(n),t=new Set,r=()=>{for(const o of t)o(e.matches)};return e.addEventListener("change",r,{passive:!0}),{mql:e,dispatchers:t,listener:r}},kC=(n,e)=>{let t=Gs.get(n);t||(t=Mg(n),Gs.set(n,t)),t.dispatchers.add(e),e(t.mql.matches)},wC=(n,e)=>{const t=Gs.get(n);if(t){const{mql:r,dispatchers:o,listener:a}=t;o.delete(e),o.size===0&&(Gs.delete(n),r.removeEventListener?r.removeEventListener("change",a):r.removeListener(a))}};function CC(n,e={}){let{initializeWithValue:t=!0}=e;bC||(t=!1);const[r,o]=ye.useState(()=>{if(t){let a=Gs.get(n);return a||(a=Mg(n),Gs.set(n,a)),a.mql.matches}});return ye.useEffect(()=>(kC(n,o),()=>{wC(n,o)}),[n]),r}const Ag=n=>{let e;switch(n){case"sm":e="(min-width: 640px)";break;case"md":e="(min-width: 768px)";break;case"lg":e="(min-width: 1024px)";break}return CC(e)},SC=({windowSize:n,renderCollapse:e,errorThemedCloseButton:t,speakerControls:r,collapse:o,toggleSettings:a,isSettingsOpen:l,brandIcon:u,reset:f,enabled:p})=>{const g=n==="half",C=Ag("md"),_=g&&C?"overlay":"ghost";return R.jsxs("div",{className:st("flex p-2 md:p-3 items-center justify-between gap-2",{"md:absolute md:w-fit md:flex-col md:left-0 md:transform md:-translate-x-full md:translate-y-0":n==="half","@3xl/main:absolute @3xl/main:left-0 @3xl/main:right-0 @3xl/main:top-0":n==="full"||n==="embedded"}),children:[u!=null?R.jsx("img",{className:"w-10 h-10 block",src:u,role:"presentation"}):null,R.jsx(mn,{label:"Reset",type:_,className:u==null?"":"ml-auto",onClick:p?()=>{f()}:void 0,Icon:kg}),a!=null?R.jsx(mn,{className:u!=null?"":"ml-auto",Icon:yg,label:"Settings",type:l?"activated":_,onClick:p?a:void 0}):null,r!=null?R.jsx(mn,{Icon:r.enabled?Ic:ff,label:"Speakers",type:r.enabled?"activated":_,onClick:()=>{r.setEnabled(T=>!T)}}):null,e?R.jsx(mn,{label:"Collapse",type:t??!1?"error":_,className:st(a==null?"ml-auto":"",g?"md:-order-1":""),onClick:p?()=>{o(new Event("collapse"))}:void 0,Icon:tl}):null]})},Og=()=>R.jsxs("div",{className:st("grow flex flex-col items-center justify-center gap-6 text-primary-80","fullscreen-error"),children:[R.jsx(el,{className:"w-20 h-20 text-primary-20"}),R.jsxs("div",{className:"text-center",children:[R.jsx("h3",{className:"text-xl mb-2",children:"Oops!"}),R.jsx("p",{children:"Something went wrong."}),R.jsx("p",{children:"Try again later."})]})]}),Mc=({k:n,className:e,style:t})=>{const o=a=>`${a}s`;return R.jsx("div",{className:st("bg-current animate-ping absolute inset-0",e),style:{animationDelay:o(-1.5*n),animationDuration:o(1.5),...t??{}}})},Ks=({className:n,style:e})=>{const t=st("text-accent-20",n);return R.jsxs(R.Fragment,{children:[R.jsx(Mc,{k:.12,className:t,style:e}),R.jsx(Mc,{k:.24,className:t,style:e}),R.jsx(Mc,{k:.36,className:t,style:e}),R.jsx(Mc,{k:.48,className:t,style:e})]})},TC=30,rl=17,_C=n=>n<.5?2*n*n:1-Math.pow(-2*n+2,2)/2,hf=990,Ac=hf+300,xC=({d:n})=>{const e=Math.PI/2,t=n/rl/2.8,r=e*Math.min(t,1),o=t<1?(n-Math.sin(r))/Math.cos(r)*.5:0,a=-n,l=n,u=n-rl*Math.sin(r),f=rl*Math.cos(r),p=u-o*Math.cos(r),g=f-o*Math.sin(r);return R.jsxs(R.Fragment,{children:[R.jsx("circle",{cx:a,cy:"0",r:rl}),R.jsx("circle",{cx:l,cy:"0",r:rl}),t<.45?R.jsx("path",{d:`
60
+ */var Cw=function(){if(typeof WebSocket<"u")return WebSocket},Sw=function(n){return typeof n<"u"&&!!n&&n.CLOSING===2},Zo={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},sf=function(){function n(e,t,r){var o=this;r===void 0&&(r={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(a){o._debug("open event");var l=o._options.minUptime,u=l===void 0?Zo.minUptime:l;clearTimeout(o._connectTimeout),o._uptimeTimeout=setTimeout(function(){return o._acceptOpen()},u),o._ws.binaryType=o._binaryType,o._messageQueue.forEach(function(f){return o._ws.send(f)}),o._messageQueue=[],o.onopen&&o.onopen(a),o._listeners.open.forEach(function(f){return o._callEventListener(a,f)})},this._handleMessage=function(a){o._debug("message event"),o.onmessage&&o.onmessage(a),o._listeners.message.forEach(function(l){return o._callEventListener(a,l)})},this._handleError=function(a){o._debug("error event",a.message),o._disconnect(void 0,a.message==="TIMEOUT"?"timeout":void 0),o.onerror&&o.onerror(a),o._debug("exec error listeners"),o._listeners.error.forEach(function(l){return o._callEventListener(a,l)}),o._connect()},this._handleClose=function(a){o._debug("close event"),o._clearTimeouts(),o._shouldReconnect&&o._connect(),o.onclose&&o.onclose(a),o._listeners.close.forEach(function(l){return o._callEventListener(a,l)})},this._url=e,this._protocols=t,this._options=r,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(n,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(n,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CONNECTING",{get:function(){return n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"OPEN",{get:function(){return n.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSING",{get:function(){return n.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSED",{get:function(){return n.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bufferedAmount",{get:function(){var e=this._messageQueue.reduce(function(t,r){return typeof r=="string"?t+=r.length:r instanceof Blob?t+=r.size:t+=r.byteLength,t},0);return e+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?n.CLOSED:n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),n.prototype.close=function(e,t){if(e===void 0&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(e,t)},n.prototype.reconnect=function(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(e,t),this._connect())},n.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var t=this._options.maxEnqueuedMessages,r=t===void 0?Zo.maxEnqueuedMessages:t;this._messageQueue.length<r&&(this._debug("enqueue",e),this._messageQueue.push(e))}},n.prototype.addEventListener=function(e,t){this._listeners[e]&&this._listeners[e].push(t)},n.prototype.dispatchEvent=function(e){var t,r,o=this._listeners[e.type];if(o)try{for(var a=vw(o),l=a.next();!l.done;l=a.next()){var u=l.value;this._callEventListener(e,u)}}catch(f){t={error:f}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return!0},n.prototype.removeEventListener=function(e,t){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(function(r){return r!==t}))},n.prototype._debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._options.debug&&console.log.apply(console,bw(["RWS>"],e))},n.prototype._getNextDelay=function(){var e=this._options,t=e.reconnectionDelayGrowFactor,r=t===void 0?Zo.reconnectionDelayGrowFactor:t,o=e.minReconnectionDelay,a=o===void 0?Zo.minReconnectionDelay:o,l=e.maxReconnectionDelay,u=l===void 0?Zo.maxReconnectionDelay:l,f=0;return this._retryCount>0&&(f=a*Math.pow(r,this._retryCount-1),f>u&&(f=u)),this._debug("next delay",f),f},n.prototype._wait=function(){var e=this;return new Promise(function(t){setTimeout(t,e._getNextDelay())})},n.prototype._getNextUrl=function(e){if(typeof e=="string")return Promise.resolve(e);if(typeof e=="function"){var t=e();if(typeof t=="string")return Promise.resolve(t);if(t.then)return t}throw Error("Invalid URL")},n.prototype._connect=function(){var e=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var t=this._options,r=t.maxRetries,o=r===void 0?Zo.maxRetries:r,a=t.connectionTimeout,l=a===void 0?Zo.connectionTimeout:a,u=t.WebSocket,f=u===void 0?Cw():u;if(this._retryCount>=o){this._debug("max retries reached",this._retryCount,">=",o);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!Sw(f))throw Error("No valid WebSocket class provided");this._wait().then(function(){return e._getNextUrl(e._url)}).then(function(p){e._closeCalled||(e._debug("connect",{url:p,protocols:e._protocols}),e._ws=e._protocols?new f(p,e._protocols):new f(p),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout(function(){return e._handleTimeout()},l))})}},n.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new kw(Error("TIMEOUT"),this))},n.prototype._disconnect=function(e,t){if(e===void 0&&(e=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(e,t),this._handleClose(new ww(e,t,this))}catch{}}},n.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},n.prototype._callEventListener=function(e,t){"handleEvent"in t?t.handleEvent(e):t(e)},n.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},n.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},n.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},n}();let Ec;const Tw=new Uint8Array(16);function _w(){if(!Ec&&(Ec=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ec))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ec(Tw)}const Cn=[];for(let n=0;n<256;++n)Cn.push((n+256).toString(16).slice(1));function xw(n,e=0){return Cn[n[e+0]]+Cn[n[e+1]]+Cn[n[e+2]]+Cn[n[e+3]]+"-"+Cn[n[e+4]]+Cn[n[e+5]]+"-"+Cn[n[e+6]]+Cn[n[e+7]]+"-"+Cn[n[e+8]]+Cn[n[e+9]]+"-"+Cn[n[e+10]]+Cn[n[e+11]]+Cn[n[e+12]]+Cn[n[e+13]]+Cn[n[e+14]]+Cn[n[e+15]]}const rg={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ig(n,e,t){if(rg.randomUUID&&!n)return rg.randomUUID();n=n||{};const r=n.random||(n.rng||_w)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,xw(r)}var Ew="@nlxai/core",Pw="1.1.8-alpha.0",Rw="Low-level SDK for building NLX experiences",Iw="module",Mw="lib/index.cjs",Aw="lib/index.esm.js",Ow="lib/index.umd.js",Lw="lib/index.d.ts",Dw={".":{types:"./lib/index.d.ts",import:"./lib/index.esm.js",require:"./lib/index.cjs"}},Nw={build:"rm -rf lib && rollup -c --configPlugin typescript --configImportAttributesKey with",docs:"rm -rf docs/ && typedoc && concat-md --decrease-title-levels --dir-name-as-title docs/ > docs/index.md","lint:check":"eslint src/ --ext .ts,.tsx,.js,.jsx --max-warnings 0",lint:"eslint src/ --ext .ts,.tsx,.js,.jsx --fix",prepublish:"npm run build","preview-docs":"npm run docs && comrak --unsafe --gfm -o docs/index.html docs/index.md && open docs/index.html","publish-docs":"npm run docs && mv docs/index.md ../website/src/content/headless-api-reference.md",test:"typedoc --emit none",tsc:"tsc"},jw="Peter Szerzo <peter@nlx.ai>",Fw="MIT",Uw={"@types/isomorphic-fetch":"^0.0.36","@types/node":"^22.10.1","@types/ramda":"0.29.1","@types/uuid":"^9.0.7","concat-md":"^0.5.1","eslint-config-nlx":"*",prettier:"^3.1.0","rollup-config-nlx":"*",typedoc:"^0.25.13","typedoc-plugin-markdown":"^3.17.1",typescript:"^5.5.4"},Bw={"isomorphic-fetch":"^3.0.0",ramda:"^0.29.1","reconnecting-websocket":"^4.4.0",uuid:"^9.0.1"},Vw={access:"public"},zw="c701b502f0398e9956a8b35b711a45f264fa7603",af={name:Ew,version:Pw,description:Rw,type:Iw,main:Mw,module:Aw,browser:Ow,types:Lw,exports:Dw,scripts:Nw,author:jw,license:Fw,devDependencies:Uw,dependencies:Bw,publishConfig:Vw,gitHead:zw};const qs=console;var Wn;(function(n){n.Application="bot",n.User="user",n.Failure="failure"})(Wn||(Wn={}));const og="NLX.Welcome",Ww="We encountered an issue. Please try again soon.",sg=n=>Array.isArray(n)?n:Object.entries(n).map(([e,t])=>({slotId:e,value:t})),ag=n=>({...n,intentId:n.flowId??n.intentId,slots:n.slots!=null?sg(n.slots):n.slots}),lg=n=>n.responses,lf=n=>{try{return JSON.parse(n)}catch{return null}},cg=n=>{var e;return((e=n.match(/(bots\.dev\.studio\.nlx\.ai|bots\.studio\.nlx\.ai|apps\.nlx\.ai|dev\.apps\.nlx\.ai)/g))==null?void 0:e[0])??"apps.nlx.ai"},Hw=n=>{if(fo(n))return n;const e=cg(n),r=new URL(n).pathname.split("/"),o=r[2],a=r[3];return`wss://us-east-1-ws.${e}?deploymentKey=${o}&channelKey=${a}`},ug=n=>{if(!fo(n))return n;const e=cg(n),t=new URL(n),r=new URLSearchParams(t.search),o=r.get("channelKey"),a=r.get("deploymentKey");return`https://${e}/c/${a}/${o}`},fo=n=>n.indexOf("wss://")===0,$w=n=>(n.applicationUrl??"").length>0;function qw(n){let e,t=[],r=null,o,a=[],l=null;const u=n.applicationUrl??"";/[-|_][a-z]{2,}[-|_][A-Z]{2,}$/.test(u)&&qs.warn("Since v1.0.0, the language code is no longer added at the end of the application URL. Please remove the modifier (e.g. '-en-US') from the URL, and specify it in the `languageCode` parameter instead.");const f={voicePlusCommand:[]},p=n.conversationId??ig();let g={responses:n.responses??[],languageCode:n.languageCode,userId:n.userId,conversationId:p};const C=()=>{var oe;return`${ug(u)}${((oe=n.experimental)==null?void 0:oe.completeApplicationUrl)===!0?"":`-${g.languageCode}`}`},_=(oe,Ie)=>{g={...g,...oe},ee.forEach(pe=>{pe(lg(g),Ie)})},T=()=>{const oe={type:Wn.Failure,receivedAt:new Date().getTime(),payload:{text:n.failureMessage??Ww}};_({responses:[...g.responses,oe]},oe)},N=oe=>{if((oe==null?void 0:oe.messages.length)>0){const Ie={type:Wn.Application,receivedAt:new Date().getTime(),payload:{...oe,messages:oe.messages.map(pe=>({nodeId:pe.nodeId,messageId:pe.messageId,text:pe.text,choices:pe.choices??[]}))}};_({responses:[...g.responses,Ie]},Ie),oe.metadata.hasPendingDataRequest&&($({poll:!0}),setTimeout(()=>{z({request:{structured:{poll:!0}}})},1500))}else qs.warn("Invalid message structure, expected object with field 'messages'."),T()};let A;const H=oe=>{(o==null?void 0:o.readyState)===1?o.send(JSON.stringify(oe)):a=[...a,oe]},z=async oe=>{var pe;if(A!=null){A(oe,le=>{const _e={type:Wn.Application,receivedAt:new Date().getTime(),payload:le};_({responses:[...g.responses,_e]},_e)});return}const Ie={userId:g.userId,conversationId:g.conversationId,...oe,languageCode:g.languageCode,channelType:(pe=n.experimental)==null?void 0:pe.channelType,environment:n.environment};if(fo(u))(e==null?void 0:e.readyState)===1?e.send(JSON.stringify(Ie)):t=[...t,Ie];else try{const le=await rf(C(),{method:"POST",headers:{...n.headers??{},Accept:"application/json","Content-Type":"application/json","nlx-sdk-version":af.version},body:JSON.stringify(Ie)});if(le.status>=400)throw new Error(`Responded with ${le.status}`);const _e=await le.json();N(_e)}catch(le){qs.warn(le),T()}};let ee=[];const U=async()=>{(e==null?void 0:e.readyState)===1&&t[0]!=null&&(await z(t[0]),t=t.slice(1))},L=()=>{(o==null?void 0:o.readyState)===1&&a[0]!=null&&(H(a[0]),a=a.slice(1))},F=()=>{var Ie;se();const oe=new URL(u);((Ie=n.experimental)==null?void 0:Ie.completeApplicationUrl)!==!0&&(oe.searchParams.set("languageCode",g.languageCode),oe.searchParams.set("channelKey",`${oe.searchParams.get("channelKey")??""}-${g.languageCode}`)),oe.searchParams.set("conversationId",g.conversationId),e=new sf(oe.href),r=setInterval(()=>{U()},500),e.onmessage=function(pe){typeof(pe==null?void 0:pe.data)=="string"&&N(lf(pe.data))},oe.searchParams.set("voice-plus","true"),o=new sf(oe.href),l=setInterval(()=>{L()},500),o.onmessage=pe=>{if(typeof(pe==null?void 0:pe.data)=="string"){const le=lf(pe.data);le!=null&&f.voicePlusCommand.forEach(_e=>{_e(le)})}}},G=()=>{var pe;if(Q(),n.bidirectional!==!0)return;const oe=new URL(Hw(u));((pe=n.experimental)==null?void 0:pe.completeApplicationUrl)!==!0&&(oe.searchParams.set("languageCode",g.languageCode),oe.searchParams.set("channelKey",`${oe.searchParams.get("channelKey")??""}-${g.languageCode}`)),oe.searchParams.set("conversationId",g.conversationId),oe.searchParams.set("type","voice-plus");const Ie=n.headers["nlx-api-key"];!fo(u)&&Ie!=null&&oe.searchParams.set("apiKey",Ie),o=new sf(oe.href),l=setInterval(()=>{L()},500),o.onmessage=le=>{if(typeof(le==null?void 0:le.data)=="string"){const _e=lf(le.data);_e!=null&&f.voicePlusCommand.forEach(de=>{de(_e)})}}},se=()=>{r!=null&&clearInterval(r),e!=null&&(e.onmessage=null,e.close(),e=void 0)},Q=()=>{l!=null&&clearInterval(l),o!=null&&(o.onmessage=null,o.close(),o=void 0)};fo(u)&&F(),G();const $=(oe,Ie)=>{const pe={type:Wn.User,receivedAt:new Date().getTime(),payload:{type:"structured",...ag(oe),context:Ie}};_({responses:[...g.responses,pe]},pe)},q=(oe,Ie)=>{$({intentId:oe},Ie),z({context:Ie,request:{structured:{intentId:oe}}})},Y=(oe,Ie)=>{const pe={type:Wn.User,receivedAt:new Date().getTime(),payload:{type:"text",text:oe,context:Ie}};_({responses:[...g.responses,pe]},pe),z({context:Ie,request:{unstructured:{text:oe}}})},fe=(oe,Ie,pe)=>{let le=[...g.responses];const _e={type:Wn.User,receivedAt:new Date().getTime(),payload:{type:"choice",choiceId:oe}},de=(pe==null?void 0:pe.responseIndex)??-1,O=(pe==null?void 0:pe.messageIndex)??-1;de>-1&&O>-1&&(le=eg(de,te=>te.type===Wn.Application?{...te,payload:{...te.payload,messages:eg(O,Ve=>({...Ve,selectedChoiceId:oe}),te.payload.messages)}}:te,le)),le=[...le,_e],_({responses:le},_e),z({context:Ie,request:{structured:{nodeId:pe==null?void 0:pe.nodeId,intentId:pe==null?void 0:pe.intentId,choiceId:oe}}})},Re=oe=>{ee=ee.filter(Ie=>Ie!==oe)};return{sendText:Y,sendContext:async oe=>{const Ie=await rf(`${C()}/context`,{method:"POST",headers:{...n.headers??{},Accept:"application/json","Content-Type":"application/json","nlx-conversation-id":g.conversationId,"nlx-sdk-version":af.version},body:JSON.stringify({languageCode:g.languageCode,conversationId:g.conversationId,userId:g.userId,context:oe})});if(Ie.status>=400)throw new Error(`Responded with ${Ie.status}`)},sendStructured:(oe,Ie)=>{$(oe,Ie),z({context:Ie,request:{structured:ag(oe)}})},sendSlots:(oe,Ie)=>{$({slots:oe},Ie),z({context:Ie,request:{structured:{slots:sg(oe)}}})},sendFlow:q,sendIntent:(oe,Ie)=>{qs.warn("Calling `sendIntent` is deprecated and will be removed in a future version of the SDK. Use `sendFlow` instead."),q(oe,Ie)},sendWelcomeFlow:oe=>{q(og,oe)},sendWelcomeIntent:oe=>{qs.warn("Calling `sendWelcomeIntent` is deprecated and will be removed in a future version of the SDK. Use `sendWelcomeFlow` instead."),q(og,oe)},sendChoice:fe,currentConversationId:()=>g.conversationId,setLanguageCode:oe=>{if(oe===g.languageCode){qs.warn("Attempted to set language code to the one already active.");return}fo(u)&&F(),G(),_({languageCode:oe})},currentLanguageCode:()=>g.languageCode,getVoiceCredentials:async oe=>{const Ie=ug(u),pe=await rf(`${Ie}-${g.languageCode}/requestToken`,{method:"POST",headers:{...n.headers??{},Accept:"application/json","Content-Type":"application/json","nlx-conversation-id":g.conversationId,"nlx-sdk-version":af.version},body:JSON.stringify({languageCode:g.languageCode,conversationId:g.conversationId,userId:g.userId,requestToken:!0,context:oe})});if(pe.status>=400)throw new Error(`Responded with ${pe.status}`);const le=await pe.json();if((le==null?void 0:le.url)==null)throw new Error("Invalid response");return le},subscribe:oe=>(ee=[...ee,oe],oe(lg(g)),()=>{Re(oe)}),unsubscribe:Re,unsubscribeAll:()=>{ee=[]},reset:oe=>{_({conversationId:ig(),responses:(oe==null?void 0:oe.clearResponses)===!0?[]:g.responses}),fo(u)&&F(),G()},destroy:()=>{ee=[],fo(u)&&se(),Q()},setRequestOverride:oe=>{A=oe},addEventListener:(oe,Ie)=>{f[oe]=[...f[oe],Ie]},removeEventListener:(oe,Ie)=>{f[oe]=f[oe].filter(pe=>pe!==Ie)},sendVoicePlusContext:oe=>{H({context:oe})}}}function dg(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var o=n.length;for(e=0;e<o;e++)n[e]&&(t=dg(n[e]))&&(r&&(r+=" "),r+=t)}else for(t in n)n[t]&&(r&&(r+=" "),r+=t);return r}function st(){for(var n,e,t=0,r="",o=arguments.length;t<o;t++)(n=arguments[t])&&(e=dg(n))&&(r&&(r+=" "),r+=e);return r}const lt=n=>({width:n.size!=null?`${n.size}px`:"100%",height:n.size!=null?`${n.size}px`:"100%",className:n.className}),Gw=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M11 21H10L11 14H7.5C6.92 14 6.93 13.68 7.12 13.34C7.31 13 7.17 13.26 7.19 13.22C8.48 10.94 10.42 7.54 13 3H14L13 10H16.5C16.99 10 17.06 10.33 16.97 10.51L16.9 10.66C12.96 17.55 11 21 11 21Z",fill:"currentColor"})}),el=n=>R.jsxs("svg",{viewBox:"0 0 24 24",...lt(n),children:[R.jsx("path",{d:"M13.5562 5.34835C12.2796 6.62498 12.4866 8.90179 14.0186 10.4337C14.3377 10.7529 14.5571 11.134 14.6767 11.5383C14.8007 11.9572 14.8177 12.4011 14.7277 12.8268C14.6656 13.1203 14.5526 13.4051 14.3887 13.6672C14.3259 13.7677 14.2557 13.865 14.1778 13.9581C14.1279 14.018 14.0747 14.0761 14.0186 14.1322C13.3341 14.8166 12.3641 15.0421 11.4917 14.8092L11.4728 14.8042C9.38654 14.2543 7.32235 15.2129 6.85652 16.9516C6.5761 17.9979 5.50065 18.6188 4.45431 18.3385C3.40798 18.0581 2.787 16.9826 3.06729 15.9363C3.34209 14.9111 4.38012 14.2942 5.40615 14.5335L5.40666 14.5317C5.42748 14.5378 5.44842 14.5437 5.46962 14.5493C7.21342 15.0166 9.08173 13.699 9.64244 11.6062C9.64857 11.5835 9.65521 11.5608 9.66185 11.5383C9.7815 11.134 10.0009 10.7529 10.32 10.4337L10.332 10.4214C10.339 10.4142 10.346 10.407 10.3533 10.4C11.8549 8.86865 12.0496 6.61566 10.7824 5.34835C10.0163 4.58237 10.0163 3.34047 10.7824 2.57449C11.5483 1.8085 12.7903 1.8085 13.5562 2.57449C14.3066 3.32501 14.3218 4.53237 13.6016 5.30135L13.6029 5.30263C13.5872 5.3177 13.5716 5.33289 13.5562 5.34835Z",fill:"currentColor"}),R.jsx("path",{d:"M19.327 6.83185C20.0311 6.83185 20.6019 7.40264 20.6019 8.10675C20.6019 8.81087 20.0311 9.38166 19.327 9.38166C18.6229 9.38166 18.0521 8.81087 18.0521 8.10675C18.0521 7.40264 18.6229 6.83185 19.327 6.83185Z",fill:"currentColor"}),R.jsx("path",{d:"M21.3237 16.4754C21.3237 15.3741 20.4309 14.4813 19.3297 14.4813C18.2284 14.4813 17.3356 15.3741 17.3356 16.4754C17.3356 17.5767 18.2284 18.4695 19.3297 18.4695C20.4309 18.4695 21.3237 17.5767 21.3237 16.4754Z",fill:"currentColor"}),R.jsx("path",{d:"M12.1025 19.3194C12.8246 19.3194 13.4101 19.9195 13.4101 20.6597C13.4101 21.4 12.8246 22 12.1025 22C11.3804 22 10.7949 21.4 10.7949 20.6597C10.7949 19.9195 11.3804 19.3194 12.1025 19.3194Z",fill:"currentColor"}),R.jsx("path",{d:"M6.28367 8.13944C6.28367 7.41726 5.68363 6.83185 4.94339 6.83185C4.20314 6.83185 3.6031 7.41726 3.6031 8.13944C3.6031 8.86163 4.20314 9.44704 4.94339 9.44704C5.68363 9.44704 6.28367 8.86163 6.28367 8.13944Z",fill:"currentColor"})]}),Kw=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M6 13C5.45 13 5 13.45 5 14C5 14.55 5.45 15 6 15C6.55 15 7 14.55 7 14C7 13.45 6.55 13 6 13ZM6 17C5.45 17 5 17.45 5 18C5 18.55 5.45 19 6 19C6.55 19 7 18.55 7 18C7 17.45 6.55 17 6 17ZM6 9C5.45 9 5 9.45 5 10C5 10.55 5.45 11 6 11C6.55 11 7 10.55 7 10C7 9.45 6.55 9 6 9ZM3 9.5C2.72 9.5 2.5 9.72 2.5 10C2.5 10.28 2.72 10.5 3 10.5C3.28 10.5 3.5 10.28 3.5 10C3.5 9.72 3.28 9.5 3 9.5ZM6 5C5.45 5 5 5.45 5 6C5 6.55 5.45 7 6 7C6.55 7 7 6.55 7 6C7 5.45 6.55 5 6 5ZM21 10.5C21.28 10.5 21.5 10.28 21.5 10C21.5 9.72 21.28 9.5 21 9.5C20.72 9.5 20.5 9.72 20.5 10C20.5 10.28 20.72 10.5 21 10.5ZM14 7C14.55 7 15 6.55 15 6C15 5.45 14.55 5 14 5C13.45 5 13 5.45 13 6C13 6.55 13.45 7 14 7ZM14 3.5C14.28 3.5 14.5 3.28 14.5 3C14.5 2.72 14.28 2.5 14 2.5C13.72 2.5 13.5 2.72 13.5 3C13.5 3.28 13.72 3.5 14 3.5ZM3 13.5C2.72 13.5 2.5 13.72 2.5 14C2.5 14.28 2.72 14.5 3 14.5C3.28 14.5 3.5 14.28 3.5 14C3.5 13.72 3.28 13.5 3 13.5ZM10 20.5C9.72 20.5 9.5 20.72 9.5 21C9.5 21.28 9.72 21.5 10 21.5C10.28 21.5 10.5 21.28 10.5 21C10.5 20.72 10.28 20.5 10 20.5ZM10 3.5C10.28 3.5 10.5 3.28 10.5 3C10.5 2.72 10.28 2.5 10 2.5C9.72 2.5 9.5 2.72 9.5 3C9.5 3.28 9.72 3.5 10 3.5ZM10 7C10.55 7 11 6.55 11 6C11 5.45 10.55 5 10 5C9.45 5 9 5.45 9 6C9 6.55 9.45 7 10 7ZM10 12.5C9.17 12.5 8.5 13.17 8.5 14C8.5 14.83 9.17 15.5 10 15.5C10.83 15.5 11.5 14.83 11.5 14C11.5 13.17 10.83 12.5 10 12.5ZM18 13C17.45 13 17 13.45 17 14C17 14.55 17.45 15 18 15C18.55 15 19 14.55 19 14C19 13.45 18.55 13 18 13ZM18 17C17.45 17 17 17.45 17 18C17 18.55 17.45 19 18 19C18.55 19 19 18.55 19 18C19 17.45 18.55 17 18 17ZM18 9C17.45 9 17 9.45 17 10C17 10.55 17.45 11 18 11C18.55 11 19 10.55 19 10C19 9.45 18.55 9 18 9ZM18 5C17.45 5 17 5.45 17 6C17 6.55 17.45 7 18 7C18.55 7 19 6.55 19 6C19 5.45 18.55 5 18 5ZM21 13.5C20.72 13.5 20.5 13.72 20.5 14C20.5 14.28 20.72 14.5 21 14.5C21.28 14.5 21.5 14.28 21.5 14C21.5 13.72 21.28 13.5 21 13.5ZM14 17C13.45 17 13 17.45 13 18C13 18.55 13.45 19 14 19C14.55 19 15 18.55 15 18C15 17.45 14.55 17 14 17ZM14 20.5C13.72 20.5 13.5 20.72 13.5 21C13.5 21.28 13.72 21.5 14 21.5C14.28 21.5 14.5 21.28 14.5 21C14.5 20.72 14.28 20.5 14 20.5ZM10 8.5C9.17 8.5 8.5 9.17 8.5 10C8.5 10.83 9.17 11.5 10 11.5C10.83 11.5 11.5 10.83 11.5 10C11.5 9.17 10.83 8.5 10 8.5ZM10 17C9.45 17 9 17.45 9 18C9 18.55 9.45 19 10 19C10.55 19 11 18.55 11 18C11 17.45 10.55 17 10 17ZM14 12.5C13.17 12.5 12.5 13.17 12.5 14C12.5 14.83 13.17 15.5 14 15.5C14.83 15.5 15.5 14.83 15.5 14C15.5 13.17 14.83 12.5 14 12.5ZM14 8.5C13.17 8.5 12.5 9.17 12.5 10C12.5 10.83 13.17 11.5 14 11.5C14.83 11.5 15.5 10.83 15.5 10C15.5 9.17 14.83 8.5 14 8.5Z",fill:"currentColor"})}),Jw=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z",fill:"currentColor"})}),fg=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M12 15.41L6 9.40997L7.41 7.99997L12 12.58L16.59 7.99997L18 9.40997L12 15.41Z",fill:"currentColor"})}),Yw=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M7.59001 12L13.59 18L15 16.59L10.42 12L15 7.41002L13.59 6.00002L7.59001 12Z",fill:"currentColor"})}),hg=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M15 12L9.00005 18L7.59005 16.59L12.17 12L7.59005 7.41002L9.00005 6.00002L15 12Z",fill:"currentColor"})}),Qw=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M12 8L6 14L7.41 15.41L12 10.83L16.59 15.41L18 14L12 8Z",fill:"currentColor"})}),Pc=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M12 4L10.59 5.41L16.17 11H4V13H16.17L10.59 18.59L12 20L20 12L12 4Z",fill:"currentColor"})}),cf=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M18.5 16H7C4.79 16 3 14.21 3 12C3 9.79 4.79 8 7 8H19.5C20.88 8 22 9.12 22 10.5C22 11.88 20.88 13 19.5 13H9C8.45 13 8 12.55 8 12C8 11.45 8.45 11 9 11H18.5V9.5H9C7.62 9.5 6.5 10.62 6.5 12C6.5 13.38 7.62 14.5 9 14.5H19.5C21.71 14.5 23.5 12.71 23.5 10.5C23.5 8.29 21.71 6.5 19.5 6.5H7C3.96 6.5 1.5 8.96 1.5 12C1.5 15.04 3.96 17.5 7 17.5H18.5V16Z",fill:"currentColor"})}),Xw=n=>R.jsxs("svg",{viewBox:"0 0 24 24",...lt(n),children:[R.jsx("path",{d:"M12 15.2C13.7673 15.2 15.2 13.7673 15.2 12C15.2 10.2327 13.7673 8.8 12 8.8C10.2327 8.8 8.8 10.2327 8.8 12C8.8 13.7673 10.2327 15.2 12 15.2Z",fill:"currentColor"}),R.jsx("path",{d:"M9 2L7.17 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6C22 4.9 21.1 4 20 4H16.83L15 2H9ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17Z",fill:"currentColor"})]}),pg=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M8.99991 16.17L4.82991 12L3.40991 13.41L8.99991 19L20.9999 7L19.5899 5.59L8.99991 16.17Z",fill:"currentColor"})}),tl=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"currentColor"})}),Zw=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM19 5H8C6.9 5 6 5.9 6 7V21C6 22.1 6.9 23 8 23H19C20.1 23 21 22.1 21 21V7C21 5.9 20.1 5 19 5ZM19 21H8V7H19V21Z",fill:"currentColor"})}),mg=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M19 4H18V2H16V4H8V2H6V4H5C3.89 4 3.01 4.9 3.01 6L3 20C3 21.1 3.89 22 5 22H19C20.1 22 21 21.1 21 20V6C21 4.9 20.1 4 19 4ZM19 20H5V9H19V20Z",fill:"currentColor"})}),gg=n=>R.jsxs("svg",{viewBox:"0 0 24 24",...lt(n),children:[R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 21C6.9 21 6 20.1 6 19V7H18V19C18 20.1 17.1 21 16 21H8ZM9.33337 9H8V19H9.33337V9ZM11.3334 9V19H12.6666V9H11.3334ZM16 19H14.6666V9H16V19Z",fill:"currentColor"}),R.jsx("path",{d:"M15.5 4H19V6H5V4H8.5L9.5 3H14.5L15.5 4Z",fill:"currentColor"})]}),vg=n=>R.jsxs("svg",{viewBox:"0 0 24 24",...lt(n),children:[R.jsx("path",{d:"M21 12.22C21 6.73 16.74 3 12 3C7.31 3 3 6.65 3 12.28C2.4 12.62 2 13.26 2 14V16C2 17.1 2.9 18 4 18H5V11.9C5 8.03 8.13 4.9 12 4.9C15.87 4.9 19 8.03 19 11.9V19H11V21H19C20.1 21 21 20.1 21 19V17.78C21.59 17.47 22 16.86 22 16.14V13.84C22 13.14 21.59 12.53 21 12.22Z",fill:"currentColor"}),R.jsx("path",{d:"M9 14C9.55228 14 10 13.5523 10 13C10 12.4477 9.55228 12 9 12C8.44772 12 8 12.4477 8 13C8 13.5523 8.44772 14 9 14Z",fill:"currentColor"}),R.jsx("path",{d:"M15 14C15.5523 14 16 13.5523 16 13C16 12.4477 15.5523 12 15 12C14.4477 12 14 12.4477 14 13C14 13.5523 14.4477 14 15 14Z",fill:"currentColor"}),R.jsx("path",{d:"M18 11.03C17.52 8.18 15.04 6 12.05 6C9.02 6 5.76 8.51 6.02 12.45C8.49 11.44 10.35 9.24 10.88 6.56C12.19 9.19 14.88 11 18 11.03Z",fill:"currentColor"})]}),uf=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 17H11V15H13V17ZM13 13H11V7H13V13Z",fill:"currentColor"})}),eC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M7 14H5V19H10V17H7V14ZM5 10H7V7H10V5H5V10ZM17 17H14V19H19V14H17V17ZM14 5V7H17V10H19V5H14Z",fill:"currentColor"})}),Rc=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M12 15C13.66 15 14.99 13.66 14.99 12L15 6C15 4.34 13.66 3 12 3C10.34 3 9 4.34 9 6V12C9 13.66 10.34 15 12 15ZM17.3 12C17.3 15 14.76 17.1 12 17.1C9.24 17.1 6.7 15 6.7 12H5C5 15.42 7.72 18.23 11 18.72V22H13V18.72C16.28 18.24 19 15.42 19 12H17.3Z",fill:"currentColor"})}),df=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M19 11H17.3C17.3 11.74 17.14 12.43 16.87 13.05L18.1 14.28C18.66 13.3 19 12.19 19 11ZM14.98 11.17C14.98 11.11 15 11.06 15 11V5C15 3.34 13.66 2 12 2C10.34 2 9 3.34 9 5V5.18L14.98 11.17ZM4.27 3L3 4.27L9.01 10.28V11C9.01 12.66 10.34 14 12 14C12.22 14 12.44 13.97 12.65 13.92L14.31 15.58C13.6 15.91 12.81 16.1 12 16.1C9.24 16.1 6.7 14 6.7 11H5C5 14.41 7.72 17.23 11 17.72V21H13V17.72C13.91 17.59 14.77 17.27 15.54 16.82L19.73 21L21 19.73L4.27 3Z",fill:"currentColor"})}),tC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M12 2C8.13 2 5 5.13 5 9C5 14.25 12 22 12 22C12 22 19 14.25 19 9C19 5.13 15.87 2 12 2ZM12 11.5C10.62 11.5 9.5 10.38 9.5 9C9.5 7.62 10.62 6.5 12 6.5C13.38 6.5 14.5 7.62 14.5 9C14.5 10.38 13.38 11.5 12 11.5Z",fill:"currentColor"})}),Ic=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M3 9.99999V14C3 14.55 3.45 15 4 15H7L10.29 18.29C10.92 18.92 12 18.47 12 17.58V6.40999C12 5.51999 10.92 5.06999 10.29 5.69999L7 8.99999H4C3.45 8.99999 3 9.44999 3 9.99999ZM16.5 12C16.5 10.23 15.48 8.70999 14 7.96999V16.02C15.48 15.29 16.5 13.77 16.5 12ZM14 4.44999V4.64999C14 5.02999 14.25 5.35999 14.6 5.49999C17.18 6.52999 19 9.05999 19 12C19 14.94 17.18 17.47 14.6 18.5C14.24 18.64 14 18.97 14 19.35V19.55C14 20.18 14.63 20.62 15.21 20.4C18.6 19.11 21 15.84 21 12C21 8.15999 18.6 4.88999 15.21 3.59999C14.63 3.36999 14 3.81999 14 4.44999Z",fill:"currentColor"})}),ff=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M16.5 12C16.5 10.23 15.48 8.71 14 7.97V10.18L16.45 12.63C16.48 12.43 16.5 12.22 16.5 12ZM19 12C19 12.94 18.8 13.82 18.46 14.64L19.97 16.15C20.63 14.91 21 13.5 21 12C21 7.72 18.01 4.14 14 3.23V5.29C16.89 6.15 19 8.83 19 12ZM4.27 3L3 4.27L7.73 9H3V15H7L12 20V13.27L16.25 17.52C15.58 18.04 14.83 18.45 14 18.7V20.76C15.38 20.45 16.63 19.81 17.69 18.95L19.73 21L21 19.73L12 10.73L4.27 3ZM12 4L9.91 6.09L12 8.18V4Z",fill:"currentColor"})}),nC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M12.87 15.07L10.33 12.56L10.36 12.53C12.1 10.59 13.34 8.36 14.07 6H17V4H10V2H8V4H1V5.99H12.17C11.5 7.92 10.44 9.75 9 11.35C8.07 10.32 7.3 9.19 6.69 8H4.69C5.42 9.63 6.42 11.17 7.67 12.56L2.58 17.58L4 19L9 14L12.11 17.11L12.87 15.07ZM18.5 10H16.5L12 22H14L15.12 19H19.87L21 22H23L18.5 10ZM15.88 17L17.5 12.67L19.12 17H15.88Z",fill:"currentColor"})}),rC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M19 19H5V5H12V3H5C3.89 3 3 3.9 3 5V19C3 20.1 3.89 21 5 21H19C20.1 21 21 20.1 21 19V12H19V19ZM14 3V5H17.59L7.76 14.83L9.17 16.24L19 6.41V10H21V3H14Z",fill:"currentColor"})}),iC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M8 5V19L19 12L8 5Z",fill:"currentColor"})}),oC=n=>R.jsxs("svg",{viewBox:"0 0 24 24",...lt(n),children:[R.jsx("path",{d:"M13 14.5C13 15.3284 12.3284 16 11.5 16C10.6716 16 10 15.3284 10 14.5C10 13.6716 10.6716 13 11.5 13C12.3284 13 13 13.6716 13 14.5Z",fill:"currentColor"}),R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2H14L20 8V20C20 21.1 19.1 22 18 22H5.99C4.89 22 4 21.1 4 20V4C4 2.9 4.9 2 6 2ZM13.16 17.57L15.04 19.45L16.45 18.04L14.57 16.16C15.29 14.83 15.1 13.15 13.98 12.03C12.61 10.66 10.4 10.66 9.03 12.03C7.66 13.4 7.66 15.61 9.03 16.98C10.15 18.1 11.83 18.28 13.16 17.57ZM13 3.5V9H18.5L13 3.5Z",fill:"currentColor"})]}),sC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M3 15H21V13H3V15ZM3 19H21V17H3V19ZM3 11H21V9H3V11ZM3 5V7H21V5H3Z",fill:"currentColor"})}),nl=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M10 3C14.97 3 19 7.03 19 12H22L18.11 15.89L18.04 16.03L14 12H17C17 8.13 13.87 5 10 5C6.13 5 3 8.13 3 12C3 15.87 6.13 19 10 19V21C5.03 21 1 16.97 1 12C1 7.03 5.03 3 10 3Z",fill:"currentColor"})}),yg=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M19.1064 12.9302C19.1459 12.6333 19.1657 12.3266 19.1657 12C19.1657 11.6833 19.1459 11.3667 19.0965 11.0698L21.1053 9.50625C21.2834 9.36771 21.3329 9.10052 21.2241 8.9026L19.3241 5.61719C19.2053 5.39948 18.9579 5.33021 18.7402 5.39948L16.3751 6.34948C15.8803 5.97344 15.3558 5.65677 14.772 5.41927L14.4157 2.90573C14.3761 2.66823 14.1782 2.5 13.9407 2.5H10.1407C9.90323 2.5 9.71521 2.66823 9.67563 2.90573L9.31938 5.41927C8.73552 5.65677 8.20115 5.98333 7.71625 6.34948L5.35115 5.39948C5.13344 5.32031 4.88604 5.39948 4.7673 5.61719L2.87719 8.9026C2.75844 9.11042 2.79802 9.36771 2.99594 9.50625L5.00479 11.0698C4.95532 11.3667 4.91573 11.6932 4.91573 12C4.91573 12.3068 4.93552 12.6333 4.985 12.9302L2.97615 14.4938C2.79802 14.6323 2.74855 14.8995 2.8574 15.0974L4.7574 18.3828C4.87615 18.6005 5.12354 18.6698 5.34125 18.6005L7.70636 17.6505C8.20115 18.0266 8.72563 18.3432 9.30948 18.5807L9.66573 21.0943C9.71521 21.3318 9.90323 21.5 10.1407 21.5H13.9407C14.1782 21.5 14.3761 21.3318 14.4058 21.0943L14.7621 18.5807C15.3459 18.3432 15.8803 18.0266 16.3652 17.6505L18.7303 18.6005C18.948 18.6797 19.1954 18.6005 19.3142 18.3828L21.2142 15.0974C21.3329 14.8797 21.2834 14.6323 21.0954 14.4938L19.1064 12.9302ZM12.0407 15.5625C10.0814 15.5625 8.47823 13.9594 8.47823 12C8.47823 10.0406 10.0814 8.4375 12.0407 8.4375C14.0001 8.4375 15.6032 10.0406 15.6032 12C15.6032 13.9594 14.0001 15.5625 12.0407 15.5625Z",fill:"currentColor"})}),aC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M15.5 14H14.71L14.43 13.73C15.41 12.59 16 11.11 16 9.5C16 5.91 13.09 3 9.5 3C5.91 3 3 5.91 3 9.5C3 13.09 5.91 16 9.5 16C11.11 16 12.59 15.41 13.73 14.43L14 14.71V15.5L19 20.49L20.49 19L15.5 14ZM9.5 14C7.01 14 5 11.99 5 9.5C5 7.01 7.01 5 9.5 5C11.99 5 14 7.01 14 9.5C14 11.99 11.99 14 9.5 14Z",fill:"currentColor"})}),lC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M18 16.08C17.24 16.08 16.56 16.38 16.04 16.85L8.91 12.7C8.96 12.47 9 12.24 9 12C9 11.76 8.96 11.53 8.91 11.3L15.96 7.19C16.5 7.69 17.21 8 18 8C19.66 8 21 6.66 21 5C21 3.34 19.66 2 18 2C16.34 2 15 3.34 15 5C15 5.24 15.04 5.47 15.09 5.7L8.04 9.81C7.5 9.31 6.79 9 6 9C4.34 9 3 10.34 3 12C3 13.66 4.34 15 6 15C6.79 15 7.5 14.69 8.04 14.19L15.16 18.35C15.11 18.56 15.08 18.78 15.08 19C15.08 20.61 16.39 21.92 18 21.92C19.61 21.92 20.92 20.61 20.92 19C20.92 17.39 19.61 16.08 18 16.08Z",fill:"currentColor"})}),bg=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z",fill:"currentColor"})}),cC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M15 3H6C5.17 3 4.46 3.5 4.16 4.22L1.14 11.27C1.05 11.5 1 11.74 1 12V14C1 15.1 1.9 16 3 16H9.31L8.36 20.57L8.33 20.89C8.33 21.3 8.5 21.68 8.77 21.95L9.83 23L16.42 16.41C16.78 16.05 17 15.55 17 15V5C17 3.9 16.1 3 15 3ZM19 3V15H23V3H19Z",fill:"currentColor"})}),uC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M1 21H5V9H1V21ZM23 10C23 8.9 22.1 8 21 8H14.69L15.64 3.43L15.67 3.11C15.67 2.7 15.5 2.32 15.23 2.05L14.17 1L7.59 7.59C7.22 7.95 7 8.45 7 9V19C7 20.1 7.9 21 9 21H18C18.83 21 19.54 20.5 19.84 19.78L22.86 12.73C22.95 12.5 23 12.26 23 12V10Z",fill:"currentColor"})}),dC=n=>R.jsxs("svg",{viewBox:"0 0 24 24",...lt(n),children:[R.jsx("path",{d:"M11 7H12.5V12.25L17 14.92L16.25 16.15L11 13V7Z",fill:"currentColor"}),R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 12C2 6.47997 6.47 1.99997 11.99 1.99997C17.52 1.99997 22 6.47997 22 12C22 17.52 17.52 22 11.99 22C6.47 22 2 17.52 2 12ZM4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.57997 16.42 3.99997 12 3.99997C7.58 3.99997 4 7.57997 4 12Z",fill:"currentColor"})]}),kg=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M13 3C8.03 3 4 7.03 4 12H1L4.89 15.89L4.96 16.03L9 12H6C6 8.13 9.13 5 13 5C16.87 5 20 8.13 20 12C20 15.87 16.87 19 13 19V21C17.97 21 22 16.97 22 12C22 7.03 17.97 3 13 3Z",fill:"currentColor"})}),fC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M12 4V1L8 5L12 9V6C15.31 6 18 8.69 18 12C18 13.01 17.75 13.97 17.3 14.8L18.76 16.26C19.54 15.03 20 13.57 20 12C20 7.58 16.42 4 12 4ZM12 18C8.69 18 6 15.31 6 12C6 10.99 6.25 10.03 6.7 9.2L5.24 7.74C4.46 8.97 4 10.43 4 12C4 16.42 7.58 20 12 20V23L16 19L12 15V18Z",fill:"currentColor"})}),hC=n=>R.jsx("svg",{viewBox:"0 0 24 24",...lt(n),children:R.jsx("path",{d:"M11 18H13V16H11V18ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM12 6C9.79 6 8 7.79 8 10H10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 12 11 11.75 11 15H13C13 12.75 16 12.5 16 10C16 7.79 14.21 6 12 6Z",fill:"currentColor"})}),wg=n=>R.jsxs("svg",{viewBox:"0 0 16 16",...lt(n),fill:"currentColor",children:[R.jsx("path",{d:"M12.6667 7.33326V12.6666H3.33333V3.33326H8.66667V1.99992H3.33333C2.6 1.99992 2 2.59992 2 3.33326V12.6666C2 13.3999 2.6 13.9999 3.33333 13.9999H12.6667C13.4 13.9999 14 13.3999 14 12.6666V7.33326H12.6667Z"}),R.jsx("path",{d:"M14.0183 1.97412L10.0699 1.97412L11.5506 3.45477L7.66668 7.33327L8.65378 8.32037L12.5377 4.44188L14.0183 5.92253V1.97412Z"})]}),Cg=Object.freeze(Object.defineProperty({__proto__:null,Action:Gw,Add:Jw,ArrowDown:fg,ArrowForward:Pc,ArrowLeft:Yw,ArrowRight:hg,ArrowUp:Qw,AssistantOld:Kw,Attachment:cf,Camera:Xw,Check:pg,Close:tl,Copy:Zw,Date:mg,Delete:gg,Error:uf,Escalate:vg,FullScreen:eC,Help:hC,Location:tC,Mic:Rc,MicOff:df,OpenInNew:rC,OpenLink:wg,Play:iC,Preview:oC,Refresh:fC,Reorder:sC,Restart:nl,Search:aC,Settings:yg,Share:lC,ThumbDown:cC,ThumbUp:uC,Time:dC,Touchpoint:el,Translate:nC,Undo:kg,Volume:Ic,VolumeOff:ff,Warning:bg},Symbol.toStringTag,{value:"Module"})),pC=n=>{const{Custom:e}=n;return e!=null?R.jsx(e,{className:n.className,onClick:n.onClick}):R.jsxs("button",{className:st("p-3 w-fit bg-background text-primary-80 rounded-outer","after:content-[''] after:rounded-outer after:absolute after:inset-0 after:pointer-events-none","hover:after:bg-primary-10",n.className),disabled:n.onClick==null,onClick:n.onClick,children:[R.jsx("span",{className:"block flex-none w-8 h-8",children:n.iconUrl==null?R.jsx(el,{}):R.jsx("img",{src:n.iconUrl,className:"w-8 h-8"})}),n.showLabel??!1?R.jsx("span",{children:n.label}):null]})},Sg="p-3 w-10 h-10 transition-colors rounded-inner relative z-10 overflow-hidden before:content-[''] before:absolute before:transition-colors before:-z-10 before:inset-0 before:bg-transparent focus:outline-0",Tg="bg-primary-80 text-secondary-80 enabled:hover:before:bg-primary-80 focus:before:bg-primary-80 enabled:active:before:bg-secondary-10 disabled:bg-primary-10 disabled:text-secondary-40",_g="bg-primary-5 text-primary-80 enabled:hover:before:bg-primary-10 focus:before:bg-primary-10 enabled:active:before:bg-secondary-10 disabled:bg-primary-5 disabled:text-primary-20",xg="bg-accent text-secondary-80 enabled:hover:before:bg-primary-40 focus:before:bg-primary-40 enabled:active:before:bg-secondary-10 disabled:bg-accent-20",Eg="bg-secondary-60 backdrop-blur-sm text-primary-80 enabled:hover:before:bg-primary-10 focus:before:bg-primary-10 enabled:active:before:bg-secondary-10 disabled:bg-secondary-20 disabled:text-primary-20",Pg="bg-background backdrop-blur-sm text-primary-80 enabled:hover:before:bg-primary-10 focus:before:bg-primary-10 enabled:active:before:bg-secondary-10 disabled:bg-secondary-20 disabled:text-primary-20",Rg="bg-error-primary text-secondary-80 enabled:hover:before:bg-primary-10",mC=({type:n,Icon:e})=>R.jsx("span",{className:st(Sg,"block",n==="main"?Tg:null,n==="ghost"?_g:null,n==="activated"?xg:null,n==="coverup"?Eg:null,n==="overlay"?Pg:null,n==="error"?Rg:null),children:R.jsx(e,{})}),mn=({onClick:n,type:e,label:t,className:r,Icon:o})=>{const a=n==null;return R.jsx("button",{onClick:a?void 0:n,disabled:a,"aria-label":t,className:st(Sg,e==="main"?Tg:null,e==="ghost"?_g:null,e==="activated"?xg:null,e==="coverup"?Eg:null,e==="overlay"?Pg:null,e==="error"?Rg:null,r),children:R.jsx(o,{})})};function gC(n){const e=ye.useRef(n);return e.current=n,ye.useMemo(()=>Object.freeze({get current(){return e.current}}),[])}function vC(n){const e=gC(n);ye.useEffect(()=>()=>{e.current()},[])}function yC(n,e,t,r=0){const o=ye.useRef(),a=ye.useRef(),l=ye.useRef(n),u=ye.useRef(),f=()=>{o.current&&(clearTimeout(o.current),o.current=void 0),a.current&&(clearTimeout(a.current),a.current=void 0)};return vC(f),ye.useEffect(()=>{l.current=n},e),ye.useMemo(()=>{const p=()=>{if(f(),!u.current)return;const C=u.current;u.current=void 0,l.current.apply(C.this,C.args)},g=function(...C){o.current&&clearTimeout(o.current),u.current={args:C,this:this},o.current=setTimeout(p,t),r>0&&!a.current&&(a.current=setTimeout(p,r))};return Object.defineProperties(g,{length:{value:n.length},name:{value:`${n.name||"anonymous"}__debounced__${t}`}}),g},[t,r,...e])}const bC=typeof globalThis<"u"&&typeof navigator<"u"&&typeof document<"u";function Ig(n,e,t=0){const[r,o]=ye.useState(n);return[r,yC(o,[],e,t)]}const Gs=new Map,Mg=n=>{const e=matchMedia(n),t=new Set,r=()=>{for(const o of t)o(e.matches)};return e.addEventListener("change",r,{passive:!0}),{mql:e,dispatchers:t,listener:r}},kC=(n,e)=>{let t=Gs.get(n);t||(t=Mg(n),Gs.set(n,t)),t.dispatchers.add(e),e(t.mql.matches)},wC=(n,e)=>{const t=Gs.get(n);if(t){const{mql:r,dispatchers:o,listener:a}=t;o.delete(e),o.size===0&&(Gs.delete(n),r.removeEventListener?r.removeEventListener("change",a):r.removeListener(a))}};function CC(n,e={}){let{initializeWithValue:t=!0}=e;bC||(t=!1);const[r,o]=ye.useState(()=>{if(t){let a=Gs.get(n);return a||(a=Mg(n),Gs.set(n,a)),a.mql.matches}});return ye.useEffect(()=>(kC(n,o),()=>{wC(n,o)}),[n]),r}const Ag=n=>{let e;switch(n){case"sm":e="(min-width: 640px)";break;case"md":e="(min-width: 768px)";break;case"lg":e="(min-width: 1024px)";break}return CC(e)},SC=({windowSize:n,renderCollapse:e,errorThemedCloseButton:t,speakerControls:r,collapse:o,toggleSettings:a,isSettingsOpen:l,brandIcon:u,reset:f,enabled:p})=>{const g=n==="half",C=Ag("md"),_=g&&C?"overlay":"ghost";return R.jsxs("div",{className:st("flex p-2 md:p-3 items-center justify-between gap-2",{"md:absolute md:w-fit md:flex-col md:left-0 md:transform md:-translate-x-full md:translate-y-0":n==="half","@3xl/main:absolute @3xl/main:left-0 @3xl/main:right-0 @3xl/main:top-0":n==="full"||n==="embedded"}),children:[u!=null?R.jsx("img",{className:"w-10 h-10 block flex-none",src:u,role:"presentation"}):null,R.jsx(mn,{label:"Reset",type:_,className:u==null?"":"ml-auto",onClick:p?()=>{f()}:void 0,Icon:kg}),a!=null?R.jsx(mn,{className:u!=null?"":"ml-auto",Icon:yg,label:"Settings",type:l?"activated":_,onClick:p?a:void 0}):null,r!=null?R.jsx(mn,{Icon:r.enabled?Ic:ff,label:"Speakers",type:r.enabled?"activated":_,onClick:()=>{r.setEnabled(T=>!T)}}):null,e?R.jsx(mn,{label:"Collapse",type:t??!1?"error":_,className:st(a==null?"ml-auto":"",g?"md:-order-1":""),onClick:p?()=>{o(new Event("collapse"))}:void 0,Icon:tl}):null]})},Og=()=>R.jsxs("div",{className:st("grow flex flex-col items-center justify-center gap-6 text-primary-80","fullscreen-error"),children:[R.jsx(el,{className:"w-20 h-20 text-primary-20"}),R.jsxs("div",{className:"text-center",children:[R.jsx("h3",{className:"text-xl mb-2",children:"Oops!"}),R.jsx("p",{children:"Something went wrong."}),R.jsx("p",{children:"Try again later."})]})]}),Mc=({k:n,className:e,style:t})=>{const o=a=>`${a}s`;return R.jsx("div",{className:st("bg-current animate-ping absolute inset-0",e),style:{animationDelay:o(-1.5*n),animationDuration:o(1.5),...t??{}}})},Ks=({className:n,style:e})=>{const t=st("text-accent-20",n);return R.jsxs(R.Fragment,{children:[R.jsx(Mc,{k:.12,className:t,style:e}),R.jsx(Mc,{k:.24,className:t,style:e}),R.jsx(Mc,{k:.36,className:t,style:e}),R.jsx(Mc,{k:.48,className:t,style:e})]})},TC=30,rl=17,_C=n=>n<.5?2*n*n:1-Math.pow(-2*n+2,2)/2,hf=990,Ac=hf+300,xC=({d:n})=>{const e=Math.PI/2,t=n/rl/2.8,r=e*Math.min(t,1),o=t<1?(n-Math.sin(r))/Math.cos(r)*.5:0,a=-n,l=n,u=n-rl*Math.sin(r),f=rl*Math.cos(r),p=u-o*Math.cos(r),g=f-o*Math.sin(r);return R.jsxs(R.Fragment,{children:[R.jsx("circle",{cx:a,cy:"0",r:rl}),R.jsx("circle",{cx:l,cy:"0",r:rl}),t<.45?R.jsx("path",{d:`
61
61
  M${-u},${f}
62
62
  C${-p},${g} ${p},${g} ${u},${f} L${u},${-f}
63
63
  C${p},${-g} ${-p},${-g} ${-u},${-f} Z
@@ -153,7 +153,7 @@ ${e}</tr>
153
153
  `}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
154
154
  `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ci(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const o=this.parser.parseInline(r),a=Hy(e);if(a===null)return o;e=a;let l='<a href="'+e+'"';return t&&(l+=' title="'+Ci(t)+'"'),l+=">"+o+"</a>",l}image({href:e,title:t,text:r}){const o=Hy(e);if(o===null)return Ci(r);e=o;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${Ci(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ci(e.text)}}class Vh{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class Mr{constructor(e){St(this,"options");St(this,"renderer");St(this,"textRenderer");this.options=e||ss,this.options.renderer=this.options.renderer||new ku,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Vh}static parse(e,t){return new Mr(t).parse(e)}static parseInline(e,t){return new Mr(t).parseInline(e)}parse(e,t=!0){var o,a;let r="";for(let l=0;l<e.length;l++){const u=e[l];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[u.type]){const p=u,g=this.options.extensions.renderers[p.type].call({parser:this},p);if(g!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(p.type)){r+=g||"";continue}}const f=u;switch(f.type){case"space":{r+=this.renderer.space(f);continue}case"hr":{r+=this.renderer.hr(f);continue}case"heading":{r+=this.renderer.heading(f);continue}case"code":{r+=this.renderer.code(f);continue}case"table":{r+=this.renderer.table(f);continue}case"blockquote":{r+=this.renderer.blockquote(f);continue}case"list":{r+=this.renderer.list(f);continue}case"html":{r+=this.renderer.html(f);continue}case"paragraph":{r+=this.renderer.paragraph(f);continue}case"text":{let p=f,g=this.renderer.text(p);for(;l+1<e.length&&e[l+1].type==="text";)p=e[++l],g+=`
155
155
  `+this.renderer.text(p);t?r+=this.renderer.paragraph({type:"paragraph",raw:g,text:g,tokens:[{type:"text",raw:g,text:g,escaped:!0}]}):r+=g;continue}default:{const p='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(p),"";throw new Error(p)}}}return r}parseInline(e,t=this.renderer){var o,a;let r="";for(let l=0;l<e.length;l++){const u=e[l];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[u.type]){const p=this.options.extensions.renderers[u.type].call({parser:this},u);if(p!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(u.type)){r+=p||"";continue}}const f=u;switch(f.type){case"escape":{r+=t.text(f);break}case"html":{r+=t.html(f);break}case"link":{r+=t.link(f);break}case"image":{r+=t.image(f);break}case"strong":{r+=t.strong(f);break}case"em":{r+=t.em(f);break}case"codespan":{r+=t.codespan(f);break}case"br":{r+=t.br(f);break}case"del":{r+=t.del(f);break}case"text":{r+=t.text(f);break}default:{const p='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(p),"";throw new Error(p)}}}return r}}class xl{constructor(e){St(this,"options");St(this,"block");this.options=e||ss}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Ir.lex:Ir.lexInline}provideParser(){return this.block?Mr.parse:Mr.parseInline}}St(xl,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class Px{constructor(...e){St(this,"defaults",Oh());St(this,"options",this.setOptions);St(this,"parse",this.parseMarkdown(!0));St(this,"parseInline",this.parseMarkdown(!1));St(this,"Parser",Mr);St(this,"Renderer",ku);St(this,"TextRenderer",Vh);St(this,"Lexer",Ir);St(this,"Tokenizer",bu);St(this,"Hooks",xl);this.use(...e)}walkTokens(e,t){var o,a;let r=[];for(const l of e)switch(r=r.concat(t.call(this,l)),l.type){case"table":{const u=l;for(const f of u.header)r=r.concat(this.walkTokens(f.tokens,t));for(const f of u.rows)for(const p of f)r=r.concat(this.walkTokens(p.tokens,t));break}case"list":{const u=l;r=r.concat(this.walkTokens(u.items,t));break}default:{const u=l;(a=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&a[u.type]?this.defaults.extensions.childTokens[u.type].forEach(f=>{const p=u[f].flat(1/0);r=r.concat(this.walkTokens(p,t))}):u.tokens&&(r=r.concat(this.walkTokens(u.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const l=t.renderers[a.name];l?t.renderers[a.name]=function(...u){let f=a.renderer.apply(this,u);return f===!1&&(f=l.apply(this,u)),f}:t.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=t[a.level];l?l.unshift(a.tokenizer):t[a.level]=[a.tokenizer],a.start&&(a.level==="block"?t.startBlock?t.startBlock.push(a.start):t.startBlock=[a.start]:a.level==="inline"&&(t.startInline?t.startInline.push(a.start):t.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(t.childTokens[a.name]=a.childTokens)}),o.extensions=t),r.renderer){const a=this.defaults.renderer||new ku(this.defaults);for(const l in r.renderer){if(!(l in a))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;const u=l,f=r.renderer[u],p=a[u];a[u]=(...g)=>{let C=f.apply(a,g);return C===!1&&(C=p.apply(a,g)),C||""}}o.renderer=a}if(r.tokenizer){const a=this.defaults.tokenizer||new bu(this.defaults);for(const l in r.tokenizer){if(!(l in a))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;const u=l,f=r.tokenizer[u],p=a[u];a[u]=(...g)=>{let C=f.apply(a,g);return C===!1&&(C=p.apply(a,g)),C}}o.tokenizer=a}if(r.hooks){const a=this.defaults.hooks||new xl;for(const l in r.hooks){if(!(l in a))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;const u=l,f=r.hooks[u],p=a[u];xl.passThroughHooks.has(l)?a[u]=g=>{if(this.defaults.async)return Promise.resolve(f.call(a,g)).then(_=>p.call(a,_));const C=f.call(a,g);return p.call(a,C)}:a[u]=(...g)=>{let C=f.apply(a,g);return C===!1&&(C=p.apply(a,g)),C}}o.hooks=a}if(r.walkTokens){const a=this.defaults.walkTokens,l=r.walkTokens;o.walkTokens=function(u){let f=[];return f.push(l.call(this,u)),a&&(f=f.concat(a.call(this,u))),f}}this.defaults={...this.defaults,...o}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Ir.lex(e,t??this.defaults)}parser(e,t){return Mr.parse(e,t??this.defaults)}parseMarkdown(e){return(r,o)=>{const a={...o},l={...this.defaults,...a},u=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&a.async===!1)return u(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return u(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return u(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));l.hooks&&(l.hooks.options=l,l.hooks.block=e);const f=l.hooks?l.hooks.provideLexer():e?Ir.lex:Ir.lexInline,p=l.hooks?l.hooks.provideParser():e?Mr.parse:Mr.parseInline;if(l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(r):r).then(g=>f(g,l)).then(g=>l.hooks?l.hooks.processAllTokens(g):g).then(g=>l.walkTokens?Promise.all(this.walkTokens(g,l.walkTokens)).then(()=>g):g).then(g=>p(g,l)).then(g=>l.hooks?l.hooks.postprocess(g):g).catch(u);try{l.hooks&&(r=l.hooks.preprocess(r));let g=f(r,l);l.hooks&&(g=l.hooks.processAllTokens(g)),l.walkTokens&&this.walkTokens(g,l.walkTokens);let C=p(g,l);return l.hooks&&(C=l.hooks.postprocess(C)),C}catch(g){return u(g)}}}onError(e,t){return r=>{if(r.message+=`
156
- Please report this to https://github.com/markedjs/marked.`,e){const o="<p>An error occurred:</p><pre>"+Ci(r.message+"",!0)+"</pre>";return t?Promise.resolve(o):o}if(t)return Promise.reject(r);throw r}}}const as=new Px;function _t(n,e){return as.parse(n,e)}_t.options=_t.setOptions=function(n){return as.setOptions(n),_t.defaults=as.defaults,Oy(_t.defaults),_t},_t.getDefaults=Oh,_t.defaults=ss,_t.use=function(...n){return as.use(...n),_t.defaults=as.defaults,Oy(_t.defaults),_t},_t.walkTokens=function(n,e){return as.walkTokens(n,e)},_t.parseInline=as.parseInline,_t.Parser=Mr,_t.parser=Mr.parse,_t.Renderer=ku,_t.TextRenderer=Vh,_t.Lexer=Ir,_t.lexer=Ir.lex,_t.Tokenizer=bu,_t.Hooks=xl,_t.parse=_t,_t.options,_t.setOptions,_t.use,_t.walkTokens,_t.parseInline,Mr.parse,Ir.lex;const Rx=({handler:n,message:e,responseIndex:t,messageIndex:r})=>e.choices.length>0?R.jsx("ul",{className:"space-y-2 max-h-[40vh] overflow-auto no-scrollbar",children:e.choices.map((o,a)=>e.selectedChoiceId==null||o.choiceId===e.selectedChoiceId?R.jsx("li",{className:"w-full",children:R.jsx(ho,{type:"ghost",Icon:Pc,onClick:e.selectedChoiceId==null?()=>{n.sendChoice(o.choiceId,{},{responseIndex:t,messageIndex:r})}:void 0,label:o.choiceText})},a):null)}):null,zh=({text:n,bubble:e,files:t})=>R.jsxs("div",{className:"space-y-2",children:[R.jsx("div",{className:"flex justify-end pl-10 text-base",children:R.jsx("div",{className:st("text-primary-60 rounded-inner whitespace-pre-wrap",e?"bg-primary-5 p-3":""),children:n})}),t!=null?R.jsx("div",{className:"flex flex-wrap justify-end gap-2",children:t.map((r,o)=>R.jsx("img",{className:"rounded-inner h-20",src:URL.createObjectURL(r)},o))}):null]}),Gy=({text:n,number:e})=>R.jsxs("span",{className:"flex items-center gap-2",children:[R.jsx("span",{className:"bg-primary-10 text-primary-60 text-xs px-1.5 py-0.5 rounded-inner",children:e}),n]}),Ix=n=>{const e=new Map;return n.forEach((t,r)=>{const o={fileName:t.fileName,content:t.content,presignedUrl:t.presignedUrl,metadata:void 0,pageNumber:void 0},a=JSON.stringify(o),l=e.get(a);e.set(a,l==null?{source:o,indices:[r]}:{...l,indices:[...l.indices,r]})}),[...e.values()]},Mx=({sources:n})=>{const[e,t]=ye.useState(!1),r=ye.useMemo(()=>Ix(n),[n]);return r.length===0?null:R.jsxs("details",{className:"space-y-2",open:e,onToggle:o=>{t(o.currentTarget.open)},children:[R.jsxs("summary",{className:"flex cursor-pointer items-center gap-2 rounded-inner hover:bg-primary-5 text-primary-80",children:[R.jsx(mC,{type:"ghost",Icon:e?fg:hg}),"Sources"]}),R.jsx("ol",{className:"space-y-2",children:r.map(({source:o,indices:a},l)=>{const u=o.fileName??o.content??"Source",f="p-3 bg-primary-5 rounded-inner w-full flex items-center justify-between text-primary-80",p=a.map(g=>String(g+1)).join(", ");return R.jsx("li",{children:o.presignedUrl!=null?R.jsxs("a",{href:o.presignedUrl,className:st(f,"hover:bg-primary-10"),children:[R.jsx(Gy,{text:u,number:p}),R.jsx(wg,{className:"w-4 h-4 text-primary-60"})]}):R.jsx("div",{className:f,children:R.jsx(Gy,{text:u,number:p})})},l)})})]})},Ax=({responses:n,colorMode:e,chatMode:t,uploadedFiles:r,userMessageBubble:o,agentMessageBubble:a,lastApplicationResponseIndex:l,isWaiting:u,modalityComponents:f,handler:p,className:g,enabled:C})=>{const _=ye.useRef(null),T=ye.useRef(null);return ye.useEffect(()=>{!t&&!u&&setTimeout(()=>{var N;(N=T.current)==null||N.scrollIntoView({behavior:"smooth"})})},[u,t]),ye.useEffect(()=>{var N;if(t){const A=(N=_.current)==null?void 0:N.lastChild;A instanceof HTMLElement&&A.scrollIntoView({behavior:"smooth"})}},[n.length,t]),R.jsxs("div",{className:st("relative",g),children:[R.jsx("div",{"data-theme":e==="dark"?"light":"dark",className:st("absolute inset-x-0 h-px top-0 bg-background opacity-[0.01] backdrop-blur-md")}),!t&&u?R.jsx(Dg,{label:"Thinking",className:"absolute inset-0"}):null,R.jsxs("div",{className:st("absolute inset-0 p-2 md:p-3 overflow-y-auto no-scrollbar space-y-8",!t&&u?"opacity-0":"opacity-100"),ref:_,children:[n.map((N,A)=>{var z;if(N.type===Wn.User)return N.payload.type==="text"?R.jsx(zh,{text:N.payload.text,bubble:o},A):N.payload.type==="structured"&&N.payload.utterance!=null&&N.payload.uploadIds!=null?R.jsx(zh,{bubble:o,text:N.payload.utterance,files:N.payload.uploadIds.map(ee=>r[ee]).filter(ee=>ee!=null)},A):null;if(N.type===Wn.Failure)return R.jsx(wl,{message:N.payload.text},A);const H=l!=null&&A===l;return R.jsxs(ye.Fragment,{children:[R.jsxs("div",{className:st("space-y-2",!t&&H?"min-h-full":""),ref:H?T:void 0,children:[N.payload.messages.map((ee,U)=>R.jsx("div",{className:"text-base",children:R.jsx("div",{className:st("space-y-6 markdown",a?"p-3 w-fit bg-secondary-40 mr-10 rounded-inner":""),dangerouslySetInnerHTML:{__html:_t(ee.text,{async:!1})}})},U)),((z=N.payload.metadata)==null?void 0:z.sources)!=null?R.jsx(Mx,{sources:N.payload.metadata.sources}):null,R.jsx(Iy,{fallback:R.jsx(wl,{message:"Something went wrong"}),children:Object.entries(N.payload.modalities??{}).map(([ee,U])=>{const L=f[ee];return L==null?(console.warn(`Custom component implementation missing for the ${ee} modality.`),null):R.jsx(L,{data:U,conversationHandler:p,enabled:C},ee)})})]}),N.payload.messages.map((ee,U)=>{if(ee.selectedChoiceId!=null){const L=ee.choices.find(F=>F.choiceId===ee.selectedChoiceId);return L==null?null:R.jsx(zh,{text:L.choiceText,bubble:o},U)}return null})]},A)}),t&&u?R.jsxs("div",{className:"text-primary-60 flex items-center gap-1 text-base",children:[R.jsx("span",{className:"w-5 h-5 block flex-none text-accent",children:R.jsx(pf,{})}),"Thinking..."]}):null]},"messages")]})};function Wh(){return Wh=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Wh.apply(null,arguments)}function Ox(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}var Lx=ye.useLayoutEffect,Dx=function(e){var t=uo.useRef(e);return Lx(function(){t.current=e}),t},Ky=function(e,t){if(typeof e=="function"){e(t);return}e.current=t},Nx=function(e,t){var r=uo.useRef();return uo.useCallback(function(o){e.current=o,r.current&&Ky(r.current,null),r.current=t,t&&Ky(t,o)},[t])},Jy={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},jx=function(e){Object.keys(Jy).forEach(function(t){e.style.setProperty(t,Jy[t],"important")})},Yy=jx,Yn=null,Qy=function(e,t){var r=e.scrollHeight;return t.sizingStyle.boxSizing==="border-box"?r+t.borderSize:r-t.paddingSize};function Fx(n,e,t,r){t===void 0&&(t=1),r===void 0&&(r=1/0),Yn||(Yn=document.createElement("textarea"),Yn.setAttribute("tabindex","-1"),Yn.setAttribute("aria-hidden","true"),Yy(Yn)),Yn.parentNode===null&&document.body.appendChild(Yn);var o=n.paddingSize,a=n.borderSize,l=n.sizingStyle,u=l.boxSizing;Object.keys(l).forEach(function(_){var T=_;Yn.style[T]=l[T]}),Yy(Yn),Yn.value=e;var f=Qy(Yn,n);Yn.value=e,f=Qy(Yn,n),Yn.value="x";var p=Yn.scrollHeight-o,g=p*t;u==="border-box"&&(g=g+o+a),f=Math.max(g,f);var C=p*r;return u==="border-box"&&(C=C+o+a),f=Math.min(C,f),[f,p]}var Xy=function(){},Ux=function(e,t){return e.reduce(function(r,o){return r[o]=t[o],r},{})},Bx=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Vx=!!document.documentElement.currentStyle,zx=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var r=Ux(Bx,t),o=r.boxSizing;if(o==="")return null;Vx&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),l=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:l}},Wx=zx;function Zy(n,e,t){var r=Dx(t);ye.useLayoutEffect(function(){var o=function(l){return r.current(l)};if(n)return n.addEventListener(e,o),function(){return n.removeEventListener(e,o)}},[])}var Hx=function(e){Zy(window,"resize",e)},$x=function(e){Zy(document.fonts,"loadingdone",e)},qx=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Gx=function(e,t){var r=e.cacheMeasurements,o=e.maxRows,a=e.minRows,l=e.onChange,u=l===void 0?Xy:l,f=e.onHeightChange,p=f===void 0?Xy:f,g=Ox(e,qx),C=g.value!==void 0,_=ye.useRef(null),T=Nx(_,t),N=ye.useRef(0),A=ye.useRef(),H=function(){var U=_.current,L=r&&A.current?A.current:Wx(U);if(L){A.current=L;var F=Fx(L,U.value||U.placeholder||"x",a,o),G=F[0],se=F[1];N.current!==G&&(N.current=G,U.style.setProperty("height",G+"px","important"),p(G,{rowHeight:se}))}},z=function(U){C||H(),u(U)};return ye.useLayoutEffect(H),Hx(H),$x(H),ye.createElement("textarea",Wh({},g,{onChange:z,ref:T}))},Kx=ye.forwardRef(Gx);const eb=8,Jx=({className:n,handler:e,uploadUrl:t,onFileUpload:r,enabled:o})=>{const[a,l]=ye.useState(!1),[u,f]=ye.useState(""),[p,g]=ye.useState(null),[C,_]=ye.useState(null),T=ye.useRef(null),N=ye.useRef(null),A=Ag("md");ye.useEffect(()=>{var Q;A&&((Q=N.current)==null||Q.focus())},[A]);const H=ye.useMemo(()=>u.trim()==="",[u]),[z,ee]=ye.useState(!1),U=H&&C==null||z||!o,L=()=>{if(U)return;const Q=($,q)=>{(q==null?void 0:q.type)===Wn.Application&&(ee(!1),e.unsubscribe(Q),f(""),_(null),A&&setTimeout(()=>{var Y;(Y=N.current)==null||Y.focus()}))};e.subscribe(Q),ee(!0),t!=null&&C!=null?e.sendStructured({uploadIds:[t.uploadId],utterance:u}):e.sendText(u)},F=t!=null&&o,G=()=>{g("Something went wrong. Please try again.")},se=Q=>{var Re,We;if(t==null){G();return}const $=(We=(Re=Q.target)==null?void 0:Re.files)==null?void 0:We[0];if($==null){G();return}const{name:q,size:Y,type:fe}=$;if(_({name:q,size:Y,type:fe}),Y/1024**2>eb){g(`The file is too big. Max file size: ${eb}mb`);return}fetch(t.url,{method:"PUT",headers:{"Content-Type":"image/jpeg"},body:$}).then(()=>{g(null),r({uploadId:t.uploadId,file:$})}).catch(()=>{G()})};return R.jsx("div",{className:st("relative",n),children:R.jsxs("div",{className:st("bg-primary-5 transition-colors duration-200 p-2 rounded-outer text-base font-normal",a?"":"hover:bg-secondary-20"),children:[p!=null&&R.jsxs("div",{className:"flex items-center py-1 mb-2 w-full bg-error-secondary rounded-inner",children:[R.jsx(uf,{size:16}),R.jsx("span",{className:"truncate ml-1",children:p})]}),C&&R.jsxs(R.Fragment,{children:[R.jsxs("div",{className:"flex items-center justify-between mb-2 w-full",children:[R.jsxs("p",{className:"flex items-center truncate mx-2",children:[p!=null?R.jsx(uf,{size:16,className:"text-error-primary"}):R.jsx(pg,{size:16,className:"text-primary-60"}),R.jsx("span",{className:"truncate ml-3",children:C.name})]}),R.jsx(mn,{className:"flex-none",Icon:gg,label:"Delete",onClick:F?()=>{_(null),g(null),T.current!=null&&(T.current.value="")}:void 0,type:"ghost"})]}),R.jsx("hr",{className:"border-b-px border-background mb-2 -mx-2"})]}),R.jsxs("div",{className:st("flex items-end gap-1"),children:[F&&C==null?R.jsxs(R.Fragment,{children:[R.jsx("label",{htmlFor:"file-upload",className:"p-3 w-10 h-10 flex-none block transition-colors rounded-inner bg-primary-80 hover:bg-primary-80 text-secondary-80 cursor-pointer",children:R.jsx(cf,{})}),R.jsx("input",{type:"file",id:"file-upload",className:"sr-only",accept:".jpg, .jpeg, .png, .webp, .mp4, .mpeg4, .avi, .mov, .pdf",onChange:se,ref:T})]}):R.jsx(mn,{className:"flex-none",Icon:cf,label:"Upload file",type:"ghost"}),R.jsx(Kx,{disabled:z||!o,className:st("h-10 w-full resize-none mr-2 px-2 py-2 outline-hidden","bg-transparent text-primary-80 placeholder:text-primary-40 caret-accent","disabled:text-primary-40"),placeholder:"Type something",maxRows:10,onFocus:()=>{l(!0)},onBlur:()=>{l(!1)},value:u,onChange:Q=>{f(Q.target.value)},onKeyDown:Q=>{Q.key==="Enter"&&!Q.shiftKey&&(Q.preventDefault(),L())},ref:N}),R.jsx(mn,{className:"flex-none",label:"Send message",onClick:U?void 0:()=>{L()},type:"main",Icon:Pc})]})]})})},Yx=n=>({"--font-family":n.fontFamily,"--radius-inner":n.innerBorderRadius,"--radius-outer":n.outerBorderRadius,"--color-primary-80":n.primary80,"--color-primary-60":n.primary60,"--color-primary-40":n.primary40,"--color-primary-20":n.primary20,"--color-primary-10":n.primary10,"--color-primary-5":n.primary5,"--color-primary-1":n.primary1,"--color-secondary-80":n.secondary80,"--color-secondary-60":n.secondary60,"--color-secondary-40":n.secondary40,"--color-secondary-20":n.secondary20,"--color-secondary-10":n.secondary10,"--color-secondary-5":n.secondary5,"--color-secondary-1":n.secondary1,"--color-accent":n.accent,"--color-accent-20":n.accent20,"--color-background":n.background,"--color-overlay":n.overlay,"--color-warning-primary":n.warningPrimary,"--color-warning-secondary":n.warningSecondary,"--color-error-primary":n.errorPrimary,"--color-error-secondary":n.errorSecondary}),Qx={fontFamily:'"Neue Haas Grotesk", sans-serif',innerBorderRadius:"12px",outerBorderRadius:"20px",primary80:"rgba(0, 2, 9, 0.8)",primary60:"rgba(0, 2, 9, 0.6)",primary40:"rgba(0, 2, 9, 0.4)",primary20:"rgba(0, 2, 9, 0.2)",primary10:"rgba(0, 2, 9, 0.1)",primary5:"rgba(0, 2, 9, 0.05)",primary1:"rgba(0, 2, 9, 0.01)",secondary80:"rgba(255, 255, 255, 0.85)",secondary60:"rgba(255, 255, 255, 0.65)",secondary40:"rgba(255, 255, 255, 0.45)",secondary20:"rgba(255, 255, 255, 0.25)",secondary10:"rgba(255, 255, 255, 0.15)",secondary5:"rgba(255, 255, 255, 0.08)",secondary1:"rgba(255, 255, 255, 0.01)",accent:"rgb(28, 99, 218)",accent20:"rgba(28, 99, 218, 0.2)",background:"rgba(220, 220, 220, 0.9)",overlay:"rgba(0, 2, 9, 0.4)",warningPrimary:"rgb(220, 159, 3)",warningSecondary:"rgb(255, 242, 209)",errorPrimary:"rgb(157, 3, 3)",errorSecondary:"rgb(255, 223, 230)"},Xx={fontFamily:'"Neue Haas Grotesk", sans-serif',innerBorderRadius:"12px",outerBorderRadius:"20px",primary80:"rgba(255, 255, 255, 0.85)",primary60:"rgba(255, 255, 255, 0.65)",primary40:"rgba(255, 255, 255, 0.45)",primary20:"rgba(255, 255, 255, 0.25)",primary10:"rgba(255, 255, 255, 0.15)",primary5:"rgba(255, 255, 255, 0.08)",primary1:"rgba(255, 255, 255, 0.01)",secondary80:"rgba(0, 2, 9, 0.8)",secondary60:"rgba(0, 2, 9, 0.6)",secondary40:"rgba(0, 2, 9, 0.4)",secondary20:"rgba(0, 2, 9, 0.2)",secondary10:"rgba(0, 2, 9, 0.1)",secondary5:"rgba(0, 2, 9, 0.05)",secondary1:"rgba(0, 2, 9, 0.01)",accent:"rgb(174, 202, 255)",accent20:"rgba(174, 202, 255, 0.25)",background:"rgba(0, 2, 9, 0.9)",overlay:"rgba(0, 2, 9, 0.4)",warningPrimary:"rgb(255, 214, 108)",warningSecondary:"rgb(95, 65, 29)",errorPrimary:"rgb(255, 133, 162)",errorSecondary:"rgb(94, 4, 4)"},Zx=(n,e)=>{const t={};return n.accent!=null&&n.accent20==null&&(t.accent20=`color-mix(in srgb, ${n.accent} 20%, transparent)`),n.primary80!=null&&(n.primary60==null&&(t.primary60=`rgb(from ${n.primary80} r g b / 0.6)`),n.primary40==null&&(t.primary40=`rgb(from ${n.primary80} r g b / 0.4)`),n.primary20==null&&(t.primary20=`rgb(from ${n.primary80} r g b / 0.2)`),n.primary10==null&&(t.primary10=`rgb(from ${n.primary80} r g b / 0.1)`),n.primary5==null&&(t.primary5=`rgb(from ${n.primary80} r g b / 0.05)`),n.primary1==null&&(t.primary1=`rgb(from ${n.primary80} r g b / 0.01)`)),n.secondary80!=null&&(n.secondary60==null&&(t.secondary60=`rgb(from ${n.secondary80} r g b / 0.6)`),n.secondary40==null&&(t.secondary40=`rgb(from ${n.secondary80} r g b / 0.4)`),n.secondary20==null&&(t.secondary20=`rgb(from ${n.secondary80} r g b / 0.2)`),n.secondary10==null&&(t.secondary10=`rgb(from ${n.secondary80} r g b / 0.1)`),n.secondary5==null&&(t.secondary5=`rgb(from ${n.secondary80} r g b / 0.05)`),n.secondary1==null&&(t.secondary1=`rgb(from ${n.secondary80} r g b / 0.01)`)),{...e,...t,...n}},wu=({colorMode:n,children:e,theme:t,className:r})=>{const o=Zx(t??{},n==="dark"?Xx:Qx);return R.jsx("div",{className:st(r,"font-sans"),style:{...Yx(o),colorScheme:n},children:e})},tb="bg-background backdrop-blur-sm text-primary-80 rounded-outer p-2 w-[calc(100vw-16px)] max-w-[360px] space-y-4",nb=({children:n,renderCollapse:e,onClose:t})=>R.jsxs("div",{className:tb,children:[e&&R.jsx("div",{className:"flex items-center justify-end",children:R.jsx(mn,{onClick:t,Icon:tl,type:"ghost",label:"Close"})}),n]}),rb=({children:n,className:e})=>R.jsx("div",{className:st("bg-background rounded-outer p-2 w-fit flex items-center gap-2",e),children:n}),eE=({handler:n,context:e,onClose:t,modalityComponents:r,renderCollapse:o})=>{const[a,l]=ye.useState(!0),[u,f]=ye.useState(!0),p=()=>{t(new Event("close"))},{roomState:g,isUserSpeaking:C,isApplicationSpeaking:_,retry:T,modalities:N}=Ry({micEnabled:a,speakersEnabled:u,handler:n,context:e});return g==="error"?R.jsxs(nb,{renderCollapse:o,onClose:p,children:[R.jsx(wl,{message:"I couldn’t connect"}),R.jsx(ho,{type:"ghost",label:"Retry",Icon:nl,onClick:()=>{T()}})]}):g==="noAudioPermissions"?R.jsxs(nb,{renderCollapse:o,onClose:p,children:[R.jsx(wl,{message:"Connect your microphone and speaker"}),R.jsx(ho,{type:"ghost",label:"Retry",Icon:nl,onClick:()=>{T()}})]}):g==="pending"?R.jsxs(rb,{className:"relative",children:[R.jsx(mn,{Icon:Rc,label:"Microphone",type:"ghost",className:"invisible"}),R.jsx(mn,{Icon:Ic,label:"Speakers",type:"ghost",className:"invisible"}),R.jsx(mn,{Icon:tl,label:"Close",type:"ghost",className:"invisible"}),R.jsx("span",{className:"w-6 h-6 block text-accent absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",children:R.jsx(pf,{})})]}):R.jsxs(rb,{children:[R.jsxs("div",{className:"w-fit relative",children:[C?R.jsx(Ks,{className:"rounded-inner"}):null,R.jsx(mn,{Icon:a?Rc:df,label:"Microphone",type:a?"activated":"ghost",onClick:()=>{l(A=>!A)}})]}),R.jsxs("div",{className:"w-fit relative",children:[_?R.jsx(Ks,{className:"rounded-inner"}):null,R.jsx(mn,{Icon:u?Ic:ff,label:"Speakers",type:u?"activated":"ghost",onClick:()=>{f(A=>!A)}})]}),R.jsx(mn,{label:"Close",Icon:tl,type:"error",onClick:()=>{p()}}),R.jsx(My,{className:st(tb,"absolute right-0 -top-2 transform translate-x-0 -translate-y-full max-h-[360px] overflow-auto"),modalities:N,modalityComponents:r,handler:n})]})};var tE=Object.prototype.toString;function nE(n){return typeof n=="function"||tE.call(n)==="[object Function]"}function rE(n){var e=Number(n);return isNaN(e)?0:e===0||!isFinite(e)?e:(e>0?1:-1)*Math.floor(Math.abs(e))}var iE=Math.pow(2,53)-1;function oE(n){var e=rE(n);return Math.min(Math.max(e,0),iE)}function Zr(n,e){var t=Array,r=Object(n);if(n==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");for(var o=oE(r.length),a=nE(t)?Object(new t(o)):new Array(o),l=0,u;l<o;)u=r[l],a[l]=u,l+=1;return a.length=o,a}function El(n){"@babel/helpers - typeof";return El=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},El(n)}function sE(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function aE(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,ib(r.key),r)}}function lE(n,e,t){return e&&aE(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function cE(n,e,t){return e=ib(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function ib(n){var e=uE(n,"string");return El(e)=="symbol"?e:e+""}function uE(n,e){if(El(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(El(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}var dE=function(){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];sE(this,n),cE(this,"items",void 0),this.items=e}return lE(n,[{key:"add",value:function(t){return this.has(t)===!1&&this.items.push(t),this}},{key:"clear",value:function(){this.items=[]}},{key:"delete",value:function(t){var r=this.items.length;return this.items=this.items.filter(function(o){return o!==t}),r!==this.items.length}},{key:"forEach",value:function(t){var r=this;this.items.forEach(function(o){t(o,o,r)})}},{key:"has",value:function(t){return this.items.indexOf(t)!==-1}},{key:"size",get:function(){return this.items.length}}])}();const fE=typeof Set>"u"?Set:dE;function Mn(n){var e;return(e=n.localName)!==null&&e!==void 0?e:n.tagName.toLowerCase()}var hE={article:"article",aside:"complementary",button:"button",datalist:"listbox",dd:"definition",details:"group",dialog:"dialog",dt:"term",fieldset:"group",figure:"figure",form:"form",footer:"contentinfo",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",header:"banner",hr:"separator",html:"document",legend:"legend",li:"listitem",math:"math",main:"main",menu:"list",nav:"navigation",ol:"list",optgroup:"group",option:"option",output:"status",progress:"progressbar",section:"region",summary:"button",table:"table",tbody:"rowgroup",textarea:"textbox",tfoot:"rowgroup",td:"cell",th:"columnheader",thead:"rowgroup",tr:"row",ul:"list"},pE={caption:new Set(["aria-label","aria-labelledby"]),code:new Set(["aria-label","aria-labelledby"]),deletion:new Set(["aria-label","aria-labelledby"]),emphasis:new Set(["aria-label","aria-labelledby"]),generic:new Set(["aria-label","aria-labelledby","aria-roledescription"]),insertion:new Set(["aria-label","aria-labelledby"]),none:new Set(["aria-label","aria-labelledby"]),paragraph:new Set(["aria-label","aria-labelledby"]),presentation:new Set(["aria-label","aria-labelledby"]),strong:new Set(["aria-label","aria-labelledby"]),subscript:new Set(["aria-label","aria-labelledby"]),superscript:new Set(["aria-label","aria-labelledby"])};function mE(n,e){return["aria-atomic","aria-busy","aria-controls","aria-current","aria-description","aria-describedby","aria-details","aria-dropeffect","aria-flowto","aria-grabbed","aria-hidden","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription"].some(function(t){var r;return n.hasAttribute(t)&&!((r=pE[e])!==null&&r!==void 0&&r.has(t))})}function ob(n,e){return mE(n,e)}function gE(n){var e=yE(n);if(e===null||Hh.indexOf(e)!==-1){var t=vE(n);if(Hh.indexOf(e||"")===-1||ob(n,t||""))return t}return e}function vE(n){var e=hE[Mn(n)];if(e!==void 0)return e;switch(Mn(n)){case"a":case"area":case"link":if(n.hasAttribute("href"))return"link";break;case"img":return n.getAttribute("alt")===""&&!ob(n,"img")?"presentation":"img";case"input":{var t=n,r=t.type;switch(r){case"button":case"image":case"reset":case"submit":return"button";case"checkbox":case"radio":return r;case"range":return"slider";case"email":case"tel":case"text":case"url":return n.hasAttribute("list")?"combobox":"textbox";case"search":return n.hasAttribute("list")?"combobox":"searchbox";case"number":return"spinbutton";default:return null}}case"select":return n.hasAttribute("multiple")||n.size>1?"listbox":"combobox"}return null}function yE(n){var e=n.getAttribute("role");if(e!==null){var t=e.trim().split(" ")[0];if(t.length>0)return t}return null}var Hh=["presentation","none"];function Ut(n){return n!==null&&n.nodeType===n.ELEMENT_NODE}function sb(n){return Ut(n)&&Mn(n)==="caption"}function Cu(n){return Ut(n)&&Mn(n)==="input"}function bE(n){return Ut(n)&&Mn(n)==="optgroup"}function kE(n){return Ut(n)&&Mn(n)==="select"}function wE(n){return Ut(n)&&Mn(n)==="table"}function CE(n){return Ut(n)&&Mn(n)==="textarea"}function SE(n){var e=n.ownerDocument===null?n:n.ownerDocument,t=e.defaultView;if(t===null)throw new TypeError("no window available");return t}function TE(n){return Ut(n)&&Mn(n)==="fieldset"}function _E(n){return Ut(n)&&Mn(n)==="legend"}function xE(n){return Ut(n)&&Mn(n)==="slot"}function EE(n){return Ut(n)&&n.ownerSVGElement!==void 0}function PE(n){return Ut(n)&&Mn(n)==="svg"}function RE(n){return EE(n)&&Mn(n)==="title"}function Su(n,e){if(Ut(n)&&n.hasAttribute(e)){var t=n.getAttribute(e).split(" "),r=n.getRootNode?n.getRootNode():n.ownerDocument;return t.map(function(o){return r.getElementById(o)}).filter(function(o){return o!==null})}return[]}function Hi(n,e){return Ut(n)?e.indexOf(gE(n))!==-1:!1}function IE(n){return n.trim().replace(/\s\s+/g," ")}function ME(n,e){if(!Ut(n))return!1;if(n.hasAttribute("hidden")||n.getAttribute("aria-hidden")==="true")return!0;var t=e(n);return t.getPropertyValue("display")==="none"||t.getPropertyValue("visibility")==="hidden"}function AE(n){return Hi(n,["button","combobox","listbox","textbox"])||ab(n,"range")}function ab(n,e){if(!Ut(n))return!1;switch(e){case"range":return Hi(n,["meter","progressbar","scrollbar","slider","spinbutton"]);default:throw new TypeError("No knowledge about abstract role '".concat(e,"'. This is likely a bug :("))}}function lb(n,e){var t=Zr(n.querySelectorAll(e));return Su(n,"aria-owns").forEach(function(r){t.push.apply(t,Zr(r.querySelectorAll(e)))}),t}function OE(n){return kE(n)?n.selectedOptions||lb(n,"[selected]"):lb(n,'[aria-selected="true"]')}function LE(n){return Hi(n,Hh)}function DE(n){return sb(n)}function NE(n){return Hi(n,["button","cell","checkbox","columnheader","gridcell","heading","label","legend","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"])}function jE(n){return!1}function FE(n){return Cu(n)||CE(n)?n.value:n.textContent||""}function cb(n){var e=n.getPropertyValue("content");return/^["'].*["']$/.test(e)?e.slice(1,-1):""}function ub(n){var e=Mn(n);return e==="button"||e==="input"&&n.getAttribute("type")!=="hidden"||e==="meter"||e==="output"||e==="progress"||e==="select"||e==="textarea"}function db(n){if(ub(n))return n;var e=null;return n.childNodes.forEach(function(t){if(e===null&&Ut(t)){var r=db(t);r!==null&&(e=r)}}),e}function UE(n){if(n.control!==void 0)return n.control;var e=n.getAttribute("for");return e!==null?n.ownerDocument.getElementById(e):db(n)}function BE(n){var e=n.labels;if(e===null)return e;if(e!==void 0)return Zr(e);if(!ub(n))return null;var t=n.ownerDocument;return Zr(t.querySelectorAll("label")).filter(function(r){return UE(r)===n})}function VE(n){var e=n.assignedNodes();return e.length===0?Zr(n.childNodes):e}function fb(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=new fE,r=typeof Map>"u"?void 0:new Map,o=SE(n),a=e.compute,l=a===void 0?"name":a,u=e.computedStyleSupportsPseudoElements,f=u===void 0?e.getComputedStyle!==void 0:u,p=e.getComputedStyle,g=p===void 0?o.getComputedStyle.bind(o):p,C=e.hidden,_=C===void 0?!1:C,T=function(L,F){if(F!==void 0)throw new Error("use uncachedGetComputedStyle directly for pseudo elements");if(r===void 0)return g(L);var G=r.get(L);if(G)return G;var se=g(L,F);return r.set(L,se),se};function N(U,L){var F="";if(Ut(U)&&f){var G=g(U,"::before"),se=cb(G);F="".concat(se," ").concat(F)}var Q=xE(U)?VE(U):Zr(U.childNodes).concat(Su(U,"aria-owns"));if(Q.forEach(function(Y){var fe=ee(Y,{isEmbeddedInLabel:L.isEmbeddedInLabel,isReferenced:!1,recursion:!0}),Re=Ut(Y)?T(Y).getPropertyValue("display"):"inline",We=Re!=="inline"?" ":"";F+="".concat(We).concat(fe).concat(We)}),Ut(U)&&f){var $=g(U,"::after"),q=cb($);F="".concat(F," ").concat(q)}return F.trim()}function A(U,L){var F=U.getAttributeNode(L);return F!==null&&!t.has(F)&&F.value.trim()!==""?(t.add(F),F.value):null}function H(U){return Ut(U)?A(U,"title"):null}function z(U){if(!Ut(U))return null;if(TE(U)){t.add(U);for(var L=Zr(U.childNodes),F=0;F<L.length;F+=1){var G=L[F];if(_E(G))return ee(G,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(wE(U)){t.add(U);for(var se=Zr(U.childNodes),Q=0;Q<se.length;Q+=1){var $=se[Q];if(sb($))return ee($,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(PE(U)){t.add(U);for(var q=Zr(U.childNodes),Y=0;Y<q.length;Y+=1){var fe=q[Y];if(RE(fe))return fe.textContent}return null}else if(Mn(U)==="img"||Mn(U)==="area"){var Re=A(U,"alt");if(Re!==null)return Re}else if(bE(U)){var We=A(U,"label");if(We!==null)return We}if(Cu(U)&&(U.type==="button"||U.type==="submit"||U.type==="reset")){var oe=A(U,"value");if(oe!==null)return oe;if(U.type==="submit")return"Submit";if(U.type==="reset")return"Reset"}var Ie=BE(U);if(Ie!==null&&Ie.length!==0)return t.add(U),Zr(Ie).map(function(de){return ee(de,{isEmbeddedInLabel:!0,isReferenced:!1,recursion:!0})}).filter(function(de){return de.length>0}).join(" ");if(Cu(U)&&U.type==="image"){var pe=A(U,"alt");if(pe!==null)return pe;var le=A(U,"title");return le!==null?le:"Submit Query"}if(Hi(U,["button"])){var _e=N(U,{isEmbeddedInLabel:!1});if(_e!=="")return _e}return null}function ee(U,L){if(t.has(U))return"";if(!_&&ME(U,T)&&!L.isReferenced)return t.add(U),"";var F=Ut(U)?U.getAttributeNode("aria-labelledby"):null,G=F!==null&&!t.has(F)?Su(U,"aria-labelledby"):[];if(l==="name"&&!L.isReferenced&&G.length>0)return t.add(F),G.map(function(Re){return ee(Re,{isEmbeddedInLabel:L.isEmbeddedInLabel,isReferenced:!0,recursion:!1})}).join(" ");var se=L.recursion&&AE(U)&&l==="name";if(!se){var Q=(Ut(U)&&U.getAttribute("aria-label")||"").trim();if(Q!==""&&l==="name")return t.add(U),Q;if(!LE(U)){var $=z(U);if($!==null)return t.add(U),$}}if(Hi(U,["menu"]))return t.add(U),"";if(se||L.isEmbeddedInLabel||L.isReferenced){if(Hi(U,["combobox","listbox"])){t.add(U);var q=OE(U);return q.length===0?Cu(U)?U.value:"":Zr(q).map(function(Re){return ee(Re,{isEmbeddedInLabel:L.isEmbeddedInLabel,isReferenced:!1,recursion:!0})}).join(" ")}if(ab(U,"range"))return t.add(U),U.hasAttribute("aria-valuetext")?U.getAttribute("aria-valuetext"):U.hasAttribute("aria-valuenow")?U.getAttribute("aria-valuenow"):U.getAttribute("value")||"";if(Hi(U,["textbox"]))return t.add(U),FE(U)}if(NE(U)||Ut(U)&&L.isReferenced||DE(U)||jE()){var Y=N(U,{isEmbeddedInLabel:L.isEmbeddedInLabel});if(Y!=="")return t.add(U),Y}if(U.nodeType===U.TEXT_NODE)return t.add(U),U.textContent||"";if(L.recursion)return t.add(U),N(U,{isEmbeddedInLabel:L.isEmbeddedInLabel});var fe=H(U);return fe!==null?(t.add(U),fe):(t.add(U),"")}return IE(ee(n,{isEmbeddedInLabel:!1,isReferenced:l==="description",recursion:!1}))}function Pl(n){"@babel/helpers - typeof";return Pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pl(n)}function hb(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),t.push.apply(t,r)}return t}function pb(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?hb(Object(t),!0).forEach(function(r){zE(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):hb(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function zE(n,e,t){return e=WE(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function WE(n){var e=HE(n,"string");return Pl(e)=="symbol"?e:e+""}function HE(n,e){if(Pl(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(Pl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function mb(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=Su(n,"aria-describedby").map(function(a){return fb(a,pb(pb({},e),{},{compute:"description"}))}).join(" ");if(t===""){var r=n.getAttribute("aria-description");t=r===null?"":r}if(t===""){var o=n.getAttribute("title");t=o===null?"":o}return t}function $E(n){return Hi(n,["caption","code","deletion","emphasis","generic","insertion","none","paragraph","presentation","strong","subscript","superscript"])}function $h(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return $E(n)?"":fb(n,e)}const qE=n=>n instanceof HTMLTextAreaElement?{value:n.value}:n.type==="checkbox"?{value:n.checked,options:[{value:!0,selected:n.checked,text:"checked"},{value:!1,selected:!n.checked,text:"unchecked"}]}:{value:n.value},GE=n=>{if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement){const e=$h(n)??"";return{name:e===""?n.name:e,description:mb(n),type:n.type,placeholder:n.placeholder,...qE(n)}}else if(n instanceof HTMLSelectElement){const e=$h(n)??"";return{name:e===""?n.name:e,description:mb(n),type:n.type,value:n.value,options:Array.from(n.options).map(t=>({value:t.value,text:t.text,selected:t.selected}))}}throw new TypeError("Unsupported element type")},gb=()=>{const e=Array.from(document.querySelectorAll("input, textarea, select")).map((r,o)=>({index:o,id:`${r.tagName.toLowerCase()}-${o}`,element:r})),t={};return e.forEach(({id:r,element:o})=>{t[r]=o}),{context:e.map(({id:r,element:o})=>({id:r,...GE(o)})),formElements:t}},Rl=(n,...e)=>{console.debug(`[NLX V+] ${n}`,...e)},KE=(n,e=50,t=1/0)=>{let r=null,o=null,a=Promise.resolve();return(...l)=>{o??(o=Date.now());const u=()=>{a=a.then(async()=>{try{await n.apply(null,l)}catch{}}),o=null};r&&clearTimeout(r),Date.now()-o>t?u():r=setTimeout(()=>{u()},e)}},JE=(n,e,t,r)=>{let o={fields:[],destinations:[],actions:[]};const a=KE(async()=>{const{context:u,state:f}=t(YE(e));if(!Xd(o,u)){try{Rl("Automatic context sent:",u),await n.sendContext({"nlx:vpContext":u})}catch{}r(f),o=u}},50,300);a();const l=new MutationObserver(a);return l.observe(document.body,{subtree:!0,childList:!0,attributes:!0}),{teardown:()=>{l.disconnect()},onCustomCommandsChange:u=>{e=u,a()}}},YE=n=>{const{context:e,formElements:t}=gb(),{context:r,links:o}=QE();return{context:{uri:window.location.pathname,fields:e,destinations:r,actions:n.filter(l=>l.description!=null).map(l=>{const{handler:u,...f}=l;return f})},state:{formElements:t,links:o,customCommands:new Map(n.map(l=>[l.action,l.handler]))}}},QE=()=>{const n=Object.fromEntries(ew(Array.from(document.querySelectorAll("a")).map(e=>[$h(e),e.getAttribute("href")??""])));return{context:Object.keys(n),links:n}},XE=(n,e,t)=>{const r=o=>{switch(Rl("Command received",o),o.classification){case"navigation":if(e.navigation!=null)e.navigation(o.action,o.destination,t.current.links);else if(e.automaticContext!==!1)switch(o.action){case"page_next":window.history.forward();break;case"page_previous":window.history.back();break;case"page_custom":if(o.destination!=null){const a=t.current.links[o.destination];if(a!=null)window.location.href=a;else try{new URL(o.destination),window.location.href=o.destination}catch{Rl('Custom page navigation action received, but no URL found for destination".',o.destination)}}break;case"page_unknown":Rl("Unknown page navigation action received, no automatic handling available.")}break;case"input":(e==null?void 0:e.input)!=null?e.input(o.fields,t.current.formElements):(e==null?void 0:e.automaticContext)!==!1&&o.fields.forEach(a=>{if(t.current.formElements[a.id]!=null){const l=t.current.formElements[a.id];typeof a.value=="string"?l.value=a.value:l instanceof HTMLInputElement&&l.type==="checkbox"&&(l.checked=a.value),l.classList.add("voice-updated"),l.dispatchEvent(new Event("input",{bubbles:!0})),l.dispatchEvent(new Event("change",{bubbles:!0})),setTimeout(()=>{l.classList.remove("voice-updated")},2e3)}});break;case"custom":t.current.customCommands.has(o.action)&&t.current.customCommands.get(o.action)(o.payload),Rl(`No custom command handler was defined for the %o action.
156
+ Please report this to https://github.com/markedjs/marked.`,e){const o="<p>An error occurred:</p><pre>"+Ci(r.message+"",!0)+"</pre>";return t?Promise.resolve(o):o}if(t)return Promise.reject(r);throw r}}}const as=new Px;function _t(n,e){return as.parse(n,e)}_t.options=_t.setOptions=function(n){return as.setOptions(n),_t.defaults=as.defaults,Oy(_t.defaults),_t},_t.getDefaults=Oh,_t.defaults=ss,_t.use=function(...n){return as.use(...n),_t.defaults=as.defaults,Oy(_t.defaults),_t},_t.walkTokens=function(n,e){return as.walkTokens(n,e)},_t.parseInline=as.parseInline,_t.Parser=Mr,_t.parser=Mr.parse,_t.Renderer=ku,_t.TextRenderer=Vh,_t.Lexer=Ir,_t.lexer=Ir.lex,_t.Tokenizer=bu,_t.Hooks=xl,_t.parse=_t,_t.options,_t.setOptions,_t.use,_t.walkTokens,_t.parseInline,Mr.parse,Ir.lex;const Rx=({handler:n,message:e,responseIndex:t,messageIndex:r})=>e.choices.length>0?R.jsx("ul",{className:"space-y-2 max-h-[40vh] overflow-auto no-scrollbar",children:e.choices.map((o,a)=>e.selectedChoiceId==null||o.choiceId===e.selectedChoiceId?R.jsx("li",{className:"w-full",children:R.jsx(ho,{type:"ghost",Icon:Pc,onClick:e.selectedChoiceId==null?()=>{n.sendChoice(o.choiceId,{},{responseIndex:t,messageIndex:r})}:void 0,label:o.choiceText})},a):null)}):null,zh=({text:n,bubble:e,files:t})=>R.jsxs("div",{className:"space-y-2",children:[R.jsx("div",{className:"flex justify-end pl-10 text-base",children:R.jsx("div",{className:st("text-primary-60 rounded-inner whitespace-pre-wrap",e?"bg-primary-5 p-3":""),children:n})}),t!=null?R.jsx("div",{className:"flex flex-wrap justify-end gap-2",children:t.map((r,o)=>R.jsx("img",{className:"rounded-inner h-20",src:URL.createObjectURL(r)},o))}):null]}),Gy=({text:n,number:e})=>R.jsxs("span",{className:"flex items-center gap-2",children:[R.jsx("span",{className:"bg-primary-10 text-primary-60 text-xs px-1.5 py-0.5 rounded-inner",children:e}),n]}),Ix=n=>{const e=new Map;return n.forEach((t,r)=>{const o={fileName:t.fileName,content:t.content,presignedUrl:t.presignedUrl,metadata:void 0,pageNumber:void 0},a=JSON.stringify(o),l=e.get(a);e.set(a,l==null?{source:o,indices:[r]}:{...l,indices:[...l.indices,r]})}),[...e.values()]},Mx=({sources:n})=>{const[e,t]=ye.useState(!1),r=ye.useMemo(()=>Ix(n),[n]);return r.length===0?null:R.jsxs("details",{className:"space-y-2",open:e,onToggle:o=>{t(o.currentTarget.open)},children:[R.jsxs("summary",{className:"flex cursor-pointer items-center gap-2 rounded-inner hover:bg-primary-5 text-primary-80",children:[R.jsx(mC,{type:"ghost",Icon:e?fg:hg}),"Sources"]}),R.jsx("ol",{className:"space-y-2",children:r.map(({source:o,indices:a},l)=>{const u=o.fileName??o.content??"Source",f="p-3 bg-primary-5 rounded-inner w-full flex items-center justify-between text-primary-80",p=a.map(g=>String(g+1)).join(", ");return R.jsx("li",{children:o.presignedUrl!=null?R.jsxs("a",{href:o.presignedUrl,className:st(f,"hover:bg-primary-10"),children:[R.jsx(Gy,{text:u,number:p}),R.jsx(wg,{className:"w-4 h-4 text-primary-60"})]}):R.jsx("div",{className:f,children:R.jsx(Gy,{text:u,number:p})})},l)})})]})},Ax=({responses:n,colorMode:e,chatMode:t,uploadedFiles:r,userMessageBubble:o,agentMessageBubble:a,lastApplicationResponseIndex:l,isWaiting:u,modalityComponents:f,handler:p,className:g,enabled:C})=>{const _=ye.useRef(null),T=ye.useRef(null);return ye.useEffect(()=>{!t&&!u&&setTimeout(()=>{var N;(N=T.current)==null||N.scrollIntoView({behavior:"smooth"})})},[u,t]),ye.useEffect(()=>{var N;if(t){const A=(N=_.current)==null?void 0:N.lastChild;A instanceof HTMLElement&&A.scrollIntoView({behavior:"smooth"})}},[n.length,t]),R.jsxs("div",{className:st("relative",g),children:[R.jsx("div",{"data-theme":e==="dark"?"light":"dark",className:st("absolute inset-x-0 h-px top-0 bg-background opacity-[0.01] backdrop-blur-md")}),!t&&u?R.jsx(Dg,{label:"Thinking",className:"absolute inset-0"}):null,R.jsxs("div",{className:st("absolute inset-0 p-2 md:p-3 overflow-y-auto no-scrollbar space-y-8",!t&&u?"opacity-0":"opacity-100"),ref:_,children:[n.map((N,A)=>{var z;if(N.type===Wn.User)return N.payload.type==="text"?R.jsx(zh,{text:N.payload.text,bubble:o},A):N.payload.type==="structured"&&N.payload.utterance!=null&&N.payload.uploadIds!=null?R.jsx(zh,{bubble:o,text:N.payload.utterance,files:N.payload.uploadIds.map(ee=>r[ee]).filter(ee=>ee!=null)},A):null;if(N.type===Wn.Failure)return R.jsx(wl,{message:N.payload.text},A);const H=l!=null&&A===l;return R.jsxs(ye.Fragment,{children:[R.jsxs("div",{className:st("space-y-2",!t&&H?"min-h-full":""),ref:H?T:void 0,children:[N.payload.messages.map((ee,U)=>R.jsx("div",{className:"text-base",children:R.jsx("div",{className:st("space-y-6 markdown",a?"p-3 w-fit bg-secondary-40 mr-10 rounded-inner":""),dangerouslySetInnerHTML:{__html:_t(ee.text,{async:!1})}})},U)),((z=N.payload.metadata)==null?void 0:z.sources)!=null?R.jsx(Mx,{sources:N.payload.metadata.sources}):null,R.jsx(Iy,{fallback:R.jsx(wl,{message:"Something went wrong"}),children:Object.entries(N.payload.modalities??{}).map(([ee,U])=>{const L=f[ee];return L==null?(console.warn(`Custom component implementation missing for the ${ee} modality.`),null):R.jsx(L,{data:U,conversationHandler:p,enabled:C},ee)})})]}),N.payload.messages.map((ee,U)=>{if(ee.selectedChoiceId!=null){const L=ee.choices.find(F=>F.choiceId===ee.selectedChoiceId);return L==null?null:R.jsx(zh,{text:L.choiceText,bubble:o},U)}return null})]},A)}),t&&u?R.jsxs("div",{className:"text-primary-60 flex items-center gap-1 text-base",children:[R.jsx("span",{className:"w-5 h-5 block flex-none text-accent",children:R.jsx(pf,{})}),"Thinking..."]}):null]},"messages")]})};function Wh(){return Wh=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Wh.apply(null,arguments)}function Ox(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}var Lx=ye.useLayoutEffect,Dx=function(e){var t=uo.useRef(e);return Lx(function(){t.current=e}),t},Ky=function(e,t){if(typeof e=="function"){e(t);return}e.current=t},Nx=function(e,t){var r=uo.useRef();return uo.useCallback(function(o){e.current=o,r.current&&Ky(r.current,null),r.current=t,t&&Ky(t,o)},[t])},Jy={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},jx=function(e){Object.keys(Jy).forEach(function(t){e.style.setProperty(t,Jy[t],"important")})},Yy=jx,Yn=null,Qy=function(e,t){var r=e.scrollHeight;return t.sizingStyle.boxSizing==="border-box"?r+t.borderSize:r-t.paddingSize};function Fx(n,e,t,r){t===void 0&&(t=1),r===void 0&&(r=1/0),Yn||(Yn=document.createElement("textarea"),Yn.setAttribute("tabindex","-1"),Yn.setAttribute("aria-hidden","true"),Yy(Yn)),Yn.parentNode===null&&document.body.appendChild(Yn);var o=n.paddingSize,a=n.borderSize,l=n.sizingStyle,u=l.boxSizing;Object.keys(l).forEach(function(_){var T=_;Yn.style[T]=l[T]}),Yy(Yn),Yn.value=e;var f=Qy(Yn,n);Yn.value=e,f=Qy(Yn,n),Yn.value="x";var p=Yn.scrollHeight-o,g=p*t;u==="border-box"&&(g=g+o+a),f=Math.max(g,f);var C=p*r;return u==="border-box"&&(C=C+o+a),f=Math.min(C,f),[f,p]}var Xy=function(){},Ux=function(e,t){return e.reduce(function(r,o){return r[o]=t[o],r},{})},Bx=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Vx=!!document.documentElement.currentStyle,zx=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var r=Ux(Bx,t),o=r.boxSizing;if(o==="")return null;Vx&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),l=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:l}},Wx=zx;function Zy(n,e,t){var r=Dx(t);ye.useLayoutEffect(function(){var o=function(l){return r.current(l)};if(n)return n.addEventListener(e,o),function(){return n.removeEventListener(e,o)}},[])}var Hx=function(e){Zy(window,"resize",e)},$x=function(e){Zy(document.fonts,"loadingdone",e)},qx=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Gx=function(e,t){var r=e.cacheMeasurements,o=e.maxRows,a=e.minRows,l=e.onChange,u=l===void 0?Xy:l,f=e.onHeightChange,p=f===void 0?Xy:f,g=Ox(e,qx),C=g.value!==void 0,_=ye.useRef(null),T=Nx(_,t),N=ye.useRef(0),A=ye.useRef(),H=function(){var U=_.current,L=r&&A.current?A.current:Wx(U);if(L){A.current=L;var F=Fx(L,U.value||U.placeholder||"x",a,o),G=F[0],se=F[1];N.current!==G&&(N.current=G,U.style.setProperty("height",G+"px","important"),p(G,{rowHeight:se}))}},z=function(U){C||H(),u(U)};return ye.useLayoutEffect(H),Hx(H),$x(H),ye.createElement("textarea",Wh({},g,{onChange:z,ref:T}))},Kx=ye.forwardRef(Gx);const eb=8,Jx=({className:n,handler:e,uploadUrl:t,onFileUpload:r,enabled:o})=>{const[a,l]=ye.useState(!1),[u,f]=ye.useState(""),[p,g]=ye.useState(null),[C,_]=ye.useState(null),T=ye.useRef(null),N=ye.useRef(null),A=Ag("md");ye.useEffect(()=>{var Q;A&&((Q=N.current)==null||Q.focus())},[A]);const H=ye.useMemo(()=>u.trim()==="",[u]),[z,ee]=ye.useState(!1),U=H&&C==null||z||!o,L=()=>{if(U)return;const Q=($,q)=>{(q==null?void 0:q.type)===Wn.Application&&(ee(!1),e.unsubscribe(Q),f(""),_(null),A&&setTimeout(()=>{var Y;(Y=N.current)==null||Y.focus()}))};e.subscribe(Q),ee(!0),t!=null&&C!=null?e.sendStructured({uploadIds:[t.uploadId],utterance:u}):e.sendText(u)},F=t!=null&&o,G=()=>{g("Something went wrong. Please try again.")},se=Q=>{var Re,We;if(t==null){G();return}const $=(We=(Re=Q.target)==null?void 0:Re.files)==null?void 0:We[0];if($==null){G();return}const{name:q,size:Y,type:fe}=$;if(_({name:q,size:Y,type:fe}),Y/1024**2>eb){g(`The file is too big. Max file size: ${eb}mb`);return}fetch(t.url,{method:"PUT",headers:{"Content-Type":"image/jpeg"},body:$}).then(()=>{g(null),r({uploadId:t.uploadId,file:$})}).catch(()=>{G()})};return R.jsx("div",{className:st("relative",n),children:R.jsxs("div",{className:st("bg-primary-5 transition-colors duration-200 p-2 rounded-outer text-base font-normal",a?"":"hover:bg-secondary-20"),children:[p!=null&&R.jsxs("div",{className:"flex items-center py-1 mb-2 w-full bg-error-secondary rounded-inner",children:[R.jsx(uf,{size:16}),R.jsx("span",{className:"truncate ml-1",children:p})]}),C&&R.jsxs(R.Fragment,{children:[R.jsxs("div",{className:"flex items-center justify-between mb-2 w-full",children:[R.jsxs("p",{className:"flex items-center truncate mx-2",children:[p!=null?R.jsx(uf,{size:16,className:"text-error-primary"}):R.jsx(pg,{size:16,className:"text-primary-60"}),R.jsx("span",{className:"truncate ml-3",children:C.name})]}),R.jsx(mn,{className:"flex-none",Icon:gg,label:"Delete",onClick:F?()=>{_(null),g(null),T.current!=null&&(T.current.value="")}:void 0,type:"ghost"})]}),R.jsx("hr",{className:"border-b-px border-background mb-2 -mx-2"})]}),R.jsxs("div",{className:st("flex items-end gap-1"),children:[F&&C==null?R.jsxs(R.Fragment,{children:[R.jsx("label",{htmlFor:"file-upload",className:"p-3 w-10 h-10 flex-none block transition-colors rounded-inner bg-primary-80 hover:bg-primary-80 text-secondary-80 cursor-pointer",children:R.jsx(cf,{})}),R.jsx("input",{type:"file",id:"file-upload",className:"sr-only",accept:".jpg, .jpeg, .png, .webp, .mp4, .mpeg4, .avi, .mov, .pdf",onChange:se,ref:T})]}):R.jsx(mn,{className:"flex-none",Icon:cf,label:"Upload file",type:"ghost"}),R.jsx(Kx,{disabled:z||!o,className:st("h-10 w-full resize-none mr-2 px-2 py-2 outline-hidden","bg-transparent text-primary-80 placeholder:text-primary-40 caret-accent","disabled:text-primary-40"),placeholder:"Type something",maxRows:10,onFocus:()=>{l(!0)},onBlur:()=>{l(!1)},value:u,onChange:Q=>{f(Q.target.value)},onKeyDown:Q=>{Q.key==="Enter"&&!Q.shiftKey&&(Q.preventDefault(),L())},ref:N}),R.jsx(mn,{className:"flex-none",label:"Send message",onClick:U?void 0:()=>{L()},type:"main",Icon:Pc})]})]})})},Yx=n=>({"--font-family":n.fontFamily,"--radius-inner":n.innerBorderRadius,"--radius-outer":n.outerBorderRadius,"--color-primary-80":n.primary80,"--color-primary-60":n.primary60,"--color-primary-40":n.primary40,"--color-primary-20":n.primary20,"--color-primary-10":n.primary10,"--color-primary-5":n.primary5,"--color-primary-1":n.primary1,"--color-secondary-80":n.secondary80,"--color-secondary-60":n.secondary60,"--color-secondary-40":n.secondary40,"--color-secondary-20":n.secondary20,"--color-secondary-10":n.secondary10,"--color-secondary-5":n.secondary5,"--color-secondary-1":n.secondary1,"--color-accent":n.accent,"--color-accent-20":n.accent20,"--color-background":n.background,"--color-overlay":n.overlay,"--color-warning-primary":n.warningPrimary,"--color-warning-secondary":n.warningSecondary,"--color-error-primary":n.errorPrimary,"--color-error-secondary":n.errorSecondary}),Qx={fontFamily:'"Neue Haas Grotesk", sans-serif',innerBorderRadius:"12px",outerBorderRadius:"20px",primary80:"rgba(0, 2, 9, 0.8)",primary60:"rgba(0, 2, 9, 0.6)",primary40:"rgba(0, 2, 9, 0.4)",primary20:"rgba(0, 2, 9, 0.2)",primary10:"rgba(0, 2, 9, 0.1)",primary5:"rgba(0, 2, 9, 0.05)",primary1:"rgba(0, 2, 9, 0.01)",secondary80:"rgba(255, 255, 255, 0.85)",secondary60:"rgba(255, 255, 255, 0.65)",secondary40:"rgba(255, 255, 255, 0.45)",secondary20:"rgba(255, 255, 255, 0.25)",secondary10:"rgba(255, 255, 255, 0.15)",secondary5:"rgba(255, 255, 255, 0.08)",secondary1:"rgba(255, 255, 255, 0.01)",accent:"rgb(28, 99, 218)",accent20:"rgba(28, 99, 218, 0.2)",background:"rgba(220, 220, 220, 0.9)",overlay:"rgba(0, 2, 9, 0.4)",warningPrimary:"rgb(220, 159, 3)",warningSecondary:"rgb(255, 242, 209)",errorPrimary:"rgb(157, 3, 3)",errorSecondary:"rgb(255, 223, 230)"},Xx={fontFamily:'"Neue Haas Grotesk", sans-serif',innerBorderRadius:"12px",outerBorderRadius:"20px",primary80:"rgba(255, 255, 255, 0.85)",primary60:"rgba(255, 255, 255, 0.65)",primary40:"rgba(255, 255, 255, 0.45)",primary20:"rgba(255, 255, 255, 0.25)",primary10:"rgba(255, 255, 255, 0.15)",primary5:"rgba(255, 255, 255, 0.08)",primary1:"rgba(255, 255, 255, 0.01)",secondary80:"rgba(0, 2, 9, 0.8)",secondary60:"rgba(0, 2, 9, 0.6)",secondary40:"rgba(0, 2, 9, 0.4)",secondary20:"rgba(0, 2, 9, 0.2)",secondary10:"rgba(0, 2, 9, 0.1)",secondary5:"rgba(0, 2, 9, 0.05)",secondary1:"rgba(0, 2, 9, 0.01)",accent:"rgb(174, 202, 255)",accent20:"rgba(174, 202, 255, 0.25)",background:"rgba(0, 2, 9, 0.9)",overlay:"rgba(0, 2, 9, 0.4)",warningPrimary:"rgb(255, 214, 108)",warningSecondary:"rgb(95, 65, 29)",errorPrimary:"rgb(255, 133, 162)",errorSecondary:"rgb(94, 4, 4)"},Zx=(n,e)=>{const t={};return n.accent!=null&&n.accent20==null&&(t.accent20=`color-mix(in srgb, ${n.accent} 20%, transparent)`),n.primary80!=null&&(n.primary60==null&&(t.primary60=`rgb(from ${n.primary80} r g b / 0.6)`),n.primary40==null&&(t.primary40=`rgb(from ${n.primary80} r g b / 0.4)`),n.primary20==null&&(t.primary20=`rgb(from ${n.primary80} r g b / 0.2)`),n.primary10==null&&(t.primary10=`rgb(from ${n.primary80} r g b / 0.1)`),n.primary5==null&&(t.primary5=`rgb(from ${n.primary80} r g b / 0.05)`),n.primary1==null&&(t.primary1=`rgb(from ${n.primary80} r g b / 0.01)`)),n.secondary80!=null&&(n.secondary60==null&&(t.secondary60=`rgb(from ${n.secondary80} r g b / 0.6)`),n.secondary40==null&&(t.secondary40=`rgb(from ${n.secondary80} r g b / 0.4)`),n.secondary20==null&&(t.secondary20=`rgb(from ${n.secondary80} r g b / 0.2)`),n.secondary10==null&&(t.secondary10=`rgb(from ${n.secondary80} r g b / 0.1)`),n.secondary5==null&&(t.secondary5=`rgb(from ${n.secondary80} r g b / 0.05)`),n.secondary1==null&&(t.secondary1=`rgb(from ${n.secondary80} r g b / 0.01)`)),{...e,...t,...n}},wu=({colorMode:n,children:e,theme:t,className:r})=>{const o=Zx(t??{},n==="dark"?Xx:Qx);return R.jsx("div",{className:st(r,"font-sans"),style:{...Yx(o),colorScheme:n},children:e})},tb="bg-background backdrop-blur-sm text-primary-80 rounded-outer p-2 w-[calc(100vw-16px)] max-w-[360px] space-y-4",nb=({children:n,renderCollapse:e,onClose:t})=>R.jsxs("div",{className:tb,children:[e&&R.jsx("div",{className:"flex items-center justify-end",children:R.jsx(mn,{onClick:t,Icon:tl,type:"ghost",label:"Close"})}),n]}),rb=({children:n,className:e})=>R.jsx("div",{className:st("bg-background rounded-outer p-2 w-fit flex items-center gap-2",e),children:n}),eE=({handler:n,context:e,onClose:t,modalityComponents:r,renderCollapse:o,brandIcon:a})=>{const[l,u]=ye.useState(!0),[f,p]=ye.useState(!0),g=()=>{t(new Event("close"))},{roomState:C,isUserSpeaking:_,isApplicationSpeaking:T,retry:N,modalities:A}=Ry({micEnabled:l,speakersEnabled:f,handler:n,context:e});if(C==="error")return R.jsxs(nb,{renderCollapse:o,onClose:g,children:[R.jsx(wl,{message:"I couldn’t connect"}),R.jsx(ho,{type:"ghost",label:"Retry",Icon:nl,onClick:()=>{N()}})]});if(C==="noAudioPermissions")return R.jsxs(nb,{renderCollapse:o,onClose:g,children:[R.jsx(wl,{message:"Connect your microphone and speaker"}),R.jsx(ho,{type:"ghost",label:"Retry",Icon:nl,onClick:()=>{N()}})]});const H=a!=null?R.jsx("img",{className:"w-10 h-10 block flex-none",src:a,role:"presentation"}):null;return C==="pending"?R.jsxs(rb,{className:"relative",children:[H,R.jsx(mn,{Icon:Rc,label:"Microphone",type:"ghost",className:"invisible"}),R.jsx(mn,{Icon:Ic,label:"Speakers",type:"ghost",className:"invisible"}),R.jsx(mn,{Icon:tl,label:"Close",type:"ghost",className:"invisible"}),R.jsx("span",{className:"w-6 h-6 block text-accent absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",children:R.jsx(pf,{})})]}):R.jsxs(rb,{children:[H,R.jsxs("div",{className:"w-fit relative",children:[_?R.jsx(Ks,{className:"rounded-inner"}):null,R.jsx(mn,{Icon:l?Rc:df,label:"Microphone",type:l?"activated":"ghost",onClick:()=>{u(z=>!z)}})]}),R.jsxs("div",{className:"w-fit relative",children:[T?R.jsx(Ks,{className:"rounded-inner"}):null,R.jsx(mn,{Icon:f?Ic:ff,label:"Speakers",type:f?"activated":"ghost",onClick:()=>{p(z=>!z)}})]}),R.jsx(mn,{label:"Close",Icon:tl,type:"error",onClick:()=>{g()}}),R.jsx(My,{className:st(tb,"absolute right-0 -top-2 transform translate-x-0 -translate-y-full max-h-[360px] overflow-auto"),modalities:A,modalityComponents:r,handler:n})]})};var tE=Object.prototype.toString;function nE(n){return typeof n=="function"||tE.call(n)==="[object Function]"}function rE(n){var e=Number(n);return isNaN(e)?0:e===0||!isFinite(e)?e:(e>0?1:-1)*Math.floor(Math.abs(e))}var iE=Math.pow(2,53)-1;function oE(n){var e=rE(n);return Math.min(Math.max(e,0),iE)}function Zr(n,e){var t=Array,r=Object(n);if(n==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");for(var o=oE(r.length),a=nE(t)?Object(new t(o)):new Array(o),l=0,u;l<o;)u=r[l],a[l]=u,l+=1;return a.length=o,a}function El(n){"@babel/helpers - typeof";return El=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},El(n)}function sE(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function aE(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,ib(r.key),r)}}function lE(n,e,t){return e&&aE(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function cE(n,e,t){return e=ib(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function ib(n){var e=uE(n,"string");return El(e)=="symbol"?e:e+""}function uE(n,e){if(El(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(El(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}var dE=function(){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];sE(this,n),cE(this,"items",void 0),this.items=e}return lE(n,[{key:"add",value:function(t){return this.has(t)===!1&&this.items.push(t),this}},{key:"clear",value:function(){this.items=[]}},{key:"delete",value:function(t){var r=this.items.length;return this.items=this.items.filter(function(o){return o!==t}),r!==this.items.length}},{key:"forEach",value:function(t){var r=this;this.items.forEach(function(o){t(o,o,r)})}},{key:"has",value:function(t){return this.items.indexOf(t)!==-1}},{key:"size",get:function(){return this.items.length}}])}();const fE=typeof Set>"u"?Set:dE;function Mn(n){var e;return(e=n.localName)!==null&&e!==void 0?e:n.tagName.toLowerCase()}var hE={article:"article",aside:"complementary",button:"button",datalist:"listbox",dd:"definition",details:"group",dialog:"dialog",dt:"term",fieldset:"group",figure:"figure",form:"form",footer:"contentinfo",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",header:"banner",hr:"separator",html:"document",legend:"legend",li:"listitem",math:"math",main:"main",menu:"list",nav:"navigation",ol:"list",optgroup:"group",option:"option",output:"status",progress:"progressbar",section:"region",summary:"button",table:"table",tbody:"rowgroup",textarea:"textbox",tfoot:"rowgroup",td:"cell",th:"columnheader",thead:"rowgroup",tr:"row",ul:"list"},pE={caption:new Set(["aria-label","aria-labelledby"]),code:new Set(["aria-label","aria-labelledby"]),deletion:new Set(["aria-label","aria-labelledby"]),emphasis:new Set(["aria-label","aria-labelledby"]),generic:new Set(["aria-label","aria-labelledby","aria-roledescription"]),insertion:new Set(["aria-label","aria-labelledby"]),none:new Set(["aria-label","aria-labelledby"]),paragraph:new Set(["aria-label","aria-labelledby"]),presentation:new Set(["aria-label","aria-labelledby"]),strong:new Set(["aria-label","aria-labelledby"]),subscript:new Set(["aria-label","aria-labelledby"]),superscript:new Set(["aria-label","aria-labelledby"])};function mE(n,e){return["aria-atomic","aria-busy","aria-controls","aria-current","aria-description","aria-describedby","aria-details","aria-dropeffect","aria-flowto","aria-grabbed","aria-hidden","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription"].some(function(t){var r;return n.hasAttribute(t)&&!((r=pE[e])!==null&&r!==void 0&&r.has(t))})}function ob(n,e){return mE(n,e)}function gE(n){var e=yE(n);if(e===null||Hh.indexOf(e)!==-1){var t=vE(n);if(Hh.indexOf(e||"")===-1||ob(n,t||""))return t}return e}function vE(n){var e=hE[Mn(n)];if(e!==void 0)return e;switch(Mn(n)){case"a":case"area":case"link":if(n.hasAttribute("href"))return"link";break;case"img":return n.getAttribute("alt")===""&&!ob(n,"img")?"presentation":"img";case"input":{var t=n,r=t.type;switch(r){case"button":case"image":case"reset":case"submit":return"button";case"checkbox":case"radio":return r;case"range":return"slider";case"email":case"tel":case"text":case"url":return n.hasAttribute("list")?"combobox":"textbox";case"search":return n.hasAttribute("list")?"combobox":"searchbox";case"number":return"spinbutton";default:return null}}case"select":return n.hasAttribute("multiple")||n.size>1?"listbox":"combobox"}return null}function yE(n){var e=n.getAttribute("role");if(e!==null){var t=e.trim().split(" ")[0];if(t.length>0)return t}return null}var Hh=["presentation","none"];function Ut(n){return n!==null&&n.nodeType===n.ELEMENT_NODE}function sb(n){return Ut(n)&&Mn(n)==="caption"}function Cu(n){return Ut(n)&&Mn(n)==="input"}function bE(n){return Ut(n)&&Mn(n)==="optgroup"}function kE(n){return Ut(n)&&Mn(n)==="select"}function wE(n){return Ut(n)&&Mn(n)==="table"}function CE(n){return Ut(n)&&Mn(n)==="textarea"}function SE(n){var e=n.ownerDocument===null?n:n.ownerDocument,t=e.defaultView;if(t===null)throw new TypeError("no window available");return t}function TE(n){return Ut(n)&&Mn(n)==="fieldset"}function _E(n){return Ut(n)&&Mn(n)==="legend"}function xE(n){return Ut(n)&&Mn(n)==="slot"}function EE(n){return Ut(n)&&n.ownerSVGElement!==void 0}function PE(n){return Ut(n)&&Mn(n)==="svg"}function RE(n){return EE(n)&&Mn(n)==="title"}function Su(n,e){if(Ut(n)&&n.hasAttribute(e)){var t=n.getAttribute(e).split(" "),r=n.getRootNode?n.getRootNode():n.ownerDocument;return t.map(function(o){return r.getElementById(o)}).filter(function(o){return o!==null})}return[]}function Hi(n,e){return Ut(n)?e.indexOf(gE(n))!==-1:!1}function IE(n){return n.trim().replace(/\s\s+/g," ")}function ME(n,e){if(!Ut(n))return!1;if(n.hasAttribute("hidden")||n.getAttribute("aria-hidden")==="true")return!0;var t=e(n);return t.getPropertyValue("display")==="none"||t.getPropertyValue("visibility")==="hidden"}function AE(n){return Hi(n,["button","combobox","listbox","textbox"])||ab(n,"range")}function ab(n,e){if(!Ut(n))return!1;switch(e){case"range":return Hi(n,["meter","progressbar","scrollbar","slider","spinbutton"]);default:throw new TypeError("No knowledge about abstract role '".concat(e,"'. This is likely a bug :("))}}function lb(n,e){var t=Zr(n.querySelectorAll(e));return Su(n,"aria-owns").forEach(function(r){t.push.apply(t,Zr(r.querySelectorAll(e)))}),t}function OE(n){return kE(n)?n.selectedOptions||lb(n,"[selected]"):lb(n,'[aria-selected="true"]')}function LE(n){return Hi(n,Hh)}function DE(n){return sb(n)}function NE(n){return Hi(n,["button","cell","checkbox","columnheader","gridcell","heading","label","legend","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"])}function jE(n){return!1}function FE(n){return Cu(n)||CE(n)?n.value:n.textContent||""}function cb(n){var e=n.getPropertyValue("content");return/^["'].*["']$/.test(e)?e.slice(1,-1):""}function ub(n){var e=Mn(n);return e==="button"||e==="input"&&n.getAttribute("type")!=="hidden"||e==="meter"||e==="output"||e==="progress"||e==="select"||e==="textarea"}function db(n){if(ub(n))return n;var e=null;return n.childNodes.forEach(function(t){if(e===null&&Ut(t)){var r=db(t);r!==null&&(e=r)}}),e}function UE(n){if(n.control!==void 0)return n.control;var e=n.getAttribute("for");return e!==null?n.ownerDocument.getElementById(e):db(n)}function BE(n){var e=n.labels;if(e===null)return e;if(e!==void 0)return Zr(e);if(!ub(n))return null;var t=n.ownerDocument;return Zr(t.querySelectorAll("label")).filter(function(r){return UE(r)===n})}function VE(n){var e=n.assignedNodes();return e.length===0?Zr(n.childNodes):e}function fb(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=new fE,r=typeof Map>"u"?void 0:new Map,o=SE(n),a=e.compute,l=a===void 0?"name":a,u=e.computedStyleSupportsPseudoElements,f=u===void 0?e.getComputedStyle!==void 0:u,p=e.getComputedStyle,g=p===void 0?o.getComputedStyle.bind(o):p,C=e.hidden,_=C===void 0?!1:C,T=function(L,F){if(F!==void 0)throw new Error("use uncachedGetComputedStyle directly for pseudo elements");if(r===void 0)return g(L);var G=r.get(L);if(G)return G;var se=g(L,F);return r.set(L,se),se};function N(U,L){var F="";if(Ut(U)&&f){var G=g(U,"::before"),se=cb(G);F="".concat(se," ").concat(F)}var Q=xE(U)?VE(U):Zr(U.childNodes).concat(Su(U,"aria-owns"));if(Q.forEach(function(Y){var fe=ee(Y,{isEmbeddedInLabel:L.isEmbeddedInLabel,isReferenced:!1,recursion:!0}),Re=Ut(Y)?T(Y).getPropertyValue("display"):"inline",We=Re!=="inline"?" ":"";F+="".concat(We).concat(fe).concat(We)}),Ut(U)&&f){var $=g(U,"::after"),q=cb($);F="".concat(F," ").concat(q)}return F.trim()}function A(U,L){var F=U.getAttributeNode(L);return F!==null&&!t.has(F)&&F.value.trim()!==""?(t.add(F),F.value):null}function H(U){return Ut(U)?A(U,"title"):null}function z(U){if(!Ut(U))return null;if(TE(U)){t.add(U);for(var L=Zr(U.childNodes),F=0;F<L.length;F+=1){var G=L[F];if(_E(G))return ee(G,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(wE(U)){t.add(U);for(var se=Zr(U.childNodes),Q=0;Q<se.length;Q+=1){var $=se[Q];if(sb($))return ee($,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(PE(U)){t.add(U);for(var q=Zr(U.childNodes),Y=0;Y<q.length;Y+=1){var fe=q[Y];if(RE(fe))return fe.textContent}return null}else if(Mn(U)==="img"||Mn(U)==="area"){var Re=A(U,"alt");if(Re!==null)return Re}else if(bE(U)){var We=A(U,"label");if(We!==null)return We}if(Cu(U)&&(U.type==="button"||U.type==="submit"||U.type==="reset")){var oe=A(U,"value");if(oe!==null)return oe;if(U.type==="submit")return"Submit";if(U.type==="reset")return"Reset"}var Ie=BE(U);if(Ie!==null&&Ie.length!==0)return t.add(U),Zr(Ie).map(function(de){return ee(de,{isEmbeddedInLabel:!0,isReferenced:!1,recursion:!0})}).filter(function(de){return de.length>0}).join(" ");if(Cu(U)&&U.type==="image"){var pe=A(U,"alt");if(pe!==null)return pe;var le=A(U,"title");return le!==null?le:"Submit Query"}if(Hi(U,["button"])){var _e=N(U,{isEmbeddedInLabel:!1});if(_e!=="")return _e}return null}function ee(U,L){if(t.has(U))return"";if(!_&&ME(U,T)&&!L.isReferenced)return t.add(U),"";var F=Ut(U)?U.getAttributeNode("aria-labelledby"):null,G=F!==null&&!t.has(F)?Su(U,"aria-labelledby"):[];if(l==="name"&&!L.isReferenced&&G.length>0)return t.add(F),G.map(function(Re){return ee(Re,{isEmbeddedInLabel:L.isEmbeddedInLabel,isReferenced:!0,recursion:!1})}).join(" ");var se=L.recursion&&AE(U)&&l==="name";if(!se){var Q=(Ut(U)&&U.getAttribute("aria-label")||"").trim();if(Q!==""&&l==="name")return t.add(U),Q;if(!LE(U)){var $=z(U);if($!==null)return t.add(U),$}}if(Hi(U,["menu"]))return t.add(U),"";if(se||L.isEmbeddedInLabel||L.isReferenced){if(Hi(U,["combobox","listbox"])){t.add(U);var q=OE(U);return q.length===0?Cu(U)?U.value:"":Zr(q).map(function(Re){return ee(Re,{isEmbeddedInLabel:L.isEmbeddedInLabel,isReferenced:!1,recursion:!0})}).join(" ")}if(ab(U,"range"))return t.add(U),U.hasAttribute("aria-valuetext")?U.getAttribute("aria-valuetext"):U.hasAttribute("aria-valuenow")?U.getAttribute("aria-valuenow"):U.getAttribute("value")||"";if(Hi(U,["textbox"]))return t.add(U),FE(U)}if(NE(U)||Ut(U)&&L.isReferenced||DE(U)||jE()){var Y=N(U,{isEmbeddedInLabel:L.isEmbeddedInLabel});if(Y!=="")return t.add(U),Y}if(U.nodeType===U.TEXT_NODE)return t.add(U),U.textContent||"";if(L.recursion)return t.add(U),N(U,{isEmbeddedInLabel:L.isEmbeddedInLabel});var fe=H(U);return fe!==null?(t.add(U),fe):(t.add(U),"")}return IE(ee(n,{isEmbeddedInLabel:!1,isReferenced:l==="description",recursion:!1}))}function Pl(n){"@babel/helpers - typeof";return Pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pl(n)}function hb(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),t.push.apply(t,r)}return t}function pb(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?hb(Object(t),!0).forEach(function(r){zE(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):hb(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function zE(n,e,t){return e=WE(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function WE(n){var e=HE(n,"string");return Pl(e)=="symbol"?e:e+""}function HE(n,e){if(Pl(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(Pl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function mb(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=Su(n,"aria-describedby").map(function(a){return fb(a,pb(pb({},e),{},{compute:"description"}))}).join(" ");if(t===""){var r=n.getAttribute("aria-description");t=r===null?"":r}if(t===""){var o=n.getAttribute("title");t=o===null?"":o}return t}function $E(n){return Hi(n,["caption","code","deletion","emphasis","generic","insertion","none","paragraph","presentation","strong","subscript","superscript"])}function $h(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return $E(n)?"":fb(n,e)}const qE=n=>n instanceof HTMLTextAreaElement?{value:n.value}:n.type==="checkbox"?{value:n.checked,options:[{value:!0,selected:n.checked,text:"checked"},{value:!1,selected:!n.checked,text:"unchecked"}]}:{value:n.value},GE=n=>{if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement){const e=$h(n)??"";return{name:e===""?n.name:e,description:mb(n),type:n.type,placeholder:n.placeholder,...qE(n)}}else if(n instanceof HTMLSelectElement){const e=$h(n)??"";return{name:e===""?n.name:e,description:mb(n),type:n.type,value:n.value,options:Array.from(n.options).map(t=>({value:t.value,text:t.text,selected:t.selected}))}}throw new TypeError("Unsupported element type")},gb=()=>{const e=Array.from(document.querySelectorAll("input, textarea, select")).map((r,o)=>({index:o,id:`${r.tagName.toLowerCase()}-${o}`,element:r})),t={};return e.forEach(({id:r,element:o})=>{t[r]=o}),{context:e.map(({id:r,element:o})=>({id:r,...GE(o)})),formElements:t}},Rl=(n,...e)=>{console.debug(`[NLX V+] ${n}`,...e)},KE=(n,e=50,t=1/0)=>{let r=null,o=null,a=Promise.resolve();return(...l)=>{o??(o=Date.now());const u=()=>{a=a.then(async()=>{try{await n.apply(null,l)}catch{}}),o=null};r&&clearTimeout(r),Date.now()-o>t?u():r=setTimeout(()=>{u()},e)}},JE=(n,e,t,r)=>{let o={fields:[],destinations:[],actions:[]};const a=KE(async()=>{const{context:u,state:f}=t(YE(e));if(!Xd(o,u)){try{Rl("Automatic context sent:",u),await n.sendContext({"nlx:vpContext":u})}catch{}r(f),o=u}},50,300);a();const l=new MutationObserver(a);return l.observe(document.body,{subtree:!0,childList:!0,attributes:!0}),{teardown:()=>{l.disconnect()},onCustomCommandsChange:u=>{e=u,a()}}},YE=n=>{const{context:e,formElements:t}=gb(),{context:r,links:o}=QE();return{context:{uri:window.location.pathname,fields:e,destinations:r,actions:n.filter(l=>l.description!=null).map(l=>{const{handler:u,...f}=l;return f})},state:{formElements:t,links:o,customCommands:new Map(n.map(l=>[l.action,l.handler]))}}},QE=()=>{const n=Object.fromEntries(ew(Array.from(document.querySelectorAll("a")).map(e=>[$h(e),e.getAttribute("href")??""])));return{context:Object.keys(n),links:n}},XE=(n,e,t)=>{const r=o=>{switch(Rl("Command received",o),o.classification){case"navigation":if(e.navigation!=null)e.navigation(o.action,o.destination,t.current.links);else if(e.automaticContext!==!1)switch(o.action){case"page_next":window.history.forward();break;case"page_previous":window.history.back();break;case"page_custom":if(o.destination!=null){const a=t.current.links[o.destination];if(a!=null)window.location.href=a;else try{new URL(o.destination),window.location.href=o.destination}catch{Rl('Custom page navigation action received, but no URL found for destination".',o.destination)}}break;case"page_unknown":Rl("Unknown page navigation action received, no automatic handling available.")}break;case"input":(e==null?void 0:e.input)!=null?e.input(o.fields,t.current.formElements):(e==null?void 0:e.automaticContext)!==!1&&o.fields.forEach(a=>{if(t.current.formElements[a.id]!=null){const l=t.current.formElements[a.id];typeof a.value=="string"?l.value=a.value:l instanceof HTMLInputElement&&l.type==="checkbox"&&(l.checked=a.value),l.classList.add("voice-updated"),l.dispatchEvent(new Event("input",{bubbles:!0})),l.dispatchEvent(new Event("change",{bubbles:!0})),setTimeout(()=>{l.classList.remove("voice-updated")},2e3)}});break;case"custom":t.current.customCommands.has(o.action)&&t.current.customCommands.get(o.action)(o.payload),Rl(`No custom command handler was defined for the %o action.
157
157
 
158
158
  %cTip: Set up a handler with
159
159
  setCustomBidirectionalCommands([{ action: "${o.action}", handler() { }}])`,o.action,"font-style: italic; font-size: 90%"),(e==null?void 0:e.custom)!=null&&(e.automaticContext!==!1&&console.warn("bidirectional.custom is deprecated in automatic context mode. Please use `setCustomBidirectionalCommands` instead."),e.custom(o.action,o.payload));break}};return n.addEventListener("voicePlusCommand",r),()=>{n.removeEventListener("voicePlusCommand",r)}};var Tu={exports:{}},ZE=Tu.exports,vb;function eP(){return vb||(vb=1,function(n,e){(function(r,o){n.exports=o()})(ZE,()=>(()=>{var t=[,(l,u,f)=>{f.r(u),f.d(u,{default:()=>g});var p=(()=>{var C=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(_={}){var T=_,N,A;T.ready=new Promise((d,h)=>{N=d,A=h});function H(){function d(B){const K=w;v=h=0,w=new Map,K.forEach(ce=>{try{ce(B)}catch(X){console.error(X)}}),this.ob(),x&&x.Qb()}let h=0,v=0,w=new Map,x=null,I=null;this.requestAnimationFrame=function(B){h||(h=requestAnimationFrame(d.bind(this)));const K=++v;return w.set(K,B),K},this.cancelAnimationFrame=function(B){w.delete(B),h&&w.size==0&&(cancelAnimationFrame(h),h=0)},this.Ob=function(B){I&&(document.body.remove(I),I=null),B||(I=document.createElement("div"),I.style.backgroundColor="black",I.style.position="fixed",I.style.right=0,I.style.top=0,I.style.color="white",I.style.padding="4px",I.innerHTML="RIVE FPS",B=function(K){I.innerHTML="RIVE FPS "+K.toFixed(1)},document.body.appendChild(I)),x=new function(){let K=0,ce=0;this.Qb=function(){var X=performance.now();ce?(++K,X-=ce,1e3<X&&(B(1e3*K/X),K=ce=0)):(ce=X,K=0)}}},this.ob=function(){}}function z(){console.assert(!0);const d=new Map;let h=-1/0;this.push=function(v){return v=v+255>>8,d.has(v)&&clearTimeout(d.get(v)),d.set(v,setTimeout(function(){d.delete(v),d.length==0?h=-1/0:v==h&&(h=Math.max(...d.keys()),console.assert(h<v))},1e3)),h=Math.max(v,h),h<<8}}const ee=T.onRuntimeInitialized;T.onRuntimeInitialized=function(){ee&&ee();let d=T.decodeAudio;T.decodeAudio=function(x,I){x=d(x),I(x)};let h=T.decodeFont;T.decodeFont=function(x,I){x=h(x),I(x)};const v=T.FileAssetLoader;T.ptrToAsset=x=>{let I=T.ptrToFileAsset(x);return I.isImage?T.ptrToImageAsset(x):I.isFont?T.ptrToFontAsset(x):I.isAudio?T.ptrToAudioAsset(x):I},T.CustomFileAssetLoader=v.extend("CustomFileAssetLoader",{__construct:function({loadContents:x}){this.__parent.__construct.call(this),this.Eb=x},loadContents:function(x,I){return x=T.ptrToAsset(x),this.Eb(x,I)}}),T.CDNFileAssetLoader=v.extend("CDNFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(x){let I=T.ptrToAsset(x);return x=I.cdnUuid,x===""?!1:(function(B,K){var ce=new XMLHttpRequest;ce.responseType="arraybuffer",ce.onreadystatechange=function(){ce.readyState==4&&ce.status==200&&K(ce)},ce.open("GET",B,!0),ce.send(null)}(I.cdnBaseUrl+"/"+x,B=>{I.decode(new Uint8Array(B.response))}),!0)}}),T.FallbackFileAssetLoader=v.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this),this.kb=[]},addLoader:function(x){this.kb.push(x)},loadContents:function(x,I){for(let B of this.kb)if(B.loadContents(x,I))return!0;return!1}});let w=T.computeAlignment;T.computeAlignment=function(x,I,B,K,ce=1){return w.call(this,x,I,B,K,ce)}};const U=T.onRuntimeInitialized;T.onRuntimeInitialized=function(){function d(me){this.F=me,this.Db=me.getContext("2d"),this.Gb=w,this.S=[],this.la=0,this.clear=function(){console.assert(this.la==0),this.S=[],x.delete(this)},this.save=function(){++this.la,this.S.push(w.save.bind(w))},this.restore=function(){0<this.la&&(this.S.push(w.restore.bind(w)),--this.la)},this.transform=function(Pe){this.S.push(w.transform.bind(w,Pe))},this.align=function(Pe,$e,Je,nt,yt=1){this.S.push(w.align.bind(w,Pe,$e,Je,nt,yt))},this.flush=function(){console.assert(this.la==0),x.add(this),w.$a||v()},this.delete=function(){}}function h(me,Pe=!1){var $e={alpha:!0,depth:Pe,stencil:Pe,antialias:Pe,premultipliedAlpha:!0,preserveDrawingBuffer:0,powerPreference:"high-performance",failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:!1,explicitSwapControl:0,renderViaOffscreenBackBuffer:0};if(Pe=me.getContext("webgl2",$e),!Pe)return null;$e=up(Pe,$e),Oa($e);const Je=I(me.width,me.height);Je.Na=$e,Je.F=me,Je.Oa=me.width,Je.ab=me.height,Je.T=Pe;var nt=Je.delete;return Je.delete=function(){nt.call(this);var yt=this.Na;Cr===en[yt]&&(Cr=null),typeof JSEvents=="object"&&JSEvents.Oc(en[yt].C.canvas),en[yt]&&en[yt].C.canvas&&(en[yt].C.canvas.Cb=void 0),this.Na=this.F=this.Oa=this.T=en[yt]=null},Je}function v(){if(w){var me=w.Fb,Pe=0,$e=0,Je=0,nt=Array(x.size),yt=0;for(var At of x)At.ga=Math.min(At.F.width,me),At.fa=Math.min(At.F.height,me),At.La=At.fa*At.ga,Pe=Math.max(Pe,At.ga),$e=Math.max($e,At.fa),Je+=At.La,nt[yt++]=At;if(x.clear(),!(0>=Je)){for(Pe=1<<(0>=Pe?0:32-Math.clz32(Pe-1)),$e=1<<(0>=$e?0:32-Math.clz32($e-1));$e*Pe<Je;)Pe<=$e?Pe*=2:$e*=2;for(Pe=Math.min(Pe,me),Pe=Math.min($e,me),nt.sort((li,eo)=>eo.La-li.La),Je=new T.DynamicRectanizer(me),At=0;At<nt.length;){for(Je.reset(Pe,$e),yt=At;yt<nt.length;++yt){var Dt=nt[yt],Mt=Je.addRect(Dt.ga,Dt.fa);if(0>Mt){console.assert(yt>At);break}Dt.ra=Mt&65535,Dt.sa=Mt>>16}for(Dt=ce.push(Je.drawWidth()),Mt=X.push(Je.drawHeight()),console.assert(Dt>=Je.drawWidth()),console.assert(Mt>=Je.drawHeight()),console.assert(Dt<=me),console.assert(Mt<=me),w.F.width!=Dt&&(w.F.width=Dt),w.F.height!=Mt&&(w.F.height=Mt),w.clear(),Dt=At;Dt<yt;++Dt){Mt=nt[Dt],w.saveClipRect(Mt.ra,Mt.sa,Mt.ra+Mt.ga,Mt.sa+Mt.fa);let li=new T.Mat2D;li.xx=Mt.ga/Mt.F.width,li.yy=Mt.fa/Mt.F.height,li.xy=li.yx=0,li.tx=Mt.ra,li.ty=Mt.sa,w.transform(li);for(const eo of Mt.S)eo();w.restoreClipRect(),Mt.S=[]}for(w.flush();At<yt;++At)Dt=nt[At],Mt=Dt.Db,Mt.globalCompositeOperation="copy",Mt.drawImage(w.F,Dt.ra,Dt.sa,Dt.ga,Dt.fa,0,0,Dt.F.width,Dt.F.height);At=yt}}}}U&&U();let w=null;const x=new Set,I=T.makeRenderer;T.makeRenderer=function(me,Pe){if(!w){let $e=function(Je){var nt=document.createElement("canvas");return nt.width=1,nt.height=1,w=h(nt,Je),w.$a=!!w.T.getExtension("WEBGL_shader_pixel_local_storage"),w.Fb=Math.min(w.T.getParameter(w.T.MAX_RENDERBUFFER_SIZE),w.T.getParameter(w.T.MAX_TEXTURE_SIZE)),w.Ma=!w.$a,(Je=w.T.getExtension("WEBGL_debug_renderer_info"))&&(nt=w.T.getParameter(Je.UNMASKED_RENDERER_WEBGL),w.T.getParameter(Je.UNMASKED_VENDOR_WEBGL).includes("Google")&&nt.includes("ANGLE Metal Renderer")&&(w.Ma=!1)),w};w=$e(!0),w.Ma||(w=$e(!1))}return Pe?new d(me):h(me,w.Ma)};const B=T.Artboard.prototype.delete;T.Artboard.prototype.delete=function(){this.Hb=!0,B.call(this)};const K=T.Artboard.prototype.draw;T.Artboard.prototype.draw=function(me){me.S?me.S.push(()=>{this.Hb||K.call(this,me.Gb)}):K.call(this,me)};const ce=new z,X=new z,Se=new H;T.requestAnimationFrame=Se.requestAnimationFrame.bind(Se),T.cancelAnimationFrame=Se.cancelAnimationFrame.bind(Se),T.enableFPSCounter=Se.Ob.bind(Se),Se.ob=v,T.resolveAnimationFrame=v;let Me=T.load;T.load=function(me,Pe,$e=!0){const Je=new T.FallbackFileAssetLoader;return Pe!==void 0&&Je.addLoader(Pe),$e&&(Pe=new T.CDNFileAssetLoader,Je.addLoader(Pe)),Promise.resolve(Me(me,Je))};const Ne=T.WebGL2Renderer.prototype.clear;T.WebGL2Renderer.prototype.clear=function(){Oa(this.Na);const me=this.F;(this.Oa!=me.width||this.ab!=me.height)&&(this.resize(me.width,me.height),this.Oa=me.width,this.ab=me.height),Ne.call(this)},T.decodeImage=function(me,Pe){me=T.decodeWebGL2Image(me),Pe(me)};let ne=T.Renderer.prototype.align;T.Renderer.prototype.align=function(me,Pe,$e,Je,nt=1){ne.call(this,me,Pe,$e,Je,nt)}};var L=Object.assign({},T),F="./this.program",G=typeof window=="object",se=typeof importScripts=="function",Q="",$,q;(G||se)&&(se?Q=self.location.href:typeof document<"u"&&document.currentScript&&(Q=document.currentScript.src),C&&(Q=C),Q.indexOf("blob:")!==0?Q=Q.substr(0,Q.replace(/[?#].*/,"").lastIndexOf("/")+1):Q="",se&&(q=d=>{var h=new XMLHttpRequest;return h.open("GET",d,!1),h.responseType="arraybuffer",h.send(null),new Uint8Array(h.response)}),$=(d,h,v)=>{var w=new XMLHttpRequest;w.open("GET",d,!0),w.responseType="arraybuffer",w.onload=()=>{w.status==200||w.status==0&&w.response?h(w.response):v()},w.onerror=v,w.send(null)});var Y=T.print||console.log.bind(console),fe=T.printErr||console.error.bind(console);Object.assign(T,L),L=null,T.thisProgram&&(F=T.thisProgram);var Re;T.wasmBinary&&(Re=T.wasmBinary),T.noExitRuntime,typeof WebAssembly!="object"&&Tn("no native wasm support detected");var We,oe,Ie=!1,pe,le,_e,de,O,te,Ve,Ke;function Xe(){var d=We.buffer;T.HEAP8=pe=new Int8Array(d),T.HEAP16=_e=new Int16Array(d),T.HEAP32=O=new Int32Array(d),T.HEAPU8=le=new Uint8Array(d),T.HEAPU16=de=new Uint16Array(d),T.HEAPU32=te=new Uint32Array(d),T.HEAPF32=Ve=new Float32Array(d),T.HEAPF64=Ke=new Float64Array(d)}var Fe,tt=[],qe=[],pt=[];function Lt(){var d=T.preRun.shift();tt.unshift(d)}var Jt=0,ar=null;function Tn(d){throw T.onAbort&&T.onAbort(d),d="Aborted("+d+")",fe(d),Ie=!0,d=new WebAssembly.RuntimeError(d+". Build with -sASSERTIONS for more info."),A(d),d}function Ar(d){return d.startsWith("data:application/octet-stream;base64,")}var Or;if(Or="webgl2_advanced.wasm",!Ar(Or)){var xo=Or;Or=T.locateFile?T.locateFile(xo,Q):Q+xo}function qi(d){if(d==Or&&Re)return new Uint8Array(Re);if(q)return q(d);throw"both async and sync fetching of the wasm failed"}function ha(d){if(!Re&&(G||se)){if(typeof fetch=="function"&&!d.startsWith("file://"))return fetch(d,{credentials:"same-origin"}).then(h=>{if(!h.ok)throw"failed to load wasm binary file at '"+d+"'";return h.arrayBuffer()}).catch(()=>qi(d));if($)return new Promise((h,v)=>{$(d,w=>h(new Uint8Array(w)),v)})}return Promise.resolve().then(()=>qi(d))}function _n(d,h,v){return ha(d).then(w=>WebAssembly.instantiate(w,h)).then(w=>w).then(v,w=>{fe("failed to asynchronously prepare wasm: "+w),Tn(w)})}function Gi(d,h){var v=Or;return Re||typeof WebAssembly.instantiateStreaming!="function"||Ar(v)||v.startsWith("file://")||typeof fetch!="function"?_n(v,d,h):fetch(v,{credentials:"same-origin"}).then(w=>WebAssembly.instantiateStreaming(w,d).then(h,function(x){return fe("wasm streaming compile failed: "+x),fe("falling back to ArrayBuffer instantiation"),_n(v,d,h)}))}var Qn,Ki,pa={534231:(d,h,v,w,x)=>{if(typeof window>"u"||(window.AudioContext||window.webkitAudioContext)===void 0)return 0;if(typeof window.h>"u"){window.h={Ga:0},window.h.I={},window.h.I.Ea=d,window.h.I.capture=h,window.h.I.Ra=v,window.h.ja={},window.h.ja.stopped=w,window.h.ja.xb=x;let I=window.h;I.D=[],I.rc=function(B){for(var K=0;K<I.D.length;++K)if(I.D[K]==null)return I.D[K]=B,K;return I.D.push(B),I.D.length-1},I.Bb=function(B){for(I.D[B]=null;0<I.D.length&&I.D[I.D.length-1]==null;)I.D.pop()},I.Qc=function(B){for(var K=0;K<I.D.length;++K)if(I.D[K]==B)return I.Bb(K)},I.va=function(B){return I.D[B]},I.Za=["touchend","click"],I.unlock=function(){for(var B=0;B<I.D.length;++B){var K=I.D[B];K!=null&&K.J!=null&&K.state===I.ja.xb&&K.J.resume().then(()=>{ur(K.pb)},ce=>{console.error("Failed to resume audiocontext",ce)})}I.Za.map(function(ce){document.removeEventListener(ce,I.unlock,!0)})},I.Za.map(function(B){document.addEventListener(B,I.unlock,!0)})}return window.h.Ga+=1,1},536409:()=>{typeof window.h<"u"&&(window.h.Za.map(function(d){document.removeEventListener(d,window.h.unlock,!0)}),--window.h.Ga,window.h.Ga===0&&delete window.h)},536713:()=>navigator.mediaDevices!==void 0&&navigator.mediaDevices.getUserMedia!==void 0,536817:()=>{try{var d=new(window.AudioContext||window.webkitAudioContext),h=d.sampleRate;return d.close(),h}catch{return 0}},536988:(d,h,v,w,x,I)=>{if(typeof window.h>"u")return-1;var B={},K={};return d==window.h.I.Ea&&v!=0&&(K.sampleRate=v),B.J=new(window.AudioContext||window.webkitAudioContext)(K),B.J.suspend(),B.state=window.h.ja.stopped,v=0,d!=window.h.I.Ea&&(v=h),B.Z=B.J.createScriptProcessor(w,v,h),B.Z.onaudioprocess=function(ce){if((B.wa==null||B.wa.length==0)&&(B.wa=new Float32Array(Ve.buffer,x,w*h)),d==window.h.I.capture||d==window.h.I.Ra){for(var X=0;X<h;X+=1)for(var Se=ce.inputBuffer.getChannelData(X),Me=B.wa,Ne=0;Ne<w;Ne+=1)Me[Ne*h+X]=Se[Ne];Do(I,w,x)}if(d==window.h.I.Ea||d==window.h.I.Ra)for(rc(I,w,x),X=0;X<ce.outputBuffer.numberOfChannels;++X)for(Se=ce.outputBuffer.getChannelData(X),Me=B.wa,Ne=0;Ne<w;Ne+=1)Se[Ne]=Me[Ne*h+X];else for(X=0;X<ce.outputBuffer.numberOfChannels;++X)ce.outputBuffer.getChannelData(X).fill(0)},d!=window.h.I.capture&&d!=window.h.I.Ra||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(ce){B.Ha=B.J.createMediaStreamSource(ce),B.Ha.connect(B.Z),B.Z.connect(B.J.destination)}).catch(function(ce){console.log("Failed to get user media: "+ce)}),d==window.h.I.Ea&&B.Z.connect(B.J.destination),B.pb=I,window.h.rc(B)},539865:d=>window.h.va(d).J.sampleRate,539938:d=>{d=window.h.va(d),d.Z!==void 0&&(d.Z.onaudioprocess=function(){},d.Z.disconnect(),d.Z=void 0),d.Ha!==void 0&&(d.Ha.disconnect(),d.Ha=void 0),d.J.close(),d.J=void 0,d.pb=void 0},540338:d=>{window.h.Bb(d)},540388:d=>{d=window.h.va(d),d.J.resume(),d.state=window.h.ja.xb},540527:d=>{d=window.h.va(d),d.J.suspend(),d.state=window.h.ja.stopped}},P=d=>{for(;0<d.length;)d.shift()(T)},y=(d,h)=>{for(var v=0,w=d.length-1;0<=w;w--){var x=d[w];x==="."?d.splice(w,1):x===".."?(d.splice(w,1),v++):v&&(d.splice(w,1),v--)}if(h)for(;v;v--)d.unshift("..");return d},S=d=>{var h=d.charAt(0)==="/",v=d.substr(-1)==="/";return(d=y(d.split("/").filter(w=>!!w),!h).join("/"))||h||(d="."),d&&v&&(d+="/"),(h?"/":"")+d},M=d=>{var h=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(d).slice(1);return d=h[0],h=h[1],!d&&!h?".":(h&&(h=h.substr(0,h.length-1)),d+h)},J=d=>{if(d==="/")return"/";d=S(d),d=d.replace(/\/$/,"");var h=d.lastIndexOf("/");return h===-1?d:d.substr(h+1)},ue=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return d=>crypto.getRandomValues(d);Tn("initRandomDevice")},be=d=>(be=ue())(d);function Ge(){for(var d="",h=!1,v=arguments.length-1;-1<=v&&!h;v--){if(h=0<=v?arguments[v]:"/",typeof h!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!h)return"";d=h+"/"+d,h=h.charAt(0)==="/"}return d=y(d.split("/").filter(w=>!!w),!h).join("/"),(h?"/":"")+d||"."}var it=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Le=(d,h,v)=>{var w=h+v;for(v=h;d[v]&&!(v>=w);)++v;if(16<v-h&&d.buffer&&it)return it.decode(d.subarray(h,v));for(w="";h<v;){var x=d[h++];if(x&128){var I=d[h++]&63;if((x&224)==192)w+=String.fromCharCode((x&31)<<6|I);else{var B=d[h++]&63;x=(x&240)==224?(x&15)<<12|I<<6|B:(x&7)<<18|I<<12|B<<6|d[h++]&63,65536>x?w+=String.fromCharCode(x):(x-=65536,w+=String.fromCharCode(55296|x>>10,56320|x&1023))}}else w+=String.fromCharCode(x)}return w},at=[],Pt=d=>{for(var h=0,v=0;v<d.length;++v){var w=d.charCodeAt(v);127>=w?h++:2047>=w?h+=2:55296<=w&&57343>=w?(h+=4,++v):h+=3}return h},Yt=(d,h,v,w)=>{if(!(0<w))return 0;var x=v;w=v+w-1;for(var I=0;I<d.length;++I){var B=d.charCodeAt(I);if(55296<=B&&57343>=B){var K=d.charCodeAt(++I);B=65536+((B&1023)<<10)|K&1023}if(127>=B){if(v>=w)break;h[v++]=B}else{if(2047>=B){if(v+1>=w)break;h[v++]=192|B>>6}else{if(65535>=B){if(v+2>=w)break;h[v++]=224|B>>12}else{if(v+3>=w)break;h[v++]=240|B>>18,h[v++]=128|B>>12&63}h[v++]=128|B>>6&63}h[v++]=128|B&63}}return h[v]=0,v-x};function Rt(d,h){var v=Array(Pt(d)+1);return d=Yt(d,v,0,v.length),h&&(v.length=d),v}var Xn=[];function An(d,h){Xn[d]={input:[],G:[],V:h},va(d,xn)}var xn={open:function(d){var h=Xn[d.node.Fa];if(!h)throw new De(43);d.s=h,d.seekable=!1},close:function(d){d.s.V.ua(d.s)},ua:function(d){d.s.V.ua(d.s)},read:function(d,h,v,w){if(!d.s||!d.s.V.jb)throw new De(60);for(var x=0,I=0;I<w;I++){try{var B=d.s.V.jb(d.s)}catch{throw new De(29)}if(B===void 0&&x===0)throw new De(6);if(B==null)break;x++,h[v+I]=B}return x&&(d.node.timestamp=Date.now()),x},write:function(d,h,v,w){if(!d.s||!d.s.V.Ua)throw new De(60);try{for(var x=0;x<w;x++)d.s.V.Ua(d.s,h[v+x])}catch{throw new De(29)}return w&&(d.node.timestamp=Date.now()),x}},on={jb:function(){e:{if(!at.length){var d=null;if(typeof window<"u"&&typeof window.prompt=="function"?(d=window.prompt("Input: "),d!==null&&(d+=`
@@ -163,7 +163,7 @@ setCustomBidirectionalCommands([{ action: "${o.action}", handler() { }}])`,o.act
163
163
  `,"%p":ne=>0<=ne.Ja&&12>ne.Ja?"AM":"PM","%S":ne=>I(ne.pc,2),"%t":()=>" ","%u":ne=>ne.R||7,"%U":ne=>I(Math.floor((ne.da+7-ne.R)/7),2),"%V":ne=>{var me=Math.floor((ne.da+7-(ne.R+6)%7)/7);if(2>=(ne.R+371-ne.da-2)%7&&me++,me)me==53&&(Pe=(ne.R+371-ne.da)%7,Pe==4||Pe==3&&Zi(ne.ea)||(me=1));else{me=52;var Pe=(ne.R+7-ne.da-1)%7;(Pe==4||Pe==5&&Zi(ne.ea%400-1))&&me++}return I(me,2)},"%w":ne=>ne.R,"%W":ne=>I(Math.floor((ne.da+7-(ne.R+6)%7)/7),2),"%y":ne=>(ne.ea+1900).toString().substring(2),"%Y":ne=>ne.ea+1900,"%z":ne=>{ne=ne.nc;var me=0<=ne;return ne=Math.abs(ne)/60,(me?"+":"-")+("0000"+(ne/60*100+ne%60)).slice(-4)},"%Z":ne=>ne.qc,"%%":()=>"%"},v=v.replace(/%%/g,"\0\0");for(Se in X)v.includes(Se)&&(v=v.replace(new RegExp(Se,"g"),X[Se](w)));return v=v.replace(/\0\0/g,"%"),Se=Rt(v,!1),Se.length>h?0:(pe.set(Se,d),Se.length-1)};function La(d,h,v,w){d||(d=this),this.parent=d,this.U=d.U,this.Da=null,this.id=Au++,this.name=h,this.mode=v,this.l={},this.m={},this.Fa=w}Object.defineProperties(La.prototype,{read:{get:function(){return(this.mode&365)===365},set:function(d){d?this.mode|=365:this.mode&=-366}},write:{get:function(){return(this.mode&146)===146},set:function(d){d?this.mode|=146:this.mode&=-147}}}),Ul(),ei=Array(4096),jl(et,"/"),lr("/tmp",16895,0),lr("/home",16895,0),lr("/home/web_user",16895,0),(()=>{lr("/dev",16895,0),va(259,{read:()=>0,write:(w,x,I,B)=>B}),ya("/dev/null",259),An(1280,on),An(1536,dn),ya("/dev/tty",1280),ya("/dev/tty1",1536);var d=new Uint8Array(1024),h=0,v=()=>(h===0&&(h=be(d).byteLength),d[--h]);ds("random",v),ds("urandom",v),lr("/dev/shm",16895,0),lr("/dev/shm/tmp",16895,0)})(),(()=>{lr("/proc",16895,0);var d=lr("/proc/self",16895,0);lr("/proc/self/fd",16895,0),jl({U:()=>{var h=Ou(d,"fd",16895,73);return h.l={ma:(v,w)=>{var x=ti(+w);return v={parent:null,U:{mb:"fake"},l:{na:()=>x.path}},v.parent=v}},h}},"/proc/self/fd")})(),Object.assign(fs.prototype,{get(d){return this.M[d]},has(d){return this.M[d]!==void 0},ta(d){var h=this.ib.pop()||this.M.length;return this.M[h]=d,h},Wb(d){this.M[d]=void 0,this.ib.push(d)}}),jr=T.BindingError=class extends Error{constructor(d){super(d),this.name="BindingError"}},Pn.M.push({value:void 0},{value:null},{value:!0},{value:!1}),Pn.h=Pn.M.length,T.count_emval_handles=function(){for(var d=0,h=Pn.h;h<Pn.M.length;++h)Pn.M[h]!==void 0&&++d;return d},Bl=T.PureVirtualError=Ta("PureVirtualError");for(var tc=Array(256),Rs=0;256>Rs;++Rs)tc[Rs]=String.fromCharCode(Rs);_a=tc,T.getInheritedInstanceCount=function(){return Object.keys(Ur).length},T.getLiveInheritedInstances=function(){var d=[],h;for(h in Ur)Ur.hasOwnProperty(h)&&d.push(Ur[h]);return d},T.flushPendingDeletes=ps,T.setDelayFunction=function(d){vt=d,hs.length&&vt&&vt(ps)},Ro=T.InternalError=class extends Error{constructor(d){super(d),this.name="InternalError"}},kr.prototype.isAliasOf=function(d){if(!(this instanceof kr&&d instanceof kr))return!1;var h=this.g.u.i,v=this.g.o,w=d.g.u.i;for(d=d.g.o;h.A;)v=h.pa(v),h=h.A;for(;w.A;)d=w.pa(d),w=w.A;return h===w&&v===d},kr.prototype.clone=function(){if(this.g.o||xi(this),this.g.ka)return this.g.count.value+=1,this;var d=Io,h=Object,v=h.create,w=Object.getPrototypeOf(this),x=this.g;return d=d(v.call(h,w,{g:{value:{count:x.count,ia:x.ia,ka:x.ka,o:x.o,u:x.u,H:x.H,L:x.L}}})),d.g.count.value+=1,d.g.ia=!1,d},kr.prototype.delete=function(){this.g.o||xi(this),this.g.ia&&!this.g.ka&&ot("Object already scheduled for deletion"),ms(this),vs(this.g),this.g.ka||(this.g.H=void 0,this.g.o=void 0)},kr.prototype.isDeleted=function(){return!this.g.o},kr.prototype.deleteLater=function(){return this.g.o||xi(this),this.g.ia&&!this.g.ka&&ot("Object already scheduled for deletion"),hs.push(this),hs.length===1&&vt&&vt(ps),this.g.ia=!0,this},wr.prototype.Sb=function(d){return this.sb&&(d=this.sb(d)),d},wr.prototype.cb=function(d){this.W&&this.W(d)},wr.prototype.argPackAdvance=8,wr.prototype.readValueFromPointer=bs,wr.prototype.deleteObject=function(d){d!==null&&d.delete()},wr.prototype.fromWireType=function(d){function h(){return this.ya?br(this.i.N,{u:this.fc,o:v,L:this,H:d}):br(this.i.N,{u:this,o:d})}var v=this.Sb(d);if(!v)return this.cb(d),null;var w=Ti(this.i,v);if(w!==void 0)return w.g.count.value===0?(w.g.o=v,w.g.H=d,w.clone()):(w=w.clone(),this.cb(d),w);if(w=this.i.Rb(v),w=oi[w],!w)return h.call(this);w=this.xa?w.Jb:w.pointerType;var x=ii(v,this.i,w.i);return x===null?h.call(this):this.ya?br(w.i.N,{u:w,o:x,L:this,H:d}):br(w.i.N,{u:w,o:x})},Nn=T.UnboundTypeError=Ta("UnboundTypeError");for(var he,nc=0;32>nc;++nc)Xl.push(Array(nc));var Xu={__syscall_fcntl64:function(d,h,v){En=v;try{var w=ti(d);switch(h){case 0:var x=ni();return 0>x?-28:Nu(w,x).X;case 1:case 2:return 0;case 3:return w.flags;case 4:return x=ni(),w.flags|=x,0;case 5:return x=ni(),_e[x+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return O[Zu()>>2]=28,-1;default:return-28}}catch(I){if(typeof Nr>"u"||I.name!=="ErrnoError")throw I;return-I.aa}},__syscall_ioctl:function(d,h,v){En=v;try{var w=ti(d);switch(h){case 21509:return w.s?0:-59;case 21505:if(!w.s)return-59;if(w.s.V.$b){h=[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var x=ni();O[x>>2]=25856,O[x+4>>2]=5,O[x+8>>2]=191,O[x+12>>2]=35387;for(var I=0;32>I;I++)pe[x+I+17>>0]=h[I]||0}return 0;case 21510:case 21511:case 21512:return w.s?0:-59;case 21506:case 21507:case 21508:if(!w.s)return-59;if(w.s.V.ac)for(x=ni(),h=[],I=0;32>I;I++)h.push(pe[x+I+17>>0]);return 0;case 21519:return w.s?(x=ni(),O[x>>2]=0):-59;case 21520:return w.s?-28:-59;case 21531:if(x=ni(),!w.m.Zb)throw new De(59);return w.m.Zb(w,h,x);case 21523:return w.s?(w.s.V.bc&&(I=[24,80],x=ni(),_e[x>>1]=I[0],_e[x+2>>1]=I[1]),0):-59;case 21524:return w.s?0:-59;case 21515:return w.s?0:-59;default:return-28}}catch(B){if(typeof Nr>"u"||B.name!=="ErrnoError")throw B;return-B.aa}},__syscall_openat:function(d,h,v,w){En=w;try{h=h?Le(le,h):"";var x=h;if(x.charAt(0)==="/")h=x;else{var I=d===-100?"/":ti(d).path;if(x.length==0)throw new De(44);h=S(I+"/"+x)}var B=w?ni():0;return ba(h,v,B).X}catch(K){if(typeof Nr>"u"||K.name!=="ErrnoError")throw K;return-K.aa}},_embind_create_inheriting_constructor:function(d,h,v){d=It(d),h=Po(h,"wrapper"),v=yr(v);var w=[].slice,x=h.i,I=x.N,B=x.A.N,K=x.A.constructor;d=Sa(d,function(){x.A.qb.forEach((function(X){if(this[X]===B[X])throw new Bl(`Pure virtual function ${X} must be implemented in JavaScript`)}).bind(this)),Object.defineProperty(this,"__parent",{value:I}),this.__construct.apply(this,w.call(arguments))}),I.__construct=function(){this===I&&ot("Pass correct 'this' to __construct");var X=K.implement.apply(void 0,[this].concat(w.call(arguments)));ms(X);var Se=X.g;X.notifyOnDestruction(),Se.ka=!0,Object.defineProperties(this,{g:{value:Se}}),Io(this),X=Se.o,X=xa(x,X),Ur.hasOwnProperty(X)?ot(`Tried to register registered instance: ${X}`):Ur[X]=this},I.__destruct=function(){this===I&&ot("Pass correct 'this' to __destruct"),ms(this);var X=this.g.o;X=xa(x,X),Ur.hasOwnProperty(X)?delete Ur[X]:ot(`Tried to unregister unregistered instance: ${X}`)},d.prototype=Object.create(I);for(var ce in v)d.prototype[ce]=v[ce];return Fr(d)},_embind_finalize_value_object:function(d){var h=ys[d];delete ys[d];var v=h.Va,w=h.W,x=h.fb,I=x.map(B=>B.Vb).concat(x.map(B=>B.kc));Ln([d],I,B=>{var K={};return x.forEach((ce,X)=>{var Se=B[X],Me=ce.Tb,Ne=ce.Ub,ne=B[X+x.length],me=ce.jc,Pe=ce.lc;K[ce.Pb]={read:$e=>Se.fromWireType(Me(Ne,$e)),write:($e,Je)=>{var nt=[];me(Pe,$e,ne.toWireType(nt,Je)),si(nt)}}}),[{name:h.name,fromWireType:function(ce){var X={},Se;for(Se in K)X[Se]=K[Se].read(ce);return w(ce),X},toWireType:function(ce,X){for(var Se in K)if(!(Se in X))throw new TypeError(`Missing field: "${Se}"`);var Me=v();for(Se in K)K[Se].write(Me,X[Se]);return ce!==null&&ce.push(w,Me),Me},argPackAdvance:8,readValueFromPointer:bs,K:w}]})},_embind_register_bigint:function(){},_embind_register_bool:function(d,h,v,w,x){var I=Ea(v);h=It(h),Dn(d,{name:h,fromWireType:function(B){return!!B},toWireType:function(B,K){return K?w:x},argPackAdvance:8,readValueFromPointer:function(B){if(v===1)var K=pe;else if(v===2)K=_e;else if(v===4)K=O;else throw new TypeError("Unknown boolean type size: "+h);return this.fromWireType(K[B>>I])},K:null})},_embind_register_class:function(d,h,v,w,x,I,B,K,ce,X,Se,Me,Ne){Se=It(Se),I=fn(x,I),K&&(K=fn(B,K)),X&&(X=fn(ce,X)),Ne=fn(Me,Ne);var ne=Fu(Se);Wl(ne,function(){jn(`Cannot construct ${Se} due to unbound types`,[w])}),Ln([d,h,v],w?[w]:[],function(me){if(me=me[0],w)var Pe=me.i,$e=Pe.N;else $e=kr.prototype;me=Sa(ne,function(){if(Object.getPrototypeOf(this)!==Je)throw new jr("Use 'new' to construct "+Se);if(nt.$===void 0)throw new jr(Se+" has no accessible constructor");var At=nt.$[arguments.length];if(At===void 0)throw new jr(`Tried to invoke ctor of ${Se} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(nt.$).toString()}) parameters instead!`);return At.apply(this,arguments)});var Je=Object.create($e,{constructor:{value:me}});me.prototype=Je;var nt=new Hl(Se,me,Je,Ne,Pe,I,K,X);nt.A&&(nt.A.qa===void 0&&(nt.A.qa=[]),nt.A.qa.push(nt)),Pe=new wr(Se,nt,!0,!1),$e=new wr(Se+"*",nt,!1,!1);var yt=new wr(Se+" const*",nt,!1,!0);return oi[d]={pointerType:$e,Jb:yt},ws(ne,me),[Pe,$e,yt]})},_embind_register_class_class_function:function(d,h,v,w,x,I,B){var K=Pi(v,w);h=It(h),I=fn(x,I),Ln([],[d],function(ce){function X(){jn(`Cannot call ${Se} due to unbound types`,K)}ce=ce[0];var Se=`${ce.name}.${h}`;h.startsWith("@@")&&(h=Symbol[h.substring(2)]);var Me=ce.i.constructor;return Me[h]===void 0?(X.ha=v-1,Me[h]=X):(zl(Me,h,Se),Me[h].B[v-1]=X),Ln([],K,function(Ne){if(Ne=Mo(Se,[Ne[0],null].concat(Ne.slice(1)),null,I,B),Me[h].B===void 0?(Ne.ha=v-1,Me[h]=Ne):Me[h].B[v-1]=Ne,ce.i.qa)for(const ne of ce.i.qa)ne.constructor.hasOwnProperty(h)||(ne.constructor[h]=Ne);return[]}),[]})},_embind_register_class_class_property:function(d,h,v,w,x,I,B,K){h=It(h),I=fn(x,I),Ln([],[d],function(ce){ce=ce[0];var X=`${ce.name}.${h}`,Se={get(){jn(`Cannot access ${X} due to unbound types`,[v])},enumerable:!0,configurable:!0};return Se.set=K?()=>{jn(`Cannot access ${X} due to unbound types`,[v])}:()=>{ot(`${X} is a read-only property`)},Object.defineProperty(ce.i.constructor,h,Se),Ln([],[v],function(Me){Me=Me[0];var Ne={get(){return Me.fromWireType(I(w))},enumerable:!0};return K&&(K=fn(B,K),Ne.set=ne=>{var me=[];K(w,Me.toWireType(me,ne)),si(me)}),Object.defineProperty(ce.i.constructor,h,Ne),[]}),[]})},_embind_register_class_constructor:function(d,h,v,w,x,I){var B=Pi(h,v);x=fn(w,x),Ln([],[d],function(K){K=K[0];var ce=`constructor ${K.name}`;if(K.i.$===void 0&&(K.i.$=[]),K.i.$[h-1]!==void 0)throw new jr(`Cannot register multiple constructors with identical number of parameters (${h-1}) for class '${K.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return K.i.$[h-1]=()=>{jn(`Cannot construct ${K.name} due to unbound types`,B)},Ln([],B,function(X){return X.splice(1,0,null),K.i.$[h-1]=Mo(ce,X,null,x,I),[]}),[]})},_embind_register_class_function:function(d,h,v,w,x,I,B,K){var ce=Pi(v,w);h=It(h),I=fn(x,I),Ln([],[d],function(X){function Se(){jn(`Cannot call ${Me} due to unbound types`,ce)}X=X[0];var Me=`${X.name}.${h}`;h.startsWith("@@")&&(h=Symbol[h.substring(2)]),K&&X.i.qb.push(h);var Ne=X.i.N,ne=Ne[h];return ne===void 0||ne.B===void 0&&ne.className!==X.name&&ne.ha===v-2?(Se.ha=v-2,Se.className=X.name,Ne[h]=Se):(zl(Ne,h,Me),Ne[h].B[v-2]=Se),Ln([],ce,function(me){return me=Mo(Me,me,X,I,B),Ne[h].B===void 0?(me.ha=v-2,Ne[h]=me):Ne[h].B[v-2]=me,[]}),[]})},_embind_register_class_property:function(d,h,v,w,x,I,B,K,ce,X){h=It(h),x=fn(w,x),Ln([],[d],function(Se){Se=Se[0];var Me=`${Se.name}.${h}`,Ne={get(){jn(`Cannot access ${Me} due to unbound types`,[v,B])},enumerable:!0,configurable:!0};return Ne.set=ce?()=>{jn(`Cannot access ${Me} due to unbound types`,[v,B])}:()=>{ot(Me+" is a read-only property")},Object.defineProperty(Se.i.N,h,Ne),Ln([],ce?[v,B]:[v],function(ne){var me=ne[0],Pe={get(){var Je=Bu(this,Se,Me+" getter");return me.fromWireType(x(I,Je))},enumerable:!0};if(ce){ce=fn(K,ce);var $e=ne[1];Pe.set=function(Je){var nt=Bu(this,Se,Me+" setter"),yt=[];ce(X,nt,$e.toWireType(yt,Je)),si(yt)}}return Object.defineProperty(Se.i.N,h,Pe),[]}),[]})},_embind_register_emval:function(d,h){h=It(h),Dn(d,{name:h,fromWireType:function(v){var w=yr(v);return Ts(v),w},toWireType:function(v,w){return Fr(w)},argPackAdvance:8,readValueFromPointer:bs,K:null})},_embind_register_enum:function(d,h,v,w){function x(){}v=Ea(v),h=It(h),x.values={},Dn(d,{name:h,constructor:x,fromWireType:function(I){return this.constructor.values[I]},toWireType:function(I,B){return B.value},argPackAdvance:8,readValueFromPointer:ql(h,v,w),K:null}),Wl(h,x)},_embind_register_enum_value:function(d,h,v){var w=Po(d,"enum");h=It(h),d=w.constructor,w=Object.create(w.constructor.prototype,{value:{value:v},constructor:{value:Sa(`${w.name}_${h}`,function(){})}}),d.values[v]=w,d[h]=w},_embind_register_float:function(d,h,v){v=Ea(v),h=It(h),Dn(d,{name:h,fromWireType:function(w){return w},toWireType:function(w,x){return x},argPackAdvance:8,readValueFromPointer:Ra(h,v),K:null})},_embind_register_function:function(d,h,v,w,x,I){var B=Pi(h,v);d=It(d),x=fn(w,x),Wl(d,function(){jn(`Cannot call ${d} due to unbound types`,B)},h-1),Ln([],B,function(K){return ws(d,Mo(d,[K[0],null].concat(K.slice(1)),null,x,I),h-1),[]})},_embind_register_integer:function(d,h,v,w,x){h=It(h),x===-1&&(x=4294967295),x=Ea(v);var I=K=>K;if(w===0){var B=32-8*v;I=K=>K<<B>>>B}v=h.includes("unsigned")?function(K,ce){return ce>>>0}:function(K,ce){return ce},Dn(d,{name:h,fromWireType:I,toWireType:v,argPackAdvance:8,readValueFromPointer:Vu(h,x,w!==0),K:null})},_embind_register_memory_view:function(d,h,v){function w(I){I>>=2;var B=te;return new x(B.buffer,B[I+1],B[I])}var x=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][h];v=It(v),Dn(d,{name:v,fromWireType:w,argPackAdvance:8,readValueFromPointer:w},{Xb:!0})},_embind_register_std_string:function(d,h){h=It(h);var v=h==="std::string";Dn(d,{name:h,fromWireType:function(w){var x=te[w>>2],I=w+4;if(v)for(var B=I,K=0;K<=x;++K){var ce=I+K;if(K==x||le[ce]==0){if(B=B?Le(le,B,ce-B):"",X===void 0)var X=B;else X+="\0",X+=B;B=ce+1}}else{for(X=Array(x),K=0;K<x;++K)X[K]=String.fromCharCode(le[I+K]);X=X.join("")}return ai(w),X},toWireType:function(w,x){x instanceof ArrayBuffer&&(x=new Uint8Array(x));var I=typeof x=="string";I||x instanceof Uint8Array||x instanceof Uint8ClampedArray||x instanceof Int8Array||ot("Cannot pass non-string to std::string");var B=v&&I?Pt(x):x.length,K=Da(4+B+1),ce=K+4;if(te[K>>2]=B,v&&I)Yt(x,le,ce,B+1);else if(I)for(I=0;I<B;++I){var X=x.charCodeAt(I);255<X&&(ai(ce),ot("String has UTF-16 code units that do not fit in 8 bits")),le[ce+I]=X}else for(I=0;I<B;++I)le[ce+I]=x[I];return w!==null&&w.push(ai,K),K},argPackAdvance:8,readValueFromPointer:bs,K:function(w){ai(w)}})},_embind_register_std_wstring:function(d,h,v){if(v=It(v),h===2)var w=np,x=rp,I=Gl,B=()=>de,K=1;else h===4&&(w=ip,x=op,I=sp,B=()=>te,K=2);Dn(d,{name:v,fromWireType:function(ce){for(var X=te[ce>>2],Se=B(),Me,Ne=ce+4,ne=0;ne<=X;++ne){var me=ce+4+ne*h;(ne==X||Se[me>>K]==0)&&(Ne=w(Ne,me-Ne),Me===void 0?Me=Ne:(Me+="\0",Me+=Ne),Ne=me+h)}return ai(ce),Me},toWireType:function(ce,X){typeof X!="string"&&ot(`Cannot pass non-string to C++ string type ${v}`);var Se=I(X),Me=Da(4+Se+h);return te[Me>>2]=Se>>K,x(X,Me+4,Se+h),ce!==null&&ce.push(ai,Me),Me},argPackAdvance:8,readValueFromPointer:bs,K:function(ce){ai(ce)}})},_embind_register_value_object:function(d,h,v,w,x,I){ys[d]={name:It(h),Va:fn(v,w),W:fn(x,I),fb:[]}},_embind_register_value_object_field:function(d,h,v,w,x,I,B,K,ce,X){ys[d].fb.push({Pb:It(h),Vb:v,Tb:fn(w,x),Ub:I,kc:B,jc:fn(K,ce),lc:X})},_embind_register_void:function(d,h){h=It(h),Dn(d,{cc:!0,name:h,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},_emscripten_get_now_is_monotonic:()=>!0,_emval_as:function(d,h,v){d=yr(d),h=Po(h,"emval::as");var w=[],x=Fr(w);return te[v>>2]=x,h.toWireType(w,d)},_emval_call_method:function(d,h,v,w,x){d=_s[d],h=yr(h),v=Kl(v);var I=[];return te[w>>2]=Fr(I),d(h,v,I,x)},_emval_call_void_method:function(d,h,v,w){d=_s[d],h=yr(h),v=Kl(v),d(h,v,null,w)},_emval_decref:Ts,_emval_get_method_caller:function(d,h){var v=cp(d,h),w=v[0];h=w.name+"_$"+v.slice(1).map(function(B){return B.name}).join("_")+"$";var x=Wu[h];if(x!==void 0)return x;var I=Array(d-1);return x=lp((B,K,ce,X)=>{for(var Se=0,Me=0;Me<d-1;++Me)I[Me]=v[Me+1].readValueFromPointer(X+Se),Se+=v[Me+1].argPackAdvance;for(B=B[K].apply(B,I),Me=0;Me<d-1;++Me)v[Me+1].Lb&&v[Me+1].Lb(I[Me]);if(!w.cc)return w.toWireType(ce,B)}),Wu[h]=x},_emval_get_property:function(d,h){return d=yr(d),h=yr(h),Fr(d[h])},_emval_incref:function(d){4<d&&(Pn.get(d).ub+=1)},_emval_new_array:function(){return Fr([])},_emval_new_cstring:function(d){return Fr(Kl(d))},_emval_new_object:function(){return Fr({})},_emval_run_destructors:function(d){var h=yr(d);si(h),Ts(d)},_emval_set_property:function(d,h,v){d=yr(d),h=yr(h),v=yr(v),d[h]=v},_emval_take_value:function(d,h){return d=Po(d,"_emval_take_value"),d=d.readValueFromPointer(h),Fr(d)},abort:()=>{Tn("")},beginPixelLocalStorageWEBGL:function(d,h,v){(d=en[d].C.ca)&&d.beginPixelLocalStorageWEBGL(T.HEAPU32.subarray(v,v+h))},decode_image:function(d,h,v){var w=T.images;w||(w=new Map,T.images=w);var x=new Image;w.set(d,x),h=T.HEAP8.subarray(h,h+v),v=new Uint8Array(v),v.set(h),x.src=URL.createObjectURL(new Blob([v],{type:"image/png"})),x.onload=function(){T._setWebImage(d,x.width,x.height)}},delete_image:function(d){var h=T.images;h&&h.get(d)&&h.delete(d)},emscripten_asm_const_int:(d,h,v)=>{Jl.length=0;var w;for(v>>=2;w=le[h++];)v+=w!=105&v,Jl.push(w==105?O[v]:Ke[v++>>1]),++v;return pa[d].apply(null,Jl)},emscripten_date_now:function(){return Date.now()},emscripten_get_now:()=>performance.now(),emscripten_memcpy_big:(d,h,v)=>le.copyWithin(d,h,h+v),emscripten_resize_heap:d=>{var h=le.length;if(d>>>=0,2147483648<d)return!1;for(var v=1;4>=v;v*=2){var w=h*(1+.2/v);w=Math.min(w,d+100663296);var x=Math;w=Math.max(d,w);e:{x=x.min.call(x,2147483648,w+(65536-w%65536)%65536)-We.buffer.byteLength+65535>>>16;try{We.grow(x),Xe();var I=1;break e}catch{}I=void 0}if(I)return!0}return!1},emscripten_webgl_enable_extension:function(d,h){return d=en[d],h=h?Le(le,h):"",h.startsWith("GL_")&&(h=h.substr(3)),h=="WEBGL_draw_instanced_base_vertex_base_instance"&&Ia(he),h=="WEBGL_multi_draw_instanced_base_vertex_base_instance"&&Hu(he),h=="WEBGL_multi_draw"&&Yl(he),!!d.C.getExtension(h)},emscripten_webgl_get_current_context:function(){return Cr?Cr.handle:0},emscripten_webgl_make_context_current:function(d){return Oa(d)?0:-5},enable_WEBGL_provoking_vertex:function(d){return d=en[d].C,d.rb=d.getExtension("WEBGL_provoking_vertex"),!!d.rb},enable_WEBGL_shader_pixel_local_storage_coherent:function(d){return d=en[d].C,d.ca=d.getExtension("WEBGL_shader_pixel_local_storage"),!(!d.ca||!d.ca.isCoherent())},endPixelLocalStorageWEBGL:function(d,h,v){(d=en[d].C.ca)&&d.endPixelLocalStorageWEBGL(T.HEAPU32.subarray(v,v+h))},environ_get:(d,h)=>{var v=0;return Ku().forEach(function(w,x){var I=h+v;for(x=te[d+4*x>>2]=I,I=0;I<w.length;++I)pe[x++>>0]=w.charCodeAt(I);pe[x>>0]=0,v+=w.length+1}),0},environ_sizes_get:(d,h)=>{var v=Ku();te[d>>2]=v.length;var w=0;return v.forEach(function(x){w+=x.length+1}),te[h>>2]=w,0},fd_close:function(d){try{var h=ti(d);if(h.X===null)throw new De(8);h.Sa&&(h.Sa=null);try{h.m.close&&h.m.close(h)}catch(v){throw v}finally{er[h.X]=null}return h.X=null,0}catch(v){if(typeof Nr>"u"||v.name!=="ErrnoError")throw v;return v.aa}},fd_read:function(d,h,v,w){try{e:{var x=ti(d);d=h;for(var I,B=h=0;B<v;B++){var K=te[d>>2],ce=te[d+4>>2];d+=8;var X=x,Se=K,Me=ce,Ne=I,ne=pe;if(0>Me||0>Ne)throw new De(28);if(X.X===null)throw new De(8);if((X.flags&2097155)===1)throw new De(8);if((X.node.mode&61440)===16384)throw new De(31);if(!X.m.read)throw new De(28);var me=typeof Ne<"u";if(!me)Ne=X.position;else if(!X.seekable)throw new De(70);var Pe=X.m.read(X,ne,Se,Me,Ne);me||(X.position+=Pe);var $e=Pe;if(0>$e){var Je=-1;break e}if(h+=$e,$e<ce)break;typeof I<"u"&&(I+=$e)}Je=h}return te[w>>2]=Je,0}catch(nt){if(typeof Nr>"u"||nt.name!=="ErrnoError")throw nt;return nt.aa}},fd_seek:function(d,h,v,w,x){h=v+2097152>>>0<4194305-!!h?(h>>>0)+4294967296*v:NaN;try{if(isNaN(h))return 61;var I=ti(d);return ka(I,h,w),Ki=[I.position>>>0,(Qn=I.position,1<=+Math.abs(Qn)?0<Qn?+Math.floor(Qn/4294967296)>>>0:~~+Math.ceil((Qn-+(~~Qn>>>0))/4294967296)>>>0:0)],O[x>>2]=Ki[0],O[x+4>>2]=Ki[1],I.Sa&&h===0&&w===0&&(I.Sa=null),0}catch(B){if(typeof Nr>"u"||B.name!=="ErrnoError")throw B;return B.aa}},fd_write:function(d,h,v,w){try{e:{var x=ti(d);d=h;for(var I,B=h=0;B<v;B++){var K=te[d>>2],ce=te[d+4>>2];d+=8;var X=x,Se=K,Me=ce,Ne=I,ne=pe;if(0>Me||0>Ne)throw new De(28);if(X.X===null)throw new De(8);if((X.flags&2097155)===0)throw new De(8);if((X.node.mode&61440)===16384)throw new De(31);if(!X.m.write)throw new De(28);X.seekable&&X.flags&1024&&ka(X,0,2);var me=typeof Ne<"u";if(!me)Ne=X.position;else if(!X.seekable)throw new De(70);var Pe=X.m.write(X,ne,Se,Me,Ne,void 0);me||(X.position+=Pe);var $e=Pe;if(0>$e){var Je=-1;break e}h+=$e,typeof I<"u"&&(I+=$e)}Je=h}return te[w>>2]=Je,0}catch(nt){if(typeof Nr>"u"||nt.name!=="ErrnoError")throw nt;return nt.aa}},framebufferPixelLocalClearValuefvWEBGL:function(d,h,v,w,x,I){(d=en[d].C.ca)&&d.framebufferPixelLocalClearValuefvWEBGL(h,[v,w,x,I])},framebufferTexturePixelLocalStorageWEBGL:function(d,h,v,w,x){(d=en[d].C.ca)&&d.framebufferTexturePixelLocalStorageWEBGL(h,Ao[v],w,x)},getFramebufferPixelLocalStorageParameterivWEBGL:function(d,h,v){return(d=en[d].C.ca)?d.getFramebufferPixelLocalStorageParameterWEBGL(h,v):0},glActiveTexture:function(d){he.activeTexture(d)},glAttachShader:function(d,h){he.attachShader(cr[d],Br[h])},glBindBuffer:function(d,h){d==35051?he.Pa=h:d==35052&&(he.Qa=h),he.bindBuffer(d,xs[h])},glBindBufferRange:function(d,h,v,w,x){he.bindBufferRange(d,h,xs[v],w,x)},glBindFramebuffer:function(d,h){he.bindFramebuffer(d,Ma[h])},glBindRenderbuffer:function(d,h){he.bindRenderbuffer(d,Es[h])},glBindTexture:function(d,h){he.bindTexture(d,Ao[h])},glBindVertexArray:function(d){he.bindVertexArray(Aa[d])},glBlendEquation:function(d){he.blendEquation(d)},glBlendFunc:function(d,h){he.blendFunc(d,h)},glBlitFramebuffer:function(d,h,v,w,x,I,B,K,ce,X){he.blitFramebuffer(d,h,v,w,x,I,B,K,ce,X)},glBufferData:function(d,h,v,w){v&&h?he.bufferData(d,le,w,v,h):he.bufferData(d,h,w)},glBufferSubData:function(d,h,v,w){v&&he.bufferSubData(d,h,le,w,v)},glClear:function(d){he.clear(d)},glClearBufferfv:function(d,h,v){he.clearBufferfv(d,h,Ve,v>>2)},glClearBufferuiv:function(d,h,v){he.clearBufferuiv(d,h,te,v>>2)},glClearColor:function(d,h,v,w){he.clearColor(d,h,v,w)},glClearDepthf:function(d){he.clearDepth(d)},glClearStencil:function(d){he.clearStencil(d)},glColorMask:function(d,h,v,w){he.colorMask(!!d,!!h,!!v,!!w)},glCompileShader:function(d){he.compileShader(Br[d])},glCreateProgram:function(){var d=Ri(cr),h=he.createProgram();return h.name=d,h.Ba=h.za=h.Aa=0,h.Ya=1,cr[d]=h,d},glCreateShader:function(d){var h=Ri(Br);return Br[h]=he.createShader(d),h},glCullFace:function(d){he.cullFace(d)},glDeleteBuffers:function(d,h){for(var v=0;v<d;v++){var w=O[h+4*v>>2],x=xs[w];x&&(he.deleteBuffer(x),x.name=0,xs[w]=null,w==he.Pa&&(he.Pa=0),w==he.Qa&&(he.Qa=0))}},glDeleteFramebuffers:function(d,h){for(var v=0;v<d;++v){var w=O[h+4*v>>2],x=Ma[w];x&&(he.deleteFramebuffer(x),x.name=0,Ma[w]=null)}},glDeleteProgram:function(d){if(d){var h=cr[d];h?(he.deleteProgram(h),h.name=0,cr[d]=null):tn(1281)}},glDeleteRenderbuffers:function(d,h){for(var v=0;v<d;v++){var w=O[h+4*v>>2],x=Es[w];x&&(he.deleteRenderbuffer(x),x.name=0,Es[w]=null)}},glDeleteShader:function(d){if(d){var h=Br[d];h?(he.deleteShader(h),Br[d]=null):tn(1281)}},glDeleteTextures:function(d,h){for(var v=0;v<d;v++){var w=O[h+4*v>>2],x=Ao[w];x&&(he.deleteTexture(x),x.name=0,Ao[w]=null)}},glDeleteVertexArrays:function(d,h){for(var v=0;v<d;v++){var w=O[h+4*v>>2];he.deleteVertexArray(Aa[w]),Aa[w]=null}},glDepthFunc:function(d){he.depthFunc(d)},glDepthMask:function(d){he.depthMask(!!d)},glDepthRangef:function(d,h){he.depthRange(d,h)},glDisable:function(d){he.disable(d)},glDrawArrays:function(d,h,v){he.drawArrays(d,h,v)},glDrawArraysInstanced:function(d,h,v,w){he.drawArraysInstanced(d,h,v,w)},glDrawBuffers:function(d,h){for(var v=Xl[d],w=0;w<d;w++)v[w]=O[h+4*w>>2];he.drawBuffers(v)},glDrawElements:function(d,h,v,w){he.drawElements(d,h,v,w)},glDrawElementsInstanced:function(d,h,v,w,x){he.drawElementsInstanced(d,h,v,w,x)},glEnable:function(d){he.enable(d)},glEnableVertexAttribArray:function(d){he.enableVertexAttribArray(d)},glFlush:function(){he.flush()},glFramebufferRenderbuffer:function(d,h,v,w){he.framebufferRenderbuffer(d,h,v,Es[w])},glFramebufferTexture2D:function(d,h,v,w,x){he.framebufferTexture2D(d,h,v,Ao[w],x)},glFrontFace:function(d){he.frontFace(d)},glGenBuffers:function(d,h){Oo(d,h,"createBuffer",xs)},glGenFramebuffers:function(d,h){Oo(d,h,"createFramebuffer",Ma)},glGenRenderbuffers:function(d,h){Oo(d,h,"createRenderbuffer",Es)},glGenTextures:function(d,h){Oo(d,h,"createTexture",Ao)},glGenVertexArrays:function(d,h){Oo(d,h,"createVertexArray",Aa)},glGenerateMipmap:function(d){he.generateMipmap(d)},glGetError:function(){var d=he.getError()||Ps;return Ps=0,d},glGetIntegerv:function(d,h){Ju(d,h)},glGetProgramiv:function(d,h,v){if(v)if(d>=$u)tn(1281);else if(d=cr[d],h==35716)d=he.getProgramInfoLog(d),d===null&&(d="(unknown error)"),O[v>>2]=d.length+1;else if(h==35719){if(!d.Ba)for(h=0;h<he.getProgramParameter(d,35718);++h)d.Ba=Math.max(d.Ba,he.getActiveUniform(d,h).name.length+1);O[v>>2]=d.Ba}else if(h==35722){if(!d.za)for(h=0;h<he.getProgramParameter(d,35721);++h)d.za=Math.max(d.za,he.getActiveAttrib(d,h).name.length+1);O[v>>2]=d.za}else if(h==35381){if(!d.Aa)for(h=0;h<he.getProgramParameter(d,35382);++h)d.Aa=Math.max(d.Aa,he.getActiveUniformBlockName(d,h).length+1);O[v>>2]=d.Aa}else O[v>>2]=he.getProgramParameter(d,h);else tn(1281)},glGetShaderiv:function(d,h,v){v?h==35716?(d=he.getShaderInfoLog(Br[d]),d===null&&(d="(unknown error)"),O[v>>2]=d?d.length+1:0):h==35720?(d=he.getShaderSource(Br[d]),O[v>>2]=d?d.length+1:0):O[v>>2]=he.getShaderParameter(Br[d],h):tn(1281)},glGetString:function(d){var h=qu[d];if(!h){switch(d){case 7939:h=he.getSupportedExtensions()||[],h=h.concat(h.map(function(w){return"GL_"+w})),h=Mi(h.join(" "));break;case 7936:case 7937:case 37445:case 37446:(h=he.getParameter(d))||tn(1280),h=h&&Mi(h);break;case 7938:h=Mi("OpenGL ES 3.0 ("+he.getParameter(7938)+")");break;case 35724:h=he.getParameter(35724);var v=h.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);v!==null&&(v[1].length==3&&(v[1]+="0"),h="OpenGL ES GLSL ES "+v[1]+" ("+h+")"),h=Mi(h);break;default:tn(1280)}qu[d]=h}return h},glGetUniformBlockIndex:function(d,h){return he.getUniformBlockIndex(cr[d],h?Le(le,h):"")},glGetUniformLocation:function(d,h){if(h=h?Le(le,h):"",d=cr[d]){var v=d,w=v.oa,x=v.zb,I;if(!w)for(v.oa=w={},v.yb={},I=0;I<he.getProgramParameter(v,35718);++I){var B=he.getActiveUniform(v,I),K=B.name;B=B.size;var ce=Lo(K);ce=0<ce?K.slice(0,ce):K;var X=v.Ya;for(v.Ya+=B,x[ce]=[B,X],K=0;K<B;++K)w[X]=K,v.yb[X++]=ce}if(v=d.oa,w=0,x=h,I=Lo(h),0<I&&(w=parseInt(h.slice(I+1))>>>0,x=h.slice(0,I)),(x=d.zb[x])&&w<x[0]&&(w+=x[1],v[w]=v[w]||he.getUniformLocation(d,h)))return w}else tn(1281);return-1},glInvalidateFramebuffer:function(d,h,v){for(var w=Xl[h],x=0;x<h;x++)w[x]=O[v+4*x>>2];he.invalidateFramebuffer(d,w)},glLinkProgram:function(d){d=cr[d],he.linkProgram(d),d.oa=0,d.zb={}},glPixelStorei:function(d,h){he.pixelStorei(d,h)},glReadPixels:function(d,h,v,w,x,I,B){if(he.Pa)he.readPixels(d,h,v,w,x,I,B);else{var K=Yu(I);he.readPixels(d,h,v,w,x,I,K,B>>31-Math.clz32(K.BYTES_PER_ELEMENT))}},glRenderbufferStorageMultisample:function(d,h,v,w,x){he.renderbufferStorageMultisample(d,h,v,w,x)},glScissor:function(d,h,v,w){he.scissor(d,h,v,w)},glShaderSource:function(d,h,v,w){for(var x="",I=0;I<h;++I){var B=w?O[w+4*I>>2]:-1,K=O[v+4*I>>2];B=K?Le(le,K,0>B?void 0:B):"",x+=B}he.shaderSource(Br[d],x)},glStencilFunc:function(d,h,v){he.stencilFunc(d,h,v)},glStencilFuncSeparate:function(d,h,v,w){he.stencilFuncSeparate(d,h,v,w)},glStencilMask:function(d){he.stencilMask(d)},glStencilOp:function(d,h,v){he.stencilOp(d,h,v)},glStencilOpSeparate:function(d,h,v,w){he.stencilOpSeparate(d,h,v,w)},glTexParameteri:function(d,h,v){he.texParameteri(d,h,v)},glTexStorage2D:function(d,h,v,w,x){he.texStorage2D(d,h,v,w,x)},glTexSubImage2D:function(d,h,v,w,x,I,B,K,ce){if(he.Qa)he.texSubImage2D(d,h,v,w,x,I,B,K,ce);else if(ce){var X=Yu(K);he.texSubImage2D(d,h,v,w,x,I,B,K,X,ce>>31-Math.clz32(X.BYTES_PER_ELEMENT))}else he.texSubImage2D(d,h,v,w,x,I,B,K,null)},glUniform1i:function(d,h){var v=he,w=v.uniform1i,x=he.Kb;if(x){var I=x.oa[d];typeof I=="number"&&(x.oa[d]=I=he.getUniformLocation(x,x.yb[d]+(0<I?"["+I+"]":""))),d=I}else tn(1282),d=void 0;w.call(v,d,h)},glUniformBlockBinding:function(d,h,v){d=cr[d],he.uniformBlockBinding(d,h,v)},glUseProgram:function(d){d=cr[d],he.useProgram(d),he.Kb=d},glVertexAttribDivisor:function(d,h){he.vertexAttribDivisor(d,h)},glVertexAttribIPointer:function(d,h,v,w,x){he.vertexAttribIPointer(d,h,v,w,x)},glVertexAttribPointer:function(d,h,v,w,x,I){he.vertexAttribPointer(d,h,v,!!w,x,I)},glViewport:function(d,h,v,w){he.viewport(d,h,v,w)},provokingVertexWEBGL:function(d,h){(d=en[d].C.rb)&&d.provokingVertexWEBGL(h)},strftime_l:(d,h,v,w)=>ec(d,h,v,w),upload_image:function(d,h){var v=T.images;v&&(h=v.get(h))&&(d=en[d].C,d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,h),d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1))}};(function(){function d(v){if(oe=v=v.exports,We=oe.memory,Xe(),Fe=oe.__indirect_function_table,qe.unshift(oe.__wasm_call_ctors),Jt--,T.monitorRunDependencies&&T.monitorRunDependencies(Jt),Jt==0&&ar){var w=ar;ar=null,w()}return v}var h={env:Xu,wasi_snapshot_preview1:Xu};if(Jt++,T.monitorRunDependencies&&T.monitorRunDependencies(Jt),T.instantiateWasm)try{return T.instantiateWasm(h,d)}catch(v){fe("Module.instantiateWasm callback failed with error: "+v),A(v)}return Gi(h,function(v){d(v.instance)}).catch(A),{}})();var ai=d=>(ai=oe.free)(d),Da=d=>(Da=oe.malloc)(d);T._setWebImage=(d,h,v)=>(T._setWebImage=oe.setWebImage)(d,h,v);var Zu=()=>(Zu=oe.__errno_location)(),ur=T._ma_device__on_notification_unlocked=d=>(ur=T._ma_device__on_notification_unlocked=oe.ma_device__on_notification_unlocked)(d);T._ma_malloc_emscripten=(d,h)=>(T._ma_malloc_emscripten=oe.ma_malloc_emscripten)(d,h),T._ma_free_emscripten=(d,h)=>(T._ma_free_emscripten=oe.ma_free_emscripten)(d,h);var Do=T._ma_device_process_pcm_frames_capture__webaudio=(d,h,v)=>(Do=T._ma_device_process_pcm_frames_capture__webaudio=oe.ma_device_process_pcm_frames_capture__webaudio)(d,h,v),rc=T._ma_device_process_pcm_frames_playback__webaudio=(d,h,v)=>(rc=T._ma_device_process_pcm_frames_playback__webaudio=oe.ma_device_process_pcm_frames_playback__webaudio)(d,h,v),ic=d=>(ic=oe.__getTypeName)(d);T.__embind_initialize_bindings=()=>(T.__embind_initialize_bindings=oe._embind_initialize_bindings)(),T.dynCall_iiiji=(d,h,v,w,x,I)=>(T.dynCall_iiiji=oe.dynCall_iiiji)(d,h,v,w,x,I),T.dynCall_iij=(d,h,v,w)=>(T.dynCall_iij=oe.dynCall_iij)(d,h,v,w),T.dynCall_iiji=(d,h,v,w,x)=>(T.dynCall_iiji=oe.dynCall_iiji)(d,h,v,w,x),T.dynCall_jii=(d,h,v)=>(T.dynCall_jii=oe.dynCall_jii)(d,h,v),T.dynCall_vijj=(d,h,v,w,x,I)=>(T.dynCall_vijj=oe.dynCall_vijj)(d,h,v,w,x,I),T.dynCall_jiji=(d,h,v,w,x)=>(T.dynCall_jiji=oe.dynCall_jiji)(d,h,v,w,x),T.dynCall_viijii=(d,h,v,w,x,I,B)=>(T.dynCall_viijii=oe.dynCall_viijii)(d,h,v,w,x,I,B),T.dynCall_iiiiij=(d,h,v,w,x,I,B)=>(T.dynCall_iiiiij=oe.dynCall_iiiiij)(d,h,v,w,x,I,B),T.dynCall_iiiiijj=(d,h,v,w,x,I,B,K,ce)=>(T.dynCall_iiiiijj=oe.dynCall_iiiiijj)(d,h,v,w,x,I,B,K,ce),T.dynCall_iiiiiijj=(d,h,v,w,x,I,B,K,ce,X)=>(T.dynCall_iiiiiijj=oe.dynCall_iiiiiijj)(d,h,v,w,x,I,B,K,ce,X),T.___start_em_js=531476,T.___stop_em_js=534231;var Is;ar=function d(){Is||oc(),Is||(ar=d)};function oc(){function d(){if(!Is&&(Is=!0,T.calledRun=!0,!Ie)){if(T.noFSInit||us||(us=!0,Ul(),T.stdin=T.stdin,T.stdout=T.stdout,T.stderr=T.stderr,T.stdin?ds("stdin",T.stdin):Fl("/dev/tty","/dev/stdin"),T.stdout?ds("stdout",null,T.stdout):Fl("/dev/tty","/dev/stdout"),T.stderr?ds("stderr",null,T.stderr):Fl("/dev/tty1","/dev/stderr"),ba("/dev/stdin",0),ba("/dev/stdout",1),ba("/dev/stderr",1)),ma=!1,P(qe),N(T),T.onRuntimeInitialized&&T.onRuntimeInitialized(),T.postRun)for(typeof T.postRun=="function"&&(T.postRun=[T.postRun]);T.postRun.length;){var h=T.postRun.shift();pt.unshift(h)}P(pt)}}if(!(0<Jt)){if(T.preRun)for(typeof T.preRun=="function"&&(T.preRun=[T.preRun]);T.preRun.length;)Lt();P(tt),0<Jt||(T.setStatus?(T.setStatus("Running..."),setTimeout(function(){setTimeout(function(){T.setStatus("")},1),d()},1)):d())}}if(T.preInit)for(typeof T.preInit=="function"&&(T.preInit=[T.preInit]);0<T.preInit.length;)T.preInit.pop()();return oc(),_.ready}})();const g=p},l=>{l.exports=JSON.parse(`{"name":"@rive-app/webgl2","version":"2.31.5","description":"Rive's webgl2 based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)","Chris Dalton <chris@rive.app> (https://rive.app)"],"license":"MIT","files":["rive.js","rive.wasm","rive.js.map","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}`)},(l,u,f)=>{f.r(u),f.d(u,{Animation:()=>p.Animation});var p=f(4)},(l,u,f)=>{f.r(u),f.d(u,{Animation:()=>p});var p=function(){function g(C,_,T,N){this.animation=C,this.artboard=_,this.playing=N,this.loopCount=0,this.scrubTo=null,this.instance=new T.LinearAnimationInstance(C,_)}return Object.defineProperty(g.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"time",{get:function(){return this.instance.time},set:function(C){this.instance.time=C},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),g.prototype.advance=function(C){this.scrubTo===null?this.instance.advance(C):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},g.prototype.apply=function(C){this.instance.apply(C)},g.prototype.cleanup=function(){this.instance.delete()},g}()},(l,u,f)=>{f.r(u),f.d(u,{AudioAssetWrapper:()=>C.AudioAssetWrapper,AudioWrapper:()=>C.AudioWrapper,BLANK_URL:()=>g.BLANK_URL,CustomFileAssetLoaderWrapper:()=>C.CustomFileAssetLoaderWrapper,FileAssetWrapper:()=>C.FileAssetWrapper,FileFinalizer:()=>C.FileFinalizer,FontAssetWrapper:()=>C.FontAssetWrapper,FontWrapper:()=>C.FontWrapper,ImageAssetWrapper:()=>C.ImageAssetWrapper,ImageWrapper:()=>C.ImageWrapper,createFinalization:()=>C.createFinalization,finalizationRegistry:()=>C.finalizationRegistry,registerTouchInteractions:()=>p.registerTouchInteractions,sanitizeUrl:()=>g.sanitizeUrl});var p=f(6),g=f(7),C=f(8)},(l,u,f)=>{f.r(u),f.d(u,{registerTouchInteractions:()=>C});var p=void 0,g=function(_,T){var N,A;return["touchstart","touchmove"].indexOf(_.type)>-1&&(!((N=_.touches)===null||N===void 0)&&N.length)?(T||_.preventDefault(),{clientX:_.touches[0].clientX,clientY:_.touches[0].clientY}):_.type==="touchend"&&(!((A=_.changedTouches)===null||A===void 0)&&A.length)?{clientX:_.changedTouches[0].clientX,clientY:_.changedTouches[0].clientY}:{clientX:_.clientX,clientY:_.clientY}},C=function(_){var T=_.canvas,N=_.artboard,A=_.stateMachines,H=A===void 0?[]:A,z=_.renderer,ee=_.rive,U=_.fit,L=_.alignment,F=_.isTouchScrollEnabled,G=F===void 0?!1:F,se=_.layoutScaleFactor,Q=se===void 0?1:se;if(!T||!H.length||!z||!ee||!N||typeof window>"u")return null;var $=null,q=!1,Y=function(Re){if(q&&Re instanceof MouseEvent){Re.type=="mouseup"&&(q=!1);return}q=G&&Re.type==="touchend"&&$==="touchstart",$=Re.type;var We=Re.currentTarget.getBoundingClientRect(),oe=g(Re,G),Ie=oe.clientX,pe=oe.clientY;if(!(!Ie&&!pe)){var le=Ie-We.left,_e=pe-We.top,de=ee.computeAlignment(U,L,{minX:0,minY:0,maxX:We.width,maxY:We.height},N.bounds,Q),O=new ee.Mat2D;de.invert(O);var te=new ee.Vec2D(le,_e),Ve=ee.mapXY(O,te),Ke=Ve.x(),Xe=Ve.y();switch(Ve.delete(),O.delete(),te.delete(),de.delete(),Re.type){case"mouseout":for(var Fe=0,tt=H;Fe<tt.length;Fe++){var qe=tt[Fe];qe.pointerMove(Ke,Xe)}break;case"touchmove":case"mouseover":case"mousemove":{for(var pt=0,Lt=H;pt<Lt.length;pt++){var qe=Lt[pt];qe.pointerMove(Ke,Xe)}break}case"touchstart":case"mousedown":{for(var Jt=0,ar=H;Jt<ar.length;Jt++){var qe=ar[Jt];qe.pointerDown(Ke,Xe)}break}case"touchend":case"mouseup":{for(var Tn=0,Ar=H;Tn<Ar.length;Tn++){var qe=Ar[Tn];qe.pointerUp(Ke,Xe)}break}}}},fe=Y.bind(p);return T.addEventListener("mouseover",fe),T.addEventListener("mouseout",fe),T.addEventListener("mousemove",fe),T.addEventListener("mousedown",fe),T.addEventListener("mouseup",fe),T.addEventListener("touchmove",fe,{passive:G}),T.addEventListener("touchstart",fe,{passive:G}),T.addEventListener("touchend",fe),function(){T.removeEventListener("mouseover",fe),T.removeEventListener("mouseout",fe),T.removeEventListener("mousemove",fe),T.removeEventListener("mousedown",fe),T.removeEventListener("mouseup",fe),T.removeEventListener("touchmove",fe),T.removeEventListener("touchstart",fe),T.removeEventListener("touchend",fe)}}},(l,u,f)=>{f.r(u),f.d(u,{BLANK_URL:()=>A,sanitizeUrl:()=>ee});var p=/^([^\w]*)(javascript|data|vbscript)/im,g=/&#(\w+)(^\w|;)?/g,C=/&(newline|tab);/gi,_=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,T=/^.+(:|&colon;)/gim,N=[".","/"],A="about:blank";function H(U){return N.indexOf(U[0])>-1}function z(U){var L=U.replace(_,"");return L.replace(g,function(F,G){return String.fromCharCode(G)})}function ee(U){if(!U)return A;var L=z(U).replace(C,"").replace(_,"").trim();if(!L)return A;if(H(L))return L;var F=L.match(T);if(!F)return L;var G=F[0];return p.test(G)?A:L}},(l,u,f)=>{f.r(u),f.d(u,{AudioAssetWrapper:()=>U,AudioWrapper:()=>N,CustomFileAssetLoaderWrapper:()=>H,FileAssetWrapper:()=>z,FileFinalizer:()=>g,FontAssetWrapper:()=>L,FontWrapper:()=>A,ImageAssetWrapper:()=>ee,ImageWrapper:()=>T,createFinalization:()=>Q,finalizationRegistry:()=>se});var p=function(){var $=function(q,Y){return $=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,Re){fe.__proto__=Re}||function(fe,Re){for(var We in Re)Object.prototype.hasOwnProperty.call(Re,We)&&(fe[We]=Re[We])},$(q,Y)};return function(q,Y){if(typeof Y!="function"&&Y!==null)throw new TypeError("Class extends value "+String(Y)+" is not a constructor or null");$(q,Y);function fe(){this.constructor=q}q.prototype=Y===null?Object.create(Y):(fe.prototype=Y.prototype,new fe)}}(),g=function(){function $(q){this.selfUnref=!1,this._file=q}return $.prototype.unref=function(){this._file&&this._file.unref()},$}(),C=function(){function $(q){this._finalizableObject=q}return $.prototype.unref=function(){this._finalizableObject.unref()},$}(),_=function(){function $(){this.selfUnref=!1}return $.prototype.unref=function(){},$}(),T=function($){p(q,$);function q(Y){var fe=$.call(this)||this;return fe._nativeImage=Y,fe}return Object.defineProperty(q.prototype,"nativeImage",{get:function(){return this._nativeImage},enumerable:!1,configurable:!0}),q.prototype.unref=function(){this.selfUnref&&this._nativeImage.unref()},q}(_),N=function($){p(q,$);function q(Y){var fe=$.call(this)||this;return fe._nativeAudio=Y,fe}return Object.defineProperty(q.prototype,"nativeAudio",{get:function(){return this._nativeAudio},enumerable:!1,configurable:!0}),q.prototype.unref=function(){this.selfUnref&&this._nativeAudio.unref()},q}(_),A=function($){p(q,$);function q(Y){var fe=$.call(this)||this;return fe._nativeFont=Y,fe}return Object.defineProperty(q.prototype,"nativeFont",{get:function(){return this._nativeFont},enumerable:!1,configurable:!0}),q.prototype.unref=function(){this.selfUnref&&this._nativeFont.unref()},q}(_),H=function(){function $(q,Y){this._assetLoaderCallback=Y,this.assetLoader=new q.CustomFileAssetLoader({loadContents:this.loadContents.bind(this)})}return $.prototype.loadContents=function(q,Y){var fe;return q.isImage?fe=new ee(q):q.isAudio?fe=new U(q):q.isFont&&(fe=new L(q)),this._assetLoaderCallback(fe,Y)},$}(),z=function(){function $(q){this._nativeFileAsset=q}return $.prototype.decode=function(q){this._nativeFileAsset.decode(q)},Object.defineProperty($.prototype,"name",{get:function(){return this._nativeFileAsset.name},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"fileExtension",{get:function(){return this._nativeFileAsset.fileExtension},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"uniqueFilename",{get:function(){return this._nativeFileAsset.uniqueFilename},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isAudio",{get:function(){return this._nativeFileAsset.isAudio},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isImage",{get:function(){return this._nativeFileAsset.isImage},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isFont",{get:function(){return this._nativeFileAsset.isFont},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"cdnUuid",{get:function(){return this._nativeFileAsset.cdnUuid},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"nativeFileAsset",{get:function(){return this._nativeFileAsset},enumerable:!1,configurable:!0}),$}(),ee=function($){p(q,$);function q(){return $!==null&&$.apply(this,arguments)||this}return q.prototype.setRenderImage=function(Y){this._nativeFileAsset.setRenderImage(Y.nativeImage)},q}(z),U=function($){p(q,$);function q(){return $!==null&&$.apply(this,arguments)||this}return q.prototype.setAudioSource=function(Y){this._nativeFileAsset.setAudioSource(Y.nativeAudio)},q}(z),L=function($){p(q,$);function q(){return $!==null&&$.apply(this,arguments)||this}return q.prototype.setFont=function(Y){this._nativeFileAsset.setFont(Y.nativeFont)},q}(z),F=function(){function $(q){}return $.prototype.register=function(q){q.selfUnref=!0},$.prototype.unregister=function(q){},$}(),G=typeof FinalizationRegistry<"u"?FinalizationRegistry:F,se=new G(function($){$==null||$.unref()}),Q=function($,q){var Y=new C(q);se.register($,Y)}}],r={};function o(l){var u=r[l];if(u!==void 0)return u.exports;var f=r[l]={exports:{}};return t[l](f,f.exports,o),f.exports}o.d=(l,u)=>{for(var f in u)o.o(u,f)&&!o.o(l,f)&&Object.defineProperty(l,f,{enumerable:!0,get:u[f]})},o.o=(l,u)=>Object.prototype.hasOwnProperty.call(l,u),o.r=l=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var a={};return(()=>{o.r(a),o.d(a,{Alignment:()=>ee,DataEnum:()=>Xe,EventType:()=>Y,Fit:()=>z,Layout:()=>U,LoopType:()=>fe,Rive:()=>Ve,RiveEventType:()=>se,RiveFile:()=>te,RuntimeLoader:()=>L,StateMachineInput:()=>G,StateMachineInputType:()=>F,Testing:()=>Gi,ViewModel:()=>Ke,ViewModelInstance:()=>tt,ViewModelInstanceArtboard:()=>qi,ViewModelInstanceAssetImage:()=>xo,ViewModelInstanceBoolean:()=>Jt,ViewModelInstanceColor:()=>Or,ViewModelInstanceEnum:()=>Tn,ViewModelInstanceList:()=>Ar,ViewModelInstanceNumber:()=>Lt,ViewModelInstanceString:()=>pt,ViewModelInstanceTrigger:()=>ar,ViewModelInstanceValue:()=>qe,decodeAudio:()=>Qn,decodeFont:()=>pa,decodeImage:()=>Ki});var l=o(1),u=o(2),f=o(3),p=o(5),g=function(){var P=function(y,S){return P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,J){M.__proto__=J}||function(M,J){for(var ue in J)Object.prototype.hasOwnProperty.call(J,ue)&&(M[ue]=J[ue])},P(y,S)};return function(y,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");P(y,S);function M(){this.constructor=y}y.prototype=S===null?Object.create(S):(M.prototype=S.prototype,new M)}}(),C=function(){return C=Object.assign||function(P){for(var y,S=1,M=arguments.length;S<M;S++){y=arguments[S];for(var J in y)Object.prototype.hasOwnProperty.call(y,J)&&(P[J]=y[J])}return P},C.apply(this,arguments)},_=function(P,y,S,M){function J(ue){return ue instanceof S?ue:new S(function(be){be(ue)})}return new(S||(S=Promise))(function(ue,be){function Ge(at){try{Le(M.next(at))}catch(Pt){be(Pt)}}function it(at){try{Le(M.throw(at))}catch(Pt){be(Pt)}}function Le(at){at.done?ue(at.value):J(at.value).then(Ge,it)}Le((M=M.apply(P,y||[])).next())})},T=function(P,y){var S={label:0,sent:function(){if(ue[0]&1)throw ue[1];return ue[1]},trys:[],ops:[]},M,J,ue,be=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return be.next=Ge(0),be.throw=Ge(1),be.return=Ge(2),typeof Symbol=="function"&&(be[Symbol.iterator]=function(){return this}),be;function Ge(Le){return function(at){return it([Le,at])}}function it(Le){if(M)throw new TypeError("Generator is already executing.");for(;be&&(be=0,Le[0]&&(S=0)),S;)try{if(M=1,J&&(ue=Le[0]&2?J.return:Le[0]?J.throw||((ue=J.return)&&ue.call(J),0):J.next)&&!(ue=ue.call(J,Le[1])).done)return ue;switch(J=0,ue&&(Le=[Le[0]&2,ue.value]),Le[0]){case 0:case 1:ue=Le;break;case 4:return S.label++,{value:Le[1],done:!1};case 5:S.label++,J=Le[1],Le=[0];continue;case 7:Le=S.ops.pop(),S.trys.pop();continue;default:if(ue=S.trys,!(ue=ue.length>0&&ue[ue.length-1])&&(Le[0]===6||Le[0]===2)){S=0;continue}if(Le[0]===3&&(!ue||Le[1]>ue[0]&&Le[1]<ue[3])){S.label=Le[1];break}if(Le[0]===6&&S.label<ue[1]){S.label=ue[1],ue=Le;break}if(ue&&S.label<ue[2]){S.label=ue[2],S.ops.push(Le);break}ue[2]&&S.ops.pop(),S.trys.pop();continue}Le=y.call(P,S)}catch(at){Le=[6,at],J=0}finally{M=ue=0}if(Le[0]&5)throw Le[1];return{value:Le[0]?Le[1]:void 0,done:!0}}},N=function(P,y,S){if(S||arguments.length===2)for(var M=0,J=y.length,ue;M<J;M++)(ue||!(M in y))&&(ue||(ue=Array.prototype.slice.call(y,0,M)),ue[M]=y[M]);return P.concat(ue||Array.prototype.slice.call(y))},A=function(P){g(y,P);function y(){var S=P!==null&&P.apply(this,arguments)||this;return S.isHandledError=!0,S}return y}(Error),H=function(P){return P&&P.isHandledError?P.message:"Problem loading file; may be corrupt!"},z;(function(P){P.Cover="cover",P.Contain="contain",P.Fill="fill",P.FitWidth="fitWidth",P.FitHeight="fitHeight",P.None="none",P.ScaleDown="scaleDown",P.Layout="layout"})(z||(z={}));var ee;(function(P){P.Center="center",P.TopLeft="topLeft",P.TopCenter="topCenter",P.TopRight="topRight",P.CenterLeft="centerLeft",P.CenterRight="centerRight",P.BottomLeft="bottomLeft",P.BottomCenter="bottomCenter",P.BottomRight="bottomRight"})(ee||(ee={}));var U=function(){function P(y){var S,M,J,ue,be,Ge,it;this.fit=(S=y==null?void 0:y.fit)!==null&&S!==void 0?S:z.Contain,this.alignment=(M=y==null?void 0:y.alignment)!==null&&M!==void 0?M:ee.Center,this.layoutScaleFactor=(J=y==null?void 0:y.layoutScaleFactor)!==null&&J!==void 0?J:1,this.minX=(ue=y==null?void 0:y.minX)!==null&&ue!==void 0?ue:0,this.minY=(be=y==null?void 0:y.minY)!==null&&be!==void 0?be:0,this.maxX=(Ge=y==null?void 0:y.maxX)!==null&&Ge!==void 0?Ge:0,this.maxY=(it=y==null?void 0:y.maxY)!==null&&it!==void 0?it:0}return P.new=function(y){var S=y.fit,M=y.alignment,J=y.minX,ue=y.minY,be=y.maxX,Ge=y.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new P({fit:S,alignment:M,minX:J,minY:ue,maxX:be,maxY:Ge})},P.prototype.copyWith=function(y){var S=y.fit,M=y.alignment,J=y.layoutScaleFactor,ue=y.minX,be=y.minY,Ge=y.maxX,it=y.maxY;return new P({fit:S??this.fit,alignment:M??this.alignment,layoutScaleFactor:J??this.layoutScaleFactor,minX:ue??this.minX,minY:be??this.minY,maxX:Ge??this.maxX,maxY:it??this.maxY})},P.prototype.runtimeFit=function(y){if(this.cachedRuntimeFit)return this.cachedRuntimeFit;var S;return this.fit===z.Cover?S=y.Fit.cover:this.fit===z.Contain?S=y.Fit.contain:this.fit===z.Fill?S=y.Fit.fill:this.fit===z.FitWidth?S=y.Fit.fitWidth:this.fit===z.FitHeight?S=y.Fit.fitHeight:this.fit===z.ScaleDown?S=y.Fit.scaleDown:this.fit===z.Layout?S=y.Fit.layout:S=y.Fit.none,this.cachedRuntimeFit=S,S},P.prototype.runtimeAlignment=function(y){if(this.cachedRuntimeAlignment)return this.cachedRuntimeAlignment;var S;return this.alignment===ee.TopLeft?S=y.Alignment.topLeft:this.alignment===ee.TopCenter?S=y.Alignment.topCenter:this.alignment===ee.TopRight?S=y.Alignment.topRight:this.alignment===ee.CenterLeft?S=y.Alignment.centerLeft:this.alignment===ee.CenterRight?S=y.Alignment.centerRight:this.alignment===ee.BottomLeft?S=y.Alignment.bottomLeft:this.alignment===ee.BottomCenter?S=y.Alignment.bottomCenter:this.alignment===ee.BottomRight?S=y.Alignment.bottomRight:S=y.Alignment.center,this.cachedRuntimeAlignment=S,S},P}(),L=function(){function P(){}return P.loadRuntime=function(){l.default({locateFile:function(){return P.wasmURL}}).then(function(y){var S;for(P.runtime=y;P.callBackQueue.length>0;)(S=P.callBackQueue.shift())===null||S===void 0||S(P.runtime)}).catch(function(y){var S={message:(y==null?void 0:y.message)||"Unknown error",type:(y==null?void 0:y.name)||"Error",wasmError:y instanceof WebAssembly.CompileError||y instanceof WebAssembly.RuntimeError,originalError:y};console.debug("Rive WASM load error details:",S);var M="https://cdn.jsdelivr.net/npm/".concat(u.name,"@").concat(u.version,"/rive_fallback.wasm");if(P.wasmURL.toLowerCase()!==M)console.warn("Failed to load WASM from ".concat(P.wasmURL," (").concat(S.message,"), trying jsdelivr as a backup")),P.setWasmUrl(M),P.loadRuntime();else{var J=["Could not load Rive WASM file from ".concat(P.wasmURL," or ").concat(M,"."),"Possible reasons:","- Network connection is down","- WebAssembly is not supported in this environment","- The WASM file is corrupted or incompatible",`
164
164
  Error details:`,"- Type: ".concat(S.type),"- Message: ".concat(S.message),"- WebAssembly-specific error: ".concat(S.wasmError),`
165
165
  To resolve, you may need to:`,"1. Check your network connection","2. Set a new WASM source via RuntimeLoader.setWasmUrl()","3. Call RuntimeLoader.loadRuntime() again"].join(`
166
- `);console.error(J)}})},P.getInstance=function(y){P.isLoading||(P.isLoading=!0,P.loadRuntime()),P.runtime?y(P.runtime):P.callBackQueue.push(y)},P.awaitInstance=function(){return new Promise(function(y){return P.getInstance(function(S){return y(S)})})},P.setWasmUrl=function(y){P.wasmURL=y},P.getWasmUrl=function(){return P.wasmURL},P.isLoading=!1,P.callBackQueue=[],P.wasmURL="https://unpkg.com/".concat(u.name,"@").concat(u.version,"/rive.wasm"),P}(),F;(function(P){P[P.Number=56]="Number",P[P.Trigger=58]="Trigger",P[P.Boolean=59]="Boolean"})(F||(F={}));var G=function(){function P(y,S){this.type=y,this.runtimeInput=S}return Object.defineProperty(P.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(y){this.runtimeInput.value=y},enumerable:!1,configurable:!0}),P.prototype.fire=function(){this.type===F.Trigger&&this.runtimeInput.fire()},P.prototype.delete=function(){this.runtimeInput=null},P}(),se;(function(P){P[P.General=128]="General",P[P.OpenUrl=131]="OpenUrl"})(se||(se={}));var Q=function(){function P(y){this.nativeArtboard=y}return P}(),$=function(){function P(y,S,M,J){this.stateMachine=y,this.playing=M,this.artboard=J,this.inputs=[],this.instance=new S.StateMachineInstance(y,J),this.initInputs(S)}return Object.defineProperty(P.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"statesChanged",{get:function(){for(var y=[],S=0;S<this.instance.stateChangedCount();S++)y.push(this.instance.stateChangedNameByIndex(S));return y},enumerable:!1,configurable:!0}),P.prototype.advance=function(y){this.instance.advance(y)},P.prototype.advanceAndApply=function(y){this.instance.advanceAndApply(y)},P.prototype.reportedEventCount=function(){return this.instance.reportedEventCount()},P.prototype.reportedEventAt=function(y){return this.instance.reportedEventAt(y)},P.prototype.initInputs=function(y){for(var S=0;S<this.instance.inputCount();S++){var M=this.instance.input(S);this.inputs.push(this.mapRuntimeInput(M,y))}},P.prototype.mapRuntimeInput=function(y,S){if(y.type===S.SMIInput.bool)return new G(F.Boolean,y.asBool());if(y.type===S.SMIInput.number)return new G(F.Number,y.asNumber());if(y.type===S.SMIInput.trigger)return new G(F.Trigger,y.asTrigger())},P.prototype.cleanup=function(){this.inputs.forEach(function(y){y.delete()}),this.inputs.length=0,this.instance.delete()},P.prototype.bindViewModelInstance=function(y){y.runtimeInstance!=null&&this.instance.bindViewModelInstance(y.runtimeInstance)},P}(),q=function(){function P(y,S,M,J,ue){J===void 0&&(J=[]),ue===void 0&&(ue=[]),this.runtime=y,this.artboard=S,this.eventManager=M,this.animations=J,this.stateMachines=ue}return P.prototype.add=function(y,S,M){if(M===void 0&&(M=!0),y=_n(y),y.length===0)this.animations.forEach(function(Rt){return Rt.playing=S}),this.stateMachines.forEach(function(Rt){return Rt.playing=S});else for(var J=this.animations.map(function(Rt){return Rt.name}),ue=this.stateMachines.map(function(Rt){return Rt.name}),be=0;be<y.length;be++){var Ge=J.indexOf(y[be]),it=ue.indexOf(y[be]);if(Ge>=0||it>=0)Ge>=0?this.animations[Ge].playing=S:this.stateMachines[it].playing=S;else{var Le=this.artboard.animationByName(y[be]);if(Le){var at=new f.Animation(Le,this.artboard,this.runtime,S);at.advance(0),at.apply(1),this.animations.push(at)}else{var Pt=this.artboard.stateMachineByName(y[be]);if(Pt){var Yt=new $(Pt,this.runtime,S,this.artboard);this.stateMachines.push(Yt)}}}}return M&&(S?this.eventManager.fire({type:Y.Play,data:this.playing}):this.eventManager.fire({type:Y.Pause,data:this.paused})),S?this.playing:this.paused},P.prototype.initLinearAnimations=function(y,S){for(var M=this.animations.map(function(it){return it.name}),J=0;J<y.length;J++){var ue=M.indexOf(y[J]);if(ue>=0)this.animations[ue].playing=S;else{var be=this.artboard.animationByName(y[J]);if(be){var Ge=new f.Animation(be,this.artboard,this.runtime,S);Ge.advance(0),Ge.apply(1),this.animations.push(Ge)}else console.error("Animation with name ".concat(y[J]," not found."))}}},P.prototype.initStateMachines=function(y,S){for(var M=this.stateMachines.map(function(it){return it.name}),J=0;J<y.length;J++){var ue=M.indexOf(y[J]);if(ue>=0)this.stateMachines[ue].playing=S;else{var be=this.artboard.stateMachineByName(y[J]);if(be){var Ge=new $(be,this.runtime,S,this.artboard);this.stateMachines.push(Ge)}else console.warn("State Machine with name ".concat(y[J]," not found.")),this.initLinearAnimations([y[J]],S)}}},P.prototype.play=function(y){return this.add(y,!0)},P.prototype.advanceIfPaused=function(){this.stateMachines.forEach(function(y){y.playing||y.advanceAndApply(0)})},P.prototype.pause=function(y){return this.add(y,!1)},P.prototype.scrub=function(y,S){var M=this.animations.filter(function(J){return y.includes(J.name)});return M.forEach(function(J){return J.scrubTo=S}),M.map(function(J){return J.name})},Object.defineProperty(P.prototype,"playing",{get:function(){return this.animations.filter(function(y){return y.playing}).map(function(y){return y.name}).concat(this.stateMachines.filter(function(y){return y.playing}).map(function(y){return y.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"paused",{get:function(){return this.animations.filter(function(y){return!y.playing}).map(function(y){return y.name}).concat(this.stateMachines.filter(function(y){return!y.playing}).map(function(y){return y.name}))},enumerable:!1,configurable:!0}),P.prototype.stop=function(y){var S=this;y=_n(y);var M=[];if(y.length===0)M=this.animations.map(function(be){return be.name}).concat(this.stateMachines.map(function(be){return be.name})),this.animations.forEach(function(be){return be.cleanup()}),this.stateMachines.forEach(function(be){return be.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var J=this.animations.filter(function(be){return y.includes(be.name)});J.forEach(function(be){be.cleanup(),S.animations.splice(S.animations.indexOf(be),1)});var ue=this.stateMachines.filter(function(be){return y.includes(be.name)});ue.forEach(function(be){be.cleanup(),S.stateMachines.splice(S.stateMachines.indexOf(be),1)}),M=J.map(function(be){return be.name}).concat(ue.map(function(be){return be.name}))}return this.eventManager.fire({type:Y.Stop,data:M}),M},Object.defineProperty(P.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(y,S){return y||S.playing},!1)||this.stateMachines.reduce(function(y,S){return y||S.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),P.prototype.atLeastOne=function(y,S){S===void 0&&(S=!0);var M;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([M=this.artboard.animationByIndex(0).name],y,S):this.artboard.stateMachineCount()>0&&this.add([M=this.artboard.stateMachineByIndex(0).name],y,S)),M},P.prototype.handleLooping=function(){for(var y=0,S=this.animations.filter(function(J){return J.playing});y<S.length;y++){var M=S[y];M.loopValue===0&&M.loopCount?(M.loopCount=0,this.stop(M.name)):M.loopValue===1&&M.loopCount?(this.eventManager.fire({type:Y.Loop,data:{animation:M.name,type:fe.Loop}}),M.loopCount=0):M.loopValue===2&&M.loopCount>1&&(this.eventManager.fire({type:Y.Loop,data:{animation:M.name,type:fe.PingPong}}),M.loopCount=0)}},P.prototype.handleStateChanges=function(){for(var y=[],S=0,M=this.stateMachines.filter(function(ue){return ue.playing});S<M.length;S++){var J=M[S];y.push.apply(y,J.statesChanged)}y.length>0&&this.eventManager.fire({type:Y.StateChange,data:y})},P.prototype.handleAdvancing=function(y){this.eventManager.fire({type:Y.Advance,data:y})},P}(),Y;(function(P){P.Load="load",P.LoadError="loaderror",P.Play="play",P.Pause="pause",P.Stop="stop",P.Loop="loop",P.Draw="draw",P.Advance="advance",P.StateChange="statechange",P.RiveEvent="riveevent",P.AudioStatusChange="audiostatuschange"})(Y||(Y={}));var fe;(function(P){P.OneShot="oneshot",P.Loop="loop",P.PingPong="pingpong"})(fe||(fe={}));var Re=function(){function P(y){y===void 0&&(y=[]),this.listeners=y}return P.prototype.getListeners=function(y){return this.listeners.filter(function(S){return S.type===y})},P.prototype.add=function(y){this.listeners.includes(y)||this.listeners.push(y)},P.prototype.remove=function(y){for(var S=0;S<this.listeners.length;S++){var M=this.listeners[S];if(M.type===y.type&&M.callback===y.callback){this.listeners.splice(S,1);break}}},P.prototype.removeAll=function(y){var S=this;y?this.listeners.filter(function(M){return M.type===y}).forEach(function(M){return S.remove(M)}):this.listeners.splice(0,this.listeners.length)},P.prototype.fire=function(y){var S=this.getListeners(y.type);S.forEach(function(M){return M.callback(y)})},P}(),We=function(){function P(y){this.eventManager=y,this.queue=[]}return P.prototype.add=function(y){this.queue.push(y)},P.prototype.process=function(){for(;this.queue.length>0;){var y=this.queue.shift();y!=null&&y.action&&y.action(),y!=null&&y.event&&this.eventManager.fire(y.event)}},P}(),oe;(function(P){P[P.AVAILABLE=0]="AVAILABLE",P[P.UNAVAILABLE=1]="UNAVAILABLE"})(oe||(oe={}));var Ie=function(P){g(y,P);function y(){var S=P!==null&&P.apply(this,arguments)||this;return S._started=!1,S._enabled=!1,S._status=oe.UNAVAILABLE,S}return y.prototype.delay=function(S){return _(this,void 0,void 0,function(){return T(this,function(M){return[2,new Promise(function(J){return setTimeout(J,S)})]})})},y.prototype.timeout=function(){return _(this,void 0,void 0,function(){return T(this,function(S){return[2,new Promise(function(M,J){return setTimeout(J,50)})]})})},y.prototype.reportToListeners=function(){this.fire({type:Y.AudioStatusChange}),this.removeAll()},y.prototype.enableAudio=function(){return _(this,void 0,void 0,function(){return T(this,function(S){return this._enabled||(this._enabled=!0,this._status=oe.AVAILABLE,this.reportToListeners()),[2]})})},y.prototype.testAudio=function(){return _(this,void 0,void 0,function(){return T(this,function(S){switch(S.label){case 0:if(!(this._status===oe.UNAVAILABLE&&this._audioContext!==null))return[3,4];S.label=1;case 1:return S.trys.push([1,3,,4]),[4,Promise.race([this._audioContext.resume(),this.timeout()])];case 2:return S.sent(),this.enableAudio(),[3,4];case 3:return S.sent(),[3,4];case 4:return[2]}})})},y.prototype._establishAudio=function(){return _(this,void 0,void 0,function(){return T(this,function(S){switch(S.label){case 0:return this._started?[3,5]:(this._started=!0,typeof window>"u"?(this.enableAudio(),[3,5]):[3,1]);case 1:this._audioContext=new AudioContext,this.listenForUserAction(),S.label=2;case 2:return this._status!==oe.UNAVAILABLE?[3,5]:[4,this.testAudio()];case 3:return S.sent(),[4,this.delay(1e3)];case 4:return S.sent(),[3,2];case 5:return[2]}})})},y.prototype.listenForUserAction=function(){var S=this,M=function(){return _(S,void 0,void 0,function(){return T(this,function(J){return this.enableAudio(),[2]})})};document.addEventListener("pointerdown",M,{once:!0})},y.prototype.establishAudio=function(){return _(this,void 0,void 0,function(){return T(this,function(S){return this._establishAudio(),[2]})})},Object.defineProperty(y.prototype,"systemVolume",{get:function(){return this._status===oe.UNAVAILABLE?(this.testAudio(),0):1},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),y}(Re),pe=new Ie,le=function(){function P(){}return P.prototype.observe=function(){},P.prototype.unobserve=function(){},P.prototype.disconnect=function(){},P}(),_e=globalThis.ResizeObserver||le,de=function(){function P(){var y=this;this._elementsMap=new Map,this._onObservedEntry=function(S){var M=y._elementsMap.get(S.target);M!==null?M.onResize(S.target.clientWidth==0||S.target.clientHeight==0):y._resizeObserver.unobserve(S.target)},this._onObserved=function(S){S.forEach(y._onObservedEntry)},this._resizeObserver=new _e(this._onObserved)}return P.prototype.add=function(y,S){var M={onResize:S,element:y};return this._elementsMap.set(y,M),this._resizeObserver.observe(y),M},P.prototype.remove=function(y){this._resizeObserver.unobserve(y.element),this._elementsMap.delete(y.element)},P}(),O=new de,te=function(){function P(y){this.enableRiveAssetCDN=!0,this.referenceCount=0,this.destroyed=!1,this.selfUnref=!1,this.src=y.src,this.buffer=y.buffer,y.assetLoader&&(this.assetLoader=y.assetLoader),this.enableRiveAssetCDN=typeof y.enableRiveAssetCDN=="boolean"?y.enableRiveAssetCDN:!0,this.eventManager=new Re,y.onLoad&&this.on(Y.Load,y.onLoad),y.onLoadError&&this.on(Y.LoadError,y.onLoadError)}return P.prototype.releaseFile=function(){var y;this.selfUnref&&((y=this.file)===null||y===void 0||y.unref()),this.file=null},P.prototype.initData=function(){return _(this,void 0,void 0,function(){var y,S,M,J,ue;return T(this,function(be){switch(be.label){case 0:return this.src?(y=this,[4,ha(this.src)]):[3,2];case 1:y.buffer=be.sent(),be.label=2;case 2:return this.destroyed?[2]:(this.assetLoader&&(M=new p.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader),S=M.assetLoader),J=this,[4,this.runtime.load(new Uint8Array(this.buffer),S,this.enableRiveAssetCDN)]);case 3:return J.file=be.sent(),ue=new p.FileFinalizer(this.file),p.finalizationRegistry.register(this,ue),this.destroyed?(this.releaseFile(),[2]):(this.file!==null?this.eventManager.fire({type:Y.Load,data:this}):this.fireLoadError(P.fileLoadErrorMessage),[2])}})})},P.prototype.init=function(){return _(this,void 0,void 0,function(){var y,S;return T(this,function(M){switch(M.label){case 0:if(!this.src&&!this.buffer)return this.fireLoadError(P.missingErrorMessage),[2];M.label=1;case 1:return M.trys.push([1,4,,5]),y=this,[4,L.awaitInstance()];case 2:return y.runtime=M.sent(),this.destroyed?[2]:[4,this.initData()];case 3:return M.sent(),[3,5];case 4:return S=M.sent(),this.fireLoadError(S instanceof Error?S.message:P.fileLoadErrorMessage),[3,5];case 5:return[2]}})})},P.prototype.fireLoadError=function(y){throw this.eventManager.fire({type:Y.LoadError,data:y}),new Error(y)},P.prototype.on=function(y,S){this.eventManager.add({type:y,callback:S})},P.prototype.off=function(y,S){this.eventManager.remove({type:y,callback:S})},P.prototype.cleanup=function(){this.referenceCount-=1,this.referenceCount<=0&&(this.removeAllRiveEventListeners(),this.releaseFile(),this.destroyed=!0)},P.prototype.removeAllRiveEventListeners=function(y){this.eventManager.removeAll(y)},P.prototype.getInstance=function(){if(this.file!==null)return this.referenceCount+=1,this.file},P.prototype.destroyIfUnused=function(){this.referenceCount<=0&&this.cleanup()},P.prototype.getArtboard=function(y){var S=this.file.artboardByName(y);return S!=null?new Q(S):null},P.missingErrorMessage="Rive source file or data buffer required",P.fileLoadErrorMessage="The file failed to load",P}(),Ve=function(){function P(y){var S=this,M;this.loaded=!1,this.destroyed=!1,this._observed=null,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this.shouldDisableRiveListeners=!1,this.automaticallyHandleEvents=!1,this.enableRiveAssetCDN=!0,this._volume=1,this._artboardWidth=void 0,this._artboardHeight=void 0,this._devicePixelRatioUsed=1,this._hasZeroSize=!1,this._audioEventListener=null,this._boundDraw=null,this._viewModelInstance=null,this._dataEnums=null,this.durations=[],this.frameTimes=[],this.frameCount=0,this.isTouchScrollEnabled=!1,this.onCanvasResize=function(J){var ue=S._hasZeroSize!==J;S._hasZeroSize=J,J?(!S._layout.maxX||!S._layout.maxY)&&S.resizeToCanvas():ue&&S.resizeDrawingSurfaceToCanvas()},this.renderSecondTimer=0,this._boundDraw=this.draw.bind(this),this.canvas=y.canvas,y.canvas.constructor===HTMLCanvasElement&&(this._observed=O.add(this.canvas,this.onCanvasResize)),this.src=y.src,this.buffer=y.buffer,this.riveFile=y.riveFile,this.layout=(M=y.layout)!==null&&M!==void 0?M:new U,this.shouldDisableRiveListeners=!!y.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!y.isTouchScrollEnabled,this.automaticallyHandleEvents=!!y.automaticallyHandleEvents,this.enableRiveAssetCDN=y.enableRiveAssetCDN===void 0?!0:y.enableRiveAssetCDN,this.eventManager=new Re,y.onLoad&&this.on(Y.Load,y.onLoad),y.onLoadError&&this.on(Y.LoadError,y.onLoadError),y.onPlay&&this.on(Y.Play,y.onPlay),y.onPause&&this.on(Y.Pause,y.onPause),y.onStop&&this.on(Y.Stop,y.onStop),y.onLoop&&this.on(Y.Loop,y.onLoop),y.onStateChange&&this.on(Y.StateChange,y.onStateChange),y.onAdvance&&this.on(Y.Advance,y.onAdvance),y.onload&&!y.onLoad&&this.on(Y.Load,y.onload),y.onloaderror&&!y.onLoadError&&this.on(Y.LoadError,y.onloaderror),y.onplay&&!y.onPlay&&this.on(Y.Play,y.onplay),y.onpause&&!y.onPause&&this.on(Y.Pause,y.onpause),y.onstop&&!y.onStop&&this.on(Y.Stop,y.onstop),y.onloop&&!y.onLoop&&this.on(Y.Loop,y.onloop),y.onstatechange&&!y.onStateChange&&this.on(Y.StateChange,y.onstatechange),y.assetLoader&&(this.assetLoader=y.assetLoader),this.taskQueue=new We(this.eventManager),this.init({src:this.src,buffer:this.buffer,riveFile:this.riveFile,autoplay:y.autoplay,autoBind:y.autoBind,animations:y.animations,stateMachines:y.stateMachines,artboard:y.artboard,useOffscreenRenderer:y.useOffscreenRenderer})}return Object.defineProperty(P.prototype,"viewModelCount",{get:function(){return this.file.viewModelCount()},enumerable:!1,configurable:!0}),P.new=function(y){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new P(y)},P.prototype.onSystemAudioChanged=function(){this.volume=this._volume},P.prototype.init=function(y){var S=this,M=y.src,J=y.buffer,ue=y.riveFile,be=y.animations,Ge=y.stateMachines,it=y.artboard,Le=y.autoplay,at=Le===void 0?!1:Le,Pt=y.useOffscreenRenderer,Yt=Pt===void 0?!1:Pt,Rt=y.autoBind,Xn=Rt===void 0?!1:Rt;if(!this.destroyed){if(this.src=M,this.buffer=J,this.riveFile=ue,!this.src&&!this.buffer&&!this.riveFile)throw new A(P.missingErrorMessage);var An=_n(be),xn=_n(Ge);this.loaded=!1,this.readyForPlaying=!1,L.awaitInstance().then(function(on){S.destroyed||(S.runtime=on,S.removeRiveListeners(),S.deleteRiveRenderer(),S.renderer=S.runtime.makeRenderer(S.canvas,Yt),S.canvas.width||S.canvas.height||S.resizeDrawingSurfaceToCanvas(),S.initData(it,An,xn,at,Xn).then(function(dn){if(dn)return S.setupRiveListeners()}).catch(function(dn){console.error(dn)}))}).catch(function(on){console.error(on)})}},P.prototype.setupRiveListeners=function(y){var S=this;if(this.eventCleanup&&this.eventCleanup(),!this.shouldDisableRiveListeners){var M=(this.animator.stateMachines||[]).filter(function(ue){return ue.playing&&S.runtime.hasListeners(ue.instance)}).map(function(ue){return ue.instance}),J=this.isTouchScrollEnabled;y&&"isTouchScrollEnabled"in y&&(J=y.isTouchScrollEnabled),this.eventCleanup=(0,p.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:M,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime),isTouchScrollEnabled:J,layoutScaleFactor:this._layout.layoutScaleFactor})}},P.prototype.removeRiveListeners=function(){this.eventCleanup&&(this.eventCleanup(),this.eventCleanup=null)},P.prototype.initializeAudio=function(){var y=this,S;pe.status==oe.UNAVAILABLE&&!((S=this.artboard)===null||S===void 0)&&S.hasAudio&&this._audioEventListener===null&&(this._audioEventListener={type:Y.AudioStatusChange,callback:function(){return y.onSystemAudioChanged()}},pe.add(this._audioEventListener),pe.establishAudio())},P.prototype.initArtboardSize=function(){this.artboard&&(this._artboardWidth=this.artboard.width=this._artboardWidth||this.artboard.width,this._artboardHeight=this.artboard.height=this._artboardHeight||this.artboard.height)},P.prototype.initData=function(y,S,M,J,ue){return _(this,void 0,void 0,function(){var be,Ge,it,Le;return T(this,function(at){switch(at.label){case 0:return at.trys.push([0,3,,4]),this.riveFile!=null?[3,2]:(be=new te({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader}),this.riveFile=be,[4,be.init()]);case 1:if(at.sent(),this.destroyed)return be.destroyIfUnused(),[2,!1];at.label=2;case 2:return this.file=this.riveFile.getInstance(),this.initArtboard(y,S,M,J,ue),this.initArtboardSize(),this.initializeAudio(),this.loaded=!0,this.eventManager.fire({type:Y.Load,data:(Le=this.src)!==null&&Le!==void 0?Le:"buffer"}),this.animator.advanceIfPaused(),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,!0];case 3:return Ge=at.sent(),it=H(Ge),console.warn(it),this.eventManager.fire({type:Y.LoadError,data:it}),[2,Promise.reject(it)];case 4:return[2]}})})},P.prototype.initArtboard=function(y,S,M,J,ue){if(this.file){var be=y?this.file.artboardByName(y):this.file.defaultArtboard();if(!be){var Ge="Invalid artboard name or no default artboard";console.warn(Ge),this.eventManager.fire({type:Y.LoadError,data:Ge});return}this.artboard=be,be.volume=this._volume*pe.systemVolume,this.animator=new q(this.runtime,this.artboard,this.eventManager);var it;if(S.length>0||M.length>0?(it=S.concat(M),this.animator.initLinearAnimations(S,J),this.animator.initStateMachines(M,J)):it=[this.animator.atLeastOne(J,!1)],this.taskQueue.add({event:{type:J?Y.Play:Y.Pause,data:it}}),ue){var Le=this.file.defaultArtboardViewModel(be);if(Le!==null){var at=Le.defaultInstance();if(at!==null){var Pt=new tt(at,null);this.bindViewModelInstance(Pt)}}}}},P.prototype.drawFrame=function(){var y,S;!((y=document==null?void 0:document.timeline)===null||y===void 0)&&y.currentTime?this.loaded&&this.artboard&&!this.frameRequestId&&(this._boundDraw(document.timeline.currentTime),(S=this.runtime)===null||S===void 0||S.resolveAnimationFrame()):this.startRendering()},P.prototype.draw=function(y,S){var M;this.frameRequestId=null;var J=performance.now();this.lastRenderTime||(this.lastRenderTime=y),this.renderSecondTimer+=y-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,S==null||S());var ue=(y-this.lastRenderTime)/1e3;this.lastRenderTime=y;for(var be=this.animator.animations.filter(function(er){return er.playing||er.needsScrub}).sort(function(er){return er.needsScrub?-1:1}),Ge=0,it=be;Ge<it.length;Ge++){var Le=it[Ge];Le.advance(ue),Le.instance.didLoop&&(Le.loopCount+=1),Le.apply(1)}for(var at=this.animator.stateMachines.filter(function(er){return er.playing}),Pt=0,Yt=at;Pt<Yt.length;Pt++){var Rt=Yt[Pt],Xn=Rt.reportedEventCount();if(Xn)for(var An=0;An<Xn;An++){var xn=Rt.reportedEventAt(An);if(xn)if(xn.type===se.OpenUrl){if(this.eventManager.fire({type:Y.RiveEvent,data:xn}),this.automaticallyHandleEvents){var on=document.createElement("a"),dn=xn,Lr=dn.url,et=dn.target,Dr=(0,p.sanitizeUrl)(Lr);Lr&&on.setAttribute("href",Dr),et&&on.setAttribute("target",et),Dr&&Dr!==p.BLANK_URL&&on.click()}}else this.eventManager.fire({type:Y.RiveEvent,data:xn})}Rt.advanceAndApply(ue)}this.animator.stateMachines.length==0&&this.artboard.advance(ue);var Zn=this.renderer;Zn.clear(),Zn.save(),this.alignRenderer(),this._hasZeroSize||this.artboard.draw(Zn),Zn.restore(),Zn.flush(),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(ue),this.frameCount++;var mt=performance.now();for(this.frameTimes.push(mt),this.durations.push(mt-J);this.frameTimes[0]<=mt-1e3;)this.frameTimes.shift(),this.durations.shift();(M=this._viewModelInstance)===null||M===void 0||M.handleCallbacks(),this.animator.isPlaying?this.startRendering():this.animator.isPaused?this.lastRenderTime=0:this.animator.isStopped&&(this.lastRenderTime=0)},P.prototype.alignRenderer=function(){var y=this,S=y.renderer,M=y.runtime,J=y._layout,ue=y.artboard;S.align(J.runtimeFit(M),J.runtimeAlignment(M),{minX:J.minX,minY:J.minY,maxX:J.maxX,maxY:J.maxY},ue.bounds,this._devicePixelRatioUsed*J.layoutScaleFactor)},Object.defineProperty(P.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"frameTime",{get:function(){return this.durations.length===0?0:(this.durations.reduce(function(y,S){return y+S},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),P.prototype.cleanup=function(){var y,S;this.destroyed=!0,this.stopRendering(),this.cleanupInstances(),this._observed!==null&&O.remove(this._observed),this.removeRiveListeners(),this.file&&((y=this.riveFile)===null||y===void 0||y.cleanup(),this.file=null),this.riveFile=null,this.deleteRiveRenderer(),this._audioEventListener!==null&&(pe.remove(this._audioEventListener),this._audioEventListener=null),(S=this._viewModelInstance)===null||S===void 0||S.cleanup(),this._viewModelInstance=null,this._dataEnums=null},P.prototype.deleteRiveRenderer=function(){var y;(y=this.renderer)===null||y===void 0||y.delete(),this.renderer=null},P.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},P.prototype.retrieveTextRun=function(y){var S;if(!y){console.warn("No text run name provided");return}if(!this.artboard){console.warn("Tried to access text run, but the Artboard is null");return}var M=this.artboard.textRun(y);if(!M){console.warn("Could not access a text run with name '".concat(y,"' in the '").concat((S=this.artboard)===null||S===void 0?void 0:S.name,"' Artboard. Note that you must rename a text run node in the Rive editor to make it queryable at runtime."));return}return M},P.prototype.getTextRunValue=function(y){var S=this.retrieveTextRun(y);return S?S.text:void 0},P.prototype.setTextRunValue=function(y,S){var M=this.retrieveTextRun(y);M&&(M.text=S)},P.prototype.play=function(y,S){var M=this;if(y=_n(y),!this.readyForPlaying){this.taskQueue.add({action:function(){return M.play(y,S)}});return}this.animator.play(y),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},P.prototype.pause=function(y){var S=this;if(y=_n(y),!this.readyForPlaying){this.taskQueue.add({action:function(){return S.pause(y)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(y)},P.prototype.scrub=function(y,S){var M=this;if(y=_n(y),!this.readyForPlaying){this.taskQueue.add({action:function(){return M.scrub(y,S)}});return}this.animator.scrub(y,S||0),this.drawFrame()},P.prototype.stop=function(y){var S=this;if(y=_n(y),!this.readyForPlaying){this.taskQueue.add({action:function(){return S.stop(y)}});return}this.animator&&this.animator.stop(y),this.eventCleanup&&this.eventCleanup()},P.prototype.reset=function(y){var S,M,J=y==null?void 0:y.artboard,ue=_n(y==null?void 0:y.animations),be=_n(y==null?void 0:y.stateMachines),Ge=(S=y==null?void 0:y.autoplay)!==null&&S!==void 0?S:!1,it=(M=y==null?void 0:y.autoBind)!==null&&M!==void 0?M:!1;this.cleanupInstances(),this.initArtboard(J,ue,be,Ge,it),this.taskQueue.process()},P.prototype.load=function(y){this.file=null,this.stop(),this.init(y)},Object.defineProperty(P.prototype,"layout",{get:function(){return this._layout},set:function(y){this._layout=y,(!y.maxX||!y.maxY)&&this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),P.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},P.prototype.resizeDrawingSurfaceToCanvas=function(y){if(this.canvas instanceof HTMLCanvasElement&&window){var S=this.canvas.getBoundingClientRect(),M=S.width,J=S.height,ue=y||window.devicePixelRatio||1;if(this.devicePixelRatioUsed=ue,this.canvas.width=ue*M,this.canvas.height=ue*J,this.resizeToCanvas(),this.drawFrame(),this.layout.fit===z.Layout){var be=this._layout.layoutScaleFactor;this.artboard.width=M/be,this.artboard.height=J/be}}},Object.defineProperty(P.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"animationNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var y=[],S=0;S<this.artboard.animationCount();S++)y.push(this.artboard.animationByIndex(S).name);return y},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"stateMachineNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var y=[],S=0;S<this.artboard.stateMachineCount();S++)y.push(this.artboard.stateMachineByIndex(S).name);return y},enumerable:!1,configurable:!0}),P.prototype.stateMachineInputs=function(y){if(this.loaded){var S=this.animator.stateMachines.find(function(M){return M.name===y});return S==null?void 0:S.inputs}},P.prototype.retrieveInputAtPath=function(y,S){if(!y){console.warn("No input name provided for path '".concat(S,"'"));return}if(!this.artboard){console.warn("Tried to access input: '".concat(y,"', at path: '").concat(S,"', but the Artboard is null"));return}var M=this.artboard.inputByPath(y,S);if(!M){console.warn("Could not access an input with name: '".concat(y,"', at path:'").concat(S,"'"));return}return M},P.prototype.setBooleanStateAtPath=function(y,S,M){var J=this.retrieveInputAtPath(y,M);J&&(J.type===F.Boolean?J.asBool().value=S:console.warn("Input with name: '".concat(y,"', at path:'").concat(M,"' is not a boolean")))},P.prototype.setNumberStateAtPath=function(y,S,M){var J=this.retrieveInputAtPath(y,M);J&&(J.type===F.Number?J.asNumber().value=S:console.warn("Input with name: '".concat(y,"', at path:'").concat(M,"' is not a number")))},P.prototype.fireStateAtPath=function(y,S){var M=this.retrieveInputAtPath(y,S);M&&(M.type===F.Trigger?M.asTrigger().fire():console.warn("Input with name: '".concat(y,"', at path:'").concat(S,"' is not a trigger")))},P.prototype.retrieveTextAtPath=function(y,S){if(!y){console.warn("No text name provided for path '".concat(S,"'"));return}if(!S){console.warn("No path provided for text '".concat(y,"'"));return}if(!this.artboard){console.warn("Tried to access text: '".concat(y,"', at path: '").concat(S,"', but the Artboard is null"));return}var M=this.artboard.textByPath(y,S);if(!M){console.warn("Could not access text with name: '".concat(y,"', at path:'").concat(S,"'"));return}return M},P.prototype.getTextRunValueAtPath=function(y,S){var M=this.retrieveTextAtPath(y,S);if(!M){console.warn("Could not get text with name: '".concat(y,"', at path:'").concat(S,"'"));return}return M.text},P.prototype.setTextRunValueAtPath=function(y,S,M){var J=this.retrieveTextAtPath(y,M);if(!J){console.warn("Could not set text with name: '".concat(y,"', at path:'").concat(M,"'"));return}J.text=S},Object.defineProperty(P.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(y){return y.playing}).map(function(y){return y.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(y){return y.playing}).map(function(y){return y.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(y){return!y.playing}).map(function(y){return y.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(y){return!y.playing}).map(function(y){return y.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),P.prototype.on=function(y,S){this.eventManager.add({type:y,callback:S})},P.prototype.off=function(y,S){this.eventManager.remove({type:y,callback:S})},P.prototype.unsubscribe=function(y,S){console.warn("This function is deprecated: please use `off()` instead."),this.off(y,S)},P.prototype.removeAllRiveEventListeners=function(y){this.eventManager.removeAll(y)},P.prototype.unsubscribeAll=function(y){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(y)},P.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},P.prototype.startRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.runtime.requestAnimationFrame?this.frameRequestId=this.runtime.requestAnimationFrame(this._boundDraw):this.frameRequestId=requestAnimationFrame(this._boundDraw))},P.prototype.enableFPSCounter=function(y){this.runtime.enableFPSCounter(y)},P.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(P.prototype,"contents",{get:function(){if(this.loaded){for(var y={artboards:[]},S=0;S<this.file.artboardCount();S++){for(var M=this.file.artboardByIndex(S),J={name:M.name,animations:[],stateMachines:[]},ue=0;ue<M.animationCount();ue++){var be=M.animationByIndex(ue);J.animations.push(be.name)}for(var Ge=0;Ge<M.stateMachineCount();Ge++){for(var it=M.stateMachineByIndex(Ge),Le=it.name,at=new this.runtime.StateMachineInstance(it,M),Pt=[],Yt=0;Yt<at.inputCount();Yt++){var Rt=at.input(Yt);Pt.push({name:Rt.name,type:Rt.type})}J.stateMachines.push({name:Le,inputs:Pt})}y.artboards.push(J)}return y}},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"volume",{get:function(){return this.artboard&&this.artboard.volume!==this._volume&&(this._volume=this.artboard.volume),this._volume},set:function(y){this._volume=y,this.artboard&&(this.artboard.volume=y*pe.systemVolume)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"artboardWidth",{get:function(){var y;return this.artboard?this.artboard.width:(y=this._artboardWidth)!==null&&y!==void 0?y:0},set:function(y){this._artboardWidth=y,this.artboard&&(this.artboard.width=y)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"artboardHeight",{get:function(){var y;return this.artboard?this.artboard.height:(y=this._artboardHeight)!==null&&y!==void 0?y:0},set:function(y){this._artboardHeight=y,this.artboard&&(this.artboard.height=y)},enumerable:!1,configurable:!0}),P.prototype.resetArtboardSize=function(){this.artboard?(this.artboard.resetArtboardSize(),this._artboardWidth=this.artboard.width,this._artboardHeight=this.artboard.height):(this._artboardWidth=void 0,this._artboardHeight=void 0)},Object.defineProperty(P.prototype,"devicePixelRatioUsed",{get:function(){return this._devicePixelRatioUsed},set:function(y){this._devicePixelRatioUsed=y},enumerable:!1,configurable:!0}),P.prototype.bindViewModelInstance=function(y){var S;this.artboard&&!this.destroyed&&y&&y.runtimeInstance&&(y.internalIncrementReferenceCount(),(S=this._viewModelInstance)===null||S===void 0||S.cleanup(),this._viewModelInstance=y,this.animator.stateMachines.length>0?this.animator.stateMachines.forEach(function(M){return M.bindViewModelInstance(y)}):this.artboard.bindViewModelInstance(y.runtimeInstance))},Object.defineProperty(P.prototype,"viewModelInstance",{get:function(){return this._viewModelInstance},enumerable:!1,configurable:!0}),P.prototype.viewModelByIndex=function(y){var S=this.file.viewModelByIndex(y);return S!==null?new Ke(S):null},P.prototype.viewModelByName=function(y){var S=this.file.viewModelByName(y);return S!==null?new Ke(S):null},P.prototype.enums=function(){if(this._dataEnums===null){var y=this.file.enums();this._dataEnums=y.map(function(S){return new Xe(S)})}return this._dataEnums},P.prototype.defaultViewModel=function(){if(this.artboard){var y=this.file.defaultArtboardViewModel(this.artboard);if(y)return new Ke(y)}return null},P.prototype.getArtboard=function(y){var S,M;return(M=(S=this.riveFile)===null||S===void 0?void 0:S.getArtboard(y))!==null&&M!==void 0?M:null},P.missingErrorMessage="Rive source file or data buffer required",P.cleanupErrorMessage="Attempt to use file after calling cleanup.",P}(),Ke=function(){function P(y){this._viewModel=y}return Object.defineProperty(P.prototype,"instanceCount",{get:function(){return this._viewModel.instanceCount},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"name",{get:function(){return this._viewModel.name},enumerable:!1,configurable:!0}),P.prototype.instanceByIndex=function(y){var S=this._viewModel.instanceByIndex(y);return S!==null?new tt(S,null):null},P.prototype.instanceByName=function(y){var S=this._viewModel.instanceByName(y);return S!==null?new tt(S,null):null},P.prototype.defaultInstance=function(){var y=this._viewModel.defaultInstance();return y!==null?new tt(y,null):null},P.prototype.instance=function(){var y=this._viewModel.instance();return y!==null?new tt(y,null):null},Object.defineProperty(P.prototype,"properties",{get:function(){return this._viewModel.getProperties()},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"instanceNames",{get:function(){return this._viewModel.getInstanceNames()},enumerable:!1,configurable:!0}),P}(),Xe=function(){function P(y){this._dataEnum=y}return Object.defineProperty(P.prototype,"name",{get:function(){return this._dataEnum.name},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"values",{get:function(){return this._dataEnum.values},enumerable:!1,configurable:!0}),P}(),Fe;(function(P){P.Number="number",P.String="string",P.Boolean="boolean",P.Color="color",P.Trigger="trigger",P.Enum="enum",P.List="list",P.Image="image",P.Artboard="artboard"})(Fe||(Fe={}));var tt=function(){function P(y,S){this._parents=[],this._children=[],this._viewModelInstances=new Map,this._propertiesWithCallbacks=[],this._referenceCount=0,this._runtimeInstance=y,S!==null&&this._parents.push(S)}return Object.defineProperty(P.prototype,"runtimeInstance",{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),P.prototype.handleCallbacks=function(){this._propertiesWithCallbacks.length!==0&&(this._propertiesWithCallbacks.forEach(function(y){y.handleCallbacks()}),this._propertiesWithCallbacks.forEach(function(y){y.clearChanges()})),this._children.forEach(function(y){return y.handleCallbacks()})},P.prototype.addParent=function(y){this._parents.includes(y)||(this._parents.push(y),(this._propertiesWithCallbacks.length>0||this._children.length>0)&&y.addToViewModelCallbacks(this))},P.prototype.removeParent=function(y){var S=this._parents.indexOf(y);if(S!==-1){var M=this._parents[S];M.removeFromViewModelCallbacks(this),this._parents.splice(S,1)}},P.prototype.addToPropertyCallbacks=function(y){var S=this;this._propertiesWithCallbacks.includes(y)||(this._propertiesWithCallbacks.push(y),this._propertiesWithCallbacks.length>0&&this._parents.forEach(function(M){M.addToViewModelCallbacks(S)}))},P.prototype.removeFromPropertyCallbacks=function(y){var S=this;this._propertiesWithCallbacks.includes(y)&&(this._propertiesWithCallbacks=this._propertiesWithCallbacks.filter(function(M){return M!==y}),this._children.length===0&&this._propertiesWithCallbacks.length===0&&this._parents.forEach(function(M){M.removeFromViewModelCallbacks(S)}))},P.prototype.addToViewModelCallbacks=function(y){var S=this;this._children.includes(y)||(this._children.push(y),this._parents.forEach(function(M){M.addToViewModelCallbacks(S)}))},P.prototype.removeFromViewModelCallbacks=function(y){var S=this;this._children.includes(y)&&(this._children=this._children.filter(function(M){return M!==y}),this._children.length===0&&this._propertiesWithCallbacks.length===0&&this._parents.forEach(function(M){M.removeFromViewModelCallbacks(S)}))},P.prototype.clearCallbacks=function(){this._propertiesWithCallbacks.forEach(function(y){y.clearCallbacks()})},P.prototype.propertyFromPath=function(y,S){var M=y.split("/");return this.propertyFromPathSegments(M,0,S)},P.prototype.viewModelFromPathSegments=function(y,S){var M=this.internalViewModelInstance(y[S]);return M!==null?S==y.length-1?M:M.viewModelFromPathSegments(y,S++):null},P.prototype.propertyFromPathSegments=function(y,S,M){var J,ue,be,Ge,it,Le,at,Pt,Yt,Rt,Xn,An,xn,on,dn,Lr,et,Dr;if(S<y.length-1){var Zn=this.internalViewModelInstance(y[S]);return Zn!==null?Zn.propertyFromPathSegments(y,S+1,M):null}var mt=null;switch(M){case Fe.Number:if(mt=(ue=(J=this._runtimeInstance)===null||J===void 0?void 0:J.number(y[S]))!==null&&ue!==void 0?ue:null,mt!==null)return new Lt(mt,this);break;case Fe.String:if(mt=(Ge=(be=this._runtimeInstance)===null||be===void 0?void 0:be.string(y[S]))!==null&&Ge!==void 0?Ge:null,mt!==null)return new pt(mt,this);break;case Fe.Boolean:if(mt=(Le=(it=this._runtimeInstance)===null||it===void 0?void 0:it.boolean(y[S]))!==null&&Le!==void 0?Le:null,mt!==null)return new Jt(mt,this);break;case Fe.Color:if(mt=(Pt=(at=this._runtimeInstance)===null||at===void 0?void 0:at.color(y[S]))!==null&&Pt!==void 0?Pt:null,mt!==null)return new Or(mt,this);break;case Fe.Trigger:if(mt=(Rt=(Yt=this._runtimeInstance)===null||Yt===void 0?void 0:Yt.trigger(y[S]))!==null&&Rt!==void 0?Rt:null,mt!==null)return new ar(mt,this);break;case Fe.Enum:if(mt=(An=(Xn=this._runtimeInstance)===null||Xn===void 0?void 0:Xn.enum(y[S]))!==null&&An!==void 0?An:null,mt!==null)return new Tn(mt,this);break;case Fe.List:if(mt=(on=(xn=this._runtimeInstance)===null||xn===void 0?void 0:xn.list(y[S]))!==null&&on!==void 0?on:null,mt!==null)return new Ar(mt,this);break;case Fe.Image:if(mt=(Lr=(dn=this._runtimeInstance)===null||dn===void 0?void 0:dn.image(y[S]))!==null&&Lr!==void 0?Lr:null,mt!==null)return new xo(mt,this);break;case Fe.Artboard:if(mt=(Dr=(et=this._runtimeInstance)===null||et===void 0?void 0:et.artboard(y[S]))!==null&&Dr!==void 0?Dr:null,mt!==null)return new qi(mt,this);break}return null},P.prototype.internalViewModelInstance=function(y){var S;if(this._viewModelInstances.has(y))return this._viewModelInstances.get(y);var M=(S=this._runtimeInstance)===null||S===void 0?void 0:S.viewModel(y);if(M!==null){var J=new P(M,this);return J.internalIncrementReferenceCount(),this._viewModelInstances.set(y,J),J}return null},P.prototype.number=function(y){var S=this.propertyFromPath(y,Fe.Number);return S},P.prototype.string=function(y){var S=this.propertyFromPath(y,Fe.String);return S},P.prototype.boolean=function(y){var S=this.propertyFromPath(y,Fe.Boolean);return S},P.prototype.color=function(y){var S=this.propertyFromPath(y,Fe.Color);return S},P.prototype.trigger=function(y){var S=this.propertyFromPath(y,Fe.Trigger);return S},P.prototype.enum=function(y){var S=this.propertyFromPath(y,Fe.Enum);return S},P.prototype.list=function(y){var S=this.propertyFromPath(y,Fe.List);return S},P.prototype.image=function(y){var S=this.propertyFromPath(y,Fe.Image);return S},P.prototype.artboard=function(y){var S=this.propertyFromPath(y,Fe.Artboard);return S},P.prototype.viewModel=function(y){var S=y.split("/"),M=S.length>1?this.viewModelFromPathSegments(S.slice(0,S.length-1),0):this;return M!=null?M.internalViewModelInstance(S[S.length-1]):null},P.prototype.internalReplaceViewModel=function(y,S){var M;if(S.runtimeInstance!==null){var J=((M=this._runtimeInstance)===null||M===void 0?void 0:M.replaceViewModel(y,S.runtimeInstance))||!1;if(J){S.internalIncrementReferenceCount();var ue=this.internalViewModelInstance(y);ue!==null&&(ue.removeParent(this),this._children.includes(ue)&&(this._children=this._children.filter(function(be){return be!==ue})),ue.cleanup()),this._viewModelInstances.set(y,S),S.addParent(this)}return J}return!1},P.prototype.replaceViewModel=function(y,S){var M,J=y.split("/"),ue=J.length>1?this.viewModelFromPathSegments(J.slice(0,J.length-1),0):this;return(M=ue==null?void 0:ue.internalReplaceViewModel(J[J.length-1],S))!==null&&M!==void 0?M:!1},P.prototype.incrementReferenceCount=function(){var y;this._referenceCount++,(y=this._runtimeInstance)===null||y===void 0||y.incrementReferenceCount()},P.prototype.decrementReferenceCount=function(){var y;this._referenceCount--,(y=this._runtimeInstance)===null||y===void 0||y.decrementReferenceCount()},Object.defineProperty(P.prototype,"properties",{get:function(){var y;return((y=this._runtimeInstance)===null||y===void 0?void 0:y.getProperties().map(function(S){return C({},S)}))||[]},enumerable:!1,configurable:!0}),P.prototype.internalIncrementReferenceCount=function(){this._referenceCount++},P.prototype.cleanup=function(){var y=this;if(this._referenceCount--,this._referenceCount<=0){this._runtimeInstance=null,this.clearCallbacks(),this._propertiesWithCallbacks=[],this._viewModelInstances.forEach(function(J){J.cleanup()}),this._viewModelInstances.clear();var S=N([],this._children,!0);this._children.length=0;var M=N([],this._parents,!0);this._parents.length=0,S.forEach(function(J){J.removeParent(y)}),M.forEach(function(J){J.removeFromViewModelCallbacks(y)})}},P}(),qe=function(){function P(y,S){this.callbacks=[],this._viewModelInstanceValue=y,this._parentViewModel=S}return P.prototype.on=function(y){this.callbacks.length===0&&this._viewModelInstanceValue.clearChanges(),this.callbacks.includes(y)||(this.callbacks.push(y),this._parentViewModel.addToPropertyCallbacks(this))},P.prototype.off=function(y){y?this.callbacks=this.callbacks.filter(function(S){return S!==y}):this.callbacks.length=0,this.callbacks.length===0&&this._parentViewModel.removeFromPropertyCallbacks(this)},P.prototype.internalHandleCallback=function(y){},P.prototype.handleCallbacks=function(){var y=this;this._viewModelInstanceValue.hasChanged&&this.callbacks.forEach(function(S){y.internalHandleCallback(S)})},P.prototype.clearChanges=function(){this._viewModelInstanceValue.clearChanges()},P.prototype.clearCallbacks=function(){this.callbacks.length=0},Object.defineProperty(P.prototype,"name",{get:function(){return this._viewModelInstanceValue.name},enumerable:!1,configurable:!0}),P}(),pt=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(S){this._viewModelInstanceValue.value=S},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(S){S(this.value)},y}(qe),Lt=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(S){this._viewModelInstanceValue.value=S},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(S){S(this.value)},y}(qe),Jt=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(S){this._viewModelInstanceValue.value=S},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(S){S(this.value)},y}(qe),ar=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return y.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},y.prototype.internalHandleCallback=function(S){S()},y}(qe),Tn=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(S){this._viewModelInstanceValue.value=S},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"valueIndex",{get:function(){return this._viewModelInstanceValue.valueIndex},set:function(S){this._viewModelInstanceValue.valueIndex=S},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"values",{get:function(){return this._viewModelInstanceValue.values},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(S){S(this.value)},y}(qe),Ar=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return Object.defineProperty(y.prototype,"length",{get:function(){return this._viewModelInstanceValue.size},enumerable:!1,configurable:!0}),y.prototype.addInstance=function(S){S.runtimeInstance!=null&&(this._viewModelInstanceValue.addInstance(S.runtimeInstance),S.addParent(this._parentViewModel))},y.prototype.addInstanceAt=function(S,M){return S.runtimeInstance!=null&&this._viewModelInstanceValue.addInstanceAt(S.runtimeInstance,M)?(S.addParent(this._parentViewModel),!0):!1},y.prototype.removeInstance=function(S){S.runtimeInstance!=null&&(this._viewModelInstanceValue.removeInstance(S.runtimeInstance),S.removeParent(this._parentViewModel))},y.prototype.removeInstanceAt=function(S){this._viewModelInstanceValue.removeInstanceAt(S)},y.prototype.instanceAt=function(S){var M=this._viewModelInstanceValue.instanceAt(S);if(M!=null){var J=new tt(M,this._parentViewModel);return J}return null},y.prototype.swap=function(S,M){this._viewModelInstanceValue.swap(S,M)},y.prototype.internalHandleCallback=function(S){S()},y}(qe),Or=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(S){this._viewModelInstanceValue.value=S},enumerable:!1,configurable:!0}),y.prototype.rgb=function(S,M,J){this._viewModelInstanceValue.rgb(S,M,J)},y.prototype.rgba=function(S,M,J,ue){this._viewModelInstanceValue.argb(ue,S,M,J)},y.prototype.argb=function(S,M,J,ue){this._viewModelInstanceValue.argb(S,M,J,ue)},y.prototype.alpha=function(S){this._viewModelInstanceValue.alpha(S)},y.prototype.opacity=function(S){this._viewModelInstanceValue.alpha(Math.round(Math.max(0,Math.min(1,S))*255))},y.prototype.internalHandleCallback=function(S){S(this.value)},y}(qe),xo=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return Object.defineProperty(y.prototype,"value",{set:function(S){var M;this._viewModelInstanceValue.value((M=S==null?void 0:S.nativeImage)!==null&&M!==void 0?M:null)},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(S){S()},y}(qe),qi=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return Object.defineProperty(y.prototype,"value",{set:function(S){var M;this._viewModelInstanceValue.value((M=S==null?void 0:S.nativeArtboard)!==null&&M!==void 0?M:null)},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(S){S()},y}(qe),ha=function(P){return _(void 0,void 0,void 0,function(){var y,S,M;return T(this,function(J){switch(J.label){case 0:return y=new Request(P),[4,fetch(y)];case 1:return S=J.sent(),[4,S.arrayBuffer()];case 2:return M=J.sent(),[2,M]}})})},_n=function(P){return typeof P=="string"?[P]:P instanceof Array?P:[]},Gi={EventManager:Re,TaskQueueManager:We},Qn=function(P){return _(void 0,void 0,void 0,function(){var y,S,M;return T(this,function(J){switch(J.label){case 0:return y=new Promise(function(ue){return L.getInstance(function(be){be.decodeAudio(P,ue)})}),[4,y];case 1:return S=J.sent(),M=new p.AudioWrapper(S),p.finalizationRegistry.register(M,S),[2,M]}})})},Ki=function(P){return _(void 0,void 0,void 0,function(){var y,S,M;return T(this,function(J){switch(J.label){case 0:return y=new Promise(function(ue){return L.getInstance(function(be){be.decodeImage(P,ue)})}),[4,y];case 1:return S=J.sent(),M=new p.ImageWrapper(S),p.finalizationRegistry.register(M,S),[2,M]}})})},pa=function(P){return _(void 0,void 0,void 0,function(){var y,S,M;return T(this,function(J){switch(J.label){case 0:return y=new Promise(function(ue){return L.getInstance(function(be){be.decodeFont(P,ue)})}),[4,y];case 1:return S=J.sent(),M=new p.FontWrapper(S),p.finalizationRegistry.register(M,S),[2,M]}})})}})(),a})())}(Tu)),Tu.exports}var qh=eP();function tP(n,e){e.style.borderColor=n;const t=getComputedStyle(e).getPropertyValue("border-color"),r=e.getContext("2d");return r?(r.fillStyle=t,r.fillRect(0,0,1,1),e.style.display="none",[...r.getImageData(0,0,1,1).data]):[0,0,0,255]}const nP=({restored:n})=>{const e=ye.useRef(null),t=ye.useRef(null);return ye.useEffect(()=>{const r=t.current,o=e.current;if(r==null||o==null)return;const a=new qh.Rive({src:"https://assets.nlx.ai/touchpoint/voice-plus-animation.riv",canvas:r,autoBind:!0,autoplay:!0,stateMachines:"State Machine 1",layout:new qh.Layout({fit:qh.Fit.Fill}),onLoad:()=>{a.resizeDrawingSurfaceToCanvas();const u=a.viewModelInstance;if(u!=null){const f=u.trigger("run"),p=u.trigger("runNoWave"),g=u.color("color"),C=u.number("voiceInput");C!=null&&(C.value=100),g==null||g.rgba(...tP("var(--color-accent)",o)),n?p==null||p.trigger():f==null||f.trigger()}}}),l=()=>{a.resizeDrawingSurfaceToCanvas()};return window.addEventListener("resize",l,!1),()=>{a.cleanup(),window.removeEventListener("resize",l,!1)}},[n]),R.jsxs(R.Fragment,{children:[R.jsx("canvas",{ref:e,width:"1",height:"1"}),R.jsx("canvas",{className:"pointer-events-none fixed inset-0",ref:t,style:{width:"100%",height:"100%"}})]})},yb=ye.forwardRef((n,e)=>{var _e;const t=sessionStorage.getItem("nlxActiveVoiceConversationId")===n.config.conversationId,r=ye.useMemo(()=>{const de=sessionStorage.getItem("nlxActiveConversationResponses")??"{}";try{const O=JSON.parse(de);if(Array.isArray(O[n.config.conversationId]))return O[n.config.conversationId]}catch{return null}},[n.config.conversationId]),o=ye.useMemo(()=>qw({responses:r,...n.config}),[n.config,r]),[a,l]=ye.useState([]),u=((_e=a[a.length-1])==null?void 0:_e.type)===Wn.User,f=n.colorMode??"dark",[p,g]=ye.useState(n.embedded||t),C=$w(n.config),[_,T]=ye.useState(!1),N=ye.useRef(n.embedded||t),A=n.input??"text",H=ye.useCallback(()=>{sessionStorage.removeItem("nlxActiveVoiceConversationId"),(A==="voice"||A==="voiceMini")&&(U.current=!1,o.reset({clearResponses:!0}),sessionStorage.removeItem("nlxConversationId"))},[o,A]),z=n.onClose,ee=ye.useCallback(de=>{z!=null&&(z(de),H(),de.defaultPrevented||g(!1))},[z,g,H]);ye.useEffect(()=>{N.current=p},[p]),ye.useImperativeHandle(e,()=>({setExpanded(de){de?g(!0):(H(),g(!1))},getExpanded(){return N.current},getConversationHandler(){return o},setCustomBidirectionalCommands:de=>{G.current(de)}}),[o,g,H]),ye.useEffect(()=>{const de=O=>{l(O);const te=o.currentConversationId();A==="text"&&te!=null&&sessionStorage.setItem("nlxActiveConversationResponses",JSON.stringify({[te]:O}))};return o.subscribe(de),()=>{o.unsubscribe(de)}},[o,l,A]);const U=ye.useRef(t);ye.useEffect(()=>{if(!p||U.current)return;U.current=!0,(A!=="text"||r==null||r.length===0)&&n.initializeConversation(o,n.initialContext);const de=o.currentConversationId();de!=null&&sessionStorage.setItem("nlxActiveVoiceConversationId",de)},[o,p,H,A,n,r]);const L=ye.useRef({formElements:{},links:{},customCommands:new Map}),F=ye.useRef([]),G=ye.useRef(de=>{var O;if(((O=n.bidirectional)==null?void 0:O.automaticContext)!==!1)F.current=de;else throw new Error("Custom commands can only be set when automatic context is enabled.")});ye.useEffect(()=>{if(p&&n.bidirectional!=null&&n.bidirectional.automaticContext!==!1){const{teardown:de,onCustomCommandsChange:O}=JE(o,F.current,n.bidirectional.customizeAutomaticContext??(te=>te),te=>{L.current=te});return G.current=O,de}},[p,o,n.bidirectional]),ye.useEffect(()=>{if(n.bidirectional!=null&&(n.bidirectional.navigation!=null||n.bidirectional.input!=null||n.bidirectional.custom!=null||n.bidirectional.automaticContext!==!1))return XE(o,n.bidirectional,L)},[n.bidirectional,o]);const se=n.windowSize??(n.embedded?"full":"half"),Q=ye.useMemo(()=>{const de=Km(te=>te.type===Wn.Application,a);if(de===-1)return null;const O=a[de];return(O==null?void 0:O.type)!==Wn.Application?null:{index:de,response:O}},[a]),$=ye.useMemo(()=>{if(Q==null)return;const de=Km(te=>te.choices.length>0,Q.response.payload.messages);if(de===-1)return;const O=Q.response.payload.messages[de];if(O!=null)return{message:O,messageIndex:de,responseIndex:Q.index}},[Q]),[q,Y]=ye.useState({}),fe=ye.useMemo(()=>n.modalityComponents??n.customModalities??{},[n.modalityComponents,n.customModalities]),[Re,We]=ye.useState(!0),[oe,Ie]=ye.useState(0),pe=()=>{o.reset({clearResponses:!0}),H(),A!=="voice"&&n.initializeConversation(o,n.initialContext);const de=o.currentConversationId();sessionStorage.getItem("nlxConversationId")!==null&&(de==null?sessionStorage.removeItem("nlxConversationId"):sessionStorage.setItem("nlxConversationId",de)),de!=null&&sessionStorage.setItem("nlxActiveVoiceConversationId",de),Ie(O=>O+1)};if(o==null)return null;if(!p)return n.launchIcon!==!1?R.jsx(wu,{className:"fixed z-launch-button bottom-2 right-2 w-fit",theme:n.theme,colorMode:f,children:R.jsx(pC,{className:"backdrop-blur-sm",iconUrl:typeof n.launchIcon=="string"?n.launchIcon:void 0,Custom:typeof n.launchIcon=="function"?n.launchIcon:void 0,onClick:()=>{g(!0)},label:"Expand chat"})}):null;if(A==="voiceMini")return R.jsx(R.Fragment,{children:R.jsxs(wu,{theme:n.theme,colorMode:f,className:st("w-fit",n.embedded?"":"fixed z-touchpoint bottom-2 right-2"),children:[n.animate?R.jsx(nP,{restored:t}):null,R.jsx(eE,{handler:o,context:n.initialContext,onClose:()=>{ee(new Event("close"))},renderCollapse:n.onClose!=null,modalityComponents:fe},oe)]})});const le=()=>{var de,O;return _?R.jsx(Ay,{reset:()=>{pe(),T(!1)},className:st("flex-none",se==="full"?"w-full md:max-w-content md:mx-auto":""),onClose:()=>{T(!1)},handler:o}):C?R.jsxs(R.Fragment,{children:[R.jsx(Ax,{enabled:n.enabled,userMessageBubble:n.userMessageBubble??!1,agentMessageBubble:n.agentMessageBubble??!1,chatMode:n.chatMode??!1,isWaiting:u,lastApplicationResponseIndex:Q==null?void 0:Q.index,responses:a,colorMode:f,handler:o,uploadedFiles:q,modalityComponents:fe,className:st("grow",se==="full"?"w-full md:max-w-content md:mx-auto":"")}),R.jsxs("div",{className:st("p-2 md:p-3 flex flex-col flex-none gap-2",se==="full"?"w-full md:max-w-content md:mx-auto":""),children:[$!=null?R.jsx(Rx,{...$,handler:o}):null,($==null?void 0:$.message.selectedChoiceId)!=null?null:R.jsx(Jx,{enabled:n.enabled,handler:o,uploadUrl:(O=(de=Q==null?void 0:Q.response.payload.metadata)==null?void 0:de.uploadUrls)==null?void 0:O[0],onFileUpload:({uploadId:te,file:Ve})=>{Y(Ke=>({...Ke,[te]:Ve}))}})]})]}):R.jsx(Og,{})};return R.jsxs(wu,{theme:n.theme,colorMode:f,className:st("grid grid-cols-2 xl:grid-cols-[1fr_632px]",n.embedded?"w-full h-full":"fixed inset-0 z-touchpoint"),children:[se==="half"?R.jsx("div",{className:"hidden md:block bg-overlay"}):null,R.jsxs("div",{className:st("@container/main","w-full bg-background text-primary-80 flex relative flex-col h-full backdrop-blur-overlay",{"col-span-2 md:col-span-1":se==="half","col-span-2":se==="full"}),children:[R.jsx(SC,{windowSize:n.embedded?"embedded":se,errorThemedCloseButton:A==="voice",speakerControls:A==="voice"?{enabled:Re,setEnabled:We}:void 0,colorMode:f,brandIcon:n.brandIcon,isSettingsOpen:_,enabled:n.enabled,toggleSettings:n.enableSettings?()=>{T(de=>!de)}:void 0,renderCollapse:n.onClose!=null,collapse:ee,reset:pe}),A==="text"?le():R.jsxs(R.Fragment,{children:[_?R.jsx(Ay,{className:st("flex-none",se==="full"?"w-full md:max-w-content md:mx-auto":""),onClose:()=>{T(!1)},reset:()=>{pe(),T(!1)},handler:o}):null,R.jsx(K_,{brandIcon:n.brandIcon,handler:o,speakersEnabled:Re,colorMode:f,className:_?"hidden":"grow",context:n.initialContext,modalityComponents:fe},oe)]})]})]})});yb.displayName="App";const bb=`/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-content:"";--glow-opacity:0%}}}@layer theme{:root,:host{--color-gray-200:oklch(92.8% .006 264.531);--color-black:#000;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-normal:400;--font-weight-bold:700;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--font-sans:inherit;--backdrop-blur-overlay:48px;--container-content:640px;--radius-inner:inherit;--radius-outer:inherit;--z-index-touchpoint:1000;--z-index-launch-button:100;--color-primary-80:inherit;--color-primary-60:inherit;--color-primary-40:inherit;--color-primary-20:inherit;--color-primary-10:inherit;--color-primary-5:inherit;--color-primary-1:inherit;--color-secondary-80:inherit;--color-secondary-60:inherit;--color-secondary-40:inherit;--color-secondary-20:inherit;--color-secondary-10:inherit;--color-secondary-5:inherit;--color-secondary-1:inherit;--color-accent:inherit;--color-accent-20:inherit;--color-background:inherit;--color-overlay:inherit;--color-warning-primary:inherit;--color-warning-secondary:inherit;--color-error-primary:inherit;--color-error-secondary:inherit}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,:after,:before,::backdrop{border-color:var(--color-gray-200,currentcolor)}::file-selector-button{border-color:var(--color-gray-200,currentcolor)}button:not(:disabled),[role=button]:not(:disabled){cursor:pointer}*{font-family:var(--font-family)!important}}@layer components;@layer utilities{.\\@container\\/main{container:main/inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.-top-2{top:calc(var(--spacing)*-2)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-4{bottom:calc(var(--spacing)*4)}.bottom-\\[72px\\]{bottom:72px}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.z-10{z-index:10}.z-launch-button{z-index:var(--z-index-launch-button)}.z-touchpoint{z-index:var(--z-index-touchpoint)}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.-mx-2{margin-inline:calc(var(--spacing)*-2)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-auto{margin-inline:auto}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-10{margin-right:calc(var(--spacing)*10)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-auto{margin-left:auto}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-20{height:calc(var(--spacing)*20)}.h-24{height:calc(var(--spacing)*24)}.h-52{height:calc(var(--spacing)*52)}.h-64{height:calc(var(--spacing)*64)}.h-72{height:calc(var(--spacing)*72)}.h-\\[128px\\]{height:128px}.h-\\[360px\\]{height:360px}.h-full{height:100%}.h-px{height:1px}.max-h-\\[40vh\\]{max-height:40vh}.max-h-\\[360px\\]{max-height:360px}.max-h-full{max-height:100%}.min-h-full{min-height:100%}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-20{width:calc(var(--spacing)*20)}.w-24{width:calc(var(--spacing)*24)}.w-72{width:calc(var(--spacing)*72)}.w-80{width:calc(var(--spacing)*80)}.w-\\[128px\\]{width:128px}.w-\\[calc\\(100vw-16px\\)\\]{width:calc(100vw - 16px)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[360px\\]{max-width:360px}.max-w-content{max-width:var(--container-content)}.flex-none{flex:none}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-full{--tw-translate-y:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\\[320px_1fr\\]{grid-template-columns:320px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-px>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(1px*var(--tw-space-y-reverse));margin-block-end:calc(1px*calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing)*2)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:3.40282e38px}.rounded-inner{border-radius:var(--radius-inner)}.rounded-outer{border-radius:var(--radius-outer)}.border{border-style:var(--tw-border-style);border-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-background{border-color:var(--color-background)}.border-primary-10{border-color:var(--color-primary-10)}.bg-\\[rgb\\(40\\,41\\,47\\)\\]{background-color:#28292f}.bg-\\[rgb\\(175\\,175\\,175\\)\\]{background-color:#afafaf}.bg-accent{background-color:var(--color-accent)}.bg-background{background-color:var(--color-background)}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-current{background-color:currentColor}.bg-error-primary{background-color:var(--color-error-primary)}.bg-error-secondary{background-color:var(--color-error-secondary)}.bg-overlay{background-color:var(--color-overlay)}.bg-primary-5{background-color:var(--color-primary-5)}.bg-primary-10{background-color:var(--color-primary-10)}.bg-primary-80{background-color:var(--color-primary-80)}.bg-secondary-40{background-color:var(--color-secondary-40)}.bg-secondary-60{background-color:var(--color-secondary-60)}.bg-transparent{background-color:#0000}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-cover{object-fit:cover}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-5{padding-inline:calc(var(--spacing)*5)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-4{padding-block:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-10{padding-left:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--color-accent)}.text-accent-20{color:var(--color-accent-20)}.text-error-primary{color:var(--color-error-primary)}.text-primary-20{color:var(--color-primary-20)}.text-primary-40{color:var(--color-primary-40)}.text-primary-60{color:var(--color-primary-60)}.text-primary-80{color:var(--color-primary-80)}.text-secondary-80{color:var(--color-secondary-80)}.placeholder-primary-20::placeholder{color:var(--color-primary-20)}.placeholder-primary-40::placeholder{color:var(--color-primary-40)}.caret-accent{caret-color:var(--color-accent)}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-\\[0\\.01\\]{opacity:.01}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline-0{outline-style:var(--tw-outline-style);outline-width:0}.outline-2{outline-style:var(--tw-outline-style);outline-width:2px}.outline-accent{outline-color:var(--color-accent)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-overlay{--tw-backdrop-blur:blur(var(--backdrop-blur-overlay));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.outline-solid{--tw-outline-style:solid;outline-style:solid}.placeholder\\:text-primary-40::placeholder{color:var(--color-primary-40)}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:inset-0:before{content:var(--tw-content);inset:calc(var(--spacing)*0)}.before\\:-z-10:before{content:var(--tw-content);z-index:-10}.before\\:bg-transparent:before{content:var(--tw-content);background-color:#0000}.before\\:transition-colors:before{content:var(--tw-content);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.before\\:content-\\[\\'\\'\\]:before{--tw-content:"";content:var(--tw-content)}.after\\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:inset-0:after{content:var(--tw-content);inset:calc(var(--spacing)*0)}.after\\:rounded-outer:after{content:var(--tw-content);border-radius:var(--radius-outer)}.after\\:content-\\[\\'\\'\\]:after{--tw-content:"";content:var(--tw-content)}.last\\:h-full:last-child{height:100%}@media (hover:hover){.hover\\:bg-primary-5:hover{background-color:var(--color-primary-5)}.hover\\:bg-primary-10:hover{background-color:var(--color-primary-10)}.hover\\:bg-primary-80:hover{background-color:var(--color-primary-80)}.hover\\:bg-secondary-20:hover{background-color:var(--color-secondary-20)}.hover\\:text-primary-80:hover{color:var(--color-primary-80)}.hover\\:after\\:bg-primary-10:hover:after{content:var(--tw-content);background-color:var(--color-primary-10)}}.focus\\:outline-0:focus{outline-style:var(--tw-outline-style);outline-width:0}.focus\\:before\\:bg-primary-5:focus:before{content:var(--tw-content);background-color:var(--color-primary-5)}.focus\\:before\\:bg-primary-10:focus:before{content:var(--tw-content);background-color:var(--color-primary-10)}.focus\\:before\\:bg-primary-40:focus:before{content:var(--tw-content);background-color:var(--color-primary-40)}.focus\\:before\\:bg-primary-80:focus:before{content:var(--tw-content);background-color:var(--color-primary-80)}@media (hover:hover){.enabled\\:hover\\:before\\:bg-primary-5:enabled:hover:before{content:var(--tw-content);background-color:var(--color-primary-5)}.enabled\\:hover\\:before\\:bg-primary-10:enabled:hover:before{content:var(--tw-content);background-color:var(--color-primary-10)}.enabled\\:hover\\:before\\:bg-primary-40:enabled:hover:before{content:var(--tw-content);background-color:var(--color-primary-40)}.enabled\\:hover\\:before\\:bg-primary-80:enabled:hover:before{content:var(--tw-content);background-color:var(--color-primary-80)}}.enabled\\:active\\:before\\:bg-secondary-10:enabled:active:before{content:var(--tw-content);background-color:var(--color-secondary-10)}.disabled\\:bg-accent-20:disabled{background-color:var(--color-accent-20)}.disabled\\:bg-primary-5:disabled{background-color:var(--color-primary-5)}.disabled\\:bg-primary-10:disabled{background-color:var(--color-primary-10)}.disabled\\:bg-secondary-20:disabled{background-color:var(--color-secondary-20)}.disabled\\:text-primary-20:disabled{color:var(--color-primary-20)}.disabled\\:text-primary-40:disabled{color:var(--color-primary-40)}.disabled\\:text-secondary-40:disabled{color:var(--color-secondary-40)}@media (min-width:48rem){.md\\:absolute{position:absolute}.md\\:left-0{left:calc(var(--spacing)*0)}.md\\:-order-1{order:-1}.md\\:col-span-1{grid-column:span 1/span 1}.md\\:mx-auto{margin-inline:auto}.md\\:block{display:block}.md\\:w-fit{width:fit-content}.md\\:max-w-content{max-width:var(--container-content)}.md\\:-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.md\\:translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.md\\:transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.md\\:flex-col{flex-direction:column}.md\\:p-3{padding:calc(var(--spacing)*3)}}@media (min-width:80rem){.xl\\:grid-cols-\\[1fr_632px\\]{grid-template-columns:1fr 632px}}@container main (min-width:48rem){.\\@3xl\\/main\\:absolute{position:absolute}.\\@3xl\\/main\\:top-0{top:calc(var(--spacing)*0)}.\\@3xl\\/main\\:right-0{right:calc(var(--spacing)*0)}.\\@3xl\\/main\\:left-0{left:calc(var(--spacing)*0)}}}@property --glow-opacity{syntax:"<percentage>";inherits:false;initial-value:0%}.fullscreen-error svg{--glow-opacity:0%;filter:drop-shadow(0 0 6px #0000);animation:3s infinite error-glow}@supports (color:color-mix(in lab,red,red)){.fullscreen-error svg{filter:drop-shadow(0 0 6px color-mix(in srgb,transparent,var(--accent)var(--glow-opacity)))}}@keyframes error-glow{0%{color:var(--primary);fill-opacity:.08;--glow-opacity:0%}22%{color:var(--primary);fill-opacity:.08;--glow-opacity:0%}35%{color:var(--accent);fill-opacity:.8;--glow-opacity:60%}45%{color:var(--accent);fill-opacity:.7;--glow-opacity:30%}55%{color:var(--accent);fill-opacity:.6;--glow-opacity:60%}60%{color:var(--primary);fill-opacity:.08;--glow-opacity:0%}to{color:var(--primary);fill-opacity:.08;--glow-opacity:0%}}.markdown ul{list-style-type:disc;list-style-position:inside}.markdown ol{list-style-type:decimal;list-style-position:inside}.markdown hr{border-color:var(--color-primary-20)}.markdown a{text-decoration-line:underline}.markdown h1,.markdown h2,.markdown h3{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}`,la=({children:n,className:e,faded:t})=>R.jsx("p",{className:st("text-base",t?"text-primary-60":"text-primary-80",e),children:n}),kb=({children:n,className:e})=>R.jsx("p",{className:st("text-sm text-primary-60",e),children:n});/*! *****************************************************************************
166
+ `);console.error(J)}})},P.getInstance=function(y){P.isLoading||(P.isLoading=!0,P.loadRuntime()),P.runtime?y(P.runtime):P.callBackQueue.push(y)},P.awaitInstance=function(){return new Promise(function(y){return P.getInstance(function(S){return y(S)})})},P.setWasmUrl=function(y){P.wasmURL=y},P.getWasmUrl=function(){return P.wasmURL},P.isLoading=!1,P.callBackQueue=[],P.wasmURL="https://unpkg.com/".concat(u.name,"@").concat(u.version,"/rive.wasm"),P}(),F;(function(P){P[P.Number=56]="Number",P[P.Trigger=58]="Trigger",P[P.Boolean=59]="Boolean"})(F||(F={}));var G=function(){function P(y,S){this.type=y,this.runtimeInput=S}return Object.defineProperty(P.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(y){this.runtimeInput.value=y},enumerable:!1,configurable:!0}),P.prototype.fire=function(){this.type===F.Trigger&&this.runtimeInput.fire()},P.prototype.delete=function(){this.runtimeInput=null},P}(),se;(function(P){P[P.General=128]="General",P[P.OpenUrl=131]="OpenUrl"})(se||(se={}));var Q=function(){function P(y){this.nativeArtboard=y}return P}(),$=function(){function P(y,S,M,J){this.stateMachine=y,this.playing=M,this.artboard=J,this.inputs=[],this.instance=new S.StateMachineInstance(y,J),this.initInputs(S)}return Object.defineProperty(P.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"statesChanged",{get:function(){for(var y=[],S=0;S<this.instance.stateChangedCount();S++)y.push(this.instance.stateChangedNameByIndex(S));return y},enumerable:!1,configurable:!0}),P.prototype.advance=function(y){this.instance.advance(y)},P.prototype.advanceAndApply=function(y){this.instance.advanceAndApply(y)},P.prototype.reportedEventCount=function(){return this.instance.reportedEventCount()},P.prototype.reportedEventAt=function(y){return this.instance.reportedEventAt(y)},P.prototype.initInputs=function(y){for(var S=0;S<this.instance.inputCount();S++){var M=this.instance.input(S);this.inputs.push(this.mapRuntimeInput(M,y))}},P.prototype.mapRuntimeInput=function(y,S){if(y.type===S.SMIInput.bool)return new G(F.Boolean,y.asBool());if(y.type===S.SMIInput.number)return new G(F.Number,y.asNumber());if(y.type===S.SMIInput.trigger)return new G(F.Trigger,y.asTrigger())},P.prototype.cleanup=function(){this.inputs.forEach(function(y){y.delete()}),this.inputs.length=0,this.instance.delete()},P.prototype.bindViewModelInstance=function(y){y.runtimeInstance!=null&&this.instance.bindViewModelInstance(y.runtimeInstance)},P}(),q=function(){function P(y,S,M,J,ue){J===void 0&&(J=[]),ue===void 0&&(ue=[]),this.runtime=y,this.artboard=S,this.eventManager=M,this.animations=J,this.stateMachines=ue}return P.prototype.add=function(y,S,M){if(M===void 0&&(M=!0),y=_n(y),y.length===0)this.animations.forEach(function(Rt){return Rt.playing=S}),this.stateMachines.forEach(function(Rt){return Rt.playing=S});else for(var J=this.animations.map(function(Rt){return Rt.name}),ue=this.stateMachines.map(function(Rt){return Rt.name}),be=0;be<y.length;be++){var Ge=J.indexOf(y[be]),it=ue.indexOf(y[be]);if(Ge>=0||it>=0)Ge>=0?this.animations[Ge].playing=S:this.stateMachines[it].playing=S;else{var Le=this.artboard.animationByName(y[be]);if(Le){var at=new f.Animation(Le,this.artboard,this.runtime,S);at.advance(0),at.apply(1),this.animations.push(at)}else{var Pt=this.artboard.stateMachineByName(y[be]);if(Pt){var Yt=new $(Pt,this.runtime,S,this.artboard);this.stateMachines.push(Yt)}}}}return M&&(S?this.eventManager.fire({type:Y.Play,data:this.playing}):this.eventManager.fire({type:Y.Pause,data:this.paused})),S?this.playing:this.paused},P.prototype.initLinearAnimations=function(y,S){for(var M=this.animations.map(function(it){return it.name}),J=0;J<y.length;J++){var ue=M.indexOf(y[J]);if(ue>=0)this.animations[ue].playing=S;else{var be=this.artboard.animationByName(y[J]);if(be){var Ge=new f.Animation(be,this.artboard,this.runtime,S);Ge.advance(0),Ge.apply(1),this.animations.push(Ge)}else console.error("Animation with name ".concat(y[J]," not found."))}}},P.prototype.initStateMachines=function(y,S){for(var M=this.stateMachines.map(function(it){return it.name}),J=0;J<y.length;J++){var ue=M.indexOf(y[J]);if(ue>=0)this.stateMachines[ue].playing=S;else{var be=this.artboard.stateMachineByName(y[J]);if(be){var Ge=new $(be,this.runtime,S,this.artboard);this.stateMachines.push(Ge)}else console.warn("State Machine with name ".concat(y[J]," not found.")),this.initLinearAnimations([y[J]],S)}}},P.prototype.play=function(y){return this.add(y,!0)},P.prototype.advanceIfPaused=function(){this.stateMachines.forEach(function(y){y.playing||y.advanceAndApply(0)})},P.prototype.pause=function(y){return this.add(y,!1)},P.prototype.scrub=function(y,S){var M=this.animations.filter(function(J){return y.includes(J.name)});return M.forEach(function(J){return J.scrubTo=S}),M.map(function(J){return J.name})},Object.defineProperty(P.prototype,"playing",{get:function(){return this.animations.filter(function(y){return y.playing}).map(function(y){return y.name}).concat(this.stateMachines.filter(function(y){return y.playing}).map(function(y){return y.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"paused",{get:function(){return this.animations.filter(function(y){return!y.playing}).map(function(y){return y.name}).concat(this.stateMachines.filter(function(y){return!y.playing}).map(function(y){return y.name}))},enumerable:!1,configurable:!0}),P.prototype.stop=function(y){var S=this;y=_n(y);var M=[];if(y.length===0)M=this.animations.map(function(be){return be.name}).concat(this.stateMachines.map(function(be){return be.name})),this.animations.forEach(function(be){return be.cleanup()}),this.stateMachines.forEach(function(be){return be.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var J=this.animations.filter(function(be){return y.includes(be.name)});J.forEach(function(be){be.cleanup(),S.animations.splice(S.animations.indexOf(be),1)});var ue=this.stateMachines.filter(function(be){return y.includes(be.name)});ue.forEach(function(be){be.cleanup(),S.stateMachines.splice(S.stateMachines.indexOf(be),1)}),M=J.map(function(be){return be.name}).concat(ue.map(function(be){return be.name}))}return this.eventManager.fire({type:Y.Stop,data:M}),M},Object.defineProperty(P.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(y,S){return y||S.playing},!1)||this.stateMachines.reduce(function(y,S){return y||S.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),P.prototype.atLeastOne=function(y,S){S===void 0&&(S=!0);var M;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([M=this.artboard.animationByIndex(0).name],y,S):this.artboard.stateMachineCount()>0&&this.add([M=this.artboard.stateMachineByIndex(0).name],y,S)),M},P.prototype.handleLooping=function(){for(var y=0,S=this.animations.filter(function(J){return J.playing});y<S.length;y++){var M=S[y];M.loopValue===0&&M.loopCount?(M.loopCount=0,this.stop(M.name)):M.loopValue===1&&M.loopCount?(this.eventManager.fire({type:Y.Loop,data:{animation:M.name,type:fe.Loop}}),M.loopCount=0):M.loopValue===2&&M.loopCount>1&&(this.eventManager.fire({type:Y.Loop,data:{animation:M.name,type:fe.PingPong}}),M.loopCount=0)}},P.prototype.handleStateChanges=function(){for(var y=[],S=0,M=this.stateMachines.filter(function(ue){return ue.playing});S<M.length;S++){var J=M[S];y.push.apply(y,J.statesChanged)}y.length>0&&this.eventManager.fire({type:Y.StateChange,data:y})},P.prototype.handleAdvancing=function(y){this.eventManager.fire({type:Y.Advance,data:y})},P}(),Y;(function(P){P.Load="load",P.LoadError="loaderror",P.Play="play",P.Pause="pause",P.Stop="stop",P.Loop="loop",P.Draw="draw",P.Advance="advance",P.StateChange="statechange",P.RiveEvent="riveevent",P.AudioStatusChange="audiostatuschange"})(Y||(Y={}));var fe;(function(P){P.OneShot="oneshot",P.Loop="loop",P.PingPong="pingpong"})(fe||(fe={}));var Re=function(){function P(y){y===void 0&&(y=[]),this.listeners=y}return P.prototype.getListeners=function(y){return this.listeners.filter(function(S){return S.type===y})},P.prototype.add=function(y){this.listeners.includes(y)||this.listeners.push(y)},P.prototype.remove=function(y){for(var S=0;S<this.listeners.length;S++){var M=this.listeners[S];if(M.type===y.type&&M.callback===y.callback){this.listeners.splice(S,1);break}}},P.prototype.removeAll=function(y){var S=this;y?this.listeners.filter(function(M){return M.type===y}).forEach(function(M){return S.remove(M)}):this.listeners.splice(0,this.listeners.length)},P.prototype.fire=function(y){var S=this.getListeners(y.type);S.forEach(function(M){return M.callback(y)})},P}(),We=function(){function P(y){this.eventManager=y,this.queue=[]}return P.prototype.add=function(y){this.queue.push(y)},P.prototype.process=function(){for(;this.queue.length>0;){var y=this.queue.shift();y!=null&&y.action&&y.action(),y!=null&&y.event&&this.eventManager.fire(y.event)}},P}(),oe;(function(P){P[P.AVAILABLE=0]="AVAILABLE",P[P.UNAVAILABLE=1]="UNAVAILABLE"})(oe||(oe={}));var Ie=function(P){g(y,P);function y(){var S=P!==null&&P.apply(this,arguments)||this;return S._started=!1,S._enabled=!1,S._status=oe.UNAVAILABLE,S}return y.prototype.delay=function(S){return _(this,void 0,void 0,function(){return T(this,function(M){return[2,new Promise(function(J){return setTimeout(J,S)})]})})},y.prototype.timeout=function(){return _(this,void 0,void 0,function(){return T(this,function(S){return[2,new Promise(function(M,J){return setTimeout(J,50)})]})})},y.prototype.reportToListeners=function(){this.fire({type:Y.AudioStatusChange}),this.removeAll()},y.prototype.enableAudio=function(){return _(this,void 0,void 0,function(){return T(this,function(S){return this._enabled||(this._enabled=!0,this._status=oe.AVAILABLE,this.reportToListeners()),[2]})})},y.prototype.testAudio=function(){return _(this,void 0,void 0,function(){return T(this,function(S){switch(S.label){case 0:if(!(this._status===oe.UNAVAILABLE&&this._audioContext!==null))return[3,4];S.label=1;case 1:return S.trys.push([1,3,,4]),[4,Promise.race([this._audioContext.resume(),this.timeout()])];case 2:return S.sent(),this.enableAudio(),[3,4];case 3:return S.sent(),[3,4];case 4:return[2]}})})},y.prototype._establishAudio=function(){return _(this,void 0,void 0,function(){return T(this,function(S){switch(S.label){case 0:return this._started?[3,5]:(this._started=!0,typeof window>"u"?(this.enableAudio(),[3,5]):[3,1]);case 1:this._audioContext=new AudioContext,this.listenForUserAction(),S.label=2;case 2:return this._status!==oe.UNAVAILABLE?[3,5]:[4,this.testAudio()];case 3:return S.sent(),[4,this.delay(1e3)];case 4:return S.sent(),[3,2];case 5:return[2]}})})},y.prototype.listenForUserAction=function(){var S=this,M=function(){return _(S,void 0,void 0,function(){return T(this,function(J){return this.enableAudio(),[2]})})};document.addEventListener("pointerdown",M,{once:!0})},y.prototype.establishAudio=function(){return _(this,void 0,void 0,function(){return T(this,function(S){return this._establishAudio(),[2]})})},Object.defineProperty(y.prototype,"systemVolume",{get:function(){return this._status===oe.UNAVAILABLE?(this.testAudio(),0):1},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),y}(Re),pe=new Ie,le=function(){function P(){}return P.prototype.observe=function(){},P.prototype.unobserve=function(){},P.prototype.disconnect=function(){},P}(),_e=globalThis.ResizeObserver||le,de=function(){function P(){var y=this;this._elementsMap=new Map,this._onObservedEntry=function(S){var M=y._elementsMap.get(S.target);M!==null?M.onResize(S.target.clientWidth==0||S.target.clientHeight==0):y._resizeObserver.unobserve(S.target)},this._onObserved=function(S){S.forEach(y._onObservedEntry)},this._resizeObserver=new _e(this._onObserved)}return P.prototype.add=function(y,S){var M={onResize:S,element:y};return this._elementsMap.set(y,M),this._resizeObserver.observe(y),M},P.prototype.remove=function(y){this._resizeObserver.unobserve(y.element),this._elementsMap.delete(y.element)},P}(),O=new de,te=function(){function P(y){this.enableRiveAssetCDN=!0,this.referenceCount=0,this.destroyed=!1,this.selfUnref=!1,this.src=y.src,this.buffer=y.buffer,y.assetLoader&&(this.assetLoader=y.assetLoader),this.enableRiveAssetCDN=typeof y.enableRiveAssetCDN=="boolean"?y.enableRiveAssetCDN:!0,this.eventManager=new Re,y.onLoad&&this.on(Y.Load,y.onLoad),y.onLoadError&&this.on(Y.LoadError,y.onLoadError)}return P.prototype.releaseFile=function(){var y;this.selfUnref&&((y=this.file)===null||y===void 0||y.unref()),this.file=null},P.prototype.initData=function(){return _(this,void 0,void 0,function(){var y,S,M,J,ue;return T(this,function(be){switch(be.label){case 0:return this.src?(y=this,[4,ha(this.src)]):[3,2];case 1:y.buffer=be.sent(),be.label=2;case 2:return this.destroyed?[2]:(this.assetLoader&&(M=new p.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader),S=M.assetLoader),J=this,[4,this.runtime.load(new Uint8Array(this.buffer),S,this.enableRiveAssetCDN)]);case 3:return J.file=be.sent(),ue=new p.FileFinalizer(this.file),p.finalizationRegistry.register(this,ue),this.destroyed?(this.releaseFile(),[2]):(this.file!==null?this.eventManager.fire({type:Y.Load,data:this}):this.fireLoadError(P.fileLoadErrorMessage),[2])}})})},P.prototype.init=function(){return _(this,void 0,void 0,function(){var y,S;return T(this,function(M){switch(M.label){case 0:if(!this.src&&!this.buffer)return this.fireLoadError(P.missingErrorMessage),[2];M.label=1;case 1:return M.trys.push([1,4,,5]),y=this,[4,L.awaitInstance()];case 2:return y.runtime=M.sent(),this.destroyed?[2]:[4,this.initData()];case 3:return M.sent(),[3,5];case 4:return S=M.sent(),this.fireLoadError(S instanceof Error?S.message:P.fileLoadErrorMessage),[3,5];case 5:return[2]}})})},P.prototype.fireLoadError=function(y){throw this.eventManager.fire({type:Y.LoadError,data:y}),new Error(y)},P.prototype.on=function(y,S){this.eventManager.add({type:y,callback:S})},P.prototype.off=function(y,S){this.eventManager.remove({type:y,callback:S})},P.prototype.cleanup=function(){this.referenceCount-=1,this.referenceCount<=0&&(this.removeAllRiveEventListeners(),this.releaseFile(),this.destroyed=!0)},P.prototype.removeAllRiveEventListeners=function(y){this.eventManager.removeAll(y)},P.prototype.getInstance=function(){if(this.file!==null)return this.referenceCount+=1,this.file},P.prototype.destroyIfUnused=function(){this.referenceCount<=0&&this.cleanup()},P.prototype.getArtboard=function(y){var S=this.file.artboardByName(y);return S!=null?new Q(S):null},P.missingErrorMessage="Rive source file or data buffer required",P.fileLoadErrorMessage="The file failed to load",P}(),Ve=function(){function P(y){var S=this,M;this.loaded=!1,this.destroyed=!1,this._observed=null,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this.shouldDisableRiveListeners=!1,this.automaticallyHandleEvents=!1,this.enableRiveAssetCDN=!0,this._volume=1,this._artboardWidth=void 0,this._artboardHeight=void 0,this._devicePixelRatioUsed=1,this._hasZeroSize=!1,this._audioEventListener=null,this._boundDraw=null,this._viewModelInstance=null,this._dataEnums=null,this.durations=[],this.frameTimes=[],this.frameCount=0,this.isTouchScrollEnabled=!1,this.onCanvasResize=function(J){var ue=S._hasZeroSize!==J;S._hasZeroSize=J,J?(!S._layout.maxX||!S._layout.maxY)&&S.resizeToCanvas():ue&&S.resizeDrawingSurfaceToCanvas()},this.renderSecondTimer=0,this._boundDraw=this.draw.bind(this),this.canvas=y.canvas,y.canvas.constructor===HTMLCanvasElement&&(this._observed=O.add(this.canvas,this.onCanvasResize)),this.src=y.src,this.buffer=y.buffer,this.riveFile=y.riveFile,this.layout=(M=y.layout)!==null&&M!==void 0?M:new U,this.shouldDisableRiveListeners=!!y.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!y.isTouchScrollEnabled,this.automaticallyHandleEvents=!!y.automaticallyHandleEvents,this.enableRiveAssetCDN=y.enableRiveAssetCDN===void 0?!0:y.enableRiveAssetCDN,this.eventManager=new Re,y.onLoad&&this.on(Y.Load,y.onLoad),y.onLoadError&&this.on(Y.LoadError,y.onLoadError),y.onPlay&&this.on(Y.Play,y.onPlay),y.onPause&&this.on(Y.Pause,y.onPause),y.onStop&&this.on(Y.Stop,y.onStop),y.onLoop&&this.on(Y.Loop,y.onLoop),y.onStateChange&&this.on(Y.StateChange,y.onStateChange),y.onAdvance&&this.on(Y.Advance,y.onAdvance),y.onload&&!y.onLoad&&this.on(Y.Load,y.onload),y.onloaderror&&!y.onLoadError&&this.on(Y.LoadError,y.onloaderror),y.onplay&&!y.onPlay&&this.on(Y.Play,y.onplay),y.onpause&&!y.onPause&&this.on(Y.Pause,y.onpause),y.onstop&&!y.onStop&&this.on(Y.Stop,y.onstop),y.onloop&&!y.onLoop&&this.on(Y.Loop,y.onloop),y.onstatechange&&!y.onStateChange&&this.on(Y.StateChange,y.onstatechange),y.assetLoader&&(this.assetLoader=y.assetLoader),this.taskQueue=new We(this.eventManager),this.init({src:this.src,buffer:this.buffer,riveFile:this.riveFile,autoplay:y.autoplay,autoBind:y.autoBind,animations:y.animations,stateMachines:y.stateMachines,artboard:y.artboard,useOffscreenRenderer:y.useOffscreenRenderer})}return Object.defineProperty(P.prototype,"viewModelCount",{get:function(){return this.file.viewModelCount()},enumerable:!1,configurable:!0}),P.new=function(y){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new P(y)},P.prototype.onSystemAudioChanged=function(){this.volume=this._volume},P.prototype.init=function(y){var S=this,M=y.src,J=y.buffer,ue=y.riveFile,be=y.animations,Ge=y.stateMachines,it=y.artboard,Le=y.autoplay,at=Le===void 0?!1:Le,Pt=y.useOffscreenRenderer,Yt=Pt===void 0?!1:Pt,Rt=y.autoBind,Xn=Rt===void 0?!1:Rt;if(!this.destroyed){if(this.src=M,this.buffer=J,this.riveFile=ue,!this.src&&!this.buffer&&!this.riveFile)throw new A(P.missingErrorMessage);var An=_n(be),xn=_n(Ge);this.loaded=!1,this.readyForPlaying=!1,L.awaitInstance().then(function(on){S.destroyed||(S.runtime=on,S.removeRiveListeners(),S.deleteRiveRenderer(),S.renderer=S.runtime.makeRenderer(S.canvas,Yt),S.canvas.width||S.canvas.height||S.resizeDrawingSurfaceToCanvas(),S.initData(it,An,xn,at,Xn).then(function(dn){if(dn)return S.setupRiveListeners()}).catch(function(dn){console.error(dn)}))}).catch(function(on){console.error(on)})}},P.prototype.setupRiveListeners=function(y){var S=this;if(this.eventCleanup&&this.eventCleanup(),!this.shouldDisableRiveListeners){var M=(this.animator.stateMachines||[]).filter(function(ue){return ue.playing&&S.runtime.hasListeners(ue.instance)}).map(function(ue){return ue.instance}),J=this.isTouchScrollEnabled;y&&"isTouchScrollEnabled"in y&&(J=y.isTouchScrollEnabled),this.eventCleanup=(0,p.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:M,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime),isTouchScrollEnabled:J,layoutScaleFactor:this._layout.layoutScaleFactor})}},P.prototype.removeRiveListeners=function(){this.eventCleanup&&(this.eventCleanup(),this.eventCleanup=null)},P.prototype.initializeAudio=function(){var y=this,S;pe.status==oe.UNAVAILABLE&&!((S=this.artboard)===null||S===void 0)&&S.hasAudio&&this._audioEventListener===null&&(this._audioEventListener={type:Y.AudioStatusChange,callback:function(){return y.onSystemAudioChanged()}},pe.add(this._audioEventListener),pe.establishAudio())},P.prototype.initArtboardSize=function(){this.artboard&&(this._artboardWidth=this.artboard.width=this._artboardWidth||this.artboard.width,this._artboardHeight=this.artboard.height=this._artboardHeight||this.artboard.height)},P.prototype.initData=function(y,S,M,J,ue){return _(this,void 0,void 0,function(){var be,Ge,it,Le;return T(this,function(at){switch(at.label){case 0:return at.trys.push([0,3,,4]),this.riveFile!=null?[3,2]:(be=new te({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader}),this.riveFile=be,[4,be.init()]);case 1:if(at.sent(),this.destroyed)return be.destroyIfUnused(),[2,!1];at.label=2;case 2:return this.file=this.riveFile.getInstance(),this.initArtboard(y,S,M,J,ue),this.initArtboardSize(),this.initializeAudio(),this.loaded=!0,this.eventManager.fire({type:Y.Load,data:(Le=this.src)!==null&&Le!==void 0?Le:"buffer"}),this.animator.advanceIfPaused(),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,!0];case 3:return Ge=at.sent(),it=H(Ge),console.warn(it),this.eventManager.fire({type:Y.LoadError,data:it}),[2,Promise.reject(it)];case 4:return[2]}})})},P.prototype.initArtboard=function(y,S,M,J,ue){if(this.file){var be=y?this.file.artboardByName(y):this.file.defaultArtboard();if(!be){var Ge="Invalid artboard name or no default artboard";console.warn(Ge),this.eventManager.fire({type:Y.LoadError,data:Ge});return}this.artboard=be,be.volume=this._volume*pe.systemVolume,this.animator=new q(this.runtime,this.artboard,this.eventManager);var it;if(S.length>0||M.length>0?(it=S.concat(M),this.animator.initLinearAnimations(S,J),this.animator.initStateMachines(M,J)):it=[this.animator.atLeastOne(J,!1)],this.taskQueue.add({event:{type:J?Y.Play:Y.Pause,data:it}}),ue){var Le=this.file.defaultArtboardViewModel(be);if(Le!==null){var at=Le.defaultInstance();if(at!==null){var Pt=new tt(at,null);this.bindViewModelInstance(Pt)}}}}},P.prototype.drawFrame=function(){var y,S;!((y=document==null?void 0:document.timeline)===null||y===void 0)&&y.currentTime?this.loaded&&this.artboard&&!this.frameRequestId&&(this._boundDraw(document.timeline.currentTime),(S=this.runtime)===null||S===void 0||S.resolveAnimationFrame()):this.startRendering()},P.prototype.draw=function(y,S){var M;this.frameRequestId=null;var J=performance.now();this.lastRenderTime||(this.lastRenderTime=y),this.renderSecondTimer+=y-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,S==null||S());var ue=(y-this.lastRenderTime)/1e3;this.lastRenderTime=y;for(var be=this.animator.animations.filter(function(er){return er.playing||er.needsScrub}).sort(function(er){return er.needsScrub?-1:1}),Ge=0,it=be;Ge<it.length;Ge++){var Le=it[Ge];Le.advance(ue),Le.instance.didLoop&&(Le.loopCount+=1),Le.apply(1)}for(var at=this.animator.stateMachines.filter(function(er){return er.playing}),Pt=0,Yt=at;Pt<Yt.length;Pt++){var Rt=Yt[Pt],Xn=Rt.reportedEventCount();if(Xn)for(var An=0;An<Xn;An++){var xn=Rt.reportedEventAt(An);if(xn)if(xn.type===se.OpenUrl){if(this.eventManager.fire({type:Y.RiveEvent,data:xn}),this.automaticallyHandleEvents){var on=document.createElement("a"),dn=xn,Lr=dn.url,et=dn.target,Dr=(0,p.sanitizeUrl)(Lr);Lr&&on.setAttribute("href",Dr),et&&on.setAttribute("target",et),Dr&&Dr!==p.BLANK_URL&&on.click()}}else this.eventManager.fire({type:Y.RiveEvent,data:xn})}Rt.advanceAndApply(ue)}this.animator.stateMachines.length==0&&this.artboard.advance(ue);var Zn=this.renderer;Zn.clear(),Zn.save(),this.alignRenderer(),this._hasZeroSize||this.artboard.draw(Zn),Zn.restore(),Zn.flush(),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(ue),this.frameCount++;var mt=performance.now();for(this.frameTimes.push(mt),this.durations.push(mt-J);this.frameTimes[0]<=mt-1e3;)this.frameTimes.shift(),this.durations.shift();(M=this._viewModelInstance)===null||M===void 0||M.handleCallbacks(),this.animator.isPlaying?this.startRendering():this.animator.isPaused?this.lastRenderTime=0:this.animator.isStopped&&(this.lastRenderTime=0)},P.prototype.alignRenderer=function(){var y=this,S=y.renderer,M=y.runtime,J=y._layout,ue=y.artboard;S.align(J.runtimeFit(M),J.runtimeAlignment(M),{minX:J.minX,minY:J.minY,maxX:J.maxX,maxY:J.maxY},ue.bounds,this._devicePixelRatioUsed*J.layoutScaleFactor)},Object.defineProperty(P.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"frameTime",{get:function(){return this.durations.length===0?0:(this.durations.reduce(function(y,S){return y+S},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),P.prototype.cleanup=function(){var y,S;this.destroyed=!0,this.stopRendering(),this.cleanupInstances(),this._observed!==null&&O.remove(this._observed),this.removeRiveListeners(),this.file&&((y=this.riveFile)===null||y===void 0||y.cleanup(),this.file=null),this.riveFile=null,this.deleteRiveRenderer(),this._audioEventListener!==null&&(pe.remove(this._audioEventListener),this._audioEventListener=null),(S=this._viewModelInstance)===null||S===void 0||S.cleanup(),this._viewModelInstance=null,this._dataEnums=null},P.prototype.deleteRiveRenderer=function(){var y;(y=this.renderer)===null||y===void 0||y.delete(),this.renderer=null},P.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},P.prototype.retrieveTextRun=function(y){var S;if(!y){console.warn("No text run name provided");return}if(!this.artboard){console.warn("Tried to access text run, but the Artboard is null");return}var M=this.artboard.textRun(y);if(!M){console.warn("Could not access a text run with name '".concat(y,"' in the '").concat((S=this.artboard)===null||S===void 0?void 0:S.name,"' Artboard. Note that you must rename a text run node in the Rive editor to make it queryable at runtime."));return}return M},P.prototype.getTextRunValue=function(y){var S=this.retrieveTextRun(y);return S?S.text:void 0},P.prototype.setTextRunValue=function(y,S){var M=this.retrieveTextRun(y);M&&(M.text=S)},P.prototype.play=function(y,S){var M=this;if(y=_n(y),!this.readyForPlaying){this.taskQueue.add({action:function(){return M.play(y,S)}});return}this.animator.play(y),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},P.prototype.pause=function(y){var S=this;if(y=_n(y),!this.readyForPlaying){this.taskQueue.add({action:function(){return S.pause(y)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(y)},P.prototype.scrub=function(y,S){var M=this;if(y=_n(y),!this.readyForPlaying){this.taskQueue.add({action:function(){return M.scrub(y,S)}});return}this.animator.scrub(y,S||0),this.drawFrame()},P.prototype.stop=function(y){var S=this;if(y=_n(y),!this.readyForPlaying){this.taskQueue.add({action:function(){return S.stop(y)}});return}this.animator&&this.animator.stop(y),this.eventCleanup&&this.eventCleanup()},P.prototype.reset=function(y){var S,M,J=y==null?void 0:y.artboard,ue=_n(y==null?void 0:y.animations),be=_n(y==null?void 0:y.stateMachines),Ge=(S=y==null?void 0:y.autoplay)!==null&&S!==void 0?S:!1,it=(M=y==null?void 0:y.autoBind)!==null&&M!==void 0?M:!1;this.cleanupInstances(),this.initArtboard(J,ue,be,Ge,it),this.taskQueue.process()},P.prototype.load=function(y){this.file=null,this.stop(),this.init(y)},Object.defineProperty(P.prototype,"layout",{get:function(){return this._layout},set:function(y){this._layout=y,(!y.maxX||!y.maxY)&&this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),P.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},P.prototype.resizeDrawingSurfaceToCanvas=function(y){if(this.canvas instanceof HTMLCanvasElement&&window){var S=this.canvas.getBoundingClientRect(),M=S.width,J=S.height,ue=y||window.devicePixelRatio||1;if(this.devicePixelRatioUsed=ue,this.canvas.width=ue*M,this.canvas.height=ue*J,this.resizeToCanvas(),this.drawFrame(),this.layout.fit===z.Layout){var be=this._layout.layoutScaleFactor;this.artboard.width=M/be,this.artboard.height=J/be}}},Object.defineProperty(P.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"animationNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var y=[],S=0;S<this.artboard.animationCount();S++)y.push(this.artboard.animationByIndex(S).name);return y},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"stateMachineNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var y=[],S=0;S<this.artboard.stateMachineCount();S++)y.push(this.artboard.stateMachineByIndex(S).name);return y},enumerable:!1,configurable:!0}),P.prototype.stateMachineInputs=function(y){if(this.loaded){var S=this.animator.stateMachines.find(function(M){return M.name===y});return S==null?void 0:S.inputs}},P.prototype.retrieveInputAtPath=function(y,S){if(!y){console.warn("No input name provided for path '".concat(S,"'"));return}if(!this.artboard){console.warn("Tried to access input: '".concat(y,"', at path: '").concat(S,"', but the Artboard is null"));return}var M=this.artboard.inputByPath(y,S);if(!M){console.warn("Could not access an input with name: '".concat(y,"', at path:'").concat(S,"'"));return}return M},P.prototype.setBooleanStateAtPath=function(y,S,M){var J=this.retrieveInputAtPath(y,M);J&&(J.type===F.Boolean?J.asBool().value=S:console.warn("Input with name: '".concat(y,"', at path:'").concat(M,"' is not a boolean")))},P.prototype.setNumberStateAtPath=function(y,S,M){var J=this.retrieveInputAtPath(y,M);J&&(J.type===F.Number?J.asNumber().value=S:console.warn("Input with name: '".concat(y,"', at path:'").concat(M,"' is not a number")))},P.prototype.fireStateAtPath=function(y,S){var M=this.retrieveInputAtPath(y,S);M&&(M.type===F.Trigger?M.asTrigger().fire():console.warn("Input with name: '".concat(y,"', at path:'").concat(S,"' is not a trigger")))},P.prototype.retrieveTextAtPath=function(y,S){if(!y){console.warn("No text name provided for path '".concat(S,"'"));return}if(!S){console.warn("No path provided for text '".concat(y,"'"));return}if(!this.artboard){console.warn("Tried to access text: '".concat(y,"', at path: '").concat(S,"', but the Artboard is null"));return}var M=this.artboard.textByPath(y,S);if(!M){console.warn("Could not access text with name: '".concat(y,"', at path:'").concat(S,"'"));return}return M},P.prototype.getTextRunValueAtPath=function(y,S){var M=this.retrieveTextAtPath(y,S);if(!M){console.warn("Could not get text with name: '".concat(y,"', at path:'").concat(S,"'"));return}return M.text},P.prototype.setTextRunValueAtPath=function(y,S,M){var J=this.retrieveTextAtPath(y,M);if(!J){console.warn("Could not set text with name: '".concat(y,"', at path:'").concat(M,"'"));return}J.text=S},Object.defineProperty(P.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(y){return y.playing}).map(function(y){return y.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(y){return y.playing}).map(function(y){return y.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(y){return!y.playing}).map(function(y){return y.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(y){return!y.playing}).map(function(y){return y.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),P.prototype.on=function(y,S){this.eventManager.add({type:y,callback:S})},P.prototype.off=function(y,S){this.eventManager.remove({type:y,callback:S})},P.prototype.unsubscribe=function(y,S){console.warn("This function is deprecated: please use `off()` instead."),this.off(y,S)},P.prototype.removeAllRiveEventListeners=function(y){this.eventManager.removeAll(y)},P.prototype.unsubscribeAll=function(y){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(y)},P.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},P.prototype.startRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.runtime.requestAnimationFrame?this.frameRequestId=this.runtime.requestAnimationFrame(this._boundDraw):this.frameRequestId=requestAnimationFrame(this._boundDraw))},P.prototype.enableFPSCounter=function(y){this.runtime.enableFPSCounter(y)},P.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(P.prototype,"contents",{get:function(){if(this.loaded){for(var y={artboards:[]},S=0;S<this.file.artboardCount();S++){for(var M=this.file.artboardByIndex(S),J={name:M.name,animations:[],stateMachines:[]},ue=0;ue<M.animationCount();ue++){var be=M.animationByIndex(ue);J.animations.push(be.name)}for(var Ge=0;Ge<M.stateMachineCount();Ge++){for(var it=M.stateMachineByIndex(Ge),Le=it.name,at=new this.runtime.StateMachineInstance(it,M),Pt=[],Yt=0;Yt<at.inputCount();Yt++){var Rt=at.input(Yt);Pt.push({name:Rt.name,type:Rt.type})}J.stateMachines.push({name:Le,inputs:Pt})}y.artboards.push(J)}return y}},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"volume",{get:function(){return this.artboard&&this.artboard.volume!==this._volume&&(this._volume=this.artboard.volume),this._volume},set:function(y){this._volume=y,this.artboard&&(this.artboard.volume=y*pe.systemVolume)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"artboardWidth",{get:function(){var y;return this.artboard?this.artboard.width:(y=this._artboardWidth)!==null&&y!==void 0?y:0},set:function(y){this._artboardWidth=y,this.artboard&&(this.artboard.width=y)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"artboardHeight",{get:function(){var y;return this.artboard?this.artboard.height:(y=this._artboardHeight)!==null&&y!==void 0?y:0},set:function(y){this._artboardHeight=y,this.artboard&&(this.artboard.height=y)},enumerable:!1,configurable:!0}),P.prototype.resetArtboardSize=function(){this.artboard?(this.artboard.resetArtboardSize(),this._artboardWidth=this.artboard.width,this._artboardHeight=this.artboard.height):(this._artboardWidth=void 0,this._artboardHeight=void 0)},Object.defineProperty(P.prototype,"devicePixelRatioUsed",{get:function(){return this._devicePixelRatioUsed},set:function(y){this._devicePixelRatioUsed=y},enumerable:!1,configurable:!0}),P.prototype.bindViewModelInstance=function(y){var S;this.artboard&&!this.destroyed&&y&&y.runtimeInstance&&(y.internalIncrementReferenceCount(),(S=this._viewModelInstance)===null||S===void 0||S.cleanup(),this._viewModelInstance=y,this.animator.stateMachines.length>0?this.animator.stateMachines.forEach(function(M){return M.bindViewModelInstance(y)}):this.artboard.bindViewModelInstance(y.runtimeInstance))},Object.defineProperty(P.prototype,"viewModelInstance",{get:function(){return this._viewModelInstance},enumerable:!1,configurable:!0}),P.prototype.viewModelByIndex=function(y){var S=this.file.viewModelByIndex(y);return S!==null?new Ke(S):null},P.prototype.viewModelByName=function(y){var S=this.file.viewModelByName(y);return S!==null?new Ke(S):null},P.prototype.enums=function(){if(this._dataEnums===null){var y=this.file.enums();this._dataEnums=y.map(function(S){return new Xe(S)})}return this._dataEnums},P.prototype.defaultViewModel=function(){if(this.artboard){var y=this.file.defaultArtboardViewModel(this.artboard);if(y)return new Ke(y)}return null},P.prototype.getArtboard=function(y){var S,M;return(M=(S=this.riveFile)===null||S===void 0?void 0:S.getArtboard(y))!==null&&M!==void 0?M:null},P.missingErrorMessage="Rive source file or data buffer required",P.cleanupErrorMessage="Attempt to use file after calling cleanup.",P}(),Ke=function(){function P(y){this._viewModel=y}return Object.defineProperty(P.prototype,"instanceCount",{get:function(){return this._viewModel.instanceCount},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"name",{get:function(){return this._viewModel.name},enumerable:!1,configurable:!0}),P.prototype.instanceByIndex=function(y){var S=this._viewModel.instanceByIndex(y);return S!==null?new tt(S,null):null},P.prototype.instanceByName=function(y){var S=this._viewModel.instanceByName(y);return S!==null?new tt(S,null):null},P.prototype.defaultInstance=function(){var y=this._viewModel.defaultInstance();return y!==null?new tt(y,null):null},P.prototype.instance=function(){var y=this._viewModel.instance();return y!==null?new tt(y,null):null},Object.defineProperty(P.prototype,"properties",{get:function(){return this._viewModel.getProperties()},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"instanceNames",{get:function(){return this._viewModel.getInstanceNames()},enumerable:!1,configurable:!0}),P}(),Xe=function(){function P(y){this._dataEnum=y}return Object.defineProperty(P.prototype,"name",{get:function(){return this._dataEnum.name},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"values",{get:function(){return this._dataEnum.values},enumerable:!1,configurable:!0}),P}(),Fe;(function(P){P.Number="number",P.String="string",P.Boolean="boolean",P.Color="color",P.Trigger="trigger",P.Enum="enum",P.List="list",P.Image="image",P.Artboard="artboard"})(Fe||(Fe={}));var tt=function(){function P(y,S){this._parents=[],this._children=[],this._viewModelInstances=new Map,this._propertiesWithCallbacks=[],this._referenceCount=0,this._runtimeInstance=y,S!==null&&this._parents.push(S)}return Object.defineProperty(P.prototype,"runtimeInstance",{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),P.prototype.handleCallbacks=function(){this._propertiesWithCallbacks.length!==0&&(this._propertiesWithCallbacks.forEach(function(y){y.handleCallbacks()}),this._propertiesWithCallbacks.forEach(function(y){y.clearChanges()})),this._children.forEach(function(y){return y.handleCallbacks()})},P.prototype.addParent=function(y){this._parents.includes(y)||(this._parents.push(y),(this._propertiesWithCallbacks.length>0||this._children.length>0)&&y.addToViewModelCallbacks(this))},P.prototype.removeParent=function(y){var S=this._parents.indexOf(y);if(S!==-1){var M=this._parents[S];M.removeFromViewModelCallbacks(this),this._parents.splice(S,1)}},P.prototype.addToPropertyCallbacks=function(y){var S=this;this._propertiesWithCallbacks.includes(y)||(this._propertiesWithCallbacks.push(y),this._propertiesWithCallbacks.length>0&&this._parents.forEach(function(M){M.addToViewModelCallbacks(S)}))},P.prototype.removeFromPropertyCallbacks=function(y){var S=this;this._propertiesWithCallbacks.includes(y)&&(this._propertiesWithCallbacks=this._propertiesWithCallbacks.filter(function(M){return M!==y}),this._children.length===0&&this._propertiesWithCallbacks.length===0&&this._parents.forEach(function(M){M.removeFromViewModelCallbacks(S)}))},P.prototype.addToViewModelCallbacks=function(y){var S=this;this._children.includes(y)||(this._children.push(y),this._parents.forEach(function(M){M.addToViewModelCallbacks(S)}))},P.prototype.removeFromViewModelCallbacks=function(y){var S=this;this._children.includes(y)&&(this._children=this._children.filter(function(M){return M!==y}),this._children.length===0&&this._propertiesWithCallbacks.length===0&&this._parents.forEach(function(M){M.removeFromViewModelCallbacks(S)}))},P.prototype.clearCallbacks=function(){this._propertiesWithCallbacks.forEach(function(y){y.clearCallbacks()})},P.prototype.propertyFromPath=function(y,S){var M=y.split("/");return this.propertyFromPathSegments(M,0,S)},P.prototype.viewModelFromPathSegments=function(y,S){var M=this.internalViewModelInstance(y[S]);return M!==null?S==y.length-1?M:M.viewModelFromPathSegments(y,S++):null},P.prototype.propertyFromPathSegments=function(y,S,M){var J,ue,be,Ge,it,Le,at,Pt,Yt,Rt,Xn,An,xn,on,dn,Lr,et,Dr;if(S<y.length-1){var Zn=this.internalViewModelInstance(y[S]);return Zn!==null?Zn.propertyFromPathSegments(y,S+1,M):null}var mt=null;switch(M){case Fe.Number:if(mt=(ue=(J=this._runtimeInstance)===null||J===void 0?void 0:J.number(y[S]))!==null&&ue!==void 0?ue:null,mt!==null)return new Lt(mt,this);break;case Fe.String:if(mt=(Ge=(be=this._runtimeInstance)===null||be===void 0?void 0:be.string(y[S]))!==null&&Ge!==void 0?Ge:null,mt!==null)return new pt(mt,this);break;case Fe.Boolean:if(mt=(Le=(it=this._runtimeInstance)===null||it===void 0?void 0:it.boolean(y[S]))!==null&&Le!==void 0?Le:null,mt!==null)return new Jt(mt,this);break;case Fe.Color:if(mt=(Pt=(at=this._runtimeInstance)===null||at===void 0?void 0:at.color(y[S]))!==null&&Pt!==void 0?Pt:null,mt!==null)return new Or(mt,this);break;case Fe.Trigger:if(mt=(Rt=(Yt=this._runtimeInstance)===null||Yt===void 0?void 0:Yt.trigger(y[S]))!==null&&Rt!==void 0?Rt:null,mt!==null)return new ar(mt,this);break;case Fe.Enum:if(mt=(An=(Xn=this._runtimeInstance)===null||Xn===void 0?void 0:Xn.enum(y[S]))!==null&&An!==void 0?An:null,mt!==null)return new Tn(mt,this);break;case Fe.List:if(mt=(on=(xn=this._runtimeInstance)===null||xn===void 0?void 0:xn.list(y[S]))!==null&&on!==void 0?on:null,mt!==null)return new Ar(mt,this);break;case Fe.Image:if(mt=(Lr=(dn=this._runtimeInstance)===null||dn===void 0?void 0:dn.image(y[S]))!==null&&Lr!==void 0?Lr:null,mt!==null)return new xo(mt,this);break;case Fe.Artboard:if(mt=(Dr=(et=this._runtimeInstance)===null||et===void 0?void 0:et.artboard(y[S]))!==null&&Dr!==void 0?Dr:null,mt!==null)return new qi(mt,this);break}return null},P.prototype.internalViewModelInstance=function(y){var S;if(this._viewModelInstances.has(y))return this._viewModelInstances.get(y);var M=(S=this._runtimeInstance)===null||S===void 0?void 0:S.viewModel(y);if(M!==null){var J=new P(M,this);return J.internalIncrementReferenceCount(),this._viewModelInstances.set(y,J),J}return null},P.prototype.number=function(y){var S=this.propertyFromPath(y,Fe.Number);return S},P.prototype.string=function(y){var S=this.propertyFromPath(y,Fe.String);return S},P.prototype.boolean=function(y){var S=this.propertyFromPath(y,Fe.Boolean);return S},P.prototype.color=function(y){var S=this.propertyFromPath(y,Fe.Color);return S},P.prototype.trigger=function(y){var S=this.propertyFromPath(y,Fe.Trigger);return S},P.prototype.enum=function(y){var S=this.propertyFromPath(y,Fe.Enum);return S},P.prototype.list=function(y){var S=this.propertyFromPath(y,Fe.List);return S},P.prototype.image=function(y){var S=this.propertyFromPath(y,Fe.Image);return S},P.prototype.artboard=function(y){var S=this.propertyFromPath(y,Fe.Artboard);return S},P.prototype.viewModel=function(y){var S=y.split("/"),M=S.length>1?this.viewModelFromPathSegments(S.slice(0,S.length-1),0):this;return M!=null?M.internalViewModelInstance(S[S.length-1]):null},P.prototype.internalReplaceViewModel=function(y,S){var M;if(S.runtimeInstance!==null){var J=((M=this._runtimeInstance)===null||M===void 0?void 0:M.replaceViewModel(y,S.runtimeInstance))||!1;if(J){S.internalIncrementReferenceCount();var ue=this.internalViewModelInstance(y);ue!==null&&(ue.removeParent(this),this._children.includes(ue)&&(this._children=this._children.filter(function(be){return be!==ue})),ue.cleanup()),this._viewModelInstances.set(y,S),S.addParent(this)}return J}return!1},P.prototype.replaceViewModel=function(y,S){var M,J=y.split("/"),ue=J.length>1?this.viewModelFromPathSegments(J.slice(0,J.length-1),0):this;return(M=ue==null?void 0:ue.internalReplaceViewModel(J[J.length-1],S))!==null&&M!==void 0?M:!1},P.prototype.incrementReferenceCount=function(){var y;this._referenceCount++,(y=this._runtimeInstance)===null||y===void 0||y.incrementReferenceCount()},P.prototype.decrementReferenceCount=function(){var y;this._referenceCount--,(y=this._runtimeInstance)===null||y===void 0||y.decrementReferenceCount()},Object.defineProperty(P.prototype,"properties",{get:function(){var y;return((y=this._runtimeInstance)===null||y===void 0?void 0:y.getProperties().map(function(S){return C({},S)}))||[]},enumerable:!1,configurable:!0}),P.prototype.internalIncrementReferenceCount=function(){this._referenceCount++},P.prototype.cleanup=function(){var y=this;if(this._referenceCount--,this._referenceCount<=0){this._runtimeInstance=null,this.clearCallbacks(),this._propertiesWithCallbacks=[],this._viewModelInstances.forEach(function(J){J.cleanup()}),this._viewModelInstances.clear();var S=N([],this._children,!0);this._children.length=0;var M=N([],this._parents,!0);this._parents.length=0,S.forEach(function(J){J.removeParent(y)}),M.forEach(function(J){J.removeFromViewModelCallbacks(y)})}},P}(),qe=function(){function P(y,S){this.callbacks=[],this._viewModelInstanceValue=y,this._parentViewModel=S}return P.prototype.on=function(y){this.callbacks.length===0&&this._viewModelInstanceValue.clearChanges(),this.callbacks.includes(y)||(this.callbacks.push(y),this._parentViewModel.addToPropertyCallbacks(this))},P.prototype.off=function(y){y?this.callbacks=this.callbacks.filter(function(S){return S!==y}):this.callbacks.length=0,this.callbacks.length===0&&this._parentViewModel.removeFromPropertyCallbacks(this)},P.prototype.internalHandleCallback=function(y){},P.prototype.handleCallbacks=function(){var y=this;this._viewModelInstanceValue.hasChanged&&this.callbacks.forEach(function(S){y.internalHandleCallback(S)})},P.prototype.clearChanges=function(){this._viewModelInstanceValue.clearChanges()},P.prototype.clearCallbacks=function(){this.callbacks.length=0},Object.defineProperty(P.prototype,"name",{get:function(){return this._viewModelInstanceValue.name},enumerable:!1,configurable:!0}),P}(),pt=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(S){this._viewModelInstanceValue.value=S},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(S){S(this.value)},y}(qe),Lt=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(S){this._viewModelInstanceValue.value=S},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(S){S(this.value)},y}(qe),Jt=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(S){this._viewModelInstanceValue.value=S},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(S){S(this.value)},y}(qe),ar=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return y.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},y.prototype.internalHandleCallback=function(S){S()},y}(qe),Tn=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(S){this._viewModelInstanceValue.value=S},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"valueIndex",{get:function(){return this._viewModelInstanceValue.valueIndex},set:function(S){this._viewModelInstanceValue.valueIndex=S},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"values",{get:function(){return this._viewModelInstanceValue.values},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(S){S(this.value)},y}(qe),Ar=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return Object.defineProperty(y.prototype,"length",{get:function(){return this._viewModelInstanceValue.size},enumerable:!1,configurable:!0}),y.prototype.addInstance=function(S){S.runtimeInstance!=null&&(this._viewModelInstanceValue.addInstance(S.runtimeInstance),S.addParent(this._parentViewModel))},y.prototype.addInstanceAt=function(S,M){return S.runtimeInstance!=null&&this._viewModelInstanceValue.addInstanceAt(S.runtimeInstance,M)?(S.addParent(this._parentViewModel),!0):!1},y.prototype.removeInstance=function(S){S.runtimeInstance!=null&&(this._viewModelInstanceValue.removeInstance(S.runtimeInstance),S.removeParent(this._parentViewModel))},y.prototype.removeInstanceAt=function(S){this._viewModelInstanceValue.removeInstanceAt(S)},y.prototype.instanceAt=function(S){var M=this._viewModelInstanceValue.instanceAt(S);if(M!=null){var J=new tt(M,this._parentViewModel);return J}return null},y.prototype.swap=function(S,M){this._viewModelInstanceValue.swap(S,M)},y.prototype.internalHandleCallback=function(S){S()},y}(qe),Or=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(S){this._viewModelInstanceValue.value=S},enumerable:!1,configurable:!0}),y.prototype.rgb=function(S,M,J){this._viewModelInstanceValue.rgb(S,M,J)},y.prototype.rgba=function(S,M,J,ue){this._viewModelInstanceValue.argb(ue,S,M,J)},y.prototype.argb=function(S,M,J,ue){this._viewModelInstanceValue.argb(S,M,J,ue)},y.prototype.alpha=function(S){this._viewModelInstanceValue.alpha(S)},y.prototype.opacity=function(S){this._viewModelInstanceValue.alpha(Math.round(Math.max(0,Math.min(1,S))*255))},y.prototype.internalHandleCallback=function(S){S(this.value)},y}(qe),xo=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return Object.defineProperty(y.prototype,"value",{set:function(S){var M;this._viewModelInstanceValue.value((M=S==null?void 0:S.nativeImage)!==null&&M!==void 0?M:null)},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(S){S()},y}(qe),qi=function(P){g(y,P);function y(S,M){return P.call(this,S,M)||this}return Object.defineProperty(y.prototype,"value",{set:function(S){var M;this._viewModelInstanceValue.value((M=S==null?void 0:S.nativeArtboard)!==null&&M!==void 0?M:null)},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(S){S()},y}(qe),ha=function(P){return _(void 0,void 0,void 0,function(){var y,S,M;return T(this,function(J){switch(J.label){case 0:return y=new Request(P),[4,fetch(y)];case 1:return S=J.sent(),[4,S.arrayBuffer()];case 2:return M=J.sent(),[2,M]}})})},_n=function(P){return typeof P=="string"?[P]:P instanceof Array?P:[]},Gi={EventManager:Re,TaskQueueManager:We},Qn=function(P){return _(void 0,void 0,void 0,function(){var y,S,M;return T(this,function(J){switch(J.label){case 0:return y=new Promise(function(ue){return L.getInstance(function(be){be.decodeAudio(P,ue)})}),[4,y];case 1:return S=J.sent(),M=new p.AudioWrapper(S),p.finalizationRegistry.register(M,S),[2,M]}})})},Ki=function(P){return _(void 0,void 0,void 0,function(){var y,S,M;return T(this,function(J){switch(J.label){case 0:return y=new Promise(function(ue){return L.getInstance(function(be){be.decodeImage(P,ue)})}),[4,y];case 1:return S=J.sent(),M=new p.ImageWrapper(S),p.finalizationRegistry.register(M,S),[2,M]}})})},pa=function(P){return _(void 0,void 0,void 0,function(){var y,S,M;return T(this,function(J){switch(J.label){case 0:return y=new Promise(function(ue){return L.getInstance(function(be){be.decodeFont(P,ue)})}),[4,y];case 1:return S=J.sent(),M=new p.FontWrapper(S),p.finalizationRegistry.register(M,S),[2,M]}})})}})(),a})())}(Tu)),Tu.exports}var qh=eP();function tP(n,e){e.style.borderColor=n;const t=getComputedStyle(e).getPropertyValue("border-color"),r=e.getContext("2d");return r?(r.fillStyle=t,r.fillRect(0,0,1,1),e.style.display="none",[...r.getImageData(0,0,1,1).data]):[0,0,0,255]}const nP=({restored:n})=>{const e=ye.useRef(null),t=ye.useRef(null);return ye.useEffect(()=>{const r=t.current,o=e.current;if(r==null||o==null)return;const a=new qh.Rive({src:"https://assets.nlx.ai/touchpoint/voice-plus-animation.riv",canvas:r,autoBind:!0,autoplay:!0,stateMachines:"State Machine 1",layout:new qh.Layout({fit:qh.Fit.Fill}),onLoad:()=>{a.resizeDrawingSurfaceToCanvas();const u=a.viewModelInstance;if(u!=null){const f=u.trigger("run"),p=u.trigger("runNoWave"),g=u.color("color"),C=u.number("voiceInput");C!=null&&(C.value=100),g==null||g.rgba(...tP("var(--color-accent)",o)),n?p==null||p.trigger():f==null||f.trigger()}}}),l=()=>{a.resizeDrawingSurfaceToCanvas()};return window.addEventListener("resize",l,!1),()=>{a.cleanup(),window.removeEventListener("resize",l,!1)}},[n]),R.jsxs(R.Fragment,{children:[R.jsx("canvas",{ref:e,width:"1",height:"1"}),R.jsx("canvas",{className:"pointer-events-none fixed inset-0",ref:t,style:{width:"100%",height:"100%"}})]})},yb=ye.forwardRef((n,e)=>{var _e;const t=sessionStorage.getItem("nlxActiveVoiceConversationId")===n.config.conversationId,r=ye.useMemo(()=>{const de=sessionStorage.getItem("nlxActiveConversationResponses")??"{}";try{const O=JSON.parse(de);if(Array.isArray(O[n.config.conversationId]))return O[n.config.conversationId]}catch{return null}},[n.config.conversationId]),o=ye.useMemo(()=>qw({responses:r,...n.config}),[n.config,r]),[a,l]=ye.useState([]),u=((_e=a[a.length-1])==null?void 0:_e.type)===Wn.User,f=n.colorMode??"dark",[p,g]=ye.useState(n.embedded||t),C=$w(n.config),[_,T]=ye.useState(!1),N=ye.useRef(n.embedded||t),A=n.input??"text",H=ye.useCallback(()=>{sessionStorage.removeItem("nlxActiveVoiceConversationId"),(A==="voice"||A==="voiceMini")&&(U.current=!1,o.reset({clearResponses:!0}),sessionStorage.removeItem("nlxConversationId"))},[o,A]),z=n.onClose,ee=ye.useCallback(de=>{z!=null&&(z(de),H(),de.defaultPrevented||g(!1))},[z,g,H]);ye.useEffect(()=>{N.current=p},[p]),ye.useImperativeHandle(e,()=>({setExpanded(de){de?g(!0):(H(),g(!1))},getExpanded(){return N.current},getConversationHandler(){return o},setCustomBidirectionalCommands:de=>{G.current(de)}}),[o,g,H]),ye.useEffect(()=>{const de=O=>{l(O);const te=o.currentConversationId();A==="text"&&te!=null&&sessionStorage.setItem("nlxActiveConversationResponses",JSON.stringify({[te]:O}))};return o.subscribe(de),()=>{o.unsubscribe(de)}},[o,l,A]);const U=ye.useRef(t);ye.useEffect(()=>{if(!p||U.current)return;U.current=!0,(A!=="text"||r==null||r.length===0)&&n.initializeConversation(o,n.initialContext);const de=o.currentConversationId();de!=null&&sessionStorage.setItem("nlxActiveVoiceConversationId",de)},[o,p,H,A,n,r]);const L=ye.useRef({formElements:{},links:{},customCommands:new Map}),F=ye.useRef([]),G=ye.useRef(de=>{var O;if(((O=n.bidirectional)==null?void 0:O.automaticContext)!==!1)F.current=de;else throw new Error("Custom commands can only be set when automatic context is enabled.")});ye.useEffect(()=>{if(p&&n.bidirectional!=null&&n.bidirectional.automaticContext!==!1){const{teardown:de,onCustomCommandsChange:O}=JE(o,F.current,n.bidirectional.customizeAutomaticContext??(te=>te),te=>{L.current=te});return G.current=O,de}},[p,o,n.bidirectional]),ye.useEffect(()=>{if(n.bidirectional!=null&&(n.bidirectional.navigation!=null||n.bidirectional.input!=null||n.bidirectional.custom!=null||n.bidirectional.automaticContext!==!1))return XE(o,n.bidirectional,L)},[n.bidirectional,o]);const se=n.windowSize??(n.embedded?"full":"half"),Q=ye.useMemo(()=>{const de=Km(te=>te.type===Wn.Application,a);if(de===-1)return null;const O=a[de];return(O==null?void 0:O.type)!==Wn.Application?null:{index:de,response:O}},[a]),$=ye.useMemo(()=>{if(Q==null)return;const de=Km(te=>te.choices.length>0,Q.response.payload.messages);if(de===-1)return;const O=Q.response.payload.messages[de];if(O!=null)return{message:O,messageIndex:de,responseIndex:Q.index}},[Q]),[q,Y]=ye.useState({}),fe=ye.useMemo(()=>n.modalityComponents??n.customModalities??{},[n.modalityComponents,n.customModalities]),[Re,We]=ye.useState(!0),[oe,Ie]=ye.useState(0),pe=()=>{o.reset({clearResponses:!0}),H(),A!=="voice"&&n.initializeConversation(o,n.initialContext);const de=o.currentConversationId();sessionStorage.getItem("nlxConversationId")!==null&&(de==null?sessionStorage.removeItem("nlxConversationId"):sessionStorage.setItem("nlxConversationId",de)),de!=null&&sessionStorage.setItem("nlxActiveVoiceConversationId",de),Ie(O=>O+1)};if(o==null)return null;if(!p)return n.launchIcon!==!1?R.jsx(wu,{className:"fixed z-launch-button bottom-2 right-2 w-fit",theme:n.theme,colorMode:f,children:R.jsx(pC,{className:"backdrop-blur-sm",iconUrl:typeof n.launchIcon=="string"?n.launchIcon:void 0,Custom:typeof n.launchIcon=="function"?n.launchIcon:void 0,onClick:()=>{g(!0)},label:"Expand chat"})}):null;if(A==="voiceMini")return R.jsx(R.Fragment,{children:R.jsxs(wu,{theme:n.theme,colorMode:f,className:st("w-fit",n.embedded?"":"fixed z-touchpoint bottom-2 right-2"),children:[n.animate?R.jsx(nP,{restored:t}):null,R.jsx(eE,{handler:o,context:n.initialContext,brandIcon:n.brandIcon,onClose:()=>{ee(new Event("close"))},renderCollapse:n.onClose!=null,modalityComponents:fe},oe)]})});const le=()=>{var de,O;return _?R.jsx(Ay,{reset:()=>{pe(),T(!1)},className:st("flex-none",se==="full"?"w-full md:max-w-content md:mx-auto":""),onClose:()=>{T(!1)},handler:o}):C?R.jsxs(R.Fragment,{children:[R.jsx(Ax,{enabled:n.enabled,userMessageBubble:n.userMessageBubble??!1,agentMessageBubble:n.agentMessageBubble??!1,chatMode:n.chatMode??!1,isWaiting:u,lastApplicationResponseIndex:Q==null?void 0:Q.index,responses:a,colorMode:f,handler:o,uploadedFiles:q,modalityComponents:fe,className:st("grow",se==="full"?"w-full md:max-w-content md:mx-auto":"")}),R.jsxs("div",{className:st("p-2 md:p-3 flex flex-col flex-none gap-2",se==="full"?"w-full md:max-w-content md:mx-auto":""),children:[$!=null?R.jsx(Rx,{...$,handler:o}):null,($==null?void 0:$.message.selectedChoiceId)!=null?null:R.jsx(Jx,{enabled:n.enabled,handler:o,uploadUrl:(O=(de=Q==null?void 0:Q.response.payload.metadata)==null?void 0:de.uploadUrls)==null?void 0:O[0],onFileUpload:({uploadId:te,file:Ve})=>{Y(Ke=>({...Ke,[te]:Ve}))}})]})]}):R.jsx(Og,{})};return R.jsxs(wu,{theme:n.theme,colorMode:f,className:st("grid grid-cols-2 xl:grid-cols-[1fr_632px]",n.embedded?"w-full h-full":"fixed inset-0 z-touchpoint"),children:[se==="half"?R.jsx("div",{className:"hidden md:block bg-overlay"}):null,R.jsxs("div",{className:st("@container/main","w-full bg-background text-primary-80 flex relative flex-col h-full backdrop-blur-overlay",{"col-span-2 md:col-span-1":se==="half","col-span-2":se==="full"}),children:[R.jsx(SC,{windowSize:n.embedded?"embedded":se,errorThemedCloseButton:A==="voice",speakerControls:A==="voice"?{enabled:Re,setEnabled:We}:void 0,colorMode:f,brandIcon:A==="text"?n.brandIcon:void 0,isSettingsOpen:_,enabled:n.enabled,toggleSettings:n.enableSettings?()=>{T(de=>!de)}:void 0,renderCollapse:n.onClose!=null,collapse:ee,reset:pe}),A==="text"?le():R.jsxs(R.Fragment,{children:[_?R.jsx(Ay,{className:st("flex-none",se==="full"?"w-full md:max-w-content md:mx-auto":""),onClose:()=>{T(!1)},reset:()=>{pe(),T(!1)},handler:o}):null,R.jsx(K_,{brandIcon:n.brandIcon,handler:o,speakersEnabled:Re,colorMode:f,className:_?"hidden":"grow",context:n.initialContext,modalityComponents:fe},oe)]})]})]})});yb.displayName="App";const bb=`/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-content:"";--glow-opacity:0%}}}@layer theme{:root,:host{--color-gray-200:oklch(92.8% .006 264.531);--color-black:#000;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-normal:400;--font-weight-bold:700;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--font-sans:inherit;--backdrop-blur-overlay:48px;--container-content:640px;--radius-inner:inherit;--radius-outer:inherit;--z-index-touchpoint:1000;--z-index-launch-button:100;--color-primary-80:inherit;--color-primary-60:inherit;--color-primary-40:inherit;--color-primary-20:inherit;--color-primary-10:inherit;--color-primary-5:inherit;--color-primary-1:inherit;--color-secondary-80:inherit;--color-secondary-60:inherit;--color-secondary-40:inherit;--color-secondary-20:inherit;--color-secondary-10:inherit;--color-secondary-5:inherit;--color-secondary-1:inherit;--color-accent:inherit;--color-accent-20:inherit;--color-background:inherit;--color-overlay:inherit;--color-warning-primary:inherit;--color-warning-secondary:inherit;--color-error-primary:inherit;--color-error-secondary:inherit}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,:after,:before,::backdrop{border-color:var(--color-gray-200,currentcolor)}::file-selector-button{border-color:var(--color-gray-200,currentcolor)}button:not(:disabled),[role=button]:not(:disabled){cursor:pointer}*{font-family:var(--font-family)!important}}@layer components;@layer utilities{.\\@container\\/main{container:main/inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.-top-2{top:calc(var(--spacing)*-2)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-4{bottom:calc(var(--spacing)*4)}.bottom-\\[72px\\]{bottom:72px}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.z-10{z-index:10}.z-launch-button{z-index:var(--z-index-launch-button)}.z-touchpoint{z-index:var(--z-index-touchpoint)}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.-mx-2{margin-inline:calc(var(--spacing)*-2)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-auto{margin-inline:auto}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-10{margin-right:calc(var(--spacing)*10)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-auto{margin-left:auto}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-20{height:calc(var(--spacing)*20)}.h-24{height:calc(var(--spacing)*24)}.h-52{height:calc(var(--spacing)*52)}.h-64{height:calc(var(--spacing)*64)}.h-72{height:calc(var(--spacing)*72)}.h-\\[128px\\]{height:128px}.h-\\[360px\\]{height:360px}.h-full{height:100%}.h-px{height:1px}.max-h-\\[40vh\\]{max-height:40vh}.max-h-\\[360px\\]{max-height:360px}.max-h-full{max-height:100%}.min-h-full{min-height:100%}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-20{width:calc(var(--spacing)*20)}.w-24{width:calc(var(--spacing)*24)}.w-72{width:calc(var(--spacing)*72)}.w-80{width:calc(var(--spacing)*80)}.w-\\[128px\\]{width:128px}.w-\\[calc\\(100vw-16px\\)\\]{width:calc(100vw - 16px)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[360px\\]{max-width:360px}.max-w-content{max-width:var(--container-content)}.flex-none{flex:none}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-full{--tw-translate-y:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\\[320px_1fr\\]{grid-template-columns:320px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-px>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(1px*var(--tw-space-y-reverse));margin-block-end:calc(1px*calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing)*2)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:3.40282e38px}.rounded-inner{border-radius:var(--radius-inner)}.rounded-outer{border-radius:var(--radius-outer)}.border{border-style:var(--tw-border-style);border-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-background{border-color:var(--color-background)}.border-primary-10{border-color:var(--color-primary-10)}.bg-\\[rgb\\(40\\,41\\,47\\)\\]{background-color:#28292f}.bg-\\[rgb\\(175\\,175\\,175\\)\\]{background-color:#afafaf}.bg-accent{background-color:var(--color-accent)}.bg-background{background-color:var(--color-background)}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-current{background-color:currentColor}.bg-error-primary{background-color:var(--color-error-primary)}.bg-error-secondary{background-color:var(--color-error-secondary)}.bg-overlay{background-color:var(--color-overlay)}.bg-primary-5{background-color:var(--color-primary-5)}.bg-primary-10{background-color:var(--color-primary-10)}.bg-primary-80{background-color:var(--color-primary-80)}.bg-secondary-40{background-color:var(--color-secondary-40)}.bg-secondary-60{background-color:var(--color-secondary-60)}.bg-transparent{background-color:#0000}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-cover{object-fit:cover}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-5{padding-inline:calc(var(--spacing)*5)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-4{padding-block:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-10{padding-left:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--color-accent)}.text-accent-20{color:var(--color-accent-20)}.text-error-primary{color:var(--color-error-primary)}.text-primary-20{color:var(--color-primary-20)}.text-primary-40{color:var(--color-primary-40)}.text-primary-60{color:var(--color-primary-60)}.text-primary-80{color:var(--color-primary-80)}.text-secondary-80{color:var(--color-secondary-80)}.placeholder-primary-20::placeholder{color:var(--color-primary-20)}.placeholder-primary-40::placeholder{color:var(--color-primary-40)}.caret-accent{caret-color:var(--color-accent)}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-\\[0\\.01\\]{opacity:.01}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline-0{outline-style:var(--tw-outline-style);outline-width:0}.outline-2{outline-style:var(--tw-outline-style);outline-width:2px}.outline-accent{outline-color:var(--color-accent)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-overlay{--tw-backdrop-blur:blur(var(--backdrop-blur-overlay));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.outline-solid{--tw-outline-style:solid;outline-style:solid}.placeholder\\:text-primary-40::placeholder{color:var(--color-primary-40)}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:inset-0:before{content:var(--tw-content);inset:calc(var(--spacing)*0)}.before\\:-z-10:before{content:var(--tw-content);z-index:-10}.before\\:bg-transparent:before{content:var(--tw-content);background-color:#0000}.before\\:transition-colors:before{content:var(--tw-content);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.before\\:content-\\[\\'\\'\\]:before{--tw-content:"";content:var(--tw-content)}.after\\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:inset-0:after{content:var(--tw-content);inset:calc(var(--spacing)*0)}.after\\:rounded-outer:after{content:var(--tw-content);border-radius:var(--radius-outer)}.after\\:content-\\[\\'\\'\\]:after{--tw-content:"";content:var(--tw-content)}.last\\:h-full:last-child{height:100%}@media (hover:hover){.hover\\:bg-primary-5:hover{background-color:var(--color-primary-5)}.hover\\:bg-primary-10:hover{background-color:var(--color-primary-10)}.hover\\:bg-primary-80:hover{background-color:var(--color-primary-80)}.hover\\:bg-secondary-20:hover{background-color:var(--color-secondary-20)}.hover\\:text-primary-80:hover{color:var(--color-primary-80)}.hover\\:after\\:bg-primary-10:hover:after{content:var(--tw-content);background-color:var(--color-primary-10)}}.focus\\:outline-0:focus{outline-style:var(--tw-outline-style);outline-width:0}.focus\\:before\\:bg-primary-5:focus:before{content:var(--tw-content);background-color:var(--color-primary-5)}.focus\\:before\\:bg-primary-10:focus:before{content:var(--tw-content);background-color:var(--color-primary-10)}.focus\\:before\\:bg-primary-40:focus:before{content:var(--tw-content);background-color:var(--color-primary-40)}.focus\\:before\\:bg-primary-80:focus:before{content:var(--tw-content);background-color:var(--color-primary-80)}@media (hover:hover){.enabled\\:hover\\:before\\:bg-primary-5:enabled:hover:before{content:var(--tw-content);background-color:var(--color-primary-5)}.enabled\\:hover\\:before\\:bg-primary-10:enabled:hover:before{content:var(--tw-content);background-color:var(--color-primary-10)}.enabled\\:hover\\:before\\:bg-primary-40:enabled:hover:before{content:var(--tw-content);background-color:var(--color-primary-40)}.enabled\\:hover\\:before\\:bg-primary-80:enabled:hover:before{content:var(--tw-content);background-color:var(--color-primary-80)}}.enabled\\:active\\:before\\:bg-secondary-10:enabled:active:before{content:var(--tw-content);background-color:var(--color-secondary-10)}.disabled\\:bg-accent-20:disabled{background-color:var(--color-accent-20)}.disabled\\:bg-primary-5:disabled{background-color:var(--color-primary-5)}.disabled\\:bg-primary-10:disabled{background-color:var(--color-primary-10)}.disabled\\:bg-secondary-20:disabled{background-color:var(--color-secondary-20)}.disabled\\:text-primary-20:disabled{color:var(--color-primary-20)}.disabled\\:text-primary-40:disabled{color:var(--color-primary-40)}.disabled\\:text-secondary-40:disabled{color:var(--color-secondary-40)}@media (min-width:48rem){.md\\:absolute{position:absolute}.md\\:left-0{left:calc(var(--spacing)*0)}.md\\:-order-1{order:-1}.md\\:col-span-1{grid-column:span 1/span 1}.md\\:mx-auto{margin-inline:auto}.md\\:block{display:block}.md\\:w-fit{width:fit-content}.md\\:max-w-content{max-width:var(--container-content)}.md\\:-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.md\\:translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.md\\:transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.md\\:flex-col{flex-direction:column}.md\\:p-3{padding:calc(var(--spacing)*3)}}@media (min-width:80rem){.xl\\:grid-cols-\\[1fr_632px\\]{grid-template-columns:1fr 632px}}@container main (min-width:48rem){.\\@3xl\\/main\\:absolute{position:absolute}.\\@3xl\\/main\\:top-0{top:calc(var(--spacing)*0)}.\\@3xl\\/main\\:right-0{right:calc(var(--spacing)*0)}.\\@3xl\\/main\\:left-0{left:calc(var(--spacing)*0)}}}@property --glow-opacity{syntax:"<percentage>";inherits:false;initial-value:0%}.fullscreen-error svg{--glow-opacity:0%;filter:drop-shadow(0 0 6px #0000);animation:3s infinite error-glow}@supports (color:color-mix(in lab,red,red)){.fullscreen-error svg{filter:drop-shadow(0 0 6px color-mix(in srgb,transparent,var(--accent)var(--glow-opacity)))}}@keyframes error-glow{0%{color:var(--primary);fill-opacity:.08;--glow-opacity:0%}22%{color:var(--primary);fill-opacity:.08;--glow-opacity:0%}35%{color:var(--accent);fill-opacity:.8;--glow-opacity:60%}45%{color:var(--accent);fill-opacity:.7;--glow-opacity:30%}55%{color:var(--accent);fill-opacity:.6;--glow-opacity:60%}60%{color:var(--primary);fill-opacity:.08;--glow-opacity:0%}to{color:var(--primary);fill-opacity:.08;--glow-opacity:0%}}.markdown ul{list-style-type:disc;list-style-position:inside}.markdown ol{list-style-type:decimal;list-style-position:inside}.markdown hr{border-color:var(--color-primary-20)}.markdown a{text-decoration-line:underline}.markdown h1,.markdown h2,.markdown h3{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}`,la=({children:n,className:e,faded:t})=>R.jsx("p",{className:st("text-base",t?"text-primary-60":"text-primary-80",e),children:n}),kb=({children:n,className:e})=>R.jsx("p",{className:st("text-sm text-primary-60",e),children:n});/*! *****************************************************************************
167
167
  Copyright (c) Microsoft Corporation.
168
168
 
169
169
  Permission to use, copy, modify, and/or distribute this software for any