@nlxai/touchpoint-ui 1.1.8-alpha.4 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.umd.js CHANGED
@@ -38,7 +38,7 @@
38
38
  `).replace(ME,"")}function zu(i,s,c){if(s=C1(s),C1(i)!==s&&c)throw Error(t(425))}function Hu(){}var Jh=null,Zh=null;function ep(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 tp=typeof setTimeout=="function"?setTimeout:void 0,AE=typeof clearTimeout=="function"?clearTimeout:void 0,S1=typeof Promise=="function"?Promise:void 0,OE=typeof queueMicrotask=="function"?queueMicrotask:typeof S1<"u"?function(i){return S1.resolve(null).then(i).catch(LE)}:tp;function LE(i){setTimeout(function(){throw i})}function np(i,s){var c=s,p=0;do{var b=c.nextSibling;if(i.removeChild(c),b&&b.nodeType===8)if(c=b.data,c==="/$"){if(p===0){i.removeChild(b),Mn(s);return}p--}else c!=="$"&&c!=="$?"&&c!=="$!"||p++;c=b}while(c);Mn(s)}function To(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 T1(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 Pa=Math.random().toString(36).slice(2),Si="__reactFiber$"+Pa,Gl="__reactProps$"+Pa,Hi="__reactContainer$"+Pa,rp="__reactEvents$"+Pa,DE="__reactListeners$"+Pa,NE="__reactHandles$"+Pa;function ks(i){var s=i[Si];if(s)return s;for(var c=i.parentNode;c;){if(s=c[Hi]||c[Si]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=T1(i);i!==null;){if(c=i[Si])return c;i=T1(i)}return s}i=c,c=i.parentNode}return null}function Kl(i){return i=i[Si]||i[Hi],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Ra(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(t(33))}function Wu(i){return i[Gl]||null}var ip=[],Ia=-1;function xo(i){return{current:i}}function Nt(i){0>Ia||(i.current=ip[Ia],ip[Ia]=null,Ia--)}function At(i,s){Ia++,ip[Ia]=i.current,i.current=s}var _o={},Ln=xo(_o),rr=xo(!1),ws=_o;function Ma(i,s){var c=i.type.contextTypes;if(!c)return _o;var p=i.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===s)return p.__reactInternalMemoizedMaskedChildContext;var b={},k;for(k in c)b[k]=s[k];return p&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=b),b}function ir(i){return i=i.childContextTypes,i!=null}function $u(){Nt(rr),Nt(Ln)}function x1(i,s,c){if(Ln.current!==_o)throw Error(t(168));At(Ln,s),At(rr,c)}function _1(i,s,c){var p=i.stateNode;if(s=s.childContextTypes,typeof p.getChildContext!="function")return c;p=p.getChildContext();for(var b in p)if(!(b in s))throw Error(t(108,tt(i)||"Unknown",b));return de({},c,p)}function qu(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||_o,ws=Ln.current,At(Ln,i),At(rr,rr.current),!0}function E1(i,s,c){var p=i.stateNode;if(!p)throw Error(t(169));c?(i=_1(i,s,ws),p.__reactInternalMemoizedMergedChildContext=i,Nt(rr),Nt(Ln),At(Ln,i)):Nt(rr),At(rr,c)}var Wi=null,Gu=!1,op=!1;function P1(i){Wi===null?Wi=[i]:Wi.push(i)}function jE(i){Gu=!0,P1(i)}function Eo(){if(!op&&Wi!==null){op=!0;var i=0,s=ht;try{var c=Wi;for(ht=1;i<c.length;i++){var p=c[i];do p=p(!0);while(p!==null)}Wi=null,Gu=!1}catch(b){throw Wi!==null&&(Wi=Wi.slice(i+1)),Cl(da,Eo),b}finally{ht=s,op=!1}}return null}var Aa=[],Oa=0,Ku=null,Yu=0,Ar=[],Or=0,Cs=null,$i=1,qi="";function Ss(i,s){Aa[Oa++]=Yu,Aa[Oa++]=Ku,Ku=i,Yu=s}function R1(i,s,c){Ar[Or++]=$i,Ar[Or++]=qi,Ar[Or++]=Cs,Cs=i;var p=$i;i=qi;var b=32-Sn(p)-1;p&=~(1<<b),c+=1;var k=32-Sn(s)+b;if(30<k){var E=b-b%5;k=(p&(1<<E)-1).toString(32),p>>=E,b-=E,$i=1<<32-Sn(s)+b|c<<b|p,qi=k+i}else $i=1<<k|c<<b|p,qi=i}function sp(i){i.return!==null&&(Ss(i,1),R1(i,1,0))}function ap(i){for(;i===Ku;)Ku=Aa[--Oa],Aa[Oa]=null,Yu=Aa[--Oa],Aa[Oa]=null;for(;i===Cs;)Cs=Ar[--Or],Ar[Or]=null,qi=Ar[--Or],Ar[Or]=null,$i=Ar[--Or],Ar[Or]=null}var gr=null,vr=null,Bt=!1,ni=null;function I1(i,s){var c=jr(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 M1(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,gr=i,vr=To(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,gr=i,vr=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=Cs!==null?{id:$i,overflow:qi}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=jr(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,gr=i,vr=null,!0):!1;default:return!1}}function lp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function cp(i){if(Bt){var s=vr;if(s){var c=s;if(!M1(i,s)){if(lp(i))throw Error(t(418));s=To(c.nextSibling);var p=gr;s&&M1(i,s)?I1(p,c):(i.flags=i.flags&-4097|2,Bt=!1,gr=i)}}else{if(lp(i))throw Error(t(418));i.flags=i.flags&-4097|2,Bt=!1,gr=i}}}function A1(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;gr=i}function Qu(i){if(i!==gr)return!1;if(!Bt)return A1(i),Bt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!ep(i.type,i.memoizedProps)),s&&(s=vr)){if(lp(i))throw O1(),Error(t(418));for(;s;)I1(i,s),s=To(s.nextSibling)}if(A1(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){vr=To(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}vr=null}}else vr=gr?To(i.stateNode.nextSibling):null;return!0}function O1(){for(var i=vr;i;)i=To(i.nextSibling)}function La(){vr=gr=null,Bt=!1}function up(i){ni===null?ni=[i]:ni.push(i)}var UE=j.ReactCurrentBatchConfig;function Yl(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 p=c.stateNode}if(!p)throw Error(t(147,i));var b=p,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 Xu(i,s){throw i=Object.prototype.toString.call(s),Error(t(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function L1(i){var s=i._init;return s(i._payload)}function D1(i){function s(Y,W){if(i){var ee=Y.deletions;ee===null?(Y.deletions=[W],Y.flags|=16):ee.push(W)}}function c(Y,W){if(!i)return null;for(;W!==null;)s(Y,W),W=W.sibling;return null}function p(Y,W){for(Y=new Map;W!==null;)W.key!==null?Y.set(W.key,W):Y.set(W.index,W),W=W.sibling;return Y}function b(Y,W){return Y=Do(Y,W),Y.index=0,Y.sibling=null,Y}function k(Y,W,ee){return Y.index=ee,i?(ee=Y.alternate,ee!==null?(ee=ee.index,ee<W?(Y.flags|=2,W):ee):(Y.flags|=2,W)):(Y.flags|=1048576,W)}function E(Y){return i&&Y.alternate===null&&(Y.flags|=2),Y}function D(Y,W,ee,_e){return W===null||W.tag!==6?(W=tm(ee,Y.mode,_e),W.return=Y,W):(W=b(W,ee),W.return=Y,W)}function B(Y,W,ee,_e){var ze=ee.type;return ze===ie?ke(Y,W,ee.props.children,_e,ee.key):W!==null&&(W.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===Ie&&L1(ze)===W.type)?(_e=b(W,ee.props),_e.ref=Yl(Y,W,ee),_e.return=Y,_e):(_e=wd(ee.type,ee.key,ee.props,null,Y.mode,_e),_e.ref=Yl(Y,W,ee),_e.return=Y,_e)}function oe(Y,W,ee,_e){return W===null||W.tag!==4||W.stateNode.containerInfo!==ee.containerInfo||W.stateNode.implementation!==ee.implementation?(W=nm(ee,Y.mode,_e),W.return=Y,W):(W=b(W,ee.children||[]),W.return=Y,W)}function ke(Y,W,ee,_e,ze){return W===null||W.tag!==7?(W=Ms(ee,Y.mode,_e,ze),W.return=Y,W):(W=b(W,ee),W.return=Y,W)}function Ce(Y,W,ee){if(typeof W=="string"&&W!==""||typeof W=="number")return W=tm(""+W,Y.mode,ee),W.return=Y,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case N:return ee=wd(W.type,W.key,W.props,null,Y.mode,ee),ee.ref=Yl(Y,null,W),ee.return=Y,ee;case K:return W=nm(W,Y.mode,ee),W.return=Y,W;case Ie:var _e=W._init;return Ce(Y,_e(W._payload),ee)}if(Di(W)||xe(W))return W=Ms(W,Y.mode,ee,null),W.return=Y,W;Xu(Y,W)}return null}function be(Y,W,ee,_e){var ze=W!==null?W.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number")return ze!==null?null:D(Y,W,""+ee,_e);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case N:return ee.key===ze?B(Y,W,ee,_e):null;case K:return ee.key===ze?oe(Y,W,ee,_e):null;case Ie:return ze=ee._init,be(Y,W,ze(ee._payload),_e)}if(Di(ee)||xe(ee))return ze!==null?null:ke(Y,W,ee,_e,null);Xu(Y,ee)}return null}function je(Y,W,ee,_e,ze){if(typeof _e=="string"&&_e!==""||typeof _e=="number")return Y=Y.get(ee)||null,D(W,Y,""+_e,ze);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case N:return Y=Y.get(_e.key===null?ee:_e.key)||null,B(W,Y,_e,ze);case K:return Y=Y.get(_e.key===null?ee:_e.key)||null,oe(W,Y,_e,ze);case Ie:var Qe=_e._init;return je(Y,W,ee,Qe(_e._payload),ze)}if(Di(_e)||xe(_e))return Y=Y.get(ee)||null,ke(W,Y,_e,ze,null);Xu(W,_e)}return null}function Fe(Y,W,ee,_e){for(var ze=null,Qe=null,Xe=W,rt=W=0,gn=null;Xe!==null&&rt<ee.length;rt++){Xe.index>rt?(gn=Xe,Xe=null):gn=Xe.sibling;var yt=be(Y,Xe,ee[rt],_e);if(yt===null){Xe===null&&(Xe=gn);break}i&&Xe&&yt.alternate===null&&s(Y,Xe),W=k(yt,W,rt),Qe===null?ze=yt:Qe.sibling=yt,Qe=yt,Xe=gn}if(rt===ee.length)return c(Y,Xe),Bt&&Ss(Y,rt),ze;if(Xe===null){for(;rt<ee.length;rt++)Xe=Ce(Y,ee[rt],_e),Xe!==null&&(W=k(Xe,W,rt),Qe===null?ze=Xe:Qe.sibling=Xe,Qe=Xe);return Bt&&Ss(Y,rt),ze}for(Xe=p(Y,Xe);rt<ee.length;rt++)gn=je(Xe,Y,rt,ee[rt],_e),gn!==null&&(i&&gn.alternate!==null&&Xe.delete(gn.key===null?rt:gn.key),W=k(gn,W,rt),Qe===null?ze=gn:Qe.sibling=gn,Qe=gn);return i&&Xe.forEach(function(No){return s(Y,No)}),Bt&&Ss(Y,rt),ze}function Ve(Y,W,ee,_e){var ze=xe(ee);if(typeof ze!="function")throw Error(t(150));if(ee=ze.call(ee),ee==null)throw Error(t(151));for(var Qe=ze=null,Xe=W,rt=W=0,gn=null,yt=ee.next();Xe!==null&&!yt.done;rt++,yt=ee.next()){Xe.index>rt?(gn=Xe,Xe=null):gn=Xe.sibling;var No=be(Y,Xe,yt.value,_e);if(No===null){Xe===null&&(Xe=gn);break}i&&Xe&&No.alternate===null&&s(Y,Xe),W=k(No,W,rt),Qe===null?ze=No:Qe.sibling=No,Qe=No,Xe=gn}if(yt.done)return c(Y,Xe),Bt&&Ss(Y,rt),ze;if(Xe===null){for(;!yt.done;rt++,yt=ee.next())yt=Ce(Y,yt.value,_e),yt!==null&&(W=k(yt,W,rt),Qe===null?ze=yt:Qe.sibling=yt,Qe=yt);return Bt&&Ss(Y,rt),ze}for(Xe=p(Y,Xe);!yt.done;rt++,yt=ee.next())yt=je(Xe,Y,rt,yt.value,_e),yt!==null&&(i&&yt.alternate!==null&&Xe.delete(yt.key===null?rt:yt.key),W=k(yt,W,rt),Qe===null?ze=yt:Qe.sibling=yt,Qe=yt);return i&&Xe.forEach(function(vP){return s(Y,vP)}),Bt&&Ss(Y,rt),ze}function tn(Y,W,ee,_e){if(typeof ee=="object"&&ee!==null&&ee.type===ie&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case N:e:{for(var ze=ee.key,Qe=W;Qe!==null;){if(Qe.key===ze){if(ze=ee.type,ze===ie){if(Qe.tag===7){c(Y,Qe.sibling),W=b(Qe,ee.props.children),W.return=Y,Y=W;break e}}else if(Qe.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===Ie&&L1(ze)===Qe.type){c(Y,Qe.sibling),W=b(Qe,ee.props),W.ref=Yl(Y,Qe,ee),W.return=Y,Y=W;break e}c(Y,Qe);break}else s(Y,Qe);Qe=Qe.sibling}ee.type===ie?(W=Ms(ee.props.children,Y.mode,_e,ee.key),W.return=Y,Y=W):(_e=wd(ee.type,ee.key,ee.props,null,Y.mode,_e),_e.ref=Yl(Y,W,ee),_e.return=Y,Y=_e)}return E(Y);case K:e:{for(Qe=ee.key;W!==null;){if(W.key===Qe)if(W.tag===4&&W.stateNode.containerInfo===ee.containerInfo&&W.stateNode.implementation===ee.implementation){c(Y,W.sibling),W=b(W,ee.children||[]),W.return=Y,Y=W;break e}else{c(Y,W);break}else s(Y,W);W=W.sibling}W=nm(ee,Y.mode,_e),W.return=Y,Y=W}return E(Y);case Ie:return Qe=ee._init,tn(Y,W,Qe(ee._payload),_e)}if(Di(ee))return Fe(Y,W,ee,_e);if(xe(ee))return Ve(Y,W,ee,_e);Xu(Y,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"?(ee=""+ee,W!==null&&W.tag===6?(c(Y,W.sibling),W=b(W,ee),W.return=Y,Y=W):(c(Y,W),W=tm(ee,Y.mode,_e),W.return=Y,Y=W),E(Y)):c(Y,W)}return tn}var Da=D1(!0),N1=D1(!1),Ju=xo(null),Zu=null,Na=null,dp=null;function fp(){dp=Na=Zu=null}function hp(i){var s=Ju.current;Nt(Ju),i._currentValue=s}function pp(i,s,c){for(;i!==null;){var p=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),i===c)break;i=i.return}}function ja(i,s){Zu=i,dp=Na=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(or=!0),i.firstContext=null)}function Lr(i){var s=i._currentValue;if(dp!==i)if(i={context:i,memoizedValue:s,next:null},Na===null){if(Zu===null)throw Error(t(308));Na=i,Zu.dependencies={lanes:0,firstContext:i}}else Na=Na.next=i;return s}var Ts=null;function mp(i){Ts===null?Ts=[i]:Ts.push(i)}function j1(i,s,c,p){var b=s.interleaved;return b===null?(c.next=c,mp(s)):(c.next=b.next,b.next=c),s.interleaved=c,Gi(i,p)}function Gi(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 Po=!1;function gp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function U1(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 Ki(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Ro(i,s,c){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(vt&2)!==0){var b=p.pending;return b===null?s.next=s:(s.next=b.next,b.next=s),p.pending=s,Gi(i,c)}return b=p.interleaved,b===null?(s.next=s,mp(p)):(s.next=b.next,b.next=s),p.interleaved=s,Gi(i,c)}function ed(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var p=s.lanes;p&=i.pendingLanes,c|=p,s.lanes=c,rs(i,c)}}function F1(i,s){var c=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,c===p)){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:p.baseState,firstBaseUpdate:b,lastBaseUpdate:k,shared:p.shared,effects:p.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}function td(i,s,c,p){var b=i.updateQueue;Po=!1;var k=b.firstBaseUpdate,E=b.lastBaseUpdate,D=b.shared.pending;if(D!==null){b.shared.pending=null;var B=D,oe=B.next;B.next=null,E===null?k=oe:E.next=oe,E=B;var ke=i.alternate;ke!==null&&(ke=ke.updateQueue,D=ke.lastBaseUpdate,D!==E&&(D===null?ke.firstBaseUpdate=oe:D.next=oe,ke.lastBaseUpdate=B))}if(k!==null){var Ce=b.baseState;E=0,ke=oe=B=null,D=k;do{var be=D.lane,je=D.eventTime;if((p&be)===be){ke!==null&&(ke=ke.next={eventTime:je,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var Fe=i,Ve=D;switch(be=s,je=c,Ve.tag){case 1:if(Fe=Ve.payload,typeof Fe=="function"){Ce=Fe.call(je,Ce,be);break e}Ce=Fe;break e;case 3:Fe.flags=Fe.flags&-65537|128;case 0:if(Fe=Ve.payload,be=typeof Fe=="function"?Fe.call(je,Ce,be):Fe,be==null)break e;Ce=de({},Ce,be);break e;case 2:Po=!0}}D.callback!==null&&D.lane!==0&&(i.flags|=64,be=b.effects,be===null?b.effects=[D]:be.push(D))}else je={eventTime:je,lane:be,tag:D.tag,payload:D.payload,callback:D.callback,next:null},ke===null?(oe=ke=je,B=Ce):ke=ke.next=je,E|=be;if(D=D.next,D===null){if(D=b.shared.pending,D===null)break;be=D,D=be.next,be.next=null,b.lastBaseUpdate=be,b.shared.pending=null}}while(!0);if(ke===null&&(B=Ce),b.baseState=B,b.firstBaseUpdate=oe,b.lastBaseUpdate=ke,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);Es|=E,i.lanes=E,i.memoizedState=Ce}}function B1(i,s,c){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var p=i[s],b=p.callback;if(b!==null){if(p.callback=null,p=c,typeof b!="function")throw Error(t(191,b));b.call(p)}}}var Ql={},Ti=xo(Ql),Xl=xo(Ql),Jl=xo(Ql);function xs(i){if(i===Ql)throw Error(t(174));return i}function vp(i,s){switch(At(Jl,s),At(Xl,i),At(Ti,Ql),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:A(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=A(s,i)}Nt(Ti),At(Ti,s)}function Ua(){Nt(Ti),Nt(Xl),Nt(Jl)}function V1(i){xs(Jl.current);var s=xs(Ti.current),c=A(s,i.type);s!==c&&(At(Xl,i),At(Ti,c))}function yp(i){Xl.current===i&&(Nt(Ti),Nt(Xl))}var Ht=xo(0);function nd(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 bp=[];function kp(){for(var i=0;i<bp.length;i++)bp[i]._workInProgressVersionPrimary=null;bp.length=0}var rd=j.ReactCurrentDispatcher,wp=j.ReactCurrentBatchConfig,_s=0,Wt=null,un=null,pn=null,id=!1,Zl=!1,ec=0,FE=0;function Dn(){throw Error(t(321))}function Cp(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!nr(i[c],s[c]))return!1;return!0}function Sp(i,s,c,p,b,k){if(_s=k,Wt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,rd.current=i===null||i.memoizedState===null?HE:WE,i=c(p,b),Zl){k=0;do{if(Zl=!1,ec=0,25<=k)throw Error(t(301));k+=1,pn=un=null,s.updateQueue=null,rd.current=$E,i=c(p,b)}while(Zl)}if(rd.current=ad,s=un!==null&&un.next!==null,_s=0,pn=un=Wt=null,id=!1,s)throw Error(t(300));return i}function Tp(){var i=ec!==0;return ec=0,i}function xi(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pn===null?Wt.memoizedState=pn=i:pn=pn.next=i,pn}function Dr(){if(un===null){var i=Wt.alternate;i=i!==null?i.memoizedState:null}else i=un.next;var s=pn===null?Wt.memoizedState:pn.next;if(s!==null)pn=s,un=i;else{if(i===null)throw Error(t(310));un=i,i={memoizedState:un.memoizedState,baseState:un.baseState,baseQueue:un.baseQueue,queue:un.queue,next:null},pn===null?Wt.memoizedState=pn=i:pn=pn.next=i}return pn}function tc(i,s){return typeof s=="function"?s(i):s}function xp(i){var s=Dr(),c=s.queue;if(c===null)throw Error(t(311));c.lastRenderedReducer=i;var p=un,b=p.baseQueue,k=c.pending;if(k!==null){if(b!==null){var E=b.next;b.next=k.next,k.next=E}p.baseQueue=b=k,c.pending=null}if(b!==null){k=b.next,p=p.baseState;var D=E=null,B=null,oe=k;do{var ke=oe.lane;if((_s&ke)===ke)B!==null&&(B=B.next={lane:0,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),p=oe.hasEagerState?oe.eagerState:i(p,oe.action);else{var Ce={lane:ke,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null};B===null?(D=B=Ce,E=p):B=B.next=Ce,Wt.lanes|=ke,Es|=ke}oe=oe.next}while(oe!==null&&oe!==k);B===null?E=p:B.next=D,nr(p,s.memoizedState)||(or=!0),s.memoizedState=p,s.baseState=E,s.baseQueue=B,c.lastRenderedState=p}if(i=c.interleaved,i!==null){b=i;do k=b.lane,Wt.lanes|=k,Es|=k,b=b.next;while(b!==i)}else b===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function _p(i){var s=Dr(),c=s.queue;if(c===null)throw Error(t(311));c.lastRenderedReducer=i;var p=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);nr(k,s.memoizedState)||(or=!0),s.memoizedState=k,s.baseQueue===null&&(s.baseState=k),c.lastRenderedState=k}return[k,p]}function z1(){}function H1(i,s){var c=Wt,p=Dr(),b=s(),k=!nr(p.memoizedState,b);if(k&&(p.memoizedState=b,or=!0),p=p.queue,Ep(q1.bind(null,c,p,i),[i]),p.getSnapshot!==s||k||pn!==null&&pn.memoizedState.tag&1){if(c.flags|=2048,nc(9,$1.bind(null,c,p,b,s),void 0,null),mn===null)throw Error(t(349));(_s&30)!==0||W1(c,s,b)}return b}function W1(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=Wt.updateQueue,s===null?(s={lastEffect:null,stores:null},Wt.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function $1(i,s,c,p){s.value=c,s.getSnapshot=p,G1(s)&&K1(i)}function q1(i,s,c){return c(function(){G1(s)&&K1(i)})}function G1(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!nr(i,c)}catch{return!0}}function K1(i){var s=Gi(i,1);s!==null&&si(s,i,1,-1)}function Y1(i){var s=xi();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:tc,lastRenderedState:i},s.queue=i,i=i.dispatch=zE.bind(null,Wt,i),[s.memoizedState,i]}function nc(i,s,c,p){return i={tag:i,create:s,destroy:c,deps:p,next:null},s=Wt.updateQueue,s===null?(s={lastEffect:null,stores:null},Wt.updateQueue=s,s.lastEffect=i.next=i):(c=s.lastEffect,c===null?s.lastEffect=i.next=i:(p=c.next,c.next=i,i.next=p,s.lastEffect=i)),i}function Q1(){return Dr().memoizedState}function od(i,s,c,p){var b=xi();Wt.flags|=i,b.memoizedState=nc(1|s,c,void 0,p===void 0?null:p)}function sd(i,s,c,p){var b=Dr();p=p===void 0?null:p;var k=void 0;if(un!==null){var E=un.memoizedState;if(k=E.destroy,p!==null&&Cp(p,E.deps)){b.memoizedState=nc(s,c,k,p);return}}Wt.flags|=i,b.memoizedState=nc(1|s,c,k,p)}function X1(i,s){return od(8390656,8,i,s)}function Ep(i,s){return sd(2048,8,i,s)}function J1(i,s){return sd(4,2,i,s)}function Z1(i,s){return sd(4,4,i,s)}function eb(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 tb(i,s,c){return c=c!=null?c.concat([i]):null,sd(4,4,eb.bind(null,s,i),c)}function Pp(){}function nb(i,s){var c=Dr();s=s===void 0?null:s;var p=c.memoizedState;return p!==null&&s!==null&&Cp(s,p[1])?p[0]:(c.memoizedState=[i,s],i)}function rb(i,s){var c=Dr();s=s===void 0?null:s;var p=c.memoizedState;return p!==null&&s!==null&&Cp(s,p[1])?p[0]:(i=i(),c.memoizedState=[i,s],i)}function ib(i,s,c){return(_s&21)===0?(i.baseState&&(i.baseState=!1,or=!0),i.memoizedState=c):(nr(c,s)||(c=xl(),Wt.lanes|=c,Es|=c,i.baseState=!0),s)}function BE(i,s){var c=ht;ht=c!==0&&4>c?c:4,i(!0);var p=wp.transition;wp.transition={};try{i(!1),s()}finally{ht=c,wp.transition=p}}function ob(){return Dr().memoizedState}function VE(i,s,c){var p=Oo(i);if(c={lane:p,action:c,hasEagerState:!1,eagerState:null,next:null},sb(i))ab(s,c);else if(c=j1(i,s,c,p),c!==null){var b=Gn();si(c,i,p,b),lb(c,s,p)}}function zE(i,s,c){var p=Oo(i),b={lane:p,action:c,hasEagerState:!1,eagerState:null,next:null};if(sb(i))ab(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,nr(D,E)){var B=s.interleaved;B===null?(b.next=b,mp(s)):(b.next=B.next,B.next=b),s.interleaved=b;return}}catch{}finally{}c=j1(i,s,b,p),c!==null&&(b=Gn(),si(c,i,p,b),lb(c,s,p))}}function sb(i){var s=i.alternate;return i===Wt||s!==null&&s===Wt}function ab(i,s){Zl=id=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function lb(i,s,c){if((c&4194240)!==0){var p=s.lanes;p&=i.pendingLanes,c|=p,s.lanes=c,rs(i,c)}}var ad={readContext:Lr,useCallback:Dn,useContext:Dn,useEffect:Dn,useImperativeHandle:Dn,useInsertionEffect:Dn,useLayoutEffect:Dn,useMemo:Dn,useReducer:Dn,useRef:Dn,useState:Dn,useDebugValue:Dn,useDeferredValue:Dn,useTransition:Dn,useMutableSource:Dn,useSyncExternalStore:Dn,useId:Dn,unstable_isNewReconciler:!1},HE={readContext:Lr,useCallback:function(i,s){return xi().memoizedState=[i,s===void 0?null:s],i},useContext:Lr,useEffect:X1,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,od(4194308,4,eb.bind(null,s,i),c)},useLayoutEffect:function(i,s){return od(4194308,4,i,s)},useInsertionEffect:function(i,s){return od(4,2,i,s)},useMemo:function(i,s){var c=xi();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var p=xi();return s=c!==void 0?c(s):s,p.memoizedState=p.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},p.queue=i,i=i.dispatch=VE.bind(null,Wt,i),[p.memoizedState,i]},useRef:function(i){var s=xi();return i={current:i},s.memoizedState=i},useState:Y1,useDebugValue:Pp,useDeferredValue:function(i){return xi().memoizedState=i},useTransition:function(){var i=Y1(!1),s=i[0];return i=BE.bind(null,i[1]),xi().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var p=Wt,b=xi();if(Bt){if(c===void 0)throw Error(t(407));c=c()}else{if(c=s(),mn===null)throw Error(t(349));(_s&30)!==0||W1(p,s,c)}b.memoizedState=c;var k={value:c,getSnapshot:s};return b.queue=k,X1(q1.bind(null,p,k,i),[i]),p.flags|=2048,nc(9,$1.bind(null,p,k,c,s),void 0,null),c},useId:function(){var i=xi(),s=mn.identifierPrefix;if(Bt){var c=qi,p=$i;c=(p&~(1<<32-Sn(p)-1)).toString(32)+c,s=":"+s+"R"+c,c=ec++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=FE++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},WE={readContext:Lr,useCallback:nb,useContext:Lr,useEffect:Ep,useImperativeHandle:tb,useInsertionEffect:J1,useLayoutEffect:Z1,useMemo:rb,useReducer:xp,useRef:Q1,useState:function(){return xp(tc)},useDebugValue:Pp,useDeferredValue:function(i){var s=Dr();return ib(s,un.memoizedState,i)},useTransition:function(){var i=xp(tc)[0],s=Dr().memoizedState;return[i,s]},useMutableSource:z1,useSyncExternalStore:H1,useId:ob,unstable_isNewReconciler:!1},$E={readContext:Lr,useCallback:nb,useContext:Lr,useEffect:Ep,useImperativeHandle:tb,useInsertionEffect:J1,useLayoutEffect:Z1,useMemo:rb,useReducer:_p,useRef:Q1,useState:function(){return _p(tc)},useDebugValue:Pp,useDeferredValue:function(i){var s=Dr();return un===null?s.memoizedState=i:ib(s,un.memoizedState,i)},useTransition:function(){var i=_p(tc)[0],s=Dr().memoizedState;return[i,s]},useMutableSource:z1,useSyncExternalStore:H1,useId:ob,unstable_isNewReconciler:!1};function ri(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 Rp(i,s,c,p){s=i.memoizedState,c=c(p,s),c=c==null?s:de({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var ld={isMounted:function(i){return(i=i._reactInternals)?pi(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var p=Gn(),b=Oo(i),k=Ki(p,b);k.payload=s,c!=null&&(k.callback=c),s=Ro(i,k,b),s!==null&&(si(s,i,b,p),ed(s,i,b))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var p=Gn(),b=Oo(i),k=Ki(p,b);k.tag=1,k.payload=s,c!=null&&(k.callback=c),s=Ro(i,k,b),s!==null&&(si(s,i,b,p),ed(s,i,b))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=Gn(),p=Oo(i),b=Ki(c,p);b.tag=2,s!=null&&(b.callback=s),s=Ro(i,b,p),s!==null&&(si(s,i,p,c),ed(s,i,p))}};function cb(i,s,c,p,b,k,E){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,k,E):s.prototype&&s.prototype.isPureReactComponent?!So(c,p)||!So(b,k):!0}function ub(i,s,c){var p=!1,b=_o,k=s.contextType;return typeof k=="object"&&k!==null?k=Lr(k):(b=ir(s)?ws:Ln.current,p=s.contextTypes,k=(p=p!=null)?Ma(i,b):_o),s=new s(c,k),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ld,i.stateNode=s,s._reactInternals=i,p&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=b,i.__reactInternalMemoizedMaskedChildContext=k),s}function db(i,s,c,p){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,p),s.state!==i&&ld.enqueueReplaceState(s,s.state,null)}function Ip(i,s,c,p){var b=i.stateNode;b.props=c,b.state=i.memoizedState,b.refs={},gp(i);var k=s.contextType;typeof k=="object"&&k!==null?b.context=Lr(k):(k=ir(s)?ws:Ln.current,b.context=Ma(i,k)),b.state=i.memoizedState,k=s.getDerivedStateFromProps,typeof k=="function"&&(Rp(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&&ld.enqueueReplaceState(b,b.state,null),td(i,c,b,p),b.state=i.memoizedState),typeof b.componentDidMount=="function"&&(i.flags|=4194308)}function Fa(i,s){try{var c="",p=s;do c+=et(p),p=p.return;while(p);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 Mp(i,s,c){return{value:i,source:null,stack:c??null,digest:s??null}}function Ap(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var qE=typeof WeakMap=="function"?WeakMap:Map;function fb(i,s,c){c=Ki(-1,c),c.tag=3,c.payload={element:null};var p=s.value;return c.callback=function(){md||(md=!0,Gp=p),Ap(i,s)},c}function hb(i,s,c){c=Ki(-1,c),c.tag=3;var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var b=s.value;c.payload=function(){return p(b)},c.callback=function(){Ap(i,s)}}var k=i.stateNode;return k!==null&&typeof k.componentDidCatch=="function"&&(c.callback=function(){Ap(i,s),typeof p!="function"&&(Mo===null?Mo=new Set([this]):Mo.add(this));var E=s.stack;this.componentDidCatch(s.value,{componentStack:E!==null?E:""})}),c}function pb(i,s,c){var p=i.pingCache;if(p===null){p=i.pingCache=new qE;var b=new Set;p.set(s,b)}else b=p.get(s),b===void 0&&(b=new Set,p.set(s,b));b.has(c)||(b.add(c),i=sP.bind(null,i,s,c),s.then(i,i))}function mb(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 gb(i,s,c,p,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=Ki(-1,1),s.tag=2,Ro(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=b,i)}var GE=j.ReactCurrentOwner,or=!1;function qn(i,s,c,p){s.child=i===null?N1(s,null,c,p):Da(s,i.child,c,p)}function vb(i,s,c,p,b){c=c.render;var k=s.ref;return ja(s,b),p=Sp(i,s,c,p,k,b),c=Tp(),i!==null&&!or?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~b,Yi(i,s,b)):(Bt&&c&&sp(s),s.flags|=1,qn(i,s,p,b),s.child)}function yb(i,s,c,p,b){if(i===null){var k=c.type;return typeof k=="function"&&!em(k)&&k.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=k,bb(i,s,k,p,b)):(i=wd(c.type,null,p,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:So,c(E,p)&&i.ref===s.ref)return Yi(i,s,b)}return s.flags|=1,i=Do(k,p),i.ref=s.ref,i.return=s,s.child=i}function bb(i,s,c,p,b){if(i!==null){var k=i.memoizedProps;if(So(k,p)&&i.ref===s.ref)if(or=!1,s.pendingProps=p=k,(i.lanes&b)!==0)(i.flags&131072)!==0&&(or=!0);else return s.lanes=i.lanes,Yi(i,s,b)}return Op(i,s,c,p,b)}function kb(i,s,c){var p=s.pendingProps,b=p.children,k=i!==null?i.memoizedState:null;if(p.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},At(Va,yr),yr|=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,At(Va,yr),yr|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=k!==null?k.baseLanes:c,At(Va,yr),yr|=p}else k!==null?(p=k.baseLanes|c,s.memoizedState=null):p=c,At(Va,yr),yr|=p;return qn(i,s,b,c),s.child}function wb(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Op(i,s,c,p,b){var k=ir(c)?ws:Ln.current;return k=Ma(s,k),ja(s,b),c=Sp(i,s,c,p,k,b),p=Tp(),i!==null&&!or?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~b,Yi(i,s,b)):(Bt&&p&&sp(s),s.flags|=1,qn(i,s,c,b),s.child)}function Cb(i,s,c,p,b){if(ir(c)){var k=!0;qu(s)}else k=!1;if(ja(s,b),s.stateNode===null)ud(i,s),ub(s,c,p),Ip(s,c,p,b),p=!0;else if(i===null){var E=s.stateNode,D=s.memoizedProps;E.props=D;var B=E.context,oe=c.contextType;typeof oe=="object"&&oe!==null?oe=Lr(oe):(oe=ir(c)?ws:Ln.current,oe=Ma(s,oe));var ke=c.getDerivedStateFromProps,Ce=typeof ke=="function"||typeof E.getSnapshotBeforeUpdate=="function";Ce||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(D!==p||B!==oe)&&db(s,E,p,oe),Po=!1;var be=s.memoizedState;E.state=be,td(s,p,E,b),B=s.memoizedState,D!==p||be!==B||rr.current||Po?(typeof ke=="function"&&(Rp(s,c,ke,p),B=s.memoizedState),(D=Po||cb(s,c,D,p,be,B,oe))?(Ce||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=p,s.memoizedState=B),E.props=p,E.state=B,E.context=oe,p=D):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{E=s.stateNode,U1(i,s),D=s.memoizedProps,oe=s.type===s.elementType?D:ri(s.type,D),E.props=oe,Ce=s.pendingProps,be=E.context,B=c.contextType,typeof B=="object"&&B!==null?B=Lr(B):(B=ir(c)?ws:Ln.current,B=Ma(s,B));var je=c.getDerivedStateFromProps;(ke=typeof je=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(D!==Ce||be!==B)&&db(s,E,p,B),Po=!1,be=s.memoizedState,E.state=be,td(s,p,E,b);var Fe=s.memoizedState;D!==Ce||be!==Fe||rr.current||Po?(typeof je=="function"&&(Rp(s,c,je,p),Fe=s.memoizedState),(oe=Po||cb(s,c,oe,p,be,Fe,B)||!1)?(ke||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(p,Fe,B),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(p,Fe,B)),typeof E.componentDidUpdate=="function"&&(s.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof E.componentDidUpdate!="function"||D===i.memoizedProps&&be===i.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&be===i.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=Fe),E.props=p,E.state=Fe,E.context=B,p=oe):(typeof E.componentDidUpdate!="function"||D===i.memoizedProps&&be===i.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&be===i.memoizedState||(s.flags|=1024),p=!1)}return Lp(i,s,c,p,k,b)}function Lp(i,s,c,p,b,k){wb(i,s);var E=(s.flags&128)!==0;if(!p&&!E)return b&&E1(s,c,!1),Yi(i,s,k);p=s.stateNode,GE.current=s;var D=E&&typeof c.getDerivedStateFromError!="function"?null:p.render();return s.flags|=1,i!==null&&E?(s.child=Da(s,i.child,null,k),s.child=Da(s,null,D,k)):qn(i,s,D,k),s.memoizedState=p.state,b&&E1(s,c,!0),s.child}function Sb(i){var s=i.stateNode;s.pendingContext?x1(i,s.pendingContext,s.pendingContext!==s.context):s.context&&x1(i,s.context,!1),vp(i,s.containerInfo)}function Tb(i,s,c,p,b){return La(),up(b),s.flags|=256,qn(i,s,c,p),s.child}var Dp={dehydrated:null,treeContext:null,retryLane:0};function Np(i){return{baseLanes:i,cachePool:null,transitions:null}}function xb(i,s,c){var p=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),At(Ht,b&1),i===null)return cp(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=p.children,i=p.fallback,k?(p=s.mode,k=s.child,E={mode:"hidden",children:E},(p&1)===0&&k!==null?(k.childLanes=0,k.pendingProps=E):k=Cd(E,p,0,null),i=Ms(i,p,c,null),k.return=s,i.return=s,k.sibling=i,s.child=k,s.child.memoizedState=Np(c),s.memoizedState=Dp,i):jp(s,E));if(b=i.memoizedState,b!==null&&(D=b.dehydrated,D!==null))return KE(i,s,E,p,D,b,c);if(k){k=p.fallback,E=s.mode,b=i.child,D=b.sibling;var B={mode:"hidden",children:p.children};return(E&1)===0&&s.child!==b?(p=s.child,p.childLanes=0,p.pendingProps=B,s.deletions=null):(p=Do(b,B),p.subtreeFlags=b.subtreeFlags&14680064),D!==null?k=Do(D,k):(k=Ms(k,E,c,null),k.flags|=2),k.return=s,p.return=s,p.sibling=k,s.child=p,p=k,k=s.child,E=i.child.memoizedState,E=E===null?Np(c):{baseLanes:E.baseLanes|c,cachePool:null,transitions:E.transitions},k.memoizedState=E,k.childLanes=i.childLanes&~c,s.memoizedState=Dp,p}return k=i.child,i=k.sibling,p=Do(k,{mode:"visible",children:p.children}),(s.mode&1)===0&&(p.lanes=c),p.return=s,p.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=p,s.memoizedState=null,p}function jp(i,s){return s=Cd({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function cd(i,s,c,p){return p!==null&&up(p),Da(s,i.child,null,c),i=jp(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function KE(i,s,c,p,b,k,E){if(c)return s.flags&256?(s.flags&=-257,p=Mp(Error(t(422))),cd(i,s,E,p)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(k=p.fallback,b=s.mode,p=Cd({mode:"visible",children:p.children},b,0,null),k=Ms(k,b,E,null),k.flags|=2,p.return=s,k.return=s,p.sibling=k,s.child=p,(s.mode&1)!==0&&Da(s,i.child,null,E),s.child.memoizedState=Np(E),s.memoizedState=Dp,k);if((s.mode&1)===0)return cd(i,s,E,null);if(b.data==="$!"){if(p=b.nextSibling&&b.nextSibling.dataset,p)var D=p.dgst;return p=D,k=Error(t(419)),p=Mp(k,p,void 0),cd(i,s,E,p)}if(D=(E&i.childLanes)!==0,or||D){if(p=mn,p!==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&(p.suspendedLanes|E))!==0?0:b,b!==0&&b!==k.retryLane&&(k.retryLane=b,Gi(i,b),si(p,i,b,-1))}return Zp(),p=Mp(Error(t(421))),cd(i,s,E,p)}return b.data==="$?"?(s.flags|=128,s.child=i.child,s=aP.bind(null,i),b._reactRetry=s,null):(i=k.treeContext,vr=To(b.nextSibling),gr=s,Bt=!0,ni=null,i!==null&&(Ar[Or++]=$i,Ar[Or++]=qi,Ar[Or++]=Cs,$i=i.id,qi=i.overflow,Cs=s),s=jp(s,p.children),s.flags|=4096,s)}function _b(i,s,c){i.lanes|=s;var p=i.alternate;p!==null&&(p.lanes|=s),pp(i.return,s,c)}function Up(i,s,c,p,b){var k=i.memoizedState;k===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:c,tailMode:b}:(k.isBackwards=s,k.rendering=null,k.renderingStartTime=0,k.last=p,k.tail=c,k.tailMode=b)}function Eb(i,s,c){var p=s.pendingProps,b=p.revealOrder,k=p.tail;if(qn(i,s,p.children,c),p=Ht.current,(p&2)!==0)p=p&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&&_b(i,c,s);else if(i.tag===19)_b(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}p&=1}if(At(Ht,p),(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&&nd(i)===null&&(b=c),c=c.sibling;c=b,c===null?(b=s.child,s.child=null):(b=c.sibling,c.sibling=null),Up(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&&nd(i)===null){s.child=b;break}i=b.sibling,b.sibling=c,c=b,b=i}Up(s,!0,c,null,k);break;case"together":Up(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function ud(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Yi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Es|=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=Do(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Do(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function YE(i,s,c){switch(s.tag){case 3:Sb(s),La();break;case 5:V1(s);break;case 1:ir(s.type)&&qu(s);break;case 4:vp(s,s.stateNode.containerInfo);break;case 10:var p=s.type._context,b=s.memoizedProps.value;At(Ju,p._currentValue),p._currentValue=b;break;case 13:if(p=s.memoizedState,p!==null)return p.dehydrated!==null?(At(Ht,Ht.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?xb(i,s,c):(At(Ht,Ht.current&1),i=Yi(i,s,c),i!==null?i.sibling:null);At(Ht,Ht.current&1);break;case 19:if(p=(c&s.childLanes)!==0,(i.flags&128)!==0){if(p)return Eb(i,s,c);s.flags|=128}if(b=s.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),At(Ht,Ht.current),p)break;return null;case 22:case 23:return s.lanes=0,kb(i,s,c)}return Yi(i,s,c)}var Pb,Fp,Rb,Ib;Pb=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}},Fp=function(){},Rb=function(i,s,c,p){var b=i.memoizedProps;if(b!==p){i=s.stateNode,xs(Ti.current);var k=null;switch(c){case"input":b=Sr(i,b),p=Sr(i,p),k=[];break;case"select":b=de({},b,{value:void 0}),p=de({},p,{value:void 0}),k=[];break;case"textarea":b=Ni(i,b),p=Ni(i,p),k=[];break;default:typeof b.onClick!="function"&&typeof p.onClick=="function"&&(i.onclick=Hu)}Yt(c,p);var E;c=null;for(oe in b)if(!p.hasOwnProperty(oe)&&b.hasOwnProperty(oe)&&b[oe]!=null)if(oe==="style"){var D=b[oe];for(E in D)D.hasOwnProperty(E)&&(c||(c={}),c[E]="")}else oe!=="dangerouslySetInnerHTML"&&oe!=="children"&&oe!=="suppressContentEditableWarning"&&oe!=="suppressHydrationWarning"&&oe!=="autoFocus"&&(o.hasOwnProperty(oe)?k||(k=[]):(k=k||[]).push(oe,null));for(oe in p){var B=p[oe];if(D=b!=null?b[oe]:void 0,p.hasOwnProperty(oe)&&B!==D&&(B!=null||D!=null))if(oe==="style")if(D){for(E in D)!D.hasOwnProperty(E)||B&&B.hasOwnProperty(E)||(c||(c={}),c[E]="");for(E in B)B.hasOwnProperty(E)&&D[E]!==B[E]&&(c||(c={}),c[E]=B[E])}else c||(k||(k=[]),k.push(oe,c)),c=B;else oe==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,D=D?D.__html:void 0,B!=null&&D!==B&&(k=k||[]).push(oe,B)):oe==="children"?typeof B!="string"&&typeof B!="number"||(k=k||[]).push(oe,""+B):oe!=="suppressContentEditableWarning"&&oe!=="suppressHydrationWarning"&&(o.hasOwnProperty(oe)?(B!=null&&oe==="onScroll"&&Dt("scroll",i),k||D===B||(k=[])):(k=k||[]).push(oe,B))}c&&(k=k||[]).push("style",c);var oe=k;(s.updateQueue=oe)&&(s.flags|=4)}},Ib=function(i,s,c,p){c!==p&&(s.flags|=4)};function rc(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 p=null;c!==null;)c.alternate!==null&&(p=c),c=c.sibling;p===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function Nn(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,p=0;if(s)for(var b=i.child;b!==null;)c|=b.lanes|b.childLanes,p|=b.subtreeFlags&14680064,p|=b.flags&14680064,b.return=i,b=b.sibling;else for(b=i.child;b!==null;)c|=b.lanes|b.childLanes,p|=b.subtreeFlags,p|=b.flags,b.return=i,b=b.sibling;return i.subtreeFlags|=p,i.childLanes=c,s}function QE(i,s,c){var p=s.pendingProps;switch(ap(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nn(s),null;case 1:return ir(s.type)&&$u(),Nn(s),null;case 3:return p=s.stateNode,Ua(),Nt(rr),Nt(Ln),kp(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(i===null||i.child===null)&&(Qu(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,ni!==null&&(Qp(ni),ni=null))),Fp(i,s),Nn(s),null;case 5:yp(s);var b=xs(Jl.current);if(c=s.type,i!==null&&s.stateNode!=null)Rb(i,s,c,p,b),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!p){if(s.stateNode===null)throw Error(t(166));return Nn(s),null}if(i=xs(Ti.current),Qu(s)){p=s.stateNode,c=s.type;var k=s.memoizedProps;switch(p[Si]=s,p[Gl]=k,i=(s.mode&1)!==0,c){case"dialog":Dt("cancel",p),Dt("close",p);break;case"iframe":case"object":case"embed":Dt("load",p);break;case"video":case"audio":for(b=0;b<zi.length;b++)Dt(zi[b],p);break;case"source":Dt("error",p);break;case"img":case"image":case"link":Dt("error",p),Dt("load",p);break;case"details":Dt("toggle",p);break;case"input":Tr(p,k),Dt("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!k.multiple},Dt("invalid",p);break;case"textarea":oa(p,k),Dt("invalid",p)}Yt(c,k),b=null;for(var E in k)if(k.hasOwnProperty(E)){var D=k[E];E==="children"?typeof D=="string"?p.textContent!==D&&(k.suppressHydrationWarning!==!0&&zu(p.textContent,D,i),b=["children",D]):typeof D=="number"&&p.textContent!==""+D&&(k.suppressHydrationWarning!==!0&&zu(p.textContent,D,i),b=["children",""+D]):o.hasOwnProperty(E)&&D!=null&&E==="onScroll"&&Dt("scroll",p)}switch(c){case"input":Kt(p),ia(p,k,!0);break;case"textarea":Kt(p),y(p);break;case"select":case"option":break;default:typeof k.onClick=="function"&&(p.onclick=Hu)}p=b,s.updateQueue=p,p!==null&&(s.flags|=4)}else{E=b.nodeType===9?b:b.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=C(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=E.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof p.is=="string"?i=E.createElement(c,{is:p.is}):(i=E.createElement(c),c==="select"&&(E=i,p.multiple?E.multiple=!0:p.size&&(E.size=p.size))):i=E.createElementNS(i,c),i[Si]=s,i[Gl]=p,Pb(i,s,!1,!1),s.stateNode=i;e:{switch(E=Et(c,p),c){case"dialog":Dt("cancel",i),Dt("close",i),b=p;break;case"iframe":case"object":case"embed":Dt("load",i),b=p;break;case"video":case"audio":for(b=0;b<zi.length;b++)Dt(zi[b],i);b=p;break;case"source":Dt("error",i),b=p;break;case"img":case"image":case"link":Dt("error",i),Dt("load",i),b=p;break;case"details":Dt("toggle",i),b=p;break;case"input":Tr(i,p),b=Sr(i,p),Dt("invalid",i);break;case"option":b=p;break;case"select":i._wrapperState={wasMultiple:!!p.multiple},b=de({},p,{value:void 0}),Dt("invalid",i);break;case"textarea":oa(i,p),b=Ni(i,p),Dt("invalid",i);break;default:b=p}Yt(c,b),D=b;for(k in D)if(D.hasOwnProperty(k)){var B=D[k];k==="style"?at(i,B):k==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,B!=null&&ue(i,B)):k==="children"?typeof B=="string"?(c!=="textarea"||B!=="")&&ye(i,B):typeof B=="number"&&ye(i,""+B):k!=="suppressContentEditableWarning"&&k!=="suppressHydrationWarning"&&k!=="autoFocus"&&(o.hasOwnProperty(k)?B!=null&&k==="onScroll"&&Dt("scroll",i):B!=null&&V(i,k,B,E))}switch(c){case"input":Kt(i),ia(i,p,!1);break;case"textarea":Kt(i),y(i);break;case"option":p.value!=null&&i.setAttribute("value",""+$e(p.value));break;case"select":i.multiple=!!p.multiple,k=p.value,k!=null?zn(i,!!p.multiple,k,!1):p.defaultValue!=null&&zn(i,!!p.multiple,p.defaultValue,!0);break;default:typeof b.onClick=="function"&&(i.onclick=Hu)}switch(c){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}}p&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return Nn(s),null;case 6:if(i&&s.stateNode!=null)Ib(i,s,i.memoizedProps,p);else{if(typeof p!="string"&&s.stateNode===null)throw Error(t(166));if(c=xs(Jl.current),xs(Ti.current),Qu(s)){if(p=s.stateNode,c=s.memoizedProps,p[Si]=s,(k=p.nodeValue!==c)&&(i=gr,i!==null))switch(i.tag){case 3:zu(p.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&zu(p.nodeValue,c,(i.mode&1)!==0)}k&&(s.flags|=4)}else p=(c.nodeType===9?c:c.ownerDocument).createTextNode(p),p[Si]=s,s.stateNode=p}return Nn(s),null;case 13:if(Nt(Ht),p=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Bt&&vr!==null&&(s.mode&1)!==0&&(s.flags&128)===0)O1(),La(),s.flags|=98560,k=!1;else if(k=Qu(s),p!==null&&p.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[Si]=s}else La(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Nn(s),k=!1}else ni!==null&&(Qp(ni),ni=null),k=!0;if(!k)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(p=p!==null,p!==(i!==null&&i.memoizedState!==null)&&p&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(Ht.current&1)!==0?dn===0&&(dn=3):Zp())),s.updateQueue!==null&&(s.flags|=4),Nn(s),null);case 4:return Ua(),Fp(i,s),i===null&&$l(s.stateNode.containerInfo),Nn(s),null;case 10:return hp(s.type._context),Nn(s),null;case 17:return ir(s.type)&&$u(),Nn(s),null;case 19:if(Nt(Ht),k=s.memoizedState,k===null)return Nn(s),null;if(p=(s.flags&128)!==0,E=k.rendering,E===null)if(p)rc(k,!1);else{if(dn!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(E=nd(i),E!==null){for(s.flags|=128,rc(k,!1),p=E.updateQueue,p!==null&&(s.updateQueue=p,s.flags|=4),s.subtreeFlags=0,p=c,c=s.child;c!==null;)k=c,i=p,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 At(Ht,Ht.current&1|2),s.child}i=i.sibling}k.tail!==null&&zt()>za&&(s.flags|=128,p=!0,rc(k,!1),s.lanes=4194304)}else{if(!p)if(i=nd(E),i!==null){if(s.flags|=128,p=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),rc(k,!0),k.tail===null&&k.tailMode==="hidden"&&!E.alternate&&!Bt)return Nn(s),null}else 2*zt()-k.renderingStartTime>za&&c!==1073741824&&(s.flags|=128,p=!0,rc(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=zt(),s.sibling=null,c=Ht.current,At(Ht,p?c&1|2:c&1),s):(Nn(s),null);case 22:case 23:return Jp(),p=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==p&&(s.flags|=8192),p&&(s.mode&1)!==0?(yr&1073741824)!==0&&(Nn(s),s.subtreeFlags&6&&(s.flags|=8192)):Nn(s),null;case 24:return null;case 25:return null}throw Error(t(156,s.tag))}function XE(i,s){switch(ap(s),s.tag){case 1:return ir(s.type)&&$u(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Ua(),Nt(rr),Nt(Ln),kp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return yp(s),null;case 13:if(Nt(Ht),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(t(340));La()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return Nt(Ht),null;case 4:return Ua(),null;case 10:return hp(s.type._context),null;case 22:case 23:return Jp(),null;case 24:return null;default:return null}}var dd=!1,jn=!1,JE=typeof WeakSet=="function"?WeakSet:Set,Ue=null;function Ba(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(p){Qt(i,s,p)}else c.current=null}function Bp(i,s,c){try{c()}catch(p){Qt(i,s,p)}}var Mb=!1;function ZE(i,s){if(Jh=hr,i=Wl(),u(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var p=c.getSelection&&c.getSelection();if(p&&p.rangeCount!==0){c=p.anchorNode;var b=p.anchorOffset,k=p.focusNode;p=p.focusOffset;try{c.nodeType,k.nodeType}catch{c=null;break e}var E=0,D=-1,B=-1,oe=0,ke=0,Ce=i,be=null;t:for(;;){for(var je;Ce!==c||b!==0&&Ce.nodeType!==3||(D=E+b),Ce!==k||p!==0&&Ce.nodeType!==3||(B=E+p),Ce.nodeType===3&&(E+=Ce.nodeValue.length),(je=Ce.firstChild)!==null;)be=Ce,Ce=je;for(;;){if(Ce===i)break t;if(be===c&&++oe===b&&(D=E),be===k&&++ke===p&&(B=E),(je=Ce.nextSibling)!==null)break;Ce=be,be=Ce.parentNode}Ce=je}c=D===-1||B===-1?null:{start:D,end:B}}else c=null}c=c||{start:0,end:0}}else c=null;for(Zh={focusedElem:i,selectionRange:c},hr=!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 Fe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Fe!==null){var Ve=Fe.memoizedProps,tn=Fe.memoizedState,Y=s.stateNode,W=Y.getSnapshotBeforeUpdate(s.elementType===s.type?Ve:ri(s.type,Ve),tn);Y.__reactInternalSnapshotBeforeUpdate=W}break;case 3:var ee=s.stateNode.containerInfo;ee.nodeType===1?ee.textContent="":ee.nodeType===9&&ee.documentElement&&ee.removeChild(ee.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(_e){Qt(s,s.return,_e)}if(i=s.sibling,i!==null){i.return=s.return,Ue=i;break}Ue=s.return}return Fe=Mb,Mb=!1,Fe}function ic(i,s,c){var p=s.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var b=p=p.next;do{if((b.tag&i)===i){var k=b.destroy;b.destroy=void 0,k!==void 0&&Bp(s,c,k)}b=b.next}while(b!==p)}}function fd(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 p=c.create;c.destroy=p()}c=c.next}while(c!==s)}}function Vp(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 Ab(i){var s=i.alternate;s!==null&&(i.alternate=null,Ab(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Si],delete s[Gl],delete s[rp],delete s[DE],delete s[NE])),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 Ob(i){return i.tag===5||i.tag===3||i.tag===4}function Lb(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Ob(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 zp(i,s,c){var p=i.tag;if(p===5||p===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=Hu));else if(p!==4&&(i=i.child,i!==null))for(zp(i,s,c),i=i.sibling;i!==null;)zp(i,s,c),i=i.sibling}function Hp(i,s,c){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(p!==4&&(i=i.child,i!==null))for(Hp(i,s,c),i=i.sibling;i!==null;)Hp(i,s,c),i=i.sibling}var xn=null,ii=!1;function Io(i,s,c){for(c=c.child;c!==null;)Db(i,s,c),c=c.sibling}function Db(i,s,c){if(Rn&&typeof Rn.onCommitFiberUnmount=="function")try{Rn.onCommitFiberUnmount(Er,c)}catch{}switch(c.tag){case 5:jn||Ba(c,s);case 6:var p=xn,b=ii;xn=null,Io(i,s,c),xn=p,ii=b,xn!==null&&(ii?(i=xn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):xn.removeChild(c.stateNode));break;case 18:xn!==null&&(ii?(i=xn,c=c.stateNode,i.nodeType===8?np(i.parentNode,c):i.nodeType===1&&np(i,c),Mn(i)):np(xn,c.stateNode));break;case 4:p=xn,b=ii,xn=c.stateNode.containerInfo,ii=!0,Io(i,s,c),xn=p,ii=b;break;case 0:case 11:case 14:case 15:if(!jn&&(p=c.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){b=p=p.next;do{var k=b,E=k.destroy;k=k.tag,E!==void 0&&((k&2)!==0||(k&4)!==0)&&Bp(c,s,E),b=b.next}while(b!==p)}Io(i,s,c);break;case 1:if(!jn&&(Ba(c,s),p=c.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=c.memoizedProps,p.state=c.memoizedState,p.componentWillUnmount()}catch(D){Qt(c,s,D)}Io(i,s,c);break;case 21:Io(i,s,c);break;case 22:c.mode&1?(jn=(p=jn)||c.memoizedState!==null,Io(i,s,c),jn=p):Io(i,s,c);break;default:Io(i,s,c)}}function Nb(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new JE),s.forEach(function(p){var b=lP.bind(null,i,p);c.has(p)||(c.add(p),p.then(b,b))})}}function oi(i,s){var c=s.deletions;if(c!==null)for(var p=0;p<c.length;p++){var b=c[p];try{var k=i,E=s,D=E;e:for(;D!==null;){switch(D.tag){case 5:xn=D.stateNode,ii=!1;break e;case 3:xn=D.stateNode.containerInfo,ii=!0;break e;case 4:xn=D.stateNode.containerInfo,ii=!0;break e}D=D.return}if(xn===null)throw Error(t(160));Db(k,E,b),xn=null,ii=!1;var B=b.alternate;B!==null&&(B.return=null),b.return=null}catch(oe){Qt(b,s,oe)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)jb(s,i),s=s.sibling}function jb(i,s){var c=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(oi(s,i),_i(i),p&4){try{ic(3,i,i.return),fd(3,i)}catch(Ve){Qt(i,i.return,Ve)}try{ic(5,i,i.return)}catch(Ve){Qt(i,i.return,Ve)}}break;case 1:oi(s,i),_i(i),p&512&&c!==null&&Ba(c,c.return);break;case 5:if(oi(s,i),_i(i),p&512&&c!==null&&Ba(c,c.return),i.flags&32){var b=i.stateNode;try{ye(b,"")}catch(Ve){Qt(i,i.return,Ve)}}if(p&4&&(b=i.stateNode,b!=null)){var k=i.memoizedProps,E=c!==null?c.memoizedProps:k,D=i.type,B=i.updateQueue;if(i.updateQueue=null,B!==null)try{D==="input"&&k.type==="radio"&&k.name!=null&&po(b,k),Et(D,E);var oe=Et(D,k);for(E=0;E<B.length;E+=2){var ke=B[E],Ce=B[E+1];ke==="style"?at(b,Ce):ke==="dangerouslySetInnerHTML"?ue(b,Ce):ke==="children"?ye(b,Ce):V(b,ke,Ce,oe)}switch(D){case"input":Li(b,k);break;case"textarea":P(b,k);break;case"select":var be=b._wrapperState.wasMultiple;b._wrapperState.wasMultiple=!!k.multiple;var je=k.value;je!=null?zn(b,!!k.multiple,je,!1):be!==!!k.multiple&&(k.defaultValue!=null?zn(b,!!k.multiple,k.defaultValue,!0):zn(b,!!k.multiple,k.multiple?[]:"",!1))}b[Gl]=k}catch(Ve){Qt(i,i.return,Ve)}}break;case 6:if(oi(s,i),_i(i),p&4){if(i.stateNode===null)throw Error(t(162));b=i.stateNode,k=i.memoizedProps;try{b.nodeValue=k}catch(Ve){Qt(i,i.return,Ve)}}break;case 3:if(oi(s,i),_i(i),p&4&&c!==null&&c.memoizedState.isDehydrated)try{Mn(s.containerInfo)}catch(Ve){Qt(i,i.return,Ve)}break;case 4:oi(s,i),_i(i);break;case 13:oi(s,i),_i(i),b=i.child,b.flags&8192&&(k=b.memoizedState!==null,b.stateNode.isHidden=k,!k||b.alternate!==null&&b.alternate.memoizedState!==null||(qp=zt())),p&4&&Nb(i);break;case 22:if(ke=c!==null&&c.memoizedState!==null,i.mode&1?(jn=(oe=jn)||ke,oi(s,i),jn=oe):oi(s,i),_i(i),p&8192){if(oe=i.memoizedState!==null,(i.stateNode.isHidden=oe)&&!ke&&(i.mode&1)!==0)for(Ue=i,ke=i.child;ke!==null;){for(Ce=Ue=ke;Ue!==null;){switch(be=Ue,je=be.child,be.tag){case 0:case 11:case 14:case 15:ic(4,be,be.return);break;case 1:Ba(be,be.return);var Fe=be.stateNode;if(typeof Fe.componentWillUnmount=="function"){p=be,c=be.return;try{s=p,Fe.props=s.memoizedProps,Fe.state=s.memoizedState,Fe.componentWillUnmount()}catch(Ve){Qt(p,c,Ve)}}break;case 5:Ba(be,be.return);break;case 22:if(be.memoizedState!==null){Bb(Ce);continue}}je!==null?(je.return=be,Ue=je):Bb(Ce)}ke=ke.sibling}e:for(ke=null,Ce=i;;){if(Ce.tag===5){if(ke===null){ke=Ce;try{b=Ce.stateNode,oe?(k=b.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none"):(D=Ce.stateNode,B=Ce.memoizedProps.style,E=B!=null&&B.hasOwnProperty("display")?B.display:null,D.style.display=Le("display",E))}catch(Ve){Qt(i,i.return,Ve)}}}else if(Ce.tag===6){if(ke===null)try{Ce.stateNode.nodeValue=oe?"":Ce.memoizedProps}catch(Ve){Qt(i,i.return,Ve)}}else if((Ce.tag!==22&&Ce.tag!==23||Ce.memoizedState===null||Ce===i)&&Ce.child!==null){Ce.child.return=Ce,Ce=Ce.child;continue}if(Ce===i)break e;for(;Ce.sibling===null;){if(Ce.return===null||Ce.return===i)break e;ke===Ce&&(ke=null),Ce=Ce.return}ke===Ce&&(ke=null),Ce.sibling.return=Ce.return,Ce=Ce.sibling}}break;case 19:oi(s,i),_i(i),p&4&&Nb(i);break;case 21:break;default:oi(s,i),_i(i)}}function _i(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(Ob(c)){var p=c;break e}c=c.return}throw Error(t(160))}switch(p.tag){case 5:var b=p.stateNode;p.flags&32&&(ye(b,""),p.flags&=-33);var k=Lb(i);Hp(i,k,b);break;case 3:case 4:var E=p.stateNode.containerInfo,D=Lb(i);zp(i,D,E);break;default:throw Error(t(161))}}catch(B){Qt(i,i.return,B)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function eP(i,s,c){Ue=i,Ub(i)}function Ub(i,s,c){for(var p=(i.mode&1)!==0;Ue!==null;){var b=Ue,k=b.child;if(b.tag===22&&p){var E=b.memoizedState!==null||dd;if(!E){var D=b.alternate,B=D!==null&&D.memoizedState!==null||jn;D=dd;var oe=jn;if(dd=E,(jn=B)&&!oe)for(Ue=b;Ue!==null;)E=Ue,B=E.child,E.tag===22&&E.memoizedState!==null?Vb(b):B!==null?(B.return=E,Ue=B):Vb(b);for(;k!==null;)Ue=k,Ub(k),k=k.sibling;Ue=b,dd=D,jn=oe}Fb(i)}else(b.subtreeFlags&8772)!==0&&k!==null?(k.return=b,Ue=k):Fb(i)}}function Fb(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:jn||fd(5,s);break;case 1:var p=s.stateNode;if(s.flags&4&&!jn)if(c===null)p.componentDidMount();else{var b=s.elementType===s.type?c.memoizedProps:ri(s.type,c.memoizedProps);p.componentDidUpdate(b,c.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var k=s.updateQueue;k!==null&&B1(s,k,p);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}B1(s,E,c)}break;case 5:var D=s.stateNode;if(c===null&&s.flags&4){c=D;var B=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":B.autoFocus&&c.focus();break;case"img":B.src&&(c.src=B.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var oe=s.alternate;if(oe!==null){var ke=oe.memoizedState;if(ke!==null){var Ce=ke.dehydrated;Ce!==null&&Mn(Ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}jn||s.flags&512&&Vp(s)}catch(be){Qt(s,s.return,be)}}if(s===i){Ue=null;break}if(c=s.sibling,c!==null){c.return=s.return,Ue=c;break}Ue=s.return}}function Bb(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 Vb(i){for(;Ue!==null;){var s=Ue;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{fd(4,s)}catch(B){Qt(s,c,B)}break;case 1:var p=s.stateNode;if(typeof p.componentDidMount=="function"){var b=s.return;try{p.componentDidMount()}catch(B){Qt(s,b,B)}}var k=s.return;try{Vp(s)}catch(B){Qt(s,k,B)}break;case 5:var E=s.return;try{Vp(s)}catch(B){Qt(s,E,B)}}}catch(B){Qt(s,s.return,B)}if(s===i){Ue=null;break}var D=s.sibling;if(D!==null){D.return=s.return,Ue=D;break}Ue=s.return}}var tP=Math.ceil,hd=j.ReactCurrentDispatcher,Wp=j.ReactCurrentOwner,Nr=j.ReactCurrentBatchConfig,vt=0,mn=null,on=null,_n=0,yr=0,Va=xo(0),dn=0,oc=null,Es=0,pd=0,$p=0,sc=null,sr=null,qp=0,za=1/0,Qi=null,md=!1,Gp=null,Mo=null,gd=!1,Ao=null,vd=0,ac=0,Kp=null,yd=-1,bd=0;function Gn(){return(vt&6)!==0?zt():yd!==-1?yd:yd=zt()}function Oo(i){return(i.mode&1)===0?1:(vt&2)!==0&&_n!==0?_n&-_n:UE.transition!==null?(bd===0&&(bd=xl()),bd):(i=ht,i!==0||(i=window.event,i=i===void 0?16:xu(i.type)),i)}function si(i,s,c,p){if(50<ac)throw ac=0,Kp=null,Error(t(185));Pt(i,c,p),((vt&2)===0||i!==mn)&&(i===mn&&((vt&2)===0&&(pd|=c),dn===4&&Lo(i,_n)),ar(i,p),c===1&&vt===0&&(s.mode&1)===0&&(za=zt()+500,Gu&&Eo()))}function ar(i,s){var c=i.callbackNode;Rr(i,s);var p=ot(i,i===mn?_n:0);if(p===0)c!==null&&er(c),i.callbackNode=null,i.callbackPriority=0;else if(s=p&-p,i.callbackPriority!==s){if(c!=null&&er(c),s===1)i.tag===0?jE(Hb.bind(null,i)):P1(Hb.bind(null,i)),OE(function(){(vt&6)===0&&Eo()}),c=null;else{switch(Ir(p)){case 1:c=da;break;case 4:c=Tl;break;case 16:c=Zo;break;case 536870912:c=fa;break;default:c=Zo}c=Xb(c,zb.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function zb(i,s){if(yd=-1,bd=0,(vt&6)!==0)throw Error(t(327));var c=i.callbackNode;if(Ha()&&i.callbackNode!==c)return null;var p=ot(i,i===mn?_n:0);if(p===0)return null;if((p&30)!==0||(p&i.expiredLanes)!==0||s)s=kd(i,p);else{s=p;var b=vt;vt|=2;var k=$b();(mn!==i||_n!==s)&&(Qi=null,za=zt()+500,Rs(i,s));do try{iP();break}catch(D){Wb(i,D)}while(!0);fp(),hd.current=k,vt=b,on!==null?s=0:(mn=null,_n=0,s=dn)}if(s!==0){if(s===2&&(b=ma(i),b!==0&&(p=b,s=Yp(i,b))),s===1)throw c=oc,Rs(i,0),Lo(i,p),ar(i,zt()),c;if(s===6)Lo(i,p);else{if(b=i.current.alternate,(p&30)===0&&!nP(b)&&(s=kd(i,p),s===2&&(k=ma(i),k!==0&&(p=k,s=Yp(i,k))),s===1))throw c=oc,Rs(i,0),Lo(i,p),ar(i,zt()),c;switch(i.finishedWork=b,i.finishedLanes=p,s){case 0:case 1:throw Error(t(345));case 2:Is(i,sr,Qi);break;case 3:if(Lo(i,p),(p&130023424)===p&&(s=qp+500-zt(),10<s)){if(ot(i,0)!==0)break;if(b=i.suspendedLanes,(b&p)!==p){Gn(),i.pingedLanes|=i.suspendedLanes&b;break}i.timeoutHandle=tp(Is.bind(null,i,sr,Qi),s);break}Is(i,sr,Qi);break;case 4:if(Lo(i,p),(p&4194240)===p)break;for(s=i.eventTimes,b=-1;0<p;){var E=31-Sn(p);k=1<<E,E=s[E],E>b&&(b=E),p&=~k}if(p=b,p=zt()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*tP(p/1960))-p,10<p){i.timeoutHandle=tp(Is.bind(null,i,sr,Qi),p);break}Is(i,sr,Qi);break;case 5:Is(i,sr,Qi);break;default:throw Error(t(329))}}}return ar(i,zt()),i.callbackNode===c?zb.bind(null,i):null}function Yp(i,s){var c=sc;return i.current.memoizedState.isDehydrated&&(Rs(i,s).flags|=256),i=kd(i,s),i!==2&&(s=sr,sr=c,s!==null&&Qp(s)),i}function Qp(i){sr===null?sr=i:sr.push.apply(sr,i)}function nP(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var p=0;p<c.length;p++){var b=c[p],k=b.getSnapshot;b=b.value;try{if(!nr(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 Lo(i,s){for(s&=~$p,s&=~pd,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-Sn(s),p=1<<c;i[c]=-1,s&=~p}}function Hb(i){if((vt&6)!==0)throw Error(t(327));Ha();var s=ot(i,0);if((s&1)===0)return ar(i,zt()),null;var c=kd(i,s);if(i.tag!==0&&c===2){var p=ma(i);p!==0&&(s=p,c=Yp(i,p))}if(c===1)throw c=oc,Rs(i,0),Lo(i,s),ar(i,zt()),c;if(c===6)throw Error(t(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Is(i,sr,Qi),ar(i,zt()),null}function Xp(i,s){var c=vt;vt|=1;try{return i(s)}finally{vt=c,vt===0&&(za=zt()+500,Gu&&Eo())}}function Ps(i){Ao!==null&&Ao.tag===0&&(vt&6)===0&&Ha();var s=vt;vt|=1;var c=Nr.transition,p=ht;try{if(Nr.transition=null,ht=1,i)return i()}finally{ht=p,Nr.transition=c,vt=s,(vt&6)===0&&Eo()}}function Jp(){yr=Va.current,Nt(Va)}function Rs(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,AE(c)),on!==null)for(c=on.return;c!==null;){var p=c;switch(ap(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&$u();break;case 3:Ua(),Nt(rr),Nt(Ln),kp();break;case 5:yp(p);break;case 4:Ua();break;case 13:Nt(Ht);break;case 19:Nt(Ht);break;case 10:hp(p.type._context);break;case 22:case 23:Jp()}c=c.return}if(mn=i,on=i=Do(i.current,null),_n=yr=s,dn=0,oc=null,$p=pd=Es=0,sr=sc=null,Ts!==null){for(s=0;s<Ts.length;s++)if(c=Ts[s],p=c.interleaved,p!==null){c.interleaved=null;var b=p.next,k=c.pending;if(k!==null){var E=k.next;k.next=b,p.next=E}c.pending=p}Ts=null}return i}function Wb(i,s){do{var c=on;try{if(fp(),rd.current=ad,id){for(var p=Wt.memoizedState;p!==null;){var b=p.queue;b!==null&&(b.pending=null),p=p.next}id=!1}if(_s=0,pn=un=Wt=null,Zl=!1,ec=0,Wp.current=null,c===null||c.return===null){dn=1,oc=s,on=null;break}e:{var k=i,E=c.return,D=c,B=s;if(s=_n,D.flags|=32768,B!==null&&typeof B=="object"&&typeof B.then=="function"){var oe=B,ke=D,Ce=ke.tag;if((ke.mode&1)===0&&(Ce===0||Ce===11||Ce===15)){var be=ke.alternate;be?(ke.updateQueue=be.updateQueue,ke.memoizedState=be.memoizedState,ke.lanes=be.lanes):(ke.updateQueue=null,ke.memoizedState=null)}var je=mb(E);if(je!==null){je.flags&=-257,gb(je,E,D,k,s),je.mode&1&&pb(k,oe,s),s=je,B=oe;var Fe=s.updateQueue;if(Fe===null){var Ve=new Set;Ve.add(B),s.updateQueue=Ve}else Fe.add(B);break e}else{if((s&1)===0){pb(k,oe,s),Zp();break e}B=Error(t(426))}}else if(Bt&&D.mode&1){var tn=mb(E);if(tn!==null){(tn.flags&65536)===0&&(tn.flags|=256),gb(tn,E,D,k,s),up(Fa(B,D));break e}}k=B=Fa(B,D),dn!==4&&(dn=2),sc===null?sc=[k]:sc.push(k),k=E;do{switch(k.tag){case 3:k.flags|=65536,s&=-s,k.lanes|=s;var Y=fb(k,B,s);F1(k,Y);break e;case 1:D=B;var W=k.type,ee=k.stateNode;if((k.flags&128)===0&&(typeof W.getDerivedStateFromError=="function"||ee!==null&&typeof ee.componentDidCatch=="function"&&(Mo===null||!Mo.has(ee)))){k.flags|=65536,s&=-s,k.lanes|=s;var _e=hb(k,D,s);F1(k,_e);break e}}k=k.return}while(k!==null)}Gb(c)}catch(ze){s=ze,on===c&&c!==null&&(on=c=c.return);continue}break}while(!0)}function $b(){var i=hd.current;return hd.current=ad,i===null?ad:i}function Zp(){(dn===0||dn===3||dn===2)&&(dn=4),mn===null||(Es&268435455)===0&&(pd&268435455)===0||Lo(mn,_n)}function kd(i,s){var c=vt;vt|=2;var p=$b();(mn!==i||_n!==s)&&(Qi=null,Rs(i,s));do try{rP();break}catch(b){Wb(i,b)}while(!0);if(fp(),vt=c,hd.current=p,on!==null)throw Error(t(261));return mn=null,_n=0,dn}function rP(){for(;on!==null;)qb(on)}function iP(){for(;on!==null&&!ca();)qb(on)}function qb(i){var s=Qb(i.alternate,i,yr);i.memoizedProps=i.pendingProps,s===null?Gb(i):on=s,Wp.current=null}function Gb(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=QE(c,s,yr),c!==null){on=c;return}}else{if(c=XE(c,s),c!==null){c.flags&=32767,on=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{dn=6,on=null;return}}if(s=s.sibling,s!==null){on=s;return}on=s=i}while(s!==null);dn===0&&(dn=5)}function Is(i,s,c){var p=ht,b=Nr.transition;try{Nr.transition=null,ht=1,oP(i,s,c,p)}finally{Nr.transition=b,ht=p}return null}function oP(i,s,c,p){do Ha();while(Ao!==null);if((vt&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(ns(i,k),i===mn&&(on=mn=null,_n=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||gd||(gd=!0,Xb(Zo,function(){return Ha(),null})),k=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||k){k=Nr.transition,Nr.transition=null;var E=ht;ht=1;var D=vt;vt|=4,Wp.current=null,ZE(i,c),jb(c,i),f(Zh),hr=!!Jh,Zh=Jh=null,i.current=c,eP(c),Sl(),vt=D,ht=E,Nr.transition=k}else i.current=c;if(gd&&(gd=!1,Ao=i,vd=b),k=i.pendingLanes,k===0&&(Mo=null),ha(c.stateNode),ar(i,zt()),s!==null)for(p=i.onRecoverableError,c=0;c<s.length;c++)b=s[c],p(b.value,{componentStack:b.stack,digest:b.digest});if(md)throw md=!1,i=Gp,Gp=null,i;return(vd&1)!==0&&i.tag!==0&&Ha(),k=i.pendingLanes,(k&1)!==0?i===Kp?ac++:(ac=0,Kp=i):ac=0,Eo(),null}function Ha(){if(Ao!==null){var i=Ir(vd),s=Nr.transition,c=ht;try{if(Nr.transition=null,ht=16>i?16:i,Ao===null)var p=!1;else{if(i=Ao,Ao=null,vd=0,(vt&6)!==0)throw Error(t(331));var b=vt;for(vt|=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 B=0;B<D.length;B++){var oe=D[B];for(Ue=oe;Ue!==null;){var ke=Ue;switch(ke.tag){case 0:case 11:case 15:ic(8,ke,k)}var Ce=ke.child;if(Ce!==null)Ce.return=ke,Ue=Ce;else for(;Ue!==null;){ke=Ue;var be=ke.sibling,je=ke.return;if(Ab(ke),ke===oe){Ue=null;break}if(be!==null){be.return=je,Ue=be;break}Ue=je}}}var Fe=k.alternate;if(Fe!==null){var Ve=Fe.child;if(Ve!==null){Fe.child=null;do{var tn=Ve.sibling;Ve.sibling=null,Ve=tn}while(Ve!==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:ic(9,k,k.return)}var Y=k.sibling;if(Y!==null){Y.return=k.return,Ue=Y;break e}Ue=k.return}}var W=i.current;for(Ue=W;Ue!==null;){E=Ue;var ee=E.child;if((E.subtreeFlags&2064)!==0&&ee!==null)ee.return=E,Ue=ee;else e:for(E=W;Ue!==null;){if(D=Ue,(D.flags&2048)!==0)try{switch(D.tag){case 0:case 11:case 15:fd(9,D)}}catch(ze){Qt(D,D.return,ze)}if(D===E){Ue=null;break e}var _e=D.sibling;if(_e!==null){_e.return=D.return,Ue=_e;break e}Ue=D.return}}if(vt=b,Eo(),Rn&&typeof Rn.onPostCommitFiberRoot=="function")try{Rn.onPostCommitFiberRoot(Er,i)}catch{}p=!0}return p}finally{ht=c,Nr.transition=s}}return!1}function Kb(i,s,c){s=Fa(c,s),s=fb(i,s,1),i=Ro(i,s,1),s=Gn(),i!==null&&(Pt(i,1,s),ar(i,s))}function Qt(i,s,c){if(i.tag===3)Kb(i,i,c);else for(;s!==null;){if(s.tag===3){Kb(s,i,c);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Mo===null||!Mo.has(p))){i=Fa(c,i),i=hb(s,i,1),s=Ro(s,i,1),i=Gn(),s!==null&&(Pt(s,1,i),ar(s,i));break}}s=s.return}}function sP(i,s,c){var p=i.pingCache;p!==null&&p.delete(s),s=Gn(),i.pingedLanes|=i.suspendedLanes&c,mn===i&&(_n&c)===c&&(dn===4||dn===3&&(_n&130023424)===_n&&500>zt()-qp?Rs(i,0):$p|=c),ar(i,s)}function Yb(i,s){s===0&&((i.mode&1)===0?s=1:(s=Tn,Tn<<=1,(Tn&130023424)===0&&(Tn=4194304)));var c=Gn();i=Gi(i,s),i!==null&&(Pt(i,s,c),ar(i,c))}function aP(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),Yb(i,c)}function lP(i,s){var c=0;switch(i.tag){case 13:var p=i.stateNode,b=i.memoizedState;b!==null&&(c=b.retryLane);break;case 19:p=i.stateNode;break;default:throw Error(t(314))}p!==null&&p.delete(s),Yb(i,c)}var Qb;Qb=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||rr.current)or=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return or=!1,YE(i,s,c);or=(i.flags&131072)!==0}else or=!1,Bt&&(s.flags&1048576)!==0&&R1(s,Yu,s.index);switch(s.lanes=0,s.tag){case 2:var p=s.type;ud(i,s),i=s.pendingProps;var b=Ma(s,Ln.current);ja(s,c),b=Sp(null,s,p,i,b,c);var k=Tp();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,ir(p)?(k=!0,qu(s)):k=!1,s.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,gp(s),b.updater=ld,s.stateNode=b,b._reactInternals=s,Ip(s,p,i,c),s=Lp(null,s,p,!0,k,c)):(s.tag=0,Bt&&k&&sp(s),qn(null,s,b,c),s=s.child),s;case 16:p=s.elementType;e:{switch(ud(i,s),i=s.pendingProps,b=p._init,p=b(p._payload),s.type=p,b=s.tag=uP(p),i=ri(p,i),b){case 0:s=Op(null,s,p,i,c);break e;case 1:s=Cb(null,s,p,i,c);break e;case 11:s=vb(null,s,p,i,c);break e;case 14:s=yb(null,s,p,ri(p.type,i),c);break e}throw Error(t(306,p,""))}return s;case 0:return p=s.type,b=s.pendingProps,b=s.elementType===p?b:ri(p,b),Op(i,s,p,b,c);case 1:return p=s.type,b=s.pendingProps,b=s.elementType===p?b:ri(p,b),Cb(i,s,p,b,c);case 3:e:{if(Sb(s),i===null)throw Error(t(387));p=s.pendingProps,k=s.memoizedState,b=k.element,U1(i,s),td(s,p,null,c);var E=s.memoizedState;if(p=E.element,k.isDehydrated)if(k={element:p,isDehydrated:!1,cache:E.cache,pendingSuspenseBoundaries:E.pendingSuspenseBoundaries,transitions:E.transitions},s.updateQueue.baseState=k,s.memoizedState=k,s.flags&256){b=Fa(Error(t(423)),s),s=Tb(i,s,p,c,b);break e}else if(p!==b){b=Fa(Error(t(424)),s),s=Tb(i,s,p,c,b);break e}else for(vr=To(s.stateNode.containerInfo.firstChild),gr=s,Bt=!0,ni=null,c=N1(s,null,p,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(La(),p===b){s=Yi(i,s,c);break e}qn(i,s,p,c)}s=s.child}return s;case 5:return V1(s),i===null&&cp(s),p=s.type,b=s.pendingProps,k=i!==null?i.memoizedProps:null,E=b.children,ep(p,b)?E=null:k!==null&&ep(p,k)&&(s.flags|=32),wb(i,s),qn(i,s,E,c),s.child;case 6:return i===null&&cp(s),null;case 13:return xb(i,s,c);case 4:return vp(s,s.stateNode.containerInfo),p=s.pendingProps,i===null?s.child=Da(s,null,p,c):qn(i,s,p,c),s.child;case 11:return p=s.type,b=s.pendingProps,b=s.elementType===p?b:ri(p,b),vb(i,s,p,b,c);case 7:return qn(i,s,s.pendingProps,c),s.child;case 8:return qn(i,s,s.pendingProps.children,c),s.child;case 12:return qn(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(p=s.type._context,b=s.pendingProps,k=s.memoizedProps,E=b.value,At(Ju,p._currentValue),p._currentValue=E,k!==null)if(nr(k.value,E)){if(k.children===b.children&&!rr.current){s=Yi(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 B=D.firstContext;B!==null;){if(B.context===p){if(k.tag===1){B=Ki(-1,c&-c),B.tag=2;var oe=k.updateQueue;if(oe!==null){oe=oe.shared;var ke=oe.pending;ke===null?B.next=B:(B.next=ke.next,ke.next=B),oe.pending=B}}k.lanes|=c,B=k.alternate,B!==null&&(B.lanes|=c),pp(k.return,c,s),D.lanes|=c;break}B=B.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),pp(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}qn(i,s,b.children,c),s=s.child}return s;case 9:return b=s.type,p=s.pendingProps.children,ja(s,c),b=Lr(b),p=p(b),s.flags|=1,qn(i,s,p,c),s.child;case 14:return p=s.type,b=ri(p,s.pendingProps),b=ri(p.type,b),yb(i,s,p,b,c);case 15:return bb(i,s,s.type,s.pendingProps,c);case 17:return p=s.type,b=s.pendingProps,b=s.elementType===p?b:ri(p,b),ud(i,s),s.tag=1,ir(p)?(i=!0,qu(s)):i=!1,ja(s,c),ub(s,p,b),Ip(s,p,b,c),Lp(null,s,p,!0,i,c);case 19:return Eb(i,s,c);case 22:return kb(i,s,c)}throw Error(t(156,s.tag))};function Xb(i,s){return Cl(i,s)}function cP(i,s,c,p){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=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jr(i,s,c,p){return new cP(i,s,c,p)}function em(i){return i=i.prototype,!(!i||!i.isReactComponent)}function uP(i){if(typeof i=="function")return em(i)?1:0;if(i!=null){if(i=i.$$typeof,i===fe)return 11;if(i===re)return 14}return 2}function Do(i,s){var c=i.alternate;return c===null?(c=jr(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 wd(i,s,c,p,b,k){var E=2;if(p=i,typeof i=="function")em(i)&&(E=1);else if(typeof i=="string")E=5;else e:switch(i){case ie:return Ms(c.children,b,k,s);case X:E=8,b|=8;break;case Q:return i=jr(12,c,s,b|2),i.elementType=Q,i.lanes=k,i;case Ae:return i=jr(13,c,s,b),i.elementType=Ae,i.lanes=k,i;case Ge:return i=jr(19,c,s,b),i.elementType=Ge,i.lanes=k,i;case me:return Cd(c,b,k,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case te:E=10;break e;case ne:E=9;break e;case fe:E=11;break e;case re:E=14;break e;case Ie:E=16,p=null;break e}throw Error(t(130,i==null?i:typeof i,""))}return s=jr(E,c,s,b),s.elementType=i,s.type=p,s.lanes=k,s}function Ms(i,s,c,p){return i=jr(7,i,p,s),i.lanes=c,i}function Cd(i,s,c,p){return i=jr(22,i,p,s),i.elementType=me,i.lanes=c,i.stateNode={isHidden:!1},i}function tm(i,s,c){return i=jr(6,i,null,s),i.lanes=c,i}function nm(i,s,c){return s=jr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function dP(i,s,c,p,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=ga(0),this.expirationTimes=ga(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ga(0),this.identifierPrefix=p,this.onRecoverableError=b,this.mutableSourceEagerHydrationData=null}function rm(i,s,c,p,b,k,E,D,B){return i=new dP(i,s,c,D,B),s===1?(s=1,k===!0&&(s|=8)):s=0,k=jr(3,null,null,s),i.current=k,k.stateNode=i,k.memoizedState={element:p,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},gp(k),i}function fP(i,s,c){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:K,key:p==null?null:""+p,children:i,containerInfo:s,implementation:c}}function Jb(i){if(!i)return _o;i=i._reactInternals;e:{if(pi(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(ir(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(ir(c))return _1(i,c,s)}return s}function Zb(i,s,c,p,b,k,E,D,B){return i=rm(c,p,!0,i,b,k,E,D,B),i.context=Jb(null),c=i.current,p=Gn(),b=Oo(c),k=Ki(p,b),k.callback=s??null,Ro(c,k,b),i.current.lanes=b,Pt(i,b,p),ar(i,p),i}function Sd(i,s,c,p){var b=s.current,k=Gn(),E=Oo(b);return c=Jb(c),s.context===null?s.context=c:s.pendingContext=c,s=Ki(k,E),s.payload={element:i},p=p===void 0?null:p,p!==null&&(s.callback=p),i=Ro(b,s,E),i!==null&&(si(i,b,E,k),ed(i,b,E)),E}function Td(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 ek(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function im(i,s){ek(i,s),(i=i.alternate)&&ek(i,s)}function hP(){return null}var tk=typeof reportError=="function"?reportError:function(i){console.error(i)};function om(i){this._internalRoot=i}xd.prototype.render=om.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(t(409));Sd(i,s,null,null)},xd.prototype.unmount=om.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Ps(function(){Sd(null,i,null,null)}),s[Hi]=null}};function xd(i){this._internalRoot=i}xd.prototype.unstable_scheduleHydration=function(i){if(i){var s=go();i={blockedOn:null,target:i,priority:s};for(var c=0;c<fr.length&&s!==0&&s<fr[c].priority;c++);fr.splice(c,0,i),c===0&&ji(i)}};function sm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function _d(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function nk(){}function pP(i,s,c,p,b){if(b){if(typeof p=="function"){var k=p;p=function(){var oe=Td(E);k.call(oe)}}var E=Zb(s,p,i,0,null,!1,!1,"",nk);return i._reactRootContainer=E,i[Hi]=E.current,$l(i.nodeType===8?i.parentNode:i),Ps(),E}for(;b=i.lastChild;)i.removeChild(b);if(typeof p=="function"){var D=p;p=function(){var oe=Td(B);D.call(oe)}}var B=rm(i,0,!1,null,null,!1,!1,"",nk);return i._reactRootContainer=B,i[Hi]=B.current,$l(i.nodeType===8?i.parentNode:i),Ps(function(){Sd(s,B,c,p)}),B}function Ed(i,s,c,p,b){var k=c._reactRootContainer;if(k){var E=k;if(typeof b=="function"){var D=b;b=function(){var B=Td(E);D.call(B)}}Sd(s,E,i,b)}else E=pP(c,s,i,b,p);return Td(E)}va=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=Pr(s.pendingLanes);c!==0&&(rs(s,c|1),ar(s,zt()),(vt&6)===0&&(za=zt()+500,Eo()))}break;case 13:Ps(function(){var p=Gi(i,1);if(p!==null){var b=Gn();si(p,i,1,b)}}),im(i,1)}},Qr=function(i){if(i.tag===13){var s=Gi(i,134217728);if(s!==null){var c=Gn();si(s,i,134217728,c)}im(i,134217728)}},_l=function(i){if(i.tag===13){var s=Oo(i),c=Gi(i,s);if(c!==null){var p=Gn();si(c,i,s,p)}im(i,s)}},go=function(){return ht},is=function(i,s){var c=ht;try{return ht=i,s()}finally{ht=c}},Cn=function(i,s,c){switch(s){case"input":if(Li(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 p=c[s];if(p!==i&&p.form===i.form){var b=Wu(p);if(!b)throw Error(t(90));Zn(p),Li(p,b)}}}break;case"textarea":P(i,c);break;case"select":s=c.value,s!=null&&zn(i,!!c.multiple,s,!1)}},Wn=Xp,dt=Ps;var mP={usingClientEntryPoint:!1,Events:[Kl,Ra,Wu,Ze,_r,Xp]},lc={findFiberByHostInstance:ks,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},gP={bundleType:lc.bundleType,version:lc.version,rendererPackageName:lc.rendererPackageName,rendererConfig:lc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Su(i),i===null?null:i.stateNode},findFiberByHostInstance:lc.findFiberByHostInstance||hP,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 Pd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pd.isDisabled&&Pd.supportsFiber)try{Er=Pd.inject(gP),Rn=Pd}catch{}}return Kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mP,Kn.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!sm(s))throw Error(t(200));return fP(i,s,null,c)},Kn.createRoot=function(i,s){if(!sm(i))throw Error(t(299));var c=!1,p="",b=tk;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onRecoverableError!==void 0&&(b=s.onRecoverableError)),s=rm(i,1,!1,null,null,c,!1,p,b),i[Hi]=s.current,$l(i.nodeType===8?i.parentNode:i),new om(s)},Kn.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=Su(s),i=i===null?null:i.stateNode,i},Kn.flushSync=function(i){return Ps(i)},Kn.hydrate=function(i,s,c){if(!_d(s))throw Error(t(200));return Ed(null,i,s,!0,c)},Kn.hydrateRoot=function(i,s,c){if(!sm(i))throw Error(t(405));var p=c!=null&&c.hydratedSources||null,b=!1,k="",E=tk;if(c!=null&&(c.unstable_strictMode===!0&&(b=!0),c.identifierPrefix!==void 0&&(k=c.identifierPrefix),c.onRecoverableError!==void 0&&(E=c.onRecoverableError)),s=Zb(s,null,i,1,c??null,b,!1,k,E),i[Hi]=s.current,$l(i),p)for(i=0;i<p.length;i++)c=p[i],b=c._getVersion,b=b(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,b]:s.mutableSourceEagerHydrationData.push(c,b);return new xd(s)},Kn.render=function(i,s,c){if(!_d(s))throw Error(t(200));return Ed(null,i,s,!1,c)},Kn.unmountComponentAtNode=function(i){if(!_d(i))throw Error(t(40));return i._reactRootContainer?(Ps(function(){Ed(null,null,i,!1,function(){i._reactRootContainer=null,i[Hi]=null})}),!0):!1},Kn.unstable_batchedUpdates=Xp,Kn.unstable_renderSubtreeIntoContainer=function(i,s,c,p){if(!_d(c))throw Error(t(200));if(i==null||i._reactInternals===void 0)throw Error(t(38));return Ed(i,s,c,!1,p)},Kn.version="18.3.1-next-f1338f8080-20240426",Kn}var vm;function uk(){if(vm)return Md.exports;vm=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(),Md.exports=ck(),Md.exports}var ym;function dk(){if(ym)return uc;ym=1;var n=uk();return uc.createRoot=n.createRoot,uc.hydrateRoot=n.hydrateRoot,uc}var fk=dk(),bm=function(n,e,t,r){var o;e[0]=0;for(var a=1;a<e.length;a++){var l=e[a++],d=e[a]?(e[0]|=l?1:2,t[e[a++]]):e[++a];l===3?r[0]=d:l===4?r[1]=Object.assign(r[1]||{},d):l===5?(r[1]=r[1]||{})[e[++a]]=d:l===6?r[1][e[++a]]+=d+"":l?(o=n.apply(d,bm(n,d,t,["",null])),r.push(o),d[0]?e[0]|=2:(e[a-2]=0,e[a]=o)):r.push(d)}return r},km=new Map;function hk(n){var e=km.get(this);return e||(e=new Map,km.set(this,e)),(e=bm(this,e.get(n)||(e.set(n,e=function(t){for(var r,o,a=1,l="",d="",h=[0],m=function(x){a===1&&(x||(l=l.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?h.push(0,x,l):a===3&&(x||l)?(h.push(3,x,l),a=2):a===2&&l==="..."&&x?h.push(4,x,0):a===2&&l&&!x?h.push(5,0,!0,l):a>=5&&((l||!x&&a===5)&&(h.push(a,0,l,o),a=6),x&&(h.push(a,x,0,o),a=6)),l=""},g=0;g<t.length;g++){g&&(a===1&&m(),m(g));for(var T=0;T<t[g].length;T++)r=t[g][T],a===1?r==="<"?(m(),h=[h],a=3):l+=r:a===4?l==="--"&&r===">"?(a=1,l=""):l=r+l[0]:d?r===d?d="":l+=r:r==='"'||r==="'"?d=r:r===">"?(m(),a=1):a&&(r==="="?(a=5,o=l,l=""):r==="/"&&(a<5||t[g][T+1]===">")?(m(),a===3&&(h=h[0]),a=h,(h=h[0]).push(2,0,a),a=0):r===" "||r===" "||r===`
41
- `||r==="\r"?(m(),a=2):l+=r),a===3&&l==="!--"&&(a=4,h=h[0])}return m(),h}(n)),e),arguments,[])).length>1?e:e[0]}function As(n){return n!=null&&typeof n=="object"&&n["@@functional/placeholder"]===!0}function jo(n){return function e(t){return arguments.length===0||As(t)?e:n.apply(this,arguments)}}function Ld(n){return function e(t,r){switch(arguments.length){case 0:return e;case 1:return As(t)?e:jo(function(o){return n(t,o)});default:return As(t)&&As(r)?e:As(t)?jo(function(o){return n(o,r)}):As(r)?jo(function(o){return n(t,o)}):n(t,r)}}}const pk=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)==="[object Array]"};function mk(n){return n!=null&&typeof n["@@transducer/step"]=="function"}function wm(n,e,t){return function(){if(arguments.length===0)return t();var r=arguments[arguments.length-1];if(!pk(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(mk(r)){var a=e.apply(null,Array.prototype.slice.call(arguments,0,-1));return a(r)}}return t.apply(this,arguments)}}const Dd={init:function(){return this.xf["@@transducer/init"]()},result:function(n){return this.xf["@@transducer/result"](n)}};function Cm(n){for(var e=[],t;!(t=n.next()).done;)e.push(t.value);return e}function Sm(n,e,t){for(var r=0,o=t.length;r<o;){if(n(e,t[r]))return!0;r+=1}return!1}function gk(n){var e=String(n).match(/^function (\w*)/);return e==null?"":e[1]}function dc(n,e){return Object.prototype.hasOwnProperty.call(e,n)}function vk(n,e){return n===e?n!==0||1/n===1/e:n!==n&&e!==e}const Nd=typeof Object.is=="function"?Object.is:vk;var Tm=Object.prototype.toString,yk=function(){return Tm.call(arguments)==="[object Arguments]"?function(e){return Tm.call(e)==="[object Arguments]"}:function(e){return dc("callee",e)}}(),bk=!{toString:null}.propertyIsEnumerable("toString"),xm=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],_m=function(){return arguments.propertyIsEnumerable("length")}(),kk=function(e,t){for(var r=0;r<e.length;){if(e[r]===t)return!0;r+=1}return!1},Em=jo(typeof Object.keys=="function"&&!_m?function(e){return Object(e)!==e?[]:Object.keys(e)}:function(e){if(Object(e)!==e)return[];var t,r,o=[],a=_m&&yk(e);for(t in e)dc(t,e)&&(!a||t!=="length")&&(o[o.length]=t);if(bk)for(r=xm.length-1;r>=0;)t=xm[r],dc(t,e)&&!kk(o,t)&&(o[o.length]=t),r-=1;return o}),Pm=jo(function(e){return e===null?"Null":e===void 0?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function Rm(n,e,t,r){var o=Cm(n),a=Cm(e);function l(d,h){return jd(d,h,t.slice(),r.slice())}return!Sm(function(d,h){return!Sm(l,h,d)},a,o)}function jd(n,e,t,r){if(Nd(n,e))return!0;var o=Pm(n);if(o!==Pm(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"&&gk(n.constructor)==="Promise")return n===e;break;case"Boolean":case"Number":case"String":if(!(typeof n==typeof e&&Nd(n.valueOf(),e.valueOf())))return!1;break;case"Date":if(!Nd(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:Rm(n.entries(),e.entries(),t.concat([n]),r.concat([e]));case"Set":return n.size!==e.size?!1:Rm(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=Em(n);if(l.length!==Em(e).length)return!1;var d=t.concat([n]),h=r.concat([e]);for(a=l.length-1;a>=0;){var m=l[a];if(!(dc(m,e)&&jd(e[m],n[m],d,h)))return!1;a-=1}return!0}var Ud=Ld(function(e,t){return jd(e,t,[],[])});function wk(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(Ud(n[t],e))return t;t+=1}return-1}function Im(n,e){return wk(e,n,0)>=0}function Ck(n){return n}var Sk=jo(Ck),Mm=function(){function n(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return n.prototype.add=function(e){return!Am(e,!0,this)},n.prototype.has=function(e){return Am(e,!1,this)},n}();function Am(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?Im(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?Im(n,t._items[r])?!0:(e&&t._items[r].push(n),!1):(e&&(t._items[r]=[n]),!1)}}var Tk=function(){function n(e,t){this.xf=t,this.f=e,this.idx=-1,this.lastIdx=-1}return n.prototype["@@transducer/init"]=Dd.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 xk(n){return function(e){return new Tk(n,e)}}var Om=Ld(wm([],xk,function(e,t){for(var r=t.length-1;r>=0;){if(e(t[r]))return r;r-=1}return-1})),_k=function(){function n(e,t){this.xf=t,this.f=e,this.set=new Mm}return n.prototype["@@transducer/init"]=Dd.init,n.prototype["@@transducer/result"]=Dd.result,n.prototype["@@transducer/step"]=function(e,t){return this.set.add(this.f(t))?this.xf["@@transducer/step"](e,t):e},n}();function Ek(n){return function(e){return new _k(n,e)}}var Pk=Ld(wm([],Ek,function(n,e){for(var t=new Mm,r=[],o=0,a,l;o<e.length;)l=e[o],a=n(l),t.add(a)&&r.push(l),o+=1;return r})),Rk=Pk(Sk);const Ik={version:"1.1.8-alpha.4"};var vn=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global||{},Un={searchParams:"URLSearchParams"in vn,iterable:"Symbol"in vn&&"iterator"in Symbol,blob:"FileReader"in vn&&"Blob"in vn&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in vn,arrayBuffer:"ArrayBuffer"in vn};function Mk(n){return n&&DataView.prototype.isPrototypeOf(n)}if(Un.arrayBuffer)var Ak=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Ok=ArrayBuffer.isView||function(n){return n&&Ak.indexOf(Object.prototype.toString.call(n))>-1};function Os(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 Fd(n){return typeof n!="string"&&(n=String(n)),n}function Bd(n){var e={next:function(){var t=n.shift();return{done:t===void 0,value:t}}};return Un.iterable&&(e[Symbol.iterator]=function(){return e}),e}function sn(n){this.map={},n instanceof sn?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)}sn.prototype.append=function(n,e){n=Os(n),e=Fd(e);var t=this.map[n];this.map[n]=t?t+", "+e:e},sn.prototype.delete=function(n){delete this.map[Os(n)]},sn.prototype.get=function(n){return n=Os(n),this.has(n)?this.map[n]:null},sn.prototype.has=function(n){return this.map.hasOwnProperty(Os(n))},sn.prototype.set=function(n,e){this.map[Os(n)]=Fd(e)},sn.prototype.forEach=function(n,e){for(var t in this.map)this.map.hasOwnProperty(t)&&n.call(e,this.map[t],t,this)},sn.prototype.keys=function(){var n=[];return this.forEach(function(e,t){n.push(t)}),Bd(n)},sn.prototype.values=function(){var n=[];return this.forEach(function(e){n.push(e)}),Bd(n)},sn.prototype.entries=function(){var n=[];return this.forEach(function(e,t){n.push([t,e])}),Bd(n)},Un.iterable&&(sn.prototype[Symbol.iterator]=sn.prototype.entries);function Vd(n){if(!n._noBody){if(n.bodyUsed)return Promise.reject(new TypeError("Already read"));n.bodyUsed=!0}}function Lm(n){return new Promise(function(e,t){n.onload=function(){e(n.result)},n.onerror=function(){t(n.error)}})}function Lk(n){var e=new FileReader,t=Lm(e);return e.readAsArrayBuffer(n),t}function Dk(n){var e=new FileReader,t=Lm(e),r=/charset=([A-Za-z0-9_-]+)/.exec(n.type),o=r?r[1]:"utf-8";return e.readAsText(n,o),t}function Nk(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 Dm(n){if(n.slice)return n.slice(0);var e=new Uint8Array(n.byteLength);return e.set(new Uint8Array(n)),e.buffer}function Nm(){return this.bodyUsed=!1,this._initBody=function(n){this.bodyUsed=this.bodyUsed,this._bodyInit=n,n?typeof n=="string"?this._bodyText=n:Un.blob&&Blob.prototype.isPrototypeOf(n)?this._bodyBlob=n:Un.formData&&FormData.prototype.isPrototypeOf(n)?this._bodyFormData=n:Un.searchParams&&URLSearchParams.prototype.isPrototypeOf(n)?this._bodyText=n.toString():Un.arrayBuffer&&Un.blob&&Mk(n)?(this._bodyArrayBuffer=Dm(n.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Un.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(n)||Ok(n))?this._bodyArrayBuffer=Dm(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):Un.searchParams&&URLSearchParams.prototype.isPrototypeOf(n)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Un.blob&&(this.blob=function(){var n=Vd(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=Vd(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(Un.blob)return this.blob().then(Lk);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var n=Vd(this);if(n)return n;if(this._bodyBlob)return Dk(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Nk(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Un.formData&&(this.formData=function(){return this.text().then(Fk)}),this.json=function(){return this.text().then(JSON.parse)},this}var jk=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Uk(n){var e=n.toUpperCase();return jk.indexOf(e)>-1?e:n}function Uo(n,e){if(!(this instanceof Uo))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 Uo){if(n.bodyUsed)throw new TypeError("Already read");this.url=n.url,this.credentials=n.credentials,e.headers||(this.headers=new sn(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 sn(e.headers)),this.method=Uk(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in vn){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()}}}Uo.prototype.clone=function(){return new Uo(this,{body:this._bodyInit})};function Fk(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 Bk(n){var e=new sn,t=n.replace(/\r?\n[\t ]+/g," ");return t.split("\r").map(function(r){return r.indexOf(`
41
+ `||r==="\r"?(m(),a=2):l+=r),a===3&&l==="!--"&&(a=4,h=h[0])}return m(),h}(n)),e),arguments,[])).length>1?e:e[0]}function As(n){return n!=null&&typeof n=="object"&&n["@@functional/placeholder"]===!0}function jo(n){return function e(t){return arguments.length===0||As(t)?e:n.apply(this,arguments)}}function Ld(n){return function e(t,r){switch(arguments.length){case 0:return e;case 1:return As(t)?e:jo(function(o){return n(t,o)});default:return As(t)&&As(r)?e:As(t)?jo(function(o){return n(o,r)}):As(r)?jo(function(o){return n(t,o)}):n(t,r)}}}const pk=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)==="[object Array]"};function mk(n){return n!=null&&typeof n["@@transducer/step"]=="function"}function wm(n,e,t){return function(){if(arguments.length===0)return t();var r=arguments[arguments.length-1];if(!pk(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(mk(r)){var a=e.apply(null,Array.prototype.slice.call(arguments,0,-1));return a(r)}}return t.apply(this,arguments)}}const Dd={init:function(){return this.xf["@@transducer/init"]()},result:function(n){return this.xf["@@transducer/result"](n)}};function Cm(n){for(var e=[],t;!(t=n.next()).done;)e.push(t.value);return e}function Sm(n,e,t){for(var r=0,o=t.length;r<o;){if(n(e,t[r]))return!0;r+=1}return!1}function gk(n){var e=String(n).match(/^function (\w*)/);return e==null?"":e[1]}function dc(n,e){return Object.prototype.hasOwnProperty.call(e,n)}function vk(n,e){return n===e?n!==0||1/n===1/e:n!==n&&e!==e}const Nd=typeof Object.is=="function"?Object.is:vk;var Tm=Object.prototype.toString,yk=function(){return Tm.call(arguments)==="[object Arguments]"?function(e){return Tm.call(e)==="[object Arguments]"}:function(e){return dc("callee",e)}}(),bk=!{toString:null}.propertyIsEnumerable("toString"),xm=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],_m=function(){return arguments.propertyIsEnumerable("length")}(),kk=function(e,t){for(var r=0;r<e.length;){if(e[r]===t)return!0;r+=1}return!1},Em=jo(typeof Object.keys=="function"&&!_m?function(e){return Object(e)!==e?[]:Object.keys(e)}:function(e){if(Object(e)!==e)return[];var t,r,o=[],a=_m&&yk(e);for(t in e)dc(t,e)&&(!a||t!=="length")&&(o[o.length]=t);if(bk)for(r=xm.length-1;r>=0;)t=xm[r],dc(t,e)&&!kk(o,t)&&(o[o.length]=t),r-=1;return o}),Pm=jo(function(e){return e===null?"Null":e===void 0?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function Rm(n,e,t,r){var o=Cm(n),a=Cm(e);function l(d,h){return jd(d,h,t.slice(),r.slice())}return!Sm(function(d,h){return!Sm(l,h,d)},a,o)}function jd(n,e,t,r){if(Nd(n,e))return!0;var o=Pm(n);if(o!==Pm(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"&&gk(n.constructor)==="Promise")return n===e;break;case"Boolean":case"Number":case"String":if(!(typeof n==typeof e&&Nd(n.valueOf(),e.valueOf())))return!1;break;case"Date":if(!Nd(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:Rm(n.entries(),e.entries(),t.concat([n]),r.concat([e]));case"Set":return n.size!==e.size?!1:Rm(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=Em(n);if(l.length!==Em(e).length)return!1;var d=t.concat([n]),h=r.concat([e]);for(a=l.length-1;a>=0;){var m=l[a];if(!(dc(m,e)&&jd(e[m],n[m],d,h)))return!1;a-=1}return!0}var Ud=Ld(function(e,t){return jd(e,t,[],[])});function wk(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(Ud(n[t],e))return t;t+=1}return-1}function Im(n,e){return wk(e,n,0)>=0}function Ck(n){return n}var Sk=jo(Ck),Mm=function(){function n(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return n.prototype.add=function(e){return!Am(e,!0,this)},n.prototype.has=function(e){return Am(e,!1,this)},n}();function Am(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?Im(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?Im(n,t._items[r])?!0:(e&&t._items[r].push(n),!1):(e&&(t._items[r]=[n]),!1)}}var Tk=function(){function n(e,t){this.xf=t,this.f=e,this.idx=-1,this.lastIdx=-1}return n.prototype["@@transducer/init"]=Dd.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 xk(n){return function(e){return new Tk(n,e)}}var Om=Ld(wm([],xk,function(e,t){for(var r=t.length-1;r>=0;){if(e(t[r]))return r;r-=1}return-1})),_k=function(){function n(e,t){this.xf=t,this.f=e,this.set=new Mm}return n.prototype["@@transducer/init"]=Dd.init,n.prototype["@@transducer/result"]=Dd.result,n.prototype["@@transducer/step"]=function(e,t){return this.set.add(this.f(t))?this.xf["@@transducer/step"](e,t):e},n}();function Ek(n){return function(e){return new _k(n,e)}}var Pk=Ld(wm([],Ek,function(n,e){for(var t=new Mm,r=[],o=0,a,l;o<e.length;)l=e[o],a=n(l),t.add(a)&&r.push(l),o+=1;return r})),Rk=Pk(Sk);const Ik={version:"1.2.0"};var vn=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global||{},Un={searchParams:"URLSearchParams"in vn,iterable:"Symbol"in vn&&"iterator"in Symbol,blob:"FileReader"in vn&&"Blob"in vn&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in vn,arrayBuffer:"ArrayBuffer"in vn};function Mk(n){return n&&DataView.prototype.isPrototypeOf(n)}if(Un.arrayBuffer)var Ak=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Ok=ArrayBuffer.isView||function(n){return n&&Ak.indexOf(Object.prototype.toString.call(n))>-1};function Os(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 Fd(n){return typeof n!="string"&&(n=String(n)),n}function Bd(n){var e={next:function(){var t=n.shift();return{done:t===void 0,value:t}}};return Un.iterable&&(e[Symbol.iterator]=function(){return e}),e}function sn(n){this.map={},n instanceof sn?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)}sn.prototype.append=function(n,e){n=Os(n),e=Fd(e);var t=this.map[n];this.map[n]=t?t+", "+e:e},sn.prototype.delete=function(n){delete this.map[Os(n)]},sn.prototype.get=function(n){return n=Os(n),this.has(n)?this.map[n]:null},sn.prototype.has=function(n){return this.map.hasOwnProperty(Os(n))},sn.prototype.set=function(n,e){this.map[Os(n)]=Fd(e)},sn.prototype.forEach=function(n,e){for(var t in this.map)this.map.hasOwnProperty(t)&&n.call(e,this.map[t],t,this)},sn.prototype.keys=function(){var n=[];return this.forEach(function(e,t){n.push(t)}),Bd(n)},sn.prototype.values=function(){var n=[];return this.forEach(function(e){n.push(e)}),Bd(n)},sn.prototype.entries=function(){var n=[];return this.forEach(function(e,t){n.push([t,e])}),Bd(n)},Un.iterable&&(sn.prototype[Symbol.iterator]=sn.prototype.entries);function Vd(n){if(!n._noBody){if(n.bodyUsed)return Promise.reject(new TypeError("Already read"));n.bodyUsed=!0}}function Lm(n){return new Promise(function(e,t){n.onload=function(){e(n.result)},n.onerror=function(){t(n.error)}})}function Lk(n){var e=new FileReader,t=Lm(e);return e.readAsArrayBuffer(n),t}function Dk(n){var e=new FileReader,t=Lm(e),r=/charset=([A-Za-z0-9_-]+)/.exec(n.type),o=r?r[1]:"utf-8";return e.readAsText(n,o),t}function Nk(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 Dm(n){if(n.slice)return n.slice(0);var e=new Uint8Array(n.byteLength);return e.set(new Uint8Array(n)),e.buffer}function Nm(){return this.bodyUsed=!1,this._initBody=function(n){this.bodyUsed=this.bodyUsed,this._bodyInit=n,n?typeof n=="string"?this._bodyText=n:Un.blob&&Blob.prototype.isPrototypeOf(n)?this._bodyBlob=n:Un.formData&&FormData.prototype.isPrototypeOf(n)?this._bodyFormData=n:Un.searchParams&&URLSearchParams.prototype.isPrototypeOf(n)?this._bodyText=n.toString():Un.arrayBuffer&&Un.blob&&Mk(n)?(this._bodyArrayBuffer=Dm(n.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Un.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(n)||Ok(n))?this._bodyArrayBuffer=Dm(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):Un.searchParams&&URLSearchParams.prototype.isPrototypeOf(n)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Un.blob&&(this.blob=function(){var n=Vd(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=Vd(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(Un.blob)return this.blob().then(Lk);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var n=Vd(this);if(n)return n;if(this._bodyBlob)return Dk(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Nk(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Un.formData&&(this.formData=function(){return this.text().then(Fk)}),this.json=function(){return this.text().then(JSON.parse)},this}var jk=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Uk(n){var e=n.toUpperCase();return jk.indexOf(e)>-1?e:n}function Uo(n,e){if(!(this instanceof Uo))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 Uo){if(n.bodyUsed)throw new TypeError("Already read");this.url=n.url,this.credentials=n.credentials,e.headers||(this.headers=new sn(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 sn(e.headers)),this.method=Uk(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in vn){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()}}}Uo.prototype.clone=function(){return new Uo(this,{body:this._bodyInit})};function Fk(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 Bk(n){var e=new sn,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(d){console.warn("Response "+d.message)}}}),e}Nm.call(Uo.prototype);function ai(n,e){if(!(this instanceof ai))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 sn(e.headers),this.url=e.url||"",this._initBody(n)}Nm.call(ai.prototype),ai.prototype.clone=function(){return new ai(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new sn(this.headers),url:this.url})},ai.error=function(){var n=new ai(null,{status:200,statusText:""});return n.ok=!1,n.status=0,n.type="error",n};var Vk=[301,302,303,307,308];ai.redirect=function(n,e){if(Vk.indexOf(e)===-1)throw new RangeError("Invalid status code");return new ai(null,{status:e,headers:{location:n}})};var Fo=vn.DOMException;try{new Fo}catch{Fo=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},Fo.prototype=Object.create(Error.prototype),Fo.prototype.constructor=Fo}function jm(n,e){return new Promise(function(t,r){var o=new Uo(n,e);if(o.signal&&o.signal.aborted)return r(new Fo("Aborted","AbortError"));var a=new XMLHttpRequest;function l(){a.abort()}a.onload=function(){var m={statusText:a.statusText,headers:Bk(a.getAllResponseHeaders()||"")};o.url.indexOf("file://")===0&&(a.status<200||a.status>599)?m.status=200:m.status=a.status,m.url="responseURL"in a?a.responseURL:m.headers.get("X-Request-URL");var g="response"in a?a.response:a.responseText;setTimeout(function(){t(new ai(g,m))},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 Fo("Aborted","AbortError"))},0)};function d(m){try{return m===""&&vn.location.href?vn.location.href:m}catch{return m}}if(a.open(o.method,d(o.url),!0),o.credentials==="include"?a.withCredentials=!0:o.credentials==="omit"&&(a.withCredentials=!1),"responseType"in a&&(Un.blob?a.responseType="blob":Un.arrayBuffer&&(a.responseType="arraybuffer")),e&&typeof e.headers=="object"&&!(e.headers instanceof sn||vn.Headers&&e.headers instanceof vn.Headers)){var h=[];Object.getOwnPropertyNames(e.headers).forEach(function(m){h.push(Os(m)),a.setRequestHeader(m,Fd(e.headers[m]))}),o.headers.forEach(function(m,g){h.indexOf(g)===-1&&a.setRequestHeader(g,m)})}else o.headers.forEach(function(m,g){a.setRequestHeader(g,m)});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)})}jm.polyfill=!0,vn.fetch||(vn.fetch=jm,vn.Headers=sn,vn.Request=Uo,vn.Response=ai);var zd,Um;function zk(){return Um||(Um=1,zd=self.fetch.bind(self)),zd}var Hk=zk();const Hd=wt(Hk);function Vt(n){return n!=null&&typeof n=="object"&&n["@@functional/placeholder"]===!0}function Bo(n){return function e(t){return arguments.length===0||Vt(t)?e:n.apply(this,arguments)}}function Ls(n){return function e(t,r){switch(arguments.length){case 0:return e;case 1:return Vt(t)?e:Bo(function(o){return n(t,o)});default:return Vt(t)&&Vt(r)?e:Vt(t)?Bo(function(o){return n(o,r)}):Vt(r)?Bo(function(o){return n(t,o)}):n(t,r)}}}function Wk(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 $k(n){return function e(t,r,o){switch(arguments.length){case 0:return e;case 1:return Vt(t)?e:Ls(function(a,l){return n(t,a,l)});case 2:return Vt(t)&&Vt(r)?e:Vt(t)?Ls(function(a,l){return n(a,r,l)}):Vt(r)?Ls(function(a,l){return n(t,a,l)}):Bo(function(a){return n(t,r,a)});default:return Vt(t)&&Vt(r)&&Vt(o)?e:Vt(t)&&Vt(r)?Ls(function(a,l){return n(a,l,o)}):Vt(t)&&Vt(o)?Ls(function(a,l){return n(a,r,l)}):Vt(r)&&Vt(o)?Ls(function(a,l){return n(t,a,l)}):Vt(t)?Bo(function(a){return n(a,r,o)}):Vt(r)?Bo(function(a){return n(t,a,o)}):Vt(o)?Bo(function(a){return n(t,r,a)}):n(t,r,o)}}}var Fm=$k(function(e,t,r){var o=r.length;if(e>=o||e<-o)return r;var a=(o+e)%o,l=Wk(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
@@ -153,14 +153,14 @@ ${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>${hi(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=ky(e);if(a===null)return o;e=a;let l='<a href="'+e+'"';return t&&(l+=' title="'+hi(t)+'"'),l+=">"+o+"</a>",l}image({href:e,title:t,text:r}){const o=ky(e);if(o===null)return hi(r);e=o;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${hi(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:hi(e.text)}}class xh{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 Cr{constructor(e){kt(this,"options");kt(this,"renderer");kt(this,"textRenderer");this.options=e||Yo,this.options.renderer=this.options.renderer||new ou,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new xh}static parse(e,t){return new Cr(t).parse(e)}static parseInline(e,t){return new Cr(t).parseInline(e)}parse(e,t=!0){var o,a;let r="";for(let l=0;l<e.length;l++){const d=e[l];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[d.type]){const m=d,g=this.options.extensions.renderers[m.type].call({parser:this},m);if(g!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(m.type)){r+=g||"";continue}}const h=d;switch(h.type){case"space":{r+=this.renderer.space(h);continue}case"hr":{r+=this.renderer.hr(h);continue}case"heading":{r+=this.renderer.heading(h);continue}case"code":{r+=this.renderer.code(h);continue}case"table":{r+=this.renderer.table(h);continue}case"blockquote":{r+=this.renderer.blockquote(h);continue}case"list":{r+=this.renderer.list(h);continue}case"html":{r+=this.renderer.html(h);continue}case"paragraph":{r+=this.renderer.paragraph(h);continue}case"text":{let m=h,g=this.renderer.text(m);for(;l+1<e.length&&e[l+1].type==="text";)m=e[++l],g+=`
155
155
  `+this.renderer.text(m);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 m='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(m),"";throw new Error(m)}}}return r}parseInline(e,t=this.renderer){var o,a;let r="";for(let l=0;l<e.length;l++){const d=e[l];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[d.type]){const m=this.options.extensions.renderers[d.type].call({parser:this},d);if(m!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(d.type)){r+=m||"";continue}}const h=d;switch(h.type){case"escape":{r+=t.text(h);break}case"html":{r+=t.html(h);break}case"link":{r+=t.link(h);break}case"image":{r+=t.image(h);break}case"strong":{r+=t.strong(h);break}case"em":{r+=t.em(h);break}case"codespan":{r+=t.codespan(h);break}case"br":{r+=t.br(h);break}case"del":{r+=t.del(h);break}case"text":{r+=t.text(h);break}default:{const m='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(m),"";throw new Error(m)}}}return r}}class fl{constructor(e){kt(this,"options");kt(this,"block");this.options=e||Yo}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?wr.lex:wr.lexInline}provideParser(){return this.block?Cr.parse:Cr.parseInline}}kt(fl,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class gx{constructor(...e){kt(this,"defaults",vh());kt(this,"options",this.setOptions);kt(this,"parse",this.parseMarkdown(!0));kt(this,"parseInline",this.parseMarkdown(!1));kt(this,"Parser",Cr);kt(this,"Renderer",ou);kt(this,"TextRenderer",xh);kt(this,"Lexer",wr);kt(this,"Tokenizer",iu);kt(this,"Hooks",fl);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 d=l;for(const h of d.header)r=r.concat(this.walkTokens(h.tokens,t));for(const h of d.rows)for(const m of h)r=r.concat(this.walkTokens(m.tokens,t));break}case"list":{const d=l;r=r.concat(this.walkTokens(d.items,t));break}default:{const d=l;(a=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&a[d.type]?this.defaults.extensions.childTokens[d.type].forEach(h=>{const m=d[h].flat(1/0);r=r.concat(this.walkTokens(m,t))}):d.tokens&&(r=r.concat(this.walkTokens(d.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(...d){let h=a.renderer.apply(this,d);return h===!1&&(h=l.apply(this,d)),h}: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 ou(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 d=l,h=r.renderer[d],m=a[d];a[d]=(...g)=>{let T=h.apply(a,g);return T===!1&&(T=m.apply(a,g)),T||""}}o.renderer=a}if(r.tokenizer){const a=this.defaults.tokenizer||new iu(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 d=l,h=r.tokenizer[d],m=a[d];a[d]=(...g)=>{let T=h.apply(a,g);return T===!1&&(T=m.apply(a,g)),T}}o.tokenizer=a}if(r.hooks){const a=this.defaults.hooks||new fl;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 d=l,h=r.hooks[d],m=a[d];fl.passThroughHooks.has(l)?a[d]=g=>{if(this.defaults.async)return Promise.resolve(h.call(a,g)).then(x=>m.call(a,x));const T=h.call(a,g);return m.call(a,T)}:a[d]=(...g)=>{let T=h.apply(a,g);return T===!1&&(T=m.apply(a,g)),T}}o.hooks=a}if(r.walkTokens){const a=this.defaults.walkTokens,l=r.walkTokens;o.walkTokens=function(d){let h=[];return h.push(l.call(this,d)),a&&(h=h.concat(a.call(this,d))),h}}this.defaults={...this.defaults,...o}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return wr.lex(e,t??this.defaults)}parser(e,t){return Cr.parse(e,t??this.defaults)}parseMarkdown(e){return(r,o)=>{const a={...o},l={...this.defaults,...a},d=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&a.async===!1)return d(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 d(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return d(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 h=l.hooks?l.hooks.provideLexer():e?wr.lex:wr.lexInline,m=l.hooks?l.hooks.provideParser():e?Cr.parse:Cr.parseInline;if(l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(r):r).then(g=>h(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=>m(g,l)).then(g=>l.hooks?l.hooks.postprocess(g):g).catch(d);try{l.hooks&&(r=l.hooks.preprocess(r));let g=h(r,l);l.hooks&&(g=l.hooks.processAllTokens(g)),l.walkTokens&&this.walkTokens(g,l.walkTokens);let T=m(g,l);return l.hooks&&(T=l.hooks.postprocess(T)),T}catch(g){return d(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>"+hi(r.message+"",!0)+"</pre>";return t?Promise.resolve(o):o}if(t)return Promise.reject(r);throw r}}}const Qo=new gx;function St(n,e){return Qo.parse(n,e)}St.options=St.setOptions=function(n){return Qo.setOptions(n),St.defaults=Qo.defaults,cy(St.defaults),St},St.getDefaults=vh,St.defaults=Yo,St.use=function(...n){return Qo.use(...n),St.defaults=Qo.defaults,cy(St.defaults),St},St.walkTokens=function(n,e){return Qo.walkTokens(n,e)},St.parseInline=Qo.parseInline,St.Parser=Cr,St.parser=Cr.parse,St.Renderer=ou,St.TextRenderer=xh,St.Lexer=wr,St.lexer=wr.lex,St.Tokenizer=iu,St.Hooks=fl,St.parse=St,St.options,St.setOptions,St.use,St.walkTokens,St.parseInline,Cr.parse,wr.lex;const _h=({message:n})=>R.jsxs("div",{className:"bg-error-secondary text-error-primary text-base p-3 rounded-inner flex items-center gap-2",children:[R.jsx(ig,{className:"w-4 h-4 flex-none"}),R.jsx("p",{className:"text-primary-80",children:n})]}),vx=({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(eo,{type:"ghost",Icon:hc,onClick:e.selectedChoiceId==null?()=>{n.sendChoice(o.choiceId,{},{responseIndex:t,messageIndex:r})}:void 0,label:o.choiceText})},a):null)}):null,Eh=({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]}),Sy=({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]}),yx=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()]},bx=({sources:n})=>{const[e,t]=Se.useState(!1),r=Se.useMemo(()=>yx(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(Ww,{type:"ghost",Icon:e?Xm:Jm}),"Sources"]}),R.jsx("ol",{className:"space-y-2",children:r.map(({source:o,indices:a},l)=>{const d=o.fileName??o.content??"Source",h="p-3 bg-primary-5 rounded-inner w-full flex items-center justify-between text-primary-80",m=a.map(g=>String(g+1)).join(", ");return R.jsx("li",{children:o.presignedUrl!=null?R.jsxs("a",{href:o.presignedUrl,className:st(h,"hover:bg-primary-10"),children:[R.jsx(Sy,{text:d,number:m}),R.jsx(sg,{className:"w-4 h-4 text-primary-60"})]}):R.jsx("div",{className:h,children:R.jsx(Sy,{text:d,number:m})})},l)})})]})},kx=({responses:n,colorMode:e,chatMode:t,uploadedFiles:r,userMessageBubble:o,agentMessageBubble:a,lastApplicationResponseIndex:l,isWaiting:d,customModalities:h,handler:m,className:g,enabled:T})=>{const x=Se.useRef(null),S=Se.useRef(null);return Se.useEffect(()=>{!t&&!d&&setTimeout(()=>{var O;(O=S.current)==null||O.scrollIntoView({behavior:"smooth"})})},[d,t]),Se.useEffect(()=>{var O;if(t){const M=(O=x.current)==null?void 0:O.lastChild;M instanceof HTMLElement&&M.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-[1px] top-0 bg-background opacity-[0.01] backdrop-blur-md")}),!t&&d?R.jsx(kg,{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&&d?"opacity-0":"opacity-100"),ref:x,children:[n.map((O,M)=>{var H;if(O.type===Fn.User)return O.payload.type==="text"?R.jsx(Eh,{text:O.payload.text,bubble:o},M):O.payload.type==="structured"&&O.payload.utterance!=null&&O.payload.uploadIds!=null?R.jsx(Eh,{bubble:o,text:O.payload.utterance,files:O.payload.uploadIds.map(ce=>r[ce]).filter(ce=>ce!=null)},M):null;if(O.type===Fn.Failure)return R.jsx(_h,{message:O.payload.text},M);const z=l!=null&&M===l;return R.jsxs(Se.Fragment,{children:[R.jsxs("div",{className:st("space-y-2",!t&&z?"min-h-full":""),ref:z?S:void 0,children:[O.payload.messages.map((ce,V)=>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:St(ce.text,{async:!1})}})},V)),((H=O.payload.metadata)==null?void 0:H.sources)!=null?R.jsx(bx,{sources:O.payload.metadata.sources}):null,Object.entries(O.payload.modalities??{}).map(([ce,V])=>{const j=h[ce];return j==null?(console.warn(`Custom component implementation missing for the ${ce} modality.`),null):R.jsx(j,{data:V,conversationHandler:m,enabled:T},ce)})]}),O.payload.messages.map((ce,V)=>{if(ce.selectedChoiceId!=null){const j=ce.choices.find(N=>N.choiceId===ce.selectedChoiceId);return j==null?null:R.jsx(Eh,{text:j.choiceText,bubble:o},V)}return null})]},M)}),t&&d?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(Zd,{})}),"Thinking..."]}):null]},"messages")]})};function Ph(){return Ph=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},Ph.apply(null,arguments)}function wx(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 Cx=Se.useLayoutEffect,Sx=function(e){var t=Ji.useRef(e);return Cx(function(){t.current=e}),t},Ty=function(e,t){if(typeof e=="function"){e(t);return}e.current=t},Tx=function(e,t){var r=Ji.useRef();return Ji.useCallback(function(o){e.current=o,r.current&&Ty(r.current,null),r.current=t,t&&Ty(t,o)},[t])},xy={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},xx=function(e){Object.keys(xy).forEach(function(t){e.style.setProperty(t,xy[t],"important")})},_y=xx,Vn=null,Ey=function(e,t){var r=e.scrollHeight;return t.sizingStyle.boxSizing==="border-box"?r+t.borderSize:r-t.paddingSize};function _x(n,e,t,r){t===void 0&&(t=1),r===void 0&&(r=1/0),Vn||(Vn=document.createElement("textarea"),Vn.setAttribute("tabindex","-1"),Vn.setAttribute("aria-hidden","true"),_y(Vn)),Vn.parentNode===null&&document.body.appendChild(Vn);var o=n.paddingSize,a=n.borderSize,l=n.sizingStyle,d=l.boxSizing;Object.keys(l).forEach(function(x){var S=x;Vn.style[S]=l[S]}),_y(Vn),Vn.value=e;var h=Ey(Vn,n);Vn.value=e,h=Ey(Vn,n),Vn.value="x";var m=Vn.scrollHeight-o,g=m*t;d==="border-box"&&(g=g+o+a),h=Math.max(g,h);var T=m*r;return d==="border-box"&&(T=T+o+a),h=Math.min(T,h),[h,m]}var Py=function(){},Ex=function(e,t){return e.reduce(function(r,o){return r[o]=t[o],r},{})},Px=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Rx=!!document.documentElement.currentStyle,Ix=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var r=Ex(Px,t),o=r.boxSizing;if(o==="")return null;Rx&&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}},Mx=Ix;function Ry(n,e,t){var r=Sx(t);Se.useLayoutEffect(function(){var o=function(l){return r.current(l)};if(n)return n.addEventListener(e,o),function(){return n.removeEventListener(e,o)}},[])}var Ax=function(e){Ry(window,"resize",e)},Ox=function(e){Ry(document.fonts,"loadingdone",e)},Lx=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Dx=function(e,t){var r=e.cacheMeasurements,o=e.maxRows,a=e.minRows,l=e.onChange,d=l===void 0?Py:l,h=e.onHeightChange,m=h===void 0?Py:h,g=wx(e,Lx),T=g.value!==void 0,x=Se.useRef(null),S=Tx(x,t),O=Se.useRef(0),M=Se.useRef(),z=function(){var V=x.current,j=r&&M.current?M.current:Mx(V);if(j){M.current=j;var N=_x(j,V.value||V.placeholder||"x",a,o),K=N[0],ie=N[1];O.current!==K&&(O.current=K,V.style.setProperty("height",K+"px","important"),m(K,{rowHeight:ie}))}},H=function(V){T||z(),d(V)};return Se.useLayoutEffect(z),Ax(z),Ox(z),Se.createElement("textarea",Ph({},g,{onChange:H,ref:S}))},Nx=Se.forwardRef(Dx);const Iy=8,jx=({className:n,handler:e,uploadUrl:t,onFileUpload:r,enabled:o})=>{const[a,l]=Se.useState(!1),[d,h]=Se.useState(""),[m,g]=Se.useState(null),[T,x]=Se.useState(null),S=Se.useRef(null),O=Se.useRef(null),M=vg("md");Se.useEffect(()=>{var X;M&&((X=O.current)==null||X.focus())},[M]);const z=Se.useMemo(()=>d.trim()==="",[d]),[H,ce]=Se.useState(!1),V=z&&T==null||H||!o,j=()=>{if(V)return;const X=(Q,te)=>{(te==null?void 0:te.type)===Fn.Application&&(ce(!1),e.unsubscribe(X),h(""),x(null),M&&setTimeout(()=>{var ne;(ne=O.current)==null||ne.focus()}))};e.subscribe(X),ce(!0),t!=null&&T!=null?e.sendStructured({uploadIds:[t.uploadId],utterance:d}):e.sendText(d)},N=t!=null&&o,K=()=>{g("Something went wrong. Please try again.")},ie=X=>{var Ae,Ge;if(t==null){K();return}const Q=(Ge=(Ae=X.target)==null?void 0:Ae.files)==null?void 0:Ge[0];if(Q==null){K();return}const{name:te,size:ne,type:fe}=Q;if(x({name:te,size:ne,type:fe}),ne/1024**2>Iy){g(`The file is too big. Max file size: ${Iy}mb`);return}fetch(t.url,{method:"PUT",headers:{"Content-Type":"image/jpeg"},body:Q}).then(()=>{g(null),r({uploadId:t.uploadId,file:Q})}).catch(()=>{K()})};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:[m!=null&&R.jsxs("div",{className:"flex items-center py-1 mb-2 w-full bg-error-secondary rounded-inner",children:[R.jsx(Yd,{size:16}),R.jsx("span",{className:"truncate ml-1",children:m})]}),T&&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:[m!=null?R.jsx(Yd,{size:16,className:"text-error-primary"}):R.jsx(Zm,{size:16,className:"text-primary-60"}),R.jsx("span",{className:"truncate ml-3",children:T.name})]}),R.jsx(fn,{className:"flex-none",Icon:tg,label:"Delete",onClick:N?()=>{x(null),g(null),S.current!=null&&(S.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:[N&&T==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(Kd,{})}),R.jsx("input",{type:"file",id:"file-upload",className:"sr-only",accept:".jpg, .jpeg, .png, .webp, .mp4, .mpeg4, .avi, .mov, .pdf",onChange:ie,ref:S})]}):R.jsx(fn,{className:"flex-none",Icon:Kd,label:"Upload file",type:"ghost"}),R.jsx(Nx,{disabled:H||!o,className:st("h-10 w-full resize-none mr-2 px-2 py-2 outline-none","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:d,onChange:X=>{h(X.target.value)},onKeyDown:X=>{X.key==="Enter"&&!X.shiftKey&&(X.preventDefault(),j())},ref:O}),R.jsx(fn,{className:"flex-none",label:"Send message",onClick:V?void 0:()=>{j()},type:"main",Icon:hc})]})]})})},Ux=n=>({"--font-family":n.fontFamily,"--inner-border-radius":n.innerBorderRadius,"--outer-border-radius":n.outerBorderRadius,"--primary-80":n.primary80,"--primary-60":n.primary60,"--primary-40":n.primary40,"--primary-20":n.primary20,"--primary-10":n.primary10,"--primary-5":n.primary5,"--primary-1":n.primary1,"--secondary-80":n.secondary80,"--secondary-60":n.secondary60,"--secondary-40":n.secondary40,"--secondary-20":n.secondary20,"--secondary-10":n.secondary10,"--secondary-5":n.secondary5,"--secondary-1":n.secondary1,"--accent":n.accent,"--accent-20":n.accent20,"--background":n.background,"--overlay":n.overlay,"--warning-primary":n.warningPrimary,"--warning-secondary":n.warningSecondary,"--error-primary":n.errorPrimary,"--error-secondary":n.errorSecondary}),Fx={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)"},Bx={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)"},Vx=(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}},su=({colorMode:n,children:e,theme:t,className:r})=>{const o=Vx(t??{},n==="dark"?Bx:Fx);return R.jsx("div",{className:st(r,"font-sans"),style:{...Ux(o),colorScheme:n},children:e})},My="bg-background backdrop-blur text-primary-80 rounded-outer p-2 w-[calc(100vw-16px)] max-w-[360px] space-y-4",Ay=({children:n,renderCollapse:e,onClose:t})=>R.jsxs("div",{className:My,children:[e&&R.jsx("div",{className:"flex items-center justify-end",children:R.jsx(fn,{onClick:t,Icon:qa,type:"ghost",label:"Close"})}),n]}),Oy=({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}),zx=({handler:n,context:e,onClose:t,customModalities:r,renderCollapse:o})=>{const[a,l]=Se.useState(!0),[d,h]=Se.useState(!0),m=()=>{t(new Event("close"))},{roomState:g,isUserSpeaking:T,isApplicationSpeaking:x,retry:S,modalities:O}=sy({micEnabled:a,speakersEnabled:d,handler:n,context:e});return g==="error"?R.jsxs(Ay,{renderCollapse:o,onClose:m,children:[R.jsx(_h,{message:"I couldn’t connect"}),R.jsx(eo,{type:"ghost",label:"Retry",Icon:Ga,onClick:()=>{S()}})]}):g==="noAudioPermissions"?R.jsxs(Ay,{renderCollapse:o,onClose:m,children:[R.jsx(_h,{message:"Connect your microphone and speaker"}),R.jsx(eo,{type:"ghost",label:"Retry",Icon:Ga,onClick:()=>{S()}})]}):g==="pending"?R.jsxs(Oy,{className:"relative",children:[R.jsx(fn,{Icon:pc,label:"Microphone",type:"ghost",className:"invisible"}),R.jsx(fn,{Icon:mc,label:"Speakers",type:"ghost",className:"invisible"}),R.jsx(fn,{Icon:qa,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(Zd,{})})]}):R.jsxs(Oy,{children:[R.jsxs("div",{className:"w-fit relative",children:[T?R.jsx(js,{className:"rounded-inner"}):null,R.jsx(fn,{Icon:a?pc:Qd,label:"Microphone",type:a?"activated":"ghost",onClick:()=>{l(M=>!M)}})]}),R.jsxs("div",{className:"w-fit relative",children:[x?R.jsx(js,{className:"rounded-inner"}):null,R.jsx(fn,{Icon:d?mc:Xd,label:"Speakers",type:d?"activated":"ghost",onClick:()=>{h(M=>!M)}})]}),R.jsx(fn,{label:"Close",Icon:qa,type:"error",onClick:()=>{m()}}),R.jsx(ay,{className:st(My,"absolute right-0 -top-2 transform -translate-y-full max-h-[360px] overflow-auto"),modalities:O,customModalities:r,handler:n})]})};var Hx=Object.prototype.toString;function Wx(n){return typeof n=="function"||Hx.call(n)==="[object Function]"}function $x(n){var e=Number(n);return isNaN(e)?0:e===0||!isFinite(e)?e:(e>0?1:-1)*Math.floor(Math.abs(e))}var qx=Math.pow(2,53)-1;function Gx(n){var e=$x(n);return Math.min(Math.max(e,0),qx)}function qr(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=Gx(r.length),a=Wx(t)?Object(new t(o)):new Array(o),l=0,d;l<o;)d=r[l],a[l]=d,l+=1;return a.length=o,a}function hl(n){"@babel/helpers - typeof";return hl=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},hl(n)}function Kx(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function Yx(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,Ly(r.key),r)}}function Qx(n,e,t){return e&&Yx(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function Xx(n,e,t){return e=Ly(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Ly(n){var e=Jx(n,"string");return hl(e)=="symbol"?e:e+""}function Jx(n,e){if(hl(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(hl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}var Zx=function(){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Kx(this,n),Xx(this,"items",void 0),this.items=e}return Qx(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 e_=typeof Set>"u"?Set:Zx;function En(n){var e;return(e=n.localName)!==null&&e!==void 0?e:n.tagName.toLowerCase()}var t_={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"},n_={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 r_(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=n_[e])!==null&&r!==void 0&&r.has(t))})}function Dy(n,e){return r_(n,e)}function i_(n){var e=s_(n);if(e===null||Rh.indexOf(e)!==-1){var t=o_(n);if(Rh.indexOf(e||"")===-1||Dy(n,t||""))return t}return e}function o_(n){var e=t_[En(n)];if(e!==void 0)return e;switch(En(n)){case"a":case"area":case"link":if(n.hasAttribute("href"))return"link";break;case"img":return n.getAttribute("alt")===""&&!Dy(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 s_(n){var e=n.getAttribute("role");if(e!==null){var t=e.trim().split(" ")[0];if(t.length>0)return t}return null}var Rh=["presentation","none"];function Ft(n){return n!==null&&n.nodeType===n.ELEMENT_NODE}function Ny(n){return Ft(n)&&En(n)==="caption"}function au(n){return Ft(n)&&En(n)==="input"}function a_(n){return Ft(n)&&En(n)==="optgroup"}function l_(n){return Ft(n)&&En(n)==="select"}function c_(n){return Ft(n)&&En(n)==="table"}function u_(n){return Ft(n)&&En(n)==="textarea"}function d_(n){var e=n.ownerDocument===null?n:n.ownerDocument,t=e.defaultView;if(t===null)throw new TypeError("no window available");return t}function f_(n){return Ft(n)&&En(n)==="fieldset"}function h_(n){return Ft(n)&&En(n)==="legend"}function p_(n){return Ft(n)&&En(n)==="slot"}function m_(n){return Ft(n)&&n.ownerSVGElement!==void 0}function g_(n){return Ft(n)&&En(n)==="svg"}function v_(n){return m_(n)&&En(n)==="title"}function lu(n,e){if(Ft(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 Ai(n,e){return Ft(n)?e.indexOf(i_(n))!==-1:!1}function y_(n){return n.trim().replace(/\s\s+/g," ")}function b_(n,e){if(!Ft(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 k_(n){return Ai(n,["button","combobox","listbox","textbox"])||jy(n,"range")}function jy(n,e){if(!Ft(n))return!1;switch(e){case"range":return Ai(n,["meter","progressbar","scrollbar","slider","spinbutton"]);default:throw new TypeError("No knowledge about abstract role '".concat(e,"'. This is likely a bug :("))}}function Uy(n,e){var t=qr(n.querySelectorAll(e));return lu(n,"aria-owns").forEach(function(r){t.push.apply(t,qr(r.querySelectorAll(e)))}),t}function w_(n){return l_(n)?n.selectedOptions||Uy(n,"[selected]"):Uy(n,'[aria-selected="true"]')}function C_(n){return Ai(n,Rh)}function S_(n){return Ny(n)}function T_(n){return Ai(n,["button","cell","checkbox","columnheader","gridcell","heading","label","legend","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"])}function x_(n){return!1}function __(n){return au(n)||u_(n)?n.value:n.textContent||""}function Fy(n){var e=n.getPropertyValue("content");return/^["'].*["']$/.test(e)?e.slice(1,-1):""}function By(n){var e=En(n);return e==="button"||e==="input"&&n.getAttribute("type")!=="hidden"||e==="meter"||e==="output"||e==="progress"||e==="select"||e==="textarea"}function Vy(n){if(By(n))return n;var e=null;return n.childNodes.forEach(function(t){if(e===null&&Ft(t)){var r=Vy(t);r!==null&&(e=r)}}),e}function E_(n){if(n.control!==void 0)return n.control;var e=n.getAttribute("for");return e!==null?n.ownerDocument.getElementById(e):Vy(n)}function P_(n){var e=n.labels;if(e===null)return e;if(e!==void 0)return qr(e);if(!By(n))return null;var t=n.ownerDocument;return qr(t.querySelectorAll("label")).filter(function(r){return E_(r)===n})}function R_(n){var e=n.assignedNodes();return e.length===0?qr(n.childNodes):e}function zy(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=new e_,r=typeof Map>"u"?void 0:new Map,o=d_(n),a=e.compute,l=a===void 0?"name":a,d=e.computedStyleSupportsPseudoElements,h=d===void 0?e.getComputedStyle!==void 0:d,m=e.getComputedStyle,g=m===void 0?o.getComputedStyle.bind(o):m,T=e.hidden,x=T===void 0?!1:T,S=function(j,N){if(N!==void 0)throw new Error("use uncachedGetComputedStyle directly for pseudo elements");if(r===void 0)return g(j);var K=r.get(j);if(K)return K;var ie=g(j,N);return r.set(j,ie),ie};function O(V,j){var N="";if(Ft(V)&&h){var K=g(V,"::before"),ie=Fy(K);N="".concat(ie," ").concat(N)}var X=p_(V)?R_(V):qr(V.childNodes).concat(lu(V,"aria-owns"));if(X.forEach(function(ne){var fe=ce(ne,{isEmbeddedInLabel:j.isEmbeddedInLabel,isReferenced:!1,recursion:!0}),Ae=Ft(ne)?S(ne).getPropertyValue("display"):"inline",Ge=Ae!=="inline"?" ":"";N+="".concat(Ge).concat(fe).concat(Ge)}),Ft(V)&&h){var Q=g(V,"::after"),te=Fy(Q);N="".concat(N," ").concat(te)}return N.trim()}function M(V,j){var N=V.getAttributeNode(j);return N!==null&&!t.has(N)&&N.value.trim()!==""?(t.add(N),N.value):null}function z(V){return Ft(V)?M(V,"title"):null}function H(V){if(!Ft(V))return null;if(f_(V)){t.add(V);for(var j=qr(V.childNodes),N=0;N<j.length;N+=1){var K=j[N];if(h_(K))return ce(K,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(c_(V)){t.add(V);for(var ie=qr(V.childNodes),X=0;X<ie.length;X+=1){var Q=ie[X];if(Ny(Q))return ce(Q,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(g_(V)){t.add(V);for(var te=qr(V.childNodes),ne=0;ne<te.length;ne+=1){var fe=te[ne];if(v_(fe))return fe.textContent}return null}else if(En(V)==="img"||En(V)==="area"){var Ae=M(V,"alt");if(Ae!==null)return Ae}else if(a_(V)){var Ge=M(V,"label");if(Ge!==null)return Ge}if(au(V)&&(V.type==="button"||V.type==="submit"||V.type==="reset")){var re=M(V,"value");if(re!==null)return re;if(V.type==="submit")return"Submit";if(V.type==="reset")return"Reset"}var Ie=P_(V);if(Ie!==null&&Ie.length!==0)return t.add(V),qr(Ie).map(function(de){return ce(de,{isEmbeddedInLabel:!0,isReferenced:!1,recursion:!0})}).filter(function(de){return de.length>0}).join(" ");if(au(V)&&V.type==="image"){var me=M(V,"alt");if(me!==null)return me;var ae=M(V,"title");return ae!==null?ae:"Submit Query"}if(Ai(V,["button"])){var xe=O(V,{isEmbeddedInLabel:!1});if(xe!=="")return xe}return null}function ce(V,j){if(t.has(V))return"";if(!x&&b_(V,S)&&!j.isReferenced)return t.add(V),"";var N=Ft(V)?V.getAttributeNode("aria-labelledby"):null,K=N!==null&&!t.has(N)?lu(V,"aria-labelledby"):[];if(l==="name"&&!j.isReferenced&&K.length>0)return t.add(N),K.map(function(Ae){return ce(Ae,{isEmbeddedInLabel:j.isEmbeddedInLabel,isReferenced:!0,recursion:!1})}).join(" ");var ie=j.recursion&&k_(V)&&l==="name";if(!ie){var X=(Ft(V)&&V.getAttribute("aria-label")||"").trim();if(X!==""&&l==="name")return t.add(V),X;if(!C_(V)){var Q=H(V);if(Q!==null)return t.add(V),Q}}if(Ai(V,["menu"]))return t.add(V),"";if(ie||j.isEmbeddedInLabel||j.isReferenced){if(Ai(V,["combobox","listbox"])){t.add(V);var te=w_(V);return te.length===0?au(V)?V.value:"":qr(te).map(function(Ae){return ce(Ae,{isEmbeddedInLabel:j.isEmbeddedInLabel,isReferenced:!1,recursion:!0})}).join(" ")}if(jy(V,"range"))return t.add(V),V.hasAttribute("aria-valuetext")?V.getAttribute("aria-valuetext"):V.hasAttribute("aria-valuenow")?V.getAttribute("aria-valuenow"):V.getAttribute("value")||"";if(Ai(V,["textbox"]))return t.add(V),__(V)}if(T_(V)||Ft(V)&&j.isReferenced||S_(V)||x_()){var ne=O(V,{isEmbeddedInLabel:j.isEmbeddedInLabel});if(ne!=="")return t.add(V),ne}if(V.nodeType===V.TEXT_NODE)return t.add(V),V.textContent||"";if(j.recursion)return t.add(V),O(V,{isEmbeddedInLabel:j.isEmbeddedInLabel});var fe=z(V);return fe!==null?(t.add(V),fe):(t.add(V),"")}return y_(ce(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 Hy(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 Wy(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Hy(Object(t),!0).forEach(function(r){I_(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Hy(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function I_(n,e,t){return e=M_(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function M_(n){var e=A_(n,"string");return pl(e)=="symbol"?e:e+""}function A_(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 $y(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=lu(n,"aria-describedby").map(function(a){return zy(a,Wy(Wy({},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 O_(n){return Ai(n,["caption","code","deletion","emphasis","generic","insertion","none","paragraph","presentation","strong","subscript","superscript"])}function Ih(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return O_(n)?"":zy(n,e)}const L_=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},D_=n=>{if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement){const e=Ih(n)??"";return{name:e===""?n.name:e,description:$y(n),type:n.type,placeholder:n.placeholder,...L_(n)}}else if(n instanceof HTMLSelectElement){const e=Ih(n)??"";return{name:e===""?n.name:e,description:$y(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")},qy=()=>{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,...D_(o)})),formElements:t}},cu=(n,...e)=>{console.debug(`[NLX V+] ${n}`,...e)},N_=(n,e=50,t=1/0)=>{let r=null,o=null,a=Promise.resolve();return(...l)=>{o??(o=Date.now());const d=()=>{a=a.then(async()=>{try{await n.apply(null,l)}catch{}}),o=null};r&&clearTimeout(r),Date.now()-o>t?d():r=setTimeout(()=>{d()},e)}},j_=(n,e,t,r)=>{let o={fields:[],destinations:[],actions:[]};const a=N_(async()=>{const{context:d,state:h}=t(U_(e));if(!Ud(o,d)){try{cu("Automatic context sent:",d),await n.sendContext({"nlx:vpContext":d})}catch{}r(h),o=d}},50,300);a();const l=new MutationObserver(a);return l.observe(document.body,{subtree:!0,childList:!0,attributes:!0}),{teardown:()=>{l.disconnect()},onCustomCommandsChange:d=>{e=d,a()}}},U_=n=>{const{context:e,formElements:t}=qy(),{context:r,links:o}=F_();return{context:{uri:window.location.pathname,fields:e,destinations:r,actions:n.map(l=>{const{handler:d,...h}=l;return h})},state:{formElements:t,links:o,customCommands:new Map(n.map(l=>[l.action,l.handler]))}}},F_=()=>{const n=Object.fromEntries(Rk(Array.from(document.querySelectorAll("a")).map(e=>[Ih(e),e.getAttribute("href")??""])));return{context:Object.keys(n),links:n}},B_=(n,e,t)=>{const r=o=>{switch(cu("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{cu('Custom page navigation action received, but no URL found for destination".',o.destination)}}break;case"page_unknown":cu("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":if(t.current.customCommands.has(o.action)){const a=t.current.customCommands.get(o.action);o.payload!=null&&a(o.payload)}(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 uu={exports:{}},V_=uu.exports,Gy;function z_(){return Gy||(Gy=1,function(n,e){(function(r,o){n.exports=o()})(V_,()=>(()=>{var t=[,(l,d,h)=>{h.r(d),h.d(d,{default:()=>g});var m=(()=>{var T=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(x={}){var S=x,O,M;S.ready=new Promise((u,f)=>{O=u,M=f});function z(){function u(U){const $=w;v=f=0,w=new Map,$.forEach(se=>{try{se(U)}catch(G){console.error(G)}}),this.ob(),_&&_.Qb()}let f=0,v=0,w=new Map,_=null,I=null;this.requestAnimationFrame=function(U){f||(f=requestAnimationFrame(u.bind(this)));const $=++v;return w.set($,U),$},this.cancelAnimationFrame=function(U){w.delete(U),f&&w.size==0&&(cancelAnimationFrame(f),f=0)},this.Ob=function(U){I&&(document.body.remove(I),I=null),U||(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",U=function($){I.innerHTML="RIVE FPS "+$.toFixed(1)},document.body.appendChild(I)),_=new function(){let $=0,se=0;this.Qb=function(){var G=performance.now();se?(++$,G-=se,1e3<G&&(U(1e3*$/G),$=se=0)):(se=G,$=0)}}},this.ob=function(){}}function H(){console.assert(!0);const u=new Map;let f=-1/0;this.push=function(v){return v=v+255>>8,u.has(v)&&clearTimeout(u.get(v)),u.set(v,setTimeout(function(){u.delete(v),u.length==0?f=-1/0:v==f&&(f=Math.max(...u.keys()),console.assert(f<v))},1e3)),f=Math.max(v,f),f<<8}}const ce=S.onRuntimeInitialized;S.onRuntimeInitialized=function(){ce&&ce();let u=S.decodeAudio;S.decodeAudio=function(_,I){_=u(_),I(_)};let f=S.decodeFont;S.decodeFont=function(_,I){_=f(_),I(_)};const v=S.FileAssetLoader;S.ptrToAsset=_=>{let I=S.ptrToFileAsset(_);return I.isImage?S.ptrToImageAsset(_):I.isFont?S.ptrToFontAsset(_):I.isAudio?S.ptrToAudioAsset(_):I},S.CustomFileAssetLoader=v.extend("CustomFileAssetLoader",{__construct:function({loadContents:_}){this.__parent.__construct.call(this),this.Eb=_},loadContents:function(_,I){return _=S.ptrToAsset(_),this.Eb(_,I)}}),S.CDNFileAssetLoader=v.extend("CDNFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(_){let I=S.ptrToAsset(_);return _=I.cdnUuid,_===""?!1:(function(U,$){var se=new XMLHttpRequest;se.responseType="arraybuffer",se.onreadystatechange=function(){se.readyState==4&&se.status==200&&$(se)},se.open("GET",U,!0),se.send(null)}(I.cdnBaseUrl+"/"+_,U=>{I.decode(new Uint8Array(U.response))}),!0)}}),S.FallbackFileAssetLoader=v.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this),this.kb=[]},addLoader:function(_){this.kb.push(_)},loadContents:function(_,I){for(let U of this.kb)if(U.loadContents(_,I))return!0;return!1}});let w=S.computeAlignment;S.computeAlignment=function(_,I,U,$,se=1){return w.call(this,_,I,U,$,se)}};const V=S.onRuntimeInitialized;S.onRuntimeInitialized=function(){function u(pe){this.F=pe,this.Db=pe.getContext("2d"),this.Gb=w,this.S=[],this.la=0,this.clear=function(){console.assert(this.la==0),this.S=[],_.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,He,Ye,nt,gt=1){this.S.push(w.align.bind(w,Pe,He,Ye,nt,gt))},this.flush=function(){console.assert(this.la==0),_.add(this),w.$a||v()},this.delete=function(){}}function f(pe,Pe=!1){var He={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=pe.getContext("webgl2",He),!Pe)return null;He=Yh(Pe,He),Ta(He);const Ye=I(pe.width,pe.height);Ye.Na=He,Ye.F=pe,Ye.Oa=pe.width,Ye.ab=pe.height,Ye.T=Pe;var nt=Ye.delete;return Ye.delete=function(){nt.call(this);var gt=this.Na;mr===Zt[gt]&&(mr=null),typeof JSEvents=="object"&&JSEvents.Oc(Zt[gt].C.canvas),Zt[gt]&&Zt[gt].C.canvas&&(Zt[gt].C.canvas.Cb=void 0),this.Na=this.F=this.Oa=this.T=Zt[gt]=null},Ye}function v(){if(w){var pe=w.Fb,Pe=0,He=0,Ye=0,nt=Array(_.size),gt=0;for(var Mt of _)Mt.ga=Math.min(Mt.F.width,pe),Mt.fa=Math.min(Mt.F.height,pe),Mt.La=Mt.fa*Mt.ga,Pe=Math.max(Pe,Mt.ga),He=Math.max(He,Mt.fa),Ye+=Mt.La,nt[gt++]=Mt;if(_.clear(),!(0>=Ye)){for(Pe=1<<(0>=Pe?0:32-Math.clz32(Pe-1)),He=1<<(0>=He?0:32-Math.clz32(He-1));He*Pe<Ye;)Pe<=He?Pe*=2:He*=2;for(Pe=Math.min(Pe,pe),Pe=Math.min(He,pe),nt.sort((ti,zi)=>zi.La-ti.La),Ye=new S.DynamicRectanizer(pe),Mt=0;Mt<nt.length;){for(Ye.reset(Pe,He),gt=Mt;gt<nt.length;++gt){var Lt=nt[gt],Rt=Ye.addRect(Lt.ga,Lt.fa);if(0>Rt){console.assert(gt>Mt);break}Lt.ra=Rt&65535,Lt.sa=Rt>>16}for(Lt=se.push(Ye.drawWidth()),Rt=G.push(Ye.drawHeight()),console.assert(Lt>=Ye.drawWidth()),console.assert(Rt>=Ye.drawHeight()),console.assert(Lt<=pe),console.assert(Rt<=pe),w.F.width!=Lt&&(w.F.width=Lt),w.F.height!=Rt&&(w.F.height=Rt),w.clear(),Lt=Mt;Lt<gt;++Lt){Rt=nt[Lt],w.saveClipRect(Rt.ra,Rt.sa,Rt.ra+Rt.ga,Rt.sa+Rt.fa);let ti=new S.Mat2D;ti.xx=Rt.ga/Rt.F.width,ti.yy=Rt.fa/Rt.F.height,ti.xy=ti.yx=0,ti.tx=Rt.ra,ti.ty=Rt.sa,w.transform(ti);for(const zi of Rt.S)zi();w.restoreClipRect(),Rt.S=[]}for(w.flush();Mt<gt;++Mt)Lt=nt[Mt],Rt=Lt.Db,Rt.globalCompositeOperation="copy",Rt.drawImage(w.F,Lt.ra,Lt.sa,Lt.ga,Lt.fa,0,0,Lt.F.width,Lt.F.height);Mt=gt}}}}V&&V();let w=null;const _=new Set,I=S.makeRenderer;S.makeRenderer=function(pe,Pe){if(!w){let He=function(Ye){var nt=document.createElement("canvas");return nt.width=1,nt.height=1,w=f(nt,Ye),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,(Ye=w.T.getExtension("WEBGL_debug_renderer_info"))&&(nt=w.T.getParameter(Ye.UNMASKED_RENDERER_WEBGL),w.T.getParameter(Ye.UNMASKED_VENDOR_WEBGL).includes("Google")&&nt.includes("ANGLE Metal Renderer")&&(w.Ma=!1)),w};w=He(!0),w.Ma||(w=He(!1))}return Pe?new u(pe):f(pe,w.Ma)};const U=S.Artboard.prototype.delete;S.Artboard.prototype.delete=function(){this.Hb=!0,U.call(this)};const $=S.Artboard.prototype.draw;S.Artboard.prototype.draw=function(pe){pe.S?pe.S.push(()=>{this.Hb||$.call(this,pe.Gb)}):$.call(this,pe)};const se=new H,G=new H,we=new z;S.requestAnimationFrame=we.requestAnimationFrame.bind(we),S.cancelAnimationFrame=we.cancelAnimationFrame.bind(we),S.enableFPSCounter=we.Ob.bind(we),we.ob=v,S.resolveAnimationFrame=v;let Re=S.load;S.load=function(pe,Pe,He=!0){const Ye=new S.FallbackFileAssetLoader;return Pe!==void 0&&Ye.addLoader(Pe),He&&(Pe=new S.CDNFileAssetLoader,Ye.addLoader(Pe)),Promise.resolve(Re(pe,Ye))};const Ne=S.WebGL2Renderer.prototype.clear;S.WebGL2Renderer.prototype.clear=function(){Ta(this.Na);const pe=this.F;(this.Oa!=pe.width||this.ab!=pe.height)&&(this.resize(pe.width,pe.height),this.Oa=pe.width,this.ab=pe.height),Ne.call(this)},S.decodeImage=function(pe,Pe){pe=S.decodeWebGL2Image(pe),Pe(pe)};let J=S.Renderer.prototype.align;S.Renderer.prototype.align=function(pe,Pe,He,Ye,nt=1){J.call(this,pe,Pe,He,Ye,nt)}};var j=Object.assign({},S),N="./this.program",K=typeof window=="object",ie=typeof importScripts=="function",X="",Q,te;(K||ie)&&(ie?X=self.location.href:typeof document<"u"&&document.currentScript&&(X=document.currentScript.src),T&&(X=T),X.indexOf("blob:")!==0?X=X.substr(0,X.replace(/[?#].*/,"").lastIndexOf("/")+1):X="",ie&&(te=u=>{var f=new XMLHttpRequest;return f.open("GET",u,!1),f.responseType="arraybuffer",f.send(null),new Uint8Array(f.response)}),Q=(u,f,v)=>{var w=new XMLHttpRequest;w.open("GET",u,!0),w.responseType="arraybuffer",w.onload=()=>{w.status==200||w.status==0&&w.response?f(w.response):v()},w.onerror=v,w.send(null)});var ne=S.print||console.log.bind(console),fe=S.printErr||console.error.bind(console);Object.assign(S,j),j=null,S.thisProgram&&(N=S.thisProgram);var Ae;S.wasmBinary&&(Ae=S.wasmBinary),S.noExitRuntime,typeof WebAssembly!="object"&&kn("no native wasm support detected");var Ge,re,Ie=!1,me,ae,xe,de,L,Z,We,Ke;function et(){var u=Ge.buffer;S.HEAP8=me=new Int8Array(u),S.HEAP16=xe=new Int16Array(u),S.HEAP32=L=new Int32Array(u),S.HEAPU8=ae=new Uint8Array(u),S.HEAPU16=de=new Uint16Array(u),S.HEAPU32=Z=new Uint32Array(u),S.HEAPF32=We=new Float32Array(u),S.HEAPF64=Ke=new Float64Array(u)}var Be,tt=[],$e=[],ut=[];function Ot(){var u=S.preRun.shift();tt.unshift(u)}var Kt=0,Zn=null;function kn(u){throw S.onAbort&&S.onAbort(u),u="Aborted("+u+")",fe(u),Ie=!0,u=new WebAssembly.RuntimeError(u+". Build with -sASSERTIONS for more info."),M(u),u}function Sr(u){return u.startsWith("data:application/octet-stream;base64,")}var Tr;if(Tr="webgl2_advanced.wasm",!Sr(Tr)){var po=Tr;Tr=S.locateFile?S.locateFile(po,X):X+po}function Li(u){if(u==Tr&&Ae)return new Uint8Array(Ae);if(te)return te(u);throw"both async and sync fetching of the wasm failed"}function ia(u){if(!Ae&&(K||ie)){if(typeof fetch=="function"&&!u.startsWith("file://"))return fetch(u,{credentials:"same-origin"}).then(f=>{if(!f.ok)throw"failed to load wasm binary file at '"+u+"'";return f.arrayBuffer()}).catch(()=>Li(u));if(Q)return new Promise((f,v)=>{Q(u,w=>f(new Uint8Array(w)),v)})}return Promise.resolve().then(()=>Li(u))}function wn(u,f,v){return ia(u).then(w=>WebAssembly.instantiate(w,f)).then(w=>w).then(v,w=>{fe("failed to asynchronously prepare wasm: "+w),kn(w)})}function Di(u,f){var v=Tr;return Ae||typeof WebAssembly.instantiateStreaming!="function"||Sr(v)||v.startsWith("file://")||typeof fetch!="function"?wn(v,u,f):fetch(v,{credentials:"same-origin"}).then(w=>WebAssembly.instantiateStreaming(w,u).then(f,function(_){return fe("wasm streaming compile failed: "+_),fe("falling back to ArrayBuffer instantiation"),wn(v,u,f)}))}var zn,Ni,oa={534231:(u,f,v,w,_)=>{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=u,window.h.I.capture=f,window.h.I.Ra=v,window.h.ja={},window.h.ja.stopped=w,window.h.ja.xb=_;let I=window.h;I.D=[],I.rc=function(U){for(var $=0;$<I.D.length;++$)if(I.D[$]==null)return I.D[$]=U,$;return I.D.push(U),I.D.length-1},I.Bb=function(U){for(I.D[U]=null;0<I.D.length&&I.D[I.D.length-1]==null;)I.D.pop()},I.Qc=function(U){for(var $=0;$<I.D.length;++$)if(I.D[$]==U)return I.Bb($)},I.va=function(U){return I.D[U]},I.Za=["touchend","click"],I.unlock=function(){for(var U=0;U<I.D.length;++U){var $=I.D[U];$!=null&&$.J!=null&&$.state===I.ja.xb&&$.J.resume().then(()=>{nr($.pb)},se=>{console.error("Failed to resume audiocontext",se)})}I.Za.map(function(se){document.removeEventListener(se,I.unlock,!0)})},I.Za.map(function(U){document.addEventListener(U,I.unlock,!0)})}return window.h.Ga+=1,1},536409:()=>{typeof window.h<"u"&&(window.h.Za.map(function(u){document.removeEventListener(u,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 u=new(window.AudioContext||window.webkitAudioContext),f=u.sampleRate;return u.close(),f}catch{return 0}},536988:(u,f,v,w,_,I)=>{if(typeof window.h>"u")return-1;var U={},$={};return u==window.h.I.Ea&&v!=0&&($.sampleRate=v),U.J=new(window.AudioContext||window.webkitAudioContext)($),U.J.suspend(),U.state=window.h.ja.stopped,v=0,u!=window.h.I.Ea&&(v=f),U.Z=U.J.createScriptProcessor(w,v,f),U.Z.onaudioprocess=function(se){if((U.wa==null||U.wa.length==0)&&(U.wa=new Float32Array(We.buffer,_,w*f)),u==window.h.I.capture||u==window.h.I.Ra){for(var G=0;G<f;G+=1)for(var we=se.inputBuffer.getChannelData(G),Re=U.wa,Ne=0;Ne<w;Ne+=1)Re[Ne*f+G]=we[Ne];So(I,w,_)}if(u==window.h.I.Ea||u==window.h.I.Ra)for(zl(I,w,_),G=0;G<se.outputBuffer.numberOfChannels;++G)for(we=se.outputBuffer.getChannelData(G),Re=U.wa,Ne=0;Ne<w;Ne+=1)we[Ne]=Re[Ne*f+G];else for(G=0;G<se.outputBuffer.numberOfChannels;++G)se.outputBuffer.getChannelData(G).fill(0)},u!=window.h.I.capture&&u!=window.h.I.Ra||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(se){U.Ha=U.J.createMediaStreamSource(se),U.Ha.connect(U.Z),U.Z.connect(U.J.destination)}).catch(function(se){console.log("Failed to get user media: "+se)}),u==window.h.I.Ea&&U.Z.connect(U.J.destination),U.pb=I,window.h.rc(U)},539865:u=>window.h.va(u).J.sampleRate,539938:u=>{u=window.h.va(u),u.Z!==void 0&&(u.Z.onaudioprocess=function(){},u.Z.disconnect(),u.Z=void 0),u.Ha!==void 0&&(u.Ha.disconnect(),u.Ha=void 0),u.J.close(),u.J=void 0,u.pb=void 0},540338:u=>{window.h.Bb(u)},540388:u=>{u=window.h.va(u),u.J.resume(),u.state=window.h.ja.xb},540527:u=>{u=window.h.va(u),u.J.suspend(),u.state=window.h.ja.stopped}},P=u=>{for(;0<u.length;)u.shift()(S)},y=(u,f)=>{for(var v=0,w=u.length-1;0<=w;w--){var _=u[w];_==="."?u.splice(w,1):_===".."?(u.splice(w,1),v++):v&&(u.splice(w,1),v--)}if(f)for(;v;v--)u.unshift("..");return u},C=u=>{var f=u.charAt(0)==="/",v=u.substr(-1)==="/";return(u=y(u.split("/").filter(w=>!!w),!f).join("/"))||f||(u="."),u&&v&&(u+="/"),(f?"/":"")+u},A=u=>{var f=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(u).slice(1);return u=f[0],f=f[1],!u&&!f?".":(f&&(f=f.substr(0,f.length-1)),u+f)},q=u=>{if(u==="/")return"/";u=C(u),u=u.replace(/\/$/,"");var f=u.lastIndexOf("/");return f===-1?u:u.substr(f+1)},ue=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return u=>crypto.getRandomValues(u);kn("initRandomDevice")},ye=u=>(ye=ue())(u);function qe(){for(var u="",f=!1,v=arguments.length-1;-1<=v&&!f;v--){if(f=0<=v?arguments[v]:"/",typeof f!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!f)return"";u=f+"/"+u,f=f.charAt(0)==="/"}return u=y(u.split("/").filter(w=>!!w),!f).join("/"),(f?"/":"")+u||"."}var it=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Le=(u,f,v)=>{var w=f+v;for(v=f;u[v]&&!(v>=w);)++v;if(16<v-f&&u.buffer&&it)return it.decode(u.subarray(f,v));for(w="";f<v;){var _=u[f++];if(_&128){var I=u[f++]&63;if((_&224)==192)w+=String.fromCharCode((_&31)<<6|I);else{var U=u[f++]&63;_=(_&240)==224?(_&15)<<12|I<<6|U:(_&7)<<18|I<<12|U<<6|u[f++]&63,65536>_?w+=String.fromCharCode(_):(_-=65536,w+=String.fromCharCode(55296|_>>10,56320|_&1023))}}else w+=String.fromCharCode(_)}return w},at=[],_t=u=>{for(var f=0,v=0;v<u.length;++v){var w=u.charCodeAt(v);127>=w?f++:2047>=w?f+=2:55296<=w&&57343>=w?(f+=4,++v):f+=3}return f},Yt=(u,f,v,w)=>{if(!(0<w))return 0;var _=v;w=v+w-1;for(var I=0;I<u.length;++I){var U=u.charCodeAt(I);if(55296<=U&&57343>=U){var $=u.charCodeAt(++I);U=65536+((U&1023)<<10)|$&1023}if(127>=U){if(v>=w)break;f[v++]=U}else{if(2047>=U){if(v+1>=w)break;f[v++]=192|U>>6}else{if(65535>=U){if(v+2>=w)break;f[v++]=224|U>>12}else{if(v+3>=w)break;f[v++]=240|U>>18,f[v++]=128|U>>12&63}f[v++]=128|U>>6&63}f[v++]=128|U&63}}return f[v]=0,v-_};function Et(u,f){var v=Array(_t(u)+1);return u=Yt(u,v,0,v.length),f&&(v.length=u),v}var Hn=[];function Pn(u,f){Hn[u]={input:[],G:[],V:f},la(u,Cn)}var Cn={open:function(u){var f=Hn[u.node.Fa];if(!f)throw new De(43);u.s=f,u.seekable=!1},close:function(u){u.s.V.ua(u.s)},ua:function(u){u.s.V.ua(u.s)},read:function(u,f,v,w){if(!u.s||!u.s.V.jb)throw new De(60);for(var _=0,I=0;I<w;I++){try{var U=u.s.V.jb(u.s)}catch{throw new De(29)}if(U===void 0&&_===0)throw new De(6);if(U==null)break;_++,f[v+I]=U}return _&&(u.node.timestamp=Date.now()),_},write:function(u,f,v,w){if(!u.s||!u.s.V.Ua)throw new De(60);try{for(var _=0;_<w;_++)u.s.V.Ua(u.s,f[v+_])}catch{throw new De(29)}return w&&(u.node.timestamp=Date.now()),_}},rn={jb:function(){e:{if(!at.length){var u=null;if(typeof window<"u"&&typeof window.prompt=="function"?(u=window.prompt("Input: "),u!==null&&(u+=`
156
+ Please report this to https://github.com/markedjs/marked.`,e){const o="<p>An error occurred:</p><pre>"+hi(r.message+"",!0)+"</pre>";return t?Promise.resolve(o):o}if(t)return Promise.reject(r);throw r}}}const Qo=new gx;function St(n,e){return Qo.parse(n,e)}St.options=St.setOptions=function(n){return Qo.setOptions(n),St.defaults=Qo.defaults,cy(St.defaults),St},St.getDefaults=vh,St.defaults=Yo,St.use=function(...n){return Qo.use(...n),St.defaults=Qo.defaults,cy(St.defaults),St},St.walkTokens=function(n,e){return Qo.walkTokens(n,e)},St.parseInline=Qo.parseInline,St.Parser=Cr,St.parser=Cr.parse,St.Renderer=ou,St.TextRenderer=xh,St.Lexer=wr,St.lexer=wr.lex,St.Tokenizer=iu,St.Hooks=fl,St.parse=St,St.options,St.setOptions,St.use,St.walkTokens,St.parseInline,Cr.parse,wr.lex;const _h=({message:n})=>R.jsxs("div",{className:"bg-error-secondary text-error-primary text-base p-3 rounded-inner flex items-center gap-2",children:[R.jsx(ig,{className:"w-4 h-4 flex-none"}),R.jsx("p",{className:"text-primary-80",children:n})]}),vx=({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(eo,{type:"ghost",Icon:hc,onClick:e.selectedChoiceId==null?()=>{n.sendChoice(o.choiceId,{},{responseIndex:t,messageIndex:r})}:void 0,label:o.choiceText})},a):null)}):null,Eh=({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]}),Sy=({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]}),yx=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()]},bx=({sources:n})=>{const[e,t]=Se.useState(!1),r=Se.useMemo(()=>yx(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(Ww,{type:"ghost",Icon:e?Xm:Jm}),"Sources"]}),R.jsx("ol",{className:"space-y-2",children:r.map(({source:o,indices:a},l)=>{const d=o.fileName??o.content??"Source",h="p-3 bg-primary-5 rounded-inner w-full flex items-center justify-between text-primary-80",m=a.map(g=>String(g+1)).join(", ");return R.jsx("li",{children:o.presignedUrl!=null?R.jsxs("a",{href:o.presignedUrl,className:st(h,"hover:bg-primary-10"),children:[R.jsx(Sy,{text:d,number:m}),R.jsx(sg,{className:"w-4 h-4 text-primary-60"})]}):R.jsx("div",{className:h,children:R.jsx(Sy,{text:d,number:m})})},l)})})]})},kx=({responses:n,colorMode:e,chatMode:t,uploadedFiles:r,userMessageBubble:o,agentMessageBubble:a,lastApplicationResponseIndex:l,isWaiting:d,customModalities:h,handler:m,className:g,enabled:T})=>{const x=Se.useRef(null),S=Se.useRef(null);return Se.useEffect(()=>{!t&&!d&&setTimeout(()=>{var O;(O=S.current)==null||O.scrollIntoView({behavior:"smooth"})})},[d,t]),Se.useEffect(()=>{var O;if(t){const M=(O=x.current)==null?void 0:O.lastChild;M instanceof HTMLElement&&M.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-[1px] top-0 bg-background opacity-[0.01] backdrop-blur-md")}),!t&&d?R.jsx(kg,{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&&d?"opacity-0":"opacity-100"),ref:x,children:[n.map((O,M)=>{var H;if(O.type===Fn.User)return O.payload.type==="text"?R.jsx(Eh,{text:O.payload.text,bubble:o},M):O.payload.type==="structured"&&O.payload.utterance!=null&&O.payload.uploadIds!=null?R.jsx(Eh,{bubble:o,text:O.payload.utterance,files:O.payload.uploadIds.map(ce=>r[ce]).filter(ce=>ce!=null)},M):null;if(O.type===Fn.Failure)return R.jsx(_h,{message:O.payload.text},M);const z=l!=null&&M===l;return R.jsxs(Se.Fragment,{children:[R.jsxs("div",{className:st("space-y-2",!t&&z?"min-h-full":""),ref:z?S:void 0,children:[O.payload.messages.map((ce,V)=>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:St(ce.text,{async:!1})}})},V)),((H=O.payload.metadata)==null?void 0:H.sources)!=null?R.jsx(bx,{sources:O.payload.metadata.sources}):null,Object.entries(O.payload.modalities??{}).map(([ce,V])=>{const j=h[ce];return j==null?(console.warn(`Custom component implementation missing for the ${ce} modality.`),null):R.jsx(j,{data:V,conversationHandler:m,enabled:T},ce)})]}),O.payload.messages.map((ce,V)=>{if(ce.selectedChoiceId!=null){const j=ce.choices.find(N=>N.choiceId===ce.selectedChoiceId);return j==null?null:R.jsx(Eh,{text:j.choiceText,bubble:o},V)}return null})]},M)}),t&&d?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(Zd,{})}),"Thinking..."]}):null]},"messages")]})};function Ph(){return Ph=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},Ph.apply(null,arguments)}function wx(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 Cx=Se.useLayoutEffect,Sx=function(e){var t=Ji.useRef(e);return Cx(function(){t.current=e}),t},Ty=function(e,t){if(typeof e=="function"){e(t);return}e.current=t},Tx=function(e,t){var r=Ji.useRef();return Ji.useCallback(function(o){e.current=o,r.current&&Ty(r.current,null),r.current=t,t&&Ty(t,o)},[t])},xy={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},xx=function(e){Object.keys(xy).forEach(function(t){e.style.setProperty(t,xy[t],"important")})},_y=xx,Vn=null,Ey=function(e,t){var r=e.scrollHeight;return t.sizingStyle.boxSizing==="border-box"?r+t.borderSize:r-t.paddingSize};function _x(n,e,t,r){t===void 0&&(t=1),r===void 0&&(r=1/0),Vn||(Vn=document.createElement("textarea"),Vn.setAttribute("tabindex","-1"),Vn.setAttribute("aria-hidden","true"),_y(Vn)),Vn.parentNode===null&&document.body.appendChild(Vn);var o=n.paddingSize,a=n.borderSize,l=n.sizingStyle,d=l.boxSizing;Object.keys(l).forEach(function(x){var S=x;Vn.style[S]=l[S]}),_y(Vn),Vn.value=e;var h=Ey(Vn,n);Vn.value=e,h=Ey(Vn,n),Vn.value="x";var m=Vn.scrollHeight-o,g=m*t;d==="border-box"&&(g=g+o+a),h=Math.max(g,h);var T=m*r;return d==="border-box"&&(T=T+o+a),h=Math.min(T,h),[h,m]}var Py=function(){},Ex=function(e,t){return e.reduce(function(r,o){return r[o]=t[o],r},{})},Px=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Rx=!!document.documentElement.currentStyle,Ix=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var r=Ex(Px,t),o=r.boxSizing;if(o==="")return null;Rx&&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}},Mx=Ix;function Ry(n,e,t){var r=Sx(t);Se.useLayoutEffect(function(){var o=function(l){return r.current(l)};if(n)return n.addEventListener(e,o),function(){return n.removeEventListener(e,o)}},[])}var Ax=function(e){Ry(window,"resize",e)},Ox=function(e){Ry(document.fonts,"loadingdone",e)},Lx=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Dx=function(e,t){var r=e.cacheMeasurements,o=e.maxRows,a=e.minRows,l=e.onChange,d=l===void 0?Py:l,h=e.onHeightChange,m=h===void 0?Py:h,g=wx(e,Lx),T=g.value!==void 0,x=Se.useRef(null),S=Tx(x,t),O=Se.useRef(0),M=Se.useRef(),z=function(){var V=x.current,j=r&&M.current?M.current:Mx(V);if(j){M.current=j;var N=_x(j,V.value||V.placeholder||"x",a,o),K=N[0],ie=N[1];O.current!==K&&(O.current=K,V.style.setProperty("height",K+"px","important"),m(K,{rowHeight:ie}))}},H=function(V){T||z(),d(V)};return Se.useLayoutEffect(z),Ax(z),Ox(z),Se.createElement("textarea",Ph({},g,{onChange:H,ref:S}))},Nx=Se.forwardRef(Dx);const Iy=8,jx=({className:n,handler:e,uploadUrl:t,onFileUpload:r,enabled:o})=>{const[a,l]=Se.useState(!1),[d,h]=Se.useState(""),[m,g]=Se.useState(null),[T,x]=Se.useState(null),S=Se.useRef(null),O=Se.useRef(null),M=vg("md");Se.useEffect(()=>{var X;M&&((X=O.current)==null||X.focus())},[M]);const z=Se.useMemo(()=>d.trim()==="",[d]),[H,ce]=Se.useState(!1),V=z&&T==null||H||!o,j=()=>{if(V)return;const X=(Q,te)=>{(te==null?void 0:te.type)===Fn.Application&&(ce(!1),e.unsubscribe(X),h(""),x(null),M&&setTimeout(()=>{var ne;(ne=O.current)==null||ne.focus()}))};e.subscribe(X),ce(!0),t!=null&&T!=null?e.sendStructured({uploadIds:[t.uploadId],utterance:d}):e.sendText(d)},N=t!=null&&o,K=()=>{g("Something went wrong. Please try again.")},ie=X=>{var Ae,Ge;if(t==null){K();return}const Q=(Ge=(Ae=X.target)==null?void 0:Ae.files)==null?void 0:Ge[0];if(Q==null){K();return}const{name:te,size:ne,type:fe}=Q;if(x({name:te,size:ne,type:fe}),ne/1024**2>Iy){g(`The file is too big. Max file size: ${Iy}mb`);return}fetch(t.url,{method:"PUT",headers:{"Content-Type":"image/jpeg"},body:Q}).then(()=>{g(null),r({uploadId:t.uploadId,file:Q})}).catch(()=>{K()})};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:[m!=null&&R.jsxs("div",{className:"flex items-center py-1 mb-2 w-full bg-error-secondary rounded-inner",children:[R.jsx(Yd,{size:16}),R.jsx("span",{className:"truncate ml-1",children:m})]}),T&&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:[m!=null?R.jsx(Yd,{size:16,className:"text-error-primary"}):R.jsx(Zm,{size:16,className:"text-primary-60"}),R.jsx("span",{className:"truncate ml-3",children:T.name})]}),R.jsx(fn,{className:"flex-none",Icon:tg,label:"Delete",onClick:N?()=>{x(null),g(null),S.current!=null&&(S.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:[N&&T==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(Kd,{})}),R.jsx("input",{type:"file",id:"file-upload",className:"sr-only",accept:".jpg, .jpeg, .png, .webp, .mp4, .mpeg4, .avi, .mov, .pdf",onChange:ie,ref:S})]}):R.jsx(fn,{className:"flex-none",Icon:Kd,label:"Upload file",type:"ghost"}),R.jsx(Nx,{disabled:H||!o,className:st("h-10 w-full resize-none mr-2 px-2 py-2 outline-none","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:d,onChange:X=>{h(X.target.value)},onKeyDown:X=>{X.key==="Enter"&&!X.shiftKey&&(X.preventDefault(),j())},ref:O}),R.jsx(fn,{className:"flex-none",label:"Send message",onClick:V?void 0:()=>{j()},type:"main",Icon:hc})]})]})})},Ux=n=>({"--font-family":n.fontFamily,"--inner-border-radius":n.innerBorderRadius,"--outer-border-radius":n.outerBorderRadius,"--primary-80":n.primary80,"--primary-60":n.primary60,"--primary-40":n.primary40,"--primary-20":n.primary20,"--primary-10":n.primary10,"--primary-5":n.primary5,"--primary-1":n.primary1,"--secondary-80":n.secondary80,"--secondary-60":n.secondary60,"--secondary-40":n.secondary40,"--secondary-20":n.secondary20,"--secondary-10":n.secondary10,"--secondary-5":n.secondary5,"--secondary-1":n.secondary1,"--accent":n.accent,"--accent-20":n.accent20,"--background":n.background,"--overlay":n.overlay,"--warning-primary":n.warningPrimary,"--warning-secondary":n.warningSecondary,"--error-primary":n.errorPrimary,"--error-secondary":n.errorSecondary}),Fx={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)"},Bx={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)"},Vx=(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}},su=({colorMode:n,children:e,theme:t,className:r})=>{const o=Vx(t??{},n==="dark"?Bx:Fx);return R.jsx("div",{className:st(r,"font-sans"),style:{...Ux(o),colorScheme:n},children:e})},My="bg-background backdrop-blur text-primary-80 rounded-outer p-2 w-[calc(100vw-16px)] max-w-[360px] space-y-4",Ay=({children:n,renderCollapse:e,onClose:t})=>R.jsxs("div",{className:My,children:[e&&R.jsx("div",{className:"flex items-center justify-end",children:R.jsx(fn,{onClick:t,Icon:qa,type:"ghost",label:"Close"})}),n]}),Oy=({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}),zx=({handler:n,context:e,onClose:t,customModalities:r,renderCollapse:o})=>{const[a,l]=Se.useState(!0),[d,h]=Se.useState(!0),m=()=>{t(new Event("close"))},{roomState:g,isUserSpeaking:T,isApplicationSpeaking:x,retry:S,modalities:O}=sy({micEnabled:a,speakersEnabled:d,handler:n,context:e});return g==="error"?R.jsxs(Ay,{renderCollapse:o,onClose:m,children:[R.jsx(_h,{message:"I couldn’t connect"}),R.jsx(eo,{type:"ghost",label:"Retry",Icon:Ga,onClick:()=>{S()}})]}):g==="noAudioPermissions"?R.jsxs(Ay,{renderCollapse:o,onClose:m,children:[R.jsx(_h,{message:"Connect your microphone and speaker"}),R.jsx(eo,{type:"ghost",label:"Retry",Icon:Ga,onClick:()=>{S()}})]}):g==="pending"?R.jsxs(Oy,{className:"relative",children:[R.jsx(fn,{Icon:pc,label:"Microphone",type:"ghost",className:"invisible"}),R.jsx(fn,{Icon:mc,label:"Speakers",type:"ghost",className:"invisible"}),R.jsx(fn,{Icon:qa,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(Zd,{})})]}):R.jsxs(Oy,{children:[R.jsxs("div",{className:"w-fit relative",children:[T?R.jsx(js,{className:"rounded-inner"}):null,R.jsx(fn,{Icon:a?pc:Qd,label:"Microphone",type:a?"activated":"ghost",onClick:()=>{l(M=>!M)}})]}),R.jsxs("div",{className:"w-fit relative",children:[x?R.jsx(js,{className:"rounded-inner"}):null,R.jsx(fn,{Icon:d?mc:Xd,label:"Speakers",type:d?"activated":"ghost",onClick:()=>{h(M=>!M)}})]}),R.jsx(fn,{label:"Close",Icon:qa,type:"error",onClick:()=>{m()}}),R.jsx(ay,{className:st(My,"absolute right-0 -top-2 transform -translate-y-full max-h-[360px] overflow-auto"),modalities:O,customModalities:r,handler:n})]})};var Hx=Object.prototype.toString;function Wx(n){return typeof n=="function"||Hx.call(n)==="[object Function]"}function $x(n){var e=Number(n);return isNaN(e)?0:e===0||!isFinite(e)?e:(e>0?1:-1)*Math.floor(Math.abs(e))}var qx=Math.pow(2,53)-1;function Gx(n){var e=$x(n);return Math.min(Math.max(e,0),qx)}function qr(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=Gx(r.length),a=Wx(t)?Object(new t(o)):new Array(o),l=0,d;l<o;)d=r[l],a[l]=d,l+=1;return a.length=o,a}function hl(n){"@babel/helpers - typeof";return hl=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},hl(n)}function Kx(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function Yx(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,Ly(r.key),r)}}function Qx(n,e,t){return e&&Yx(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function Xx(n,e,t){return e=Ly(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Ly(n){var e=Jx(n,"string");return hl(e)=="symbol"?e:e+""}function Jx(n,e){if(hl(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(hl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}var Zx=function(){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Kx(this,n),Xx(this,"items",void 0),this.items=e}return Qx(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 e_=typeof Set>"u"?Set:Zx;function En(n){var e;return(e=n.localName)!==null&&e!==void 0?e:n.tagName.toLowerCase()}var t_={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"},n_={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 r_(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=n_[e])!==null&&r!==void 0&&r.has(t))})}function Dy(n,e){return r_(n,e)}function i_(n){var e=s_(n);if(e===null||Rh.indexOf(e)!==-1){var t=o_(n);if(Rh.indexOf(e||"")===-1||Dy(n,t||""))return t}return e}function o_(n){var e=t_[En(n)];if(e!==void 0)return e;switch(En(n)){case"a":case"area":case"link":if(n.hasAttribute("href"))return"link";break;case"img":return n.getAttribute("alt")===""&&!Dy(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 s_(n){var e=n.getAttribute("role");if(e!==null){var t=e.trim().split(" ")[0];if(t.length>0)return t}return null}var Rh=["presentation","none"];function Ft(n){return n!==null&&n.nodeType===n.ELEMENT_NODE}function Ny(n){return Ft(n)&&En(n)==="caption"}function au(n){return Ft(n)&&En(n)==="input"}function a_(n){return Ft(n)&&En(n)==="optgroup"}function l_(n){return Ft(n)&&En(n)==="select"}function c_(n){return Ft(n)&&En(n)==="table"}function u_(n){return Ft(n)&&En(n)==="textarea"}function d_(n){var e=n.ownerDocument===null?n:n.ownerDocument,t=e.defaultView;if(t===null)throw new TypeError("no window available");return t}function f_(n){return Ft(n)&&En(n)==="fieldset"}function h_(n){return Ft(n)&&En(n)==="legend"}function p_(n){return Ft(n)&&En(n)==="slot"}function m_(n){return Ft(n)&&n.ownerSVGElement!==void 0}function g_(n){return Ft(n)&&En(n)==="svg"}function v_(n){return m_(n)&&En(n)==="title"}function lu(n,e){if(Ft(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 Ai(n,e){return Ft(n)?e.indexOf(i_(n))!==-1:!1}function y_(n){return n.trim().replace(/\s\s+/g," ")}function b_(n,e){if(!Ft(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 k_(n){return Ai(n,["button","combobox","listbox","textbox"])||jy(n,"range")}function jy(n,e){if(!Ft(n))return!1;switch(e){case"range":return Ai(n,["meter","progressbar","scrollbar","slider","spinbutton"]);default:throw new TypeError("No knowledge about abstract role '".concat(e,"'. This is likely a bug :("))}}function Uy(n,e){var t=qr(n.querySelectorAll(e));return lu(n,"aria-owns").forEach(function(r){t.push.apply(t,qr(r.querySelectorAll(e)))}),t}function w_(n){return l_(n)?n.selectedOptions||Uy(n,"[selected]"):Uy(n,'[aria-selected="true"]')}function C_(n){return Ai(n,Rh)}function S_(n){return Ny(n)}function T_(n){return Ai(n,["button","cell","checkbox","columnheader","gridcell","heading","label","legend","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"])}function x_(n){return!1}function __(n){return au(n)||u_(n)?n.value:n.textContent||""}function Fy(n){var e=n.getPropertyValue("content");return/^["'].*["']$/.test(e)?e.slice(1,-1):""}function By(n){var e=En(n);return e==="button"||e==="input"&&n.getAttribute("type")!=="hidden"||e==="meter"||e==="output"||e==="progress"||e==="select"||e==="textarea"}function Vy(n){if(By(n))return n;var e=null;return n.childNodes.forEach(function(t){if(e===null&&Ft(t)){var r=Vy(t);r!==null&&(e=r)}}),e}function E_(n){if(n.control!==void 0)return n.control;var e=n.getAttribute("for");return e!==null?n.ownerDocument.getElementById(e):Vy(n)}function P_(n){var e=n.labels;if(e===null)return e;if(e!==void 0)return qr(e);if(!By(n))return null;var t=n.ownerDocument;return qr(t.querySelectorAll("label")).filter(function(r){return E_(r)===n})}function R_(n){var e=n.assignedNodes();return e.length===0?qr(n.childNodes):e}function zy(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=new e_,r=typeof Map>"u"?void 0:new Map,o=d_(n),a=e.compute,l=a===void 0?"name":a,d=e.computedStyleSupportsPseudoElements,h=d===void 0?e.getComputedStyle!==void 0:d,m=e.getComputedStyle,g=m===void 0?o.getComputedStyle.bind(o):m,T=e.hidden,x=T===void 0?!1:T,S=function(j,N){if(N!==void 0)throw new Error("use uncachedGetComputedStyle directly for pseudo elements");if(r===void 0)return g(j);var K=r.get(j);if(K)return K;var ie=g(j,N);return r.set(j,ie),ie};function O(V,j){var N="";if(Ft(V)&&h){var K=g(V,"::before"),ie=Fy(K);N="".concat(ie," ").concat(N)}var X=p_(V)?R_(V):qr(V.childNodes).concat(lu(V,"aria-owns"));if(X.forEach(function(ne){var fe=ce(ne,{isEmbeddedInLabel:j.isEmbeddedInLabel,isReferenced:!1,recursion:!0}),Ae=Ft(ne)?S(ne).getPropertyValue("display"):"inline",Ge=Ae!=="inline"?" ":"";N+="".concat(Ge).concat(fe).concat(Ge)}),Ft(V)&&h){var Q=g(V,"::after"),te=Fy(Q);N="".concat(N," ").concat(te)}return N.trim()}function M(V,j){var N=V.getAttributeNode(j);return N!==null&&!t.has(N)&&N.value.trim()!==""?(t.add(N),N.value):null}function z(V){return Ft(V)?M(V,"title"):null}function H(V){if(!Ft(V))return null;if(f_(V)){t.add(V);for(var j=qr(V.childNodes),N=0;N<j.length;N+=1){var K=j[N];if(h_(K))return ce(K,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(c_(V)){t.add(V);for(var ie=qr(V.childNodes),X=0;X<ie.length;X+=1){var Q=ie[X];if(Ny(Q))return ce(Q,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(g_(V)){t.add(V);for(var te=qr(V.childNodes),ne=0;ne<te.length;ne+=1){var fe=te[ne];if(v_(fe))return fe.textContent}return null}else if(En(V)==="img"||En(V)==="area"){var Ae=M(V,"alt");if(Ae!==null)return Ae}else if(a_(V)){var Ge=M(V,"label");if(Ge!==null)return Ge}if(au(V)&&(V.type==="button"||V.type==="submit"||V.type==="reset")){var re=M(V,"value");if(re!==null)return re;if(V.type==="submit")return"Submit";if(V.type==="reset")return"Reset"}var Ie=P_(V);if(Ie!==null&&Ie.length!==0)return t.add(V),qr(Ie).map(function(de){return ce(de,{isEmbeddedInLabel:!0,isReferenced:!1,recursion:!0})}).filter(function(de){return de.length>0}).join(" ");if(au(V)&&V.type==="image"){var me=M(V,"alt");if(me!==null)return me;var ae=M(V,"title");return ae!==null?ae:"Submit Query"}if(Ai(V,["button"])){var xe=O(V,{isEmbeddedInLabel:!1});if(xe!=="")return xe}return null}function ce(V,j){if(t.has(V))return"";if(!x&&b_(V,S)&&!j.isReferenced)return t.add(V),"";var N=Ft(V)?V.getAttributeNode("aria-labelledby"):null,K=N!==null&&!t.has(N)?lu(V,"aria-labelledby"):[];if(l==="name"&&!j.isReferenced&&K.length>0)return t.add(N),K.map(function(Ae){return ce(Ae,{isEmbeddedInLabel:j.isEmbeddedInLabel,isReferenced:!0,recursion:!1})}).join(" ");var ie=j.recursion&&k_(V)&&l==="name";if(!ie){var X=(Ft(V)&&V.getAttribute("aria-label")||"").trim();if(X!==""&&l==="name")return t.add(V),X;if(!C_(V)){var Q=H(V);if(Q!==null)return t.add(V),Q}}if(Ai(V,["menu"]))return t.add(V),"";if(ie||j.isEmbeddedInLabel||j.isReferenced){if(Ai(V,["combobox","listbox"])){t.add(V);var te=w_(V);return te.length===0?au(V)?V.value:"":qr(te).map(function(Ae){return ce(Ae,{isEmbeddedInLabel:j.isEmbeddedInLabel,isReferenced:!1,recursion:!0})}).join(" ")}if(jy(V,"range"))return t.add(V),V.hasAttribute("aria-valuetext")?V.getAttribute("aria-valuetext"):V.hasAttribute("aria-valuenow")?V.getAttribute("aria-valuenow"):V.getAttribute("value")||"";if(Ai(V,["textbox"]))return t.add(V),__(V)}if(T_(V)||Ft(V)&&j.isReferenced||S_(V)||x_()){var ne=O(V,{isEmbeddedInLabel:j.isEmbeddedInLabel});if(ne!=="")return t.add(V),ne}if(V.nodeType===V.TEXT_NODE)return t.add(V),V.textContent||"";if(j.recursion)return t.add(V),O(V,{isEmbeddedInLabel:j.isEmbeddedInLabel});var fe=z(V);return fe!==null?(t.add(V),fe):(t.add(V),"")}return y_(ce(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 Hy(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 Wy(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Hy(Object(t),!0).forEach(function(r){I_(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Hy(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function I_(n,e,t){return e=M_(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function M_(n){var e=A_(n,"string");return pl(e)=="symbol"?e:e+""}function A_(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 $y(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=lu(n,"aria-describedby").map(function(a){return zy(a,Wy(Wy({},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 O_(n){return Ai(n,["caption","code","deletion","emphasis","generic","insertion","none","paragraph","presentation","strong","subscript","superscript"])}function Ih(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return O_(n)?"":zy(n,e)}const L_=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},D_=n=>{if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement){const e=Ih(n)??"";return{name:e===""?n.name:e,description:$y(n),type:n.type,placeholder:n.placeholder,...L_(n)}}else if(n instanceof HTMLSelectElement){const e=Ih(n)??"";return{name:e===""?n.name:e,description:$y(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")},qy=()=>{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,...D_(o)})),formElements:t}},cu=(n,...e)=>{console.debug(`[NLX V+] ${n}`,...e)},N_=(n,e=50,t=1/0)=>{let r=null,o=null,a=Promise.resolve();return(...l)=>{o??(o=Date.now());const d=()=>{a=a.then(async()=>{try{await n.apply(null,l)}catch{}}),o=null};r&&clearTimeout(r),Date.now()-o>t?d():r=setTimeout(()=>{d()},e)}},j_=(n,e,t,r)=>{let o={fields:[],destinations:[],actions:[]};const a=N_(async()=>{const{context:d,state:h}=t(U_(e));if(!Ud(o,d)){try{cu("Automatic context sent:",d),await n.sendContext({"nlx:vpContext":d})}catch{}r(h),o=d}},50,300);a();const l=new MutationObserver(a);return l.observe(document.body,{subtree:!0,childList:!0,attributes:!0}),{teardown:()=>{l.disconnect()},onCustomCommandsChange:d=>{e=d,a()}}},U_=n=>{const{context:e,formElements:t}=qy(),{context:r,links:o}=F_();return{context:{uri:window.location.pathname,fields:e,destinations:r,actions:n.filter(l=>l.description!=null).map(l=>{const{handler:d,...h}=l;return h})},state:{formElements:t,links:o,customCommands:new Map(n.map(l=>[l.action,l.handler]))}}},F_=()=>{const n=Object.fromEntries(Rk(Array.from(document.querySelectorAll("a")).map(e=>[Ih(e),e.getAttribute("href")??""])));return{context:Object.keys(n),links:n}},B_=(n,e,t)=>{const r=o=>{switch(cu("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{cu('Custom page navigation action received, but no URL found for destination".',o.destination)}}break;case"page_unknown":cu("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),(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 uu={exports:{}},V_=uu.exports,Gy;function z_(){return Gy||(Gy=1,function(n,e){(function(r,o){n.exports=o()})(V_,()=>(()=>{var t=[,(l,d,h)=>{h.r(d),h.d(d,{default:()=>g});var m=(()=>{var T=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(x={}){var S=x,O,M;S.ready=new Promise((u,f)=>{O=u,M=f});function z(){function u(U){const $=w;v=f=0,w=new Map,$.forEach(se=>{try{se(U)}catch(G){console.error(G)}}),this.ob(),_&&_.Qb()}let f=0,v=0,w=new Map,_=null,I=null;this.requestAnimationFrame=function(U){f||(f=requestAnimationFrame(u.bind(this)));const $=++v;return w.set($,U),$},this.cancelAnimationFrame=function(U){w.delete(U),f&&w.size==0&&(cancelAnimationFrame(f),f=0)},this.Ob=function(U){I&&(document.body.remove(I),I=null),U||(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",U=function($){I.innerHTML="RIVE FPS "+$.toFixed(1)},document.body.appendChild(I)),_=new function(){let $=0,se=0;this.Qb=function(){var G=performance.now();se?(++$,G-=se,1e3<G&&(U(1e3*$/G),$=se=0)):(se=G,$=0)}}},this.ob=function(){}}function H(){console.assert(!0);const u=new Map;let f=-1/0;this.push=function(v){return v=v+255>>8,u.has(v)&&clearTimeout(u.get(v)),u.set(v,setTimeout(function(){u.delete(v),u.length==0?f=-1/0:v==f&&(f=Math.max(...u.keys()),console.assert(f<v))},1e3)),f=Math.max(v,f),f<<8}}const ce=S.onRuntimeInitialized;S.onRuntimeInitialized=function(){ce&&ce();let u=S.decodeAudio;S.decodeAudio=function(_,I){_=u(_),I(_)};let f=S.decodeFont;S.decodeFont=function(_,I){_=f(_),I(_)};const v=S.FileAssetLoader;S.ptrToAsset=_=>{let I=S.ptrToFileAsset(_);return I.isImage?S.ptrToImageAsset(_):I.isFont?S.ptrToFontAsset(_):I.isAudio?S.ptrToAudioAsset(_):I},S.CustomFileAssetLoader=v.extend("CustomFileAssetLoader",{__construct:function({loadContents:_}){this.__parent.__construct.call(this),this.Eb=_},loadContents:function(_,I){return _=S.ptrToAsset(_),this.Eb(_,I)}}),S.CDNFileAssetLoader=v.extend("CDNFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(_){let I=S.ptrToAsset(_);return _=I.cdnUuid,_===""?!1:(function(U,$){var se=new XMLHttpRequest;se.responseType="arraybuffer",se.onreadystatechange=function(){se.readyState==4&&se.status==200&&$(se)},se.open("GET",U,!0),se.send(null)}(I.cdnBaseUrl+"/"+_,U=>{I.decode(new Uint8Array(U.response))}),!0)}}),S.FallbackFileAssetLoader=v.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this),this.kb=[]},addLoader:function(_){this.kb.push(_)},loadContents:function(_,I){for(let U of this.kb)if(U.loadContents(_,I))return!0;return!1}});let w=S.computeAlignment;S.computeAlignment=function(_,I,U,$,se=1){return w.call(this,_,I,U,$,se)}};const V=S.onRuntimeInitialized;S.onRuntimeInitialized=function(){function u(pe){this.F=pe,this.Db=pe.getContext("2d"),this.Gb=w,this.S=[],this.la=0,this.clear=function(){console.assert(this.la==0),this.S=[],_.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,He,Ye,nt,gt=1){this.S.push(w.align.bind(w,Pe,He,Ye,nt,gt))},this.flush=function(){console.assert(this.la==0),_.add(this),w.$a||v()},this.delete=function(){}}function f(pe,Pe=!1){var He={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=pe.getContext("webgl2",He),!Pe)return null;He=Yh(Pe,He),Ta(He);const Ye=I(pe.width,pe.height);Ye.Na=He,Ye.F=pe,Ye.Oa=pe.width,Ye.ab=pe.height,Ye.T=Pe;var nt=Ye.delete;return Ye.delete=function(){nt.call(this);var gt=this.Na;mr===Zt[gt]&&(mr=null),typeof JSEvents=="object"&&JSEvents.Oc(Zt[gt].C.canvas),Zt[gt]&&Zt[gt].C.canvas&&(Zt[gt].C.canvas.Cb=void 0),this.Na=this.F=this.Oa=this.T=Zt[gt]=null},Ye}function v(){if(w){var pe=w.Fb,Pe=0,He=0,Ye=0,nt=Array(_.size),gt=0;for(var Mt of _)Mt.ga=Math.min(Mt.F.width,pe),Mt.fa=Math.min(Mt.F.height,pe),Mt.La=Mt.fa*Mt.ga,Pe=Math.max(Pe,Mt.ga),He=Math.max(He,Mt.fa),Ye+=Mt.La,nt[gt++]=Mt;if(_.clear(),!(0>=Ye)){for(Pe=1<<(0>=Pe?0:32-Math.clz32(Pe-1)),He=1<<(0>=He?0:32-Math.clz32(He-1));He*Pe<Ye;)Pe<=He?Pe*=2:He*=2;for(Pe=Math.min(Pe,pe),Pe=Math.min(He,pe),nt.sort((ti,zi)=>zi.La-ti.La),Ye=new S.DynamicRectanizer(pe),Mt=0;Mt<nt.length;){for(Ye.reset(Pe,He),gt=Mt;gt<nt.length;++gt){var Lt=nt[gt],Rt=Ye.addRect(Lt.ga,Lt.fa);if(0>Rt){console.assert(gt>Mt);break}Lt.ra=Rt&65535,Lt.sa=Rt>>16}for(Lt=se.push(Ye.drawWidth()),Rt=G.push(Ye.drawHeight()),console.assert(Lt>=Ye.drawWidth()),console.assert(Rt>=Ye.drawHeight()),console.assert(Lt<=pe),console.assert(Rt<=pe),w.F.width!=Lt&&(w.F.width=Lt),w.F.height!=Rt&&(w.F.height=Rt),w.clear(),Lt=Mt;Lt<gt;++Lt){Rt=nt[Lt],w.saveClipRect(Rt.ra,Rt.sa,Rt.ra+Rt.ga,Rt.sa+Rt.fa);let ti=new S.Mat2D;ti.xx=Rt.ga/Rt.F.width,ti.yy=Rt.fa/Rt.F.height,ti.xy=ti.yx=0,ti.tx=Rt.ra,ti.ty=Rt.sa,w.transform(ti);for(const zi of Rt.S)zi();w.restoreClipRect(),Rt.S=[]}for(w.flush();Mt<gt;++Mt)Lt=nt[Mt],Rt=Lt.Db,Rt.globalCompositeOperation="copy",Rt.drawImage(w.F,Lt.ra,Lt.sa,Lt.ga,Lt.fa,0,0,Lt.F.width,Lt.F.height);Mt=gt}}}}V&&V();let w=null;const _=new Set,I=S.makeRenderer;S.makeRenderer=function(pe,Pe){if(!w){let He=function(Ye){var nt=document.createElement("canvas");return nt.width=1,nt.height=1,w=f(nt,Ye),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,(Ye=w.T.getExtension("WEBGL_debug_renderer_info"))&&(nt=w.T.getParameter(Ye.UNMASKED_RENDERER_WEBGL),w.T.getParameter(Ye.UNMASKED_VENDOR_WEBGL).includes("Google")&&nt.includes("ANGLE Metal Renderer")&&(w.Ma=!1)),w};w=He(!0),w.Ma||(w=He(!1))}return Pe?new u(pe):f(pe,w.Ma)};const U=S.Artboard.prototype.delete;S.Artboard.prototype.delete=function(){this.Hb=!0,U.call(this)};const $=S.Artboard.prototype.draw;S.Artboard.prototype.draw=function(pe){pe.S?pe.S.push(()=>{this.Hb||$.call(this,pe.Gb)}):$.call(this,pe)};const se=new H,G=new H,we=new z;S.requestAnimationFrame=we.requestAnimationFrame.bind(we),S.cancelAnimationFrame=we.cancelAnimationFrame.bind(we),S.enableFPSCounter=we.Ob.bind(we),we.ob=v,S.resolveAnimationFrame=v;let Re=S.load;S.load=function(pe,Pe,He=!0){const Ye=new S.FallbackFileAssetLoader;return Pe!==void 0&&Ye.addLoader(Pe),He&&(Pe=new S.CDNFileAssetLoader,Ye.addLoader(Pe)),Promise.resolve(Re(pe,Ye))};const Ne=S.WebGL2Renderer.prototype.clear;S.WebGL2Renderer.prototype.clear=function(){Ta(this.Na);const pe=this.F;(this.Oa!=pe.width||this.ab!=pe.height)&&(this.resize(pe.width,pe.height),this.Oa=pe.width,this.ab=pe.height),Ne.call(this)},S.decodeImage=function(pe,Pe){pe=S.decodeWebGL2Image(pe),Pe(pe)};let J=S.Renderer.prototype.align;S.Renderer.prototype.align=function(pe,Pe,He,Ye,nt=1){J.call(this,pe,Pe,He,Ye,nt)}};var j=Object.assign({},S),N="./this.program",K=typeof window=="object",ie=typeof importScripts=="function",X="",Q,te;(K||ie)&&(ie?X=self.location.href:typeof document<"u"&&document.currentScript&&(X=document.currentScript.src),T&&(X=T),X.indexOf("blob:")!==0?X=X.substr(0,X.replace(/[?#].*/,"").lastIndexOf("/")+1):X="",ie&&(te=u=>{var f=new XMLHttpRequest;return f.open("GET",u,!1),f.responseType="arraybuffer",f.send(null),new Uint8Array(f.response)}),Q=(u,f,v)=>{var w=new XMLHttpRequest;w.open("GET",u,!0),w.responseType="arraybuffer",w.onload=()=>{w.status==200||w.status==0&&w.response?f(w.response):v()},w.onerror=v,w.send(null)});var ne=S.print||console.log.bind(console),fe=S.printErr||console.error.bind(console);Object.assign(S,j),j=null,S.thisProgram&&(N=S.thisProgram);var Ae;S.wasmBinary&&(Ae=S.wasmBinary),S.noExitRuntime,typeof WebAssembly!="object"&&kn("no native wasm support detected");var Ge,re,Ie=!1,me,ae,xe,de,L,Z,We,Ke;function et(){var u=Ge.buffer;S.HEAP8=me=new Int8Array(u),S.HEAP16=xe=new Int16Array(u),S.HEAP32=L=new Int32Array(u),S.HEAPU8=ae=new Uint8Array(u),S.HEAPU16=de=new Uint16Array(u),S.HEAPU32=Z=new Uint32Array(u),S.HEAPF32=We=new Float32Array(u),S.HEAPF64=Ke=new Float64Array(u)}var Be,tt=[],$e=[],ut=[];function Ot(){var u=S.preRun.shift();tt.unshift(u)}var Kt=0,Zn=null;function kn(u){throw S.onAbort&&S.onAbort(u),u="Aborted("+u+")",fe(u),Ie=!0,u=new WebAssembly.RuntimeError(u+". Build with -sASSERTIONS for more info."),M(u),u}function Sr(u){return u.startsWith("data:application/octet-stream;base64,")}var Tr;if(Tr="webgl2_advanced.wasm",!Sr(Tr)){var po=Tr;Tr=S.locateFile?S.locateFile(po,X):X+po}function Li(u){if(u==Tr&&Ae)return new Uint8Array(Ae);if(te)return te(u);throw"both async and sync fetching of the wasm failed"}function ia(u){if(!Ae&&(K||ie)){if(typeof fetch=="function"&&!u.startsWith("file://"))return fetch(u,{credentials:"same-origin"}).then(f=>{if(!f.ok)throw"failed to load wasm binary file at '"+u+"'";return f.arrayBuffer()}).catch(()=>Li(u));if(Q)return new Promise((f,v)=>{Q(u,w=>f(new Uint8Array(w)),v)})}return Promise.resolve().then(()=>Li(u))}function wn(u,f,v){return ia(u).then(w=>WebAssembly.instantiate(w,f)).then(w=>w).then(v,w=>{fe("failed to asynchronously prepare wasm: "+w),kn(w)})}function Di(u,f){var v=Tr;return Ae||typeof WebAssembly.instantiateStreaming!="function"||Sr(v)||v.startsWith("file://")||typeof fetch!="function"?wn(v,u,f):fetch(v,{credentials:"same-origin"}).then(w=>WebAssembly.instantiateStreaming(w,u).then(f,function(_){return fe("wasm streaming compile failed: "+_),fe("falling back to ArrayBuffer instantiation"),wn(v,u,f)}))}var zn,Ni,oa={534231:(u,f,v,w,_)=>{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=u,window.h.I.capture=f,window.h.I.Ra=v,window.h.ja={},window.h.ja.stopped=w,window.h.ja.xb=_;let I=window.h;I.D=[],I.rc=function(U){for(var $=0;$<I.D.length;++$)if(I.D[$]==null)return I.D[$]=U,$;return I.D.push(U),I.D.length-1},I.Bb=function(U){for(I.D[U]=null;0<I.D.length&&I.D[I.D.length-1]==null;)I.D.pop()},I.Qc=function(U){for(var $=0;$<I.D.length;++$)if(I.D[$]==U)return I.Bb($)},I.va=function(U){return I.D[U]},I.Za=["touchend","click"],I.unlock=function(){for(var U=0;U<I.D.length;++U){var $=I.D[U];$!=null&&$.J!=null&&$.state===I.ja.xb&&$.J.resume().then(()=>{nr($.pb)},se=>{console.error("Failed to resume audiocontext",se)})}I.Za.map(function(se){document.removeEventListener(se,I.unlock,!0)})},I.Za.map(function(U){document.addEventListener(U,I.unlock,!0)})}return window.h.Ga+=1,1},536409:()=>{typeof window.h<"u"&&(window.h.Za.map(function(u){document.removeEventListener(u,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 u=new(window.AudioContext||window.webkitAudioContext),f=u.sampleRate;return u.close(),f}catch{return 0}},536988:(u,f,v,w,_,I)=>{if(typeof window.h>"u")return-1;var U={},$={};return u==window.h.I.Ea&&v!=0&&($.sampleRate=v),U.J=new(window.AudioContext||window.webkitAudioContext)($),U.J.suspend(),U.state=window.h.ja.stopped,v=0,u!=window.h.I.Ea&&(v=f),U.Z=U.J.createScriptProcessor(w,v,f),U.Z.onaudioprocess=function(se){if((U.wa==null||U.wa.length==0)&&(U.wa=new Float32Array(We.buffer,_,w*f)),u==window.h.I.capture||u==window.h.I.Ra){for(var G=0;G<f;G+=1)for(var we=se.inputBuffer.getChannelData(G),Re=U.wa,Ne=0;Ne<w;Ne+=1)Re[Ne*f+G]=we[Ne];So(I,w,_)}if(u==window.h.I.Ea||u==window.h.I.Ra)for(zl(I,w,_),G=0;G<se.outputBuffer.numberOfChannels;++G)for(we=se.outputBuffer.getChannelData(G),Re=U.wa,Ne=0;Ne<w;Ne+=1)we[Ne]=Re[Ne*f+G];else for(G=0;G<se.outputBuffer.numberOfChannels;++G)se.outputBuffer.getChannelData(G).fill(0)},u!=window.h.I.capture&&u!=window.h.I.Ra||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(se){U.Ha=U.J.createMediaStreamSource(se),U.Ha.connect(U.Z),U.Z.connect(U.J.destination)}).catch(function(se){console.log("Failed to get user media: "+se)}),u==window.h.I.Ea&&U.Z.connect(U.J.destination),U.pb=I,window.h.rc(U)},539865:u=>window.h.va(u).J.sampleRate,539938:u=>{u=window.h.va(u),u.Z!==void 0&&(u.Z.onaudioprocess=function(){},u.Z.disconnect(),u.Z=void 0),u.Ha!==void 0&&(u.Ha.disconnect(),u.Ha=void 0),u.J.close(),u.J=void 0,u.pb=void 0},540338:u=>{window.h.Bb(u)},540388:u=>{u=window.h.va(u),u.J.resume(),u.state=window.h.ja.xb},540527:u=>{u=window.h.va(u),u.J.suspend(),u.state=window.h.ja.stopped}},P=u=>{for(;0<u.length;)u.shift()(S)},y=(u,f)=>{for(var v=0,w=u.length-1;0<=w;w--){var _=u[w];_==="."?u.splice(w,1):_===".."?(u.splice(w,1),v++):v&&(u.splice(w,1),v--)}if(f)for(;v;v--)u.unshift("..");return u},C=u=>{var f=u.charAt(0)==="/",v=u.substr(-1)==="/";return(u=y(u.split("/").filter(w=>!!w),!f).join("/"))||f||(u="."),u&&v&&(u+="/"),(f?"/":"")+u},A=u=>{var f=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(u).slice(1);return u=f[0],f=f[1],!u&&!f?".":(f&&(f=f.substr(0,f.length-1)),u+f)},q=u=>{if(u==="/")return"/";u=C(u),u=u.replace(/\/$/,"");var f=u.lastIndexOf("/");return f===-1?u:u.substr(f+1)},ue=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return u=>crypto.getRandomValues(u);kn("initRandomDevice")},ye=u=>(ye=ue())(u);function qe(){for(var u="",f=!1,v=arguments.length-1;-1<=v&&!f;v--){if(f=0<=v?arguments[v]:"/",typeof f!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!f)return"";u=f+"/"+u,f=f.charAt(0)==="/"}return u=y(u.split("/").filter(w=>!!w),!f).join("/"),(f?"/":"")+u||"."}var it=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Le=(u,f,v)=>{var w=f+v;for(v=f;u[v]&&!(v>=w);)++v;if(16<v-f&&u.buffer&&it)return it.decode(u.subarray(f,v));for(w="";f<v;){var _=u[f++];if(_&128){var I=u[f++]&63;if((_&224)==192)w+=String.fromCharCode((_&31)<<6|I);else{var U=u[f++]&63;_=(_&240)==224?(_&15)<<12|I<<6|U:(_&7)<<18|I<<12|U<<6|u[f++]&63,65536>_?w+=String.fromCharCode(_):(_-=65536,w+=String.fromCharCode(55296|_>>10,56320|_&1023))}}else w+=String.fromCharCode(_)}return w},at=[],_t=u=>{for(var f=0,v=0;v<u.length;++v){var w=u.charCodeAt(v);127>=w?f++:2047>=w?f+=2:55296<=w&&57343>=w?(f+=4,++v):f+=3}return f},Yt=(u,f,v,w)=>{if(!(0<w))return 0;var _=v;w=v+w-1;for(var I=0;I<u.length;++I){var U=u.charCodeAt(I);if(55296<=U&&57343>=U){var $=u.charCodeAt(++I);U=65536+((U&1023)<<10)|$&1023}if(127>=U){if(v>=w)break;f[v++]=U}else{if(2047>=U){if(v+1>=w)break;f[v++]=192|U>>6}else{if(65535>=U){if(v+2>=w)break;f[v++]=224|U>>12}else{if(v+3>=w)break;f[v++]=240|U>>18,f[v++]=128|U>>12&63}f[v++]=128|U>>6&63}f[v++]=128|U&63}}return f[v]=0,v-_};function Et(u,f){var v=Array(_t(u)+1);return u=Yt(u,v,0,v.length),f&&(v.length=u),v}var Hn=[];function Pn(u,f){Hn[u]={input:[],G:[],V:f},la(u,Cn)}var Cn={open:function(u){var f=Hn[u.node.Fa];if(!f)throw new De(43);u.s=f,u.seekable=!1},close:function(u){u.s.V.ua(u.s)},ua:function(u){u.s.V.ua(u.s)},read:function(u,f,v,w){if(!u.s||!u.s.V.jb)throw new De(60);for(var _=0,I=0;I<w;I++){try{var U=u.s.V.jb(u.s)}catch{throw new De(29)}if(U===void 0&&_===0)throw new De(6);if(U==null)break;_++,f[v+I]=U}return _&&(u.node.timestamp=Date.now()),_},write:function(u,f,v,w){if(!u.s||!u.s.V.Ua)throw new De(60);try{for(var _=0;_<w;_++)u.s.V.Ua(u.s,f[v+_])}catch{throw new De(29)}return w&&(u.node.timestamp=Date.now()),_}},rn={jb:function(){e:{if(!at.length){var u=null;if(typeof window<"u"&&typeof window.prompt=="function"?(u=window.prompt("Input: "),u!==null&&(u+=`
157
157
  `)):typeof readline=="function"&&(u=readline(),u!==null&&(u+=`
158
158
  `)),!u){u=null;break e}at=Et(u,!0)}u=at.shift()}return u},Ua:function(u,f){f===null||f===10?(ne(Le(u.G,0)),u.G=[]):f!=0&&u.G.push(f)},ua:function(u){u.G&&0<u.G.length&&(ne(Le(u.G,0)),u.G=[])},$b:function(){return{xc:25856,zc:5,wc:191,yc:35387,vc:[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]}},ac:function(){return 0},bc:function(){return[24,80]}},ln={Ua:function(u,f){f===null||f===10?(fe(Le(u.G,0)),u.G=[]):f!=0&&u.G.push(f)},ua:function(u){u.G&&0<u.G.length&&(fe(Le(u.G,0)),u.G=[])}};function xr(u,f){var v=u.j?u.j.length:0;v>=f||(f=Math.max(f,v*(1048576>v?2:1.125)>>>0),v!=0&&(f=Math.max(f,256)),v=u.j,u.j=new Uint8Array(f),0<u.v&&u.j.set(v.subarray(0,u.v),0))}var Ze={O:null,U(){return Ze.createNode(null,"/",16895,0)},createNode(u,f,v,w){if((v&61440)===24576||(v&61440)===4096)throw new De(63);return Ze.O||(Ze.O={dir:{node:{Y:Ze.l.Y,P:Ze.l.P,ma:Ze.l.ma,Ca:Ze.l.Ca,vb:Ze.l.vb,Ab:Ze.l.Ab,wb:Ze.l.wb,tb:Ze.l.tb,Ia:Ze.l.Ia},stream:{ba:Ze.m.ba}},file:{node:{Y:Ze.l.Y,P:Ze.l.P},stream:{ba:Ze.m.ba,read:Ze.m.read,write:Ze.m.write,ta:Ze.m.ta,lb:Ze.m.lb,nb:Ze.m.nb}},link:{node:{Y:Ze.l.Y,P:Ze.l.P,na:Ze.l.na},stream:{}},bb:{node:{Y:Ze.l.Y,P:Ze.l.P},stream:Su}}),v=bu(u,f,v,w),(v.mode&61440)===16384?(v.l=Ze.O.dir.node,v.m=Ze.O.dir.stream,v.j={}):(v.mode&61440)===32768?(v.l=Ze.O.file.node,v.m=Ze.O.file.stream,v.v=0,v.j=null):(v.mode&61440)===40960?(v.l=Ze.O.link.node,v.m=Ze.O.link.stream):(v.mode&61440)===8192&&(v.l=Ze.O.bb.node,v.m=Ze.O.bb.stream),v.timestamp=Date.now(),u&&(u.j[f]=v,u.timestamp=v.timestamp),v},Ec(u){return u.j?u.j.subarray?u.j.subarray(0,u.v):new Uint8Array(u.j):new Uint8Array(0)},l:{Y(u){var f={};return f.Cc=(u.mode&61440)===8192?u.id:1,f.Gc=u.id,f.mode=u.mode,f.Lc=1,f.uid=0,f.Fc=0,f.Fa=u.Fa,(u.mode&61440)===16384?f.size=4096:(u.mode&61440)===32768?f.size=u.v:(u.mode&61440)===40960?f.size=u.link.length:f.size=0,f.tc=new Date(u.timestamp),f.Jc=new Date(u.timestamp),f.Ac=new Date(u.timestamp),f.Ib=4096,f.uc=Math.ceil(f.size/f.Ib),f},P(u,f){if(f.mode!==void 0&&(u.mode=f.mode),f.timestamp!==void 0&&(u.timestamp=f.timestamp),f.size!==void 0&&(f=f.size,u.v!=f))if(f==0)u.j=null,u.v=0;else{var v=u.j;u.j=new Uint8Array(f),v&&u.j.set(v.subarray(0,Math.min(f,u.v))),u.v=f}},ma(){throw wl[44]},Ca(u,f,v,w){return Ze.createNode(u,f,v,w)},vb(u,f,v){if((u.mode&61440)===16384){try{var w=mo(f,v)}catch{}if(w)for(var _ in w.j)throw new De(55)}delete u.parent.j[u.name],u.parent.timestamp=Date.now(),u.name=v,f.j[v]=u,f.timestamp=u.parent.timestamp,u.parent=f},Ab(u,f){delete u.j[f],u.timestamp=Date.now()},wb(u,f){var v=mo(u,f),w;for(w in v.j)throw new De(55);delete u.j[f],u.timestamp=Date.now()},tb(u){var f=[".",".."],v;for(v in u.j)u.j.hasOwnProperty(v)&&f.push(v);return f},Ia(u,f,v){return u=Ze.createNode(u,f,41471,0),u.link=v,u},na(u){if((u.mode&61440)!==40960)throw new De(28);return u.link}},m:{read(u,f,v,w,_){var I=u.node.j;if(_>=u.node.v)return 0;if(u=Math.min(u.node.v-_,w),8<u&&I.subarray)f.set(I.subarray(_,_+u),v);else for(w=0;w<u;w++)f[v+w]=I[_+w];return u},write(u,f,v,w,_,I){if(f.buffer===me.buffer&&(I=!1),!w)return 0;if(u=u.node,u.timestamp=Date.now(),f.subarray&&(!u.j||u.j.subarray)){if(I)return u.j=f.subarray(v,v+w),u.v=w;if(u.v===0&&_===0)return u.j=f.slice(v,v+w),u.v=w;if(_+w<=u.v)return u.j.set(f.subarray(v,v+w),_),w}if(xr(u,_+w),u.j.subarray&&f.subarray)u.j.set(f.subarray(v,v+w),_);else for(I=0;I<w;I++)u.j[_+I]=f[v+I];return u.v=Math.max(u.v,_+w),w},ba(u,f,v){if(v===1?f+=u.position:v===2&&(u.node.mode&61440)===32768&&(f+=u.node.v),0>f)throw new De(28);return f},ta(u,f,v){xr(u.node,f+v),u.node.v=Math.max(u.node.v,f+v)},lb(u,f,v,w,_){if((u.node.mode&61440)!==32768)throw new De(43);if(u=u.node.j,_&2||u.buffer!==me.buffer){if((0<v||v+f<u.length)&&(u.subarray?u=u.subarray(v,v+f):u=Array.prototype.slice.call(u,v,v+f)),v=!0,kn(),f=void 0,!f)throw new De(48);me.set(u,f)}else v=!1,f=u.byteOffset;return{o:f,M:v}},nb(u,f,v,w){return Ze.m.write(u,f,0,w,v,!1),0}}};function _r(u,f){var v=0;return u&&(v|=365),f&&(v|=146),v}var Wn=null,dt={},$n=[],yu=1,Gr=null,sa=!0,De=null,wl={},ur=(u,f={})=>{if(u=qe(u),!u)return{path:"",node:null};if(f=Object.assign({hb:!0,Wa:0},f),8<f.Wa)throw new De(32);u=u.split("/").filter(U=>!!U);for(var v=Wn,w="/",_=0;_<u.length;_++){var I=_===u.length-1;if(I&&f.parent)break;if(v=mo(v,u[_]),w=C(w+"/"+u[_]),v.Da&&(!I||I&&f.hb)&&(v=v.Da.root),!I||f.gb){for(I=0;(v.mode&61440)===40960;)if(v=zt(w),w=qe(A(w),v),v=ur(w,{Wa:f.Wa+1}).node,40<I++)throw new De(32)}}return{path:w,node:v}},Xo=u=>{for(var f;;){if(u===u.parent)return u=u.U.mb,f?u[u.length-1]!=="/"?`${u}/${f}`:u+f:u;f=f?`${u.name}/${f}`:u.name,u=u.parent}},Jo=(u,f)=>{for(var v=0,w=0;w<f.length;w++)v=(v<<5)-v+f.charCodeAt(w)|0;return(u+v>>>0)%Gr.length},mo=(u,f)=>{var v;if(v=(v=aa(u,"x"))?v:u.l.ma?0:2)throw new De(v,u);for(v=Gr[Jo(u.id,f)];v;v=v.ec){var w=v.name;if(v.parent.id===u.id&&w===f)return v}return u.l.ma(u,f)},bu=(u,f,v,w)=>(u=new xa(u,f,v,w),f=Jo(u.parent.id,u.name),u.ec=Gr[f],Gr[f]=u),ku=u=>{var f=["r","w","rw"][u&3];return u&512&&(f+="w"),f},aa=(u,f)=>{if(sa)return 0;if(!f.includes("r")||u.mode&292){if(f.includes("w")&&!(u.mode&146)||f.includes("x")&&!(u.mode&73))return 2}else return 2;return 0},pi=(u,f)=>{try{return mo(u,f),20}catch{}return aa(u,"wx")},wu=()=>{for(var u=0;4096>=u;u++)if(!$n[u])return u;throw new De(33)},Kr=u=>{if(u=$n[u],!u)throw new De(8);return u},Cu=(u,f=-1)=>(Rn||(Rn=function(){this.h={}},Rn.prototype={},Object.defineProperties(Rn.prototype,{object:{get(){return this.node},set(v){this.node=v}},flags:{get(){return this.h.flags},set(v){this.h.flags=v}},position:{get(){return this.h.position},set(v){this.h.position=v}}})),u=Object.assign(new Rn,u),f==-1&&(f=wu()),u.X=f,$n[f]=u),Su={open:u=>{u.m=dt[u.node.Fa].m,u.m.open&&u.m.open(u)},ba:()=>{throw new De(70)}},la=(u,f)=>{dt[u]={m:f}},Cl=(u,f)=>{var v=f==="/",w=!f;if(v&&Wn)throw new De(10);if(!v&&!w){var _=ur(f,{hb:!1});if(f=_.path,_=_.node,_.Da)throw new De(10);if((_.mode&61440)!==16384)throw new De(54)}f={type:u,Nc:{},mb:f,dc:[]},u=u.U(f),u.U=f,f.root=u,v?Wn=u:_&&(_.Da=f,_.U&&_.U.dc.push(f))},er=(u,f,v)=>{var w=ur(u,{parent:!0}).node;if(u=q(u),!u||u==="."||u==="..")throw new De(28);var _=pi(w,u);if(_)throw new De(_);if(!w.l.Ca)throw new De(63);return w.l.Ca(w,u,f,v)},ca=(u,f,v)=>{typeof v>"u"&&(v=f,f=438),er(u,f|8192,v)},Sl=(u,f)=>{if(!qe(u))throw new De(44);var v=ur(f,{parent:!0}).node;if(!v)throw new De(44);f=q(f);var w=pi(v,f);if(w)throw new De(w);if(!v.l.Ia)throw new De(63);v.l.Ia(v,f,u)},zt=u=>{if(u=ur(u).node,!u)throw new De(44);if(!u.l.na)throw new De(28);return qe(Xo(u.parent),u.l.na(u))},ua=(u,f,v)=>{if(u==="")throw new De(44);if(typeof f=="string"){var w={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[f];if(typeof w>"u")throw Error(`Unknown file open mode: ${f}`);f=w}if(v=f&64?(typeof v>"u"?438:v)&4095|32768:0,typeof u=="object")var _=u;else{u=C(u);try{_=ur(u,{gb:!(f&131072)}).node}catch{}}if(w=!1,f&64)if(_){if(f&128)throw new De(20)}else _=er(u,v,0),w=!0;if(!_)throw new De(44);if((_.mode&61440)===8192&&(f&=-513),f&65536&&(_.mode&61440)!==16384)throw new De(54);if(!w&&(v=_?(_.mode&61440)===40960?32:(_.mode&61440)===16384&&(ku(f)!=="r"||f&512)?31:aa(_,ku(f)):44))throw new De(v);if(f&512&&!w){if(v=_,v=typeof v=="string"?ur(v,{gb:!0}).node:v,!v.l.P)throw new De(63);if((v.mode&61440)===16384)throw new De(31);if((v.mode&61440)!==32768)throw new De(28);if(w=aa(v,"w"))throw new De(w);v.l.P(v,{size:0,timestamp:Date.now()})}return f&=-131713,_=Cu({node:_,path:Xo(_),flags:f,seekable:!0,position:0,m:_.m,sc:[],error:!1}),_.m.open&&_.m.open(_),!S.logReadFiles||f&1||(ha||(ha={}),u in ha||(ha[u]=1)),_},da=(u,f,v)=>{if(u.X===null)throw new De(8);if(!u.seekable||!u.m.ba)throw new De(70);if(v!=0&&v!=1&&v!=2)throw new De(28);u.position=u.m.ba(u,f,v),u.sc=[]},Tl=()=>{De||(De=function(u,f){this.name="ErrnoError",this.node=f,this.ic=function(v){this.aa=v},this.ic(u),this.message="FS error"},De.prototype=Error(),De.prototype.constructor=De,[44].forEach(u=>{wl[u]=new De(u),wl[u].stack="<generic error, no stack>"}))},Zo,es=(u,f,v)=>{u=C("/dev/"+u);var w=_r(!!f,!!v);fa||(fa=64);var _=fa++<<8|0;la(_,{open:I=>{I.seekable=!1},close:()=>{v&&v.buffer&&v.buffer.length&&v(10)},read:(I,U,$,se)=>{for(var G=0,we=0;we<se;we++){try{var Re=f()}catch{throw new De(29)}if(Re===void 0&&G===0)throw new De(6);if(Re==null)break;G++,U[$+we]=Re}return G&&(I.node.timestamp=Date.now()),G},write:(I,U,$,se)=>{for(var G=0;G<se;G++)try{v(U[$+G])}catch{throw new De(29)}return se&&(I.node.timestamp=Date.now()),G}}),ca(u,w,_)},fa,Er={},Rn,ha,Sn=void 0;function Yr(){return Sn+=4,L[Sn-4>>2]}function Tu(u){if(u===void 0)return"_unknown";u=u.replace(/[^a-zA-Z0-9_]/g,"$");var f=u.charCodeAt(0);return 48<=f&&57>=f?`_${u}`:u}function pa(u,f){return u=Tu(u),{[u]:function(){return f.apply(this,arguments)}}[u]}function ts(){this.M=[void 0],this.ib=[]}var Tn=new ts,Pr=void 0;function ot(u){throw new Pr(u)}var dr=u=>(u||ot("Cannot use deleted val. handle = "+u),Tn.get(u).value),Rr=u=>{switch(u){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Tn.ta({ub:1,value:u})}};function ma(u){var f=Error,v=pa(u,function(w){this.name=u,this.message=w,w=Error(w).stack,w!==void 0&&(this.stack=this.toString()+`
159
159
  `+w.replace(/^Error(:[^\n]*)?\n/,""))});return v.prototype=Object.create(f.prototype),v.prototype.constructor=v,v.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},v}var xl=void 0,ga=void 0;function Pt(u){for(var f="";ae[u];)f+=ga[ae[u++]];return f}var ns=[];function rs(){for(;ns.length;){var u=ns.pop();u.g.ia=!1,u.delete()}}var ht=void 0,Ir={};function va(u,f){for(f===void 0&&ot("ptr should not be undefined");u.A;)f=u.pa(f),u=u.A;return f}var Qr={};function _l(u){u=Hl(u);var f=Pt(u);return ei(u),f}function go(u,f){var v=Qr[u];return v===void 0&&ot(f+" has unknown type "+_l(u)),v}function is(){}var os=!1;function ss(u){--u.count.value,u.count.value===0&&(u.H?u.L.W(u.H):u.u.i.W(u.o))}function Xr(u,f,v){return f===v?u:v.A===void 0?null:(u=Xr(u,f,v.A),u===null?null:v.Mb(u))}var Jr={};function mi(u,f){return f=va(u,f),Ir[f]}var vo=void 0;function gi(u){throw new vo(u)}function fr(u,f){return f.u&&f.o||gi("makeClassHandle requires ptr and ptrType"),!!f.L!=!!f.H&&gi("Both smartPtrType and smartPtr must be specified"),f.count={value:1},yo(Object.create(u,{g:{value:f}}))}function yo(u){return typeof FinalizationRegistry>"u"?(yo=f=>f,u):(os=new FinalizationRegistry(f=>{ss(f.g)}),yo=f=>{var v=f.g;return v.H&&os.register(f,{g:v},f),f},is=f=>{os.unregister(f)},yo(u))}var as={};function Zr(u){for(;u.length;){var f=u.pop();u.pop()(f)}}function ls(u){return this.fromWireType(L[u>>2])}var ji={},Ui={};function In(u,f,v){function w($){$=v($),$.length!==u.length&&gi("Mismatched type converter count");for(var se=0;se<u.length;++se)Mn(u[se],$[se])}u.forEach(function($){Ui[$]=f});var _=Array(f.length),I=[],U=0;f.forEach(($,se)=>{Qr.hasOwnProperty($)?_[se]=Qr[$]:(I.push($),ji.hasOwnProperty($)||(ji[$]=[]),ji[$].push(()=>{_[se]=Qr[$],++U,U===I.length&&w(_)}))}),I.length===0&&w(_)}function ya(u){switch(u){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${u}`)}}function cs(u,f,v={}){var w=f.name;if(u||ot(`type "${w}" must have a positive integer typeid pointer`),Qr.hasOwnProperty(u)){if(v.Xb)return;ot(`Cannot register type '${w}' twice`)}Qr[u]=f,delete Ui[u],ji.hasOwnProperty(u)&&(f=ji[u],delete ji[u],f.forEach(_=>_()))}function Mn(u,f,v={}){if(!("argPackAdvance"in f))throw new TypeError("registerType registeredInstance requires argPackAdvance");cs(u,f,v)}function vi(u){ot(u.g.u.i.name+" instance already deleted")}function hr(){}function El(u,f,v){if(u[f].B===void 0){var w=u[f];u[f]=function(){return u[f].B.hasOwnProperty(arguments.length)||ot(`Function '${v}' called with an invalid number of arguments (${arguments.length}) - expects one of (${u[f].B})!`),u[f].B[arguments.length].apply(this,arguments)},u[f].B=[],u[f].B[w.ha]=w}}function Pl(u,f,v){S.hasOwnProperty(u)?((v===void 0||S[u].B!==void 0&&S[u].B[v]!==void 0)&&ot(`Cannot register public name '${u}' twice`),El(S,u,u),S.hasOwnProperty(v)&&ot(`Cannot register multiple overloads of a function with the same number of arguments (${v})!`),S[u].B[v]=f):(S[u]=f,v!==void 0&&(S[u].Mc=v))}function Rl(u,f,v,w,_,I,U,$){this.name=u,this.constructor=f,this.N=v,this.W=w,this.A=_,this.Rb=I,this.pa=U,this.Mb=$,this.qb=[]}function Fi(u,f,v){for(;f!==v;)f.pa||ot(`Expected null or instance of ${v.name}, got an instance of ${f.name}`),u=f.pa(u),f=f.A;return u}function Il(u,f){return f===null?(this.Ta&&ot(`null is not a valid ${this.name}`),0):(f.g||ot(`Cannot pass "${Bi(f)}" as a ${this.name}`),f.g.o||ot(`Cannot pass deleted object as a pointer of type ${this.name}`),Fi(f.g.o,f.g.u.i,this.i))}function xu(u,f){if(f===null){if(this.Ta&&ot(`null is not a valid ${this.name}`),this.ya){var v=this.Va();return u!==null&&u.push(this.W,v),v}return 0}if(f.g||ot(`Cannot pass "${Bi(f)}" as a ${this.name}`),f.g.o||ot(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.xa&&f.g.u.xa&&ot(`Cannot convert argument of type ${f.g.L?f.g.L.name:f.g.u.name} to parameter type ${this.name}`),v=Fi(f.g.o,f.g.u.i,this.i),this.ya)switch(f.g.H===void 0&&ot("Passing raw pointer to smart pointer is illegal"),this.mc){case 0:f.g.L===this?v=f.g.H:ot(`Cannot convert argument of type ${f.g.L?f.g.L.name:f.g.u.name} to parameter type ${this.name}`);break;case 1:v=f.g.H;break;case 2:if(f.g.L===this)v=f.g.H;else{var w=f.clone();v=this.hc(v,Rr(function(){w.delete()})),u!==null&&u.push(this.W,v)}break;default:ot("Unsupporting sharing policy")}return v}function yi(u,f){return f===null?(this.Ta&&ot(`null is not a valid ${this.name}`),0):(f.g||ot(`Cannot pass "${Bi(f)}" as a ${this.name}`),f.g.o||ot(`Cannot pass deleted object as a pointer of type ${this.name}`),f.g.u.xa&&ot(`Cannot convert argument of type ${f.g.u.name} to parameter type ${this.name}`),Fi(f.g.o,f.g.u.i,this.i))}function pr(u,f,v,w){this.name=u,this.i=f,this.Ta=v,this.xa=w,this.ya=!1,this.W=this.hc=this.Va=this.sb=this.mc=this.fc=void 0,f.A!==void 0?this.toWireType=xu:(this.toWireType=w?Il:yi,this.K=null)}function us(u,f,v){S.hasOwnProperty(u)||gi("Replacing nonexistant public symbol"),S[u].B!==void 0&&v!==void 0?S[u].B[v]=f:(S[u]=f,S[u].ha=v)}var ds=[],fs=u=>{var f=ds[u];return f||(u>=ds.length&&(ds.length=u+1),ds[u]=f=Be.get(u)),f},ba=(u,f)=>{var v=[];return function(){if(v.length=0,Object.assign(v,arguments),u.includes("j")){var w=S["dynCall_"+u];w=v&&v.length?w.apply(null,[f].concat(v)):w.call(null,f)}else w=fs(f).apply(null,v);return w}};function cn(u,f){u=Pt(u);var v=u.includes("j")?ba(u,f):fs(f);return typeof v!="function"&&ot(`unknown function pointer with signature ${u}: ${f}`),v}var An=void 0;function On(u,f){function v(I){_[I]||Qr[I]||(Ui[I]?Ui[I].forEach(v):(w.push(I),_[I]=!0))}var w=[],_={};throw f.forEach(v),new An(`${u}: `+w.map(_l).join([", "]))}function bo(u,f,v,w,_){var I=f.length;2>I&&ot("argTypes array size mismatch! Must at least get return value and 'this' types!");var U=f[1]!==null&&v!==null,$=!1;for(v=1;v<f.length;++v)if(f[v]!==null&&f[v].K===void 0){$=!0;break}var se=f[0].name!=="void",G=I-2,we=Array(G),Re=[],Ne=[];return function(){if(arguments.length!==G&&ot(`function ${u} called with ${arguments.length} arguments, expected ${G} args!`),Ne.length=0,Re.length=U?2:1,Re[0]=_,U){var J=f[1].toWireType(Ne,this);Re[1]=J}for(var pe=0;pe<G;++pe)we[pe]=f[pe+2].toWireType(Ne,arguments[pe]),Re.push(we[pe]);if(pe=w.apply(null,Re),$)Zr(Ne);else for(var Pe=U?1:2;Pe<f.length;Pe++){var He=Pe===1?J:we[Pe-2];f[Pe].K!==null&&f[Pe].K(He)}return J=se?f[0].fromWireType(pe):void 0,J}}function bi(u,f){for(var v=[],w=0;w<u;w++)v.push(Z[f+4*w>>2]);return v}function _u(u,f,v){return u instanceof Object||ot(`${v} with invalid "this": ${u}`),u instanceof f.i.constructor||ot(`${v} incompatible with "this" of type ${u.constructor.name}`),u.g.o||ot(`cannot call emscripten binding method ${v} on deleted object`),Fi(u.g.o,u.g.u.i,f.i)}function hs(u){u>=Tn.h&&--Tn.get(u).ub===0&&Tn.Wb(u)}function Ml(u,f,v){switch(f){case 0:return function(w){return this.fromWireType((v?me:ae)[w])};case 1:return function(w){return this.fromWireType((v?xe:de)[w>>1])};case 2:return function(w){return this.fromWireType((v?L:Z)[w>>2])};default:throw new TypeError("Unknown integer type: "+u)}}function Bi(u){if(u===null)return"null";var f=typeof u;return f==="object"||f==="array"||f==="function"?u.toString():""+u}function ka(u,f){switch(f){case 2:return function(v){return this.fromWireType(We[v>>2])};case 3:return function(v){return this.fromWireType(Ke[v>>3])};default:throw new TypeError("Unknown float type: "+u)}}function Eu(u,f,v){switch(f){case 0:return v?function(w){return me[w]}:function(w){return ae[w]};case 1:return v?function(w){return xe[w>>1]}:function(w){return de[w>>1]};case 2:return v?function(w){return L[w>>2]}:function(w){return Z[w>>2]};default:throw new TypeError("Unknown integer type: "+u)}}var Pu=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Vh=(u,f)=>{for(var v=u>>1,w=v+f/2;!(v>=w)&&de[v];)++v;if(v<<=1,32<v-u&&Pu)return Pu.decode(ae.subarray(u,v));for(v="",w=0;!(w>=f/2);++w){var _=xe[u+2*w>>1];if(_==0)break;v+=String.fromCharCode(_)}return v},zh=(u,f,v)=>{if(v===void 0&&(v=2147483647),2>v)return 0;v-=2;var w=f;v=v<2*u.length?v/2:u.length;for(var _=0;_<v;++_)xe[f>>1]=u.charCodeAt(_),f+=2;return xe[f>>1]=0,f-w},Al=u=>2*u.length,Hh=(u,f)=>{for(var v=0,w="";!(v>=f/4);){var _=L[u+4*v>>2];if(_==0)break;++v,65536<=_?(_-=65536,w+=String.fromCharCode(55296|_>>10,56320|_&1023)):w+=String.fromCharCode(_)}return w},Wh=(u,f,v)=>{if(v===void 0&&(v=2147483647),4>v)return 0;var w=f;v=w+v-4;for(var _=0;_<u.length;++_){var I=u.charCodeAt(_);if(55296<=I&&57343>=I){var U=u.charCodeAt(++_);I=65536+((I&1023)<<10)|U&1023}if(L[f>>2]=I,f+=4,f+4>v)break}return L[f>>2]=0,f-w},$h=u=>{for(var f=0,v=0;v<u.length;++v){var w=u.charCodeAt(v);55296<=w&&57343>=w&&++v,f+=4}return f},qh={};function Ol(u){var f=qh[u];return f===void 0?Pt(u):f}var ps=[];function Gh(u){var f=ps.length;return ps.push(u),f}function Kh(u,f){for(var v=Array(u),w=0;w<u;++w)v[w]=go(Z[f+4*w>>2],"parameter "+w);return v}var Ru=[],Ll=[];function wa(u){u.Dc=u.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")}function Iu(u){u.Ic=u.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance")}var Mu=1,ms=[],tr=[],Ca=[],gs=[],ko=[],Mr=[],Sa=[],Zt=[],Au={};function en(u){vs||(vs=u)}function ki(u){for(var f=Mu++,v=u.length;v<f;v++)u[v]=null;return f}function Yh(u,f){var v=ki(Zt),w={handle:v,attributes:f,version:f.Hc,C:u};return u.canvas&&(u.canvas.Cb=w),Zt[v]=w,(typeof f.Nb>"u"||f.Nb)&&Ou(w),v}function Ta(u){return mr=Zt[u],S.Bc=he=mr&&mr.C,!(u&&!he)}function Ou(u){if(u||(u=mr),!u.Yb){u.Yb=!0;var f=u.C;wa(f),Iu(f),2<=u.version&&(f.eb=f.getExtension("EXT_disjoint_timer_query_webgl2")),(2>u.version||!f.eb)&&(f.eb=f.getExtension("EXT_disjoint_timer_query")),Dl(f),(f.getSupportedExtensions()||[]).forEach(function(v){v.includes("lose_context")||v.includes("debug")||f.getExtension(v)})}}var vs,mr;function Dl(u){u.Kc=u.getExtension("WEBGL_multi_draw")}var wi={},Lu=()=>{if(!Nl){var u={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:N||"./this.program"},f;for(f in wi)wi[f]===void 0?delete u[f]:u[f]=wi[f];var v=[];for(f in u)v.push(`${f}=${u[f]}`);Nl=v}return Nl},Nl,jl=[];function wo(u,f,v,w){for(var _=0;_<u;_++){var I=he[v](),U=I&&ki(w);I?(I.name=U,w[U]=I):en(1282),L[f+4*_>>2]=U}}function Du(u,f){if(f){var v=void 0;switch(u){case 36346:v=1;break;case 36344:return;case 34814:case 36345:v=0;break;case 34466:var w=he.getParameter(34467);v=w?w.length:0;break;case 33309:if(2>mr.version){en(1282);return}v=2*(he.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(2>mr.version){en(1280);return}v=u==33307?3:0}if(v===void 0)switch(w=he.getParameter(u),typeof w){case"number":v=w;break;case"boolean":v=w?1:0;break;case"string":en(1280);return;case"object":if(w===null)switch(u){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:v=0;break;default:en(1280);return}else{if(w instanceof Float32Array||w instanceof Uint32Array||w instanceof Int32Array||w instanceof Array){for(u=0;u<w.length;++u)L[f+4*u>>2]=w[u];return}try{v=w.name|0}catch(_){en(1280),fe("GL_INVALID_ENUM in glGet0v: Unknown object returned from WebGL getParameter("+u+")! (error: "+_+")");return}}break;default:en(1280),fe("GL_INVALID_ENUM in glGet0v: Native code calling glGet0v("+u+") and it returns "+w+" of type "+typeof w+"!");return}L[f>>2]=v}else en(1281)}var Ci=u=>{var f=_t(u)+1,v=_a(f);return v&&Yt(u,ae,v,f),v};function Co(u){return u.slice(-1)=="]"&&u.lastIndexOf("[")}function Nu(u){return u-=5120,u==0?me:u==1?ae:u==2?xe:u==4?L:u==6?We:u==5||u==28922||u==28520||u==30779||u==30782?Z:de}var Vi=u=>u%4===0&&(u%100!==0||u%400===0),ju=[31,29,31,30,31,30,31,31,30,31,30,31],Ul=[31,28,31,30,31,30,31,31,30,31,30,31],Fl=(u,f,v,w)=>{function _(J,pe,Pe){for(J=typeof J=="number"?J.toString():J||"";J.length<pe;)J=Pe[0]+J;return J}function I(J,pe){return _(J,pe,"0")}function U(J,pe){function Pe(Ye){return 0>Ye?-1:0<Ye?1:0}var He;return(He=Pe(J.getFullYear()-pe.getFullYear()))===0&&(He=Pe(J.getMonth()-pe.getMonth()))===0&&(He=Pe(J.getDate()-pe.getDate())),He}function $(J){switch(J.getDay()){case 0:return new Date(J.getFullYear()-1,11,29);case 1:return J;case 2:return new Date(J.getFullYear(),0,3);case 3:return new Date(J.getFullYear(),0,2);case 4:return new Date(J.getFullYear(),0,1);case 5:return new Date(J.getFullYear()-1,11,31);case 6:return new Date(J.getFullYear()-1,11,30)}}function se(J){var pe=J.da;for(J=new Date(new Date(J.ea+1900,0,1).getTime());0<pe;){var Pe=J.getMonth(),He=(Vi(J.getFullYear())?ju:Ul)[Pe];if(pe>He-J.getDate())pe-=He-J.getDate()+1,J.setDate(1),11>Pe?J.setMonth(Pe+1):(J.setMonth(0),J.setFullYear(J.getFullYear()+1));else{J.setDate(J.getDate()+pe);break}}return Pe=new Date(J.getFullYear()+1,0,4),pe=$(new Date(J.getFullYear(),0,4)),Pe=$(Pe),0>=U(pe,J)?0>=U(Pe,J)?J.getFullYear()+1:J.getFullYear():J.getFullYear()-1}var G=L[w+40>>2];w={pc:L[w>>2],oc:L[w+4>>2],Ja:L[w+8>>2],Xa:L[w+12>>2],Ka:L[w+16>>2],ea:L[w+20>>2],R:L[w+24>>2],da:L[w+28>>2],Pc:L[w+32>>2],nc:L[w+36>>2],qc:G&&G?Le(ae,G):""},v=v?Le(ae,v):"",G={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var we in G)v=v.replace(new RegExp(we,"g"),G[we]);var Re="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),Ne="January February March April May June July August September October November December".split(" ");G={"%a":J=>Re[J.R].substring(0,3),"%A":J=>Re[J.R],"%b":J=>Ne[J.Ka].substring(0,3),"%B":J=>Ne[J.Ka],"%C":J=>I((J.ea+1900)/100|0,2),"%d":J=>I(J.Xa,2),"%e":J=>_(J.Xa,2," "),"%g":J=>se(J).toString().substring(2),"%G":J=>se(J),"%H":J=>I(J.Ja,2),"%I":J=>(J=J.Ja,J==0?J=12:12<J&&(J-=12),I(J,2)),"%j":J=>{for(var pe=0,Pe=0;Pe<=J.Ka-1;pe+=(Vi(J.ea+1900)?ju:Ul)[Pe++]);return I(J.Xa+pe,3)},"%m":J=>I(J.Ka+1,2),"%M":J=>I(J.oc,2),"%n":()=>`
160
160
  `,"%p":J=>0<=J.Ja&&12>J.Ja?"AM":"PM","%S":J=>I(J.pc,2),"%t":()=>" ","%u":J=>J.R||7,"%U":J=>I(Math.floor((J.da+7-J.R)/7),2),"%V":J=>{var pe=Math.floor((J.da+7-(J.R+6)%7)/7);if(2>=(J.R+371-J.da-2)%7&&pe++,pe)pe==53&&(Pe=(J.R+371-J.da)%7,Pe==4||Pe==3&&Vi(J.ea)||(pe=1));else{pe=52;var Pe=(J.R+7-J.da-1)%7;(Pe==4||Pe==5&&Vi(J.ea%400-1))&&pe++}return I(pe,2)},"%w":J=>J.R,"%W":J=>I(Math.floor((J.da+7-(J.R+6)%7)/7),2),"%y":J=>(J.ea+1900).toString().substring(2),"%Y":J=>J.ea+1900,"%z":J=>{J=J.nc;var pe=0<=J;return J=Math.abs(J)/60,(pe?"+":"-")+("0000"+(J/60*100+J%60)).slice(-4)},"%Z":J=>J.qc,"%%":()=>"%"},v=v.replace(/%%/g,"\0\0");for(we in G)v.includes(we)&&(v=v.replace(new RegExp(we,"g"),G[we](w)));return v=v.replace(/\0\0/g,"%"),we=Et(v,!1),we.length>f?0:(me.set(we,u),we.length-1)};function xa(u,f,v,w){u||(u=this),this.parent=u,this.U=u.U,this.Da=null,this.id=yu++,this.name=f,this.mode=v,this.l={},this.m={},this.Fa=w}Object.defineProperties(xa.prototype,{read:{get:function(){return(this.mode&365)===365},set:function(u){u?this.mode|=365:this.mode&=-366}},write:{get:function(){return(this.mode&146)===146},set:function(u){u?this.mode|=146:this.mode&=-147}}}),Tl(),Gr=Array(4096),Cl(Ze,"/"),er("/tmp",16895,0),er("/home",16895,0),er("/home/web_user",16895,0),(()=>{er("/dev",16895,0),la(259,{read:()=>0,write:(w,_,I,U)=>U}),ca("/dev/null",259),Pn(1280,rn),Pn(1536,ln),ca("/dev/tty",1280),ca("/dev/tty1",1536);var u=new Uint8Array(1024),f=0,v=()=>(f===0&&(f=ye(u).byteLength),u[--f]);es("random",v),es("urandom",v),er("/dev/shm",16895,0),er("/dev/shm/tmp",16895,0)})(),(()=>{er("/proc",16895,0);var u=er("/proc/self",16895,0);er("/proc/self/fd",16895,0),Cl({U:()=>{var f=bu(u,"fd",16895,73);return f.l={ma:(v,w)=>{var _=Kr(+w);return v={parent:null,U:{mb:"fake"},l:{na:()=>_.path}},v.parent=v}},f}},"/proc/self/fd")})(),Object.assign(ts.prototype,{get(u){return this.M[u]},has(u){return this.M[u]!==void 0},ta(u){var f=this.ib.pop()||this.M.length;return this.M[f]=u,f},Wb(u){this.M[u]=void 0,this.ib.push(u)}}),Pr=S.BindingError=class extends Error{constructor(u){super(u),this.name="BindingError"}},Tn.M.push({value:void 0},{value:null},{value:!0},{value:!1}),Tn.h=Tn.M.length,S.count_emval_handles=function(){for(var u=0,f=Tn.h;f<Tn.M.length;++f)Tn.M[f]!==void 0&&++u;return u},xl=S.PureVirtualError=ma("PureVirtualError");for(var Bl=Array(256),ys=0;256>ys;++ys)Bl[ys]=String.fromCharCode(ys);ga=Bl,S.getInheritedInstanceCount=function(){return Object.keys(Ir).length},S.getLiveInheritedInstances=function(){var u=[],f;for(f in Ir)Ir.hasOwnProperty(f)&&u.push(Ir[f]);return u},S.flushPendingDeletes=rs,S.setDelayFunction=function(u){ht=u,ns.length&&ht&&ht(rs)},vo=S.InternalError=class extends Error{constructor(u){super(u),this.name="InternalError"}},hr.prototype.isAliasOf=function(u){if(!(this instanceof hr&&u instanceof hr))return!1;var f=this.g.u.i,v=this.g.o,w=u.g.u.i;for(u=u.g.o;f.A;)v=f.pa(v),f=f.A;for(;w.A;)u=w.pa(u),w=w.A;return f===w&&v===u},hr.prototype.clone=function(){if(this.g.o||vi(this),this.g.ka)return this.g.count.value+=1,this;var u=yo,f=Object,v=f.create,w=Object.getPrototypeOf(this),_=this.g;return u=u(v.call(f,w,{g:{value:{count:_.count,ia:_.ia,ka:_.ka,o:_.o,u:_.u,H:_.H,L:_.L}}})),u.g.count.value+=1,u.g.ia=!1,u},hr.prototype.delete=function(){this.g.o||vi(this),this.g.ia&&!this.g.ka&&ot("Object already scheduled for deletion"),is(this),ss(this.g),this.g.ka||(this.g.H=void 0,this.g.o=void 0)},hr.prototype.isDeleted=function(){return!this.g.o},hr.prototype.deleteLater=function(){return this.g.o||vi(this),this.g.ia&&!this.g.ka&&ot("Object already scheduled for deletion"),ns.push(this),ns.length===1&&ht&&ht(rs),this.g.ia=!0,this},pr.prototype.Sb=function(u){return this.sb&&(u=this.sb(u)),u},pr.prototype.cb=function(u){this.W&&this.W(u)},pr.prototype.argPackAdvance=8,pr.prototype.readValueFromPointer=ls,pr.prototype.deleteObject=function(u){u!==null&&u.delete()},pr.prototype.fromWireType=function(u){function f(){return this.ya?fr(this.i.N,{u:this.fc,o:v,L:this,H:u}):fr(this.i.N,{u:this,o:u})}var v=this.Sb(u);if(!v)return this.cb(u),null;var w=mi(this.i,v);if(w!==void 0)return w.g.count.value===0?(w.g.o=v,w.g.H=u,w.clone()):(w=w.clone(),this.cb(u),w);if(w=this.i.Rb(v),w=Jr[w],!w)return f.call(this);w=this.xa?w.Jb:w.pointerType;var _=Xr(v,this.i,w.i);return _===null?f.call(this):this.ya?fr(w.i.N,{u:w,o:_,L:this,H:u}):fr(w.i.N,{u:w,o:_})},An=S.UnboundTypeError=ma("UnboundTypeError");for(var he,Vl=0;32>Vl;++Vl)jl.push(Array(Vl));var Uu={__syscall_fcntl64:function(u,f,v){Sn=v;try{var w=Kr(u);switch(f){case 0:var _=Yr();return 0>_?-28:Cu(w,_).X;case 1:case 2:return 0;case 3:return w.flags;case 4:return _=Yr(),w.flags|=_,0;case 5:return _=Yr(),xe[_+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return L[Fu()>>2]=28,-1;default:return-28}}catch(I){if(typeof Er>"u"||I.name!=="ErrnoError")throw I;return-I.aa}},__syscall_ioctl:function(u,f,v){Sn=v;try{var w=Kr(u);switch(f){case 21509:return w.s?0:-59;case 21505:if(!w.s)return-59;if(w.s.V.$b){f=[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 _=Yr();L[_>>2]=25856,L[_+4>>2]=5,L[_+8>>2]=191,L[_+12>>2]=35387;for(var I=0;32>I;I++)me[_+I+17>>0]=f[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(_=Yr(),f=[],I=0;32>I;I++)f.push(me[_+I+17>>0]);return 0;case 21519:return w.s?(_=Yr(),L[_>>2]=0):-59;case 21520:return w.s?-28:-59;case 21531:if(_=Yr(),!w.m.Zb)throw new De(59);return w.m.Zb(w,f,_);case 21523:return w.s?(w.s.V.bc&&(I=[24,80],_=Yr(),xe[_>>1]=I[0],xe[_+2>>1]=I[1]),0):-59;case 21524:return w.s?0:-59;case 21515:return w.s?0:-59;default:return-28}}catch(U){if(typeof Er>"u"||U.name!=="ErrnoError")throw U;return-U.aa}},__syscall_openat:function(u,f,v,w){Sn=w;try{f=f?Le(ae,f):"";var _=f;if(_.charAt(0)==="/")f=_;else{var I=u===-100?"/":Kr(u).path;if(_.length==0)throw new De(44);f=C(I+"/"+_)}var U=w?Yr():0;return ua(f,v,U).X}catch($){if(typeof Er>"u"||$.name!=="ErrnoError")throw $;return-$.aa}},_embind_create_inheriting_constructor:function(u,f,v){u=Pt(u),f=go(f,"wrapper"),v=dr(v);var w=[].slice,_=f.i,I=_.N,U=_.A.N,$=_.A.constructor;u=pa(u,function(){_.A.qb.forEach((function(G){if(this[G]===U[G])throw new xl(`Pure virtual function ${G} 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 G=$.implement.apply(void 0,[this].concat(w.call(arguments)));is(G);var we=G.g;G.notifyOnDestruction(),we.ka=!0,Object.defineProperties(this,{g:{value:we}}),yo(this),G=we.o,G=va(_,G),Ir.hasOwnProperty(G)?ot(`Tried to register registered instance: ${G}`):Ir[G]=this},I.__destruct=function(){this===I&&ot("Pass correct 'this' to __destruct"),is(this);var G=this.g.o;G=va(_,G),Ir.hasOwnProperty(G)?delete Ir[G]:ot(`Tried to unregister unregistered instance: ${G}`)},u.prototype=Object.create(I);for(var se in v)u.prototype[se]=v[se];return Rr(u)},_embind_finalize_value_object:function(u){var f=as[u];delete as[u];var v=f.Va,w=f.W,_=f.fb,I=_.map(U=>U.Vb).concat(_.map(U=>U.kc));In([u],I,U=>{var $={};return _.forEach((se,G)=>{var we=U[G],Re=se.Tb,Ne=se.Ub,J=U[G+_.length],pe=se.jc,Pe=se.lc;$[se.Pb]={read:He=>we.fromWireType(Re(Ne,He)),write:(He,Ye)=>{var nt=[];pe(Pe,He,J.toWireType(nt,Ye)),Zr(nt)}}}),[{name:f.name,fromWireType:function(se){var G={},we;for(we in $)G[we]=$[we].read(se);return w(se),G},toWireType:function(se,G){for(var we in $)if(!(we in G))throw new TypeError(`Missing field: "${we}"`);var Re=v();for(we in $)$[we].write(Re,G[we]);return se!==null&&se.push(w,Re),Re},argPackAdvance:8,readValueFromPointer:ls,K:w}]})},_embind_register_bigint:function(){},_embind_register_bool:function(u,f,v,w,_){var I=ya(v);f=Pt(f),Mn(u,{name:f,fromWireType:function(U){return!!U},toWireType:function(U,$){return $?w:_},argPackAdvance:8,readValueFromPointer:function(U){if(v===1)var $=me;else if(v===2)$=xe;else if(v===4)$=L;else throw new TypeError("Unknown boolean type size: "+f);return this.fromWireType($[U>>I])},K:null})},_embind_register_class:function(u,f,v,w,_,I,U,$,se,G,we,Re,Ne){we=Pt(we),I=cn(_,I),$&&($=cn(U,$)),G&&(G=cn(se,G)),Ne=cn(Re,Ne);var J=Tu(we);Pl(J,function(){On(`Cannot construct ${we} due to unbound types`,[w])}),In([u,f,v],w?[w]:[],function(pe){if(pe=pe[0],w)var Pe=pe.i,He=Pe.N;else He=hr.prototype;pe=pa(J,function(){if(Object.getPrototypeOf(this)!==Ye)throw new Pr("Use 'new' to construct "+we);if(nt.$===void 0)throw new Pr(we+" has no accessible constructor");var Mt=nt.$[arguments.length];if(Mt===void 0)throw new Pr(`Tried to invoke ctor of ${we} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(nt.$).toString()}) parameters instead!`);return Mt.apply(this,arguments)});var Ye=Object.create(He,{constructor:{value:pe}});pe.prototype=Ye;var nt=new Rl(we,pe,Ye,Ne,Pe,I,$,G);nt.A&&(nt.A.qa===void 0&&(nt.A.qa=[]),nt.A.qa.push(nt)),Pe=new pr(we,nt,!0,!1),He=new pr(we+"*",nt,!1,!1);var gt=new pr(we+" const*",nt,!1,!0);return Jr[u]={pointerType:He,Jb:gt},us(J,pe),[Pe,He,gt]})},_embind_register_class_class_function:function(u,f,v,w,_,I,U){var $=bi(v,w);f=Pt(f),I=cn(_,I),In([],[u],function(se){function G(){On(`Cannot call ${we} due to unbound types`,$)}se=se[0];var we=`${se.name}.${f}`;f.startsWith("@@")&&(f=Symbol[f.substring(2)]);var Re=se.i.constructor;return Re[f]===void 0?(G.ha=v-1,Re[f]=G):(El(Re,f,we),Re[f].B[v-1]=G),In([],$,function(Ne){if(Ne=bo(we,[Ne[0],null].concat(Ne.slice(1)),null,I,U),Re[f].B===void 0?(Ne.ha=v-1,Re[f]=Ne):Re[f].B[v-1]=Ne,se.i.qa)for(const J of se.i.qa)J.constructor.hasOwnProperty(f)||(J.constructor[f]=Ne);return[]}),[]})},_embind_register_class_class_property:function(u,f,v,w,_,I,U,$){f=Pt(f),I=cn(_,I),In([],[u],function(se){se=se[0];var G=`${se.name}.${f}`,we={get(){On(`Cannot access ${G} due to unbound types`,[v])},enumerable:!0,configurable:!0};return we.set=$?()=>{On(`Cannot access ${G} due to unbound types`,[v])}:()=>{ot(`${G} is a read-only property`)},Object.defineProperty(se.i.constructor,f,we),In([],[v],function(Re){Re=Re[0];var Ne={get(){return Re.fromWireType(I(w))},enumerable:!0};return $&&($=cn(U,$),Ne.set=J=>{var pe=[];$(w,Re.toWireType(pe,J)),Zr(pe)}),Object.defineProperty(se.i.constructor,f,Ne),[]}),[]})},_embind_register_class_constructor:function(u,f,v,w,_,I){var U=bi(f,v);_=cn(w,_),In([],[u],function($){$=$[0];var se=`constructor ${$.name}`;if($.i.$===void 0&&($.i.$=[]),$.i.$[f-1]!==void 0)throw new Pr(`Cannot register multiple constructors with identical number of parameters (${f-1}) for class '${$.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return $.i.$[f-1]=()=>{On(`Cannot construct ${$.name} due to unbound types`,U)},In([],U,function(G){return G.splice(1,0,null),$.i.$[f-1]=bo(se,G,null,_,I),[]}),[]})},_embind_register_class_function:function(u,f,v,w,_,I,U,$){var se=bi(v,w);f=Pt(f),I=cn(_,I),In([],[u],function(G){function we(){On(`Cannot call ${Re} due to unbound types`,se)}G=G[0];var Re=`${G.name}.${f}`;f.startsWith("@@")&&(f=Symbol[f.substring(2)]),$&&G.i.qb.push(f);var Ne=G.i.N,J=Ne[f];return J===void 0||J.B===void 0&&J.className!==G.name&&J.ha===v-2?(we.ha=v-2,we.className=G.name,Ne[f]=we):(El(Ne,f,Re),Ne[f].B[v-2]=we),In([],se,function(pe){return pe=bo(Re,pe,G,I,U),Ne[f].B===void 0?(pe.ha=v-2,Ne[f]=pe):Ne[f].B[v-2]=pe,[]}),[]})},_embind_register_class_property:function(u,f,v,w,_,I,U,$,se,G){f=Pt(f),_=cn(w,_),In([],[u],function(we){we=we[0];var Re=`${we.name}.${f}`,Ne={get(){On(`Cannot access ${Re} due to unbound types`,[v,U])},enumerable:!0,configurable:!0};return Ne.set=se?()=>{On(`Cannot access ${Re} due to unbound types`,[v,U])}:()=>{ot(Re+" is a read-only property")},Object.defineProperty(we.i.N,f,Ne),In([],se?[v,U]:[v],function(J){var pe=J[0],Pe={get(){var Ye=_u(this,we,Re+" getter");return pe.fromWireType(_(I,Ye))},enumerable:!0};if(se){se=cn($,se);var He=J[1];Pe.set=function(Ye){var nt=_u(this,we,Re+" setter"),gt=[];se(G,nt,He.toWireType(gt,Ye)),Zr(gt)}}return Object.defineProperty(we.i.N,f,Pe),[]}),[]})},_embind_register_emval:function(u,f){f=Pt(f),Mn(u,{name:f,fromWireType:function(v){var w=dr(v);return hs(v),w},toWireType:function(v,w){return Rr(w)},argPackAdvance:8,readValueFromPointer:ls,K:null})},_embind_register_enum:function(u,f,v,w){function _(){}v=ya(v),f=Pt(f),_.values={},Mn(u,{name:f,constructor:_,fromWireType:function(I){return this.constructor.values[I]},toWireType:function(I,U){return U.value},argPackAdvance:8,readValueFromPointer:Ml(f,v,w),K:null}),Pl(f,_)},_embind_register_enum_value:function(u,f,v){var w=go(u,"enum");f=Pt(f),u=w.constructor,w=Object.create(w.constructor.prototype,{value:{value:v},constructor:{value:pa(`${w.name}_${f}`,function(){})}}),u.values[v]=w,u[f]=w},_embind_register_float:function(u,f,v){v=ya(v),f=Pt(f),Mn(u,{name:f,fromWireType:function(w){return w},toWireType:function(w,_){return _},argPackAdvance:8,readValueFromPointer:ka(f,v),K:null})},_embind_register_function:function(u,f,v,w,_,I){var U=bi(f,v);u=Pt(u),_=cn(w,_),Pl(u,function(){On(`Cannot call ${u} due to unbound types`,U)},f-1),In([],U,function($){return us(u,bo(u,[$[0],null].concat($.slice(1)),null,_,I),f-1),[]})},_embind_register_integer:function(u,f,v,w,_){f=Pt(f),_===-1&&(_=4294967295),_=ya(v);var I=$=>$;if(w===0){var U=32-8*v;I=$=>$<<U>>>U}v=f.includes("unsigned")?function($,se){return se>>>0}:function($,se){return se},Mn(u,{name:f,fromWireType:I,toWireType:v,argPackAdvance:8,readValueFromPointer:Eu(f,_,w!==0),K:null})},_embind_register_memory_view:function(u,f,v){function w(I){I>>=2;var U=Z;return new _(U.buffer,U[I+1],U[I])}var _=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][f];v=Pt(v),Mn(u,{name:v,fromWireType:w,argPackAdvance:8,readValueFromPointer:w},{Xb:!0})},_embind_register_std_string:function(u,f){f=Pt(f);var v=f==="std::string";Mn(u,{name:f,fromWireType:function(w){var _=Z[w>>2],I=w+4;if(v)for(var U=I,$=0;$<=_;++$){var se=I+$;if($==_||ae[se]==0){if(U=U?Le(ae,U,se-U):"",G===void 0)var G=U;else G+="\0",G+=U;U=se+1}}else{for(G=Array(_),$=0;$<_;++$)G[$]=String.fromCharCode(ae[I+$]);G=G.join("")}return ei(w),G},toWireType:function(w,_){_ instanceof ArrayBuffer&&(_=new Uint8Array(_));var I=typeof _=="string";I||_ instanceof Uint8Array||_ instanceof Uint8ClampedArray||_ instanceof Int8Array||ot("Cannot pass non-string to std::string");var U=v&&I?_t(_):_.length,$=_a(4+U+1),se=$+4;if(Z[$>>2]=U,v&&I)Yt(_,ae,se,U+1);else if(I)for(I=0;I<U;++I){var G=_.charCodeAt(I);255<G&&(ei(se),ot("String has UTF-16 code units that do not fit in 8 bits")),ae[se+I]=G}else for(I=0;I<U;++I)ae[se+I]=_[I];return w!==null&&w.push(ei,$),$},argPackAdvance:8,readValueFromPointer:ls,K:function(w){ei(w)}})},_embind_register_std_wstring:function(u,f,v){if(v=Pt(v),f===2)var w=Vh,_=zh,I=Al,U=()=>de,$=1;else f===4&&(w=Hh,_=Wh,I=$h,U=()=>Z,$=2);Mn(u,{name:v,fromWireType:function(se){for(var G=Z[se>>2],we=U(),Re,Ne=se+4,J=0;J<=G;++J){var pe=se+4+J*f;(J==G||we[pe>>$]==0)&&(Ne=w(Ne,pe-Ne),Re===void 0?Re=Ne:(Re+="\0",Re+=Ne),Ne=pe+f)}return ei(se),Re},toWireType:function(se,G){typeof G!="string"&&ot(`Cannot pass non-string to C++ string type ${v}`);var we=I(G),Re=_a(4+we+f);return Z[Re>>2]=we>>$,_(G,Re+4,we+f),se!==null&&se.push(ei,Re),Re},argPackAdvance:8,readValueFromPointer:ls,K:function(se){ei(se)}})},_embind_register_value_object:function(u,f,v,w,_,I){as[u]={name:Pt(f),Va:cn(v,w),W:cn(_,I),fb:[]}},_embind_register_value_object_field:function(u,f,v,w,_,I,U,$,se,G){as[u].fb.push({Pb:Pt(f),Vb:v,Tb:cn(w,_),Ub:I,kc:U,jc:cn($,se),lc:G})},_embind_register_void:function(u,f){f=Pt(f),Mn(u,{cc:!0,name:f,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},_emscripten_get_now_is_monotonic:()=>!0,_emval_as:function(u,f,v){u=dr(u),f=go(f,"emval::as");var w=[],_=Rr(w);return Z[v>>2]=_,f.toWireType(w,u)},_emval_call_method:function(u,f,v,w,_){u=ps[u],f=dr(f),v=Ol(v);var I=[];return Z[w>>2]=Rr(I),u(f,v,I,_)},_emval_call_void_method:function(u,f,v,w){u=ps[u],f=dr(f),v=Ol(v),u(f,v,null,w)},_emval_decref:hs,_emval_get_method_caller:function(u,f){var v=Kh(u,f),w=v[0];f=w.name+"_$"+v.slice(1).map(function(U){return U.name}).join("_")+"$";var _=Ru[f];if(_!==void 0)return _;var I=Array(u-1);return _=Gh((U,$,se,G)=>{for(var we=0,Re=0;Re<u-1;++Re)I[Re]=v[Re+1].readValueFromPointer(G+we),we+=v[Re+1].argPackAdvance;for(U=U[$].apply(U,I),Re=0;Re<u-1;++Re)v[Re+1].Lb&&v[Re+1].Lb(I[Re]);if(!w.cc)return w.toWireType(se,U)}),Ru[f]=_},_emval_get_property:function(u,f){return u=dr(u),f=dr(f),Rr(u[f])},_emval_incref:function(u){4<u&&(Tn.get(u).ub+=1)},_emval_new_array:function(){return Rr([])},_emval_new_cstring:function(u){return Rr(Ol(u))},_emval_new_object:function(){return Rr({})},_emval_run_destructors:function(u){var f=dr(u);Zr(f),hs(u)},_emval_set_property:function(u,f,v){u=dr(u),f=dr(f),v=dr(v),u[f]=v},_emval_take_value:function(u,f){return u=go(u,"_emval_take_value"),u=u.readValueFromPointer(f),Rr(u)},abort:()=>{kn("")},beginPixelLocalStorageWEBGL:function(u,f,v){(u=Zt[u].C.ca)&&u.beginPixelLocalStorageWEBGL(S.HEAPU32.subarray(v,v+f))},decode_image:function(u,f,v){var w=S.images;w||(w=new Map,S.images=w);var _=new Image;w.set(u,_),f=S.HEAP8.subarray(f,f+v),v=new Uint8Array(v),v.set(f),_.src=URL.createObjectURL(new Blob([v],{type:"image/png"})),_.onload=function(){S._setWebImage(u,_.width,_.height)}},delete_image:function(u){var f=S.images;f&&f.get(u)&&f.delete(u)},emscripten_asm_const_int:(u,f,v)=>{Ll.length=0;var w;for(v>>=2;w=ae[f++];)v+=w!=105&v,Ll.push(w==105?L[v]:Ke[v++>>1]),++v;return oa[u].apply(null,Ll)},emscripten_date_now:function(){return Date.now()},emscripten_get_now:()=>performance.now(),emscripten_memcpy_big:(u,f,v)=>ae.copyWithin(u,f,f+v),emscripten_resize_heap:u=>{var f=ae.length;if(u>>>=0,2147483648<u)return!1;for(var v=1;4>=v;v*=2){var w=f*(1+.2/v);w=Math.min(w,u+100663296);var _=Math;w=Math.max(u,w);e:{_=_.min.call(_,2147483648,w+(65536-w%65536)%65536)-Ge.buffer.byteLength+65535>>>16;try{Ge.grow(_),et();var I=1;break e}catch{}I=void 0}if(I)return!0}return!1},emscripten_webgl_enable_extension:function(u,f){return u=Zt[u],f=f?Le(ae,f):"",f.startsWith("GL_")&&(f=f.substr(3)),f=="WEBGL_draw_instanced_base_vertex_base_instance"&&wa(he),f=="WEBGL_multi_draw_instanced_base_vertex_base_instance"&&Iu(he),f=="WEBGL_multi_draw"&&Dl(he),!!u.C.getExtension(f)},emscripten_webgl_get_current_context:function(){return mr?mr.handle:0},emscripten_webgl_make_context_current:function(u){return Ta(u)?0:-5},enable_WEBGL_provoking_vertex:function(u){return u=Zt[u].C,u.rb=u.getExtension("WEBGL_provoking_vertex"),!!u.rb},enable_WEBGL_shader_pixel_local_storage_coherent:function(u){return u=Zt[u].C,u.ca=u.getExtension("WEBGL_shader_pixel_local_storage"),!(!u.ca||!u.ca.isCoherent())},endPixelLocalStorageWEBGL:function(u,f,v){(u=Zt[u].C.ca)&&u.endPixelLocalStorageWEBGL(S.HEAPU32.subarray(v,v+f))},environ_get:(u,f)=>{var v=0;return Lu().forEach(function(w,_){var I=f+v;for(_=Z[u+4*_>>2]=I,I=0;I<w.length;++I)me[_++>>0]=w.charCodeAt(I);me[_>>0]=0,v+=w.length+1}),0},environ_sizes_get:(u,f)=>{var v=Lu();Z[u>>2]=v.length;var w=0;return v.forEach(function(_){w+=_.length+1}),Z[f>>2]=w,0},fd_close:function(u){try{var f=Kr(u);if(f.X===null)throw new De(8);f.Sa&&(f.Sa=null);try{f.m.close&&f.m.close(f)}catch(v){throw v}finally{$n[f.X]=null}return f.X=null,0}catch(v){if(typeof Er>"u"||v.name!=="ErrnoError")throw v;return v.aa}},fd_read:function(u,f,v,w){try{e:{var _=Kr(u);u=f;for(var I,U=f=0;U<v;U++){var $=Z[u>>2],se=Z[u+4>>2];u+=8;var G=_,we=$,Re=se,Ne=I,J=me;if(0>Re||0>Ne)throw new De(28);if(G.X===null)throw new De(8);if((G.flags&2097155)===1)throw new De(8);if((G.node.mode&61440)===16384)throw new De(31);if(!G.m.read)throw new De(28);var pe=typeof Ne<"u";if(!pe)Ne=G.position;else if(!G.seekable)throw new De(70);var Pe=G.m.read(G,J,we,Re,Ne);pe||(G.position+=Pe);var He=Pe;if(0>He){var Ye=-1;break e}if(f+=He,He<se)break;typeof I<"u"&&(I+=He)}Ye=f}return Z[w>>2]=Ye,0}catch(nt){if(typeof Er>"u"||nt.name!=="ErrnoError")throw nt;return nt.aa}},fd_seek:function(u,f,v,w,_){f=v+2097152>>>0<4194305-!!f?(f>>>0)+4294967296*v:NaN;try{if(isNaN(f))return 61;var I=Kr(u);return da(I,f,w),Ni=[I.position>>>0,(zn=I.position,1<=+Math.abs(zn)?0<zn?+Math.floor(zn/4294967296)>>>0:~~+Math.ceil((zn-+(~~zn>>>0))/4294967296)>>>0:0)],L[_>>2]=Ni[0],L[_+4>>2]=Ni[1],I.Sa&&f===0&&w===0&&(I.Sa=null),0}catch(U){if(typeof Er>"u"||U.name!=="ErrnoError")throw U;return U.aa}},fd_write:function(u,f,v,w){try{e:{var _=Kr(u);u=f;for(var I,U=f=0;U<v;U++){var $=Z[u>>2],se=Z[u+4>>2];u+=8;var G=_,we=$,Re=se,Ne=I,J=me;if(0>Re||0>Ne)throw new De(28);if(G.X===null)throw new De(8);if((G.flags&2097155)===0)throw new De(8);if((G.node.mode&61440)===16384)throw new De(31);if(!G.m.write)throw new De(28);G.seekable&&G.flags&1024&&da(G,0,2);var pe=typeof Ne<"u";if(!pe)Ne=G.position;else if(!G.seekable)throw new De(70);var Pe=G.m.write(G,J,we,Re,Ne,void 0);pe||(G.position+=Pe);var He=Pe;if(0>He){var Ye=-1;break e}f+=He,typeof I<"u"&&(I+=He)}Ye=f}return Z[w>>2]=Ye,0}catch(nt){if(typeof Er>"u"||nt.name!=="ErrnoError")throw nt;return nt.aa}},framebufferPixelLocalClearValuefvWEBGL:function(u,f,v,w,_,I){(u=Zt[u].C.ca)&&u.framebufferPixelLocalClearValuefvWEBGL(f,[v,w,_,I])},framebufferTexturePixelLocalStorageWEBGL:function(u,f,v,w,_){(u=Zt[u].C.ca)&&u.framebufferTexturePixelLocalStorageWEBGL(f,ko[v],w,_)},getFramebufferPixelLocalStorageParameterivWEBGL:function(u,f,v){return(u=Zt[u].C.ca)?u.getFramebufferPixelLocalStorageParameterWEBGL(f,v):0},glActiveTexture:function(u){he.activeTexture(u)},glAttachShader:function(u,f){he.attachShader(tr[u],Mr[f])},glBindBuffer:function(u,f){u==35051?he.Pa=f:u==35052&&(he.Qa=f),he.bindBuffer(u,ms[f])},glBindBufferRange:function(u,f,v,w,_){he.bindBufferRange(u,f,ms[v],w,_)},glBindFramebuffer:function(u,f){he.bindFramebuffer(u,Ca[f])},glBindRenderbuffer:function(u,f){he.bindRenderbuffer(u,gs[f])},glBindTexture:function(u,f){he.bindTexture(u,ko[f])},glBindVertexArray:function(u){he.bindVertexArray(Sa[u])},glBlendEquation:function(u){he.blendEquation(u)},glBlendFunc:function(u,f){he.blendFunc(u,f)},glBlitFramebuffer:function(u,f,v,w,_,I,U,$,se,G){he.blitFramebuffer(u,f,v,w,_,I,U,$,se,G)},glBufferData:function(u,f,v,w){v&&f?he.bufferData(u,ae,w,v,f):he.bufferData(u,f,w)},glBufferSubData:function(u,f,v,w){v&&he.bufferSubData(u,f,ae,w,v)},glClear:function(u){he.clear(u)},glClearBufferfv:function(u,f,v){he.clearBufferfv(u,f,We,v>>2)},glClearBufferuiv:function(u,f,v){he.clearBufferuiv(u,f,Z,v>>2)},glClearColor:function(u,f,v,w){he.clearColor(u,f,v,w)},glClearDepthf:function(u){he.clearDepth(u)},glClearStencil:function(u){he.clearStencil(u)},glColorMask:function(u,f,v,w){he.colorMask(!!u,!!f,!!v,!!w)},glCompileShader:function(u){he.compileShader(Mr[u])},glCreateProgram:function(){var u=ki(tr),f=he.createProgram();return f.name=u,f.Ba=f.za=f.Aa=0,f.Ya=1,tr[u]=f,u},glCreateShader:function(u){var f=ki(Mr);return Mr[f]=he.createShader(u),f},glCullFace:function(u){he.cullFace(u)},glDeleteBuffers:function(u,f){for(var v=0;v<u;v++){var w=L[f+4*v>>2],_=ms[w];_&&(he.deleteBuffer(_),_.name=0,ms[w]=null,w==he.Pa&&(he.Pa=0),w==he.Qa&&(he.Qa=0))}},glDeleteFramebuffers:function(u,f){for(var v=0;v<u;++v){var w=L[f+4*v>>2],_=Ca[w];_&&(he.deleteFramebuffer(_),_.name=0,Ca[w]=null)}},glDeleteProgram:function(u){if(u){var f=tr[u];f?(he.deleteProgram(f),f.name=0,tr[u]=null):en(1281)}},glDeleteRenderbuffers:function(u,f){for(var v=0;v<u;v++){var w=L[f+4*v>>2],_=gs[w];_&&(he.deleteRenderbuffer(_),_.name=0,gs[w]=null)}},glDeleteShader:function(u){if(u){var f=Mr[u];f?(he.deleteShader(f),Mr[u]=null):en(1281)}},glDeleteTextures:function(u,f){for(var v=0;v<u;v++){var w=L[f+4*v>>2],_=ko[w];_&&(he.deleteTexture(_),_.name=0,ko[w]=null)}},glDeleteVertexArrays:function(u,f){for(var v=0;v<u;v++){var w=L[f+4*v>>2];he.deleteVertexArray(Sa[w]),Sa[w]=null}},glDepthFunc:function(u){he.depthFunc(u)},glDepthMask:function(u){he.depthMask(!!u)},glDepthRangef:function(u,f){he.depthRange(u,f)},glDisable:function(u){he.disable(u)},glDrawArrays:function(u,f,v){he.drawArrays(u,f,v)},glDrawArraysInstanced:function(u,f,v,w){he.drawArraysInstanced(u,f,v,w)},glDrawBuffers:function(u,f){for(var v=jl[u],w=0;w<u;w++)v[w]=L[f+4*w>>2];he.drawBuffers(v)},glDrawElements:function(u,f,v,w){he.drawElements(u,f,v,w)},glDrawElementsInstanced:function(u,f,v,w,_){he.drawElementsInstanced(u,f,v,w,_)},glEnable:function(u){he.enable(u)},glEnableVertexAttribArray:function(u){he.enableVertexAttribArray(u)},glFlush:function(){he.flush()},glFramebufferRenderbuffer:function(u,f,v,w){he.framebufferRenderbuffer(u,f,v,gs[w])},glFramebufferTexture2D:function(u,f,v,w,_){he.framebufferTexture2D(u,f,v,ko[w],_)},glFrontFace:function(u){he.frontFace(u)},glGenBuffers:function(u,f){wo(u,f,"createBuffer",ms)},glGenFramebuffers:function(u,f){wo(u,f,"createFramebuffer",Ca)},glGenRenderbuffers:function(u,f){wo(u,f,"createRenderbuffer",gs)},glGenTextures:function(u,f){wo(u,f,"createTexture",ko)},glGenVertexArrays:function(u,f){wo(u,f,"createVertexArray",Sa)},glGenerateMipmap:function(u){he.generateMipmap(u)},glGetError:function(){var u=he.getError()||vs;return vs=0,u},glGetIntegerv:function(u,f){Du(u,f)},glGetProgramiv:function(u,f,v){if(v)if(u>=Mu)en(1281);else if(u=tr[u],f==35716)u=he.getProgramInfoLog(u),u===null&&(u="(unknown error)"),L[v>>2]=u.length+1;else if(f==35719){if(!u.Ba)for(f=0;f<he.getProgramParameter(u,35718);++f)u.Ba=Math.max(u.Ba,he.getActiveUniform(u,f).name.length+1);L[v>>2]=u.Ba}else if(f==35722){if(!u.za)for(f=0;f<he.getProgramParameter(u,35721);++f)u.za=Math.max(u.za,he.getActiveAttrib(u,f).name.length+1);L[v>>2]=u.za}else if(f==35381){if(!u.Aa)for(f=0;f<he.getProgramParameter(u,35382);++f)u.Aa=Math.max(u.Aa,he.getActiveUniformBlockName(u,f).length+1);L[v>>2]=u.Aa}else L[v>>2]=he.getProgramParameter(u,f);else en(1281)},glGetShaderiv:function(u,f,v){v?f==35716?(u=he.getShaderInfoLog(Mr[u]),u===null&&(u="(unknown error)"),L[v>>2]=u?u.length+1:0):f==35720?(u=he.getShaderSource(Mr[u]),L[v>>2]=u?u.length+1:0):L[v>>2]=he.getShaderParameter(Mr[u],f):en(1281)},glGetString:function(u){var f=Au[u];if(!f){switch(u){case 7939:f=he.getSupportedExtensions()||[],f=f.concat(f.map(function(w){return"GL_"+w})),f=Ci(f.join(" "));break;case 7936:case 7937:case 37445:case 37446:(f=he.getParameter(u))||en(1280),f=f&&Ci(f);break;case 7938:f=Ci("OpenGL ES 3.0 ("+he.getParameter(7938)+")");break;case 35724:f=he.getParameter(35724);var v=f.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);v!==null&&(v[1].length==3&&(v[1]+="0"),f="OpenGL ES GLSL ES "+v[1]+" ("+f+")"),f=Ci(f);break;default:en(1280)}Au[u]=f}return f},glGetUniformBlockIndex:function(u,f){return he.getUniformBlockIndex(tr[u],f?Le(ae,f):"")},glGetUniformLocation:function(u,f){if(f=f?Le(ae,f):"",u=tr[u]){var v=u,w=v.oa,_=v.zb,I;if(!w)for(v.oa=w={},v.yb={},I=0;I<he.getProgramParameter(v,35718);++I){var U=he.getActiveUniform(v,I),$=U.name;U=U.size;var se=Co($);se=0<se?$.slice(0,se):$;var G=v.Ya;for(v.Ya+=U,_[se]=[U,G],$=0;$<U;++$)w[G]=$,v.yb[G++]=se}if(v=u.oa,w=0,_=f,I=Co(f),0<I&&(w=parseInt(f.slice(I+1))>>>0,_=f.slice(0,I)),(_=u.zb[_])&&w<_[0]&&(w+=_[1],v[w]=v[w]||he.getUniformLocation(u,f)))return w}else en(1281);return-1},glInvalidateFramebuffer:function(u,f,v){for(var w=jl[f],_=0;_<f;_++)w[_]=L[v+4*_>>2];he.invalidateFramebuffer(u,w)},glLinkProgram:function(u){u=tr[u],he.linkProgram(u),u.oa=0,u.zb={}},glPixelStorei:function(u,f){he.pixelStorei(u,f)},glReadPixels:function(u,f,v,w,_,I,U){if(he.Pa)he.readPixels(u,f,v,w,_,I,U);else{var $=Nu(I);he.readPixels(u,f,v,w,_,I,$,U>>31-Math.clz32($.BYTES_PER_ELEMENT))}},glRenderbufferStorageMultisample:function(u,f,v,w,_){he.renderbufferStorageMultisample(u,f,v,w,_)},glScissor:function(u,f,v,w){he.scissor(u,f,v,w)},glShaderSource:function(u,f,v,w){for(var _="",I=0;I<f;++I){var U=w?L[w+4*I>>2]:-1,$=L[v+4*I>>2];U=$?Le(ae,$,0>U?void 0:U):"",_+=U}he.shaderSource(Mr[u],_)},glStencilFunc:function(u,f,v){he.stencilFunc(u,f,v)},glStencilFuncSeparate:function(u,f,v,w){he.stencilFuncSeparate(u,f,v,w)},glStencilMask:function(u){he.stencilMask(u)},glStencilOp:function(u,f,v){he.stencilOp(u,f,v)},glStencilOpSeparate:function(u,f,v,w){he.stencilOpSeparate(u,f,v,w)},glTexParameteri:function(u,f,v){he.texParameteri(u,f,v)},glTexStorage2D:function(u,f,v,w,_){he.texStorage2D(u,f,v,w,_)},glTexSubImage2D:function(u,f,v,w,_,I,U,$,se){if(he.Qa)he.texSubImage2D(u,f,v,w,_,I,U,$,se);else if(se){var G=Nu($);he.texSubImage2D(u,f,v,w,_,I,U,$,G,se>>31-Math.clz32(G.BYTES_PER_ELEMENT))}else he.texSubImage2D(u,f,v,w,_,I,U,$,null)},glUniform1i:function(u,f){var v=he,w=v.uniform1i,_=he.Kb;if(_){var I=_.oa[u];typeof I=="number"&&(_.oa[u]=I=he.getUniformLocation(_,_.yb[u]+(0<I?"["+I+"]":""))),u=I}else en(1282),u=void 0;w.call(v,u,f)},glUniformBlockBinding:function(u,f,v){u=tr[u],he.uniformBlockBinding(u,f,v)},glUseProgram:function(u){u=tr[u],he.useProgram(u),he.Kb=u},glVertexAttribDivisor:function(u,f){he.vertexAttribDivisor(u,f)},glVertexAttribIPointer:function(u,f,v,w,_){he.vertexAttribIPointer(u,f,v,w,_)},glVertexAttribPointer:function(u,f,v,w,_,I){he.vertexAttribPointer(u,f,v,!!w,_,I)},glViewport:function(u,f,v,w){he.viewport(u,f,v,w)},provokingVertexWEBGL:function(u,f){(u=Zt[u].C.rb)&&u.provokingVertexWEBGL(f)},strftime_l:(u,f,v,w)=>Fl(u,f,v,w),upload_image:function(u,f){var v=S.images;v&&(f=v.get(f))&&(u=Zt[u].C,u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,f),u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1))}};(function(){function u(v){if(re=v=v.exports,Ge=re.memory,et(),Be=re.__indirect_function_table,$e.unshift(re.__wasm_call_ctors),Kt--,S.monitorRunDependencies&&S.monitorRunDependencies(Kt),Kt==0&&Zn){var w=Zn;Zn=null,w()}return v}var f={env:Uu,wasi_snapshot_preview1:Uu};if(Kt++,S.monitorRunDependencies&&S.monitorRunDependencies(Kt),S.instantiateWasm)try{return S.instantiateWasm(f,u)}catch(v){fe("Module.instantiateWasm callback failed with error: "+v),M(v)}return Di(f,function(v){u(v.instance)}).catch(M),{}})();var ei=u=>(ei=re.free)(u),_a=u=>(_a=re.malloc)(u);S._setWebImage=(u,f,v)=>(S._setWebImage=re.setWebImage)(u,f,v);var Fu=()=>(Fu=re.__errno_location)(),nr=S._ma_device__on_notification_unlocked=u=>(nr=S._ma_device__on_notification_unlocked=re.ma_device__on_notification_unlocked)(u);S._ma_malloc_emscripten=(u,f)=>(S._ma_malloc_emscripten=re.ma_malloc_emscripten)(u,f),S._ma_free_emscripten=(u,f)=>(S._ma_free_emscripten=re.ma_free_emscripten)(u,f);var So=S._ma_device_process_pcm_frames_capture__webaudio=(u,f,v)=>(So=S._ma_device_process_pcm_frames_capture__webaudio=re.ma_device_process_pcm_frames_capture__webaudio)(u,f,v),zl=S._ma_device_process_pcm_frames_playback__webaudio=(u,f,v)=>(zl=S._ma_device_process_pcm_frames_playback__webaudio=re.ma_device_process_pcm_frames_playback__webaudio)(u,f,v),Hl=u=>(Hl=re.__getTypeName)(u);S.__embind_initialize_bindings=()=>(S.__embind_initialize_bindings=re._embind_initialize_bindings)(),S.dynCall_iiiji=(u,f,v,w,_,I)=>(S.dynCall_iiiji=re.dynCall_iiiji)(u,f,v,w,_,I),S.dynCall_iij=(u,f,v,w)=>(S.dynCall_iij=re.dynCall_iij)(u,f,v,w),S.dynCall_iiji=(u,f,v,w,_)=>(S.dynCall_iiji=re.dynCall_iiji)(u,f,v,w,_),S.dynCall_jii=(u,f,v)=>(S.dynCall_jii=re.dynCall_jii)(u,f,v),S.dynCall_vijj=(u,f,v,w,_,I)=>(S.dynCall_vijj=re.dynCall_vijj)(u,f,v,w,_,I),S.dynCall_jiji=(u,f,v,w,_)=>(S.dynCall_jiji=re.dynCall_jiji)(u,f,v,w,_),S.dynCall_viijii=(u,f,v,w,_,I,U)=>(S.dynCall_viijii=re.dynCall_viijii)(u,f,v,w,_,I,U),S.dynCall_iiiiij=(u,f,v,w,_,I,U)=>(S.dynCall_iiiiij=re.dynCall_iiiiij)(u,f,v,w,_,I,U),S.dynCall_iiiiijj=(u,f,v,w,_,I,U,$,se)=>(S.dynCall_iiiiijj=re.dynCall_iiiiijj)(u,f,v,w,_,I,U,$,se),S.dynCall_iiiiiijj=(u,f,v,w,_,I,U,$,se,G)=>(S.dynCall_iiiiiijj=re.dynCall_iiiiiijj)(u,f,v,w,_,I,U,$,se,G),S.___start_em_js=531476,S.___stop_em_js=534231;var bs;Zn=function u(){bs||Wl(),bs||(Zn=u)};function Wl(){function u(){if(!bs&&(bs=!0,S.calledRun=!0,!Ie)){if(S.noFSInit||Zo||(Zo=!0,Tl(),S.stdin=S.stdin,S.stdout=S.stdout,S.stderr=S.stderr,S.stdin?es("stdin",S.stdin):Sl("/dev/tty","/dev/stdin"),S.stdout?es("stdout",null,S.stdout):Sl("/dev/tty","/dev/stdout"),S.stderr?es("stderr",null,S.stderr):Sl("/dev/tty1","/dev/stderr"),ua("/dev/stdin",0),ua("/dev/stdout",1),ua("/dev/stderr",1)),sa=!1,P($e),O(S),S.onRuntimeInitialized&&S.onRuntimeInitialized(),S.postRun)for(typeof S.postRun=="function"&&(S.postRun=[S.postRun]);S.postRun.length;){var f=S.postRun.shift();ut.unshift(f)}P(ut)}}if(!(0<Kt)){if(S.preRun)for(typeof S.preRun=="function"&&(S.preRun=[S.preRun]);S.preRun.length;)Ot();P(tt),0<Kt||(S.setStatus?(S.setStatus("Running..."),setTimeout(function(){setTimeout(function(){S.setStatus("")},1),u()},1)):u())}}if(S.preInit)for(typeof S.preInit=="function"&&(S.preInit=[S.preInit]);0<S.preInit.length;)S.preInit.pop()();return Wl(),x.ready}})();const g=m},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,d,h)=>{h.r(d),h.d(d,{Animation:()=>m.Animation});var m=h(4)},(l,d,h)=>{h.r(d),h.d(d,{Animation:()=>m});var m=function(){function g(T,x,S,O){this.animation=T,this.artboard=x,this.playing=O,this.loopCount=0,this.scrubTo=null,this.instance=new S.LinearAnimationInstance(T,x)}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(T){this.instance.time=T},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(T){this.scrubTo===null?this.instance.advance(T):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},g.prototype.apply=function(T){this.instance.apply(T)},g.prototype.cleanup=function(){this.instance.delete()},g}()},(l,d,h)=>{h.r(d),h.d(d,{AudioAssetWrapper:()=>T.AudioAssetWrapper,AudioWrapper:()=>T.AudioWrapper,BLANK_URL:()=>g.BLANK_URL,CustomFileAssetLoaderWrapper:()=>T.CustomFileAssetLoaderWrapper,FileAssetWrapper:()=>T.FileAssetWrapper,FileFinalizer:()=>T.FileFinalizer,FontAssetWrapper:()=>T.FontAssetWrapper,FontWrapper:()=>T.FontWrapper,ImageAssetWrapper:()=>T.ImageAssetWrapper,ImageWrapper:()=>T.ImageWrapper,createFinalization:()=>T.createFinalization,finalizationRegistry:()=>T.finalizationRegistry,registerTouchInteractions:()=>m.registerTouchInteractions,sanitizeUrl:()=>g.sanitizeUrl});var m=h(6),g=h(7),T=h(8)},(l,d,h)=>{h.r(d),h.d(d,{registerTouchInteractions:()=>T});var m=void 0,g=function(x,S){var O,M;return["touchstart","touchmove"].indexOf(x.type)>-1&&(!((O=x.touches)===null||O===void 0)&&O.length)?(S||x.preventDefault(),{clientX:x.touches[0].clientX,clientY:x.touches[0].clientY}):x.type==="touchend"&&(!((M=x.changedTouches)===null||M===void 0)&&M.length)?{clientX:x.changedTouches[0].clientX,clientY:x.changedTouches[0].clientY}:{clientX:x.clientX,clientY:x.clientY}},T=function(x){var S=x.canvas,O=x.artboard,M=x.stateMachines,z=M===void 0?[]:M,H=x.renderer,ce=x.rive,V=x.fit,j=x.alignment,N=x.isTouchScrollEnabled,K=N===void 0?!1:N,ie=x.layoutScaleFactor,X=ie===void 0?1:ie;if(!S||!z.length||!H||!ce||!O||typeof window>"u")return null;var Q=null,te=!1,ne=function(Ae){if(te&&Ae instanceof MouseEvent){Ae.type=="mouseup"&&(te=!1);return}te=K&&Ae.type==="touchend"&&Q==="touchstart",Q=Ae.type;var Ge=Ae.currentTarget.getBoundingClientRect(),re=g(Ae,K),Ie=re.clientX,me=re.clientY;if(!(!Ie&&!me)){var ae=Ie-Ge.left,xe=me-Ge.top,de=ce.computeAlignment(V,j,{minX:0,minY:0,maxX:Ge.width,maxY:Ge.height},O.bounds,X),L=new ce.Mat2D;de.invert(L);var Z=new ce.Vec2D(ae,xe),We=ce.mapXY(L,Z),Ke=We.x(),et=We.y();switch(We.delete(),L.delete(),Z.delete(),de.delete(),Ae.type){case"mouseout":for(var Be=0,tt=z;Be<tt.length;Be++){var $e=tt[Be];$e.pointerMove(Ke,et)}break;case"touchmove":case"mouseover":case"mousemove":{for(var ut=0,Ot=z;ut<Ot.length;ut++){var $e=Ot[ut];$e.pointerMove(Ke,et)}break}case"touchstart":case"mousedown":{for(var Kt=0,Zn=z;Kt<Zn.length;Kt++){var $e=Zn[Kt];$e.pointerDown(Ke,et)}break}case"touchend":case"mouseup":{for(var kn=0,Sr=z;kn<Sr.length;kn++){var $e=Sr[kn];$e.pointerUp(Ke,et)}break}}}},fe=ne.bind(m);return S.addEventListener("mouseover",fe),S.addEventListener("mouseout",fe),S.addEventListener("mousemove",fe),S.addEventListener("mousedown",fe),S.addEventListener("mouseup",fe),S.addEventListener("touchmove",fe,{passive:K}),S.addEventListener("touchstart",fe,{passive:K}),S.addEventListener("touchend",fe),function(){S.removeEventListener("mouseover",fe),S.removeEventListener("mouseout",fe),S.removeEventListener("mousemove",fe),S.removeEventListener("mousedown",fe),S.removeEventListener("mouseup",fe),S.removeEventListener("touchmove",fe),S.removeEventListener("touchstart",fe),S.removeEventListener("touchend",fe)}}},(l,d,h)=>{h.r(d),h.d(d,{BLANK_URL:()=>M,sanitizeUrl:()=>ce});var m=/^([^\w]*)(javascript|data|vbscript)/im,g=/&#(\w+)(^\w|;)?/g,T=/&(newline|tab);/gi,x=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,S=/^.+(:|&colon;)/gim,O=[".","/"],M="about:blank";function z(V){return O.indexOf(V[0])>-1}function H(V){var j=V.replace(x,"");return j.replace(g,function(N,K){return String.fromCharCode(K)})}function ce(V){if(!V)return M;var j=H(V).replace(T,"").replace(x,"").trim();if(!j)return M;if(z(j))return j;var N=j.match(S);if(!N)return j;var K=N[0];return m.test(K)?M:j}},(l,d,h)=>{h.r(d),h.d(d,{AudioAssetWrapper:()=>V,AudioWrapper:()=>O,CustomFileAssetLoaderWrapper:()=>z,FileAssetWrapper:()=>H,FileFinalizer:()=>g,FontAssetWrapper:()=>j,FontWrapper:()=>M,ImageAssetWrapper:()=>ce,ImageWrapper:()=>S,createFinalization:()=>X,finalizationRegistry:()=>ie});var m=function(){var Q=function(te,ne){return Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,Ae){fe.__proto__=Ae}||function(fe,Ae){for(var Ge in Ae)Object.prototype.hasOwnProperty.call(Ae,Ge)&&(fe[Ge]=Ae[Ge])},Q(te,ne)};return function(te,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Class extends value "+String(ne)+" is not a constructor or null");Q(te,ne);function fe(){this.constructor=te}te.prototype=ne===null?Object.create(ne):(fe.prototype=ne.prototype,new fe)}}(),g=function(){function Q(te){this.selfUnref=!1,this._file=te}return Q.prototype.unref=function(){this._file&&this._file.unref()},Q}(),T=function(){function Q(te){this._finalizableObject=te}return Q.prototype.unref=function(){this._finalizableObject.unref()},Q}(),x=function(){function Q(){this.selfUnref=!1}return Q.prototype.unref=function(){},Q}(),S=function(Q){m(te,Q);function te(ne){var fe=Q.call(this)||this;return fe._nativeImage=ne,fe}return Object.defineProperty(te.prototype,"nativeImage",{get:function(){return this._nativeImage},enumerable:!1,configurable:!0}),te.prototype.unref=function(){this.selfUnref&&this._nativeImage.unref()},te}(x),O=function(Q){m(te,Q);function te(ne){var fe=Q.call(this)||this;return fe._nativeAudio=ne,fe}return Object.defineProperty(te.prototype,"nativeAudio",{get:function(){return this._nativeAudio},enumerable:!1,configurable:!0}),te.prototype.unref=function(){this.selfUnref&&this._nativeAudio.unref()},te}(x),M=function(Q){m(te,Q);function te(ne){var fe=Q.call(this)||this;return fe._nativeFont=ne,fe}return Object.defineProperty(te.prototype,"nativeFont",{get:function(){return this._nativeFont},enumerable:!1,configurable:!0}),te.prototype.unref=function(){this.selfUnref&&this._nativeFont.unref()},te}(x),z=function(){function Q(te,ne){this._assetLoaderCallback=ne,this.assetLoader=new te.CustomFileAssetLoader({loadContents:this.loadContents.bind(this)})}return Q.prototype.loadContents=function(te,ne){var fe;return te.isImage?fe=new ce(te):te.isAudio?fe=new V(te):te.isFont&&(fe=new j(te)),this._assetLoaderCallback(fe,ne)},Q}(),H=function(){function Q(te){this._nativeFileAsset=te}return Q.prototype.decode=function(te){this._nativeFileAsset.decode(te)},Object.defineProperty(Q.prototype,"name",{get:function(){return this._nativeFileAsset.name},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"fileExtension",{get:function(){return this._nativeFileAsset.fileExtension},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"uniqueFilename",{get:function(){return this._nativeFileAsset.uniqueFilename},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isAudio",{get:function(){return this._nativeFileAsset.isAudio},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isImage",{get:function(){return this._nativeFileAsset.isImage},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isFont",{get:function(){return this._nativeFileAsset.isFont},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"cdnUuid",{get:function(){return this._nativeFileAsset.cdnUuid},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"nativeFileAsset",{get:function(){return this._nativeFileAsset},enumerable:!1,configurable:!0}),Q}(),ce=function(Q){m(te,Q);function te(){return Q!==null&&Q.apply(this,arguments)||this}return te.prototype.setRenderImage=function(ne){this._nativeFileAsset.setRenderImage(ne.nativeImage)},te}(H),V=function(Q){m(te,Q);function te(){return Q!==null&&Q.apply(this,arguments)||this}return te.prototype.setAudioSource=function(ne){this._nativeFileAsset.setAudioSource(ne.nativeAudio)},te}(H),j=function(Q){m(te,Q);function te(){return Q!==null&&Q.apply(this,arguments)||this}return te.prototype.setFont=function(ne){this._nativeFileAsset.setFont(ne.nativeFont)},te}(H),N=function(){function Q(te){}return Q.prototype.register=function(te){te.selfUnref=!0},Q.prototype.unregister=function(te){},Q}(),K=typeof FinalizationRegistry<"u"?FinalizationRegistry:N,ie=new K(function(Q){Q==null||Q.unref()}),X=function(Q,te){var ne=new T(te);ie.register(Q,ne)}}],r={};function o(l){var d=r[l];if(d!==void 0)return d.exports;var h=r[l]={exports:{}};return t[l](h,h.exports,o),h.exports}o.d=(l,d)=>{for(var h in d)o.o(d,h)&&!o.o(l,h)&&Object.defineProperty(l,h,{enumerable:!0,get:d[h]})},o.o=(l,d)=>Object.prototype.hasOwnProperty.call(l,d),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:()=>ce,DataEnum:()=>et,EventType:()=>ne,Fit:()=>H,Layout:()=>V,LoopType:()=>fe,Rive:()=>We,RiveEventType:()=>ie,RiveFile:()=>Z,RuntimeLoader:()=>j,StateMachineInput:()=>K,StateMachineInputType:()=>N,Testing:()=>Di,ViewModel:()=>Ke,ViewModelInstance:()=>tt,ViewModelInstanceArtboard:()=>Li,ViewModelInstanceAssetImage:()=>po,ViewModelInstanceBoolean:()=>Kt,ViewModelInstanceColor:()=>Tr,ViewModelInstanceEnum:()=>kn,ViewModelInstanceList:()=>Sr,ViewModelInstanceNumber:()=>Ot,ViewModelInstanceString:()=>ut,ViewModelInstanceTrigger:()=>Zn,ViewModelInstanceValue:()=>$e,decodeAudio:()=>zn,decodeFont:()=>oa,decodeImage:()=>Ni});var l=o(1),d=o(2),h=o(3),m=o(5),g=function(){var P=function(y,C){return P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,q){A.__proto__=q}||function(A,q){for(var ue in q)Object.prototype.hasOwnProperty.call(q,ue)&&(A[ue]=q[ue])},P(y,C)};return function(y,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");P(y,C);function A(){this.constructor=y}y.prototype=C===null?Object.create(C):(A.prototype=C.prototype,new A)}}(),T=function(){return T=Object.assign||function(P){for(var y,C=1,A=arguments.length;C<A;C++){y=arguments[C];for(var q in y)Object.prototype.hasOwnProperty.call(y,q)&&(P[q]=y[q])}return P},T.apply(this,arguments)},x=function(P,y,C,A){function q(ue){return ue instanceof C?ue:new C(function(ye){ye(ue)})}return new(C||(C=Promise))(function(ue,ye){function qe(at){try{Le(A.next(at))}catch(_t){ye(_t)}}function it(at){try{Le(A.throw(at))}catch(_t){ye(_t)}}function Le(at){at.done?ue(at.value):q(at.value).then(qe,it)}Le((A=A.apply(P,y||[])).next())})},S=function(P,y){var C={label:0,sent:function(){if(ue[0]&1)throw ue[1];return ue[1]},trys:[],ops:[]},A,q,ue,ye=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return ye.next=qe(0),ye.throw=qe(1),ye.return=qe(2),typeof Symbol=="function"&&(ye[Symbol.iterator]=function(){return this}),ye;function qe(Le){return function(at){return it([Le,at])}}function it(Le){if(A)throw new TypeError("Generator is already executing.");for(;ye&&(ye=0,Le[0]&&(C=0)),C;)try{if(A=1,q&&(ue=Le[0]&2?q.return:Le[0]?q.throw||((ue=q.return)&&ue.call(q),0):q.next)&&!(ue=ue.call(q,Le[1])).done)return ue;switch(q=0,ue&&(Le=[Le[0]&2,ue.value]),Le[0]){case 0:case 1:ue=Le;break;case 4:return C.label++,{value:Le[1],done:!1};case 5:C.label++,q=Le[1],Le=[0];continue;case 7:Le=C.ops.pop(),C.trys.pop();continue;default:if(ue=C.trys,!(ue=ue.length>0&&ue[ue.length-1])&&(Le[0]===6||Le[0]===2)){C=0;continue}if(Le[0]===3&&(!ue||Le[1]>ue[0]&&Le[1]<ue[3])){C.label=Le[1];break}if(Le[0]===6&&C.label<ue[1]){C.label=ue[1],ue=Le;break}if(ue&&C.label<ue[2]){C.label=ue[2],C.ops.push(Le);break}ue[2]&&C.ops.pop(),C.trys.pop();continue}Le=y.call(P,C)}catch(at){Le=[6,at],q=0}finally{A=ue=0}if(Le[0]&5)throw Le[1];return{value:Le[0]?Le[1]:void 0,done:!0}}},O=function(P,y,C){if(C||arguments.length===2)for(var A=0,q=y.length,ue;A<q;A++)(ue||!(A in y))&&(ue||(ue=Array.prototype.slice.call(y,0,A)),ue[A]=y[A]);return P.concat(ue||Array.prototype.slice.call(y))},M=function(P){g(y,P);function y(){var C=P!==null&&P.apply(this,arguments)||this;return C.isHandledError=!0,C}return y}(Error),z=function(P){return P&&P.isHandledError?P.message:"Problem loading file; may be corrupt!"},H;(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"})(H||(H={}));var ce;(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"})(ce||(ce={}));var V=function(){function P(y){var C,A,q,ue,ye,qe,it;this.fit=(C=y==null?void 0:y.fit)!==null&&C!==void 0?C:H.Contain,this.alignment=(A=y==null?void 0:y.alignment)!==null&&A!==void 0?A:ce.Center,this.layoutScaleFactor=(q=y==null?void 0:y.layoutScaleFactor)!==null&&q!==void 0?q:1,this.minX=(ue=y==null?void 0:y.minX)!==null&&ue!==void 0?ue:0,this.minY=(ye=y==null?void 0:y.minY)!==null&&ye!==void 0?ye:0,this.maxX=(qe=y==null?void 0:y.maxX)!==null&&qe!==void 0?qe:0,this.maxY=(it=y==null?void 0:y.maxY)!==null&&it!==void 0?it:0}return P.new=function(y){var C=y.fit,A=y.alignment,q=y.minX,ue=y.minY,ye=y.maxX,qe=y.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new P({fit:C,alignment:A,minX:q,minY:ue,maxX:ye,maxY:qe})},P.prototype.copyWith=function(y){var C=y.fit,A=y.alignment,q=y.layoutScaleFactor,ue=y.minX,ye=y.minY,qe=y.maxX,it=y.maxY;return new P({fit:C??this.fit,alignment:A??this.alignment,layoutScaleFactor:q??this.layoutScaleFactor,minX:ue??this.minX,minY:ye??this.minY,maxX:qe??this.maxX,maxY:it??this.maxY})},P.prototype.runtimeFit=function(y){if(this.cachedRuntimeFit)return this.cachedRuntimeFit;var C;return this.fit===H.Cover?C=y.Fit.cover:this.fit===H.Contain?C=y.Fit.contain:this.fit===H.Fill?C=y.Fit.fill:this.fit===H.FitWidth?C=y.Fit.fitWidth:this.fit===H.FitHeight?C=y.Fit.fitHeight:this.fit===H.ScaleDown?C=y.Fit.scaleDown:this.fit===H.Layout?C=y.Fit.layout:C=y.Fit.none,this.cachedRuntimeFit=C,C},P.prototype.runtimeAlignment=function(y){if(this.cachedRuntimeAlignment)return this.cachedRuntimeAlignment;var C;return this.alignment===ce.TopLeft?C=y.Alignment.topLeft:this.alignment===ce.TopCenter?C=y.Alignment.topCenter:this.alignment===ce.TopRight?C=y.Alignment.topRight:this.alignment===ce.CenterLeft?C=y.Alignment.centerLeft:this.alignment===ce.CenterRight?C=y.Alignment.centerRight:this.alignment===ce.BottomLeft?C=y.Alignment.bottomLeft:this.alignment===ce.BottomCenter?C=y.Alignment.bottomCenter:this.alignment===ce.BottomRight?C=y.Alignment.bottomRight:C=y.Alignment.center,this.cachedRuntimeAlignment=C,C},P}(),j=function(){function P(){}return P.loadRuntime=function(){l.default({locateFile:function(){return P.wasmURL}}).then(function(y){var C;for(P.runtime=y;P.callBackQueue.length>0;)(C=P.callBackQueue.shift())===null||C===void 0||C(P.runtime)}).catch(function(y){var C={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:",C);var A="https://cdn.jsdelivr.net/npm/".concat(d.name,"@").concat(d.version,"/rive_fallback.wasm");if(P.wasmURL.toLowerCase()!==A)console.warn("Failed to load WASM from ".concat(P.wasmURL," (").concat(C.message,"), trying jsdelivr as a backup")),P.setWasmUrl(A),P.loadRuntime();else{var q=["Could not load Rive WASM file from ".concat(P.wasmURL," or ").concat(A,"."),"Possible reasons:","- Network connection is down","- WebAssembly is not supported in this environment","- The WASM file is corrupted or incompatible",`
161
161
  Error details:`,"- Type: ".concat(C.type),"- Message: ".concat(C.message),"- WebAssembly-specific error: ".concat(C.wasmError),`
162
162
  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(`
163
- `);console.error(q)}})},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(C){return y(C)})})},P.setWasmUrl=function(y){P.wasmURL=y},P.getWasmUrl=function(){return P.wasmURL},P.isLoading=!1,P.callBackQueue=[],P.wasmURL="https://unpkg.com/".concat(d.name,"@").concat(d.version,"/rive.wasm"),P}(),N;(function(P){P[P.Number=56]="Number",P[P.Trigger=58]="Trigger",P[P.Boolean=59]="Boolean"})(N||(N={}));var K=function(){function P(y,C){this.type=y,this.runtimeInput=C}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===N.Trigger&&this.runtimeInput.fire()},P.prototype.delete=function(){this.runtimeInput=null},P}(),ie;(function(P){P[P.General=128]="General",P[P.OpenUrl=131]="OpenUrl"})(ie||(ie={}));var X=function(){function P(y){this.nativeArtboard=y}return P}(),Q=function(){function P(y,C,A,q){this.stateMachine=y,this.playing=A,this.artboard=q,this.inputs=[],this.instance=new C.StateMachineInstance(y,q),this.initInputs(C)}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=[],C=0;C<this.instance.stateChangedCount();C++)y.push(this.instance.stateChangedNameByIndex(C));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 C=0;C<this.instance.inputCount();C++){var A=this.instance.input(C);this.inputs.push(this.mapRuntimeInput(A,y))}},P.prototype.mapRuntimeInput=function(y,C){if(y.type===C.SMIInput.bool)return new K(N.Boolean,y.asBool());if(y.type===C.SMIInput.number)return new K(N.Number,y.asNumber());if(y.type===C.SMIInput.trigger)return new K(N.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}(),te=function(){function P(y,C,A,q,ue){q===void 0&&(q=[]),ue===void 0&&(ue=[]),this.runtime=y,this.artboard=C,this.eventManager=A,this.animations=q,this.stateMachines=ue}return P.prototype.add=function(y,C,A){if(A===void 0&&(A=!0),y=wn(y),y.length===0)this.animations.forEach(function(Et){return Et.playing=C}),this.stateMachines.forEach(function(Et){return Et.playing=C});else for(var q=this.animations.map(function(Et){return Et.name}),ue=this.stateMachines.map(function(Et){return Et.name}),ye=0;ye<y.length;ye++){var qe=q.indexOf(y[ye]),it=ue.indexOf(y[ye]);if(qe>=0||it>=0)qe>=0?this.animations[qe].playing=C:this.stateMachines[it].playing=C;else{var Le=this.artboard.animationByName(y[ye]);if(Le){var at=new h.Animation(Le,this.artboard,this.runtime,C);at.advance(0),at.apply(1),this.animations.push(at)}else{var _t=this.artboard.stateMachineByName(y[ye]);if(_t){var Yt=new Q(_t,this.runtime,C,this.artboard);this.stateMachines.push(Yt)}}}}return A&&(C?this.eventManager.fire({type:ne.Play,data:this.playing}):this.eventManager.fire({type:ne.Pause,data:this.paused})),C?this.playing:this.paused},P.prototype.initLinearAnimations=function(y,C){for(var A=this.animations.map(function(it){return it.name}),q=0;q<y.length;q++){var ue=A.indexOf(y[q]);if(ue>=0)this.animations[ue].playing=C;else{var ye=this.artboard.animationByName(y[q]);if(ye){var qe=new h.Animation(ye,this.artboard,this.runtime,C);qe.advance(0),qe.apply(1),this.animations.push(qe)}else console.error("Animation with name ".concat(y[q]," not found."))}}},P.prototype.initStateMachines=function(y,C){for(var A=this.stateMachines.map(function(it){return it.name}),q=0;q<y.length;q++){var ue=A.indexOf(y[q]);if(ue>=0)this.stateMachines[ue].playing=C;else{var ye=this.artboard.stateMachineByName(y[q]);if(ye){var qe=new Q(ye,this.runtime,C,this.artboard);this.stateMachines.push(qe)}else console.warn("State Machine with name ".concat(y[q]," not found.")),this.initLinearAnimations([y[q]],C)}}},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,C){var A=this.animations.filter(function(q){return y.includes(q.name)});return A.forEach(function(q){return q.scrubTo=C}),A.map(function(q){return q.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 C=this;y=wn(y);var A=[];if(y.length===0)A=this.animations.map(function(ye){return ye.name}).concat(this.stateMachines.map(function(ye){return ye.name})),this.animations.forEach(function(ye){return ye.cleanup()}),this.stateMachines.forEach(function(ye){return ye.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var q=this.animations.filter(function(ye){return y.includes(ye.name)});q.forEach(function(ye){ye.cleanup(),C.animations.splice(C.animations.indexOf(ye),1)});var ue=this.stateMachines.filter(function(ye){return y.includes(ye.name)});ue.forEach(function(ye){ye.cleanup(),C.stateMachines.splice(C.stateMachines.indexOf(ye),1)}),A=q.map(function(ye){return ye.name}).concat(ue.map(function(ye){return ye.name}))}return this.eventManager.fire({type:ne.Stop,data:A}),A},Object.defineProperty(P.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(y,C){return y||C.playing},!1)||this.stateMachines.reduce(function(y,C){return y||C.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,C){C===void 0&&(C=!0);var A;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([A=this.artboard.animationByIndex(0).name],y,C):this.artboard.stateMachineCount()>0&&this.add([A=this.artboard.stateMachineByIndex(0).name],y,C)),A},P.prototype.handleLooping=function(){for(var y=0,C=this.animations.filter(function(q){return q.playing});y<C.length;y++){var A=C[y];A.loopValue===0&&A.loopCount?(A.loopCount=0,this.stop(A.name)):A.loopValue===1&&A.loopCount?(this.eventManager.fire({type:ne.Loop,data:{animation:A.name,type:fe.Loop}}),A.loopCount=0):A.loopValue===2&&A.loopCount>1&&(this.eventManager.fire({type:ne.Loop,data:{animation:A.name,type:fe.PingPong}}),A.loopCount=0)}},P.prototype.handleStateChanges=function(){for(var y=[],C=0,A=this.stateMachines.filter(function(ue){return ue.playing});C<A.length;C++){var q=A[C];y.push.apply(y,q.statesChanged)}y.length>0&&this.eventManager.fire({type:ne.StateChange,data:y})},P.prototype.handleAdvancing=function(y){this.eventManager.fire({type:ne.Advance,data:y})},P}(),ne;(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"})(ne||(ne={}));var fe;(function(P){P.OneShot="oneshot",P.Loop="loop",P.PingPong="pingpong"})(fe||(fe={}));var Ae=function(){function P(y){y===void 0&&(y=[]),this.listeners=y}return P.prototype.getListeners=function(y){return this.listeners.filter(function(C){return C.type===y})},P.prototype.add=function(y){this.listeners.includes(y)||this.listeners.push(y)},P.prototype.remove=function(y){for(var C=0;C<this.listeners.length;C++){var A=this.listeners[C];if(A.type===y.type&&A.callback===y.callback){this.listeners.splice(C,1);break}}},P.prototype.removeAll=function(y){var C=this;y?this.listeners.filter(function(A){return A.type===y}).forEach(function(A){return C.remove(A)}):this.listeners.splice(0,this.listeners.length)},P.prototype.fire=function(y){var C=this.getListeners(y.type);C.forEach(function(A){return A.callback(y)})},P}(),Ge=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}(),re;(function(P){P[P.AVAILABLE=0]="AVAILABLE",P[P.UNAVAILABLE=1]="UNAVAILABLE"})(re||(re={}));var Ie=function(P){g(y,P);function y(){var C=P!==null&&P.apply(this,arguments)||this;return C._started=!1,C._enabled=!1,C._status=re.UNAVAILABLE,C}return y.prototype.delay=function(C){return x(this,void 0,void 0,function(){return S(this,function(A){return[2,new Promise(function(q){return setTimeout(q,C)})]})})},y.prototype.timeout=function(){return x(this,void 0,void 0,function(){return S(this,function(C){return[2,new Promise(function(A,q){return setTimeout(q,50)})]})})},y.prototype.reportToListeners=function(){this.fire({type:ne.AudioStatusChange}),this.removeAll()},y.prototype.enableAudio=function(){return x(this,void 0,void 0,function(){return S(this,function(C){return this._enabled||(this._enabled=!0,this._status=re.AVAILABLE,this.reportToListeners()),[2]})})},y.prototype.testAudio=function(){return x(this,void 0,void 0,function(){return S(this,function(C){switch(C.label){case 0:if(!(this._status===re.UNAVAILABLE&&this._audioContext!==null))return[3,4];C.label=1;case 1:return C.trys.push([1,3,,4]),[4,Promise.race([this._audioContext.resume(),this.timeout()])];case 2:return C.sent(),this.enableAudio(),[3,4];case 3:return C.sent(),[3,4];case 4:return[2]}})})},y.prototype._establishAudio=function(){return x(this,void 0,void 0,function(){return S(this,function(C){switch(C.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(),C.label=2;case 2:return this._status!==re.UNAVAILABLE?[3,5]:[4,this.testAudio()];case 3:return C.sent(),[4,this.delay(1e3)];case 4:return C.sent(),[3,2];case 5:return[2]}})})},y.prototype.listenForUserAction=function(){var C=this,A=function(){return x(C,void 0,void 0,function(){return S(this,function(q){return this.enableAudio(),[2]})})};document.addEventListener("pointerdown",A,{once:!0})},y.prototype.establishAudio=function(){return x(this,void 0,void 0,function(){return S(this,function(C){return this._establishAudio(),[2]})})},Object.defineProperty(y.prototype,"systemVolume",{get:function(){return this._status===re.UNAVAILABLE?(this.testAudio(),0):1},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),y}(Ae),me=new Ie,ae=function(){function P(){}return P.prototype.observe=function(){},P.prototype.unobserve=function(){},P.prototype.disconnect=function(){},P}(),xe=globalThis.ResizeObserver||ae,de=function(){function P(){var y=this;this._elementsMap=new Map,this._onObservedEntry=function(C){var A=y._elementsMap.get(C.target);A!==null?A.onResize(C.target.clientWidth==0||C.target.clientHeight==0):y._resizeObserver.unobserve(C.target)},this._onObserved=function(C){C.forEach(y._onObservedEntry)},this._resizeObserver=new xe(this._onObserved)}return P.prototype.add=function(y,C){var A={onResize:C,element:y};return this._elementsMap.set(y,A),this._resizeObserver.observe(y),A},P.prototype.remove=function(y){this._resizeObserver.unobserve(y.element),this._elementsMap.delete(y.element)},P}(),L=new de,Z=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 Ae,y.onLoad&&this.on(ne.Load,y.onLoad),y.onLoadError&&this.on(ne.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 x(this,void 0,void 0,function(){var y,C,A,q,ue;return S(this,function(ye){switch(ye.label){case 0:return this.src?(y=this,[4,ia(this.src)]):[3,2];case 1:y.buffer=ye.sent(),ye.label=2;case 2:return this.destroyed?[2]:(this.assetLoader&&(A=new m.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader),C=A.assetLoader),q=this,[4,this.runtime.load(new Uint8Array(this.buffer),C,this.enableRiveAssetCDN)]);case 3:return q.file=ye.sent(),ue=new m.FileFinalizer(this.file),m.finalizationRegistry.register(this,ue),this.destroyed?(this.releaseFile(),[2]):(this.file!==null?this.eventManager.fire({type:ne.Load,data:this}):this.fireLoadError(P.fileLoadErrorMessage),[2])}})})},P.prototype.init=function(){return x(this,void 0,void 0,function(){var y,C;return S(this,function(A){switch(A.label){case 0:if(!this.src&&!this.buffer)return this.fireLoadError(P.missingErrorMessage),[2];A.label=1;case 1:return A.trys.push([1,4,,5]),y=this,[4,j.awaitInstance()];case 2:return y.runtime=A.sent(),this.destroyed?[2]:[4,this.initData()];case 3:return A.sent(),[3,5];case 4:return C=A.sent(),this.fireLoadError(C instanceof Error?C.message:P.fileLoadErrorMessage),[3,5];case 5:return[2]}})})},P.prototype.fireLoadError=function(y){throw this.eventManager.fire({type:ne.LoadError,data:y}),new Error(y)},P.prototype.on=function(y,C){this.eventManager.add({type:y,callback:C})},P.prototype.off=function(y,C){this.eventManager.remove({type:y,callback:C})},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 C=this.file.artboardByName(y);return C!=null?new X(C):null},P.missingErrorMessage="Rive source file or data buffer required",P.fileLoadErrorMessage="The file failed to load",P}(),We=function(){function P(y){var C=this,A;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(q){var ue=C._hasZeroSize!==q;C._hasZeroSize=q,q?(!C._layout.maxX||!C._layout.maxY)&&C.resizeToCanvas():ue&&C.resizeDrawingSurfaceToCanvas()},this.renderSecondTimer=0,this._boundDraw=this.draw.bind(this),this.canvas=y.canvas,y.canvas.constructor===HTMLCanvasElement&&(this._observed=L.add(this.canvas,this.onCanvasResize)),this.src=y.src,this.buffer=y.buffer,this.riveFile=y.riveFile,this.layout=(A=y.layout)!==null&&A!==void 0?A:new V,this.shouldDisableRiveListeners=!!y.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!y.isTouchScrollEnabled,this.automaticallyHandleEvents=!!y.automaticallyHandleEvents,this.enableRiveAssetCDN=y.enableRiveAssetCDN===void 0?!0:y.enableRiveAssetCDN,this.eventManager=new Ae,y.onLoad&&this.on(ne.Load,y.onLoad),y.onLoadError&&this.on(ne.LoadError,y.onLoadError),y.onPlay&&this.on(ne.Play,y.onPlay),y.onPause&&this.on(ne.Pause,y.onPause),y.onStop&&this.on(ne.Stop,y.onStop),y.onLoop&&this.on(ne.Loop,y.onLoop),y.onStateChange&&this.on(ne.StateChange,y.onStateChange),y.onAdvance&&this.on(ne.Advance,y.onAdvance),y.onload&&!y.onLoad&&this.on(ne.Load,y.onload),y.onloaderror&&!y.onLoadError&&this.on(ne.LoadError,y.onloaderror),y.onplay&&!y.onPlay&&this.on(ne.Play,y.onplay),y.onpause&&!y.onPause&&this.on(ne.Pause,y.onpause),y.onstop&&!y.onStop&&this.on(ne.Stop,y.onstop),y.onloop&&!y.onLoop&&this.on(ne.Loop,y.onloop),y.onstatechange&&!y.onStateChange&&this.on(ne.StateChange,y.onstatechange),y.assetLoader&&(this.assetLoader=y.assetLoader),this.taskQueue=new Ge(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 C=this,A=y.src,q=y.buffer,ue=y.riveFile,ye=y.animations,qe=y.stateMachines,it=y.artboard,Le=y.autoplay,at=Le===void 0?!1:Le,_t=y.useOffscreenRenderer,Yt=_t===void 0?!1:_t,Et=y.autoBind,Hn=Et===void 0?!1:Et;if(!this.destroyed){if(this.src=A,this.buffer=q,this.riveFile=ue,!this.src&&!this.buffer&&!this.riveFile)throw new M(P.missingErrorMessage);var Pn=wn(ye),Cn=wn(qe);this.loaded=!1,this.readyForPlaying=!1,j.awaitInstance().then(function(rn){C.destroyed||(C.runtime=rn,C.removeRiveListeners(),C.deleteRiveRenderer(),C.renderer=C.runtime.makeRenderer(C.canvas,Yt),C.canvas.width||C.canvas.height||C.resizeDrawingSurfaceToCanvas(),C.initData(it,Pn,Cn,at,Hn).then(function(ln){if(ln)return C.setupRiveListeners()}).catch(function(ln){console.error(ln)}))}).catch(function(rn){console.error(rn)})}},P.prototype.setupRiveListeners=function(y){var C=this;if(this.eventCleanup&&this.eventCleanup(),!this.shouldDisableRiveListeners){var A=(this.animator.stateMachines||[]).filter(function(ue){return ue.playing&&C.runtime.hasListeners(ue.instance)}).map(function(ue){return ue.instance}),q=this.isTouchScrollEnabled;y&&"isTouchScrollEnabled"in y&&(q=y.isTouchScrollEnabled),this.eventCleanup=(0,m.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:A,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime),isTouchScrollEnabled:q,layoutScaleFactor:this._layout.layoutScaleFactor})}},P.prototype.removeRiveListeners=function(){this.eventCleanup&&(this.eventCleanup(),this.eventCleanup=null)},P.prototype.initializeAudio=function(){var y=this,C;me.status==re.UNAVAILABLE&&!((C=this.artboard)===null||C===void 0)&&C.hasAudio&&this._audioEventListener===null&&(this._audioEventListener={type:ne.AudioStatusChange,callback:function(){return y.onSystemAudioChanged()}},me.add(this._audioEventListener),me.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,C,A,q,ue){return x(this,void 0,void 0,function(){var ye,qe,it,Le;return S(this,function(at){switch(at.label){case 0:return at.trys.push([0,3,,4]),this.riveFile!=null?[3,2]:(ye=new Z({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader}),this.riveFile=ye,[4,ye.init()]);case 1:if(at.sent(),this.destroyed)return ye.destroyIfUnused(),[2,!1];at.label=2;case 2:return this.file=this.riveFile.getInstance(),this.initArtboard(y,C,A,q,ue),this.initArtboardSize(),this.initializeAudio(),this.loaded=!0,this.eventManager.fire({type:ne.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 qe=at.sent(),it=z(qe),console.warn(it),this.eventManager.fire({type:ne.LoadError,data:it}),[2,Promise.reject(it)];case 4:return[2]}})})},P.prototype.initArtboard=function(y,C,A,q,ue){if(this.file){var ye=y?this.file.artboardByName(y):this.file.defaultArtboard();if(!ye){var qe="Invalid artboard name or no default artboard";console.warn(qe),this.eventManager.fire({type:ne.LoadError,data:qe});return}this.artboard=ye,ye.volume=this._volume*me.systemVolume,this.animator=new te(this.runtime,this.artboard,this.eventManager);var it;if(C.length>0||A.length>0?(it=C.concat(A),this.animator.initLinearAnimations(C,q),this.animator.initStateMachines(A,q)):it=[this.animator.atLeastOne(q,!1)],this.taskQueue.add({event:{type:q?ne.Play:ne.Pause,data:it}}),ue){var Le=this.file.defaultArtboardViewModel(ye);if(Le!==null){var at=Le.defaultInstance();if(at!==null){var _t=new tt(at,null);this.bindViewModelInstance(_t)}}}}},P.prototype.drawFrame=function(){var y,C;!((y=document==null?void 0:document.timeline)===null||y===void 0)&&y.currentTime?this.loaded&&this.artboard&&!this.frameRequestId&&(this._boundDraw(document.timeline.currentTime),(C=this.runtime)===null||C===void 0||C.resolveAnimationFrame()):this.startRendering()},P.prototype.draw=function(y,C){var A;this.frameRequestId=null;var q=performance.now();this.lastRenderTime||(this.lastRenderTime=y),this.renderSecondTimer+=y-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,C==null||C());var ue=(y-this.lastRenderTime)/1e3;this.lastRenderTime=y;for(var ye=this.animator.animations.filter(function($n){return $n.playing||$n.needsScrub}).sort(function($n){return $n.needsScrub?-1:1}),qe=0,it=ye;qe<it.length;qe++){var Le=it[qe];Le.advance(ue),Le.instance.didLoop&&(Le.loopCount+=1),Le.apply(1)}for(var at=this.animator.stateMachines.filter(function($n){return $n.playing}),_t=0,Yt=at;_t<Yt.length;_t++){var Et=Yt[_t],Hn=Et.reportedEventCount();if(Hn)for(var Pn=0;Pn<Hn;Pn++){var Cn=Et.reportedEventAt(Pn);if(Cn)if(Cn.type===ie.OpenUrl){if(this.eventManager.fire({type:ne.RiveEvent,data:Cn}),this.automaticallyHandleEvents){var rn=document.createElement("a"),ln=Cn,xr=ln.url,Ze=ln.target,_r=(0,m.sanitizeUrl)(xr);xr&&rn.setAttribute("href",_r),Ze&&rn.setAttribute("target",Ze),_r&&_r!==m.BLANK_URL&&rn.click()}}else this.eventManager.fire({type:ne.RiveEvent,data:Cn})}Et.advanceAndApply(ue)}this.animator.stateMachines.length==0&&this.artboard.advance(ue);var Wn=this.renderer;Wn.clear(),Wn.save(),this.alignRenderer(),this._hasZeroSize||this.artboard.draw(Wn),Wn.restore(),Wn.flush(),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(ue),this.frameCount++;var dt=performance.now();for(this.frameTimes.push(dt),this.durations.push(dt-q);this.frameTimes[0]<=dt-1e3;)this.frameTimes.shift(),this.durations.shift();(A=this._viewModelInstance)===null||A===void 0||A.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,C=y.renderer,A=y.runtime,q=y._layout,ue=y.artboard;C.align(q.runtimeFit(A),q.runtimeAlignment(A),{minX:q.minX,minY:q.minY,maxX:q.maxX,maxY:q.maxY},ue.bounds,this._devicePixelRatioUsed*q.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,C){return y+C},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),P.prototype.cleanup=function(){var y,C;this.destroyed=!0,this.stopRendering(),this.cleanupInstances(),this._observed!==null&&L.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&&(me.remove(this._audioEventListener),this._audioEventListener=null),(C=this._viewModelInstance)===null||C===void 0||C.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 C;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 A=this.artboard.textRun(y);if(!A){console.warn("Could not access a text run with name '".concat(y,"' in the '").concat((C=this.artboard)===null||C===void 0?void 0:C.name,"' Artboard. Note that you must rename a text run node in the Rive editor to make it queryable at runtime."));return}return A},P.prototype.getTextRunValue=function(y){var C=this.retrieveTextRun(y);return C?C.text:void 0},P.prototype.setTextRunValue=function(y,C){var A=this.retrieveTextRun(y);A&&(A.text=C)},P.prototype.play=function(y,C){var A=this;if(y=wn(y),!this.readyForPlaying){this.taskQueue.add({action:function(){return A.play(y,C)}});return}this.animator.play(y),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},P.prototype.pause=function(y){var C=this;if(y=wn(y),!this.readyForPlaying){this.taskQueue.add({action:function(){return C.pause(y)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(y)},P.prototype.scrub=function(y,C){var A=this;if(y=wn(y),!this.readyForPlaying){this.taskQueue.add({action:function(){return A.scrub(y,C)}});return}this.animator.scrub(y,C||0),this.drawFrame()},P.prototype.stop=function(y){var C=this;if(y=wn(y),!this.readyForPlaying){this.taskQueue.add({action:function(){return C.stop(y)}});return}this.animator&&this.animator.stop(y),this.eventCleanup&&this.eventCleanup()},P.prototype.reset=function(y){var C,A,q=y==null?void 0:y.artboard,ue=wn(y==null?void 0:y.animations),ye=wn(y==null?void 0:y.stateMachines),qe=(C=y==null?void 0:y.autoplay)!==null&&C!==void 0?C:!1,it=(A=y==null?void 0:y.autoBind)!==null&&A!==void 0?A:!1;this.cleanupInstances(),this.initArtboard(q,ue,ye,qe,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 C=this.canvas.getBoundingClientRect(),A=C.width,q=C.height,ue=y||window.devicePixelRatio||1;if(this.devicePixelRatioUsed=ue,this.canvas.width=ue*A,this.canvas.height=ue*q,this.resizeToCanvas(),this.drawFrame(),this.layout.fit===H.Layout){var ye=this._layout.layoutScaleFactor;this.artboard.width=A/ye,this.artboard.height=q/ye}}},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=[],C=0;C<this.artboard.animationCount();C++)y.push(this.artboard.animationByIndex(C).name);return y},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"stateMachineNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var y=[],C=0;C<this.artboard.stateMachineCount();C++)y.push(this.artboard.stateMachineByIndex(C).name);return y},enumerable:!1,configurable:!0}),P.prototype.stateMachineInputs=function(y){if(this.loaded){var C=this.animator.stateMachines.find(function(A){return A.name===y});return C==null?void 0:C.inputs}},P.prototype.retrieveInputAtPath=function(y,C){if(!y){console.warn("No input name provided for path '".concat(C,"'"));return}if(!this.artboard){console.warn("Tried to access input: '".concat(y,"', at path: '").concat(C,"', but the Artboard is null"));return}var A=this.artboard.inputByPath(y,C);if(!A){console.warn("Could not access an input with name: '".concat(y,"', at path:'").concat(C,"'"));return}return A},P.prototype.setBooleanStateAtPath=function(y,C,A){var q=this.retrieveInputAtPath(y,A);q&&(q.type===N.Boolean?q.asBool().value=C:console.warn("Input with name: '".concat(y,"', at path:'").concat(A,"' is not a boolean")))},P.prototype.setNumberStateAtPath=function(y,C,A){var q=this.retrieveInputAtPath(y,A);q&&(q.type===N.Number?q.asNumber().value=C:console.warn("Input with name: '".concat(y,"', at path:'").concat(A,"' is not a number")))},P.prototype.fireStateAtPath=function(y,C){var A=this.retrieveInputAtPath(y,C);A&&(A.type===N.Trigger?A.asTrigger().fire():console.warn("Input with name: '".concat(y,"', at path:'").concat(C,"' is not a trigger")))},P.prototype.retrieveTextAtPath=function(y,C){if(!y){console.warn("No text name provided for path '".concat(C,"'"));return}if(!C){console.warn("No path provided for text '".concat(y,"'"));return}if(!this.artboard){console.warn("Tried to access text: '".concat(y,"', at path: '").concat(C,"', but the Artboard is null"));return}var A=this.artboard.textByPath(y,C);if(!A){console.warn("Could not access text with name: '".concat(y,"', at path:'").concat(C,"'"));return}return A},P.prototype.getTextRunValueAtPath=function(y,C){var A=this.retrieveTextAtPath(y,C);if(!A){console.warn("Could not get text with name: '".concat(y,"', at path:'").concat(C,"'"));return}return A.text},P.prototype.setTextRunValueAtPath=function(y,C,A){var q=this.retrieveTextAtPath(y,A);if(!q){console.warn("Could not set text with name: '".concat(y,"', at path:'").concat(A,"'"));return}q.text=C},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,C){this.eventManager.add({type:y,callback:C})},P.prototype.off=function(y,C){this.eventManager.remove({type:y,callback:C})},P.prototype.unsubscribe=function(y,C){console.warn("This function is deprecated: please use `off()` instead."),this.off(y,C)},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:[]},C=0;C<this.file.artboardCount();C++){for(var A=this.file.artboardByIndex(C),q={name:A.name,animations:[],stateMachines:[]},ue=0;ue<A.animationCount();ue++){var ye=A.animationByIndex(ue);q.animations.push(ye.name)}for(var qe=0;qe<A.stateMachineCount();qe++){for(var it=A.stateMachineByIndex(qe),Le=it.name,at=new this.runtime.StateMachineInstance(it,A),_t=[],Yt=0;Yt<at.inputCount();Yt++){var Et=at.input(Yt);_t.push({name:Et.name,type:Et.type})}q.stateMachines.push({name:Le,inputs:_t})}y.artboards.push(q)}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*me.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 C;this.artboard&&!this.destroyed&&y&&y.runtimeInstance&&(y.internalIncrementReferenceCount(),(C=this._viewModelInstance)===null||C===void 0||C.cleanup(),this._viewModelInstance=y,this.animator.stateMachines.length>0?this.animator.stateMachines.forEach(function(A){return A.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 C=this.file.viewModelByIndex(y);return C!==null?new Ke(C):null},P.prototype.viewModelByName=function(y){var C=this.file.viewModelByName(y);return C!==null?new Ke(C):null},P.prototype.enums=function(){if(this._dataEnums===null){var y=this.file.enums();this._dataEnums=y.map(function(C){return new et(C)})}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 C,A;return(A=(C=this.riveFile)===null||C===void 0?void 0:C.getArtboard(y))!==null&&A!==void 0?A: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 C=this._viewModel.instanceByIndex(y);return C!==null?new tt(C,null):null},P.prototype.instanceByName=function(y){var C=this._viewModel.instanceByName(y);return C!==null?new tt(C,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}(),et=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}(),Be;(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"})(Be||(Be={}));var tt=function(){function P(y,C){this._parents=[],this._children=[],this._viewModelInstances=new Map,this._propertiesWithCallbacks=[],this._referenceCount=0,this._runtimeInstance=y,C!==null&&this._parents.push(C)}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 C=this._parents.indexOf(y);if(C!==-1){var A=this._parents[C];A.removeFromViewModelCallbacks(this),this._parents.splice(C,1)}},P.prototype.addToPropertyCallbacks=function(y){var C=this;this._propertiesWithCallbacks.includes(y)||(this._propertiesWithCallbacks.push(y),this._propertiesWithCallbacks.length>0&&this._parents.forEach(function(A){A.addToViewModelCallbacks(C)}))},P.prototype.removeFromPropertyCallbacks=function(y){var C=this;this._propertiesWithCallbacks.includes(y)&&(this._propertiesWithCallbacks=this._propertiesWithCallbacks.filter(function(A){return A!==y}),this._children.length===0&&this._propertiesWithCallbacks.length===0&&this._parents.forEach(function(A){A.removeFromViewModelCallbacks(C)}))},P.prototype.addToViewModelCallbacks=function(y){var C=this;this._children.includes(y)||(this._children.push(y),this._parents.forEach(function(A){A.addToViewModelCallbacks(C)}))},P.prototype.removeFromViewModelCallbacks=function(y){var C=this;this._children.includes(y)&&(this._children=this._children.filter(function(A){return A!==y}),this._children.length===0&&this._propertiesWithCallbacks.length===0&&this._parents.forEach(function(A){A.removeFromViewModelCallbacks(C)}))},P.prototype.clearCallbacks=function(){this._propertiesWithCallbacks.forEach(function(y){y.clearCallbacks()})},P.prototype.propertyFromPath=function(y,C){var A=y.split("/");return this.propertyFromPathSegments(A,0,C)},P.prototype.viewModelFromPathSegments=function(y,C){var A=this.internalViewModelInstance(y[C]);return A!==null?C==y.length-1?A:A.viewModelFromPathSegments(y,C++):null},P.prototype.propertyFromPathSegments=function(y,C,A){var q,ue,ye,qe,it,Le,at,_t,Yt,Et,Hn,Pn,Cn,rn,ln,xr,Ze,_r;if(C<y.length-1){var Wn=this.internalViewModelInstance(y[C]);return Wn!==null?Wn.propertyFromPathSegments(y,C+1,A):null}var dt=null;switch(A){case Be.Number:if(dt=(ue=(q=this._runtimeInstance)===null||q===void 0?void 0:q.number(y[C]))!==null&&ue!==void 0?ue:null,dt!==null)return new Ot(dt,this);break;case Be.String:if(dt=(qe=(ye=this._runtimeInstance)===null||ye===void 0?void 0:ye.string(y[C]))!==null&&qe!==void 0?qe:null,dt!==null)return new ut(dt,this);break;case Be.Boolean:if(dt=(Le=(it=this._runtimeInstance)===null||it===void 0?void 0:it.boolean(y[C]))!==null&&Le!==void 0?Le:null,dt!==null)return new Kt(dt,this);break;case Be.Color:if(dt=(_t=(at=this._runtimeInstance)===null||at===void 0?void 0:at.color(y[C]))!==null&&_t!==void 0?_t:null,dt!==null)return new Tr(dt,this);break;case Be.Trigger:if(dt=(Et=(Yt=this._runtimeInstance)===null||Yt===void 0?void 0:Yt.trigger(y[C]))!==null&&Et!==void 0?Et:null,dt!==null)return new Zn(dt,this);break;case Be.Enum:if(dt=(Pn=(Hn=this._runtimeInstance)===null||Hn===void 0?void 0:Hn.enum(y[C]))!==null&&Pn!==void 0?Pn:null,dt!==null)return new kn(dt,this);break;case Be.List:if(dt=(rn=(Cn=this._runtimeInstance)===null||Cn===void 0?void 0:Cn.list(y[C]))!==null&&rn!==void 0?rn:null,dt!==null)return new Sr(dt,this);break;case Be.Image:if(dt=(xr=(ln=this._runtimeInstance)===null||ln===void 0?void 0:ln.image(y[C]))!==null&&xr!==void 0?xr:null,dt!==null)return new po(dt,this);break;case Be.Artboard:if(dt=(_r=(Ze=this._runtimeInstance)===null||Ze===void 0?void 0:Ze.artboard(y[C]))!==null&&_r!==void 0?_r:null,dt!==null)return new Li(dt,this);break}return null},P.prototype.internalViewModelInstance=function(y){var C;if(this._viewModelInstances.has(y))return this._viewModelInstances.get(y);var A=(C=this._runtimeInstance)===null||C===void 0?void 0:C.viewModel(y);if(A!==null){var q=new P(A,this);return q.internalIncrementReferenceCount(),this._viewModelInstances.set(y,q),q}return null},P.prototype.number=function(y){var C=this.propertyFromPath(y,Be.Number);return C},P.prototype.string=function(y){var C=this.propertyFromPath(y,Be.String);return C},P.prototype.boolean=function(y){var C=this.propertyFromPath(y,Be.Boolean);return C},P.prototype.color=function(y){var C=this.propertyFromPath(y,Be.Color);return C},P.prototype.trigger=function(y){var C=this.propertyFromPath(y,Be.Trigger);return C},P.prototype.enum=function(y){var C=this.propertyFromPath(y,Be.Enum);return C},P.prototype.list=function(y){var C=this.propertyFromPath(y,Be.List);return C},P.prototype.image=function(y){var C=this.propertyFromPath(y,Be.Image);return C},P.prototype.artboard=function(y){var C=this.propertyFromPath(y,Be.Artboard);return C},P.prototype.viewModel=function(y){var C=y.split("/"),A=C.length>1?this.viewModelFromPathSegments(C.slice(0,C.length-1),0):this;return A!=null?A.internalViewModelInstance(C[C.length-1]):null},P.prototype.internalReplaceViewModel=function(y,C){var A;if(C.runtimeInstance!==null){var q=((A=this._runtimeInstance)===null||A===void 0?void 0:A.replaceViewModel(y,C.runtimeInstance))||!1;if(q){C.internalIncrementReferenceCount();var ue=this.internalViewModelInstance(y);ue!==null&&(ue.removeParent(this),this._children.includes(ue)&&(this._children=this._children.filter(function(ye){return ye!==ue})),ue.cleanup()),this._viewModelInstances.set(y,C),C.addParent(this)}return q}return!1},P.prototype.replaceViewModel=function(y,C){var A,q=y.split("/"),ue=q.length>1?this.viewModelFromPathSegments(q.slice(0,q.length-1),0):this;return(A=ue==null?void 0:ue.internalReplaceViewModel(q[q.length-1],C))!==null&&A!==void 0?A:!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(C){return T({},C)}))||[]},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(q){q.cleanup()}),this._viewModelInstances.clear();var C=O([],this._children,!0);this._children.length=0;var A=O([],this._parents,!0);this._parents.length=0,C.forEach(function(q){q.removeParent(y)}),A.forEach(function(q){q.removeFromViewModelCallbacks(y)})}},P}(),$e=function(){function P(y,C){this.callbacks=[],this._viewModelInstanceValue=y,this._parentViewModel=C}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(C){return C!==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(C){y.internalHandleCallback(C)})},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}(),ut=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(C){this._viewModelInstanceValue.value=C},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(C){C(this.value)},y}($e),Ot=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(C){this._viewModelInstanceValue.value=C},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(C){C(this.value)},y}($e),Kt=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(C){this._viewModelInstanceValue.value=C},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(C){C(this.value)},y}($e),Zn=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return y.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},y.prototype.internalHandleCallback=function(C){C()},y}($e),kn=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(C){this._viewModelInstanceValue.value=C},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"valueIndex",{get:function(){return this._viewModelInstanceValue.valueIndex},set:function(C){this._viewModelInstanceValue.valueIndex=C},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"values",{get:function(){return this._viewModelInstanceValue.values},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(C){C(this.value)},y}($e),Sr=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return Object.defineProperty(y.prototype,"length",{get:function(){return this._viewModelInstanceValue.size},enumerable:!1,configurable:!0}),y.prototype.addInstance=function(C){C.runtimeInstance!=null&&(this._viewModelInstanceValue.addInstance(C.runtimeInstance),C.addParent(this._parentViewModel))},y.prototype.addInstanceAt=function(C,A){return C.runtimeInstance!=null&&this._viewModelInstanceValue.addInstanceAt(C.runtimeInstance,A)?(C.addParent(this._parentViewModel),!0):!1},y.prototype.removeInstance=function(C){C.runtimeInstance!=null&&(this._viewModelInstanceValue.removeInstance(C.runtimeInstance),C.removeParent(this._parentViewModel))},y.prototype.removeInstanceAt=function(C){this._viewModelInstanceValue.removeInstanceAt(C)},y.prototype.instanceAt=function(C){var A=this._viewModelInstanceValue.instanceAt(C);if(A!=null){var q=new tt(A,this._parentViewModel);return q}return null},y.prototype.swap=function(C,A){this._viewModelInstanceValue.swap(C,A)},y.prototype.internalHandleCallback=function(C){C()},y}($e),Tr=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(C){this._viewModelInstanceValue.value=C},enumerable:!1,configurable:!0}),y.prototype.rgb=function(C,A,q){this._viewModelInstanceValue.rgb(C,A,q)},y.prototype.rgba=function(C,A,q,ue){this._viewModelInstanceValue.argb(ue,C,A,q)},y.prototype.argb=function(C,A,q,ue){this._viewModelInstanceValue.argb(C,A,q,ue)},y.prototype.alpha=function(C){this._viewModelInstanceValue.alpha(C)},y.prototype.opacity=function(C){this._viewModelInstanceValue.alpha(Math.round(Math.max(0,Math.min(1,C))*255))},y.prototype.internalHandleCallback=function(C){C(this.value)},y}($e),po=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return Object.defineProperty(y.prototype,"value",{set:function(C){var A;this._viewModelInstanceValue.value((A=C==null?void 0:C.nativeImage)!==null&&A!==void 0?A:null)},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(C){C()},y}($e),Li=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return Object.defineProperty(y.prototype,"value",{set:function(C){var A;this._viewModelInstanceValue.value((A=C==null?void 0:C.nativeArtboard)!==null&&A!==void 0?A:null)},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(C){C()},y}($e),ia=function(P){return x(void 0,void 0,void 0,function(){var y,C,A;return S(this,function(q){switch(q.label){case 0:return y=new Request(P),[4,fetch(y)];case 1:return C=q.sent(),[4,C.arrayBuffer()];case 2:return A=q.sent(),[2,A]}})})},wn=function(P){return typeof P=="string"?[P]:P instanceof Array?P:[]},Di={EventManager:Ae,TaskQueueManager:Ge},zn=function(P){return x(void 0,void 0,void 0,function(){var y,C,A;return S(this,function(q){switch(q.label){case 0:return y=new Promise(function(ue){return j.getInstance(function(ye){ye.decodeAudio(P,ue)})}),[4,y];case 1:return C=q.sent(),A=new m.AudioWrapper(C),m.finalizationRegistry.register(A,C),[2,A]}})})},Ni=function(P){return x(void 0,void 0,void 0,function(){var y,C,A;return S(this,function(q){switch(q.label){case 0:return y=new Promise(function(ue){return j.getInstance(function(ye){ye.decodeImage(P,ue)})}),[4,y];case 1:return C=q.sent(),A=new m.ImageWrapper(C),m.finalizationRegistry.register(A,C),[2,A]}})})},oa=function(P){return x(void 0,void 0,void 0,function(){var y,C,A;return S(this,function(q){switch(q.label){case 0:return y=new Promise(function(ue){return j.getInstance(function(ye){ye.decodeFont(P,ue)})}),[4,y];case 1:return C=q.sent(),A=new m.FontWrapper(C),m.finalizationRegistry.register(A,C),[2,A]}})})}})(),a})())}(uu)),uu.exports}var Mh=z_();function H_(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 W_=()=>{const n=Se.useRef(null),e=Se.useRef(null);return Se.useEffect(()=>{const t=e.current,r=n.current;if(t==null||r==null)return;const o=new Mh.Rive({src:"https://assets.nlx.ai/touchpoint/voice-plus-animation.riv",canvas:t,autoBind:!0,autoplay:!0,stateMachines:"State Machine 1",layout:new Mh.Layout({fit:Mh.Fit.Fill}),onLoad:()=>{o.resizeDrawingSurfaceToCanvas();const l=o.viewModelInstance;if(l!=null){const d=l.trigger("run"),h=l.color("color");h==null||h.rgba(...H_("var(--accent)",r)),d!=null&&d.trigger()}}}),a=()=>{o.resizeDrawingSurfaceToCanvas()};return window.addEventListener("resize",a,!1),()=>{o.cleanup(),window.removeEventListener("resize",a,!1)}},[]),R.jsxs(R.Fragment,{children:[R.jsx("canvas",{ref:n,width:"1",height:"1"}),R.jsx("canvas",{className:"pointer-events-none fixed inset-0",ref:e,style:{width:"100%",height:"100%"}})]})},Ky=Se.forwardRef((n,e)=>{var xe;const t=sessionStorage.getItem("nlxActiveVoiceConversationId")===n.config.conversationId,r=Se.useMemo(()=>{const de=sessionStorage.getItem("nlxActiveConversationResponses")??"{}";try{const L=JSON.parse(de);if(Array.isArray(L[n.config.conversationId]))return L[n.config.conversationId]}catch{return null}},[n.config.conversationId]),o=Se.useMemo(()=>ww({responses:r,...n.config}),[n.config,r]),[a,l]=Se.useState([]),d=((xe=a[a.length-1])==null?void 0:xe.type)===Fn.User,h=n.colorMode??"dark",[m,g]=Se.useState(n.embedded||t),T=kw(n.config),[x,S]=Se.useState(!1),O=Se.useRef(n.embedded||t),M=n.input??"text",z=Se.useCallback(()=>{sessionStorage.removeItem("nlxActiveVoiceConversationId"),(M==="voice"||M==="voiceMini")&&(V.current=!1,o.reset({clearResponses:!0}),sessionStorage.removeItem("nlxConversationId"))},[o,M]),H=n.onClose,ce=Se.useCallback(de=>{H!=null&&(H(de),z(),de.defaultPrevented||g(!1))},[H,g,z]);Se.useEffect(()=>{O.current=m},[m]),Se.useImperativeHandle(e,()=>({setExpanded(de){de?g(!0):(z(),g(!1))},getExpanded(){return O.current},getConversationHandler(){return o},setCustomBidirectionalCommands:de=>{K.current(de)}}),[o,g,z]),Se.useEffect(()=>{const de=L=>{l(L);const Z=o.currentConversationId();M==="text"&&Z!=null&&sessionStorage.setItem("nlxActiveConversationResponses",JSON.stringify({[Z]:L}))};return o.subscribe(de),()=>{o.unsubscribe(de)}},[o,l,M]);const V=Se.useRef(t);Se.useEffect(()=>{if(!m||V.current)return;V.current=!0,(M!=="text"||r==null||r.length===0)&&n.initializeConversation(o,n.initialContext);const de=o.currentConversationId();de!=null&&sessionStorage.setItem("nlxActiveVoiceConversationId",de)},[o,m,z,M,n,r]);const j=Se.useRef({formElements:{},links:{},customCommands:new Map}),N=Se.useRef([]),K=Se.useRef(de=>{var L;if(((L=n.bidirectional)==null?void 0:L.automaticContext)!==!1)N.current=de;else throw new Error("Custom commands can only be set when automatic context is enabled.")});Se.useEffect(()=>{if(m&&n.bidirectional!=null&&n.bidirectional.automaticContext!==!1){const{teardown:de,onCustomCommandsChange:L}=j_(o,N.current,n.bidirectional.customizeAutomaticContext??(Z=>Z),Z=>{j.current=Z});return K.current=L,de}},[m,o,n.bidirectional]),Se.useEffect(()=>{if(n.bidirectional!=null&&(n.bidirectional.navigation!=null||n.bidirectional.input!=null||n.bidirectional.custom!=null||n.bidirectional.automaticContext!==!1))return B_(o,n.bidirectional,j)},[n.bidirectional,o]);const ie=n.windowSize??(n.embedded?"full":"half"),X=Se.useMemo(()=>{const de=Om(Z=>Z.type===Fn.Application,a);if(de===-1)return null;const L=a[de];return(L==null?void 0:L.type)!==Fn.Application?null:{index:de,response:L}},[a]),Q=Se.useMemo(()=>{if(X==null)return;const de=Om(Z=>Z.choices.length>0,X.response.payload.messages);if(de===-1)return;const L=X.response.payload.messages[de];if(L!=null)return{message:L,messageIndex:de,responseIndex:X.index}},[X]),[te,ne]=Se.useState({}),fe=n.customModalities??{},[Ae,Ge]=Se.useState(!0),[re,Ie]=Se.useState(0),me=()=>{o.reset({clearResponses:!0}),z(),M!=="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(L=>L+1)};if(o==null)return null;if(!m)return n.launchIcon!==!1?R.jsx(su,{className:"fixed z-launchButton bottom-2 right-2 w-fit",theme:n.theme,colorMode:h,children:R.jsx(Hw,{className:"backdrop-blur",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(M==="voiceMini")return R.jsx(R.Fragment,{children:R.jsxs(su,{theme:n.theme,colorMode:h,className:st("w-fit",n.embedded?"":"fixed z-touchpoint bottom-2 right-2"),children:[n.animate?R.jsx(W_,{}):null,R.jsx(zx,{handler:o,context:n.initialContext,onClose:()=>{ce(new Event("close"))},renderCollapse:n.onClose!=null,customModalities:fe},re)]})});const ae=()=>{var de,L;return x?R.jsx(ly,{reset:()=>{me(),S(!1)},className:st("flex-none",ie==="full"?"w-full md:max-w-content md:mx-auto":""),onClose:()=>{S(!1)},handler:o}):T?R.jsxs(R.Fragment,{children:[R.jsx(kx,{enabled:n.enabled,userMessageBubble:n.userMessageBubble??!1,agentMessageBubble:n.agentMessageBubble??!1,chatMode:n.chatMode??!1,isWaiting:d,lastApplicationResponseIndex:X==null?void 0:X.index,responses:a,colorMode:h,handler:o,uploadedFiles:te,customModalities:fe,className:st("flex-grow",ie==="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",ie==="full"?"w-full md:max-w-content md:mx-auto":""),children:[Q!=null?R.jsx(vx,{...Q,handler:o}):null,(Q==null?void 0:Q.message.selectedChoiceId)!=null?null:R.jsx(jx,{enabled:n.enabled,handler:o,uploadUrl:(L=(de=X==null?void 0:X.response.payload.metadata)==null?void 0:de.uploadUrls)==null?void 0:L[0],onFileUpload:({uploadId:Z,file:We})=>{ne(Ke=>({...Ke,[Z]:We}))}})]})]}):R.jsx(yg,{})};return R.jsxs(su,{theme:n.theme,colorMode:h,className:st("grid grid-cols-2 xl:grid-cols-[1fr_632px]",n.embedded?"w-full h-full":"fixed inset-0 z-touchpoint"),children:[ie==="half"?R.jsx("div",{className:"hidden md:block bg-overlay"}):null,R.jsxs("div",{className:st("w-full bg-background text-primary-80 flex relative flex-col h-full backdrop-blur-overlay",{"col-span-2 md:col-span-1":ie==="half","col-span-2":ie==="full"}),children:[R.jsx(Jw,{windowSize:n.embedded?"embedded":ie,errorThemedCloseButton:M==="voice",speakerControls:M==="voice"?{enabled:Ae,setEnabled:Ge}:void 0,colorMode:h,brandIcon:n.brandIcon,isSettingsOpen:x,enabled:n.enabled,toggleSettings:n.enableSettings?()=>{S(de=>!de)}:void 0,renderCollapse:n.onClose!=null,collapse:ce,reset:me}),M==="text"?ae():R.jsxs(R.Fragment,{children:[x?R.jsx(ly,{className:st("flex-none",ie==="full"?"w-full md:max-w-content md:mx-auto":""),onClose:()=>{S(!1)},reset:()=>{me(),S(!1)},handler:o}):null,R.jsx(N2,{brandIcon:n.brandIcon,handler:o,speakersEnabled:Ae,colorMode:h,className:x?"hidden":"flex-grow",context:n.initialContext,customModalities:fe},re)]})]})]})});Ky.displayName="App";const Yy=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-family);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*{font-family:var(--font-family)!important}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.-top-2{top:-.5rem}.bottom-2{bottom:.5rem}.bottom-4{bottom:1rem}.bottom-\\[72px\\]{bottom:72px}.left-0{left:0}.left-1\\/2{left:50%}.right-0{right:0}.right-2{right:.5rem}.top-0{top:0}.top-1\\/2{top:50%}.z-10{z-index:10}.z-launchButton{z-index:100}.z-touchpoint{z-index:1000}.col-span-1{grid-column:span 1 / span 1}.col-span-2{grid-column:span 2 / span 2}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-2{margin-bottom:.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-10{margin-right:2.5rem}.mr-2{margin-right:.5rem}.block{display:block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-10{height:2.5rem}.h-20{height:5rem}.h-24{height:6rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-52{height:13rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-72{height:18rem}.h-8{height:2rem}.h-\\[128px\\]{height:128px}.h-\\[1px\\]{height:1px}.h-\\[360px\\]{height:360px}.h-full{height:100%}.max-h-\\[360px\\]{max-height:360px}.max-h-\\[40vh\\]{max-height:40vh}.max-h-full{max-height:100%}.min-h-full{min-height:100%}.w-10{width:2.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-\\[128px\\]{width:128px}.w-\\[calc\\(100vw-16px\\)\\]{width:calc(100vw - 16px)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-\\[360px\\]{max-width:360px}.max-w-content{max-width:640px}.flex-none{flex:none}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.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-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.space-y-px>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1px * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-full{border-radius:9999px}.rounded-inner{border-radius:var(--inner-border-radius)}.rounded-outer{border-radius:var(--outer-border-radius)}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-background{border-color:var(--background)}.border-primary-10{border-color:var(--primary-10)}.bg-\\[rgb\\(175\\,175\\,175\\)\\]{--tw-bg-opacity: 1;background-color:rgb(175 175 175 / var(--tw-bg-opacity))}.bg-\\[rgb\\(40\\,41\\,47\\)\\]{--tw-bg-opacity: 1;background-color:rgb(40 41 47 / var(--tw-bg-opacity))}.bg-accent{background-color:var(--accent)}.bg-background{background-color:var(--background)}.bg-black\\/50{background-color:#00000080}.bg-current{background-color:currentColor}.bg-error-primary{background-color:var(--error-primary)}.bg-error-secondary{background-color:var(--error-secondary)}.bg-overlay{background-color:var(--overlay)}.bg-primary-10{background-color:var(--primary-10)}.bg-primary-5{background-color:var(--primary-5)}.bg-primary-80{background-color:var(--primary-80)}.bg-secondary-40{background-color:var(--secondary-40)}.bg-secondary-60{background-color:var(--secondary-60)}.bg-transparent{background-color:transparent}.bg-cover{background-size:cover}.bg-center{background-position:center}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0{padding-top:0;padding-bottom:0}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pl-4{padding-left:1rem}.pr-2{padding-right:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-sans{font-family:var(--font-family)}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-normal{font-weight:400}.text-accent{color:var(--accent)}.text-accent-20{color:var(--accent-20)}.text-error-primary{color:var(--error-primary)}.text-primary-20{color:var(--primary-20)}.text-primary-40{color:var(--primary-40)}.text-primary-60{color:var(--primary-60)}.text-primary-80{color:var(--primary-80)}.text-secondary-40{color:var(--secondary-40)}.text-secondary-80{color:var(--secondary-80)}.placeholder-primary-20::-moz-placeholder{color:var(--primary-20)}.placeholder-primary-20::placeholder{color:var(--primary-20)}.placeholder-primary-40::-moz-placeholder{color:var(--primary-40)}.placeholder-primary-40::placeholder{color:var(--primary-40)}.caret-accent{caret-color:var(--accent)}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-\\[0\\.01\\]{opacity:.01}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-0{outline-width:0px}.outline-2{outline-width:2px}.outline-accent{outline-color:var(--accent)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));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)}.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{--tw-backdrop-blur: blur(8px);-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-md{--tw-backdrop-blur: blur(12px);-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(48px);-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,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}@property --glow-opacity{syntax: "<percentage>"; inherits: false; initial-value: 0%;}.fullscreen-error svg{animation:error-glow 3s ease infinite;--glow-opacity: 0%;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:8%;--glow-opacity: 0%}22%{color:var(--primary);fill-opacity:8%;--glow-opacity: 0%}35%{color:var(--accent);fill-opacity:80%;--glow-opacity: 60%}45%{color:var(--accent);fill-opacity:70%;--glow-opacity: 30%}55%{color:var(--accent);fill-opacity:60%;--glow-opacity: 60%}60%{color:var(--primary);fill-opacity:8%;--glow-opacity: 0%}to{color:var(--primary);fill-opacity:8%;--glow-opacity: 0%}}.markdown ul{list-style-position:inside;list-style-type:disc}.markdown ol{list-style-position:inside;list-style-type:decimal}.markdown hr{border-color:var(--primary-20)}.markdown a{text-decoration-line:underline}.markdown h1,.markdown h2,.markdown h3{font-weight:700}.placeholder\\:text-primary-40::-moz-placeholder{color:var(--primary-40)}.placeholder\\:text-primary-40::placeholder{color:var(--primary-40)}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:inset-0:before{content:var(--tw-content);top:0;right:0;bottom:0;left:0}.before\\:-z-10:before{content:var(--tw-content);z-index:-10}.before\\:bg-transparent:before{content:var(--tw-content);background-color:transparent}.before\\:transition-colors:before{content:var(--tw-content);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.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);top:0;right:0;bottom:0;left:0}.after\\:rounded-outer:after{content:var(--tw-content);border-radius:var(--outer-border-radius)}.after\\:content-\\[\\'\\'\\]:after{--tw-content: "";content:var(--tw-content)}.last\\:h-full:last-child{height:100%}.hover\\:bg-primary-10:hover{background-color:var(--primary-10)}.hover\\:bg-primary-5:hover{background-color:var(--primary-5)}.hover\\:bg-primary-80:hover{background-color:var(--primary-80)}.hover\\:bg-secondary-20:hover{background-color:var(--secondary-20)}.hover\\:text-primary-80:hover{color:var(--primary-80)}.hover\\:after\\:bg-primary-10:hover:after{content:var(--tw-content);background-color:var(--primary-10)}.focus\\:outline-0:focus{outline-width:0px}.focus\\:before\\:bg-primary-10:focus:before{content:var(--tw-content);background-color:var(--primary-10)}.focus\\:before\\:bg-primary-40:focus:before{content:var(--tw-content);background-color:var(--primary-40)}.focus\\:before\\:bg-primary-5:focus:before{content:var(--tw-content);background-color:var(--primary-5)}.focus\\:before\\:bg-primary-80:focus:before{content:var(--tw-content);background-color:var(--primary-80)}.enabled\\:hover\\:before\\:bg-primary-10:hover:enabled:before{content:var(--tw-content);background-color:var(--primary-10)}.enabled\\:hover\\:before\\:bg-primary-40:hover:enabled:before{content:var(--tw-content);background-color:var(--primary-40)}.enabled\\:hover\\:before\\:bg-primary-5:hover:enabled:before{content:var(--tw-content);background-color:var(--primary-5)}.enabled\\:hover\\:before\\:bg-primary-80:hover:enabled:before{content:var(--tw-content);background-color:var(--primary-80)}.enabled\\:active\\:before\\:bg-secondary-10:active:enabled:before{content:var(--tw-content);background-color:var(--secondary-10)}.disabled\\:bg-accent-20:disabled{background-color:var(--accent-20)}.disabled\\:bg-primary-10:disabled{background-color:var(--primary-10)}.disabled\\:bg-primary-5:disabled{background-color:var(--primary-5)}.disabled\\:bg-secondary-20:disabled{background-color:var(--secondary-20)}.disabled\\:text-primary-20:disabled{color:var(--primary-20)}.disabled\\:text-primary-40:disabled{color:var(--primary-40)}.disabled\\:text-secondary-40:disabled{color:var(--secondary-40)}@media (min-width: 768px){.md\\:absolute{position:absolute}.md\\:left-0{left:0}.md\\:right-0{right:0}.md\\:top-0{top:0}.md\\:-order-1{order:-1}.md\\:col-span-1{grid-column:span 1 / span 1}.md\\:mx-auto{margin-left:auto;margin-right:auto}.md\\:block{display:block}.md\\:w-fit{width:-moz-fit-content;width:fit-content}.md\\:max-w-content{max-width:640px}.md\\:-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:flex-col{flex-direction:column}.md\\:p-3{padding:.75rem}}@media (min-width: 1280px){.xl\\:grid-cols-\\[1fr_632px\\]{grid-template-columns:1fr 632px}}`,Zs=({children:n,className:e,faded:t})=>R.jsx("p",{className:st("text-base",t?"text-primary-60":"text-primary-80",e),children:n}),Qy=({children:n,className:e})=>R.jsx("p",{className:st("text-sm text-primary-60",e),children:n}),du=({children:n,className:e,selected:t,onClick:r,href:o,newTab:a})=>{const l=st("block shrink-0 rounded-inner overflow-hidden","w-80 space-y-px",t?"outline outline-2 outline-accent":"",r!=null||o!=null?"hover:bg-primary-5":"",e);return Se.useEffect(()=>{o==null&&a!=null&&console.warn("Setting the `newTab` prop on the `<CustomCard/>` has no effect if the `href` is not also set.")},[o,a]),o!=null?R.jsx("a",{className:l,href:o,onClick:r,...a?{target:"_blank",rel:"noreferrer"}:{},children:n}):r!=null?R.jsx("button",{className:l,onClick:r,children:n}):R.jsx("div",{className:l,children:n})},fu=({src:n,alt:e})=>R.jsx("img",{src:n,alt:e,className:"w-full h-52 object-cover"}),hu=({left:n,right:e,icon:t})=>R.jsxs("div",{className:"flex items-center relative justify-between gap-2 bg-primary-5 px-3 py-4",children:[R.jsx("div",{className:"space-y-1 text-left",children:n}),R.jsx("div",{className:"space-y-1 text-right",children:e}),t!=null?R.jsx(t,{className:"text-primary-60 w-4 h-4 absolute top-1/2 left-1/2 transform -translate-y-1/2 -translate-x-1/2"}):null]});/*! *****************************************************************************
163
+ `);console.error(q)}})},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(C){return y(C)})})},P.setWasmUrl=function(y){P.wasmURL=y},P.getWasmUrl=function(){return P.wasmURL},P.isLoading=!1,P.callBackQueue=[],P.wasmURL="https://unpkg.com/".concat(d.name,"@").concat(d.version,"/rive.wasm"),P}(),N;(function(P){P[P.Number=56]="Number",P[P.Trigger=58]="Trigger",P[P.Boolean=59]="Boolean"})(N||(N={}));var K=function(){function P(y,C){this.type=y,this.runtimeInput=C}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===N.Trigger&&this.runtimeInput.fire()},P.prototype.delete=function(){this.runtimeInput=null},P}(),ie;(function(P){P[P.General=128]="General",P[P.OpenUrl=131]="OpenUrl"})(ie||(ie={}));var X=function(){function P(y){this.nativeArtboard=y}return P}(),Q=function(){function P(y,C,A,q){this.stateMachine=y,this.playing=A,this.artboard=q,this.inputs=[],this.instance=new C.StateMachineInstance(y,q),this.initInputs(C)}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=[],C=0;C<this.instance.stateChangedCount();C++)y.push(this.instance.stateChangedNameByIndex(C));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 C=0;C<this.instance.inputCount();C++){var A=this.instance.input(C);this.inputs.push(this.mapRuntimeInput(A,y))}},P.prototype.mapRuntimeInput=function(y,C){if(y.type===C.SMIInput.bool)return new K(N.Boolean,y.asBool());if(y.type===C.SMIInput.number)return new K(N.Number,y.asNumber());if(y.type===C.SMIInput.trigger)return new K(N.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}(),te=function(){function P(y,C,A,q,ue){q===void 0&&(q=[]),ue===void 0&&(ue=[]),this.runtime=y,this.artboard=C,this.eventManager=A,this.animations=q,this.stateMachines=ue}return P.prototype.add=function(y,C,A){if(A===void 0&&(A=!0),y=wn(y),y.length===0)this.animations.forEach(function(Et){return Et.playing=C}),this.stateMachines.forEach(function(Et){return Et.playing=C});else for(var q=this.animations.map(function(Et){return Et.name}),ue=this.stateMachines.map(function(Et){return Et.name}),ye=0;ye<y.length;ye++){var qe=q.indexOf(y[ye]),it=ue.indexOf(y[ye]);if(qe>=0||it>=0)qe>=0?this.animations[qe].playing=C:this.stateMachines[it].playing=C;else{var Le=this.artboard.animationByName(y[ye]);if(Le){var at=new h.Animation(Le,this.artboard,this.runtime,C);at.advance(0),at.apply(1),this.animations.push(at)}else{var _t=this.artboard.stateMachineByName(y[ye]);if(_t){var Yt=new Q(_t,this.runtime,C,this.artboard);this.stateMachines.push(Yt)}}}}return A&&(C?this.eventManager.fire({type:ne.Play,data:this.playing}):this.eventManager.fire({type:ne.Pause,data:this.paused})),C?this.playing:this.paused},P.prototype.initLinearAnimations=function(y,C){for(var A=this.animations.map(function(it){return it.name}),q=0;q<y.length;q++){var ue=A.indexOf(y[q]);if(ue>=0)this.animations[ue].playing=C;else{var ye=this.artboard.animationByName(y[q]);if(ye){var qe=new h.Animation(ye,this.artboard,this.runtime,C);qe.advance(0),qe.apply(1),this.animations.push(qe)}else console.error("Animation with name ".concat(y[q]," not found."))}}},P.prototype.initStateMachines=function(y,C){for(var A=this.stateMachines.map(function(it){return it.name}),q=0;q<y.length;q++){var ue=A.indexOf(y[q]);if(ue>=0)this.stateMachines[ue].playing=C;else{var ye=this.artboard.stateMachineByName(y[q]);if(ye){var qe=new Q(ye,this.runtime,C,this.artboard);this.stateMachines.push(qe)}else console.warn("State Machine with name ".concat(y[q]," not found.")),this.initLinearAnimations([y[q]],C)}}},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,C){var A=this.animations.filter(function(q){return y.includes(q.name)});return A.forEach(function(q){return q.scrubTo=C}),A.map(function(q){return q.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 C=this;y=wn(y);var A=[];if(y.length===0)A=this.animations.map(function(ye){return ye.name}).concat(this.stateMachines.map(function(ye){return ye.name})),this.animations.forEach(function(ye){return ye.cleanup()}),this.stateMachines.forEach(function(ye){return ye.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var q=this.animations.filter(function(ye){return y.includes(ye.name)});q.forEach(function(ye){ye.cleanup(),C.animations.splice(C.animations.indexOf(ye),1)});var ue=this.stateMachines.filter(function(ye){return y.includes(ye.name)});ue.forEach(function(ye){ye.cleanup(),C.stateMachines.splice(C.stateMachines.indexOf(ye),1)}),A=q.map(function(ye){return ye.name}).concat(ue.map(function(ye){return ye.name}))}return this.eventManager.fire({type:ne.Stop,data:A}),A},Object.defineProperty(P.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(y,C){return y||C.playing},!1)||this.stateMachines.reduce(function(y,C){return y||C.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,C){C===void 0&&(C=!0);var A;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([A=this.artboard.animationByIndex(0).name],y,C):this.artboard.stateMachineCount()>0&&this.add([A=this.artboard.stateMachineByIndex(0).name],y,C)),A},P.prototype.handleLooping=function(){for(var y=0,C=this.animations.filter(function(q){return q.playing});y<C.length;y++){var A=C[y];A.loopValue===0&&A.loopCount?(A.loopCount=0,this.stop(A.name)):A.loopValue===1&&A.loopCount?(this.eventManager.fire({type:ne.Loop,data:{animation:A.name,type:fe.Loop}}),A.loopCount=0):A.loopValue===2&&A.loopCount>1&&(this.eventManager.fire({type:ne.Loop,data:{animation:A.name,type:fe.PingPong}}),A.loopCount=0)}},P.prototype.handleStateChanges=function(){for(var y=[],C=0,A=this.stateMachines.filter(function(ue){return ue.playing});C<A.length;C++){var q=A[C];y.push.apply(y,q.statesChanged)}y.length>0&&this.eventManager.fire({type:ne.StateChange,data:y})},P.prototype.handleAdvancing=function(y){this.eventManager.fire({type:ne.Advance,data:y})},P}(),ne;(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"})(ne||(ne={}));var fe;(function(P){P.OneShot="oneshot",P.Loop="loop",P.PingPong="pingpong"})(fe||(fe={}));var Ae=function(){function P(y){y===void 0&&(y=[]),this.listeners=y}return P.prototype.getListeners=function(y){return this.listeners.filter(function(C){return C.type===y})},P.prototype.add=function(y){this.listeners.includes(y)||this.listeners.push(y)},P.prototype.remove=function(y){for(var C=0;C<this.listeners.length;C++){var A=this.listeners[C];if(A.type===y.type&&A.callback===y.callback){this.listeners.splice(C,1);break}}},P.prototype.removeAll=function(y){var C=this;y?this.listeners.filter(function(A){return A.type===y}).forEach(function(A){return C.remove(A)}):this.listeners.splice(0,this.listeners.length)},P.prototype.fire=function(y){var C=this.getListeners(y.type);C.forEach(function(A){return A.callback(y)})},P}(),Ge=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}(),re;(function(P){P[P.AVAILABLE=0]="AVAILABLE",P[P.UNAVAILABLE=1]="UNAVAILABLE"})(re||(re={}));var Ie=function(P){g(y,P);function y(){var C=P!==null&&P.apply(this,arguments)||this;return C._started=!1,C._enabled=!1,C._status=re.UNAVAILABLE,C}return y.prototype.delay=function(C){return x(this,void 0,void 0,function(){return S(this,function(A){return[2,new Promise(function(q){return setTimeout(q,C)})]})})},y.prototype.timeout=function(){return x(this,void 0,void 0,function(){return S(this,function(C){return[2,new Promise(function(A,q){return setTimeout(q,50)})]})})},y.prototype.reportToListeners=function(){this.fire({type:ne.AudioStatusChange}),this.removeAll()},y.prototype.enableAudio=function(){return x(this,void 0,void 0,function(){return S(this,function(C){return this._enabled||(this._enabled=!0,this._status=re.AVAILABLE,this.reportToListeners()),[2]})})},y.prototype.testAudio=function(){return x(this,void 0,void 0,function(){return S(this,function(C){switch(C.label){case 0:if(!(this._status===re.UNAVAILABLE&&this._audioContext!==null))return[3,4];C.label=1;case 1:return C.trys.push([1,3,,4]),[4,Promise.race([this._audioContext.resume(),this.timeout()])];case 2:return C.sent(),this.enableAudio(),[3,4];case 3:return C.sent(),[3,4];case 4:return[2]}})})},y.prototype._establishAudio=function(){return x(this,void 0,void 0,function(){return S(this,function(C){switch(C.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(),C.label=2;case 2:return this._status!==re.UNAVAILABLE?[3,5]:[4,this.testAudio()];case 3:return C.sent(),[4,this.delay(1e3)];case 4:return C.sent(),[3,2];case 5:return[2]}})})},y.prototype.listenForUserAction=function(){var C=this,A=function(){return x(C,void 0,void 0,function(){return S(this,function(q){return this.enableAudio(),[2]})})};document.addEventListener("pointerdown",A,{once:!0})},y.prototype.establishAudio=function(){return x(this,void 0,void 0,function(){return S(this,function(C){return this._establishAudio(),[2]})})},Object.defineProperty(y.prototype,"systemVolume",{get:function(){return this._status===re.UNAVAILABLE?(this.testAudio(),0):1},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),y}(Ae),me=new Ie,ae=function(){function P(){}return P.prototype.observe=function(){},P.prototype.unobserve=function(){},P.prototype.disconnect=function(){},P}(),xe=globalThis.ResizeObserver||ae,de=function(){function P(){var y=this;this._elementsMap=new Map,this._onObservedEntry=function(C){var A=y._elementsMap.get(C.target);A!==null?A.onResize(C.target.clientWidth==0||C.target.clientHeight==0):y._resizeObserver.unobserve(C.target)},this._onObserved=function(C){C.forEach(y._onObservedEntry)},this._resizeObserver=new xe(this._onObserved)}return P.prototype.add=function(y,C){var A={onResize:C,element:y};return this._elementsMap.set(y,A),this._resizeObserver.observe(y),A},P.prototype.remove=function(y){this._resizeObserver.unobserve(y.element),this._elementsMap.delete(y.element)},P}(),L=new de,Z=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 Ae,y.onLoad&&this.on(ne.Load,y.onLoad),y.onLoadError&&this.on(ne.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 x(this,void 0,void 0,function(){var y,C,A,q,ue;return S(this,function(ye){switch(ye.label){case 0:return this.src?(y=this,[4,ia(this.src)]):[3,2];case 1:y.buffer=ye.sent(),ye.label=2;case 2:return this.destroyed?[2]:(this.assetLoader&&(A=new m.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader),C=A.assetLoader),q=this,[4,this.runtime.load(new Uint8Array(this.buffer),C,this.enableRiveAssetCDN)]);case 3:return q.file=ye.sent(),ue=new m.FileFinalizer(this.file),m.finalizationRegistry.register(this,ue),this.destroyed?(this.releaseFile(),[2]):(this.file!==null?this.eventManager.fire({type:ne.Load,data:this}):this.fireLoadError(P.fileLoadErrorMessage),[2])}})})},P.prototype.init=function(){return x(this,void 0,void 0,function(){var y,C;return S(this,function(A){switch(A.label){case 0:if(!this.src&&!this.buffer)return this.fireLoadError(P.missingErrorMessage),[2];A.label=1;case 1:return A.trys.push([1,4,,5]),y=this,[4,j.awaitInstance()];case 2:return y.runtime=A.sent(),this.destroyed?[2]:[4,this.initData()];case 3:return A.sent(),[3,5];case 4:return C=A.sent(),this.fireLoadError(C instanceof Error?C.message:P.fileLoadErrorMessage),[3,5];case 5:return[2]}})})},P.prototype.fireLoadError=function(y){throw this.eventManager.fire({type:ne.LoadError,data:y}),new Error(y)},P.prototype.on=function(y,C){this.eventManager.add({type:y,callback:C})},P.prototype.off=function(y,C){this.eventManager.remove({type:y,callback:C})},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 C=this.file.artboardByName(y);return C!=null?new X(C):null},P.missingErrorMessage="Rive source file or data buffer required",P.fileLoadErrorMessage="The file failed to load",P}(),We=function(){function P(y){var C=this,A;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(q){var ue=C._hasZeroSize!==q;C._hasZeroSize=q,q?(!C._layout.maxX||!C._layout.maxY)&&C.resizeToCanvas():ue&&C.resizeDrawingSurfaceToCanvas()},this.renderSecondTimer=0,this._boundDraw=this.draw.bind(this),this.canvas=y.canvas,y.canvas.constructor===HTMLCanvasElement&&(this._observed=L.add(this.canvas,this.onCanvasResize)),this.src=y.src,this.buffer=y.buffer,this.riveFile=y.riveFile,this.layout=(A=y.layout)!==null&&A!==void 0?A:new V,this.shouldDisableRiveListeners=!!y.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!y.isTouchScrollEnabled,this.automaticallyHandleEvents=!!y.automaticallyHandleEvents,this.enableRiveAssetCDN=y.enableRiveAssetCDN===void 0?!0:y.enableRiveAssetCDN,this.eventManager=new Ae,y.onLoad&&this.on(ne.Load,y.onLoad),y.onLoadError&&this.on(ne.LoadError,y.onLoadError),y.onPlay&&this.on(ne.Play,y.onPlay),y.onPause&&this.on(ne.Pause,y.onPause),y.onStop&&this.on(ne.Stop,y.onStop),y.onLoop&&this.on(ne.Loop,y.onLoop),y.onStateChange&&this.on(ne.StateChange,y.onStateChange),y.onAdvance&&this.on(ne.Advance,y.onAdvance),y.onload&&!y.onLoad&&this.on(ne.Load,y.onload),y.onloaderror&&!y.onLoadError&&this.on(ne.LoadError,y.onloaderror),y.onplay&&!y.onPlay&&this.on(ne.Play,y.onplay),y.onpause&&!y.onPause&&this.on(ne.Pause,y.onpause),y.onstop&&!y.onStop&&this.on(ne.Stop,y.onstop),y.onloop&&!y.onLoop&&this.on(ne.Loop,y.onloop),y.onstatechange&&!y.onStateChange&&this.on(ne.StateChange,y.onstatechange),y.assetLoader&&(this.assetLoader=y.assetLoader),this.taskQueue=new Ge(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 C=this,A=y.src,q=y.buffer,ue=y.riveFile,ye=y.animations,qe=y.stateMachines,it=y.artboard,Le=y.autoplay,at=Le===void 0?!1:Le,_t=y.useOffscreenRenderer,Yt=_t===void 0?!1:_t,Et=y.autoBind,Hn=Et===void 0?!1:Et;if(!this.destroyed){if(this.src=A,this.buffer=q,this.riveFile=ue,!this.src&&!this.buffer&&!this.riveFile)throw new M(P.missingErrorMessage);var Pn=wn(ye),Cn=wn(qe);this.loaded=!1,this.readyForPlaying=!1,j.awaitInstance().then(function(rn){C.destroyed||(C.runtime=rn,C.removeRiveListeners(),C.deleteRiveRenderer(),C.renderer=C.runtime.makeRenderer(C.canvas,Yt),C.canvas.width||C.canvas.height||C.resizeDrawingSurfaceToCanvas(),C.initData(it,Pn,Cn,at,Hn).then(function(ln){if(ln)return C.setupRiveListeners()}).catch(function(ln){console.error(ln)}))}).catch(function(rn){console.error(rn)})}},P.prototype.setupRiveListeners=function(y){var C=this;if(this.eventCleanup&&this.eventCleanup(),!this.shouldDisableRiveListeners){var A=(this.animator.stateMachines||[]).filter(function(ue){return ue.playing&&C.runtime.hasListeners(ue.instance)}).map(function(ue){return ue.instance}),q=this.isTouchScrollEnabled;y&&"isTouchScrollEnabled"in y&&(q=y.isTouchScrollEnabled),this.eventCleanup=(0,m.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:A,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime),isTouchScrollEnabled:q,layoutScaleFactor:this._layout.layoutScaleFactor})}},P.prototype.removeRiveListeners=function(){this.eventCleanup&&(this.eventCleanup(),this.eventCleanup=null)},P.prototype.initializeAudio=function(){var y=this,C;me.status==re.UNAVAILABLE&&!((C=this.artboard)===null||C===void 0)&&C.hasAudio&&this._audioEventListener===null&&(this._audioEventListener={type:ne.AudioStatusChange,callback:function(){return y.onSystemAudioChanged()}},me.add(this._audioEventListener),me.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,C,A,q,ue){return x(this,void 0,void 0,function(){var ye,qe,it,Le;return S(this,function(at){switch(at.label){case 0:return at.trys.push([0,3,,4]),this.riveFile!=null?[3,2]:(ye=new Z({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader}),this.riveFile=ye,[4,ye.init()]);case 1:if(at.sent(),this.destroyed)return ye.destroyIfUnused(),[2,!1];at.label=2;case 2:return this.file=this.riveFile.getInstance(),this.initArtboard(y,C,A,q,ue),this.initArtboardSize(),this.initializeAudio(),this.loaded=!0,this.eventManager.fire({type:ne.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 qe=at.sent(),it=z(qe),console.warn(it),this.eventManager.fire({type:ne.LoadError,data:it}),[2,Promise.reject(it)];case 4:return[2]}})})},P.prototype.initArtboard=function(y,C,A,q,ue){if(this.file){var ye=y?this.file.artboardByName(y):this.file.defaultArtboard();if(!ye){var qe="Invalid artboard name or no default artboard";console.warn(qe),this.eventManager.fire({type:ne.LoadError,data:qe});return}this.artboard=ye,ye.volume=this._volume*me.systemVolume,this.animator=new te(this.runtime,this.artboard,this.eventManager);var it;if(C.length>0||A.length>0?(it=C.concat(A),this.animator.initLinearAnimations(C,q),this.animator.initStateMachines(A,q)):it=[this.animator.atLeastOne(q,!1)],this.taskQueue.add({event:{type:q?ne.Play:ne.Pause,data:it}}),ue){var Le=this.file.defaultArtboardViewModel(ye);if(Le!==null){var at=Le.defaultInstance();if(at!==null){var _t=new tt(at,null);this.bindViewModelInstance(_t)}}}}},P.prototype.drawFrame=function(){var y,C;!((y=document==null?void 0:document.timeline)===null||y===void 0)&&y.currentTime?this.loaded&&this.artboard&&!this.frameRequestId&&(this._boundDraw(document.timeline.currentTime),(C=this.runtime)===null||C===void 0||C.resolveAnimationFrame()):this.startRendering()},P.prototype.draw=function(y,C){var A;this.frameRequestId=null;var q=performance.now();this.lastRenderTime||(this.lastRenderTime=y),this.renderSecondTimer+=y-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,C==null||C());var ue=(y-this.lastRenderTime)/1e3;this.lastRenderTime=y;for(var ye=this.animator.animations.filter(function($n){return $n.playing||$n.needsScrub}).sort(function($n){return $n.needsScrub?-1:1}),qe=0,it=ye;qe<it.length;qe++){var Le=it[qe];Le.advance(ue),Le.instance.didLoop&&(Le.loopCount+=1),Le.apply(1)}for(var at=this.animator.stateMachines.filter(function($n){return $n.playing}),_t=0,Yt=at;_t<Yt.length;_t++){var Et=Yt[_t],Hn=Et.reportedEventCount();if(Hn)for(var Pn=0;Pn<Hn;Pn++){var Cn=Et.reportedEventAt(Pn);if(Cn)if(Cn.type===ie.OpenUrl){if(this.eventManager.fire({type:ne.RiveEvent,data:Cn}),this.automaticallyHandleEvents){var rn=document.createElement("a"),ln=Cn,xr=ln.url,Ze=ln.target,_r=(0,m.sanitizeUrl)(xr);xr&&rn.setAttribute("href",_r),Ze&&rn.setAttribute("target",Ze),_r&&_r!==m.BLANK_URL&&rn.click()}}else this.eventManager.fire({type:ne.RiveEvent,data:Cn})}Et.advanceAndApply(ue)}this.animator.stateMachines.length==0&&this.artboard.advance(ue);var Wn=this.renderer;Wn.clear(),Wn.save(),this.alignRenderer(),this._hasZeroSize||this.artboard.draw(Wn),Wn.restore(),Wn.flush(),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(ue),this.frameCount++;var dt=performance.now();for(this.frameTimes.push(dt),this.durations.push(dt-q);this.frameTimes[0]<=dt-1e3;)this.frameTimes.shift(),this.durations.shift();(A=this._viewModelInstance)===null||A===void 0||A.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,C=y.renderer,A=y.runtime,q=y._layout,ue=y.artboard;C.align(q.runtimeFit(A),q.runtimeAlignment(A),{minX:q.minX,minY:q.minY,maxX:q.maxX,maxY:q.maxY},ue.bounds,this._devicePixelRatioUsed*q.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,C){return y+C},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),P.prototype.cleanup=function(){var y,C;this.destroyed=!0,this.stopRendering(),this.cleanupInstances(),this._observed!==null&&L.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&&(me.remove(this._audioEventListener),this._audioEventListener=null),(C=this._viewModelInstance)===null||C===void 0||C.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 C;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 A=this.artboard.textRun(y);if(!A){console.warn("Could not access a text run with name '".concat(y,"' in the '").concat((C=this.artboard)===null||C===void 0?void 0:C.name,"' Artboard. Note that you must rename a text run node in the Rive editor to make it queryable at runtime."));return}return A},P.prototype.getTextRunValue=function(y){var C=this.retrieveTextRun(y);return C?C.text:void 0},P.prototype.setTextRunValue=function(y,C){var A=this.retrieveTextRun(y);A&&(A.text=C)},P.prototype.play=function(y,C){var A=this;if(y=wn(y),!this.readyForPlaying){this.taskQueue.add({action:function(){return A.play(y,C)}});return}this.animator.play(y),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},P.prototype.pause=function(y){var C=this;if(y=wn(y),!this.readyForPlaying){this.taskQueue.add({action:function(){return C.pause(y)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(y)},P.prototype.scrub=function(y,C){var A=this;if(y=wn(y),!this.readyForPlaying){this.taskQueue.add({action:function(){return A.scrub(y,C)}});return}this.animator.scrub(y,C||0),this.drawFrame()},P.prototype.stop=function(y){var C=this;if(y=wn(y),!this.readyForPlaying){this.taskQueue.add({action:function(){return C.stop(y)}});return}this.animator&&this.animator.stop(y),this.eventCleanup&&this.eventCleanup()},P.prototype.reset=function(y){var C,A,q=y==null?void 0:y.artboard,ue=wn(y==null?void 0:y.animations),ye=wn(y==null?void 0:y.stateMachines),qe=(C=y==null?void 0:y.autoplay)!==null&&C!==void 0?C:!1,it=(A=y==null?void 0:y.autoBind)!==null&&A!==void 0?A:!1;this.cleanupInstances(),this.initArtboard(q,ue,ye,qe,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 C=this.canvas.getBoundingClientRect(),A=C.width,q=C.height,ue=y||window.devicePixelRatio||1;if(this.devicePixelRatioUsed=ue,this.canvas.width=ue*A,this.canvas.height=ue*q,this.resizeToCanvas(),this.drawFrame(),this.layout.fit===H.Layout){var ye=this._layout.layoutScaleFactor;this.artboard.width=A/ye,this.artboard.height=q/ye}}},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=[],C=0;C<this.artboard.animationCount();C++)y.push(this.artboard.animationByIndex(C).name);return y},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"stateMachineNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var y=[],C=0;C<this.artboard.stateMachineCount();C++)y.push(this.artboard.stateMachineByIndex(C).name);return y},enumerable:!1,configurable:!0}),P.prototype.stateMachineInputs=function(y){if(this.loaded){var C=this.animator.stateMachines.find(function(A){return A.name===y});return C==null?void 0:C.inputs}},P.prototype.retrieveInputAtPath=function(y,C){if(!y){console.warn("No input name provided for path '".concat(C,"'"));return}if(!this.artboard){console.warn("Tried to access input: '".concat(y,"', at path: '").concat(C,"', but the Artboard is null"));return}var A=this.artboard.inputByPath(y,C);if(!A){console.warn("Could not access an input with name: '".concat(y,"', at path:'").concat(C,"'"));return}return A},P.prototype.setBooleanStateAtPath=function(y,C,A){var q=this.retrieveInputAtPath(y,A);q&&(q.type===N.Boolean?q.asBool().value=C:console.warn("Input with name: '".concat(y,"', at path:'").concat(A,"' is not a boolean")))},P.prototype.setNumberStateAtPath=function(y,C,A){var q=this.retrieveInputAtPath(y,A);q&&(q.type===N.Number?q.asNumber().value=C:console.warn("Input with name: '".concat(y,"', at path:'").concat(A,"' is not a number")))},P.prototype.fireStateAtPath=function(y,C){var A=this.retrieveInputAtPath(y,C);A&&(A.type===N.Trigger?A.asTrigger().fire():console.warn("Input with name: '".concat(y,"', at path:'").concat(C,"' is not a trigger")))},P.prototype.retrieveTextAtPath=function(y,C){if(!y){console.warn("No text name provided for path '".concat(C,"'"));return}if(!C){console.warn("No path provided for text '".concat(y,"'"));return}if(!this.artboard){console.warn("Tried to access text: '".concat(y,"', at path: '").concat(C,"', but the Artboard is null"));return}var A=this.artboard.textByPath(y,C);if(!A){console.warn("Could not access text with name: '".concat(y,"', at path:'").concat(C,"'"));return}return A},P.prototype.getTextRunValueAtPath=function(y,C){var A=this.retrieveTextAtPath(y,C);if(!A){console.warn("Could not get text with name: '".concat(y,"', at path:'").concat(C,"'"));return}return A.text},P.prototype.setTextRunValueAtPath=function(y,C,A){var q=this.retrieveTextAtPath(y,A);if(!q){console.warn("Could not set text with name: '".concat(y,"', at path:'").concat(A,"'"));return}q.text=C},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,C){this.eventManager.add({type:y,callback:C})},P.prototype.off=function(y,C){this.eventManager.remove({type:y,callback:C})},P.prototype.unsubscribe=function(y,C){console.warn("This function is deprecated: please use `off()` instead."),this.off(y,C)},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:[]},C=0;C<this.file.artboardCount();C++){for(var A=this.file.artboardByIndex(C),q={name:A.name,animations:[],stateMachines:[]},ue=0;ue<A.animationCount();ue++){var ye=A.animationByIndex(ue);q.animations.push(ye.name)}for(var qe=0;qe<A.stateMachineCount();qe++){for(var it=A.stateMachineByIndex(qe),Le=it.name,at=new this.runtime.StateMachineInstance(it,A),_t=[],Yt=0;Yt<at.inputCount();Yt++){var Et=at.input(Yt);_t.push({name:Et.name,type:Et.type})}q.stateMachines.push({name:Le,inputs:_t})}y.artboards.push(q)}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*me.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 C;this.artboard&&!this.destroyed&&y&&y.runtimeInstance&&(y.internalIncrementReferenceCount(),(C=this._viewModelInstance)===null||C===void 0||C.cleanup(),this._viewModelInstance=y,this.animator.stateMachines.length>0?this.animator.stateMachines.forEach(function(A){return A.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 C=this.file.viewModelByIndex(y);return C!==null?new Ke(C):null},P.prototype.viewModelByName=function(y){var C=this.file.viewModelByName(y);return C!==null?new Ke(C):null},P.prototype.enums=function(){if(this._dataEnums===null){var y=this.file.enums();this._dataEnums=y.map(function(C){return new et(C)})}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 C,A;return(A=(C=this.riveFile)===null||C===void 0?void 0:C.getArtboard(y))!==null&&A!==void 0?A: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 C=this._viewModel.instanceByIndex(y);return C!==null?new tt(C,null):null},P.prototype.instanceByName=function(y){var C=this._viewModel.instanceByName(y);return C!==null?new tt(C,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}(),et=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}(),Be;(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"})(Be||(Be={}));var tt=function(){function P(y,C){this._parents=[],this._children=[],this._viewModelInstances=new Map,this._propertiesWithCallbacks=[],this._referenceCount=0,this._runtimeInstance=y,C!==null&&this._parents.push(C)}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 C=this._parents.indexOf(y);if(C!==-1){var A=this._parents[C];A.removeFromViewModelCallbacks(this),this._parents.splice(C,1)}},P.prototype.addToPropertyCallbacks=function(y){var C=this;this._propertiesWithCallbacks.includes(y)||(this._propertiesWithCallbacks.push(y),this._propertiesWithCallbacks.length>0&&this._parents.forEach(function(A){A.addToViewModelCallbacks(C)}))},P.prototype.removeFromPropertyCallbacks=function(y){var C=this;this._propertiesWithCallbacks.includes(y)&&(this._propertiesWithCallbacks=this._propertiesWithCallbacks.filter(function(A){return A!==y}),this._children.length===0&&this._propertiesWithCallbacks.length===0&&this._parents.forEach(function(A){A.removeFromViewModelCallbacks(C)}))},P.prototype.addToViewModelCallbacks=function(y){var C=this;this._children.includes(y)||(this._children.push(y),this._parents.forEach(function(A){A.addToViewModelCallbacks(C)}))},P.prototype.removeFromViewModelCallbacks=function(y){var C=this;this._children.includes(y)&&(this._children=this._children.filter(function(A){return A!==y}),this._children.length===0&&this._propertiesWithCallbacks.length===0&&this._parents.forEach(function(A){A.removeFromViewModelCallbacks(C)}))},P.prototype.clearCallbacks=function(){this._propertiesWithCallbacks.forEach(function(y){y.clearCallbacks()})},P.prototype.propertyFromPath=function(y,C){var A=y.split("/");return this.propertyFromPathSegments(A,0,C)},P.prototype.viewModelFromPathSegments=function(y,C){var A=this.internalViewModelInstance(y[C]);return A!==null?C==y.length-1?A:A.viewModelFromPathSegments(y,C++):null},P.prototype.propertyFromPathSegments=function(y,C,A){var q,ue,ye,qe,it,Le,at,_t,Yt,Et,Hn,Pn,Cn,rn,ln,xr,Ze,_r;if(C<y.length-1){var Wn=this.internalViewModelInstance(y[C]);return Wn!==null?Wn.propertyFromPathSegments(y,C+1,A):null}var dt=null;switch(A){case Be.Number:if(dt=(ue=(q=this._runtimeInstance)===null||q===void 0?void 0:q.number(y[C]))!==null&&ue!==void 0?ue:null,dt!==null)return new Ot(dt,this);break;case Be.String:if(dt=(qe=(ye=this._runtimeInstance)===null||ye===void 0?void 0:ye.string(y[C]))!==null&&qe!==void 0?qe:null,dt!==null)return new ut(dt,this);break;case Be.Boolean:if(dt=(Le=(it=this._runtimeInstance)===null||it===void 0?void 0:it.boolean(y[C]))!==null&&Le!==void 0?Le:null,dt!==null)return new Kt(dt,this);break;case Be.Color:if(dt=(_t=(at=this._runtimeInstance)===null||at===void 0?void 0:at.color(y[C]))!==null&&_t!==void 0?_t:null,dt!==null)return new Tr(dt,this);break;case Be.Trigger:if(dt=(Et=(Yt=this._runtimeInstance)===null||Yt===void 0?void 0:Yt.trigger(y[C]))!==null&&Et!==void 0?Et:null,dt!==null)return new Zn(dt,this);break;case Be.Enum:if(dt=(Pn=(Hn=this._runtimeInstance)===null||Hn===void 0?void 0:Hn.enum(y[C]))!==null&&Pn!==void 0?Pn:null,dt!==null)return new kn(dt,this);break;case Be.List:if(dt=(rn=(Cn=this._runtimeInstance)===null||Cn===void 0?void 0:Cn.list(y[C]))!==null&&rn!==void 0?rn:null,dt!==null)return new Sr(dt,this);break;case Be.Image:if(dt=(xr=(ln=this._runtimeInstance)===null||ln===void 0?void 0:ln.image(y[C]))!==null&&xr!==void 0?xr:null,dt!==null)return new po(dt,this);break;case Be.Artboard:if(dt=(_r=(Ze=this._runtimeInstance)===null||Ze===void 0?void 0:Ze.artboard(y[C]))!==null&&_r!==void 0?_r:null,dt!==null)return new Li(dt,this);break}return null},P.prototype.internalViewModelInstance=function(y){var C;if(this._viewModelInstances.has(y))return this._viewModelInstances.get(y);var A=(C=this._runtimeInstance)===null||C===void 0?void 0:C.viewModel(y);if(A!==null){var q=new P(A,this);return q.internalIncrementReferenceCount(),this._viewModelInstances.set(y,q),q}return null},P.prototype.number=function(y){var C=this.propertyFromPath(y,Be.Number);return C},P.prototype.string=function(y){var C=this.propertyFromPath(y,Be.String);return C},P.prototype.boolean=function(y){var C=this.propertyFromPath(y,Be.Boolean);return C},P.prototype.color=function(y){var C=this.propertyFromPath(y,Be.Color);return C},P.prototype.trigger=function(y){var C=this.propertyFromPath(y,Be.Trigger);return C},P.prototype.enum=function(y){var C=this.propertyFromPath(y,Be.Enum);return C},P.prototype.list=function(y){var C=this.propertyFromPath(y,Be.List);return C},P.prototype.image=function(y){var C=this.propertyFromPath(y,Be.Image);return C},P.prototype.artboard=function(y){var C=this.propertyFromPath(y,Be.Artboard);return C},P.prototype.viewModel=function(y){var C=y.split("/"),A=C.length>1?this.viewModelFromPathSegments(C.slice(0,C.length-1),0):this;return A!=null?A.internalViewModelInstance(C[C.length-1]):null},P.prototype.internalReplaceViewModel=function(y,C){var A;if(C.runtimeInstance!==null){var q=((A=this._runtimeInstance)===null||A===void 0?void 0:A.replaceViewModel(y,C.runtimeInstance))||!1;if(q){C.internalIncrementReferenceCount();var ue=this.internalViewModelInstance(y);ue!==null&&(ue.removeParent(this),this._children.includes(ue)&&(this._children=this._children.filter(function(ye){return ye!==ue})),ue.cleanup()),this._viewModelInstances.set(y,C),C.addParent(this)}return q}return!1},P.prototype.replaceViewModel=function(y,C){var A,q=y.split("/"),ue=q.length>1?this.viewModelFromPathSegments(q.slice(0,q.length-1),0):this;return(A=ue==null?void 0:ue.internalReplaceViewModel(q[q.length-1],C))!==null&&A!==void 0?A:!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(C){return T({},C)}))||[]},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(q){q.cleanup()}),this._viewModelInstances.clear();var C=O([],this._children,!0);this._children.length=0;var A=O([],this._parents,!0);this._parents.length=0,C.forEach(function(q){q.removeParent(y)}),A.forEach(function(q){q.removeFromViewModelCallbacks(y)})}},P}(),$e=function(){function P(y,C){this.callbacks=[],this._viewModelInstanceValue=y,this._parentViewModel=C}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(C){return C!==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(C){y.internalHandleCallback(C)})},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}(),ut=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(C){this._viewModelInstanceValue.value=C},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(C){C(this.value)},y}($e),Ot=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(C){this._viewModelInstanceValue.value=C},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(C){C(this.value)},y}($e),Kt=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(C){this._viewModelInstanceValue.value=C},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(C){C(this.value)},y}($e),Zn=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return y.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},y.prototype.internalHandleCallback=function(C){C()},y}($e),kn=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(C){this._viewModelInstanceValue.value=C},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"valueIndex",{get:function(){return this._viewModelInstanceValue.valueIndex},set:function(C){this._viewModelInstanceValue.valueIndex=C},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"values",{get:function(){return this._viewModelInstanceValue.values},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(C){C(this.value)},y}($e),Sr=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return Object.defineProperty(y.prototype,"length",{get:function(){return this._viewModelInstanceValue.size},enumerable:!1,configurable:!0}),y.prototype.addInstance=function(C){C.runtimeInstance!=null&&(this._viewModelInstanceValue.addInstance(C.runtimeInstance),C.addParent(this._parentViewModel))},y.prototype.addInstanceAt=function(C,A){return C.runtimeInstance!=null&&this._viewModelInstanceValue.addInstanceAt(C.runtimeInstance,A)?(C.addParent(this._parentViewModel),!0):!1},y.prototype.removeInstance=function(C){C.runtimeInstance!=null&&(this._viewModelInstanceValue.removeInstance(C.runtimeInstance),C.removeParent(this._parentViewModel))},y.prototype.removeInstanceAt=function(C){this._viewModelInstanceValue.removeInstanceAt(C)},y.prototype.instanceAt=function(C){var A=this._viewModelInstanceValue.instanceAt(C);if(A!=null){var q=new tt(A,this._parentViewModel);return q}return null},y.prototype.swap=function(C,A){this._viewModelInstanceValue.swap(C,A)},y.prototype.internalHandleCallback=function(C){C()},y}($e),Tr=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return Object.defineProperty(y.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(C){this._viewModelInstanceValue.value=C},enumerable:!1,configurable:!0}),y.prototype.rgb=function(C,A,q){this._viewModelInstanceValue.rgb(C,A,q)},y.prototype.rgba=function(C,A,q,ue){this._viewModelInstanceValue.argb(ue,C,A,q)},y.prototype.argb=function(C,A,q,ue){this._viewModelInstanceValue.argb(C,A,q,ue)},y.prototype.alpha=function(C){this._viewModelInstanceValue.alpha(C)},y.prototype.opacity=function(C){this._viewModelInstanceValue.alpha(Math.round(Math.max(0,Math.min(1,C))*255))},y.prototype.internalHandleCallback=function(C){C(this.value)},y}($e),po=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return Object.defineProperty(y.prototype,"value",{set:function(C){var A;this._viewModelInstanceValue.value((A=C==null?void 0:C.nativeImage)!==null&&A!==void 0?A:null)},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(C){C()},y}($e),Li=function(P){g(y,P);function y(C,A){return P.call(this,C,A)||this}return Object.defineProperty(y.prototype,"value",{set:function(C){var A;this._viewModelInstanceValue.value((A=C==null?void 0:C.nativeArtboard)!==null&&A!==void 0?A:null)},enumerable:!1,configurable:!0}),y.prototype.internalHandleCallback=function(C){C()},y}($e),ia=function(P){return x(void 0,void 0,void 0,function(){var y,C,A;return S(this,function(q){switch(q.label){case 0:return y=new Request(P),[4,fetch(y)];case 1:return C=q.sent(),[4,C.arrayBuffer()];case 2:return A=q.sent(),[2,A]}})})},wn=function(P){return typeof P=="string"?[P]:P instanceof Array?P:[]},Di={EventManager:Ae,TaskQueueManager:Ge},zn=function(P){return x(void 0,void 0,void 0,function(){var y,C,A;return S(this,function(q){switch(q.label){case 0:return y=new Promise(function(ue){return j.getInstance(function(ye){ye.decodeAudio(P,ue)})}),[4,y];case 1:return C=q.sent(),A=new m.AudioWrapper(C),m.finalizationRegistry.register(A,C),[2,A]}})})},Ni=function(P){return x(void 0,void 0,void 0,function(){var y,C,A;return S(this,function(q){switch(q.label){case 0:return y=new Promise(function(ue){return j.getInstance(function(ye){ye.decodeImage(P,ue)})}),[4,y];case 1:return C=q.sent(),A=new m.ImageWrapper(C),m.finalizationRegistry.register(A,C),[2,A]}})})},oa=function(P){return x(void 0,void 0,void 0,function(){var y,C,A;return S(this,function(q){switch(q.label){case 0:return y=new Promise(function(ue){return j.getInstance(function(ye){ye.decodeFont(P,ue)})}),[4,y];case 1:return C=q.sent(),A=new m.FontWrapper(C),m.finalizationRegistry.register(A,C),[2,A]}})})}})(),a})())}(uu)),uu.exports}var Mh=z_();function H_(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 W_=({restored:n})=>{const e=Se.useRef(null),t=Se.useRef(null);return Se.useEffect(()=>{const r=t.current,o=e.current;if(r==null||o==null)return;const a=new Mh.Rive({src:"https://assets.nlx.ai/touchpoint/voice-plus-animation.riv",canvas:r,autoBind:!0,autoplay:!0,stateMachines:"State Machine 1",layout:new Mh.Layout({fit:Mh.Fit.Fill}),onLoad:()=>{a.resizeDrawingSurfaceToCanvas();const d=a.viewModelInstance;if(d!=null){const h=d.trigger("run"),m=d.trigger("runNoWave"),g=d.color("color"),T=d.number("voiceInput");T!=null&&(T.value=100),g==null||g.rgba(...H_("var(--accent)",o)),n?m==null||m.trigger():h==null||h.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%"}})]})},Ky=Se.forwardRef((n,e)=>{var xe;const t=sessionStorage.getItem("nlxActiveVoiceConversationId")===n.config.conversationId,r=Se.useMemo(()=>{const de=sessionStorage.getItem("nlxActiveConversationResponses")??"{}";try{const L=JSON.parse(de);if(Array.isArray(L[n.config.conversationId]))return L[n.config.conversationId]}catch{return null}},[n.config.conversationId]),o=Se.useMemo(()=>ww({responses:r,...n.config}),[n.config,r]),[a,l]=Se.useState([]),d=((xe=a[a.length-1])==null?void 0:xe.type)===Fn.User,h=n.colorMode??"dark",[m,g]=Se.useState(n.embedded||t),T=kw(n.config),[x,S]=Se.useState(!1),O=Se.useRef(n.embedded||t),M=n.input??"text",z=Se.useCallback(()=>{sessionStorage.removeItem("nlxActiveVoiceConversationId"),(M==="voice"||M==="voiceMini")&&(V.current=!1,o.reset({clearResponses:!0}),sessionStorage.removeItem("nlxConversationId"))},[o,M]),H=n.onClose,ce=Se.useCallback(de=>{H!=null&&(H(de),z(),de.defaultPrevented||g(!1))},[H,g,z]);Se.useEffect(()=>{O.current=m},[m]),Se.useImperativeHandle(e,()=>({setExpanded(de){de?g(!0):(z(),g(!1))},getExpanded(){return O.current},getConversationHandler(){return o},setCustomBidirectionalCommands:de=>{K.current(de)}}),[o,g,z]),Se.useEffect(()=>{const de=L=>{l(L);const Z=o.currentConversationId();M==="text"&&Z!=null&&sessionStorage.setItem("nlxActiveConversationResponses",JSON.stringify({[Z]:L}))};return o.subscribe(de),()=>{o.unsubscribe(de)}},[o,l,M]);const V=Se.useRef(t);Se.useEffect(()=>{if(!m||V.current)return;V.current=!0,(M!=="text"||r==null||r.length===0)&&n.initializeConversation(o,n.initialContext);const de=o.currentConversationId();de!=null&&sessionStorage.setItem("nlxActiveVoiceConversationId",de)},[o,m,z,M,n,r]);const j=Se.useRef({formElements:{},links:{},customCommands:new Map}),N=Se.useRef([]),K=Se.useRef(de=>{var L;if(((L=n.bidirectional)==null?void 0:L.automaticContext)!==!1)N.current=de;else throw new Error("Custom commands can only be set when automatic context is enabled.")});Se.useEffect(()=>{if(m&&n.bidirectional!=null&&n.bidirectional.automaticContext!==!1){const{teardown:de,onCustomCommandsChange:L}=j_(o,N.current,n.bidirectional.customizeAutomaticContext??(Z=>Z),Z=>{j.current=Z});return K.current=L,de}},[m,o,n.bidirectional]),Se.useEffect(()=>{if(n.bidirectional!=null&&(n.bidirectional.navigation!=null||n.bidirectional.input!=null||n.bidirectional.custom!=null||n.bidirectional.automaticContext!==!1))return B_(o,n.bidirectional,j)},[n.bidirectional,o]);const ie=n.windowSize??(n.embedded?"full":"half"),X=Se.useMemo(()=>{const de=Om(Z=>Z.type===Fn.Application,a);if(de===-1)return null;const L=a[de];return(L==null?void 0:L.type)!==Fn.Application?null:{index:de,response:L}},[a]),Q=Se.useMemo(()=>{if(X==null)return;const de=Om(Z=>Z.choices.length>0,X.response.payload.messages);if(de===-1)return;const L=X.response.payload.messages[de];if(L!=null)return{message:L,messageIndex:de,responseIndex:X.index}},[X]),[te,ne]=Se.useState({}),fe=n.customModalities??{},[Ae,Ge]=Se.useState(!0),[re,Ie]=Se.useState(0),me=()=>{o.reset({clearResponses:!0}),z(),M!=="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(L=>L+1)};if(o==null)return null;if(!m)return n.launchIcon!==!1?R.jsx(su,{className:"fixed z-launchButton bottom-2 right-2 w-fit",theme:n.theme,colorMode:h,children:R.jsx(Hw,{className:"backdrop-blur",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(M==="voiceMini")return R.jsx(R.Fragment,{children:R.jsxs(su,{theme:n.theme,colorMode:h,className:st("w-fit",n.embedded?"":"fixed z-touchpoint bottom-2 right-2"),children:[n.animate?R.jsx(W_,{restored:t}):null,R.jsx(zx,{handler:o,context:n.initialContext,onClose:()=>{ce(new Event("close"))},renderCollapse:n.onClose!=null,customModalities:fe},re)]})});const ae=()=>{var de,L;return x?R.jsx(ly,{reset:()=>{me(),S(!1)},className:st("flex-none",ie==="full"?"w-full md:max-w-content md:mx-auto":""),onClose:()=>{S(!1)},handler:o}):T?R.jsxs(R.Fragment,{children:[R.jsx(kx,{enabled:n.enabled,userMessageBubble:n.userMessageBubble??!1,agentMessageBubble:n.agentMessageBubble??!1,chatMode:n.chatMode??!1,isWaiting:d,lastApplicationResponseIndex:X==null?void 0:X.index,responses:a,colorMode:h,handler:o,uploadedFiles:te,customModalities:fe,className:st("flex-grow",ie==="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",ie==="full"?"w-full md:max-w-content md:mx-auto":""),children:[Q!=null?R.jsx(vx,{...Q,handler:o}):null,(Q==null?void 0:Q.message.selectedChoiceId)!=null?null:R.jsx(jx,{enabled:n.enabled,handler:o,uploadUrl:(L=(de=X==null?void 0:X.response.payload.metadata)==null?void 0:de.uploadUrls)==null?void 0:L[0],onFileUpload:({uploadId:Z,file:We})=>{ne(Ke=>({...Ke,[Z]:We}))}})]})]}):R.jsx(yg,{})};return R.jsxs(su,{theme:n.theme,colorMode:h,className:st("grid grid-cols-2 xl:grid-cols-[1fr_632px]",n.embedded?"w-full h-full":"fixed inset-0 z-touchpoint"),children:[ie==="half"?R.jsx("div",{className:"hidden md:block bg-overlay"}):null,R.jsxs("div",{className:st("w-full bg-background text-primary-80 flex relative flex-col h-full backdrop-blur-overlay",{"col-span-2 md:col-span-1":ie==="half","col-span-2":ie==="full"}),children:[R.jsx(Jw,{windowSize:n.embedded?"embedded":ie,errorThemedCloseButton:M==="voice",speakerControls:M==="voice"?{enabled:Ae,setEnabled:Ge}:void 0,colorMode:h,brandIcon:n.brandIcon,isSettingsOpen:x,enabled:n.enabled,toggleSettings:n.enableSettings?()=>{S(de=>!de)}:void 0,renderCollapse:n.onClose!=null,collapse:ce,reset:me}),M==="text"?ae():R.jsxs(R.Fragment,{children:[x?R.jsx(ly,{className:st("flex-none",ie==="full"?"w-full md:max-w-content md:mx-auto":""),onClose:()=>{S(!1)},reset:()=>{me(),S(!1)},handler:o}):null,R.jsx(N2,{brandIcon:n.brandIcon,handler:o,speakersEnabled:Ae,colorMode:h,className:x?"hidden":"flex-grow",context:n.initialContext,customModalities:fe},re)]})]})]})});Ky.displayName="App";const Yy=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-family);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*{font-family:var(--font-family)!important}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.-top-2{top:-.5rem}.bottom-2{bottom:.5rem}.bottom-4{bottom:1rem}.bottom-\\[72px\\]{bottom:72px}.left-0{left:0}.left-1\\/2{left:50%}.right-0{right:0}.right-2{right:.5rem}.top-0{top:0}.top-1\\/2{top:50%}.z-10{z-index:10}.z-launchButton{z-index:100}.z-touchpoint{z-index:1000}.col-span-1{grid-column:span 1 / span 1}.col-span-2{grid-column:span 2 / span 2}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-2{margin-bottom:.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-10{margin-right:2.5rem}.mr-2{margin-right:.5rem}.block{display:block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-10{height:2.5rem}.h-20{height:5rem}.h-24{height:6rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-52{height:13rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-72{height:18rem}.h-8{height:2rem}.h-\\[128px\\]{height:128px}.h-\\[1px\\]{height:1px}.h-\\[360px\\]{height:360px}.h-full{height:100%}.max-h-\\[360px\\]{max-height:360px}.max-h-\\[40vh\\]{max-height:40vh}.max-h-full{max-height:100%}.min-h-full{min-height:100%}.w-10{width:2.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-\\[128px\\]{width:128px}.w-\\[calc\\(100vw-16px\\)\\]{width:calc(100vw - 16px)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-\\[360px\\]{max-width:360px}.max-w-content{max-width:640px}.flex-none{flex:none}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.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-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.space-y-px>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1px * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-full{border-radius:9999px}.rounded-inner{border-radius:var(--inner-border-radius)}.rounded-outer{border-radius:var(--outer-border-radius)}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-background{border-color:var(--background)}.border-primary-10{border-color:var(--primary-10)}.bg-\\[rgb\\(175\\,175\\,175\\)\\]{--tw-bg-opacity: 1;background-color:rgb(175 175 175 / var(--tw-bg-opacity))}.bg-\\[rgb\\(40\\,41\\,47\\)\\]{--tw-bg-opacity: 1;background-color:rgb(40 41 47 / var(--tw-bg-opacity))}.bg-accent{background-color:var(--accent)}.bg-background{background-color:var(--background)}.bg-black\\/50{background-color:#00000080}.bg-current{background-color:currentColor}.bg-error-primary{background-color:var(--error-primary)}.bg-error-secondary{background-color:var(--error-secondary)}.bg-overlay{background-color:var(--overlay)}.bg-primary-10{background-color:var(--primary-10)}.bg-primary-5{background-color:var(--primary-5)}.bg-primary-80{background-color:var(--primary-80)}.bg-secondary-40{background-color:var(--secondary-40)}.bg-secondary-60{background-color:var(--secondary-60)}.bg-transparent{background-color:transparent}.bg-cover{background-size:cover}.bg-center{background-position:center}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0{padding-top:0;padding-bottom:0}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pl-4{padding-left:1rem}.pr-2{padding-right:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-sans{font-family:var(--font-family)}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-normal{font-weight:400}.text-accent{color:var(--accent)}.text-accent-20{color:var(--accent-20)}.text-error-primary{color:var(--error-primary)}.text-primary-20{color:var(--primary-20)}.text-primary-40{color:var(--primary-40)}.text-primary-60{color:var(--primary-60)}.text-primary-80{color:var(--primary-80)}.text-secondary-40{color:var(--secondary-40)}.text-secondary-80{color:var(--secondary-80)}.placeholder-primary-20::-moz-placeholder{color:var(--primary-20)}.placeholder-primary-20::placeholder{color:var(--primary-20)}.placeholder-primary-40::-moz-placeholder{color:var(--primary-40)}.placeholder-primary-40::placeholder{color:var(--primary-40)}.caret-accent{caret-color:var(--accent)}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-\\[0\\.01\\]{opacity:.01}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-0{outline-width:0px}.outline-2{outline-width:2px}.outline-accent{outline-color:var(--accent)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));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)}.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{--tw-backdrop-blur: blur(8px);-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-md{--tw-backdrop-blur: blur(12px);-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(48px);-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,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}@property --glow-opacity{syntax: "<percentage>"; inherits: false; initial-value: 0%;}.fullscreen-error svg{animation:error-glow 3s ease infinite;--glow-opacity: 0%;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:8%;--glow-opacity: 0%}22%{color:var(--primary);fill-opacity:8%;--glow-opacity: 0%}35%{color:var(--accent);fill-opacity:80%;--glow-opacity: 60%}45%{color:var(--accent);fill-opacity:70%;--glow-opacity: 30%}55%{color:var(--accent);fill-opacity:60%;--glow-opacity: 60%}60%{color:var(--primary);fill-opacity:8%;--glow-opacity: 0%}to{color:var(--primary);fill-opacity:8%;--glow-opacity: 0%}}.markdown ul{list-style-position:inside;list-style-type:disc}.markdown ol{list-style-position:inside;list-style-type:decimal}.markdown hr{border-color:var(--primary-20)}.markdown a{text-decoration-line:underline}.markdown h1,.markdown h2,.markdown h3{font-weight:700}.placeholder\\:text-primary-40::-moz-placeholder{color:var(--primary-40)}.placeholder\\:text-primary-40::placeholder{color:var(--primary-40)}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:inset-0:before{content:var(--tw-content);top:0;right:0;bottom:0;left:0}.before\\:-z-10:before{content:var(--tw-content);z-index:-10}.before\\:bg-transparent:before{content:var(--tw-content);background-color:transparent}.before\\:transition-colors:before{content:var(--tw-content);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.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);top:0;right:0;bottom:0;left:0}.after\\:rounded-outer:after{content:var(--tw-content);border-radius:var(--outer-border-radius)}.after\\:content-\\[\\'\\'\\]:after{--tw-content: "";content:var(--tw-content)}.last\\:h-full:last-child{height:100%}.hover\\:bg-primary-10:hover{background-color:var(--primary-10)}.hover\\:bg-primary-5:hover{background-color:var(--primary-5)}.hover\\:bg-primary-80:hover{background-color:var(--primary-80)}.hover\\:bg-secondary-20:hover{background-color:var(--secondary-20)}.hover\\:text-primary-80:hover{color:var(--primary-80)}.hover\\:after\\:bg-primary-10:hover:after{content:var(--tw-content);background-color:var(--primary-10)}.focus\\:outline-0:focus{outline-width:0px}.focus\\:before\\:bg-primary-10:focus:before{content:var(--tw-content);background-color:var(--primary-10)}.focus\\:before\\:bg-primary-40:focus:before{content:var(--tw-content);background-color:var(--primary-40)}.focus\\:before\\:bg-primary-5:focus:before{content:var(--tw-content);background-color:var(--primary-5)}.focus\\:before\\:bg-primary-80:focus:before{content:var(--tw-content);background-color:var(--primary-80)}.enabled\\:hover\\:before\\:bg-primary-10:hover:enabled:before{content:var(--tw-content);background-color:var(--primary-10)}.enabled\\:hover\\:before\\:bg-primary-40:hover:enabled:before{content:var(--tw-content);background-color:var(--primary-40)}.enabled\\:hover\\:before\\:bg-primary-5:hover:enabled:before{content:var(--tw-content);background-color:var(--primary-5)}.enabled\\:hover\\:before\\:bg-primary-80:hover:enabled:before{content:var(--tw-content);background-color:var(--primary-80)}.enabled\\:active\\:before\\:bg-secondary-10:active:enabled:before{content:var(--tw-content);background-color:var(--secondary-10)}.disabled\\:bg-accent-20:disabled{background-color:var(--accent-20)}.disabled\\:bg-primary-10:disabled{background-color:var(--primary-10)}.disabled\\:bg-primary-5:disabled{background-color:var(--primary-5)}.disabled\\:bg-secondary-20:disabled{background-color:var(--secondary-20)}.disabled\\:text-primary-20:disabled{color:var(--primary-20)}.disabled\\:text-primary-40:disabled{color:var(--primary-40)}.disabled\\:text-secondary-40:disabled{color:var(--secondary-40)}@media (min-width: 768px){.md\\:absolute{position:absolute}.md\\:left-0{left:0}.md\\:right-0{right:0}.md\\:top-0{top:0}.md\\:-order-1{order:-1}.md\\:col-span-1{grid-column:span 1 / span 1}.md\\:mx-auto{margin-left:auto;margin-right:auto}.md\\:block{display:block}.md\\:w-fit{width:-moz-fit-content;width:fit-content}.md\\:max-w-content{max-width:640px}.md\\:-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:flex-col{flex-direction:column}.md\\:p-3{padding:.75rem}}@media (min-width: 1280px){.xl\\:grid-cols-\\[1fr_632px\\]{grid-template-columns:1fr 632px}}`,Zs=({children:n,className:e,faded:t})=>R.jsx("p",{className:st("text-base",t?"text-primary-60":"text-primary-80",e),children:n}),Qy=({children:n,className:e})=>R.jsx("p",{className:st("text-sm text-primary-60",e),children:n}),du=({children:n,className:e,selected:t,onClick:r,href:o,newTab:a})=>{const l=st("block shrink-0 rounded-inner overflow-hidden","w-80 space-y-px",t?"outline outline-2 outline-accent":"",r!=null||o!=null?"hover:bg-primary-5":"",e);return Se.useEffect(()=>{o==null&&a!=null&&console.warn("Setting the `newTab` prop on the `<CustomCard/>` has no effect if the `href` is not also set.")},[o,a]),o!=null?R.jsx("a",{className:l,href:o,onClick:r,...a?{target:"_blank",rel:"noreferrer"}:{},children:n}):r!=null?R.jsx("button",{className:l,onClick:r,children:n}):R.jsx("div",{className:l,children:n})},fu=({src:n,alt:e})=>R.jsx("img",{src:n,alt:e,className:"w-full h-52 object-cover"}),hu=({left:n,right:e,icon:t})=>R.jsxs("div",{className:"flex items-center relative justify-between gap-2 bg-primary-5 px-3 py-4",children:[R.jsx("div",{className:"space-y-1 text-left",children:n}),R.jsx("div",{className:"space-y-1 text-right",children:e}),t!=null?R.jsx(t,{className:"text-primary-60 w-4 h-4 absolute top-1/2 left-1/2 transform -translate-y-1/2 -translate-x-1/2"}):null]});/*! *****************************************************************************
164
164
  Copyright (c) Microsoft Corporation.
165
165
 
166
166
  Permission to use, copy, modify, and/or distribute this software for any