@eka-care/medassist-widget 0.0.24 → 0.0.25
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/dist/medassist-widget.js +16 -16
- package/dist/medassist-widget.js.map +1 -1
- package/package.json +1 -1
package/dist/medassist-widget.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var MedAssistWidget=(function(hs){"use strict";function Ab(n,l){for(var i=0;i<l.length;i++){const o=l[i];if(typeof o!="string"&&!Array.isArray(o)){for(const u in o)if(u!=="default"&&!(u in n)){const s=Object.getOwnPropertyDescriptor(o,u);s&&Object.defineProperty(n,u,s.get?s:{enumerable:!0,get:()=>o[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}var Rl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ms(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ps={exports:{}},oa={};var Gf;function kb(){if(Gf)return oa;Gf=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(o,u,s){var c=null;if(s!==void 0&&(c=""+s),u.key!==void 0&&(c=""+u.key),"key"in u){s={};for(var f in u)f!=="key"&&(s[f]=u[f])}else s=u;return u=s.ref,{$$typeof:n,type:o,key:c,ref:u!==void 0?u:null,props:s}}return oa.Fragment=l,oa.jsx=i,oa.jsxs=i,oa}var Xf;function Nb(){return Xf||(Xf=1,ps.exports=kb()),ps.exports}var O=Nb(),gs={exports:{}},Ue={};var Zf;function Rb(){if(Zf)return Ue;Zf=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function b(N){return N===null||typeof N!="object"?null:(N=v&&N[v]||N["@@iterator"],typeof N=="function"?N:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function _(N,B,z){this.props=N,this.context=B,this.refs=T,this.updater=z||w}_.prototype.isReactComponent={},_.prototype.setState=function(N,B){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,B,"setState")},_.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function A(){}A.prototype=_.prototype;function k(N,B,z){this.props=N,this.context=B,this.refs=T,this.updater=z||w}var q=k.prototype=new A;q.constructor=k,E(q,_.prototype),q.isPureReactComponent=!0;var H=Array.isArray;function M(){}var I={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function F(N,B,z){var re=z.ref;return{$$typeof:n,type:N,key:B,ref:re!==void 0?re:null,props:z}}function $(N,B){return F(N.type,B,N.props)}function ie(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function D(N){var B={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(z){return B[z]})}var ne=/\/+/g;function C(N,B){return typeof N=="object"&&N!==null&&N.key!=null?D(""+N.key):B.toString(36)}function V(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(M,M):(N.status="pending",N.then(function(B){N.status==="pending"&&(N.status="fulfilled",N.value=B)},function(B){N.status==="pending"&&(N.status="rejected",N.reason=B)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function Z(N,B,z,re,ce){var we=typeof N;(we==="undefined"||we==="boolean")&&(N=null);var Te=!1;if(N===null)Te=!0;else switch(we){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(N.$$typeof){case n:case l:Te=!0;break;case g:return Te=N._init,Z(Te(N._payload),B,z,re,ce)}}if(Te)return ce=ce(N),Te=re===""?"."+C(N,0):re,H(ce)?(z="",Te!=null&&(z=Te.replace(ne,"$&/")+"/"),Z(ce,B,z,"",function(He){return He})):ce!=null&&(ie(ce)&&(ce=$(ce,z+(ce.key==null||N&&N.key===ce.key?"":(""+ce.key).replace(ne,"$&/")+"/")+Te)),B.push(ce)),1;Te=0;var ke=re===""?".":re+":";if(H(N))for(var Ae=0;Ae<N.length;Ae++)re=N[Ae],we=ke+C(re,Ae),Te+=Z(re,B,z,we,ce);else if(Ae=b(N),typeof Ae=="function")for(N=Ae.call(N),Ae=0;!(re=N.next()).done;)re=re.value,we=ke+C(re,Ae++),Te+=Z(re,B,z,we,ce);else if(we==="object"){if(typeof N.then=="function")return Z(V(N),B,z,re,ce);throw B=String(N),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return Te}function Q(N,B,z){if(N==null)return N;var re=[],ce=0;return Z(N,re,"","",function(we){return B.call(z,we,ce++)}),re}function se(N){if(N._status===-1){var B=N._result;B=B(),B.then(function(z){(N._status===0||N._status===-1)&&(N._status=1,N._result=z)},function(z){(N._status===0||N._status===-1)&&(N._status=2,N._result=z)}),N._status===-1&&(N._status=0,N._result=B)}if(N._status===1)return N._result.default;throw N._result}var de=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}},L={map:Q,forEach:function(N,B,z){Q(N,function(){B.apply(this,arguments)},z)},count:function(N){var B=0;return Q(N,function(){B++}),B},toArray:function(N){return Q(N,function(B){return B})||[]},only:function(N){if(!ie(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Ue.Activity=y,Ue.Children=L,Ue.Component=_,Ue.Fragment=i,Ue.Profiler=u,Ue.PureComponent=k,Ue.StrictMode=o,Ue.Suspense=m,Ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Ue.__COMPILER_RUNTIME={__proto__:null,c:function(N){return I.H.useMemoCache(N)}},Ue.cache=function(N){return function(){return N.apply(null,arguments)}},Ue.cacheSignal=function(){return null},Ue.cloneElement=function(N,B,z){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var re=E({},N.props),ce=N.key;if(B!=null)for(we in B.key!==void 0&&(ce=""+B.key),B)!Y.call(B,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&B.ref===void 0||(re[we]=B[we]);var we=arguments.length-2;if(we===1)re.children=z;else if(1<we){for(var Te=Array(we),ke=0;ke<we;ke++)Te[ke]=arguments[ke+2];re.children=Te}return F(N.type,ce,re)},Ue.createContext=function(N){return N={$$typeof:c,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:s,_context:N},N},Ue.createElement=function(N,B,z){var re,ce={},we=null;if(B!=null)for(re in B.key!==void 0&&(we=""+B.key),B)Y.call(B,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(ce[re]=B[re]);var Te=arguments.length-2;if(Te===1)ce.children=z;else if(1<Te){for(var ke=Array(Te),Ae=0;Ae<Te;Ae++)ke[Ae]=arguments[Ae+2];ce.children=ke}if(N&&N.defaultProps)for(re in Te=N.defaultProps,Te)ce[re]===void 0&&(ce[re]=Te[re]);return F(N,we,ce)},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(N){return{$$typeof:f,render:N}},Ue.isValidElement=ie,Ue.lazy=function(N){return{$$typeof:g,_payload:{_status:-1,_result:N},_init:se}},Ue.memo=function(N,B){return{$$typeof:h,type:N,compare:B===void 0?null:B}},Ue.startTransition=function(N){var B=I.T,z={};I.T=z;try{var re=N(),ce=I.S;ce!==null&&ce(z,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(M,de)}catch(we){de(we)}finally{B!==null&&z.types!==null&&(B.types=z.types),I.T=B}},Ue.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Ue.use=function(N){return I.H.use(N)},Ue.useActionState=function(N,B,z){return I.H.useActionState(N,B,z)},Ue.useCallback=function(N,B){return I.H.useCallback(N,B)},Ue.useContext=function(N){return I.H.useContext(N)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(N,B){return I.H.useDeferredValue(N,B)},Ue.useEffect=function(N,B){return I.H.useEffect(N,B)},Ue.useEffectEvent=function(N){return I.H.useEffectEvent(N)},Ue.useId=function(){return I.H.useId()},Ue.useImperativeHandle=function(N,B,z){return I.H.useImperativeHandle(N,B,z)},Ue.useInsertionEffect=function(N,B){return I.H.useInsertionEffect(N,B)},Ue.useLayoutEffect=function(N,B){return I.H.useLayoutEffect(N,B)},Ue.useMemo=function(N,B){return I.H.useMemo(N,B)},Ue.useOptimistic=function(N,B){return I.H.useOptimistic(N,B)},Ue.useReducer=function(N,B,z){return I.H.useReducer(N,B,z)},Ue.useRef=function(N){return I.H.useRef(N)},Ue.useState=function(N){return I.H.useState(N)},Ue.useSyncExternalStore=function(N,B,z){return I.H.useSyncExternalStore(N,B,z)},Ue.useTransition=function(){return I.H.useTransition()},Ue.version="19.2.0",Ue}var Kf;function Ol(){return Kf||(Kf=1,gs.exports=Rb()),gs.exports}var P=Ol();const sa=ms(P),Qf=Ab({__proto__:null,default:sa},[P]);var ys={exports:{}},ua={},bs={exports:{}},vs={};var Jf;function Ob(){return Jf||(Jf=1,(function(n){function l(Z,Q){var se=Z.length;Z.push(Q);e:for(;0<se;){var de=se-1>>>1,L=Z[de];if(0<u(L,Q))Z[de]=Q,Z[se]=L,se=de;else break e}}function i(Z){return Z.length===0?null:Z[0]}function o(Z){if(Z.length===0)return null;var Q=Z[0],se=Z.pop();if(se!==Q){Z[0]=se;e:for(var de=0,L=Z.length,N=L>>>1;de<N;){var B=2*(de+1)-1,z=Z[B],re=B+1,ce=Z[re];if(0>u(z,se))re<L&&0>u(ce,z)?(Z[de]=ce,Z[re]=se,de=re):(Z[de]=z,Z[B]=se,de=B);else if(re<L&&0>u(ce,se))Z[de]=ce,Z[re]=se,de=re;else break e}}return Q}function u(Z,Q){var se=Z.sortIndex-Q.sortIndex;return se!==0?se:Z.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var c=Date,f=c.now();n.unstable_now=function(){return c.now()-f}}var m=[],h=[],g=1,y=null,v=3,b=!1,w=!1,E=!1,T=!1,_=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function q(Z){for(var Q=i(h);Q!==null;){if(Q.callback===null)o(h);else if(Q.startTime<=Z)o(h),Q.sortIndex=Q.expirationTime,l(m,Q);else break;Q=i(h)}}function H(Z){if(E=!1,q(Z),!w)if(i(m)!==null)w=!0,M||(M=!0,D());else{var Q=i(h);Q!==null&&V(H,Q.startTime-Z)}}var M=!1,I=-1,Y=5,F=-1;function $(){return T?!0:!(n.unstable_now()-F<Y)}function ie(){if(T=!1,M){var Z=n.unstable_now();F=Z;var Q=!0;try{e:{w=!1,E&&(E=!1,A(I),I=-1),b=!0;var se=v;try{t:{for(q(Z),y=i(m);y!==null&&!(y.expirationTime>Z&&$());){var de=y.callback;if(typeof de=="function"){y.callback=null,v=y.priorityLevel;var L=de(y.expirationTime<=Z);if(Z=n.unstable_now(),typeof L=="function"){y.callback=L,q(Z),Q=!0;break t}y===i(m)&&o(m),q(Z)}else o(m);y=i(m)}if(y!==null)Q=!0;else{var N=i(h);N!==null&&V(H,N.startTime-Z),Q=!1}}break e}finally{y=null,v=se,b=!1}Q=void 0}}finally{Q?D():M=!1}}}var D;if(typeof k=="function")D=function(){k(ie)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,C=ne.port2;ne.port1.onmessage=ie,D=function(){C.postMessage(null)}}else D=function(){_(ie,0)};function V(Z,Q){I=_(function(){Z(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Z){Z.callback=null},n.unstable_forceFrameRate=function(Z){0>Z||125<Z||(Y=0<Z?Math.floor(1e3/Z):5)},n.unstable_getCurrentPriorityLevel=function(){return v},n.unstable_next=function(Z){switch(v){case 1:case 2:case 3:var Q=3;break;default:Q=v}var se=v;v=Q;try{return Z()}finally{v=se}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(Z,Q){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var se=v;v=Z;try{return Q()}finally{v=se}},n.unstable_scheduleCallback=function(Z,Q,se){var de=n.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?de+se:de):se=de,Z){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=se+L,Z={id:g++,callback:Q,priorityLevel:Z,startTime:se,expirationTime:L,sortIndex:-1},se>de?(Z.sortIndex=se,l(h,Z),i(m)===null&&Z===i(h)&&(E?(A(I),I=-1):E=!0,V(H,se-de))):(Z.sortIndex=L,l(m,Z),w||b||(w=!0,M||(M=!0,D()))),Z},n.unstable_shouldYield=$,n.unstable_wrapCallback=function(Z){var Q=v;return function(){var se=v;v=Q;try{return Z.apply(this,arguments)}finally{v=se}}}})(vs)),vs}var Wf;function zb(){return Wf||(Wf=1,bs.exports=Ob()),bs.exports}var Ss={exports:{}},Ut={};var $f;function Mb(){if($f)return Ut;$f=1;var n=Ol();function l(m){var h="https://react.dev/errors/"+m;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+m+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var o={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},u=Symbol.for("react.portal");function s(m,h,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:y==null?null:""+y,children:m,containerInfo:h,implementation:g}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Ut.createPortal=function(m,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(l(299));return s(m,h,null,g)},Ut.flushSync=function(m){var h=c.T,g=o.p;try{if(c.T=null,o.p=2,m)return m()}finally{c.T=h,o.p=g,o.d.f()}},Ut.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(m,h))},Ut.prefetchDNS=function(m){typeof m=="string"&&o.d.D(m)},Ut.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var g=h.as,y=f(g,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?o.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:b}):g==="script"&&o.d.X(m,{crossOrigin:y,integrity:v,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Ut.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=f(h.as,h.crossOrigin);o.d.M(m,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(m)},Ut.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,y=f(g,h.crossOrigin);o.d.L(m,g,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Ut.preloadModule=function(m,h){if(typeof m=="string")if(h){var g=f(h.as,h.crossOrigin);o.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(m)},Ut.requestFormReset=function(m){o.d.r(m)},Ut.unstable_batchedUpdates=function(m,h){return m(h)},Ut.useFormState=function(m,h,g){return c.H.useFormState(m,h,g)},Ut.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ut.version="19.2.0",Ut}var ed;function td(){if(ed)return Ss.exports;ed=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{}}return n(),Ss.exports=Mb(),Ss.exports}var nd;function Db(){if(nd)return ua;nd=1;var n=zb(),l=Ol(),i=td();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(s(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(o(188));return t!==e?null:e}for(var r=e,a=t;;){var d=r.return;if(d===null)break;var p=d.alternate;if(p===null){if(a=d.return,a!==null){r=a;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===r)return m(d),e;if(p===a)return m(d),t;p=p.sibling}throw Error(o(188))}if(r.return!==a.return)r=d,a=p;else{for(var x=!1,R=d.child;R;){if(R===r){x=!0,r=d,a=p;break}if(R===a){x=!0,a=d,r=p;break}R=R.sibling}if(!x){for(R=p.child;R;){if(R===r){x=!0,r=p,a=d;break}if(R===a){x=!0,a=p,r=d;break}R=R.sibling}if(!x)throw Error(o(189))}}if(r.alternate!==a)throw Error(o(190))}if(r.tag!==3)throw Error(o(188));return r.stateNode.current===r?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),k=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function D(e){return e===null||typeof e!="object"?null:(e=ie&&e[ie]||e["@@iterator"],typeof e=="function"?e:null)}var ne=Symbol.for("react.client.reference");function C(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case _:return"Profiler";case T:return"StrictMode";case H:return"Suspense";case M:return"SuspenseList";case F:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case k:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case q:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:C(e.type)||"Memo";case Y:t=e._payload,e=e._init;try{return C(e(t))}catch{}}return null}var V=Array.isArray,Z=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},de=[],L=-1;function N(e){return{current:e}}function B(e){0>L||(e.current=de[L],de[L]=null,L--)}function z(e,t){L++,de[L]=e.current,e.current=t}var re=N(null),ce=N(null),we=N(null),Te=N(null);function ke(e,t){switch(z(we,t),z(ce,e),z(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Q0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Q0(t),e=J0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(re),z(re,e)}function Ae(){B(re),B(ce),B(we)}function He(e){e.memoizedState!==null&&z(Te,e);var t=re.current,r=J0(t,e.type);t!==r&&(z(ce,e),z(re,r))}function ve(e){ce.current===e&&(B(re),B(ce)),Te.current===e&&(B(Te),Tl._currentValue=se)}var ze,je;function S(e){if(ze===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);ze=t&&t[1]||"",je=-1<r.stack.indexOf(`
|
|
1
|
+
var MedAssistWidget=(function(hs){"use strict";function Ab(n,l){for(var i=0;i<l.length;i++){const o=l[i];if(typeof o!="string"&&!Array.isArray(o)){for(const u in o)if(u!=="default"&&!(u in n)){const s=Object.getOwnPropertyDescriptor(o,u);s&&Object.defineProperty(n,u,s.get?s:{enumerable:!0,get:()=>o[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}var Rl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ms(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ps={exports:{}},sa={};var Gf;function kb(){if(Gf)return sa;Gf=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(o,u,s){var c=null;if(s!==void 0&&(c=""+s),u.key!==void 0&&(c=""+u.key),"key"in u){s={};for(var f in u)f!=="key"&&(s[f]=u[f])}else s=u;return u=s.ref,{$$typeof:n,type:o,key:c,ref:u!==void 0?u:null,props:s}}return sa.Fragment=l,sa.jsx=i,sa.jsxs=i,sa}var Xf;function Nb(){return Xf||(Xf=1,ps.exports=kb()),ps.exports}var R=Nb(),gs={exports:{}},Ue={};var Zf;function Rb(){if(Zf)return Ue;Zf=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function b(k){return k===null||typeof k!="object"?null:(k=v&&k[v]||k["@@iterator"],typeof k=="function"?k:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function _(k,q,N){this.props=k,this.context=q,this.refs=T,this.updater=N||w}_.prototype.isReactComponent={},_.prototype.setState=function(k,q){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,q,"setState")},_.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function A(){}A.prototype=_.prototype;function j(k,q,N){this.props=k,this.context=q,this.refs=T,this.updater=N||w}var B=j.prototype=new A;B.constructor=j,E(B,_.prototype),B.isPureReactComponent=!0;var U=Array.isArray;function z(){}var H={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function F(k,q,N){var re=N.ref;return{$$typeof:n,type:k,key:q,ref:re!==void 0?re:null,props:N}}function $(k,q){return F(k.type,q,k.props)}function ae(k){return typeof k=="object"&&k!==null&&k.$$typeof===n}function M(k){var q={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(N){return q[N]})}var ne=/\/+/g;function C(k,q){return typeof k=="object"&&k!==null&&k.key!=null?M(""+k.key):q.toString(36)}function X(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(z,z):(k.status="pending",k.then(function(q){k.status==="pending"&&(k.status="fulfilled",k.value=q)},function(q){k.status==="pending"&&(k.status="rejected",k.reason=q)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function Z(k,q,N,re,ce){var we=typeof k;(we==="undefined"||we==="boolean")&&(k=null);var Ae=!1;if(k===null)Ae=!0;else switch(we){case"bigint":case"string":case"number":Ae=!0;break;case"object":switch(k.$$typeof){case n:case l:Ae=!0;break;case g:return Ae=k._init,Z(Ae(k._payload),q,N,re,ce)}}if(Ae)return ce=ce(k),Ae=re===""?"."+C(k,0):re,U(ce)?(N="",Ae!=null&&(N=Ae.replace(ne,"$&/")+"/"),Z(ce,q,N,"",function(He){return He})):ce!=null&&(ae(ce)&&(ce=$(ce,N+(ce.key==null||k&&k.key===ce.key?"":(""+ce.key).replace(ne,"$&/")+"/")+Ae)),q.push(ce)),1;Ae=0;var Ne=re===""?".":re+":";if(U(k))for(var ke=0;ke<k.length;ke++)re=k[ke],we=Ne+C(re,ke),Ae+=Z(re,q,N,we,ce);else if(ke=b(k),typeof ke=="function")for(k=ke.call(k),ke=0;!(re=k.next()).done;)re=re.value,we=Ne+C(re,ke++),Ae+=Z(re,q,N,we,ce);else if(we==="object"){if(typeof k.then=="function")return Z(X(k),q,N,re,ce);throw q=String(k),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Ae}function K(k,q,N){if(k==null)return k;var re=[],ce=0;return Z(k,re,"","",function(we){return q.call(N,we,ce++)}),re}function oe(k){if(k._status===-1){var q=k._result;q=q(),q.then(function(N){(k._status===0||k._status===-1)&&(k._status=1,k._result=N)},function(N){(k._status===0||k._status===-1)&&(k._status=2,k._result=N)}),k._status===-1&&(k._status=0,k._result=q)}if(k._status===1)return k._result.default;throw k._result}var de=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}},L={map:K,forEach:function(k,q,N){K(k,function(){q.apply(this,arguments)},N)},count:function(k){var q=0;return K(k,function(){q++}),q},toArray:function(k){return K(k,function(q){return q})||[]},only:function(k){if(!ae(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return Ue.Activity=y,Ue.Children=L,Ue.Component=_,Ue.Fragment=i,Ue.Profiler=u,Ue.PureComponent=j,Ue.StrictMode=o,Ue.Suspense=h,Ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,Ue.__COMPILER_RUNTIME={__proto__:null,c:function(k){return H.H.useMemoCache(k)}},Ue.cache=function(k){return function(){return k.apply(null,arguments)}},Ue.cacheSignal=function(){return null},Ue.cloneElement=function(k,q,N){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var re=E({},k.props),ce=k.key;if(q!=null)for(we in q.key!==void 0&&(ce=""+q.key),q)!Y.call(q,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&q.ref===void 0||(re[we]=q[we]);var we=arguments.length-2;if(we===1)re.children=N;else if(1<we){for(var Ae=Array(we),Ne=0;Ne<we;Ne++)Ae[Ne]=arguments[Ne+2];re.children=Ae}return F(k.type,ce,re)},Ue.createContext=function(k){return k={$$typeof:c,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:s,_context:k},k},Ue.createElement=function(k,q,N){var re,ce={},we=null;if(q!=null)for(re in q.key!==void 0&&(we=""+q.key),q)Y.call(q,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(ce[re]=q[re]);var Ae=arguments.length-2;if(Ae===1)ce.children=N;else if(1<Ae){for(var Ne=Array(Ae),ke=0;ke<Ae;ke++)Ne[ke]=arguments[ke+2];ce.children=Ne}if(k&&k.defaultProps)for(re in Ae=k.defaultProps,Ae)ce[re]===void 0&&(ce[re]=Ae[re]);return F(k,we,ce)},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(k){return{$$typeof:f,render:k}},Ue.isValidElement=ae,Ue.lazy=function(k){return{$$typeof:g,_payload:{_status:-1,_result:k},_init:oe}},Ue.memo=function(k,q){return{$$typeof:m,type:k,compare:q===void 0?null:q}},Ue.startTransition=function(k){var q=H.T,N={};H.T=N;try{var re=k(),ce=H.S;ce!==null&&ce(N,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(z,de)}catch(we){de(we)}finally{q!==null&&N.types!==null&&(q.types=N.types),H.T=q}},Ue.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},Ue.use=function(k){return H.H.use(k)},Ue.useActionState=function(k,q,N){return H.H.useActionState(k,q,N)},Ue.useCallback=function(k,q){return H.H.useCallback(k,q)},Ue.useContext=function(k){return H.H.useContext(k)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(k,q){return H.H.useDeferredValue(k,q)},Ue.useEffect=function(k,q){return H.H.useEffect(k,q)},Ue.useEffectEvent=function(k){return H.H.useEffectEvent(k)},Ue.useId=function(){return H.H.useId()},Ue.useImperativeHandle=function(k,q,N){return H.H.useImperativeHandle(k,q,N)},Ue.useInsertionEffect=function(k,q){return H.H.useInsertionEffect(k,q)},Ue.useLayoutEffect=function(k,q){return H.H.useLayoutEffect(k,q)},Ue.useMemo=function(k,q){return H.H.useMemo(k,q)},Ue.useOptimistic=function(k,q){return H.H.useOptimistic(k,q)},Ue.useReducer=function(k,q,N){return H.H.useReducer(k,q,N)},Ue.useRef=function(k){return H.H.useRef(k)},Ue.useState=function(k){return H.H.useState(k)},Ue.useSyncExternalStore=function(k,q,N){return H.H.useSyncExternalStore(k,q,N)},Ue.useTransition=function(){return H.H.useTransition()},Ue.version="19.2.0",Ue}var Kf;function Ol(){return Kf||(Kf=1,gs.exports=Rb()),gs.exports}var P=Ol();const ua=ms(P),Qf=Ab({__proto__:null,default:ua},[P]);var ys={exports:{}},ca={},bs={exports:{}},vs={};var Jf;function Ob(){return Jf||(Jf=1,(function(n){function l(Z,K){var oe=Z.length;Z.push(K);e:for(;0<oe;){var de=oe-1>>>1,L=Z[de];if(0<u(L,K))Z[de]=K,Z[oe]=L,oe=de;else break e}}function i(Z){return Z.length===0?null:Z[0]}function o(Z){if(Z.length===0)return null;var K=Z[0],oe=Z.pop();if(oe!==K){Z[0]=oe;e:for(var de=0,L=Z.length,k=L>>>1;de<k;){var q=2*(de+1)-1,N=Z[q],re=q+1,ce=Z[re];if(0>u(N,oe))re<L&&0>u(ce,N)?(Z[de]=ce,Z[re]=oe,de=re):(Z[de]=N,Z[q]=oe,de=q);else if(re<L&&0>u(ce,oe))Z[de]=ce,Z[re]=oe,de=re;else break e}}return K}function u(Z,K){var oe=Z.sortIndex-K.sortIndex;return oe!==0?oe:Z.id-K.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var c=Date,f=c.now();n.unstable_now=function(){return c.now()-f}}var h=[],m=[],g=1,y=null,v=3,b=!1,w=!1,E=!1,T=!1,_=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function B(Z){for(var K=i(m);K!==null;){if(K.callback===null)o(m);else if(K.startTime<=Z)o(m),K.sortIndex=K.expirationTime,l(h,K);else break;K=i(m)}}function U(Z){if(E=!1,B(Z),!w)if(i(h)!==null)w=!0,z||(z=!0,M());else{var K=i(m);K!==null&&X(U,K.startTime-Z)}}var z=!1,H=-1,Y=5,F=-1;function $(){return T?!0:!(n.unstable_now()-F<Y)}function ae(){if(T=!1,z){var Z=n.unstable_now();F=Z;var K=!0;try{e:{w=!1,E&&(E=!1,A(H),H=-1),b=!0;var oe=v;try{t:{for(B(Z),y=i(h);y!==null&&!(y.expirationTime>Z&&$());){var de=y.callback;if(typeof de=="function"){y.callback=null,v=y.priorityLevel;var L=de(y.expirationTime<=Z);if(Z=n.unstable_now(),typeof L=="function"){y.callback=L,B(Z),K=!0;break t}y===i(h)&&o(h),B(Z)}else o(h);y=i(h)}if(y!==null)K=!0;else{var k=i(m);k!==null&&X(U,k.startTime-Z),K=!1}}break e}finally{y=null,v=oe,b=!1}K=void 0}}finally{K?M():z=!1}}}var M;if(typeof j=="function")M=function(){j(ae)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,C=ne.port2;ne.port1.onmessage=ae,M=function(){C.postMessage(null)}}else M=function(){_(ae,0)};function X(Z,K){H=_(function(){Z(n.unstable_now())},K)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Z){Z.callback=null},n.unstable_forceFrameRate=function(Z){0>Z||125<Z||(Y=0<Z?Math.floor(1e3/Z):5)},n.unstable_getCurrentPriorityLevel=function(){return v},n.unstable_next=function(Z){switch(v){case 1:case 2:case 3:var K=3;break;default:K=v}var oe=v;v=K;try{return Z()}finally{v=oe}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(Z,K){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var oe=v;v=Z;try{return K()}finally{v=oe}},n.unstable_scheduleCallback=function(Z,K,oe){var de=n.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?de+oe:de):oe=de,Z){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=oe+L,Z={id:g++,callback:K,priorityLevel:Z,startTime:oe,expirationTime:L,sortIndex:-1},oe>de?(Z.sortIndex=oe,l(m,Z),i(h)===null&&Z===i(m)&&(E?(A(H),H=-1):E=!0,X(U,oe-de))):(Z.sortIndex=L,l(h,Z),w||b||(w=!0,z||(z=!0,M()))),Z},n.unstable_shouldYield=$,n.unstable_wrapCallback=function(Z){var K=v;return function(){var oe=v;v=K;try{return Z.apply(this,arguments)}finally{v=oe}}}})(vs)),vs}var Wf;function zb(){return Wf||(Wf=1,bs.exports=Ob()),bs.exports}var Ss={exports:{}},Ut={};var $f;function Mb(){if($f)return Ut;$f=1;var n=Ol();function l(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var o={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},u=Symbol.for("react.portal");function s(h,m,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:y==null?null:""+y,children:h,containerInfo:m,implementation:g}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Ut.createPortal=function(h,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return s(h,m,null,g)},Ut.flushSync=function(h){var m=c.T,g=o.p;try{if(c.T=null,o.p=2,h)return h()}finally{c.T=m,o.p=g,o.d.f()}},Ut.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,o.d.C(h,m))},Ut.prefetchDNS=function(h){typeof h=="string"&&o.d.D(h)},Ut.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var g=m.as,y=f(g,m.crossOrigin),v=typeof m.integrity=="string"?m.integrity:void 0,b=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?o.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:b}):g==="script"&&o.d.X(h,{crossOrigin:y,integrity:v,fetchPriority:b,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ut.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=f(m.as,m.crossOrigin);o.d.M(h,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&o.d.M(h)},Ut.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,y=f(g,m.crossOrigin);o.d.L(h,g,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Ut.preloadModule=function(h,m){if(typeof h=="string")if(m){var g=f(m.as,m.crossOrigin);o.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else o.d.m(h)},Ut.requestFormReset=function(h){o.d.r(h)},Ut.unstable_batchedUpdates=function(h,m){return h(m)},Ut.useFormState=function(h,m,g){return c.H.useFormState(h,m,g)},Ut.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ut.version="19.2.0",Ut}var ed;function td(){if(ed)return Ss.exports;ed=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{}}return n(),Ss.exports=Mb(),Ss.exports}var nd;function Db(){if(nd)return ca;nd=1;var n=zb(),l=Ol(),i=td();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(s(e)!==e)throw Error(o(188))}function m(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(o(188));return t!==e?null:e}for(var r=e,a=t;;){var d=r.return;if(d===null)break;var p=d.alternate;if(p===null){if(a=d.return,a!==null){r=a;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===r)return h(d),e;if(p===a)return h(d),t;p=p.sibling}throw Error(o(188))}if(r.return!==a.return)r=d,a=p;else{for(var x=!1,O=d.child;O;){if(O===r){x=!0,r=d,a=p;break}if(O===a){x=!0,a=d,r=p;break}O=O.sibling}if(!x){for(O=p.child;O;){if(O===r){x=!0,r=p,a=d;break}if(O===a){x=!0,a=p,r=d;break}O=O.sibling}if(!x)throw Error(o(189))}}if(r.alternate!==a)throw Error(o(190))}if(r.tag!==3)throw Error(o(188));return r.stateNode.current===r?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),j=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function M(e){return e===null||typeof e!="object"?null:(e=ae&&e[ae]||e["@@iterator"],typeof e=="function"?e:null)}var ne=Symbol.for("react.client.reference");function C(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case _:return"Profiler";case T:return"StrictMode";case U:return"Suspense";case z:return"SuspenseList";case F:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case j:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case B:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return t=e.displayName||null,t!==null?t:C(e.type)||"Memo";case Y:t=e._payload,e=e._init;try{return C(e(t))}catch{}}return null}var X=Array.isArray,Z=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},de=[],L=-1;function k(e){return{current:e}}function q(e){0>L||(e.current=de[L],de[L]=null,L--)}function N(e,t){L++,de[L]=e.current,e.current=t}var re=k(null),ce=k(null),we=k(null),Ae=k(null);function Ne(e,t){switch(N(we,t),N(ce,e),N(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Q0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Q0(t),e=J0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(re),N(re,e)}function ke(){q(re),q(ce),q(we)}function He(e){e.memoizedState!==null&&N(Ae,e);var t=re.current,r=J0(t,e.type);t!==r&&(N(ce,e),N(re,r))}function Se(e){ce.current===e&&(q(re),q(ce)),Ae.current===e&&(q(Ae),Tl._currentValue=oe)}var Me,ye;function S(e){if(Me===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Me=t&&t[1]||"",ye=-1<r.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+
|
|
4
|
-
`),
|
|
5
|
-
`);for(d=a=0;a<
|
|
6
|
-
`+
|
|
3
|
+
`+Me+e+ye}var J=!1;function ee(e,t){if(!e||J)return"";J=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(fe){var ue=fe}Reflect.construct(e,[],ge)}else{try{ge.call()}catch(fe){ue=fe}e.call(ge.prototype)}}else{try{throw Error()}catch(fe){ue=fe}(ge=e())&&typeof ge.catch=="function"&&ge.catch(function(){})}}catch(fe){if(fe&&ue&&typeof fe.stack=="string")return[fe.stack,ue.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=a.DetermineComponentFrameRoot(),x=p[0],O=p[1];if(x&&O){var V=x.split(`
|
|
4
|
+
`),le=O.split(`
|
|
5
|
+
`);for(d=a=0;a<V.length&&!V[a].includes("DetermineComponentFrameRoot");)a++;for(;d<le.length&&!le[d].includes("DetermineComponentFrameRoot");)d++;if(a===V.length||d===le.length)for(a=V.length-1,d=le.length-1;1<=a&&0<=d&&V[a]!==le[d];)d--;for(;1<=a&&0<=d;a--,d--)if(V[a]!==le[d]){if(a!==1||d!==1)do if(a--,d--,0>d||V[a]!==le[d]){var me=`
|
|
6
|
+
`+V[a].replace(" at new "," at ");return e.displayName&&me.includes("<anonymous>")&&(me=me.replace("<anonymous>",e.displayName)),me}while(1<=a&&0<=d);break}}}finally{J=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?S(r):""}function I(e,t){switch(e.tag){case 26:case 27:case 5:return S(e.type);case 16:return S("Lazy");case 13:return e.child!==t&&t!==null?S("Suspense Fallback"):S("Suspense");case 19:return S("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return S("Activity");default:return""}}function D(e){try{var t="",r=null;do t+=I(e,r),r=e,e=e.return;while(e);return t}catch(a){return`
|
|
7
7
|
Error generating stack: `+a.message+`
|
|
8
|
-
`+a.stack}}var X=Object.prototype.hasOwnProperty,he=n.unstable_scheduleCallback,pe=n.unstable_cancelCallback,le=n.unstable_shouldYield,Ee=n.unstable_requestPaint,_e=n.unstable_now,Se=n.unstable_getCurrentPriorityLevel,te=n.unstable_ImmediatePriority,be=n.unstable_UserBlockingPriority,Ce=n.unstable_NormalPriority,Ie=n.unstable_LowPriority,Je=n.unstable_IdlePriority,pt=n.log,qt=n.unstable_setDisableYieldValue,Xe=null,gt=null;function Ot(e){if(typeof pt=="function"&&qt(e),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(Xe,e)}catch{}}var Ze=Math.clz32?Math.clz32:zu,Cn=Math.log,nn=Math.LN2;function zu(e){return e>>>=0,e===0?32:31-(Cn(e)/nn|0)|0}var xi=256,Xr=262144,jn=4194304;function hn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $l(e,t,r){var a=e.pendingLanes;if(a===0)return 0;var d=0,p=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var R=a&134217727;return R!==0?(a=R&~p,a!==0?d=hn(a):(x&=R,x!==0?d=hn(x):r||(r=R&~e,r!==0&&(d=hn(r))))):(R=a&~p,R!==0?d=hn(R):x!==0?d=hn(x):r||(r=a&~e,r!==0&&(d=hn(r)))),d===0?0:t!==0&&t!==d&&(t&p)===0&&(p=d&-d,r=t&-t,p>=r||p===32&&(r&4194048)!==0)?t:d}function Ua(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ww(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Op(){var e=jn;return jn<<=1,(jn&62914560)===0&&(jn=4194304),e}function Mu(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ha(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $w(e,t,r,a,d,p){var x=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var R=e.entanglements,G=e.expirationTimes,oe=e.hiddenUpdates;for(r=x&~r;0<r;){var me=31-Ze(r),ye=1<<me;R[me]=0,G[me]=-1;var ue=oe[me];if(ue!==null)for(oe[me]=null,me=0;me<ue.length;me++){var fe=ue[me];fe!==null&&(fe.lane&=-536870913)}r&=~ye}a!==0&&zp(e,a,0),p!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=p&~(x&~t))}function zp(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Ze(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|r&261930}function Mp(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var a=31-Ze(r),d=1<<a;d&t|e[a]&t&&(e[a]|=t),r&=~d}}function Dp(e,t){var r=t&-t;return r=(r&42)!==0?1:Du(r),(r&(e.suspendedLanes|t))!==0?0:r}function Du(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ju(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function jp(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Sb(e.type))}function Lp(e,t){var r=Q.p;try{return Q.p=e,t()}finally{Q.p=r}}var pr=Math.random().toString(36).slice(2),Dt="__reactFiber$"+pr,Xt="__reactProps$"+pr,_i="__reactContainer$"+pr,Lu="__reactEvents$"+pr,e2="__reactListeners$"+pr,t2="__reactHandles$"+pr,Ip="__reactResources$"+pr,qa="__reactMarker$"+pr;function Iu(e){delete e[Dt],delete e[Xt],delete e[Lu],delete e[e2],delete e[t2]}function wi(e){var t=e[Dt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[_i]||r[Dt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=ib(e);e!==null;){if(r=e[Dt])return r;e=ib(e)}return t}e=r,r=e.parentNode}return null}function Ci(e){if(e=e[Dt]||e[_i]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Pa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Ti(e){var t=e[Ip];return t||(t=e[Ip]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function zt(e){e[qa]=!0}var Bp=new Set,Up={};function Zr(e,t){Ai(e,t),Ai(e+"Capture",t)}function Ai(e,t){for(Up[e]=t,e=0;e<t.length;e++)Bp.add(t[e])}var n2=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Hp={},qp={};function r2(e){return X.call(qp,e)?!0:X.call(Hp,e)?!1:n2.test(e)?qp[e]=!0:(Hp[e]=!0,!1)}function eo(e,t,r){if(r2(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function to(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function Yn(e,t,r,a){if(a===null)e.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+a)}}function mn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function i2(e,t,r){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var d=a.get,p=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(x){r=""+x,p.call(this,x)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return r},setValue:function(x){r=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bu(e){if(!e._valueTracker){var t=Pp(e)?"checked":"value";e._valueTracker=i2(e,t,""+e[t])}}function Fp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),a="";return e&&(a=Pp(e)?e.checked?"true":"false":e.value),e=a,e!==r?(t.setValue(e),!0):!1}function no(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var a2=/[\n"\\]/g;function pn(e){return e.replace(a2,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Uu(e,t,r,a,d,p,x,R){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+mn(t)):e.value!==""+mn(t)&&(e.value=""+mn(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Hu(e,x,mn(t)):r!=null?Hu(e,x,mn(r)):a!=null&&e.removeAttribute("value"),d==null&&p!=null&&(e.defaultChecked=!!p),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?e.name=""+mn(R):e.removeAttribute("name")}function Yp(e,t,r,a,d,p,x,R){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.type=p),t!=null||r!=null){if(!(p!=="submit"&&p!=="reset"||t!=null)){Bu(e);return}r=r!=null?""+mn(r):"",t=t!=null?""+mn(t):r,R||t===e.value||(e.value=t),e.defaultValue=t}a=a??d,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=R?e.checked:!!a,e.defaultChecked=!!a,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Bu(e)}function Hu(e,t,r){t==="number"&&no(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function ki(e,t,r,a){if(e=e.options,t){t={};for(var d=0;d<r.length;d++)t["$"+r[d]]=!0;for(r=0;r<e.length;r++)d=t.hasOwnProperty("$"+e[r].value),e[r].selected!==d&&(e[r].selected=d),d&&a&&(e[r].defaultSelected=!0)}else{for(r=""+mn(r),t=null,d=0;d<e.length;d++){if(e[d].value===r){e[d].selected=!0,a&&(e[d].defaultSelected=!0);return}t!==null||e[d].disabled||(t=e[d])}t!==null&&(t.selected=!0)}}function Vp(e,t,r){if(t!=null&&(t=""+mn(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+mn(r):""}function Gp(e,t,r,a){if(t==null){if(a!=null){if(r!=null)throw Error(o(92));if(V(a)){if(1<a.length)throw Error(o(93));a=a[0]}r=a}r==null&&(r=""),t=r}r=mn(t),e.defaultValue=r,a=e.textContent,a===r&&a!==""&&a!==null&&(e.value=a),Bu(e)}function Ni(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var l2=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Xp(e,t,r){var a=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,r):typeof r!="number"||r===0||l2.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function Zp(e,t,r){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,r!=null){for(var a in r)!r.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var d in t)a=t[d],t.hasOwnProperty(d)&&r[d]!==a&&Xp(e,d,a)}else for(var p in t)t.hasOwnProperty(p)&&Xp(e,p,t[p])}function qu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var o2=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),s2=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ro(e){return s2.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Vn(){}var Pu=null;function Fu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ri=null,Oi=null;function Kp(e){var t=Ci(e);if(t&&(e=t.stateNode)){var r=e[Xt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Uu(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+pn(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var a=r[t];if(a!==e&&a.form===e.form){var d=a[Xt]||null;if(!d)throw Error(o(90));Uu(a,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(t=0;t<r.length;t++)a=r[t],a.form===e.form&&Fp(a)}break e;case"textarea":Vp(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&ki(e,!!r.multiple,t,!1)}}}var Yu=!1;function Qp(e,t,r){if(Yu)return e(t,r);Yu=!0;try{var a=e(t);return a}finally{if(Yu=!1,(Ri!==null||Oi!==null)&&(Vo(),Ri&&(t=Ri,e=Oi,Oi=Ri=null,Kp(t),e)))for(t=0;t<e.length;t++)Kp(e[t])}}function Fa(e,t){var r=e.stateNode;if(r===null)return null;var a=r[Xt]||null;if(a===null)return null;r=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(o(231,t,typeof r));return r}var Gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vu=!1;if(Gn)try{var Ya={};Object.defineProperty(Ya,"passive",{get:function(){Vu=!0}}),window.addEventListener("test",Ya,Ya),window.removeEventListener("test",Ya,Ya)}catch{Vu=!1}var gr=null,Gu=null,io=null;function Jp(){if(io)return io;var e,t=Gu,r=t.length,a,d="value"in gr?gr.value:gr.textContent,p=d.length;for(e=0;e<r&&t[e]===d[e];e++);var x=r-e;for(a=1;a<=x&&t[r-a]===d[p-a];a++);return io=d.slice(e,1<a?1-a:void 0)}function ao(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function lo(){return!0}function Wp(){return!1}function Zt(e){function t(r,a,d,p,x){this._reactName=r,this._targetInst=d,this.type=a,this.nativeEvent=p,this.target=x,this.currentTarget=null;for(var R in e)e.hasOwnProperty(R)&&(r=e[R],this[R]=r?r(p):p[R]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?lo:Wp,this.isPropagationStopped=Wp,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=lo)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=lo)},persist:function(){},isPersistent:lo}),t}var Kr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oo=Zt(Kr),Va=y({},Kr,{view:0,detail:0}),u2=Zt(Va),Xu,Zu,Ga,so=y({},Va,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ga&&(Ga&&e.type==="mousemove"?(Xu=e.screenX-Ga.screenX,Zu=e.screenY-Ga.screenY):Zu=Xu=0,Ga=e),Xu)},movementY:function(e){return"movementY"in e?e.movementY:Zu}}),$p=Zt(so),c2=y({},so,{dataTransfer:0}),f2=Zt(c2),d2=y({},Va,{relatedTarget:0}),Ku=Zt(d2),h2=y({},Kr,{animationName:0,elapsedTime:0,pseudoElement:0}),m2=Zt(h2),p2=y({},Kr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),g2=Zt(p2),y2=y({},Kr,{data:0}),eg=Zt(y2),b2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},v2={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},S2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function E2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=S2[e])?!!t[e]:!1}function Qu(){return E2}var x2=y({},Va,{key:function(e){if(e.key){var t=b2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ao(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?v2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qu,charCode:function(e){return e.type==="keypress"?ao(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ao(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_2=Zt(x2),w2=y({},so,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tg=Zt(w2),C2=y({},Va,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qu}),T2=Zt(C2),A2=y({},Kr,{propertyName:0,elapsedTime:0,pseudoElement:0}),k2=Zt(A2),N2=y({},so,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),R2=Zt(N2),O2=y({},Kr,{newState:0,oldState:0}),z2=Zt(O2),M2=[9,13,27,32],Ju=Gn&&"CompositionEvent"in window,Xa=null;Gn&&"documentMode"in document&&(Xa=document.documentMode);var D2=Gn&&"TextEvent"in window&&!Xa,ng=Gn&&(!Ju||Xa&&8<Xa&&11>=Xa),rg=" ",ig=!1;function ag(e,t){switch(e){case"keyup":return M2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zi=!1;function j2(e,t){switch(e){case"compositionend":return lg(t);case"keypress":return t.which!==32?null:(ig=!0,rg);case"textInput":return e=t.data,e===rg&&ig?null:e;default:return null}}function L2(e,t){if(zi)return e==="compositionend"||!Ju&&ag(e,t)?(e=Jp(),io=Gu=gr=null,zi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ng&&t.locale!=="ko"?null:t.data;default:return null}}var I2={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function og(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!I2[e.type]:t==="textarea"}function sg(e,t,r,a){Ri?Oi?Oi.push(a):Oi=[a]:Ri=a,t=Wo(t,"onChange"),0<t.length&&(r=new oo("onChange","change",null,r,a),e.push({event:r,listeners:t}))}var Za=null,Ka=null;function B2(e){Y0(e,0)}function uo(e){var t=Pa(e);if(Fp(t))return e}function ug(e,t){if(e==="change")return t}var cg=!1;if(Gn){var Wu;if(Gn){var $u="oninput"in document;if(!$u){var fg=document.createElement("div");fg.setAttribute("oninput","return;"),$u=typeof fg.oninput=="function"}Wu=$u}else Wu=!1;cg=Wu&&(!document.documentMode||9<document.documentMode)}function dg(){Za&&(Za.detachEvent("onpropertychange",hg),Ka=Za=null)}function hg(e){if(e.propertyName==="value"&&uo(Ka)){var t=[];sg(t,Ka,e,Fu(e)),Qp(B2,t)}}function U2(e,t,r){e==="focusin"?(dg(),Za=t,Ka=r,Za.attachEvent("onpropertychange",hg)):e==="focusout"&&dg()}function H2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return uo(Ka)}function q2(e,t){if(e==="click")return uo(t)}function P2(e,t){if(e==="input"||e==="change")return uo(t)}function F2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rn=typeof Object.is=="function"?Object.is:F2;function Qa(e,t){if(rn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(a=0;a<r.length;a++){var d=r[a];if(!X.call(t,d)||!rn(e[d],t[d]))return!1}return!0}function mg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pg(e,t){var r=mg(e);e=0;for(var a;r;){if(r.nodeType===3){if(a=e+r.textContent.length,e<=t&&a>=t)return{node:r,offset:t-e};e=a}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=mg(r)}}function gg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=no(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=no(e.document)}return t}function ec(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Y2=Gn&&"documentMode"in document&&11>=document.documentMode,Mi=null,tc=null,Ja=null,nc=!1;function bg(e,t,r){var a=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;nc||Mi==null||Mi!==no(a)||(a=Mi,"selectionStart"in a&&ec(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ja&&Qa(Ja,a)||(Ja=a,a=Wo(tc,"onSelect"),0<a.length&&(t=new oo("onSelect","select",null,t,r),e.push({event:t,listeners:a}),t.target=Mi)))}function Qr(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Di={animationend:Qr("Animation","AnimationEnd"),animationiteration:Qr("Animation","AnimationIteration"),animationstart:Qr("Animation","AnimationStart"),transitionrun:Qr("Transition","TransitionRun"),transitionstart:Qr("Transition","TransitionStart"),transitioncancel:Qr("Transition","TransitionCancel"),transitionend:Qr("Transition","TransitionEnd")},rc={},vg={};Gn&&(vg=document.createElement("div").style,"AnimationEvent"in window||(delete Di.animationend.animation,delete Di.animationiteration.animation,delete Di.animationstart.animation),"TransitionEvent"in window||delete Di.transitionend.transition);function Jr(e){if(rc[e])return rc[e];if(!Di[e])return e;var t=Di[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in vg)return rc[e]=t[r];return e}var Sg=Jr("animationend"),Eg=Jr("animationiteration"),xg=Jr("animationstart"),V2=Jr("transitionrun"),G2=Jr("transitionstart"),X2=Jr("transitioncancel"),_g=Jr("transitionend"),wg=new Map,ic="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ic.push("scrollEnd");function Tn(e,t){wg.set(e,t),Zr(t,[e])}var co=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}},gn=[],ji=0,ac=0;function fo(){for(var e=ji,t=ac=ji=0;t<e;){var r=gn[t];gn[t++]=null;var a=gn[t];gn[t++]=null;var d=gn[t];gn[t++]=null;var p=gn[t];if(gn[t++]=null,a!==null&&d!==null){var x=a.pending;x===null?d.next=d:(d.next=x.next,x.next=d),a.pending=d}p!==0&&Cg(r,d,p)}}function ho(e,t,r,a){gn[ji++]=e,gn[ji++]=t,gn[ji++]=r,gn[ji++]=a,ac|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function lc(e,t,r,a){return ho(e,t,r,a),mo(e)}function Wr(e,t){return ho(e,null,null,t),mo(e)}function Cg(e,t,r){e.lanes|=r;var a=e.alternate;a!==null&&(a.lanes|=r);for(var d=!1,p=e.return;p!==null;)p.childLanes|=r,a=p.alternate,a!==null&&(a.childLanes|=r),p.tag===22&&(e=p.stateNode,e===null||e._visibility&1||(d=!0)),e=p,p=p.return;return e.tag===3?(p=e.stateNode,d&&t!==null&&(d=31-Ze(r),e=p.hiddenUpdates,a=e[d],a===null?e[d]=[t]:a.push(t),t.lane=r|536870912),p):null}function mo(e){if(50<vl)throw vl=0,gf=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Li={};function Z2(e,t,r,a){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(e,t,r,a){return new Z2(e,t,r,a)}function oc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xn(e,t){var r=e.alternate;return r===null?(r=an(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function Tg(e,t){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function po(e,t,r,a,d,p){var x=0;if(a=e,typeof e=="function")oc(e)&&(x=1);else if(typeof e=="string")x=$C(e,r,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case F:return e=an(31,r,t,d),e.elementType=F,e.lanes=p,e;case E:return $r(r.children,d,p,t);case T:x=8,d|=24;break;case _:return e=an(12,r,t,d|2),e.elementType=_,e.lanes=p,e;case H:return e=an(13,r,t,d),e.elementType=H,e.lanes=p,e;case M:return e=an(19,r,t,d),e.elementType=M,e.lanes=p,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case k:x=10;break e;case A:x=9;break e;case q:x=11;break e;case I:x=14;break e;case Y:x=16,a=null;break e}x=29,r=Error(o(130,e===null?"null":typeof e,"")),a=null}return t=an(x,r,t,d),t.elementType=e,t.type=a,t.lanes=p,t}function $r(e,t,r,a){return e=an(7,e,a,t),e.lanes=r,e}function sc(e,t,r){return e=an(6,e,null,t),e.lanes=r,e}function Ag(e){var t=an(18,null,null,0);return t.stateNode=e,t}function uc(e,t,r){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var kg=new WeakMap;function yn(e,t){if(typeof e=="object"&&e!==null){var r=kg.get(e);return r!==void 0?r:(t={value:e,source:t,stack:j(t)},kg.set(e,t),t)}return{value:e,source:t,stack:j(t)}}var Ii=[],Bi=0,go=null,Wa=0,bn=[],vn=0,yr=null,Ln=1,In="";function Zn(e,t){Ii[Bi++]=Wa,Ii[Bi++]=go,go=e,Wa=t}function Ng(e,t,r){bn[vn++]=Ln,bn[vn++]=In,bn[vn++]=yr,yr=e;var a=Ln;e=In;var d=32-Ze(a)-1;a&=~(1<<d),r+=1;var p=32-Ze(t)+d;if(30<p){var x=d-d%5;p=(a&(1<<x)-1).toString(32),a>>=x,d-=x,Ln=1<<32-Ze(t)+d|r<<d|a,In=p+e}else Ln=1<<p|r<<d|a,In=e}function cc(e){e.return!==null&&(Zn(e,1),Ng(e,1,0))}function fc(e){for(;e===go;)go=Ii[--Bi],Ii[Bi]=null,Wa=Ii[--Bi],Ii[Bi]=null;for(;e===yr;)yr=bn[--vn],bn[vn]=null,In=bn[--vn],bn[vn]=null,Ln=bn[--vn],bn[vn]=null}function Rg(e,t){bn[vn++]=Ln,bn[vn++]=In,bn[vn++]=yr,Ln=t.id,In=t.overflow,yr=e}var jt=null,ht=null,et=!1,br=null,Sn=!1,dc=Error(o(519));function vr(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $a(yn(t,e)),dc}function Og(e){var t=e.stateNode,r=e.type,a=e.memoizedProps;switch(t[Dt]=e,t[Xt]=a,r){case"dialog":Qe("cancel",t),Qe("close",t);break;case"iframe":case"object":case"embed":Qe("load",t);break;case"video":case"audio":for(r=0;r<El.length;r++)Qe(El[r],t);break;case"source":Qe("error",t);break;case"img":case"image":case"link":Qe("error",t),Qe("load",t);break;case"details":Qe("toggle",t);break;case"input":Qe("invalid",t),Yp(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Qe("invalid",t);break;case"textarea":Qe("invalid",t),Gp(t,a.value,a.defaultValue,a.children)}r=a.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||a.suppressHydrationWarning===!0||Z0(t.textContent,r)?(a.popover!=null&&(Qe("beforetoggle",t),Qe("toggle",t)),a.onScroll!=null&&Qe("scroll",t),a.onScrollEnd!=null&&Qe("scrollend",t),a.onClick!=null&&(t.onclick=Vn),t=!0):t=!1,t||vr(e,!0)}function zg(e){for(jt=e.return;jt;)switch(jt.tag){case 5:case 31:case 13:Sn=!1;return;case 27:case 3:Sn=!0;return;default:jt=jt.return}}function Ui(e){if(e!==jt)return!1;if(!et)return zg(e),et=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Of(e.type,e.memoizedProps)),r=!r),r&&ht&&vr(e),zg(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ht=rb(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ht=rb(e)}else t===27?(t=ht,Mr(e.type)?(e=Lf,Lf=null,ht=e):ht=t):ht=jt?xn(e.stateNode.nextSibling):null;return!0}function ei(){ht=jt=null,et=!1}function hc(){var e=br;return e!==null&&(Wt===null?Wt=e:Wt.push.apply(Wt,e),br=null),e}function $a(e){br===null?br=[e]:br.push(e)}var mc=N(null),ti=null,Kn=null;function Sr(e,t,r){z(mc,t._currentValue),t._currentValue=r}function Qn(e){e._currentValue=mc.current,B(mc)}function pc(e,t,r){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===r)break;e=e.return}}function gc(e,t,r,a){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var p=d.dependencies;if(p!==null){var x=d.child;p=p.firstContext;e:for(;p!==null;){var R=p;p=d;for(var G=0;G<t.length;G++)if(R.context===t[G]){p.lanes|=r,R=p.alternate,R!==null&&(R.lanes|=r),pc(p.return,r,e),a||(x=null);break e}p=R.next}}else if(d.tag===18){if(x=d.return,x===null)throw Error(o(341));x.lanes|=r,p=x.alternate,p!==null&&(p.lanes|=r),pc(x,r,e),x=null}else x=d.child;if(x!==null)x.return=d;else for(x=d;x!==null;){if(x===e){x=null;break}if(d=x.sibling,d!==null){d.return=x.return,x=d;break}x=x.return}d=x}}function Hi(e,t,r,a){e=null;for(var d=t,p=!1;d!==null;){if(!p){if((d.flags&524288)!==0)p=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var x=d.alternate;if(x===null)throw Error(o(387));if(x=x.memoizedProps,x!==null){var R=d.type;rn(d.pendingProps.value,x.value)||(e!==null?e.push(R):e=[R])}}else if(d===Te.current){if(x=d.alternate,x===null)throw Error(o(387));x.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(Tl):e=[Tl])}d=d.return}e!==null&&gc(t,e,r,a),t.flags|=262144}function yo(e){for(e=e.firstContext;e!==null;){if(!rn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ni(e){ti=e,Kn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Lt(e){return Mg(ti,e)}function bo(e,t){return ti===null&&ni(e),Mg(e,t)}function Mg(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},Kn===null){if(e===null)throw Error(o(308));Kn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Kn=Kn.next=t;return r}var K2=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},Q2=n.unstable_scheduleCallback,J2=n.unstable_NormalPriority,_t={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yc(){return{controller:new K2,data:new Map,refCount:0}}function el(e){e.refCount--,e.refCount===0&&Q2(J2,function(){e.controller.abort()})}var tl=null,bc=0,qi=0,Pi=null;function W2(e,t){if(tl===null){var r=tl=[];bc=0,qi=xf(),Pi={status:"pending",value:void 0,then:function(a){r.push(a)}}}return bc++,t.then(Dg,Dg),t}function Dg(){if(--bc===0&&tl!==null){Pi!==null&&(Pi.status="fulfilled");var e=tl;tl=null,qi=0,Pi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function $2(e,t){var r=[],a={status:"pending",value:null,reason:null,then:function(d){r.push(d)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var d=0;d<r.length;d++)(0,r[d])(t)},function(d){for(a.status="rejected",a.reason=d,d=0;d<r.length;d++)(0,r[d])(void 0)}),a}var jg=Z.S;Z.S=function(e,t){b0=_e(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&W2(e,t),jg!==null&&jg(e,t)};var ri=N(null);function vc(){var e=ri.current;return e!==null?e:ct.pooledCache}function vo(e,t){t===null?z(ri,ri.current):z(ri,t.pool)}function Lg(){var e=vc();return e===null?null:{parent:_t._currentValue,pool:e}}var Fi=Error(o(460)),Sc=Error(o(474)),So=Error(o(542)),Eo={then:function(){}};function Ig(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Bg(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(Vn,Vn),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Hg(e),e;default:if(typeof t.status=="string")t.then(Vn,Vn);else{if(e=ct,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var d=t;d.status="fulfilled",d.value=a}},function(a){if(t.status==="pending"){var d=t;d.status="rejected",d.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Hg(e),e}throw ai=t,Fi}}function ii(e){try{var t=e._init;return t(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(ai=r,Fi):r}}var ai=null;function Ug(){if(ai===null)throw Error(o(459));var e=ai;return ai=null,e}function Hg(e){if(e===Fi||e===So)throw Error(o(483))}var Yi=null,nl=0;function xo(e){var t=nl;return nl+=1,Yi===null&&(Yi=[]),Bg(Yi,e,t)}function rl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function _o(e,t){throw t.$$typeof===v?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function qg(e){function t(ee,J){if(e){var ae=ee.deletions;ae===null?(ee.deletions=[J],ee.flags|=16):ae.push(J)}}function r(ee,J){if(!e)return null;for(;J!==null;)t(ee,J),J=J.sibling;return null}function a(ee){for(var J=new Map;ee!==null;)ee.key!==null?J.set(ee.key,ee):J.set(ee.index,ee),ee=ee.sibling;return J}function d(ee,J){return ee=Xn(ee,J),ee.index=0,ee.sibling=null,ee}function p(ee,J,ae){return ee.index=ae,e?(ae=ee.alternate,ae!==null?(ae=ae.index,ae<J?(ee.flags|=67108866,J):ae):(ee.flags|=67108866,J)):(ee.flags|=1048576,J)}function x(ee){return e&&ee.alternate===null&&(ee.flags|=67108866),ee}function R(ee,J,ae,ge){return J===null||J.tag!==6?(J=sc(ae,ee.mode,ge),J.return=ee,J):(J=d(J,ae),J.return=ee,J)}function G(ee,J,ae,ge){var De=ae.type;return De===E?me(ee,J,ae.props.children,ge,ae.key):J!==null&&(J.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Y&&ii(De)===J.type)?(J=d(J,ae.props),rl(J,ae),J.return=ee,J):(J=po(ae.type,ae.key,ae.props,null,ee.mode,ge),rl(J,ae),J.return=ee,J)}function oe(ee,J,ae,ge){return J===null||J.tag!==4||J.stateNode.containerInfo!==ae.containerInfo||J.stateNode.implementation!==ae.implementation?(J=uc(ae,ee.mode,ge),J.return=ee,J):(J=d(J,ae.children||[]),J.return=ee,J)}function me(ee,J,ae,ge,De){return J===null||J.tag!==7?(J=$r(ae,ee.mode,ge,De),J.return=ee,J):(J=d(J,ae),J.return=ee,J)}function ye(ee,J,ae){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return J=sc(""+J,ee.mode,ae),J.return=ee,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case b:return ae=po(J.type,J.key,J.props,null,ee.mode,ae),rl(ae,J),ae.return=ee,ae;case w:return J=uc(J,ee.mode,ae),J.return=ee,J;case Y:return J=ii(J),ye(ee,J,ae)}if(V(J)||D(J))return J=$r(J,ee.mode,ae,null),J.return=ee,J;if(typeof J.then=="function")return ye(ee,xo(J),ae);if(J.$$typeof===k)return ye(ee,bo(ee,J),ae);_o(ee,J)}return null}function ue(ee,J,ae,ge){var De=J!==null?J.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return De!==null?null:R(ee,J,""+ae,ge);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case b:return ae.key===De?G(ee,J,ae,ge):null;case w:return ae.key===De?oe(ee,J,ae,ge):null;case Y:return ae=ii(ae),ue(ee,J,ae,ge)}if(V(ae)||D(ae))return De!==null?null:me(ee,J,ae,ge,null);if(typeof ae.then=="function")return ue(ee,J,xo(ae),ge);if(ae.$$typeof===k)return ue(ee,J,bo(ee,ae),ge);_o(ee,ae)}return null}function fe(ee,J,ae,ge,De){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return ee=ee.get(ae)||null,R(J,ee,""+ge,De);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case b:return ee=ee.get(ge.key===null?ae:ge.key)||null,G(J,ee,ge,De);case w:return ee=ee.get(ge.key===null?ae:ge.key)||null,oe(J,ee,ge,De);case Y:return ge=ii(ge),fe(ee,J,ae,ge,De)}if(V(ge)||D(ge))return ee=ee.get(ae)||null,me(J,ee,ge,De,null);if(typeof ge.then=="function")return fe(ee,J,ae,xo(ge),De);if(ge.$$typeof===k)return fe(ee,J,ae,bo(J,ge),De);_o(J,ge)}return null}function Ne(ee,J,ae,ge){for(var De=null,tt=null,Me=J,Fe=J=0,$e=null;Me!==null&&Fe<ae.length;Fe++){Me.index>Fe?($e=Me,Me=null):$e=Me.sibling;var nt=ue(ee,Me,ae[Fe],ge);if(nt===null){Me===null&&(Me=$e);break}e&&Me&&nt.alternate===null&&t(ee,Me),J=p(nt,J,Fe),tt===null?De=nt:tt.sibling=nt,tt=nt,Me=$e}if(Fe===ae.length)return r(ee,Me),et&&Zn(ee,Fe),De;if(Me===null){for(;Fe<ae.length;Fe++)Me=ye(ee,ae[Fe],ge),Me!==null&&(J=p(Me,J,Fe),tt===null?De=Me:tt.sibling=Me,tt=Me);return et&&Zn(ee,Fe),De}for(Me=a(Me);Fe<ae.length;Fe++)$e=fe(Me,ee,Fe,ae[Fe],ge),$e!==null&&(e&&$e.alternate!==null&&Me.delete($e.key===null?Fe:$e.key),J=p($e,J,Fe),tt===null?De=$e:tt.sibling=$e,tt=$e);return e&&Me.forEach(function(Br){return t(ee,Br)}),et&&Zn(ee,Fe),De}function Le(ee,J,ae,ge){if(ae==null)throw Error(o(151));for(var De=null,tt=null,Me=J,Fe=J=0,$e=null,nt=ae.next();Me!==null&&!nt.done;Fe++,nt=ae.next()){Me.index>Fe?($e=Me,Me=null):$e=Me.sibling;var Br=ue(ee,Me,nt.value,ge);if(Br===null){Me===null&&(Me=$e);break}e&&Me&&Br.alternate===null&&t(ee,Me),J=p(Br,J,Fe),tt===null?De=Br:tt.sibling=Br,tt=Br,Me=$e}if(nt.done)return r(ee,Me),et&&Zn(ee,Fe),De;if(Me===null){for(;!nt.done;Fe++,nt=ae.next())nt=ye(ee,nt.value,ge),nt!==null&&(J=p(nt,J,Fe),tt===null?De=nt:tt.sibling=nt,tt=nt);return et&&Zn(ee,Fe),De}for(Me=a(Me);!nt.done;Fe++,nt=ae.next())nt=fe(Me,ee,Fe,nt.value,ge),nt!==null&&(e&&nt.alternate!==null&&Me.delete(nt.key===null?Fe:nt.key),J=p(nt,J,Fe),tt===null?De=nt:tt.sibling=nt,tt=nt);return e&&Me.forEach(function(cT){return t(ee,cT)}),et&&Zn(ee,Fe),De}function ut(ee,J,ae,ge){if(typeof ae=="object"&&ae!==null&&ae.type===E&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case b:e:{for(var De=ae.key;J!==null;){if(J.key===De){if(De=ae.type,De===E){if(J.tag===7){r(ee,J.sibling),ge=d(J,ae.props.children),ge.return=ee,ee=ge;break e}}else if(J.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Y&&ii(De)===J.type){r(ee,J.sibling),ge=d(J,ae.props),rl(ge,ae),ge.return=ee,ee=ge;break e}r(ee,J);break}else t(ee,J);J=J.sibling}ae.type===E?(ge=$r(ae.props.children,ee.mode,ge,ae.key),ge.return=ee,ee=ge):(ge=po(ae.type,ae.key,ae.props,null,ee.mode,ge),rl(ge,ae),ge.return=ee,ee=ge)}return x(ee);case w:e:{for(De=ae.key;J!==null;){if(J.key===De)if(J.tag===4&&J.stateNode.containerInfo===ae.containerInfo&&J.stateNode.implementation===ae.implementation){r(ee,J.sibling),ge=d(J,ae.children||[]),ge.return=ee,ee=ge;break e}else{r(ee,J);break}else t(ee,J);J=J.sibling}ge=uc(ae,ee.mode,ge),ge.return=ee,ee=ge}return x(ee);case Y:return ae=ii(ae),ut(ee,J,ae,ge)}if(V(ae))return Ne(ee,J,ae,ge);if(D(ae)){if(De=D(ae),typeof De!="function")throw Error(o(150));return ae=De.call(ae),Le(ee,J,ae,ge)}if(typeof ae.then=="function")return ut(ee,J,xo(ae),ge);if(ae.$$typeof===k)return ut(ee,J,bo(ee,ae),ge);_o(ee,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,J!==null&&J.tag===6?(r(ee,J.sibling),ge=d(J,ae),ge.return=ee,ee=ge):(r(ee,J),ge=sc(ae,ee.mode,ge),ge.return=ee,ee=ge),x(ee)):r(ee,J)}return function(ee,J,ae,ge){try{nl=0;var De=ut(ee,J,ae,ge);return Yi=null,De}catch(Me){if(Me===Fi||Me===So)throw Me;var tt=an(29,Me,null,ee.mode);return tt.lanes=ge,tt.return=ee,tt}finally{}}}var li=qg(!0),Pg=qg(!1),Er=!1;function Ec(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function xc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function xr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _r(e,t,r){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(it&2)!==0){var d=a.pending;return d===null?t.next=t:(t.next=d.next,d.next=t),a.pending=t,t=mo(e),Cg(e,null,r),t}return ho(e,a,t,r),mo(e)}function il(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,r|=a,t.lanes=r,Mp(e,r)}}function _c(e,t){var r=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,r===a)){var d=null,p=null;if(r=r.firstBaseUpdate,r!==null){do{var x={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};p===null?d=p=x:p=p.next=x,r=r.next}while(r!==null);p===null?d=p=t:p=p.next=t}else d=p=t;r={baseState:a.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:a.shared,callbacks:a.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var wc=!1;function al(){if(wc){var e=Pi;if(e!==null)throw e}}function ll(e,t,r,a){wc=!1;var d=e.updateQueue;Er=!1;var p=d.firstBaseUpdate,x=d.lastBaseUpdate,R=d.shared.pending;if(R!==null){d.shared.pending=null;var G=R,oe=G.next;G.next=null,x===null?p=oe:x.next=oe,x=G;var me=e.alternate;me!==null&&(me=me.updateQueue,R=me.lastBaseUpdate,R!==x&&(R===null?me.firstBaseUpdate=oe:R.next=oe,me.lastBaseUpdate=G))}if(p!==null){var ye=d.baseState;x=0,me=oe=G=null,R=p;do{var ue=R.lane&-536870913,fe=ue!==R.lane;if(fe?(We&ue)===ue:(a&ue)===ue){ue!==0&&ue===qi&&(wc=!0),me!==null&&(me=me.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var Ne=e,Le=R;ue=t;var ut=r;switch(Le.tag){case 1:if(Ne=Le.payload,typeof Ne=="function"){ye=Ne.call(ut,ye,ue);break e}ye=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Le.payload,ue=typeof Ne=="function"?Ne.call(ut,ye,ue):Ne,ue==null)break e;ye=y({},ye,ue);break e;case 2:Er=!0}}ue=R.callback,ue!==null&&(e.flags|=64,fe&&(e.flags|=8192),fe=d.callbacks,fe===null?d.callbacks=[ue]:fe.push(ue))}else fe={lane:ue,tag:R.tag,payload:R.payload,callback:R.callback,next:null},me===null?(oe=me=fe,G=ye):me=me.next=fe,x|=ue;if(R=R.next,R===null){if(R=d.shared.pending,R===null)break;fe=R,R=fe.next,fe.next=null,d.lastBaseUpdate=fe,d.shared.pending=null}}while(!0);me===null&&(G=ye),d.baseState=G,d.firstBaseUpdate=oe,d.lastBaseUpdate=me,p===null&&(d.shared.lanes=0),kr|=x,e.lanes=x,e.memoizedState=ye}}function Fg(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Yg(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)Fg(r[e],t)}var Vi=N(null),wo=N(0);function Vg(e,t){e=ar,z(wo,e),z(Vi,t),ar=e|t.baseLanes}function Cc(){z(wo,ar),z(Vi,Vi.current)}function Tc(){ar=wo.current,B(Vi),B(wo)}var ln=N(null),En=null;function wr(e){var t=e.alternate;z(St,St.current&1),z(ln,e),En===null&&(t===null||Vi.current!==null||t.memoizedState!==null)&&(En=e)}function Ac(e){z(St,St.current),z(ln,e),En===null&&(En=e)}function Gg(e){e.tag===22?(z(St,St.current),z(ln,e),En===null&&(En=e)):Cr()}function Cr(){z(St,St.current),z(ln,ln.current)}function on(e){B(ln),En===e&&(En=null),B(St)}var St=N(0);function Co(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Df(r)||jf(r)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Jn=0,qe=null,ot=null,wt=null,To=!1,Gi=!1,oi=!1,Ao=0,ol=0,Xi=null,eC=0;function bt(){throw Error(o(321))}function kc(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!rn(e[r],t[r]))return!1;return!0}function Nc(e,t,r,a,d,p){return Jn=p,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Z.H=e===null||e.memoizedState===null?Ny:Yc,oi=!1,p=r(a,d),oi=!1,Gi&&(p=Zg(t,r,a,d)),Xg(e),p}function Xg(e){Z.H=cl;var t=ot!==null&&ot.next!==null;if(Jn=0,wt=ot=qe=null,To=!1,ol=0,Xi=null,t)throw Error(o(300));e===null||Ct||(e=e.dependencies,e!==null&&yo(e)&&(Ct=!0))}function Zg(e,t,r,a){qe=e;var d=0;do{if(Gi&&(Xi=null),ol=0,Gi=!1,25<=d)throw Error(o(301));if(d+=1,wt=ot=null,e.updateQueue!=null){var p=e.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}Z.H=Ry,p=t(r,a)}while(Gi);return p}function tC(){var e=Z.H,t=e.useState()[0];return t=typeof t.then=="function"?sl(t):t,e=e.useState()[0],(ot!==null?ot.memoizedState:null)!==e&&(qe.flags|=1024),t}function Rc(){var e=Ao!==0;return Ao=0,e}function Oc(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function zc(e){if(To){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}To=!1}Jn=0,wt=ot=qe=null,Gi=!1,ol=Ao=0,Xi=null}function Pt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?qe.memoizedState=wt=e:wt=wt.next=e,wt}function Et(){if(ot===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=wt===null?qe.memoizedState:wt.next;if(t!==null)wt=t,ot=e;else{if(e===null)throw qe.alternate===null?Error(o(467)):Error(o(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},wt===null?qe.memoizedState=wt=e:wt=wt.next=e}return wt}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function sl(e){var t=ol;return ol+=1,Xi===null&&(Xi=[]),e=Bg(Xi,e,t),t=qe,(wt===null?t.memoizedState:wt.next)===null&&(t=t.alternate,Z.H=t===null||t.memoizedState===null?Ny:Yc),e}function No(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return sl(e);if(e.$$typeof===k)return Lt(e)}throw Error(o(438,String(e)))}function Mc(e){var t=null,r=qe.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var a=qe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(d){return d.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=ko(),qe.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),a=0;a<e;a++)r[a]=$;return t.index++,r}function Wn(e,t){return typeof t=="function"?t(e):t}function Ro(e){var t=Et();return Dc(t,ot,e)}function Dc(e,t,r){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=r;var d=e.baseQueue,p=a.pending;if(p!==null){if(d!==null){var x=d.next;d.next=p.next,p.next=x}t.baseQueue=d=p,a.pending=null}if(p=e.baseState,d===null)e.memoizedState=p;else{t=d.next;var R=x=null,G=null,oe=t,me=!1;do{var ye=oe.lane&-536870913;if(ye!==oe.lane?(We&ye)===ye:(Jn&ye)===ye){var ue=oe.revertLane;if(ue===0)G!==null&&(G=G.next={lane:0,revertLane:0,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),ye===qi&&(me=!0);else if((Jn&ue)===ue){oe=oe.next,ue===qi&&(me=!0);continue}else ye={lane:0,revertLane:oe.revertLane,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},G===null?(R=G=ye,x=p):G=G.next=ye,qe.lanes|=ue,kr|=ue;ye=oe.action,oi&&r(p,ye),p=oe.hasEagerState?oe.eagerState:r(p,ye)}else ue={lane:ye,revertLane:oe.revertLane,gesture:oe.gesture,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},G===null?(R=G=ue,x=p):G=G.next=ue,qe.lanes|=ye,kr|=ye;oe=oe.next}while(oe!==null&&oe!==t);if(G===null?x=p:G.next=R,!rn(p,e.memoizedState)&&(Ct=!0,me&&(r=Pi,r!==null)))throw r;e.memoizedState=p,e.baseState=x,e.baseQueue=G,a.lastRenderedState=p}return d===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function jc(e){var t=Et(),r=t.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=e;var a=r.dispatch,d=r.pending,p=t.memoizedState;if(d!==null){r.pending=null;var x=d=d.next;do p=e(p,x.action),x=x.next;while(x!==d);rn(p,t.memoizedState)||(Ct=!0),t.memoizedState=p,t.baseQueue===null&&(t.baseState=p),r.lastRenderedState=p}return[p,a]}function Kg(e,t,r){var a=qe,d=Et(),p=et;if(p){if(r===void 0)throw Error(o(407));r=r()}else r=t();var x=!rn((ot||d).memoizedState,r);if(x&&(d.memoizedState=r,Ct=!0),d=d.queue,Bc(Wg.bind(null,a,d,e),[e]),d.getSnapshot!==t||x||wt!==null&&wt.memoizedState.tag&1){if(a.flags|=2048,Zi(9,{destroy:void 0},Jg.bind(null,a,d,r,t),null),ct===null)throw Error(o(349));p||(Jn&127)!==0||Qg(a,t,r)}return r}function Qg(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=qe.updateQueue,t===null?(t=ko(),qe.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Jg(e,t,r,a){t.value=r,t.getSnapshot=a,$g(t)&&ey(e)}function Wg(e,t,r){return r(function(){$g(t)&&ey(e)})}function $g(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!rn(e,r)}catch{return!0}}function ey(e){var t=Wr(e,2);t!==null&&$t(t,e,2)}function Lc(e){var t=Pt();if(typeof e=="function"){var r=e;if(e=r(),oi){Ot(!0);try{r()}finally{Ot(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:e},t}function ty(e,t,r,a){return e.baseState=r,Dc(e,ot,typeof a=="function"?a:Wn)}function nC(e,t,r,a,d){if(Mo(e))throw Error(o(485));if(e=t.action,e!==null){var p={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){p.listeners.push(x)}};Z.T!==null?r(!0):p.isTransition=!1,a(p),r=t.pending,r===null?(p.next=t.pending=p,ny(t,p)):(p.next=r.next,t.pending=r.next=p)}}function ny(e,t){var r=t.action,a=t.payload,d=e.state;if(t.isTransition){var p=Z.T,x={};Z.T=x;try{var R=r(d,a),G=Z.S;G!==null&&G(x,R),ry(e,t,R)}catch(oe){Ic(e,t,oe)}finally{p!==null&&x.types!==null&&(p.types=x.types),Z.T=p}}else try{p=r(d,a),ry(e,t,p)}catch(oe){Ic(e,t,oe)}}function ry(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(a){iy(e,t,a)},function(a){return Ic(e,t,a)}):iy(e,t,r)}function iy(e,t,r){t.status="fulfilled",t.value=r,ay(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,ny(e,r)))}function Ic(e,t,r){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=r,ay(t),t=t.next;while(t!==a)}e.action=null}function ay(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ly(e,t){return t}function oy(e,t){if(et){var r=ct.formState;if(r!==null){e:{var a=qe;if(et){if(ht){t:{for(var d=ht,p=Sn;d.nodeType!==8;){if(!p){d=null;break t}if(d=xn(d.nextSibling),d===null){d=null;break t}}p=d.data,d=p==="F!"||p==="F"?d:null}if(d){ht=xn(d.nextSibling),a=d.data==="F!";break e}}vr(a)}a=!1}a&&(t=r[0])}}return r=Pt(),r.memoizedState=r.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ly,lastRenderedState:t},r.queue=a,r=Ty.bind(null,qe,a),a.dispatch=r,a=Lc(!1),p=Fc.bind(null,qe,!1,a.queue),a=Pt(),d={state:t,dispatch:null,action:e,pending:null},a.queue=d,r=nC.bind(null,qe,d,p,r),d.dispatch=r,a.memoizedState=e,[t,r,!1]}function sy(e){var t=Et();return uy(t,ot,e)}function uy(e,t,r){if(t=Dc(e,t,ly)[0],e=Ro(Wn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=sl(t)}catch(x){throw x===Fi?So:x}else a=t;t=Et();var d=t.queue,p=d.dispatch;return r!==t.memoizedState&&(qe.flags|=2048,Zi(9,{destroy:void 0},rC.bind(null,d,r),null)),[a,p,e]}function rC(e,t){e.action=t}function cy(e){var t=Et(),r=ot;if(r!==null)return uy(t,r,e);Et(),t=t.memoizedState,r=Et();var a=r.queue.dispatch;return r.memoizedState=e,[t,a,!1]}function Zi(e,t,r,a){return e={tag:e,create:r,deps:a,inst:t,next:null},t=qe.updateQueue,t===null&&(t=ko(),qe.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(a=r.next,r.next=e,e.next=a,t.lastEffect=e),e}function fy(){return Et().memoizedState}function Oo(e,t,r,a){var d=Pt();qe.flags|=e,d.memoizedState=Zi(1|t,{destroy:void 0},r,a===void 0?null:a)}function zo(e,t,r,a){var d=Et();a=a===void 0?null:a;var p=d.memoizedState.inst;ot!==null&&a!==null&&kc(a,ot.memoizedState.deps)?d.memoizedState=Zi(t,p,r,a):(qe.flags|=e,d.memoizedState=Zi(1|t,p,r,a))}function dy(e,t){Oo(8390656,8,e,t)}function Bc(e,t){zo(2048,8,e,t)}function iC(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=ko(),qe.updateQueue=t,t.events=[e];else{var r=t.events;r===null?t.events=[e]:r.push(e)}}function hy(e){var t=Et().memoizedState;return iC({ref:t,nextImpl:e}),function(){if((it&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function my(e,t){return zo(4,2,e,t)}function py(e,t){return zo(4,4,e,t)}function gy(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function yy(e,t,r){r=r!=null?r.concat([e]):null,zo(4,4,gy.bind(null,t,e),r)}function Uc(){}function by(e,t){var r=Et();t=t===void 0?null:t;var a=r.memoizedState;return t!==null&&kc(t,a[1])?a[0]:(r.memoizedState=[e,t],e)}function vy(e,t){var r=Et();t=t===void 0?null:t;var a=r.memoizedState;if(t!==null&&kc(t,a[1]))return a[0];if(a=e(),oi){Ot(!0);try{e()}finally{Ot(!1)}}return r.memoizedState=[a,t],a}function Hc(e,t,r){return r===void 0||(Jn&1073741824)!==0&&(We&261930)===0?e.memoizedState=t:(e.memoizedState=r,e=S0(),qe.lanes|=e,kr|=e,r)}function Sy(e,t,r,a){return rn(r,t)?r:Vi.current!==null?(e=Hc(e,r,a),rn(e,t)||(Ct=!0),e):(Jn&42)===0||(Jn&1073741824)!==0&&(We&261930)===0?(Ct=!0,e.memoizedState=r):(e=S0(),qe.lanes|=e,kr|=e,t)}function Ey(e,t,r,a,d){var p=Q.p;Q.p=p!==0&&8>p?p:8;var x=Z.T,R={};Z.T=R,Fc(e,!1,t,r);try{var G=d(),oe=Z.S;if(oe!==null&&oe(R,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var me=$2(G,a);ul(e,t,me,cn(e))}else ul(e,t,a,cn(e))}catch(ye){ul(e,t,{then:function(){},status:"rejected",reason:ye},cn())}finally{Q.p=p,x!==null&&R.types!==null&&(x.types=R.types),Z.T=x}}function aC(){}function qc(e,t,r,a){if(e.tag!==5)throw Error(o(476));var d=xy(e).queue;Ey(e,d,t,se,r===null?aC:function(){return _y(e),r(a)})}function xy(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:se},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function _y(e){var t=xy(e);t.next===null&&(t=e.alternate.memoizedState),ul(e,t.next.queue,{},cn())}function Pc(){return Lt(Tl)}function wy(){return Et().memoizedState}function Cy(){return Et().memoizedState}function lC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=cn();e=xr(r);var a=_r(t,e,r);a!==null&&($t(a,t,r),il(a,t,r)),t={cache:yc()},e.payload=t;return}t=t.return}}function oC(e,t,r){var a=cn();r={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Mo(e)?Ay(t,r):(r=lc(e,t,r,a),r!==null&&($t(r,e,a),ky(r,t,a)))}function Ty(e,t,r){var a=cn();ul(e,t,r,a)}function ul(e,t,r,a){var d={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(Mo(e))Ay(t,d);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=t.lastRenderedReducer,p!==null))try{var x=t.lastRenderedState,R=p(x,r);if(d.hasEagerState=!0,d.eagerState=R,rn(R,x))return ho(e,t,d,0),ct===null&&fo(),!1}catch{}finally{}if(r=lc(e,t,d,a),r!==null)return $t(r,e,a),ky(r,t,a),!0}return!1}function Fc(e,t,r,a){if(a={lane:2,revertLane:xf(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Mo(e)){if(t)throw Error(o(479))}else t=lc(e,r,a,2),t!==null&&$t(t,e,2)}function Mo(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function Ay(e,t){Gi=To=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function ky(e,t,r){if((r&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,r|=a,t.lanes=r,Mp(e,r)}}var cl={readContext:Lt,use:No,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useLayoutEffect:bt,useInsertionEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useSyncExternalStore:bt,useId:bt,useHostTransitionStatus:bt,useFormState:bt,useActionState:bt,useOptimistic:bt,useMemoCache:bt,useCacheRefresh:bt};cl.useEffectEvent=bt;var Ny={readContext:Lt,use:No,useCallback:function(e,t){return Pt().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:dy,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,Oo(4194308,4,gy.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Oo(4194308,4,e,t)},useInsertionEffect:function(e,t){Oo(4,2,e,t)},useMemo:function(e,t){var r=Pt();t=t===void 0?null:t;var a=e();if(oi){Ot(!0);try{e()}finally{Ot(!1)}}return r.memoizedState=[a,t],a},useReducer:function(e,t,r){var a=Pt();if(r!==void 0){var d=r(t);if(oi){Ot(!0);try{r(t)}finally{Ot(!1)}}}else d=t;return a.memoizedState=a.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},a.queue=e,e=e.dispatch=oC.bind(null,qe,e),[a.memoizedState,e]},useRef:function(e){var t=Pt();return e={current:e},t.memoizedState=e},useState:function(e){e=Lc(e);var t=e.queue,r=Ty.bind(null,qe,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:Uc,useDeferredValue:function(e,t){var r=Pt();return Hc(r,e,t)},useTransition:function(){var e=Lc(!1);return e=Ey.bind(null,qe,e.queue,!0,!1),Pt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var a=qe,d=Pt();if(et){if(r===void 0)throw Error(o(407));r=r()}else{if(r=t(),ct===null)throw Error(o(349));(We&127)!==0||Qg(a,t,r)}d.memoizedState=r;var p={value:r,getSnapshot:t};return d.queue=p,dy(Wg.bind(null,a,p,e),[e]),a.flags|=2048,Zi(9,{destroy:void 0},Jg.bind(null,a,p,r,t),null),r},useId:function(){var e=Pt(),t=ct.identifierPrefix;if(et){var r=In,a=Ln;r=(a&~(1<<32-Ze(a)-1)).toString(32)+r,t="_"+t+"R_"+r,r=Ao++,0<r&&(t+="H"+r.toString(32)),t+="_"}else r=eC++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Pc,useFormState:oy,useActionState:oy,useOptimistic:function(e){var t=Pt();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=Fc.bind(null,qe,!0,r),r.dispatch=t,[e,t]},useMemoCache:Mc,useCacheRefresh:function(){return Pt().memoizedState=lC.bind(null,qe)},useEffectEvent:function(e){var t=Pt(),r={impl:e};return t.memoizedState=r,function(){if((it&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}},Yc={readContext:Lt,use:No,useCallback:by,useContext:Lt,useEffect:Bc,useImperativeHandle:yy,useInsertionEffect:my,useLayoutEffect:py,useMemo:vy,useReducer:Ro,useRef:fy,useState:function(){return Ro(Wn)},useDebugValue:Uc,useDeferredValue:function(e,t){var r=Et();return Sy(r,ot.memoizedState,e,t)},useTransition:function(){var e=Ro(Wn)[0],t=Et().memoizedState;return[typeof e=="boolean"?e:sl(e),t]},useSyncExternalStore:Kg,useId:wy,useHostTransitionStatus:Pc,useFormState:sy,useActionState:sy,useOptimistic:function(e,t){var r=Et();return ty(r,ot,e,t)},useMemoCache:Mc,useCacheRefresh:Cy};Yc.useEffectEvent=hy;var Ry={readContext:Lt,use:No,useCallback:by,useContext:Lt,useEffect:Bc,useImperativeHandle:yy,useInsertionEffect:my,useLayoutEffect:py,useMemo:vy,useReducer:jc,useRef:fy,useState:function(){return jc(Wn)},useDebugValue:Uc,useDeferredValue:function(e,t){var r=Et();return ot===null?Hc(r,e,t):Sy(r,ot.memoizedState,e,t)},useTransition:function(){var e=jc(Wn)[0],t=Et().memoizedState;return[typeof e=="boolean"?e:sl(e),t]},useSyncExternalStore:Kg,useId:wy,useHostTransitionStatus:Pc,useFormState:cy,useActionState:cy,useOptimistic:function(e,t){var r=Et();return ot!==null?ty(r,ot,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Mc,useCacheRefresh:Cy};Ry.useEffectEvent=hy;function Vc(e,t,r,a){t=e.memoizedState,r=r(a,t),r=r==null?t:y({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Gc={enqueueSetState:function(e,t,r){e=e._reactInternals;var a=cn(),d=xr(a);d.payload=t,r!=null&&(d.callback=r),t=_r(e,d,a),t!==null&&($t(t,e,a),il(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var a=cn(),d=xr(a);d.tag=1,d.payload=t,r!=null&&(d.callback=r),t=_r(e,d,a),t!==null&&($t(t,e,a),il(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=cn(),a=xr(r);a.tag=2,t!=null&&(a.callback=t),t=_r(e,a,r),t!==null&&($t(t,e,r),il(t,e,r))}};function Oy(e,t,r,a,d,p,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,p,x):t.prototype&&t.prototype.isPureReactComponent?!Qa(r,a)||!Qa(d,p):!0}function zy(e,t,r,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,a),t.state!==e&&Gc.enqueueReplaceState(t,t.state,null)}function si(e,t){var r=t;if("ref"in t){r={};for(var a in t)a!=="ref"&&(r[a]=t[a])}if(e=e.defaultProps){r===t&&(r=y({},r));for(var d in e)r[d]===void 0&&(r[d]=e[d])}return r}function My(e){co(e)}function Dy(e){}function jy(e){co(e)}function Do(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Ly(e,t,r){try{var a=e.onCaughtError;a(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Xc(e,t,r){return r=xr(r),r.tag=3,r.payload={element:null},r.callback=function(){Do(e,t)},r}function Iy(e){return e=xr(e),e.tag=3,e}function By(e,t,r,a){var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var p=a.value;e.payload=function(){return d(p)},e.callback=function(){Ly(t,r,a)}}var x=r.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Ly(t,r,a),typeof d!="function"&&(Nr===null?Nr=new Set([this]):Nr.add(this));var R=a.stack;this.componentDidCatch(a.value,{componentStack:R!==null?R:""})})}function sC(e,t,r,a,d){if(r.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=r.alternate,t!==null&&Hi(t,r,d,!0),r=ln.current,r!==null){switch(r.tag){case 31:case 13:return En===null?Go():r.alternate===null&&vt===0&&(vt=3),r.flags&=-257,r.flags|=65536,r.lanes=d,a===Eo?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([a]):t.add(a),vf(e,a,d)),!1;case 22:return r.flags|=65536,a===Eo?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([a]):r.add(a)),vf(e,a,d)),!1}throw Error(o(435,r.tag))}return vf(e,a,d),Go(),!1}if(et)return t=ln.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=d,a!==dc&&(e=Error(o(422),{cause:a}),$a(yn(e,r)))):(a!==dc&&(t=Error(o(423),{cause:a}),$a(yn(t,r))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,a=yn(a,r),d=Xc(e.stateNode,a,d),_c(e,d),vt!==4&&(vt=2)),!1;var p=Error(o(520),{cause:a});if(p=yn(p,r),bl===null?bl=[p]:bl.push(p),vt!==4&&(vt=2),t===null)return!0;a=yn(a,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=d&-d,r.lanes|=e,e=Xc(r.stateNode,a,e),_c(r,e),!1;case 1:if(t=r.type,p=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Nr===null||!Nr.has(p))))return r.flags|=65536,d&=-d,r.lanes|=d,d=Iy(d),By(d,e,r,a),_c(r,d),!1}r=r.return}while(r!==null);return!1}var Zc=Error(o(461)),Ct=!1;function It(e,t,r,a){t.child=e===null?Pg(t,null,r,a):li(t,e.child,r,a)}function Uy(e,t,r,a,d){r=r.render;var p=t.ref;if("ref"in a){var x={};for(var R in a)R!=="ref"&&(x[R]=a[R])}else x=a;return ni(t),a=Nc(e,t,r,x,p,d),R=Rc(),e!==null&&!Ct?(Oc(e,t,d),$n(e,t,d)):(et&&R&&cc(t),t.flags|=1,It(e,t,a,d),t.child)}function Hy(e,t,r,a,d){if(e===null){var p=r.type;return typeof p=="function"&&!oc(p)&&p.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=p,qy(e,t,p,a,d)):(e=po(r.type,null,a,t,t.mode,d),e.ref=t.ref,e.return=t,t.child=e)}if(p=e.child,!nf(e,d)){var x=p.memoizedProps;if(r=r.compare,r=r!==null?r:Qa,r(x,a)&&e.ref===t.ref)return $n(e,t,d)}return t.flags|=1,e=Xn(p,a),e.ref=t.ref,e.return=t,t.child=e}function qy(e,t,r,a,d){if(e!==null){var p=e.memoizedProps;if(Qa(p,a)&&e.ref===t.ref)if(Ct=!1,t.pendingProps=a=p,nf(e,d))(e.flags&131072)!==0&&(Ct=!0);else return t.lanes=e.lanes,$n(e,t,d)}return Kc(e,t,r,a,d)}function Py(e,t,r,a){var d=a.children,p=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(p=p!==null?p.baseLanes|r:r,e!==null){for(a=t.child=e.child,d=0;a!==null;)d=d|a.lanes|a.childLanes,a=a.sibling;a=d&~p}else a=0,t.child=null;return Fy(e,t,p,r,a)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vo(t,p!==null?p.cachePool:null),p!==null?Vg(t,p):Cc(),Gg(t);else return a=t.lanes=536870912,Fy(e,t,p!==null?p.baseLanes|r:r,r,a)}else p!==null?(vo(t,p.cachePool),Vg(t,p),Cr(),t.memoizedState=null):(e!==null&&vo(t,null),Cc(),Cr());return It(e,t,d,r),t.child}function fl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Fy(e,t,r,a,d){var p=vc();return p=p===null?null:{parent:_t._currentValue,pool:p},t.memoizedState={baseLanes:r,cachePool:p},e!==null&&vo(t,null),Cc(),Gg(t),e!==null&&Hi(e,t,a,!0),t.childLanes=d,null}function jo(e,t){return t=Io({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Yy(e,t,r){return li(t,e.child,null,r),e=jo(t,t.pendingProps),e.flags|=2,on(t),t.memoizedState=null,e}function uC(e,t,r){var a=t.pendingProps,d=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(et){if(a.mode==="hidden")return e=jo(t,a),t.lanes=536870912,fl(null,e);if(Ac(t),(e=ht)?(e=nb(e,Sn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yr!==null?{id:Ln,overflow:In}:null,retryLane:536870912,hydrationErrors:null},r=Ag(e),r.return=t,t.child=r,jt=t,ht=null)):e=null,e===null)throw vr(t);return t.lanes=536870912,null}return jo(t,a)}var p=e.memoizedState;if(p!==null){var x=p.dehydrated;if(Ac(t),d)if(t.flags&256)t.flags&=-257,t=Yy(e,t,r);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ct||Hi(e,t,r,!1),d=(r&e.childLanes)!==0,Ct||d){if(a=ct,a!==null&&(x=Dp(a,r),x!==0&&x!==p.retryLane))throw p.retryLane=x,Wr(e,x),$t(a,e,x),Zc;Go(),t=Yy(e,t,r)}else e=p.treeContext,ht=xn(x.nextSibling),jt=t,et=!0,br=null,Sn=!1,e!==null&&Rg(t,e),t=jo(t,a),t.flags|=4096;return t}return e=Xn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Lo(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(o(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function Kc(e,t,r,a,d){return ni(t),r=Nc(e,t,r,a,void 0,d),a=Rc(),e!==null&&!Ct?(Oc(e,t,d),$n(e,t,d)):(et&&a&&cc(t),t.flags|=1,It(e,t,r,d),t.child)}function Vy(e,t,r,a,d,p){return ni(t),t.updateQueue=null,r=Zg(t,a,r,d),Xg(e),a=Rc(),e!==null&&!Ct?(Oc(e,t,p),$n(e,t,p)):(et&&a&&cc(t),t.flags|=1,It(e,t,r,p),t.child)}function Gy(e,t,r,a,d){if(ni(t),t.stateNode===null){var p=Li,x=r.contextType;typeof x=="object"&&x!==null&&(p=Lt(x)),p=new r(a,p),t.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Gc,t.stateNode=p,p._reactInternals=t,p=t.stateNode,p.props=a,p.state=t.memoizedState,p.refs={},Ec(t),x=r.contextType,p.context=typeof x=="object"&&x!==null?Lt(x):Li,p.state=t.memoizedState,x=r.getDerivedStateFromProps,typeof x=="function"&&(Vc(t,r,x,a),p.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(x=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),x!==p.state&&Gc.enqueueReplaceState(p,p.state,null),ll(t,a,p,d),al(),p.state=t.memoizedState),typeof p.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){p=t.stateNode;var R=t.memoizedProps,G=si(r,R);p.props=G;var oe=p.context,me=r.contextType;x=Li,typeof me=="object"&&me!==null&&(x=Lt(me));var ye=r.getDerivedStateFromProps;me=typeof ye=="function"||typeof p.getSnapshotBeforeUpdate=="function",R=t.pendingProps!==R,me||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(R||oe!==x)&&zy(t,p,a,x),Er=!1;var ue=t.memoizedState;p.state=ue,ll(t,a,p,d),al(),oe=t.memoizedState,R||ue!==oe||Er?(typeof ye=="function"&&(Vc(t,r,ye,a),oe=t.memoizedState),(G=Er||Oy(t,r,G,a,ue,oe,x))?(me||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(t.flags|=4194308)):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=oe),p.props=a,p.state=oe,p.context=x,a=G):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{p=t.stateNode,xc(e,t),x=t.memoizedProps,me=si(r,x),p.props=me,ye=t.pendingProps,ue=p.context,oe=r.contextType,G=Li,typeof oe=="object"&&oe!==null&&(G=Lt(oe)),R=r.getDerivedStateFromProps,(oe=typeof R=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(x!==ye||ue!==G)&&zy(t,p,a,G),Er=!1,ue=t.memoizedState,p.state=ue,ll(t,a,p,d),al();var fe=t.memoizedState;x!==ye||ue!==fe||Er||e!==null&&e.dependencies!==null&&yo(e.dependencies)?(typeof R=="function"&&(Vc(t,r,R,a),fe=t.memoizedState),(me=Er||Oy(t,r,me,a,ue,fe,G)||e!==null&&e.dependencies!==null&&yo(e.dependencies))?(oe||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(a,fe,G),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(a,fe,G)),typeof p.componentDidUpdate=="function"&&(t.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof p.componentDidUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=fe),p.props=a,p.state=fe,p.context=G,a=me):(typeof p.componentDidUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=1024),a=!1)}return p=a,Lo(e,t),a=(t.flags&128)!==0,p||a?(p=t.stateNode,r=a&&typeof r.getDerivedStateFromError!="function"?null:p.render(),t.flags|=1,e!==null&&a?(t.child=li(t,e.child,null,d),t.child=li(t,null,r,d)):It(e,t,r,d),t.memoizedState=p.state,e=t.child):e=$n(e,t,d),e}function Xy(e,t,r,a){return ei(),t.flags|=256,It(e,t,r,a),t.child}var Qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:Lg()}}function Wc(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=un),e}function Zy(e,t,r){var a=t.pendingProps,d=!1,p=(t.flags&128)!==0,x;if((x=p)||(x=e!==null&&e.memoizedState===null?!1:(St.current&2)!==0),x&&(d=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(et){if(d?wr(t):Cr(),(e=ht)?(e=nb(e,Sn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yr!==null?{id:Ln,overflow:In}:null,retryLane:536870912,hydrationErrors:null},r=Ag(e),r.return=t,t.child=r,jt=t,ht=null)):e=null,e===null)throw vr(t);return jf(e)?t.lanes=32:t.lanes=536870912,null}var R=a.children;return a=a.fallback,d?(Cr(),d=t.mode,R=Io({mode:"hidden",children:R},d),a=$r(a,d,r,null),R.return=t,a.return=t,R.sibling=a,t.child=R,a=t.child,a.memoizedState=Jc(r),a.childLanes=Wc(e,x,r),t.memoizedState=Qc,fl(null,a)):(wr(t),$c(t,R))}var G=e.memoizedState;if(G!==null&&(R=G.dehydrated,R!==null)){if(p)t.flags&256?(wr(t),t.flags&=-257,t=ef(e,t,r)):t.memoizedState!==null?(Cr(),t.child=e.child,t.flags|=128,t=null):(Cr(),R=a.fallback,d=t.mode,a=Io({mode:"visible",children:a.children},d),R=$r(R,d,r,null),R.flags|=2,a.return=t,R.return=t,a.sibling=R,t.child=a,li(t,e.child,null,r),a=t.child,a.memoizedState=Jc(r),a.childLanes=Wc(e,x,r),t.memoizedState=Qc,t=fl(null,a));else if(wr(t),jf(R)){if(x=R.nextSibling&&R.nextSibling.dataset,x)var oe=x.dgst;x=oe,a=Error(o(419)),a.stack="",a.digest=x,$a({value:a,source:null,stack:null}),t=ef(e,t,r)}else if(Ct||Hi(e,t,r,!1),x=(r&e.childLanes)!==0,Ct||x){if(x=ct,x!==null&&(a=Dp(x,r),a!==0&&a!==G.retryLane))throw G.retryLane=a,Wr(e,a),$t(x,e,a),Zc;Df(R)||Go(),t=ef(e,t,r)}else Df(R)?(t.flags|=192,t.child=e.child,t=null):(e=G.treeContext,ht=xn(R.nextSibling),jt=t,et=!0,br=null,Sn=!1,e!==null&&Rg(t,e),t=$c(t,a.children),t.flags|=4096);return t}return d?(Cr(),R=a.fallback,d=t.mode,G=e.child,oe=G.sibling,a=Xn(G,{mode:"hidden",children:a.children}),a.subtreeFlags=G.subtreeFlags&65011712,oe!==null?R=Xn(oe,R):(R=$r(R,d,r,null),R.flags|=2),R.return=t,a.return=t,a.sibling=R,t.child=a,fl(null,a),a=t.child,R=e.child.memoizedState,R===null?R=Jc(r):(d=R.cachePool,d!==null?(G=_t._currentValue,d=d.parent!==G?{parent:G,pool:G}:d):d=Lg(),R={baseLanes:R.baseLanes|r,cachePool:d}),a.memoizedState=R,a.childLanes=Wc(e,x,r),t.memoizedState=Qc,fl(e.child,a)):(wr(t),r=e.child,e=r.sibling,r=Xn(r,{mode:"visible",children:a.children}),r.return=t,r.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=r,t.memoizedState=null,r)}function $c(e,t){return t=Io({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Io(e,t){return e=an(22,e,null,t),e.lanes=0,e}function ef(e,t,r){return li(t,e.child,null,r),e=$c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ky(e,t,r){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),pc(e.return,t,r)}function tf(e,t,r,a,d,p){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:r,tailMode:d,treeForkCount:p}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=a,x.tail=r,x.tailMode=d,x.treeForkCount=p)}function Qy(e,t,r){var a=t.pendingProps,d=a.revealOrder,p=a.tail;a=a.children;var x=St.current,R=(x&2)!==0;if(R?(x=x&1|2,t.flags|=128):x&=1,z(St,x),It(e,t,a,r),a=et?Wa:0,!R&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ky(e,r,t);else if(e.tag===19)Ky(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(d){case"forwards":for(r=t.child,d=null;r!==null;)e=r.alternate,e!==null&&Co(e)===null&&(d=r),r=r.sibling;r=d,r===null?(d=t.child,t.child=null):(d=r.sibling,r.sibling=null),tf(t,!1,d,r,p,a);break;case"backwards":case"unstable_legacy-backwards":for(r=null,d=t.child,t.child=null;d!==null;){if(e=d.alternate,e!==null&&Co(e)===null){t.child=d;break}e=d.sibling,d.sibling=r,r=d,d=e}tf(t,!0,r,null,p,a);break;case"together":tf(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function $n(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),kr|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(Hi(e,t,r,!1),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,r=Xn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Xn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function nf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&yo(e)))}function cC(e,t,r){switch(t.tag){case 3:ke(t,t.stateNode.containerInfo),Sr(t,_t,e.memoizedState.cache),ei();break;case 27:case 5:He(t);break;case 4:ke(t,t.stateNode.containerInfo);break;case 10:Sr(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ac(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(wr(t),t.flags|=128,null):(r&t.child.childLanes)!==0?Zy(e,t,r):(wr(t),e=$n(e,t,r),e!==null?e.sibling:null);wr(t);break;case 19:var d=(e.flags&128)!==0;if(a=(r&t.childLanes)!==0,a||(Hi(e,t,r,!1),a=(r&t.childLanes)!==0),d){if(a)return Qy(e,t,r);t.flags|=128}if(d=t.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),z(St,St.current),a)break;return null;case 22:return t.lanes=0,Py(e,t,r,t.pendingProps);case 24:Sr(t,_t,e.memoizedState.cache)}return $n(e,t,r)}function Jy(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ct=!0;else{if(!nf(e,r)&&(t.flags&128)===0)return Ct=!1,cC(e,t,r);Ct=(e.flags&131072)!==0}else Ct=!1,et&&(t.flags&1048576)!==0&&Ng(t,Wa,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ii(t.elementType),t.type=e,typeof e=="function")oc(e)?(a=si(e,a),t.tag=1,t=Gy(null,t,e,a,r)):(t.tag=0,t=Kc(null,t,e,a,r));else{if(e!=null){var d=e.$$typeof;if(d===q){t.tag=11,t=Uy(null,t,e,a,r);break e}else if(d===I){t.tag=14,t=Hy(null,t,e,a,r);break e}}throw t=C(e)||e,Error(o(306,t,""))}}return t;case 0:return Kc(e,t,t.type,t.pendingProps,r);case 1:return a=t.type,d=si(a,t.pendingProps),Gy(e,t,a,d,r);case 3:e:{if(ke(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var p=t.memoizedState;d=p.element,xc(e,t),ll(t,a,null,r);var x=t.memoizedState;if(a=x.cache,Sr(t,_t,a),a!==p.cache&&gc(t,[_t],r,!0),al(),a=x.element,p.isDehydrated)if(p={element:a,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=p,t.memoizedState=p,t.flags&256){t=Xy(e,t,a,r);break e}else if(a!==d){d=yn(Error(o(424)),t),$a(d),t=Xy(e,t,a,r);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ht=xn(e.firstChild),jt=t,et=!0,br=null,Sn=!0,r=Pg(t,null,a,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(ei(),a===d){t=$n(e,t,r);break e}It(e,t,a,r)}t=t.child}return t;case 26:return Lo(e,t),e===null?(r=sb(t.type,null,t.pendingProps,null))?t.memoizedState=r:et||(r=t.type,e=t.pendingProps,a=$o(we.current).createElement(r),a[Dt]=t,a[Xt]=e,Bt(a,r,e),zt(a),t.stateNode=a):t.memoizedState=sb(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return He(t),e===null&&et&&(a=t.stateNode=ab(t.type,t.pendingProps,we.current),jt=t,Sn=!0,d=ht,Mr(t.type)?(Lf=d,ht=xn(a.firstChild)):ht=d),It(e,t,t.pendingProps.children,r),Lo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&et&&((d=a=ht)&&(a=HC(a,t.type,t.pendingProps,Sn),a!==null?(t.stateNode=a,jt=t,ht=xn(a.firstChild),Sn=!1,d=!0):d=!1),d||vr(t)),He(t),d=t.type,p=t.pendingProps,x=e!==null?e.memoizedProps:null,a=p.children,Of(d,p)?a=null:x!==null&&Of(d,x)&&(t.flags|=32),t.memoizedState!==null&&(d=Nc(e,t,tC,null,null,r),Tl._currentValue=d),Lo(e,t),It(e,t,a,r),t.child;case 6:return e===null&&et&&((e=r=ht)&&(r=qC(r,t.pendingProps,Sn),r!==null?(t.stateNode=r,jt=t,ht=null,e=!0):e=!1),e||vr(t)),null;case 13:return Zy(e,t,r);case 4:return ke(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=li(t,null,a,r):It(e,t,a,r),t.child;case 11:return Uy(e,t,t.type,t.pendingProps,r);case 7:return It(e,t,t.pendingProps,r),t.child;case 8:return It(e,t,t.pendingProps.children,r),t.child;case 12:return It(e,t,t.pendingProps.children,r),t.child;case 10:return a=t.pendingProps,Sr(t,t.type,a.value),It(e,t,a.children,r),t.child;case 9:return d=t.type._context,a=t.pendingProps.children,ni(t),d=Lt(d),a=a(d),t.flags|=1,It(e,t,a,r),t.child;case 14:return Hy(e,t,t.type,t.pendingProps,r);case 15:return qy(e,t,t.type,t.pendingProps,r);case 19:return Qy(e,t,r);case 31:return uC(e,t,r);case 22:return Py(e,t,r,t.pendingProps);case 24:return ni(t),a=Lt(_t),e===null?(d=vc(),d===null&&(d=ct,p=yc(),d.pooledCache=p,p.refCount++,p!==null&&(d.pooledCacheLanes|=r),d=p),t.memoizedState={parent:a,cache:d},Ec(t),Sr(t,_t,d)):((e.lanes&r)!==0&&(xc(e,t),ll(t,null,null,r),al()),d=e.memoizedState,p=t.memoizedState,d.parent!==a?(d={parent:a,cache:a},t.memoizedState=d,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=d),Sr(t,_t,a)):(a=p.cache,Sr(t,_t,a),a!==d.cache&&gc(t,[_t],r,!0))),It(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function er(e){e.flags|=4}function rf(e,t,r,a,d){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(w0())e.flags|=8192;else throw ai=Eo,Sc}else e.flags&=-16777217}function Wy(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!hb(t))if(w0())e.flags|=8192;else throw ai=Eo,Sc}function Bo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Op():536870912,e.lanes|=t,Wi|=t)}function dl(e,t){if(!et)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function mt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,a=0;if(t)for(var d=e.child;d!==null;)r|=d.lanes|d.childLanes,a|=d.subtreeFlags&65011712,a|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)r|=d.lanes|d.childLanes,a|=d.subtreeFlags,a|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=a,e.childLanes=r,t}function fC(e,t,r){var a=t.pendingProps;switch(fc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(t),null;case 1:return mt(t),null;case 3:return r=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Qn(_t),Ae(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ui(t)?er(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,hc())),mt(t),null;case 26:var d=t.type,p=t.memoizedState;return e===null?(er(t),p!==null?(mt(t),Wy(t,p)):(mt(t),rf(t,d,null,a,r))):p?p!==e.memoizedState?(er(t),mt(t),Wy(t,p)):(mt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&er(t),mt(t),rf(t,d,e,a,r)),null;case 27:if(ve(t),r=we.current,d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&er(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return mt(t),null}e=re.current,Ui(t)?Og(t):(e=ab(d,a,r),t.stateNode=e,er(t))}return mt(t),null;case 5:if(ve(t),d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&er(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return mt(t),null}if(p=re.current,Ui(t))Og(t);else{var x=$o(we.current);switch(p){case 1:p=x.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:p=x.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":p=x.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":p=x.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":p=x.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof a.is=="string"?x.createElement("select",{is:a.is}):x.createElement("select"),a.multiple?p.multiple=!0:a.size&&(p.size=a.size);break;default:p=typeof a.is=="string"?x.createElement(d,{is:a.is}):x.createElement(d)}}p[Dt]=t,p[Xt]=a;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)p.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=p;e:switch(Bt(p,d,a),d){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&er(t)}}return mt(t),rf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&er(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=we.current,Ui(t)){if(e=t.stateNode,r=t.memoizedProps,a=null,d=jt,d!==null)switch(d.tag){case 27:case 5:a=d.memoizedProps}e[Dt]=t,e=!!(e.nodeValue===r||a!==null&&a.suppressHydrationWarning===!0||Z0(e.nodeValue,r)),e||vr(t,!0)}else e=$o(e).createTextNode(a),e[Dt]=t,t.stateNode=e}return mt(t),null;case 31:if(r=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ui(t),r!==null){if(e===null){if(!a)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Dt]=t}else ei(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),e=!1}else r=hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return t.flags&256?(on(t),t):(on(t),null);if((t.flags&128)!==0)throw Error(o(558))}return mt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=Ui(t),a!==null&&a.dehydrated!==null){if(e===null){if(!d)throw Error(o(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(o(317));d[Dt]=t}else ei(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),d=!1}else d=hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return t.flags&256?(on(t),t):(on(t),null)}return on(t),(t.flags&128)!==0?(t.lanes=r,t):(r=a!==null,e=e!==null&&e.memoizedState!==null,r&&(a=t.child,d=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(d=a.alternate.memoizedState.cachePool.pool),p=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(p=a.memoizedState.cachePool.pool),p!==d&&(a.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),Bo(t,t.updateQueue),mt(t),null);case 4:return Ae(),e===null&&Tf(t.stateNode.containerInfo),mt(t),null;case 10:return Qn(t.type),mt(t),null;case 19:if(B(St),a=t.memoizedState,a===null)return mt(t),null;if(d=(t.flags&128)!==0,p=a.rendering,p===null)if(d)dl(a,!1);else{if(vt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(p=Co(e),p!==null){for(t.flags|=128,dl(a,!1),e=p.updateQueue,t.updateQueue=e,Bo(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)Tg(r,e),r=r.sibling;return z(St,St.current&1|2),et&&Zn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&_e()>Fo&&(t.flags|=128,d=!0,dl(a,!1),t.lanes=4194304)}else{if(!d)if(e=Co(p),e!==null){if(t.flags|=128,d=!0,e=e.updateQueue,t.updateQueue=e,Bo(t,e),dl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!p.alternate&&!et)return mt(t),null}else 2*_e()-a.renderingStartTime>Fo&&r!==536870912&&(t.flags|=128,d=!0,dl(a,!1),t.lanes=4194304);a.isBackwards?(p.sibling=t.child,t.child=p):(e=a.last,e!==null?e.sibling=p:t.child=p,a.last=p)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=_e(),e.sibling=null,r=St.current,z(St,d?r&1|2:r&1),et&&Zn(t,a.treeForkCount),e):(mt(t),null);case 22:case 23:return on(t),Tc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(r&536870912)!==0&&(t.flags&128)===0&&(mt(t),t.subtreeFlags&6&&(t.flags|=8192)):mt(t),r=t.updateQueue,r!==null&&Bo(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==r&&(t.flags|=2048),e!==null&&B(ri),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Qn(_t),mt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function dC(e,t){switch(fc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qn(_t),Ae(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(on(t),t.alternate===null)throw Error(o(340));ei()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(on(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ei()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(St),null;case 4:return Ae(),null;case 10:return Qn(t.type),null;case 22:case 23:return on(t),Tc(),e!==null&&B(ri),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qn(_t),null;case 25:return null;default:return null}}function $y(e,t){switch(fc(t),t.tag){case 3:Qn(_t),Ae();break;case 26:case 27:case 5:ve(t);break;case 4:Ae();break;case 31:t.memoizedState!==null&&on(t);break;case 13:on(t);break;case 19:B(St);break;case 10:Qn(t.type);break;case 22:case 23:on(t),Tc(),e!==null&&B(ri);break;case 24:Qn(_t)}}function hl(e,t){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var d=a.next;r=d;do{if((r.tag&e)===e){a=void 0;var p=r.create,x=r.inst;a=p(),x.destroy=a}r=r.next}while(r!==d)}}catch(R){lt(t,t.return,R)}}function Tr(e,t,r){try{var a=t.updateQueue,d=a!==null?a.lastEffect:null;if(d!==null){var p=d.next;a=p;do{if((a.tag&e)===e){var x=a.inst,R=x.destroy;if(R!==void 0){x.destroy=void 0,d=t;var G=r,oe=R;try{oe()}catch(me){lt(d,G,me)}}}a=a.next}while(a!==p)}}catch(me){lt(t,t.return,me)}}function e0(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{Yg(t,r)}catch(a){lt(e,e.return,a)}}}function t0(e,t,r){r.props=si(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(a){lt(e,t,a)}}function ml(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof r=="function"?e.refCleanup=r(a):r.current=a}}catch(d){lt(e,t,d)}}function Bn(e,t){var r=e.ref,a=e.refCleanup;if(r!==null)if(typeof a=="function")try{a()}catch(d){lt(e,t,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(d){lt(e,t,d)}else r.current=null}function n0(e){var t=e.type,r=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&a.focus();break e;case"img":r.src?a.src=r.src:r.srcSet&&(a.srcset=r.srcSet)}}catch(d){lt(e,e.return,d)}}function af(e,t,r){try{var a=e.stateNode;DC(a,e.type,r,t),a[Xt]=t}catch(d){lt(e,e.return,d)}}function r0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Mr(e.type)||e.tag===4}function lf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||r0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Mr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function of(e,t,r){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Vn));else if(a!==4&&(a===27&&Mr(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(of(e,t,r),e=e.sibling;e!==null;)of(e,t,r),e=e.sibling}function Uo(e,t,r){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(a!==4&&(a===27&&Mr(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(Uo(e,t,r),e=e.sibling;e!==null;)Uo(e,t,r),e=e.sibling}function i0(e){var t=e.stateNode,r=e.memoizedProps;try{for(var a=e.type,d=t.attributes;d.length;)t.removeAttributeNode(d[0]);Bt(t,a,r),t[Dt]=e,t[Xt]=r}catch(p){lt(e,e.return,p)}}var tr=!1,Tt=!1,sf=!1,a0=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function hC(e,t){if(e=e.containerInfo,Nf=ls,e=yg(e),ec(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var a=r.getSelection&&r.getSelection();if(a&&a.rangeCount!==0){r=a.anchorNode;var d=a.anchorOffset,p=a.focusNode;a=a.focusOffset;try{r.nodeType,p.nodeType}catch{r=null;break e}var x=0,R=-1,G=-1,oe=0,me=0,ye=e,ue=null;t:for(;;){for(var fe;ye!==r||d!==0&&ye.nodeType!==3||(R=x+d),ye!==p||a!==0&&ye.nodeType!==3||(G=x+a),ye.nodeType===3&&(x+=ye.nodeValue.length),(fe=ye.firstChild)!==null;)ue=ye,ye=fe;for(;;){if(ye===e)break t;if(ue===r&&++oe===d&&(R=x),ue===p&&++me===a&&(G=x),(fe=ye.nextSibling)!==null)break;ye=ue,ue=ye.parentNode}ye=fe}r=R===-1||G===-1?null:{start:R,end:G}}else r=null}r=r||{start:0,end:0}}else r=null;for(Rf={focusedElem:e,selectionRange:r},ls=!1,Mt=t;Mt!==null;)if(t=Mt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Mt=e;else for(;Mt!==null;){switch(t=Mt,p=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)d=e[r],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&p!==null){e=void 0,r=t,d=p.memoizedProps,p=p.memoizedState,a=r.stateNode;try{var Ne=si(r.type,d);e=a.getSnapshotBeforeUpdate(Ne,p),a.__reactInternalSnapshotBeforeUpdate=e}catch(Le){lt(r,r.return,Le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)Mf(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Mf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Mt=e;break}Mt=t.return}}function l0(e,t,r){var a=r.flags;switch(r.tag){case 0:case 11:case 15:rr(e,r),a&4&&hl(5,r);break;case 1:if(rr(e,r),a&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(x){lt(r,r.return,x)}else{var d=si(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(d,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){lt(r,r.return,x)}}a&64&&e0(r),a&512&&ml(r,r.return);break;case 3:if(rr(e,r),a&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{Yg(e,t)}catch(x){lt(r,r.return,x)}}break;case 27:t===null&&a&4&&i0(r);case 26:case 5:rr(e,r),t===null&&a&4&&n0(r),a&512&&ml(r,r.return);break;case 12:rr(e,r);break;case 31:rr(e,r),a&4&&u0(e,r);break;case 13:rr(e,r),a&4&&c0(e,r),a&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=xC.bind(null,r),PC(e,r))));break;case 22:if(a=r.memoizedState!==null||tr,!a){t=t!==null&&t.memoizedState!==null||Tt,d=tr;var p=Tt;tr=a,(Tt=t)&&!p?ir(e,r,(r.subtreeFlags&8772)!==0):rr(e,r),tr=d,Tt=p}break;case 30:break;default:rr(e,r)}}function o0(e){var t=e.alternate;t!==null&&(e.alternate=null,o0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Iu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var yt=null,Kt=!1;function nr(e,t,r){for(r=r.child;r!==null;)s0(e,t,r),r=r.sibling}function s0(e,t,r){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Xe,r)}catch{}switch(r.tag){case 26:Tt||Bn(r,t),nr(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Tt||Bn(r,t);var a=yt,d=Kt;Mr(r.type)&&(yt=r.stateNode,Kt=!1),nr(e,t,r),_l(r.stateNode),yt=a,Kt=d;break;case 5:Tt||Bn(r,t);case 6:if(a=yt,d=Kt,yt=null,nr(e,t,r),yt=a,Kt=d,yt!==null)if(Kt)try{(yt.nodeType===9?yt.body:yt.nodeName==="HTML"?yt.ownerDocument.body:yt).removeChild(r.stateNode)}catch(p){lt(r,t,p)}else try{yt.removeChild(r.stateNode)}catch(p){lt(r,t,p)}break;case 18:yt!==null&&(Kt?(e=yt,eb(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),la(e)):eb(yt,r.stateNode));break;case 4:a=yt,d=Kt,yt=r.stateNode.containerInfo,Kt=!0,nr(e,t,r),yt=a,Kt=d;break;case 0:case 11:case 14:case 15:Tr(2,r,t),Tt||Tr(4,r,t),nr(e,t,r);break;case 1:Tt||(Bn(r,t),a=r.stateNode,typeof a.componentWillUnmount=="function"&&t0(r,t,a)),nr(e,t,r);break;case 21:nr(e,t,r);break;case 22:Tt=(a=Tt)||r.memoizedState!==null,nr(e,t,r),Tt=a;break;default:nr(e,t,r)}}function u0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{la(e)}catch(r){lt(t,t.return,r)}}}function c0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{la(e)}catch(r){lt(t,t.return,r)}}function mC(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new a0),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new a0),t;default:throw Error(o(435,e.tag))}}function Ho(e,t){var r=mC(e);t.forEach(function(a){if(!r.has(a)){r.add(a);var d=_C.bind(null,e,a);a.then(d,d)}})}function Qt(e,t){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var d=r[a],p=e,x=t,R=x;e:for(;R!==null;){switch(R.tag){case 27:if(Mr(R.type)){yt=R.stateNode,Kt=!1;break e}break;case 5:yt=R.stateNode,Kt=!1;break e;case 3:case 4:yt=R.stateNode.containerInfo,Kt=!0;break e}R=R.return}if(yt===null)throw Error(o(160));s0(p,x,d),yt=null,Kt=!1,p=d.alternate,p!==null&&(p.return=null),d.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)f0(t,e),t=t.sibling}var An=null;function f0(e,t){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Qt(t,e),Jt(e),a&4&&(Tr(3,e,e.return),hl(3,e),Tr(5,e,e.return));break;case 1:Qt(t,e),Jt(e),a&512&&(Tt||r===null||Bn(r,r.return)),a&64&&tr&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?a:r.concat(a))));break;case 26:var d=An;if(Qt(t,e),Jt(e),a&512&&(Tt||r===null||Bn(r,r.return)),a&4){var p=r!==null?r.memoizedState:null;if(a=e.memoizedState,r===null)if(a===null)if(e.stateNode===null){e:{a=e.type,r=e.memoizedProps,d=d.ownerDocument||d;t:switch(a){case"title":p=d.getElementsByTagName("title")[0],(!p||p[qa]||p[Dt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=d.createElement(a),d.head.insertBefore(p,d.querySelector("head > title"))),Bt(p,a,r),p[Dt]=e,zt(p),a=p;break e;case"link":var x=fb("link","href",d).get(a+(r.href||""));if(x){for(var R=0;R<x.length;R++)if(p=x[R],p.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&p.getAttribute("rel")===(r.rel==null?null:r.rel)&&p.getAttribute("title")===(r.title==null?null:r.title)&&p.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){x.splice(R,1);break t}}p=d.createElement(a),Bt(p,a,r),d.head.appendChild(p);break;case"meta":if(x=fb("meta","content",d).get(a+(r.content||""))){for(R=0;R<x.length;R++)if(p=x[R],p.getAttribute("content")===(r.content==null?null:""+r.content)&&p.getAttribute("name")===(r.name==null?null:r.name)&&p.getAttribute("property")===(r.property==null?null:r.property)&&p.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&p.getAttribute("charset")===(r.charSet==null?null:r.charSet)){x.splice(R,1);break t}}p=d.createElement(a),Bt(p,a,r),d.head.appendChild(p);break;default:throw Error(o(468,a))}p[Dt]=e,zt(p),a=p}e.stateNode=a}else db(d,e.type,e.stateNode);else e.stateNode=cb(d,a,e.memoizedProps);else p!==a?(p===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):p.count--,a===null?db(d,e.type,e.stateNode):cb(d,a,e.memoizedProps)):a===null&&e.stateNode!==null&&af(e,e.memoizedProps,r.memoizedProps)}break;case 27:Qt(t,e),Jt(e),a&512&&(Tt||r===null||Bn(r,r.return)),r!==null&&a&4&&af(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Qt(t,e),Jt(e),a&512&&(Tt||r===null||Bn(r,r.return)),e.flags&32){d=e.stateNode;try{Ni(d,"")}catch(Ne){lt(e,e.return,Ne)}}a&4&&e.stateNode!=null&&(d=e.memoizedProps,af(e,d,r!==null?r.memoizedProps:d)),a&1024&&(sf=!0);break;case 6:if(Qt(t,e),Jt(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,r=e.stateNode;try{r.nodeValue=a}catch(Ne){lt(e,e.return,Ne)}}break;case 3:if(ns=null,d=An,An=es(t.containerInfo),Qt(t,e),An=d,Jt(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{la(t.containerInfo)}catch(Ne){lt(e,e.return,Ne)}sf&&(sf=!1,d0(e));break;case 4:a=An,An=es(e.stateNode.containerInfo),Qt(t,e),Jt(e),An=a;break;case 12:Qt(t,e),Jt(e);break;case 31:Qt(t,e),Jt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ho(e,a)));break;case 13:Qt(t,e),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Po=_e()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ho(e,a)));break;case 22:d=e.memoizedState!==null;var G=r!==null&&r.memoizedState!==null,oe=tr,me=Tt;if(tr=oe||d,Tt=me||G,Qt(t,e),Tt=me,tr=oe,Jt(e),a&8192)e:for(t=e.stateNode,t._visibility=d?t._visibility&-2:t._visibility|1,d&&(r===null||G||tr||Tt||ui(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){G=r=t;try{if(p=G.stateNode,d)x=p.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{R=G.stateNode;var ye=G.memoizedProps.style,ue=ye!=null&&ye.hasOwnProperty("display")?ye.display:null;R.style.display=ue==null||typeof ue=="boolean"?"":(""+ue).trim()}}catch(Ne){lt(G,G.return,Ne)}}}else if(t.tag===6){if(r===null){G=t;try{G.stateNode.nodeValue=d?"":G.memoizedProps}catch(Ne){lt(G,G.return,Ne)}}}else if(t.tag===18){if(r===null){G=t;try{var fe=G.stateNode;d?tb(fe,!0):tb(G.stateNode,!1)}catch(Ne){lt(G,G.return,Ne)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(r=a.retryQueue,r!==null&&(a.retryQueue=null,Ho(e,r))));break;case 19:Qt(t,e),Jt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ho(e,a)));break;case 30:break;case 21:break;default:Qt(t,e),Jt(e)}}function Jt(e){var t=e.flags;if(t&2){try{for(var r,a=e.return;a!==null;){if(r0(a)){r=a;break}a=a.return}if(r==null)throw Error(o(160));switch(r.tag){case 27:var d=r.stateNode,p=lf(e);Uo(e,p,d);break;case 5:var x=r.stateNode;r.flags&32&&(Ni(x,""),r.flags&=-33);var R=lf(e);Uo(e,R,x);break;case 3:case 4:var G=r.stateNode.containerInfo,oe=lf(e);of(e,oe,G);break;default:throw Error(o(161))}}catch(me){lt(e,e.return,me)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function d0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;d0(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function rr(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)l0(e,t.alternate,t),t=t.sibling}function ui(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Tr(4,t,t.return),ui(t);break;case 1:Bn(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&t0(t,t.return,r),ui(t);break;case 27:_l(t.stateNode);case 26:case 5:Bn(t,t.return),ui(t);break;case 22:t.memoizedState===null&&ui(t);break;case 30:ui(t);break;default:ui(t)}e=e.sibling}}function ir(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,d=e,p=t,x=p.flags;switch(p.tag){case 0:case 11:case 15:ir(d,p,r),hl(4,p);break;case 1:if(ir(d,p,r),a=p,d=a.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(oe){lt(a,a.return,oe)}if(a=p,d=a.updateQueue,d!==null){var R=a.stateNode;try{var G=d.shared.hiddenCallbacks;if(G!==null)for(d.shared.hiddenCallbacks=null,d=0;d<G.length;d++)Fg(G[d],R)}catch(oe){lt(a,a.return,oe)}}r&&x&64&&e0(p),ml(p,p.return);break;case 27:i0(p);case 26:case 5:ir(d,p,r),r&&a===null&&x&4&&n0(p),ml(p,p.return);break;case 12:ir(d,p,r);break;case 31:ir(d,p,r),r&&x&4&&u0(d,p);break;case 13:ir(d,p,r),r&&x&4&&c0(d,p);break;case 22:p.memoizedState===null&&ir(d,p,r),ml(p,p.return);break;case 30:break;default:ir(d,p,r)}t=t.sibling}}function uf(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&el(r))}function cf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&el(e))}function kn(e,t,r,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)h0(e,t,r,a),t=t.sibling}function h0(e,t,r,a){var d=t.flags;switch(t.tag){case 0:case 11:case 15:kn(e,t,r,a),d&2048&&hl(9,t);break;case 1:kn(e,t,r,a);break;case 3:kn(e,t,r,a),d&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&el(e)));break;case 12:if(d&2048){kn(e,t,r,a),e=t.stateNode;try{var p=t.memoizedProps,x=p.id,R=p.onPostCommit;typeof R=="function"&&R(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(G){lt(t,t.return,G)}}else kn(e,t,r,a);break;case 31:kn(e,t,r,a);break;case 13:kn(e,t,r,a);break;case 23:break;case 22:p=t.stateNode,x=t.alternate,t.memoizedState!==null?p._visibility&2?kn(e,t,r,a):pl(e,t):p._visibility&2?kn(e,t,r,a):(p._visibility|=2,Ki(e,t,r,a,(t.subtreeFlags&10256)!==0||!1)),d&2048&&uf(x,t);break;case 24:kn(e,t,r,a),d&2048&&cf(t.alternate,t);break;default:kn(e,t,r,a)}}function Ki(e,t,r,a,d){for(d=d&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var p=e,x=t,R=r,G=a,oe=x.flags;switch(x.tag){case 0:case 11:case 15:Ki(p,x,R,G,d),hl(8,x);break;case 23:break;case 22:var me=x.stateNode;x.memoizedState!==null?me._visibility&2?Ki(p,x,R,G,d):pl(p,x):(me._visibility|=2,Ki(p,x,R,G,d)),d&&oe&2048&&uf(x.alternate,x);break;case 24:Ki(p,x,R,G,d),d&&oe&2048&&cf(x.alternate,x);break;default:Ki(p,x,R,G,d)}t=t.sibling}}function pl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,a=t,d=a.flags;switch(a.tag){case 22:pl(r,a),d&2048&&uf(a.alternate,a);break;case 24:pl(r,a),d&2048&&cf(a.alternate,a);break;default:pl(r,a)}t=t.sibling}}var gl=8192;function Qi(e,t,r){if(e.subtreeFlags&gl)for(e=e.child;e!==null;)m0(e,t,r),e=e.sibling}function m0(e,t,r){switch(e.tag){case 26:Qi(e,t,r),e.flags&gl&&e.memoizedState!==null&&eT(r,An,e.memoizedState,e.memoizedProps);break;case 5:Qi(e,t,r);break;case 3:case 4:var a=An;An=es(e.stateNode.containerInfo),Qi(e,t,r),An=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=gl,gl=16777216,Qi(e,t,r),gl=a):Qi(e,t,r));break;default:Qi(e,t,r)}}function p0(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function yl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var a=t[r];Mt=a,y0(a,e)}p0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)g0(e),e=e.sibling}function g0(e){switch(e.tag){case 0:case 11:case 15:yl(e),e.flags&2048&&Tr(9,e,e.return);break;case 3:yl(e);break;case 12:yl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qo(e)):yl(e);break;default:yl(e)}}function qo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var a=t[r];Mt=a,y0(a,e)}p0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Tr(8,t,t.return),qo(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,qo(t));break;default:qo(t)}e=e.sibling}}function y0(e,t){for(;Mt!==null;){var r=Mt;switch(r.tag){case 0:case 11:case 15:Tr(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var a=r.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:el(r.memoizedState.cache)}if(a=r.child,a!==null)a.return=r,Mt=a;else e:for(r=e;Mt!==null;){a=Mt;var d=a.sibling,p=a.return;if(o0(a),a===r){Mt=null;break e}if(d!==null){d.return=p,Mt=d;break e}Mt=p}}}var pC={getCacheForType:function(e){var t=Lt(_t),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return Lt(_t).controller.signal}},gC=typeof WeakMap=="function"?WeakMap:Map,it=0,ct=null,Ke=null,We=0,at=0,sn=null,Ar=!1,Ji=!1,ff=!1,ar=0,vt=0,kr=0,ci=0,df=0,un=0,Wi=0,bl=null,Wt=null,hf=!1,Po=0,b0=0,Fo=1/0,Yo=null,Nr=null,Nt=0,Rr=null,$i=null,lr=0,mf=0,pf=null,v0=null,vl=0,gf=null;function cn(){return(it&2)!==0&&We!==0?We&-We:Z.T!==null?xf():jp()}function S0(){if(un===0)if((We&536870912)===0||et){var e=Xr;Xr<<=1,(Xr&3932160)===0&&(Xr=262144),un=e}else un=536870912;return e=ln.current,e!==null&&(e.flags|=32),un}function $t(e,t,r){(e===ct&&(at===2||at===9)||e.cancelPendingCommit!==null)&&(ea(e,0),Or(e,We,un,!1)),Ha(e,r),((it&2)===0||e!==ct)&&(e===ct&&((it&2)===0&&(ci|=r),vt===4&&Or(e,We,un,!1)),Un(e))}function E0(e,t,r){if((it&6)!==0)throw Error(o(327));var a=!r&&(t&127)===0&&(t&e.expiredLanes)===0||Ua(e,t),d=a?vC(e,t):bf(e,t,!0),p=a;do{if(d===0){Ji&&!a&&Or(e,t,0,!1);break}else{if(r=e.current.alternate,p&&!yC(r)){d=bf(e,t,!1),p=!1;continue}if(d===2){if(p=t,e.errorRecoveryDisabledLanes&p)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var R=e;d=bl;var G=R.current.memoizedState.isDehydrated;if(G&&(ea(R,x).flags|=256),x=bf(R,x,!1),x!==2){if(ff&&!G){R.errorRecoveryDisabledLanes|=p,ci|=p,d=4;break e}p=Wt,Wt=d,p!==null&&(Wt===null?Wt=p:Wt.push.apply(Wt,p))}d=x}if(p=!1,d!==2)continue}}if(d===1){ea(e,0),Or(e,t,0,!0);break}e:{switch(a=e,p=d,p){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Or(a,t,un,!Ar);break e;case 2:Wt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(d=Po+300-_e(),10<d)){if(Or(a,t,un,!Ar),$l(a,0,!0)!==0)break e;lr=t,a.timeoutHandle=W0(x0.bind(null,a,r,Wt,Yo,hf,t,un,ci,Wi,Ar,p,"Throttled",-0,0),d);break e}x0(a,r,Wt,Yo,hf,t,un,ci,Wi,Ar,p,null,-0,0)}}break}while(!0);Un(e)}function x0(e,t,r,a,d,p,x,R,G,oe,me,ye,ue,fe){if(e.timeoutHandle=-1,ye=t.subtreeFlags,ye&8192||(ye&16785408)===16785408){ye={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vn},m0(t,p,ye);var Ne=(p&62914560)===p?Po-_e():(p&4194048)===p?b0-_e():0;if(Ne=tT(ye,Ne),Ne!==null){lr=p,e.cancelPendingCommit=Ne(R0.bind(null,e,t,p,r,a,d,x,R,G,me,ye,null,ue,fe)),Or(e,p,x,!oe);return}}R0(e,t,p,r,a,d,x,R,G)}function yC(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var a=0;a<r.length;a++){var d=r[a],p=d.getSnapshot;d=d.value;try{if(!rn(p(),d))return!1}catch{return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Or(e,t,r,a){t&=~df,t&=~ci,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var d=t;0<d;){var p=31-Ze(d),x=1<<p;a[p]=-1,d&=~x}r!==0&&zp(e,r,t)}function Vo(){return(it&6)===0?(Sl(0),!1):!0}function yf(){if(Ke!==null){if(at===0)var e=Ke.return;else e=Ke,Kn=ti=null,zc(e),Yi=null,nl=0,e=Ke;for(;e!==null;)$y(e.alternate,e),e=e.return;Ke=null}}function ea(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,IC(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),lr=0,yf(),ct=e,Ke=r=Xn(e.current,null),We=t,at=0,sn=null,Ar=!1,Ji=Ua(e,t),ff=!1,Wi=un=df=ci=kr=vt=0,Wt=bl=null,hf=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var d=31-Ze(a),p=1<<d;t|=e[d],a&=~p}return ar=t,fo(),r}function _0(e,t){qe=null,Z.H=cl,t===Fi||t===So?(t=Ug(),at=3):t===Sc?(t=Ug(),at=4):at=t===Zc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,sn=t,Ke===null&&(vt=1,Do(e,yn(t,e.current)))}function w0(){var e=ln.current;return e===null?!0:(We&4194048)===We?En===null:(We&62914560)===We||(We&536870912)!==0?e===En:!1}function C0(){var e=Z.H;return Z.H=cl,e===null?cl:e}function T0(){var e=Z.A;return Z.A=pC,e}function Go(){vt=4,Ar||(We&4194048)!==We&&ln.current!==null||(Ji=!0),(kr&134217727)===0&&(ci&134217727)===0||ct===null||Or(ct,We,un,!1)}function bf(e,t,r){var a=it;it|=2;var d=C0(),p=T0();(ct!==e||We!==t)&&(Yo=null,ea(e,t)),t=!1;var x=vt;e:do try{if(at!==0&&Ke!==null){var R=Ke,G=sn;switch(at){case 8:yf(),x=6;break e;case 3:case 2:case 9:case 6:ln.current===null&&(t=!0);var oe=at;if(at=0,sn=null,ta(e,R,G,oe),r&&Ji){x=0;break e}break;default:oe=at,at=0,sn=null,ta(e,R,G,oe)}}bC(),x=vt;break}catch(me){_0(e,me)}while(!0);return t&&e.shellSuspendCounter++,Kn=ti=null,it=a,Z.H=d,Z.A=p,Ke===null&&(ct=null,We=0,fo()),x}function bC(){for(;Ke!==null;)A0(Ke)}function vC(e,t){var r=it;it|=2;var a=C0(),d=T0();ct!==e||We!==t?(Yo=null,Fo=_e()+500,ea(e,t)):Ji=Ua(e,t);e:do try{if(at!==0&&Ke!==null){t=Ke;var p=sn;t:switch(at){case 1:at=0,sn=null,ta(e,t,p,1);break;case 2:case 9:if(Ig(p)){at=0,sn=null,k0(t);break}t=function(){at!==2&&at!==9||ct!==e||(at=7),Un(e)},p.then(t,t);break e;case 3:at=7;break e;case 4:at=5;break e;case 7:Ig(p)?(at=0,sn=null,k0(t)):(at=0,sn=null,ta(e,t,p,7));break;case 5:var x=null;switch(Ke.tag){case 26:x=Ke.memoizedState;case 5:case 27:var R=Ke;if(x?hb(x):R.stateNode.complete){at=0,sn=null;var G=R.sibling;if(G!==null)Ke=G;else{var oe=R.return;oe!==null?(Ke=oe,Xo(oe)):Ke=null}break t}}at=0,sn=null,ta(e,t,p,5);break;case 6:at=0,sn=null,ta(e,t,p,6);break;case 8:yf(),vt=6;break e;default:throw Error(o(462))}}SC();break}catch(me){_0(e,me)}while(!0);return Kn=ti=null,Z.H=a,Z.A=d,it=r,Ke!==null?0:(ct=null,We=0,fo(),vt)}function SC(){for(;Ke!==null&&!le();)A0(Ke)}function A0(e){var t=Jy(e.alternate,e,ar);e.memoizedProps=e.pendingProps,t===null?Xo(e):Ke=t}function k0(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=Vy(r,t,t.pendingProps,t.type,void 0,We);break;case 11:t=Vy(r,t,t.pendingProps,t.type.render,t.ref,We);break;case 5:zc(t);default:$y(r,t),t=Ke=Tg(t,ar),t=Jy(r,t,ar)}e.memoizedProps=e.pendingProps,t===null?Xo(e):Ke=t}function ta(e,t,r,a){Kn=ti=null,zc(t),Yi=null,nl=0;var d=t.return;try{if(sC(e,d,t,r,We)){vt=1,Do(e,yn(r,e.current)),Ke=null;return}}catch(p){if(d!==null)throw Ke=d,p;vt=1,Do(e,yn(r,e.current)),Ke=null;return}t.flags&32768?(et||a===1?e=!0:Ji||(We&536870912)!==0?e=!1:(Ar=e=!0,(a===2||a===9||a===3||a===6)&&(a=ln.current,a!==null&&a.tag===13&&(a.flags|=16384))),N0(t,e)):Xo(t)}function Xo(e){var t=e;do{if((t.flags&32768)!==0){N0(t,Ar);return}e=t.return;var r=fC(t.alternate,t,ar);if(r!==null){Ke=r;return}if(t=t.sibling,t!==null){Ke=t;return}Ke=t=e}while(t!==null);vt===0&&(vt=5)}function N0(e,t){do{var r=dC(e.alternate,e);if(r!==null){r.flags&=32767,Ke=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){Ke=e;return}Ke=e=r}while(e!==null);vt=6,Ke=null}function R0(e,t,r,a,d,p,x,R,G){e.cancelPendingCommit=null;do Zo();while(Nt!==0);if((it&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(p=t.lanes|t.childLanes,p|=ac,$w(e,r,p,x,R,G),e===ct&&(Ke=ct=null,We=0),$i=t,Rr=e,lr=r,mf=p,pf=d,v0=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,wC(Ce,function(){return j0(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=Z.T,Z.T=null,d=Q.p,Q.p=2,x=it,it|=4;try{hC(e,t,r)}finally{it=x,Q.p=d,Z.T=a}}Nt=1,O0(),z0(),M0()}}function O0(){if(Nt===1){Nt=0;var e=Rr,t=$i,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=Z.T,Z.T=null;var a=Q.p;Q.p=2;var d=it;it|=4;try{f0(t,e);var p=Rf,x=yg(e.containerInfo),R=p.focusedElem,G=p.selectionRange;if(x!==R&&R&&R.ownerDocument&&gg(R.ownerDocument.documentElement,R)){if(G!==null&&ec(R)){var oe=G.start,me=G.end;if(me===void 0&&(me=oe),"selectionStart"in R)R.selectionStart=oe,R.selectionEnd=Math.min(me,R.value.length);else{var ye=R.ownerDocument||document,ue=ye&&ye.defaultView||window;if(ue.getSelection){var fe=ue.getSelection(),Ne=R.textContent.length,Le=Math.min(G.start,Ne),ut=G.end===void 0?Le:Math.min(G.end,Ne);!fe.extend&&Le>ut&&(x=ut,ut=Le,Le=x);var ee=pg(R,Le),J=pg(R,ut);if(ee&&J&&(fe.rangeCount!==1||fe.anchorNode!==ee.node||fe.anchorOffset!==ee.offset||fe.focusNode!==J.node||fe.focusOffset!==J.offset)){var ae=ye.createRange();ae.setStart(ee.node,ee.offset),fe.removeAllRanges(),Le>ut?(fe.addRange(ae),fe.extend(J.node,J.offset)):(ae.setEnd(J.node,J.offset),fe.addRange(ae))}}}}for(ye=[],fe=R;fe=fe.parentNode;)fe.nodeType===1&&ye.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<ye.length;R++){var ge=ye[R];ge.element.scrollLeft=ge.left,ge.element.scrollTop=ge.top}}ls=!!Nf,Rf=Nf=null}finally{it=d,Q.p=a,Z.T=r}}e.current=t,Nt=2}}function z0(){if(Nt===2){Nt=0;var e=Rr,t=$i,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=Z.T,Z.T=null;var a=Q.p;Q.p=2;var d=it;it|=4;try{l0(e,t.alternate,t)}finally{it=d,Q.p=a,Z.T=r}}Nt=3}}function M0(){if(Nt===4||Nt===3){Nt=0,Ee();var e=Rr,t=$i,r=lr,a=v0;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Nt=5:(Nt=0,$i=Rr=null,D0(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(Nr=null),ju(r),t=t.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Xe,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=Z.T,d=Q.p,Q.p=2,Z.T=null;try{for(var p=e.onRecoverableError,x=0;x<a.length;x++){var R=a[x];p(R.value,{componentStack:R.stack})}}finally{Z.T=t,Q.p=d}}(lr&3)!==0&&Zo(),Un(e),d=e.pendingLanes,(r&261930)!==0&&(d&42)!==0?e===gf?vl++:(vl=0,gf=e):vl=0,Sl(0)}}function D0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,el(t)))}function Zo(){return O0(),z0(),M0(),j0()}function j0(){if(Nt!==5)return!1;var e=Rr,t=mf;mf=0;var r=ju(lr),a=Z.T,d=Q.p;try{Q.p=32>r?32:r,Z.T=null,r=pf,pf=null;var p=Rr,x=lr;if(Nt=0,$i=Rr=null,lr=0,(it&6)!==0)throw Error(o(331));var R=it;if(it|=4,g0(p.current),h0(p,p.current,x,r),it=R,Sl(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Xe,p)}catch{}return!0}finally{Q.p=d,Z.T=a,D0(e,t)}}function L0(e,t,r){t=yn(r,t),t=Xc(e.stateNode,t,2),e=_r(e,t,2),e!==null&&(Ha(e,2),Un(e))}function lt(e,t,r){if(e.tag===3)L0(e,e,r);else for(;t!==null;){if(t.tag===3){L0(t,e,r);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Nr===null||!Nr.has(a))){e=yn(r,e),r=Iy(2),a=_r(t,r,2),a!==null&&(By(r,a,t,e),Ha(a,2),Un(a));break}}t=t.return}}function vf(e,t,r){var a=e.pingCache;if(a===null){a=e.pingCache=new gC;var d=new Set;a.set(t,d)}else d=a.get(t),d===void 0&&(d=new Set,a.set(t,d));d.has(r)||(ff=!0,d.add(r),e=EC.bind(null,e,t,r),t.then(e,e))}function EC(e,t,r){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,ct===e&&(We&r)===r&&(vt===4||vt===3&&(We&62914560)===We&&300>_e()-Po?(it&2)===0&&ea(e,0):df|=r,Wi===We&&(Wi=0)),Un(e)}function I0(e,t){t===0&&(t=Op()),e=Wr(e,t),e!==null&&(Ha(e,t),Un(e))}function xC(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),I0(e,r)}function _C(e,t){var r=0;switch(e.tag){case 31:case 13:var a=e.stateNode,d=e.memoizedState;d!==null&&(r=d.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),I0(e,r)}function wC(e,t){return he(e,t)}var Ko=null,na=null,Sf=!1,Qo=!1,Ef=!1,zr=0;function Un(e){e!==na&&e.next===null&&(na===null?Ko=na=e:na=na.next=e),Qo=!0,Sf||(Sf=!0,TC())}function Sl(e,t){if(!Ef&&Qo){Ef=!0;do for(var r=!1,a=Ko;a!==null;){if(e!==0){var d=a.pendingLanes;if(d===0)var p=0;else{var x=a.suspendedLanes,R=a.pingedLanes;p=(1<<31-Ze(42|e)+1)-1,p&=d&~(x&~R),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(r=!0,q0(a,p))}else p=We,p=$l(a,a===ct?p:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(p&3)===0||Ua(a,p)||(r=!0,q0(a,p));a=a.next}while(r);Ef=!1}}function CC(){B0()}function B0(){Qo=Sf=!1;var e=0;zr!==0&&LC()&&(e=zr);for(var t=_e(),r=null,a=Ko;a!==null;){var d=a.next,p=U0(a,t);p===0?(a.next=null,r===null?Ko=d:r.next=d,d===null&&(na=r)):(r=a,(e!==0||(p&3)!==0)&&(Qo=!0)),a=d}Nt!==0&&Nt!==5||Sl(e),zr!==0&&(zr=0)}function U0(e,t){for(var r=e.suspendedLanes,a=e.pingedLanes,d=e.expirationTimes,p=e.pendingLanes&-62914561;0<p;){var x=31-Ze(p),R=1<<x,G=d[x];G===-1?((R&r)===0||(R&a)!==0)&&(d[x]=Ww(R,t)):G<=t&&(e.expiredLanes|=R),p&=~R}if(t=ct,r=We,r=$l(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,r===0||e===t&&(at===2||at===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&pe(a),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Ua(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(a!==null&&pe(a),ju(r)){case 2:case 8:r=be;break;case 32:r=Ce;break;case 268435456:r=Je;break;default:r=Ce}return a=H0.bind(null,e),r=he(r,a),e.callbackPriority=t,e.callbackNode=r,t}return a!==null&&a!==null&&pe(a),e.callbackPriority=2,e.callbackNode=null,2}function H0(e,t){if(Nt!==0&&Nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(Zo()&&e.callbackNode!==r)return null;var a=We;return a=$l(e,e===ct?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(E0(e,a,t),U0(e,_e()),e.callbackNode!=null&&e.callbackNode===r?H0.bind(null,e):null)}function q0(e,t){if(Zo())return null;E0(e,t,!0)}function TC(){BC(function(){(it&6)!==0?he(te,CC):B0()})}function xf(){if(zr===0){var e=qi;e===0&&(e=xi,xi<<=1,(xi&261888)===0&&(xi=256)),zr=e}return zr}function P0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ro(""+e)}function F0(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function AC(e,t,r,a,d){if(t==="submit"&&r&&r.stateNode===d){var p=P0((d[Xt]||null).action),x=a.submitter;x&&(t=(t=x[Xt]||null)?P0(t.formAction):x.getAttribute("formAction"),t!==null&&(p=t,x=null));var R=new oo("action","action",null,a,d);e.push({event:R,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(zr!==0){var G=x?F0(d,x):new FormData(d);qc(r,{pending:!0,data:G,method:d.method,action:p},null,G)}}else typeof p=="function"&&(R.preventDefault(),G=x?F0(d,x):new FormData(d),qc(r,{pending:!0,data:G,method:d.method,action:p},p,G))},currentTarget:d}]})}}for(var _f=0;_f<ic.length;_f++){var wf=ic[_f],kC=wf.toLowerCase(),NC=wf[0].toUpperCase()+wf.slice(1);Tn(kC,"on"+NC)}Tn(Sg,"onAnimationEnd"),Tn(Eg,"onAnimationIteration"),Tn(xg,"onAnimationStart"),Tn("dblclick","onDoubleClick"),Tn("focusin","onFocus"),Tn("focusout","onBlur"),Tn(V2,"onTransitionRun"),Tn(G2,"onTransitionStart"),Tn(X2,"onTransitionCancel"),Tn(_g,"onTransitionEnd"),Ai("onMouseEnter",["mouseout","mouseover"]),Ai("onMouseLeave",["mouseout","mouseover"]),Ai("onPointerEnter",["pointerout","pointerover"]),Ai("onPointerLeave",["pointerout","pointerover"]),Zr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var El="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),RC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(El));function Y0(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var a=e[r],d=a.event;a=a.listeners;e:{var p=void 0;if(t)for(var x=a.length-1;0<=x;x--){var R=a[x],G=R.instance,oe=R.currentTarget;if(R=R.listener,G!==p&&d.isPropagationStopped())break e;p=R,d.currentTarget=oe;try{p(d)}catch(me){co(me)}d.currentTarget=null,p=G}else for(x=0;x<a.length;x++){if(R=a[x],G=R.instance,oe=R.currentTarget,R=R.listener,G!==p&&d.isPropagationStopped())break e;p=R,d.currentTarget=oe;try{p(d)}catch(me){co(me)}d.currentTarget=null,p=G}}}}function Qe(e,t){var r=t[Lu];r===void 0&&(r=t[Lu]=new Set);var a=e+"__bubble";r.has(a)||(V0(t,e,2,!1),r.add(a))}function Cf(e,t,r){var a=0;t&&(a|=4),V0(r,e,a,t)}var Jo="_reactListening"+Math.random().toString(36).slice(2);function Tf(e){if(!e[Jo]){e[Jo]=!0,Bp.forEach(function(r){r!=="selectionchange"&&(RC.has(r)||Cf(r,!1,e),Cf(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jo]||(t[Jo]=!0,Cf("selectionchange",!1,t))}}function V0(e,t,r,a){switch(Sb(t)){case 2:var d=iT;break;case 8:d=aT;break;default:d=qf}r=d.bind(null,t,r,e),d=void 0,!Vu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(d=!0),a?d!==void 0?e.addEventListener(t,r,{capture:!0,passive:d}):e.addEventListener(t,r,!0):d!==void 0?e.addEventListener(t,r,{passive:d}):e.addEventListener(t,r,!1)}function Af(e,t,r,a,d){var p=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var x=a.tag;if(x===3||x===4){var R=a.stateNode.containerInfo;if(R===d)break;if(x===4)for(x=a.return;x!==null;){var G=x.tag;if((G===3||G===4)&&x.stateNode.containerInfo===d)return;x=x.return}for(;R!==null;){if(x=wi(R),x===null)return;if(G=x.tag,G===5||G===6||G===26||G===27){a=p=x;continue e}R=R.parentNode}}a=a.return}Qp(function(){var oe=p,me=Fu(r),ye=[];e:{var ue=wg.get(e);if(ue!==void 0){var fe=oo,Ne=e;switch(e){case"keypress":if(ao(r)===0)break e;case"keydown":case"keyup":fe=_2;break;case"focusin":Ne="focus",fe=Ku;break;case"focusout":Ne="blur",fe=Ku;break;case"beforeblur":case"afterblur":fe=Ku;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=$p;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=f2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=T2;break;case Sg:case Eg:case xg:fe=m2;break;case _g:fe=k2;break;case"scroll":case"scrollend":fe=u2;break;case"wheel":fe=R2;break;case"copy":case"cut":case"paste":fe=g2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=tg;break;case"toggle":case"beforetoggle":fe=z2}var Le=(t&4)!==0,ut=!Le&&(e==="scroll"||e==="scrollend"),ee=Le?ue!==null?ue+"Capture":null:ue;Le=[];for(var J=oe,ae;J!==null;){var ge=J;if(ae=ge.stateNode,ge=ge.tag,ge!==5&&ge!==26&&ge!==27||ae===null||ee===null||(ge=Fa(J,ee),ge!=null&&Le.push(xl(J,ge,ae))),ut)break;J=J.return}0<Le.length&&(ue=new fe(ue,Ne,null,r,me),ye.push({event:ue,listeners:Le}))}}if((t&7)===0){e:{if(ue=e==="mouseover"||e==="pointerover",fe=e==="mouseout"||e==="pointerout",ue&&r!==Pu&&(Ne=r.relatedTarget||r.fromElement)&&(wi(Ne)||Ne[_i]))break e;if((fe||ue)&&(ue=me.window===me?me:(ue=me.ownerDocument)?ue.defaultView||ue.parentWindow:window,fe?(Ne=r.relatedTarget||r.toElement,fe=oe,Ne=Ne?wi(Ne):null,Ne!==null&&(ut=s(Ne),Le=Ne.tag,Ne!==ut||Le!==5&&Le!==27&&Le!==6)&&(Ne=null)):(fe=null,Ne=oe),fe!==Ne)){if(Le=$p,ge="onMouseLeave",ee="onMouseEnter",J="mouse",(e==="pointerout"||e==="pointerover")&&(Le=tg,ge="onPointerLeave",ee="onPointerEnter",J="pointer"),ut=fe==null?ue:Pa(fe),ae=Ne==null?ue:Pa(Ne),ue=new Le(ge,J+"leave",fe,r,me),ue.target=ut,ue.relatedTarget=ae,ge=null,wi(me)===oe&&(Le=new Le(ee,J+"enter",Ne,r,me),Le.target=ae,Le.relatedTarget=ut,ge=Le),ut=ge,fe&&Ne)t:{for(Le=OC,ee=fe,J=Ne,ae=0,ge=ee;ge;ge=Le(ge))ae++;ge=0;for(var De=J;De;De=Le(De))ge++;for(;0<ae-ge;)ee=Le(ee),ae--;for(;0<ge-ae;)J=Le(J),ge--;for(;ae--;){if(ee===J||J!==null&&ee===J.alternate){Le=ee;break t}ee=Le(ee),J=Le(J)}Le=null}else Le=null;fe!==null&&G0(ye,ue,fe,Le,!1),Ne!==null&&ut!==null&&G0(ye,ut,Ne,Le,!0)}}e:{if(ue=oe?Pa(oe):window,fe=ue.nodeName&&ue.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ue.type==="file")var tt=ug;else if(og(ue))if(cg)tt=P2;else{tt=H2;var Me=U2}else fe=ue.nodeName,!fe||fe.toLowerCase()!=="input"||ue.type!=="checkbox"&&ue.type!=="radio"?oe&&qu(oe.elementType)&&(tt=ug):tt=q2;if(tt&&(tt=tt(e,oe))){sg(ye,tt,r,me);break e}Me&&Me(e,ue,oe),e==="focusout"&&oe&&ue.type==="number"&&oe.memoizedProps.value!=null&&Hu(ue,"number",ue.value)}switch(Me=oe?Pa(oe):window,e){case"focusin":(og(Me)||Me.contentEditable==="true")&&(Mi=Me,tc=oe,Ja=null);break;case"focusout":Ja=tc=Mi=null;break;case"mousedown":nc=!0;break;case"contextmenu":case"mouseup":case"dragend":nc=!1,bg(ye,r,me);break;case"selectionchange":if(Y2)break;case"keydown":case"keyup":bg(ye,r,me)}var Fe;if(Ju)e:{switch(e){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else zi?ag(e,r)&&($e="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&($e="onCompositionStart");$e&&(ng&&r.locale!=="ko"&&(zi||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&zi&&(Fe=Jp()):(gr=me,Gu="value"in gr?gr.value:gr.textContent,zi=!0)),Me=Wo(oe,$e),0<Me.length&&($e=new eg($e,e,null,r,me),ye.push({event:$e,listeners:Me}),Fe?$e.data=Fe:(Fe=lg(r),Fe!==null&&($e.data=Fe)))),(Fe=D2?j2(e,r):L2(e,r))&&($e=Wo(oe,"onBeforeInput"),0<$e.length&&(Me=new eg("onBeforeInput","beforeinput",null,r,me),ye.push({event:Me,listeners:$e}),Me.data=Fe)),AC(ye,e,oe,r,me)}Y0(ye,t)})}function xl(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Wo(e,t){for(var r=t+"Capture",a=[];e!==null;){var d=e,p=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||p===null||(d=Fa(e,r),d!=null&&a.unshift(xl(e,d,p)),d=Fa(e,t),d!=null&&a.push(xl(e,d,p))),e.tag===3)return a;e=e.return}return[]}function OC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function G0(e,t,r,a,d){for(var p=t._reactName,x=[];r!==null&&r!==a;){var R=r,G=R.alternate,oe=R.stateNode;if(R=R.tag,G!==null&&G===a)break;R!==5&&R!==26&&R!==27||oe===null||(G=oe,d?(oe=Fa(r,p),oe!=null&&x.unshift(xl(r,oe,G))):d||(oe=Fa(r,p),oe!=null&&x.push(xl(r,oe,G)))),r=r.return}x.length!==0&&e.push({event:t,listeners:x})}var zC=/\r\n?/g,MC=/\u0000|\uFFFD/g;function X0(e){return(typeof e=="string"?e:""+e).replace(zC,`
|
|
9
|
-
`).replace(MC,"")}function Z0(e,t){return t=X0(t),X0(e)===t}function st(e,t,r,a,d,p){switch(r){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ni(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ni(e,""+a);break;case"className":to(e,"class",a);break;case"tabIndex":to(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":to(e,r,a);break;case"style":Zp(e,a,p);break;case"data":if(t!=="object"){to(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(r);break}a=ro(""+a),e.setAttribute(r,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(r==="formAction"?(t!=="input"&&st(e,t,"name",d.name,d,null),st(e,t,"formEncType",d.formEncType,d,null),st(e,t,"formMethod",d.formMethod,d,null),st(e,t,"formTarget",d.formTarget,d,null)):(st(e,t,"encType",d.encType,d,null),st(e,t,"method",d.method,d,null),st(e,t,"target",d.target,d,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(r);break}a=ro(""+a),e.setAttribute(r,a);break;case"onClick":a!=null&&(e.onclick=Vn);break;case"onScroll":a!=null&&Qe("scroll",e);break;case"onScrollEnd":a!=null&&Qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(r=a.__html,r!=null){if(d.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}r=ro(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,""+a):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":a===!0?e.setAttribute(r,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,a):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(r,a):e.removeAttribute(r);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(r):e.setAttribute(r,a);break;case"popover":Qe("beforetoggle",e),Qe("toggle",e),eo(e,"popover",a);break;case"xlinkActuate":Yn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Yn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Yn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Yn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Yn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Yn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":eo(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=o2.get(r)||r,eo(e,r,a))}}function kf(e,t,r,a,d,p){switch(r){case"style":Zp(e,a,p);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(r=a.__html,r!=null){if(d.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"children":typeof a=="string"?Ni(e,a):(typeof a=="number"||typeof a=="bigint")&&Ni(e,""+a);break;case"onScroll":a!=null&&Qe("scroll",e);break;case"onScrollEnd":a!=null&&Qe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Vn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Up.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(d=r.endsWith("Capture"),t=r.slice(2,d?r.length-7:void 0),p=e[Xt]||null,p=p!=null?p[r]:null,typeof p=="function"&&e.removeEventListener(t,p,d),typeof a=="function")){typeof p!="function"&&p!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,a,d);break e}r in e?e[r]=a:a===!0?e.setAttribute(r,""):eo(e,r,a)}}}function Bt(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",e),Qe("load",e);var a=!1,d=!1,p;for(p in r)if(r.hasOwnProperty(p)){var x=r[p];if(x!=null)switch(p){case"src":a=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,p,x,r,null)}}d&&st(e,t,"srcSet",r.srcSet,r,null),a&&st(e,t,"src",r.src,r,null);return;case"input":Qe("invalid",e);var R=p=x=d=null,G=null,oe=null;for(a in r)if(r.hasOwnProperty(a)){var me=r[a];if(me!=null)switch(a){case"name":d=me;break;case"type":x=me;break;case"checked":G=me;break;case"defaultChecked":oe=me;break;case"value":p=me;break;case"defaultValue":R=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(o(137,t));break;default:st(e,t,a,me,r,null)}}Yp(e,p,R,G,oe,x,d,!1);return;case"select":Qe("invalid",e),a=x=p=null;for(d in r)if(r.hasOwnProperty(d)&&(R=r[d],R!=null))switch(d){case"value":p=R;break;case"defaultValue":x=R;break;case"multiple":a=R;default:st(e,t,d,R,r,null)}t=p,r=x,e.multiple=!!a,t!=null?ki(e,!!a,t,!1):r!=null&&ki(e,!!a,r,!0);return;case"textarea":Qe("invalid",e),p=d=a=null;for(x in r)if(r.hasOwnProperty(x)&&(R=r[x],R!=null))switch(x){case"value":a=R;break;case"defaultValue":d=R;break;case"children":p=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(o(91));break;default:st(e,t,x,R,r,null)}Gp(e,a,d,p);return;case"option":for(G in r)if(r.hasOwnProperty(G)&&(a=r[G],a!=null))switch(G){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:st(e,t,G,a,r,null)}return;case"dialog":Qe("beforetoggle",e),Qe("toggle",e),Qe("cancel",e),Qe("close",e);break;case"iframe":case"object":Qe("load",e);break;case"video":case"audio":for(a=0;a<El.length;a++)Qe(El[a],e);break;case"image":Qe("error",e),Qe("load",e);break;case"details":Qe("toggle",e);break;case"embed":case"source":case"link":Qe("error",e),Qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(oe in r)if(r.hasOwnProperty(oe)&&(a=r[oe],a!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,oe,a,r,null)}return;default:if(qu(t)){for(me in r)r.hasOwnProperty(me)&&(a=r[me],a!==void 0&&kf(e,t,me,a,r,void 0));return}}for(R in r)r.hasOwnProperty(R)&&(a=r[R],a!=null&&st(e,t,R,a,r,null))}function DC(e,t,r,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,p=null,x=null,R=null,G=null,oe=null,me=null;for(fe in r){var ye=r[fe];if(r.hasOwnProperty(fe)&&ye!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":G=ye;default:a.hasOwnProperty(fe)||st(e,t,fe,null,a,ye)}}for(var ue in a){var fe=a[ue];if(ye=r[ue],a.hasOwnProperty(ue)&&(fe!=null||ye!=null))switch(ue){case"type":p=fe;break;case"name":d=fe;break;case"checked":oe=fe;break;case"defaultChecked":me=fe;break;case"value":x=fe;break;case"defaultValue":R=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(o(137,t));break;default:fe!==ye&&st(e,t,ue,fe,a,ye)}}Uu(e,x,R,G,oe,me,p,d);return;case"select":fe=x=R=ue=null;for(p in r)if(G=r[p],r.hasOwnProperty(p)&&G!=null)switch(p){case"value":break;case"multiple":fe=G;default:a.hasOwnProperty(p)||st(e,t,p,null,a,G)}for(d in a)if(p=a[d],G=r[d],a.hasOwnProperty(d)&&(p!=null||G!=null))switch(d){case"value":ue=p;break;case"defaultValue":R=p;break;case"multiple":x=p;default:p!==G&&st(e,t,d,p,a,G)}t=R,r=x,a=fe,ue!=null?ki(e,!!r,ue,!1):!!a!=!!r&&(t!=null?ki(e,!!r,t,!0):ki(e,!!r,r?[]:"",!1));return;case"textarea":fe=ue=null;for(R in r)if(d=r[R],r.hasOwnProperty(R)&&d!=null&&!a.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:st(e,t,R,null,a,d)}for(x in a)if(d=a[x],p=r[x],a.hasOwnProperty(x)&&(d!=null||p!=null))switch(x){case"value":ue=d;break;case"defaultValue":fe=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(o(91));break;default:d!==p&&st(e,t,x,d,a,p)}Vp(e,ue,fe);return;case"option":for(var Ne in r)if(ue=r[Ne],r.hasOwnProperty(Ne)&&ue!=null&&!a.hasOwnProperty(Ne))switch(Ne){case"selected":e.selected=!1;break;default:st(e,t,Ne,null,a,ue)}for(G in a)if(ue=a[G],fe=r[G],a.hasOwnProperty(G)&&ue!==fe&&(ue!=null||fe!=null))switch(G){case"selected":e.selected=ue&&typeof ue!="function"&&typeof ue!="symbol";break;default:st(e,t,G,ue,a,fe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Le in r)ue=r[Le],r.hasOwnProperty(Le)&&ue!=null&&!a.hasOwnProperty(Le)&&st(e,t,Le,null,a,ue);for(oe in a)if(ue=a[oe],fe=r[oe],a.hasOwnProperty(oe)&&ue!==fe&&(ue!=null||fe!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(o(137,t));break;default:st(e,t,oe,ue,a,fe)}return;default:if(qu(t)){for(var ut in r)ue=r[ut],r.hasOwnProperty(ut)&&ue!==void 0&&!a.hasOwnProperty(ut)&&kf(e,t,ut,void 0,a,ue);for(me in a)ue=a[me],fe=r[me],!a.hasOwnProperty(me)||ue===fe||ue===void 0&&fe===void 0||kf(e,t,me,ue,a,fe);return}}for(var ee in r)ue=r[ee],r.hasOwnProperty(ee)&&ue!=null&&!a.hasOwnProperty(ee)&&st(e,t,ee,null,a,ue);for(ye in a)ue=a[ye],fe=r[ye],!a.hasOwnProperty(ye)||ue===fe||ue==null&&fe==null||st(e,t,ye,ue,a,fe)}function K0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function jC(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),a=0;a<r.length;a++){var d=r[a],p=d.transferSize,x=d.initiatorType,R=d.duration;if(p&&R&&K0(x)){for(x=0,R=d.responseEnd,a+=1;a<r.length;a++){var G=r[a],oe=G.startTime;if(oe>R)break;var me=G.transferSize,ye=G.initiatorType;me&&K0(ye)&&(G=G.responseEnd,x+=me*(G<R?1:(R-oe)/(G-oe)))}if(--a,t+=8*(p+x)/(d.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Nf=null,Rf=null;function $o(e){return e.nodeType===9?e:e.ownerDocument}function Q0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function J0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Of(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var zf=null;function LC(){var e=window.event;return e&&e.type==="popstate"?e===zf?!1:(zf=e,!0):(zf=null,!1)}var W0=typeof setTimeout=="function"?setTimeout:void 0,IC=typeof clearTimeout=="function"?clearTimeout:void 0,$0=typeof Promise=="function"?Promise:void 0,BC=typeof queueMicrotask=="function"?queueMicrotask:typeof $0<"u"?function(e){return $0.resolve(null).then(e).catch(UC)}:W0;function UC(e){setTimeout(function(){throw e})}function Mr(e){return e==="head"}function eb(e,t){var r=t,a=0;do{var d=r.nextSibling;if(e.removeChild(r),d&&d.nodeType===8)if(r=d.data,r==="/$"||r==="/&"){if(a===0){e.removeChild(d),la(t);return}a--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")a++;else if(r==="html")_l(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,_l(r);for(var p=r.firstChild;p;){var x=p.nextSibling,R=p.nodeName;p[qa]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&p.rel.toLowerCase()==="stylesheet"||r.removeChild(p),p=x}}else r==="body"&&_l(e.ownerDocument.body);r=d}while(r);la(t)}function tb(e,t){var r=e;e=0;do{var a=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=a}while(r)}function Mf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Mf(r),Iu(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function HC(e,t,r,a){for(;e.nodeType===1;){var d=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[qa])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(p=e.getAttribute("rel"),p==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(p!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(p=e.getAttribute("src"),(p!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&p&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var p=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===p)return e}else return e;if(e=xn(e.nextSibling),e===null)break}return null}function qC(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=xn(e.nextSibling),e===null))return null;return e}function nb(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=xn(e.nextSibling),e===null))return null;return e}function Df(e){return e.data==="$?"||e.data==="$~"}function jf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function PC(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else{var a=function(){t(),r.removeEventListener("DOMContentLoaded",a)};r.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function xn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Lf=null;function rb(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return xn(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function ib(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--}else r!=="/$"&&r!=="/&"||t++}e=e.previousSibling}return null}function ab(e,t,r){switch(t=$o(r),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function _l(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Iu(e)}var _n=new Map,lb=new Set;function es(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var or=Q.d;Q.d={f:FC,r:YC,D:VC,C:GC,L:XC,m:ZC,X:QC,S:KC,M:JC};function FC(){var e=or.f(),t=Vo();return e||t}function YC(e){var t=Ci(e);t!==null&&t.tag===5&&t.type==="form"?_y(t):or.r(e)}var ra=typeof document>"u"?null:document;function ob(e,t,r){var a=ra;if(a&&typeof t=="string"&&t){var d=pn(t);d='link[rel="'+e+'"][href="'+d+'"]',typeof r=="string"&&(d+='[crossorigin="'+r+'"]'),lb.has(d)||(lb.add(d),e={rel:e,crossOrigin:r,href:t},a.querySelector(d)===null&&(t=a.createElement("link"),Bt(t,"link",e),zt(t),a.head.appendChild(t)))}}function VC(e){or.D(e),ob("dns-prefetch",e,null)}function GC(e,t){or.C(e,t),ob("preconnect",e,t)}function XC(e,t,r){or.L(e,t,r);var a=ra;if(a&&e&&t){var d='link[rel="preload"][as="'+pn(t)+'"]';t==="image"&&r&&r.imageSrcSet?(d+='[imagesrcset="'+pn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(d+='[imagesizes="'+pn(r.imageSizes)+'"]')):d+='[href="'+pn(e)+'"]';var p=d;switch(t){case"style":p=ia(e);break;case"script":p=aa(e)}_n.has(p)||(e=y({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),_n.set(p,e),a.querySelector(d)!==null||t==="style"&&a.querySelector(wl(p))||t==="script"&&a.querySelector(Cl(p))||(t=a.createElement("link"),Bt(t,"link",e),zt(t),a.head.appendChild(t)))}}function ZC(e,t){or.m(e,t);var r=ra;if(r&&e){var a=t&&typeof t.as=="string"?t.as:"script",d='link[rel="modulepreload"][as="'+pn(a)+'"][href="'+pn(e)+'"]',p=d;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=aa(e)}if(!_n.has(p)&&(e=y({rel:"modulepreload",href:e},t),_n.set(p,e),r.querySelector(d)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Cl(p)))return}a=r.createElement("link"),Bt(a,"link",e),zt(a),r.head.appendChild(a)}}}function KC(e,t,r){or.S(e,t,r);var a=ra;if(a&&e){var d=Ti(a).hoistableStyles,p=ia(e);t=t||"default";var x=d.get(p);if(!x){var R={loading:0,preload:null};if(x=a.querySelector(wl(p)))R.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},r),(r=_n.get(p))&&If(e,r);var G=x=a.createElement("link");zt(G),Bt(G,"link",e),G._p=new Promise(function(oe,me){G.onload=oe,G.onerror=me}),G.addEventListener("load",function(){R.loading|=1}),G.addEventListener("error",function(){R.loading|=2}),R.loading|=4,ts(x,t,a)}x={type:"stylesheet",instance:x,count:1,state:R},d.set(p,x)}}}function QC(e,t){or.X(e,t);var r=ra;if(r&&e){var a=Ti(r).hoistableScripts,d=aa(e),p=a.get(d);p||(p=r.querySelector(Cl(d)),p||(e=y({src:e,async:!0},t),(t=_n.get(d))&&Bf(e,t),p=r.createElement("script"),zt(p),Bt(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},a.set(d,p))}}function JC(e,t){or.M(e,t);var r=ra;if(r&&e){var a=Ti(r).hoistableScripts,d=aa(e),p=a.get(d);p||(p=r.querySelector(Cl(d)),p||(e=y({src:e,async:!0,type:"module"},t),(t=_n.get(d))&&Bf(e,t),p=r.createElement("script"),zt(p),Bt(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},a.set(d,p))}}function sb(e,t,r,a){var d=(d=we.current)?es(d):null;if(!d)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=ia(r.href),r=Ti(d).hoistableStyles,a=r.get(t),a||(a={type:"style",instance:null,count:0,state:null},r.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=ia(r.href);var p=Ti(d).hoistableStyles,x=p.get(e);if(x||(d=d.ownerDocument||d,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(e,x),(p=d.querySelector(wl(e)))&&!p._p&&(x.instance=p,x.state.loading=5),_n.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},_n.set(e,r),p||WC(d,e,r,x.state))),t&&a===null)throw Error(o(528,""));return x}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=aa(r),r=Ti(d).hoistableScripts,a=r.get(t),a||(a={type:"script",instance:null,count:0,state:null},r.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function ia(e){return'href="'+pn(e)+'"'}function wl(e){return'link[rel="stylesheet"]['+e+"]"}function ub(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function WC(e,t,r,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Bt(t,"link",r),zt(t),e.head.appendChild(t))}function aa(e){return'[src="'+pn(e)+'"]'}function Cl(e){return"script[async]"+e}function cb(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+pn(r.href)+'"]');if(a)return t.instance=a,zt(a),a;var d=y({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),zt(a),Bt(a,"style",d),ts(a,r.precedence,e),t.instance=a;case"stylesheet":d=ia(r.href);var p=e.querySelector(wl(d));if(p)return t.state.loading|=4,t.instance=p,zt(p),p;a=ub(r),(d=_n.get(d))&&If(a,d),p=(e.ownerDocument||e).createElement("link"),zt(p);var x=p;return x._p=new Promise(function(R,G){x.onload=R,x.onerror=G}),Bt(p,"link",a),t.state.loading|=4,ts(p,r.precedence,e),t.instance=p;case"script":return p=aa(r.src),(d=e.querySelector(Cl(p)))?(t.instance=d,zt(d),d):(a=r,(d=_n.get(p))&&(a=y({},r),Bf(a,d)),e=e.ownerDocument||e,d=e.createElement("script"),zt(d),Bt(d,"link",a),e.head.appendChild(d),t.instance=d);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,ts(a,r.precedence,e));return t.instance}function ts(e,t,r){for(var a=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=a.length?a[a.length-1]:null,p=d,x=0;x<a.length;x++){var R=a[x];if(R.dataset.precedence===t)p=R;else if(p!==d)break}p?p.parentNode.insertBefore(e,p.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function If(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Bf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ns=null;function fb(e,t,r){if(ns===null){var a=new Map,d=ns=new Map;d.set(r,a)}else d=ns,a=d.get(r),a||(a=new Map,d.set(r,a));if(a.has(e))return a;for(a.set(e,null),r=r.getElementsByTagName(e),d=0;d<r.length;d++){var p=r[d];if(!(p[qa]||p[Dt]||e==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var x=p.getAttribute(t)||"";x=e+x;var R=a.get(x);R?R.push(p):a.set(x,[p])}}return a}function db(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function $C(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function hb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function eT(e,t,r,a){if(r.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var d=ia(a.href),p=t.querySelector(wl(d));if(p){t=p._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=rs.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=p,zt(p);return}p=t.ownerDocument||t,a=ub(a),(d=_n.get(d))&&If(a,d),p=p.createElement("link"),zt(p);var x=p;x._p=new Promise(function(R,G){x.onload=R,x.onerror=G}),Bt(p,"link",a),r.instance=p}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=rs.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var Uf=0;function tT(e,t){return e.stylesheets&&e.count===0&&as(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var a=setTimeout(function(){if(e.stylesheets&&as(e,e.stylesheets),e.unsuspend){var p=e.unsuspend;e.unsuspend=null,p()}},6e4+t);0<e.imgBytes&&Uf===0&&(Uf=62500*jC());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&as(e,e.stylesheets),e.unsuspend)){var p=e.unsuspend;e.unsuspend=null,p()}},(e.imgBytes>Uf?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(d)}}:null}function rs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)as(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var is=null;function as(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,is=new Map,t.forEach(nT,e),is=null,rs.call(e))}function nT(e,t){if(!(t.state.loading&4)){var r=is.get(e);if(r)var a=r.get(null);else{r=new Map,is.set(e,r);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<d.length;p++){var x=d[p];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(r.set(x.dataset.precedence,x),a=x)}a&&r.set(null,a)}d=t.instance,x=d.getAttribute("data-precedence"),p=r.get(x)||a,p===a&&r.set(null,d),r.set(x,d),this.count++,a=rs.bind(this),d.addEventListener("load",a),d.addEventListener("error",a),p?p.parentNode.insertBefore(d,p.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),t.state.loading|=4}}var Tl={$$typeof:k,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function rT(e,t,r,a,d,p,x,R,G){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Mu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mu(0),this.hiddenUpdates=Mu(null),this.identifierPrefix=a,this.onUncaughtError=d,this.onCaughtError=p,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function mb(e,t,r,a,d,p,x,R,G,oe,me,ye){return e=new rT(e,t,r,x,G,oe,me,ye,R),t=1,p===!0&&(t|=24),p=an(3,null,null,t),e.current=p,p.stateNode=e,t=yc(),t.refCount++,e.pooledCache=t,t.refCount++,p.memoizedState={element:a,isDehydrated:r,cache:t},Ec(p),e}function pb(e){return e?(e=Li,e):Li}function gb(e,t,r,a,d,p){d=pb(d),a.context===null?a.context=d:a.pendingContext=d,a=xr(t),a.payload={element:r},p=p===void 0?null:p,p!==null&&(a.callback=p),r=_r(e,a,t),r!==null&&($t(r,e,t),il(r,e,t))}function yb(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Hf(e,t){yb(e,t),(e=e.alternate)&&yb(e,t)}function bb(e){if(e.tag===13||e.tag===31){var t=Wr(e,67108864);t!==null&&$t(t,e,67108864),Hf(e,67108864)}}function vb(e){if(e.tag===13||e.tag===31){var t=cn();t=Du(t);var r=Wr(e,t);r!==null&&$t(r,e,t),Hf(e,t)}}var ls=!0;function iT(e,t,r,a){var d=Z.T;Z.T=null;var p=Q.p;try{Q.p=2,qf(e,t,r,a)}finally{Q.p=p,Z.T=d}}function aT(e,t,r,a){var d=Z.T;Z.T=null;var p=Q.p;try{Q.p=8,qf(e,t,r,a)}finally{Q.p=p,Z.T=d}}function qf(e,t,r,a){if(ls){var d=Pf(a);if(d===null)Af(e,t,a,os,r),Eb(e,a);else if(oT(d,e,t,r,a))a.stopPropagation();else if(Eb(e,a),t&4&&-1<lT.indexOf(e)){for(;d!==null;){var p=Ci(d);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var x=hn(p.pendingLanes);if(x!==0){var R=p;for(R.pendingLanes|=2,R.entangledLanes|=2;x;){var G=1<<31-Ze(x);R.entanglements[1]|=G,x&=~G}Un(p),(it&6)===0&&(Fo=_e()+500,Sl(0))}}break;case 31:case 13:R=Wr(p,2),R!==null&&$t(R,p,2),Vo(),Hf(p,2)}if(p=Pf(a),p===null&&Af(e,t,a,os,r),p===d)break;d=p}d!==null&&a.stopPropagation()}else Af(e,t,a,null,r)}}function Pf(e){return e=Fu(e),Ff(e)}var os=null;function Ff(e){if(os=null,e=wi(e),e!==null){var t=s(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=c(t),e!==null)return e;e=null}else if(r===31){if(e=f(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return os=e,null}function Sb(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Se()){case te:return 2;case be:return 8;case Ce:case Ie:return 32;case Je:return 268435456;default:return 32}default:return 32}}var Yf=!1,Dr=null,jr=null,Lr=null,Al=new Map,kl=new Map,Ir=[],lT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Eb(e,t){switch(e){case"focusin":case"focusout":Dr=null;break;case"dragenter":case"dragleave":jr=null;break;case"mouseover":case"mouseout":Lr=null;break;case"pointerover":case"pointerout":Al.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(t.pointerId)}}function Nl(e,t,r,a,d,p){return e===null||e.nativeEvent!==p?(e={blockedOn:t,domEventName:r,eventSystemFlags:a,nativeEvent:p,targetContainers:[d]},t!==null&&(t=Ci(t),t!==null&&bb(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,d!==null&&t.indexOf(d)===-1&&t.push(d),e)}function oT(e,t,r,a,d){switch(t){case"focusin":return Dr=Nl(Dr,e,t,r,a,d),!0;case"dragenter":return jr=Nl(jr,e,t,r,a,d),!0;case"mouseover":return Lr=Nl(Lr,e,t,r,a,d),!0;case"pointerover":var p=d.pointerId;return Al.set(p,Nl(Al.get(p)||null,e,t,r,a,d)),!0;case"gotpointercapture":return p=d.pointerId,kl.set(p,Nl(kl.get(p)||null,e,t,r,a,d)),!0}return!1}function xb(e){var t=wi(e.target);if(t!==null){var r=s(t);if(r!==null){if(t=r.tag,t===13){if(t=c(r),t!==null){e.blockedOn=t,Lp(e.priority,function(){vb(r)});return}}else if(t===31){if(t=f(r),t!==null){e.blockedOn=t,Lp(e.priority,function(){vb(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ss(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Pf(e.nativeEvent);if(r===null){r=e.nativeEvent;var a=new r.constructor(r.type,r);Pu=a,r.target.dispatchEvent(a),Pu=null}else return t=Ci(r),t!==null&&bb(t),e.blockedOn=r,!1;t.shift()}return!0}function _b(e,t,r){ss(e)&&r.delete(t)}function sT(){Yf=!1,Dr!==null&&ss(Dr)&&(Dr=null),jr!==null&&ss(jr)&&(jr=null),Lr!==null&&ss(Lr)&&(Lr=null),Al.forEach(_b),kl.forEach(_b)}function us(e,t){e.blockedOn===t&&(e.blockedOn=null,Yf||(Yf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,sT)))}var cs=null;function wb(e){cs!==e&&(cs=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){cs===e&&(cs=null);for(var t=0;t<e.length;t+=3){var r=e[t],a=e[t+1],d=e[t+2];if(typeof a!="function"){if(Ff(a||r)===null)continue;break}var p=Ci(r);p!==null&&(e.splice(t,3),t-=3,qc(p,{pending:!0,data:d,method:r.method,action:a},a,d))}}))}function la(e){function t(G){return us(G,e)}Dr!==null&&us(Dr,e),jr!==null&&us(jr,e),Lr!==null&&us(Lr,e),Al.forEach(t),kl.forEach(t);for(var r=0;r<Ir.length;r++){var a=Ir[r];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ir.length&&(r=Ir[0],r.blockedOn===null);)xb(r),r.blockedOn===null&&Ir.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(a=0;a<r.length;a+=3){var d=r[a],p=r[a+1],x=d[Xt]||null;if(typeof p=="function")x||wb(r);else if(x){var R=null;if(p&&p.hasAttribute("formAction")){if(d=p,x=p[Xt]||null)R=x.formAction;else if(Ff(d)!==null)continue}else R=x.action;typeof R=="function"?r[a+1]=R:(r.splice(a,3),a-=3),wb(r)}}}function Cb(){function e(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(x){return d=x})},focusReset:"manual",scroll:"manual"})}function t(){d!==null&&(d(),d=null),a||setTimeout(r,20)}function r(){if(!a&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),d!==null&&(d(),d=null)}}}function Vf(e){this._internalRoot=e}fs.prototype.render=Vf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var r=t.current,a=cn();gb(r,a,e,t,null,null)},fs.prototype.unmount=Vf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gb(e.current,2,null,e,null,null),Vo(),t[_i]=null}};function fs(e){this._internalRoot=e}fs.prototype.unstable_scheduleHydration=function(e){if(e){var t=jp();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ir.length&&t!==0&&t<Ir[r].priority;r++);Ir.splice(r,0,e),r===0&&xb(e)}};var Tb=l.version;if(Tb!=="19.2.0")throw Error(o(527,Tb,"19.2.0"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=h(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var uT={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ds=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ds.isDisabled&&ds.supportsFiber)try{Xe=ds.inject(uT),gt=ds}catch{}}return ua.createRoot=function(e,t){if(!u(e))throw Error(o(299));var r=!1,a="",d=My,p=Dy,x=jy;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(d=t.onUncaughtError),t.onCaughtError!==void 0&&(p=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=mb(e,1,!1,null,null,r,a,null,d,p,x,Cb),e[_i]=t.current,Tf(e),new Vf(t)},ua.hydrateRoot=function(e,t,r){if(!u(e))throw Error(o(299));var a=!1,d="",p=My,x=Dy,R=jy,G=null;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(x=r.onCaughtError),r.onRecoverableError!==void 0&&(R=r.onRecoverableError),r.formState!==void 0&&(G=r.formState)),t=mb(e,1,!0,t,r??null,a,d,G,p,x,R,Cb),t.context=pb(null),r=t.current,a=cn(),a=Du(a),d=xr(a),d.callback=null,_r(r,d,a),r=a,t.current.lanes=r,Ha(t,r),Un(t),e[_i]=t.current,Tf(e),new fs(t)},ua.version="19.2.0",ua}var rd;function jb(){if(rd)return ys.exports;rd=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{}}return n(),ys.exports=Db(),ys.exports}var Lb=jb();td();function id(n,l){if(typeof n=="function")return n(l);n!=null&&(n.current=l)}function Es(...n){return l=>{let i=!1;const o=n.map(u=>{const s=id(u,l);return!i&&typeof s=="function"&&(i=!0),s});if(i)return()=>{for(let u=0;u<o.length;u++){const s=o[u];typeof s=="function"?s():id(n[u],null)}}}}function Hn(...n){return P.useCallback(Es(...n),n)}function Ib(n){const l=Bb(n),i=P.forwardRef((o,u)=>{const{children:s,...c}=o,f=P.Children.toArray(s),m=f.find(Hb);if(m){const h=m.props.children,g=f.map(y=>y===m?P.Children.count(h)>1?P.Children.only(null):P.isValidElement(h)?h.props.children:null:y);return O.jsx(l,{...c,ref:u,children:P.isValidElement(h)?P.cloneElement(h,void 0,g):null})}return O.jsx(l,{...c,ref:u,children:s})});return i.displayName=`${n}.Slot`,i}function Bb(n){const l=P.forwardRef((i,o)=>{const{children:u,...s}=i;if(P.isValidElement(u)){const c=Pb(u),f=qb(s,u.props);return u.type!==P.Fragment&&(f.ref=o?Es(o,c):c),P.cloneElement(u,f)}return P.Children.count(u)>1?P.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var Ub=Symbol("radix.slottable");function Hb(n){return P.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Ub}function qb(n,l){const i={...l};for(const o in l){const u=n[o],s=l[o];/^on[A-Z]/.test(o)?u&&s?i[o]=(...f)=>{const m=s(...f);return u(...f),m}:u&&(i[o]=u):o==="style"?i[o]={...u,...s}:o==="className"&&(i[o]=[u,s].filter(Boolean).join(" "))}return{...n,...i}}function Pb(n){let l=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?n.ref:(l=Object.getOwnPropertyDescriptor(n,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}var Fb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sr=Fb.reduce((n,l)=>{const i=Ib(`Primitive.${l}`),o=P.forwardRef((u,s)=>{const{asChild:c,...f}=u,m=c?i:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(m,{...f,ref:s})});return o.displayName=`Primitive.${l}`,{...n,[l]:o}},{}),ur=globalThis?.document?P.useLayoutEffect:()=>{};function Yb(n,l){return P.useReducer((i,o)=>l[i][o]??i,n)}var fi=n=>{const{present:l,children:i}=n,o=Vb(l),u=typeof i=="function"?i({present:o.isPresent}):P.Children.only(i),s=Hn(o.ref,Gb(u));return typeof i=="function"||o.isPresent?P.cloneElement(u,{ref:s}):null};fi.displayName="Presence";function Vb(n){const[l,i]=P.useState(),o=P.useRef(null),u=P.useRef(n),s=P.useRef("none"),c=n?"mounted":"unmounted",[f,m]=Yb(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const h=zl(o.current);s.current=f==="mounted"?h:"none"},[f]),ur(()=>{const h=o.current,g=u.current;if(g!==n){const v=s.current,b=zl(h);n?m("MOUNT"):b==="none"||h?.display==="none"?m("UNMOUNT"):m(g&&v!==b?"ANIMATION_OUT":"UNMOUNT"),u.current=n}},[n,m]),ur(()=>{if(l){let h;const g=l.ownerDocument.defaultView??window,y=b=>{const E=zl(o.current).includes(CSS.escape(b.animationName));if(b.target===l&&E&&(m("ANIMATION_END"),!u.current)){const T=l.style.animationFillMode;l.style.animationFillMode="forwards",h=g.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=T)})}},v=b=>{b.target===l&&(s.current=zl(o.current))};return l.addEventListener("animationstart",v),l.addEventListener("animationcancel",y),l.addEventListener("animationend",y),()=>{g.clearTimeout(h),l.removeEventListener("animationstart",v),l.removeEventListener("animationcancel",y),l.removeEventListener("animationend",y)}}else m("ANIMATION_END")},[l,m]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:P.useCallback(h=>{o.current=h?getComputedStyle(h):null,i(h)},[])}}function zl(n){return n?.animationName||"none"}function Gb(n){let l=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?n.ref:(l=Object.getOwnPropertyDescriptor(n,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}function ad(n,l=[]){let i=[];function o(s,c){const f=P.createContext(c),m=i.length;i=[...i,c];const h=y=>{const{scope:v,children:b,...w}=y,E=v?.[n]?.[m]||f,T=P.useMemo(()=>w,Object.values(w));return O.jsx(E.Provider,{value:T,children:b})};h.displayName=s+"Provider";function g(y,v){const b=v?.[n]?.[m]||f,w=P.useContext(b);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${s}\``)}return[h,g]}const u=()=>{const s=i.map(c=>P.createContext(c));return function(f){const m=f?.[n]||s;return P.useMemo(()=>({[`__scope${n}`]:{...f,[n]:m}}),[f,m])}};return u.scopeName=n,[o,Xb(u,...l)]}function Xb(...n){const l=n[0];if(n.length===1)return l;const i=()=>{const o=n.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(s){const c=o.reduce((f,{useScope:m,scopeName:h})=>{const y=m(s)[`__scope${h}`];return{...f,...y}},{});return P.useMemo(()=>({[`__scope${l.scopeName}`]:c}),[c])}};return i.scopeName=l.scopeName,i}function cr(n){const l=P.useRef(n);return P.useEffect(()=>{l.current=n}),P.useMemo(()=>(...i)=>l.current?.(...i),[])}var Zb=P.createContext(void 0);function Kb(n){const l=P.useContext(Zb);return n||l||"ltr"}function Qb(n,[l,i]){return Math.min(i,Math.max(l,n))}function qn(n,l,{checkForDefaultPrevented:i=!0}={}){return function(u){if(n?.(u),i===!1||!u.defaultPrevented)return l?.(u)}}function Jb(n,l){return P.useReducer((i,o)=>l[i][o]??i,n)}var xs="ScrollArea",[ld]=ad(xs),[Wb,fn]=ld(xs),od=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,type:o="hover",dir:u,scrollHideDelay:s=600,...c}=n,[f,m]=P.useState(null),[h,g]=P.useState(null),[y,v]=P.useState(null),[b,w]=P.useState(null),[E,T]=P.useState(null),[_,A]=P.useState(0),[k,q]=P.useState(0),[H,M]=P.useState(!1),[I,Y]=P.useState(!1),F=Hn(l,ie=>m(ie)),$=Kb(u);return O.jsx(Wb,{scope:i,type:o,dir:$,scrollHideDelay:s,scrollArea:f,viewport:h,onViewportChange:g,content:y,onContentChange:v,scrollbarX:b,onScrollbarXChange:w,scrollbarXEnabled:H,onScrollbarXEnabledChange:M,scrollbarY:E,onScrollbarYChange:T,scrollbarYEnabled:I,onScrollbarYEnabledChange:Y,onCornerWidthChange:A,onCornerHeightChange:q,children:O.jsx(sr.div,{dir:$,...c,ref:F,style:{position:"relative","--radix-scroll-area-corner-width":_+"px","--radix-scroll-area-corner-height":k+"px",...n.style}})})});od.displayName=xs;var sd="ScrollAreaViewport",ud=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,children:o,nonce:u,...s}=n,c=fn(sd,i),f=P.useRef(null),m=Hn(l,f,c.onViewportChange);return O.jsxs(O.Fragment,{children:[O.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:u}),O.jsx(sr.div,{"data-radix-scroll-area-viewport":"",...s,ref:m,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...n.style},children:O.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});ud.displayName=sd;var Nn="ScrollAreaScrollbar",_s=P.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=fn(Nn,n.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:c}=u,f=n.orientation==="horizontal";return P.useEffect(()=>(f?s(!0):c(!0),()=>{f?s(!1):c(!1)}),[f,s,c]),u.type==="hover"?O.jsx($b,{...o,ref:l,forceMount:i}):u.type==="scroll"?O.jsx(ev,{...o,ref:l,forceMount:i}):u.type==="auto"?O.jsx(cd,{...o,ref:l,forceMount:i}):u.type==="always"?O.jsx(ws,{...o,ref:l}):null});_s.displayName=Nn;var $b=P.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=fn(Nn,n.__scopeScrollArea),[s,c]=P.useState(!1);return P.useEffect(()=>{const f=u.scrollArea;let m=0;if(f){const h=()=>{window.clearTimeout(m),c(!0)},g=()=>{m=window.setTimeout(()=>c(!1),u.scrollHideDelay)};return f.addEventListener("pointerenter",h),f.addEventListener("pointerleave",g),()=>{window.clearTimeout(m),f.removeEventListener("pointerenter",h),f.removeEventListener("pointerleave",g)}}},[u.scrollArea,u.scrollHideDelay]),O.jsx(fi,{present:i||s,children:O.jsx(cd,{"data-state":s?"visible":"hidden",...o,ref:l})})}),ev=P.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=fn(Nn,n.__scopeScrollArea),s=n.orientation==="horizontal",c=Ll(()=>m("SCROLL_END"),100),[f,m]=Jb("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return P.useEffect(()=>{if(f==="idle"){const h=window.setTimeout(()=>m("HIDE"),u.scrollHideDelay);return()=>window.clearTimeout(h)}},[f,u.scrollHideDelay,m]),P.useEffect(()=>{const h=u.viewport,g=s?"scrollLeft":"scrollTop";if(h){let y=h[g];const v=()=>{const b=h[g];y!==b&&(m("SCROLL"),c()),y=b};return h.addEventListener("scroll",v),()=>h.removeEventListener("scroll",v)}},[u.viewport,s,m,c]),O.jsx(fi,{present:i||f!=="hidden",children:O.jsx(ws,{"data-state":f==="hidden"?"hidden":"visible",...o,ref:l,onPointerEnter:qn(n.onPointerEnter,()=>m("POINTER_ENTER")),onPointerLeave:qn(n.onPointerLeave,()=>m("POINTER_LEAVE"))})})}),cd=P.forwardRef((n,l)=>{const i=fn(Nn,n.__scopeScrollArea),{forceMount:o,...u}=n,[s,c]=P.useState(!1),f=n.orientation==="horizontal",m=Ll(()=>{if(i.viewport){const h=i.viewport.offsetWidth<i.viewport.scrollWidth,g=i.viewport.offsetHeight<i.viewport.scrollHeight;c(f?h:g)}},10);return di(i.viewport,m),di(i.content,m),O.jsx(fi,{present:o||s,children:O.jsx(ws,{"data-state":s?"visible":"hidden",...u,ref:l})})}),ws=P.forwardRef((n,l)=>{const{orientation:i="vertical",...o}=n,u=fn(Nn,n.__scopeScrollArea),s=P.useRef(null),c=P.useRef(0),[f,m]=P.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=pd(f.viewport,f.content),g={...o,sizes:f,onSizesChange:m,hasThumb:h>0&&h<1,onThumbChange:v=>s.current=v,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:v=>c.current=v};function y(v,b){return lv(v,c.current,f,b)}return i==="horizontal"?O.jsx(tv,{...g,ref:l,onThumbPositionChange:()=>{if(u.viewport&&s.current){const v=u.viewport.scrollLeft,b=gd(v,f,u.dir);s.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:v=>{u.viewport&&(u.viewport.scrollLeft=v)},onDragScroll:v=>{u.viewport&&(u.viewport.scrollLeft=y(v,u.dir))}}):i==="vertical"?O.jsx(nv,{...g,ref:l,onThumbPositionChange:()=>{if(u.viewport&&s.current){const v=u.viewport.scrollTop,b=gd(v,f);s.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:v=>{u.viewport&&(u.viewport.scrollTop=v)},onDragScroll:v=>{u.viewport&&(u.viewport.scrollTop=y(v))}}):null}),tv=P.forwardRef((n,l)=>{const{sizes:i,onSizesChange:o,...u}=n,s=fn(Nn,n.__scopeScrollArea),[c,f]=P.useState(),m=P.useRef(null),h=Hn(l,m,s.onScrollbarXChange);return P.useEffect(()=>{m.current&&f(getComputedStyle(m.current))},[m]),O.jsx(dd,{"data-orientation":"horizontal",...u,ref:h,sizes:i,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":jl(i)+"px",...n.style},onThumbPointerDown:g=>n.onThumbPointerDown(g.x),onDragScroll:g=>n.onDragScroll(g.x),onWheelScroll:(g,y)=>{if(s.viewport){const v=s.viewport.scrollLeft+g.deltaX;n.onWheelScroll(v),bd(v,y)&&g.preventDefault()}},onResize:()=>{m.current&&s.viewport&&c&&o({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:m.current.clientWidth,paddingStart:Dl(c.paddingLeft),paddingEnd:Dl(c.paddingRight)}})}})}),nv=P.forwardRef((n,l)=>{const{sizes:i,onSizesChange:o,...u}=n,s=fn(Nn,n.__scopeScrollArea),[c,f]=P.useState(),m=P.useRef(null),h=Hn(l,m,s.onScrollbarYChange);return P.useEffect(()=>{m.current&&f(getComputedStyle(m.current))},[m]),O.jsx(dd,{"data-orientation":"vertical",...u,ref:h,sizes:i,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":jl(i)+"px",...n.style},onThumbPointerDown:g=>n.onThumbPointerDown(g.y),onDragScroll:g=>n.onDragScroll(g.y),onWheelScroll:(g,y)=>{if(s.viewport){const v=s.viewport.scrollTop+g.deltaY;n.onWheelScroll(v),bd(v,y)&&g.preventDefault()}},onResize:()=>{m.current&&s.viewport&&c&&o({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:m.current.clientHeight,paddingStart:Dl(c.paddingTop),paddingEnd:Dl(c.paddingBottom)}})}})}),[rv,fd]=ld(Nn),dd=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,sizes:o,hasThumb:u,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:f,onThumbPositionChange:m,onDragScroll:h,onWheelScroll:g,onResize:y,...v}=n,b=fn(Nn,i),[w,E]=P.useState(null),T=Hn(l,F=>E(F)),_=P.useRef(null),A=P.useRef(""),k=b.viewport,q=o.content-o.viewport,H=cr(g),M=cr(m),I=Ll(y,10);function Y(F){if(_.current){const $=F.clientX-_.current.left,ie=F.clientY-_.current.top;h({x:$,y:ie})}}return P.useEffect(()=>{const F=$=>{const ie=$.target;w?.contains(ie)&&H($,q)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[k,w,q,H]),P.useEffect(M,[o,M]),di(w,I),di(b.content,I),O.jsx(rv,{scope:i,scrollbar:w,hasThumb:u,onThumbChange:cr(s),onThumbPointerUp:cr(c),onThumbPositionChange:M,onThumbPointerDown:cr(f),children:O.jsx(sr.div,{...v,ref:T,style:{position:"absolute",...v.style},onPointerDown:qn(n.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),_.current=w.getBoundingClientRect(),A.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),Y(F))}),onPointerMove:qn(n.onPointerMove,Y),onPointerUp:qn(n.onPointerUp,F=>{const $=F.target;$.hasPointerCapture(F.pointerId)&&$.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=A.current,b.viewport&&(b.viewport.style.scrollBehavior=""),_.current=null})})})}),Ml="ScrollAreaThumb",hd=P.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=fd(Ml,n.__scopeScrollArea);return O.jsx(fi,{present:i||u.hasThumb,children:O.jsx(iv,{ref:l,...o})})}),iv=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,style:o,...u}=n,s=fn(Ml,i),c=fd(Ml,i),{onThumbPositionChange:f}=c,m=Hn(l,y=>c.onThumbChange(y)),h=P.useRef(void 0),g=Ll(()=>{h.current&&(h.current(),h.current=void 0)},100);return P.useEffect(()=>{const y=s.viewport;if(y){const v=()=>{if(g(),!h.current){const b=ov(y,f);h.current=b,f()}};return f(),y.addEventListener("scroll",v),()=>y.removeEventListener("scroll",v)}},[s.viewport,g,f]),O.jsx(sr.div,{"data-state":c.hasThumb?"visible":"hidden",...u,ref:m,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:qn(n.onPointerDownCapture,y=>{const b=y.target.getBoundingClientRect(),w=y.clientX-b.left,E=y.clientY-b.top;c.onThumbPointerDown({x:w,y:E})}),onPointerUp:qn(n.onPointerUp,c.onThumbPointerUp)})});hd.displayName=Ml;var Cs="ScrollAreaCorner",md=P.forwardRef((n,l)=>{const i=fn(Cs,n.__scopeScrollArea),o=!!(i.scrollbarX&&i.scrollbarY);return i.type!=="scroll"&&o?O.jsx(av,{...n,ref:l}):null});md.displayName=Cs;var av=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,...o}=n,u=fn(Cs,i),[s,c]=P.useState(0),[f,m]=P.useState(0),h=!!(s&&f);return di(u.scrollbarX,()=>{const g=u.scrollbarX?.offsetHeight||0;u.onCornerHeightChange(g),m(g)}),di(u.scrollbarY,()=>{const g=u.scrollbarY?.offsetWidth||0;u.onCornerWidthChange(g),c(g)}),h?O.jsx(sr.div,{...o,ref:l,style:{width:s,height:f,position:"absolute",right:u.dir==="ltr"?0:void 0,left:u.dir==="rtl"?0:void 0,bottom:0,...n.style}}):null});function Dl(n){return n?parseInt(n,10):0}function pd(n,l){const i=n/l;return isNaN(i)?0:i}function jl(n){const l=pd(n.viewport,n.content),i=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,o=(n.scrollbar.size-i)*l;return Math.max(o,18)}function lv(n,l,i,o="ltr"){const u=jl(i),s=u/2,c=l||s,f=u-c,m=i.scrollbar.paddingStart+c,h=i.scrollbar.size-i.scrollbar.paddingEnd-f,g=i.content-i.viewport,y=o==="ltr"?[0,g]:[g*-1,0];return yd([m,h],y)(n)}function gd(n,l,i="ltr"){const o=jl(l),u=l.scrollbar.paddingStart+l.scrollbar.paddingEnd,s=l.scrollbar.size-u,c=l.content-l.viewport,f=s-o,m=i==="ltr"?[0,c]:[c*-1,0],h=Qb(n,m);return yd([0,c],[0,f])(h)}function yd(n,l){return i=>{if(n[0]===n[1]||l[0]===l[1])return l[0];const o=(l[1]-l[0])/(n[1]-n[0]);return l[0]+o*(i-n[0])}}function bd(n,l){return n>0&&n<l}var ov=(n,l=()=>{})=>{let i={left:n.scrollLeft,top:n.scrollTop},o=0;return(function u(){const s={left:n.scrollLeft,top:n.scrollTop},c=i.left!==s.left,f=i.top!==s.top;(c||f)&&l(),i=s,o=window.requestAnimationFrame(u)})(),()=>window.cancelAnimationFrame(o)};function Ll(n,l){const i=cr(n),o=P.useRef(0);return P.useEffect(()=>()=>window.clearTimeout(o.current),[]),P.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(i,l)},[i,l])}function di(n,l){const i=cr(l);ur(()=>{let o=0;if(n){const u=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(i)});return u.observe(n),()=>{window.cancelAnimationFrame(o),u.unobserve(n)}}},[n,i])}var vd=od,sv=ud,uv=md;function Sd(n){var l,i,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(l=0;l<u;l++)n[l]&&(i=Sd(n[l]))&&(o&&(o+=" "),o+=i)}else for(i in n)n[i]&&(o&&(o+=" "),o+=i);return o}function Ed(){for(var n,l,i=0,o="",u=arguments.length;i<u;i++)(n=arguments[i])&&(l=Sd(n))&&(o&&(o+=" "),o+=l);return o}const cv=(n,l)=>{const i=new Array(n.length+l.length);for(let o=0;o<n.length;o++)i[o]=n[o];for(let o=0;o<l.length;o++)i[n.length+o]=l[o];return i},fv=(n,l)=>({classGroupId:n,validator:l}),xd=(n=new Map,l=null,i)=>({nextPart:n,validators:l,classGroupId:i}),Il="-",_d=[],dv="arbitrary..",hv=n=>{const l=pv(n),{conflictingClassGroups:i,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return mv(c);const f=c.split(Il),m=f[0]===""&&f.length>1?1:0;return wd(f,m,l)},getConflictingClassGroupIds:(c,f)=>{if(f){const m=o[c],h=i[c];return m?h?cv(h,m):m:h||_d}return i[c]||_d}}},wd=(n,l,i)=>{if(n.length-l===0)return i.classGroupId;const u=n[l],s=i.nextPart.get(u);if(s){const h=wd(n,l+1,s);if(h)return h}const c=i.validators;if(c===null)return;const f=l===0?n.join(Il):n.slice(l).join(Il),m=c.length;for(let h=0;h<m;h++){const g=c[h];if(g.validator(f))return g.classGroupId}},mv=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const l=n.slice(1,-1),i=l.indexOf(":"),o=l.slice(0,i);return o?dv+o:void 0})(),pv=n=>{const{theme:l,classGroups:i}=n;return gv(i,l)},gv=(n,l)=>{const i=xd();for(const o in n){const u=n[o];Ts(u,i,o,l)}return i},Ts=(n,l,i,o)=>{const u=n.length;for(let s=0;s<u;s++){const c=n[s];yv(c,l,i,o)}},yv=(n,l,i,o)=>{if(typeof n=="string"){bv(n,l,i);return}if(typeof n=="function"){vv(n,l,i,o);return}Sv(n,l,i,o)},bv=(n,l,i)=>{const o=n===""?l:Cd(l,n);o.classGroupId=i},vv=(n,l,i,o)=>{if(Ev(n)){Ts(n(o),l,i,o);return}l.validators===null&&(l.validators=[]),l.validators.push(fv(i,n))},Sv=(n,l,i,o)=>{const u=Object.entries(n),s=u.length;for(let c=0;c<s;c++){const[f,m]=u[c];Ts(m,Cd(l,f),i,o)}},Cd=(n,l)=>{let i=n;const o=l.split(Il),u=o.length;for(let s=0;s<u;s++){const c=o[s];let f=i.nextPart.get(c);f||(f=xd(),i.nextPart.set(c,f)),i=f}return i},Ev=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,xv=n=>{if(n<1)return{get:()=>{},set:()=>{}};let l=0,i=Object.create(null),o=Object.create(null);const u=(s,c)=>{i[s]=c,l++,l>n&&(l=0,o=i,i=Object.create(null))};return{get(s){let c=i[s];if(c!==void 0)return c;if((c=o[s])!==void 0)return u(s,c),c},set(s,c){s in i?i[s]=c:u(s,c)}}},As="!",Td=":",_v=[],Ad=(n,l,i,o,u)=>({modifiers:n,hasImportantModifier:l,baseClassName:i,maybePostfixModifierPosition:o,isExternal:u}),wv=n=>{const{prefix:l,experimentalParseClassName:i}=n;let o=u=>{const s=[];let c=0,f=0,m=0,h;const g=u.length;for(let E=0;E<g;E++){const T=u[E];if(c===0&&f===0){if(T===Td){s.push(u.slice(m,E)),m=E+1;continue}if(T==="/"){h=E;continue}}T==="["?c++:T==="]"?c--:T==="("?f++:T===")"&&f--}const y=s.length===0?u:u.slice(m);let v=y,b=!1;y.endsWith(As)?(v=y.slice(0,-1),b=!0):y.startsWith(As)&&(v=y.slice(1),b=!0);const w=h&&h>m?h-m:void 0;return Ad(s,b,v,w)};if(l){const u=l+Td,s=o;o=c=>c.startsWith(u)?s(c.slice(u.length)):Ad(_v,!1,c,void 0,!0)}if(i){const u=o;o=s=>i({className:s,parseClassName:u})}return o},Cv=n=>{const l=new Map;return n.orderSensitiveModifiers.forEach((i,o)=>{l.set(i,1e6+o)}),i=>{const o=[];let u=[];for(let s=0;s<i.length;s++){const c=i[s],f=c[0]==="[",m=l.has(c);f||m?(u.length>0&&(u.sort(),o.push(...u),u=[]),o.push(c)):u.push(c)}return u.length>0&&(u.sort(),o.push(...u)),o}},Tv=n=>({cache:xv(n.cacheSize),parseClassName:wv(n),sortModifiers:Cv(n),...hv(n)}),Av=/\s+/,kv=(n,l)=>{const{parseClassName:i,getClassGroupId:o,getConflictingClassGroupIds:u,sortModifiers:s}=l,c=[],f=n.trim().split(Av);let m="";for(let h=f.length-1;h>=0;h-=1){const g=f[h],{isExternal:y,modifiers:v,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:E}=i(g);if(y){m=g+(m.length>0?" "+m:m);continue}let T=!!E,_=o(T?w.substring(0,E):w);if(!_){if(!T){m=g+(m.length>0?" "+m:m);continue}if(_=o(w),!_){m=g+(m.length>0?" "+m:m);continue}T=!1}const A=v.length===0?"":v.length===1?v[0]:s(v).join(":"),k=b?A+As:A,q=k+_;if(c.indexOf(q)>-1)continue;c.push(q);const H=u(_,T);for(let M=0;M<H.length;++M){const I=H[M];c.push(k+I)}m=g+(m.length>0?" "+m:m)}return m},Nv=(...n)=>{let l=0,i,o,u="";for(;l<n.length;)(i=n[l++])&&(o=kd(i))&&(u&&(u+=" "),u+=o);return u},kd=n=>{if(typeof n=="string")return n;let l,i="";for(let o=0;o<n.length;o++)n[o]&&(l=kd(n[o]))&&(i&&(i+=" "),i+=l);return i},Rv=(n,...l)=>{let i,o,u,s;const c=m=>{const h=l.reduce((g,y)=>y(g),n());return i=Tv(h),o=i.cache.get,u=i.cache.set,s=f,f(m)},f=m=>{const h=o(m);if(h)return h;const g=kv(m,i);return u(m,g),g};return s=c,(...m)=>s(Nv(...m))},Ov=[],At=n=>{const l=i=>i[n]||Ov;return l.isThemeGetter=!0,l},Nd=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Rd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zv=/^\d+\/\d+$/,Mv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Dv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Lv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Iv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hi=n=>zv.test(n),Ve=n=>!!n&&!Number.isNaN(Number(n)),fr=n=>!!n&&Number.isInteger(Number(n)),ks=n=>n.endsWith("%")&&Ve(n.slice(0,-1)),Pn=n=>Mv.test(n),Bv=()=>!0,Uv=n=>Dv.test(n)&&!jv.test(n),Od=()=>!1,Hv=n=>Lv.test(n),qv=n=>Iv.test(n),Pv=n=>!Re(n)&&!Oe(n),Fv=n=>mi(n,Ld,Od),Re=n=>Nd.test(n),Ur=n=>mi(n,Id,Uv),Ns=n=>mi(n,Zv,Ve),zd=n=>mi(n,Dd,Od),Yv=n=>mi(n,jd,qv),Bl=n=>mi(n,Bd,Hv),Oe=n=>Rd.test(n),ca=n=>pi(n,Id),Vv=n=>pi(n,Kv),Md=n=>pi(n,Dd),Gv=n=>pi(n,Ld),Xv=n=>pi(n,jd),Ul=n=>pi(n,Bd,!0),mi=(n,l,i)=>{const o=Nd.exec(n);return o?o[1]?l(o[1]):i(o[2]):!1},pi=(n,l,i=!1)=>{const o=Rd.exec(n);return o?o[1]?l(o[1]):i:!1},Dd=n=>n==="position"||n==="percentage",jd=n=>n==="image"||n==="url",Ld=n=>n==="length"||n==="size"||n==="bg-size",Id=n=>n==="length",Zv=n=>n==="number",Kv=n=>n==="family-name",Bd=n=>n==="shadow",Qv=Rv(()=>{const n=At("color"),l=At("font"),i=At("text"),o=At("font-weight"),u=At("tracking"),s=At("leading"),c=At("breakpoint"),f=At("container"),m=At("spacing"),h=At("radius"),g=At("shadow"),y=At("inset-shadow"),v=At("text-shadow"),b=At("drop-shadow"),w=At("blur"),E=At("perspective"),T=At("aspect"),_=At("ease"),A=At("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],H=()=>[...q(),Oe,Re],M=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],Y=()=>[Oe,Re,m],F=()=>[hi,"full","auto",...Y()],$=()=>[fr,"none","subgrid",Oe,Re],ie=()=>["auto",{span:["full",fr,Oe,Re]},fr,Oe,Re],D=()=>[fr,"auto",Oe,Re],ne=()=>["auto","min","max","fr",Oe,Re],C=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],Z=()=>["auto",...Y()],Q=()=>[hi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Y()],se=()=>[n,Oe,Re],de=()=>[...q(),Md,zd,{position:[Oe,Re]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",Gv,Fv,{size:[Oe,Re]}],B=()=>[ks,ca,Ur],z=()=>["","none","full",h,Oe,Re],re=()=>["",Ve,ca,Ur],ce=()=>["solid","dashed","dotted","double"],we=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Te=()=>[Ve,ks,Md,zd],ke=()=>["","none",w,Oe,Re],Ae=()=>["none",Ve,Oe,Re],He=()=>["none",Ve,Oe,Re],ve=()=>[Ve,Oe,Re],ze=()=>[hi,"full",...Y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pn],breakpoint:[Pn],color:[Bv],container:[Pn],"drop-shadow":[Pn],ease:["in","out","in-out"],font:[Pv],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Pn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Pn],shadow:[Pn],spacing:["px",Ve],text:[Pn],"text-shadow":[Pn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",hi,Re,Oe,T]}],container:["container"],columns:[{columns:[Ve,Re,Oe,f]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:H()}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{start:F()}],end:[{end:F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[fr,"auto",Oe,Re]}],basis:[{basis:[hi,"full","auto",f,...Y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ve,hi,"auto","initial","none",Re]}],grow:[{grow:["",Ve,Oe,Re]}],shrink:[{shrink:["",Ve,Oe,Re]}],order:[{order:[fr,"first","last","none",Oe,Re]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:Y()}],"gap-x":[{"gap-x":Y()}],"gap-y":[{"gap-y":Y()}],"justify-content":[{justify:[...C(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...C()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":C()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:Y()}],px:[{px:Y()}],py:[{py:Y()}],ps:[{ps:Y()}],pe:[{pe:Y()}],pt:[{pt:Y()}],pr:[{pr:Y()}],pb:[{pb:Y()}],pl:[{pl:Y()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":Y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Y()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],w:[{w:[f,"screen",...Q()]}],"min-w":[{"min-w":[f,"screen","none",...Q()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",i,ca,Ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Oe,Ns]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ks,Re]}],"font-family":[{font:[Vv,Re,l]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,Oe,Re]}],"line-clamp":[{"line-clamp":[Ve,"none",Oe,Ns]}],leading:[{leading:[s,...Y()]}],"list-image":[{"list-image":["none",Oe,Re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Oe,Re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:se()}],"text-color":[{text:se()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ve,"from-font","auto",Oe,Ur]}],"text-decoration-color":[{decoration:se()}],"underline-offset":[{"underline-offset":[Ve,"auto",Oe,Re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Oe,Re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Oe,Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:de()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},fr,Oe,Re],radial:["",Oe,Re],conic:[fr,Oe,Re]},Xv,Yv]}],"bg-color":[{bg:se()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:se()}],"gradient-via":[{via:se()}],"gradient-to":[{to:se()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:se()}],"border-color-x":[{"border-x":se()}],"border-color-y":[{"border-y":se()}],"border-color-s":[{"border-s":se()}],"border-color-e":[{"border-e":se()}],"border-color-t":[{"border-t":se()}],"border-color-r":[{"border-r":se()}],"border-color-b":[{"border-b":se()}],"border-color-l":[{"border-l":se()}],"divide-color":[{divide:se()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ve,Oe,Re]}],"outline-w":[{outline:["",Ve,ca,Ur]}],"outline-color":[{outline:se()}],shadow:[{shadow:["","none",g,Ul,Bl]}],"shadow-color":[{shadow:se()}],"inset-shadow":[{"inset-shadow":["none",y,Ul,Bl]}],"inset-shadow-color":[{"inset-shadow":se()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:se()}],"ring-offset-w":[{"ring-offset":[Ve,Ur]}],"ring-offset-color":[{"ring-offset":se()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":se()}],"text-shadow":[{"text-shadow":["none",v,Ul,Bl]}],"text-shadow-color":[{"text-shadow":se()}],opacity:[{opacity:[Ve,Oe,Re]}],"mix-blend":[{"mix-blend":[...we(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":we()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ve]}],"mask-image-linear-from-pos":[{"mask-linear-from":Te()}],"mask-image-linear-to-pos":[{"mask-linear-to":Te()}],"mask-image-linear-from-color":[{"mask-linear-from":se()}],"mask-image-linear-to-color":[{"mask-linear-to":se()}],"mask-image-t-from-pos":[{"mask-t-from":Te()}],"mask-image-t-to-pos":[{"mask-t-to":Te()}],"mask-image-t-from-color":[{"mask-t-from":se()}],"mask-image-t-to-color":[{"mask-t-to":se()}],"mask-image-r-from-pos":[{"mask-r-from":Te()}],"mask-image-r-to-pos":[{"mask-r-to":Te()}],"mask-image-r-from-color":[{"mask-r-from":se()}],"mask-image-r-to-color":[{"mask-r-to":se()}],"mask-image-b-from-pos":[{"mask-b-from":Te()}],"mask-image-b-to-pos":[{"mask-b-to":Te()}],"mask-image-b-from-color":[{"mask-b-from":se()}],"mask-image-b-to-color":[{"mask-b-to":se()}],"mask-image-l-from-pos":[{"mask-l-from":Te()}],"mask-image-l-to-pos":[{"mask-l-to":Te()}],"mask-image-l-from-color":[{"mask-l-from":se()}],"mask-image-l-to-color":[{"mask-l-to":se()}],"mask-image-x-from-pos":[{"mask-x-from":Te()}],"mask-image-x-to-pos":[{"mask-x-to":Te()}],"mask-image-x-from-color":[{"mask-x-from":se()}],"mask-image-x-to-color":[{"mask-x-to":se()}],"mask-image-y-from-pos":[{"mask-y-from":Te()}],"mask-image-y-to-pos":[{"mask-y-to":Te()}],"mask-image-y-from-color":[{"mask-y-from":se()}],"mask-image-y-to-color":[{"mask-y-to":se()}],"mask-image-radial":[{"mask-radial":[Oe,Re]}],"mask-image-radial-from-pos":[{"mask-radial-from":Te()}],"mask-image-radial-to-pos":[{"mask-radial-to":Te()}],"mask-image-radial-from-color":[{"mask-radial-from":se()}],"mask-image-radial-to-color":[{"mask-radial-to":se()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":q()}],"mask-image-conic-pos":[{"mask-conic":[Ve]}],"mask-image-conic-from-pos":[{"mask-conic-from":Te()}],"mask-image-conic-to-pos":[{"mask-conic-to":Te()}],"mask-image-conic-from-color":[{"mask-conic-from":se()}],"mask-image-conic-to-color":[{"mask-conic-to":se()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:de()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Oe,Re]}],filter:[{filter:["","none",Oe,Re]}],blur:[{blur:ke()}],brightness:[{brightness:[Ve,Oe,Re]}],contrast:[{contrast:[Ve,Oe,Re]}],"drop-shadow":[{"drop-shadow":["","none",b,Ul,Bl]}],"drop-shadow-color":[{"drop-shadow":se()}],grayscale:[{grayscale:["",Ve,Oe,Re]}],"hue-rotate":[{"hue-rotate":[Ve,Oe,Re]}],invert:[{invert:["",Ve,Oe,Re]}],saturate:[{saturate:[Ve,Oe,Re]}],sepia:[{sepia:["",Ve,Oe,Re]}],"backdrop-filter":[{"backdrop-filter":["","none",Oe,Re]}],"backdrop-blur":[{"backdrop-blur":ke()}],"backdrop-brightness":[{"backdrop-brightness":[Ve,Oe,Re]}],"backdrop-contrast":[{"backdrop-contrast":[Ve,Oe,Re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ve,Oe,Re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ve,Oe,Re]}],"backdrop-invert":[{"backdrop-invert":["",Ve,Oe,Re]}],"backdrop-opacity":[{"backdrop-opacity":[Ve,Oe,Re]}],"backdrop-saturate":[{"backdrop-saturate":[Ve,Oe,Re]}],"backdrop-sepia":[{"backdrop-sepia":["",Ve,Oe,Re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Y()}],"border-spacing-x":[{"border-spacing-x":Y()}],"border-spacing-y":[{"border-spacing-y":Y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Oe,Re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ve,"initial",Oe,Re]}],ease:[{ease:["linear","initial",_,Oe,Re]}],delay:[{delay:[Ve,Oe,Re]}],animate:[{animate:["none",A,Oe,Re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Oe,Re]}],"perspective-origin":[{"perspective-origin":H()}],rotate:[{rotate:Ae()}],"rotate-x":[{"rotate-x":Ae()}],"rotate-y":[{"rotate-y":Ae()}],"rotate-z":[{"rotate-z":Ae()}],scale:[{scale:He()}],"scale-x":[{"scale-x":He()}],"scale-y":[{"scale-y":He()}],"scale-z":[{"scale-z":He()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[Oe,Re,"","none","gpu","cpu"]}],"transform-origin":[{origin:H()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ze()}],"translate-x":[{"translate-x":ze()}],"translate-y":[{"translate-y":ze()}],"translate-z":[{"translate-z":ze()}],"translate-none":["translate-none"],accent:[{accent:se()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:se()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Oe,Re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Oe,Re]}],fill:[{fill:["none",...se()]}],"stroke-w":[{stroke:[Ve,ca,Ur,Ns]}],stroke:[{stroke:["none",...se()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Ye(...n){return Qv(Ed(n))}function fa(n){if(!n&&n!==0)return"";const l=n instanceof Date?n:new Date(typeof n=="number"?n:Number(n)||n);return Number.isNaN(l.getTime())?"":l.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}const Jv=n=>new Promise(l=>setTimeout(l,n)),Ud=P.forwardRef(({className:n,children:l,...i},o)=>O.jsxs(vd,{ref:o,className:Ye("relative overflow-hidden",n),...i,children:[O.jsx(sv,{className:"h-full w-full rounded-[inherit]",children:l}),O.jsx(Hd,{}),O.jsx(uv,{})]}));Ud.displayName=vd.displayName;const Hd=P.forwardRef(({className:n,orientation:l="vertical",...i},o)=>O.jsx(_s,{ref:o,orientation:l,className:Ye("flex touch-none select-none transition-colors",l==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",n),...i,children:O.jsx(hd,{className:"relative flex-1 rounded-full bg-border"})}));Hd.displayName=_s.displayName;var Wv=Symbol.for("react.lazy"),Hl=Qf[" use ".trim().toString()];function $v(n){return typeof n=="object"&&n!==null&&"then"in n}function qd(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===Wv&&"_payload"in n&&$v(n._payload)}function Pd(n){const l=tS(n),i=P.forwardRef((o,u)=>{let{children:s,...c}=o;qd(s)&&typeof Hl=="function"&&(s=Hl(s._payload));const f=P.Children.toArray(s),m=f.find(rS);if(m){const h=m.props.children,g=f.map(y=>y===m?P.Children.count(h)>1?P.Children.only(null):P.isValidElement(h)?h.props.children:null:y);return O.jsx(l,{...c,ref:u,children:P.isValidElement(h)?P.cloneElement(h,void 0,g):null})}return O.jsx(l,{...c,ref:u,children:s})});return i.displayName=`${n}.Slot`,i}var eS=Pd("Slot");function tS(n){const l=P.forwardRef((i,o)=>{let{children:u,...s}=i;if(qd(u)&&typeof Hl=="function"&&(u=Hl(u._payload)),P.isValidElement(u)){const c=aS(u),f=iS(s,u.props);return u.type!==P.Fragment&&(f.ref=o?Es(o,c):c),P.cloneElement(u,f)}return P.Children.count(u)>1?P.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var nS=Symbol("radix.slottable");function rS(n){return P.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===nS}function iS(n,l){const i={...l};for(const o in l){const u=n[o],s=l[o];/^on[A-Z]/.test(o)?u&&s?i[o]=(...f)=>{const m=s(...f);return u(...f),m}:u&&(i[o]=u):o==="style"?i[o]={...u,...s}:o==="className"&&(i[o]=[u,s].filter(Boolean).join(" "))}return{...n,...i}}function aS(n){let l=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?n.ref:(l=Object.getOwnPropertyDescriptor(n,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}const Fd=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Yd=Ed,lS=((n,l)=>i=>{var o;if(l?.variants==null)return Yd(n,i?.class,i?.className);const{variants:u,defaultVariants:s}=l,c=Object.keys(u).map(h=>{const g=i?.[h],y=s?.[h];if(g===null)return null;const v=Fd(g)||Fd(y);return u[h][v]}),f=i&&Object.entries(i).reduce((h,g)=>{let[y,v]=g;return v===void 0||(h[y]=v),h},{}),m=l==null||(o=l.compoundVariants)===null||o===void 0?void 0:o.reduce((h,g)=>{let{class:y,className:v,...b}=g;return Object.entries(b).every(w=>{let[E,T]=w;return Array.isArray(T)?T.includes({...s,...f}[E]):{...s,...f}[E]===T})?[...h,y,v]:h},[]);return Yd(n,c,m,i?.class,i?.className)})("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),kt=P.forwardRef(({className:n,variant:l,size:i,asChild:o=!1,...u},s)=>{const c=o?eS:"button";return O.jsx(c,{className:Ye(lS({variant:l,size:i,className:n})),ref:s,...u})});kt.displayName="Button";const oS=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),sS=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,i,o)=>o?o.toUpperCase():i.toLowerCase()),Vd=n=>{const l=sS(n);return l.charAt(0).toUpperCase()+l.slice(1)},Gd=(...n)=>n.filter((l,i,o)=>!!l&&l.trim()!==""&&o.indexOf(l)===i).join(" ").trim(),uS=n=>{for(const l in n)if(l.startsWith("aria-")||l==="role"||l==="title")return!0};var cS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const fS=P.forwardRef(({color:n="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:u="",children:s,iconNode:c,...f},m)=>P.createElement("svg",{ref:m,...cS,width:l,height:l,stroke:n,strokeWidth:o?Number(i)*24/Number(l):i,className:Gd("lucide",u),...!s&&!uS(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,g])=>P.createElement(h,g)),...Array.isArray(s)?s:[s]]));const Rt=(n,l)=>{const i=P.forwardRef(({className:o,...u},s)=>P.createElement(fS,{ref:s,iconNode:l,className:Gd(`lucide-${oS(Vd(n))}`,`lucide-${n}`,o),...u}));return i.displayName=Vd(n),i};const dS=Rt("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const Xd=Rt("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);const Zd=Rt("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);const hS=Rt("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Kd=Rt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Rs=Rt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const mS=Rt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const pS=Rt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const gS=Rt("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const yS=Rt("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const bS=Rt("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);const Qd=Rt("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const vS=Rt("message-square-plus",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]]);const SS=Rt("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);const ES=Rt("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);const xS=Rt("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const _S=Rt("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const Os=Rt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),da=P.forwardRef(({className:n,...l},i)=>O.jsx("div",{ref:i,className:Ye("rounded-xl border bg-card text-card-foreground shadow",n),...l}));da.displayName="Card";const Jd=P.forwardRef(({className:n,...l},i)=>O.jsx("div",{ref:i,className:Ye("flex flex-col space-y-1.5 p-6",n),...l}));Jd.displayName="CardHeader";const wS=P.forwardRef(({className:n,...l},i)=>O.jsx("div",{ref:i,className:Ye("font-semibold leading-none tracking-tight",n),...l}));wS.displayName="CardTitle";const CS=P.forwardRef(({className:n,...l},i)=>O.jsx("div",{ref:i,className:Ye("text-sm text-muted-foreground",n),...l}));CS.displayName="CardDescription";const Wd=P.forwardRef(({className:n,...l},i)=>O.jsx("div",{ref:i,className:Ye("p-6 pt-0",n),...l}));Wd.displayName="CardContent";const TS=P.forwardRef(({className:n,...l},i)=>O.jsx("div",{ref:i,className:Ye("flex items-center p-6 pt-0",n),...l}));TS.displayName="CardFooter";function AS(n,l=[]){let i=[];function o(s,c){const f=P.createContext(c);f.displayName=s+"Context";const m=i.length;i=[...i,c];const h=y=>{const{scope:v,children:b,...w}=y,E=v?.[n]?.[m]||f,T=P.useMemo(()=>w,Object.values(w));return O.jsx(E.Provider,{value:T,children:b})};h.displayName=s+"Provider";function g(y,v){const b=v?.[n]?.[m]||f,w=P.useContext(b);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${s}\``)}return[h,g]}const u=()=>{const s=i.map(c=>P.createContext(c));return function(f){const m=f?.[n]||s;return P.useMemo(()=>({[`__scope${n}`]:{...f,[n]:m}}),[f,m])}};return u.scopeName=n,[o,kS(u,...l)]}function kS(...n){const l=n[0];if(n.length===1)return l;const i=()=>{const o=n.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(s){const c=o.reduce((f,{useScope:m,scopeName:h})=>{const y=m(s)[`__scope${h}`];return{...f,...y}},{});return P.useMemo(()=>({[`__scope${l.scopeName}`]:c}),[c])}};return i.scopeName=l.scopeName,i}var NS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zs=NS.reduce((n,l)=>{const i=Pd(`Primitive.${l}`),o=P.forwardRef((u,s)=>{const{asChild:c,...f}=u,m=c?i:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(m,{...f,ref:s})});return o.displayName=`Primitive.${l}`,{...n,[l]:o}},{}),Ms={exports:{}},Ds={};var $d;function RS(){if($d)return Ds;$d=1;var n=Ol();function l(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}var i=typeof Object.is=="function"?Object.is:l,o=n.useState,u=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function f(y,v){var b=v(),w=o({inst:{value:b,getSnapshot:v}}),E=w[0].inst,T=w[1];return s(function(){E.value=b,E.getSnapshot=v,m(E)&&T({inst:E})},[y,b,v]),u(function(){return m(E)&&T({inst:E}),y(function(){m(E)&&T({inst:E})})},[y]),c(b),b}function m(y){var v=y.getSnapshot;y=y.value;try{var b=v();return!i(y,b)}catch{return!0}}function h(y,v){return v()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return Ds.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:g,Ds}var eh;function OS(){return eh||(eh=1,Ms.exports=RS()),Ms.exports}var zS=OS();function MS(){return zS.useSyncExternalStore(DS,()=>!0,()=>!1)}function DS(){return()=>{}}var js="Avatar",[jS]=AS(js),[LS,th]=jS(js),nh=P.forwardRef((n,l)=>{const{__scopeAvatar:i,...o}=n,[u,s]=P.useState("idle");return O.jsx(LS,{scope:i,imageLoadingStatus:u,onImageLoadingStatusChange:s,children:O.jsx(zs.span,{...o,ref:l})})});nh.displayName=js;var rh="AvatarImage",ih=P.forwardRef((n,l)=>{const{__scopeAvatar:i,src:o,onLoadingStatusChange:u=()=>{},...s}=n,c=th(rh,i),f=IS(o,s),m=cr(h=>{u(h),c.onImageLoadingStatusChange(h)});return ur(()=>{f!=="idle"&&m(f)},[f,m]),f==="loaded"?O.jsx(zs.img,{...s,ref:l,src:o}):null});ih.displayName=rh;var ah="AvatarFallback",lh=P.forwardRef((n,l)=>{const{__scopeAvatar:i,delayMs:o,...u}=n,s=th(ah,i),[c,f]=P.useState(o===void 0);return P.useEffect(()=>{if(o!==void 0){const m=window.setTimeout(()=>f(!0),o);return()=>window.clearTimeout(m)}},[o]),c&&s.imageLoadingStatus!=="loaded"?O.jsx(zs.span,{...u,ref:l}):null});lh.displayName=ah;function oh(n,l){return n?l?(n.src!==l&&(n.src=l),n.complete&&n.naturalWidth>0?"loaded":"loading"):"error":"idle"}function IS(n,{referrerPolicy:l,crossOrigin:i}){const o=MS(),u=P.useRef(null),s=o?(u.current||(u.current=new window.Image),u.current):null,[c,f]=P.useState(()=>oh(s,n));return ur(()=>{f(oh(s,n))},[s,n]),ur(()=>{const m=y=>()=>{f(y)};if(!s)return;const h=m("loaded"),g=m("error");return s.addEventListener("load",h),s.addEventListener("error",g),l&&(s.referrerPolicy=l),typeof i=="string"&&(s.crossOrigin=i),()=>{s.removeEventListener("load",h),s.removeEventListener("error",g)}},[s,i,l]),c}var sh=nh,uh=ih,ch=lh;const ha=P.forwardRef(({className:n,...l},i)=>O.jsx(sh,{ref:i,className:Ye("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",n),...l}));ha.displayName=sh.displayName;const fh=P.forwardRef(({className:n,...l},i)=>O.jsx(uh,{ref:i,className:Ye("aspect-square h-full w-full",n),...l}));fh.displayName=uh.displayName;const ma=P.forwardRef(({className:n,...l},i)=>O.jsx(ch,{ref:i,className:Ye("flex h-full w-full items-center justify-center rounded-full bg-muted",n),...l}));ma.displayName=ch.displayName;var Hr={},pa={},Ls={},ga={},ya={},ba={},dh;function BS(){if(dh)return ba;dh=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.EventEmitter=void 0;let n=class{eventListeners=new Map;on(i,o){const u=this.eventListeners.get(i)||new Set;u.add(o),this.eventListeners.set(i,u)}off(i,o){const u=this.eventListeners.get(i);u&&(u.delete(o),u.size===0&&this.eventListeners.delete(i))}emit(i,...o){const u=this.eventListeners.get(i);u&&u.forEach(s=>s(...o))}};return ba.EventEmitter=n,ba}var qr={},hh;function Is(){return hh||(hh=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.DisconnectionReason=qr.ConnectionStatus=void 0,qr.ConnectionStatus={CONNECTING:"connecting",CONNECTED:"connected",NOT_CONNECTED:"not_connected"},qr.DisconnectionReason={CLIENT_CLOSED:"client_closed",SERVER_CLOSED:"server_closed",CONNECTION_ERROR:"connection_error",AUTHENTICATION_ERROR:"authentication_error",MAX_RECONNECT_ATTEMPTS:"max_reconnect_attempts",TIMEOUT:"timeout",NETWORK_ERROR:"network_error"}),qr}var mh;function ph(){if(mh)return ya;mh=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.BaseConnection=void 0;const n=BS(),l=Is();let i=class{status=l.ConnectionStatus.CONNECTING;queue=[];eventEmitter=new n.EventEmitter;disconnectionDetails=null;onErrorCallback=null;onDisconnectCallback=null;onMessageCallback=null;onOpenCallback=null;onStatusChangeCallback=null;getStatus(){return this.status}onOpen(u){this.onOpenCallback=u}onMessage(u){if(this.onMessageCallback=u,this.queue.length>0){const s=[...this.queue];this.queue.length=0,queueMicrotask(()=>{s.forEach(c=>{this.onMessageCallback?.(c)})})}}onDisconnect(u){this.onDisconnectCallback=u;const s=this.disconnectionDetails;s&&queueMicrotask(()=>{this.onDisconnectCallback?.(s)})}onError(u){this.onErrorCallback=u}on(u,s){this.eventEmitter.on(u,s)}off(u,s){this.eventEmitter.off(u,s)}emit(u,...s){this.eventEmitter.emit(u,...s)}onStatusChange(u){this.onStatusChangeCallback=u,queueMicrotask(()=>{u(this.status)})}disconnect(u){this.disconnectionDetails||(this.disconnectionDetails=u,this.updateStatus(l.ConnectionStatus.NOT_CONNECTED),this.onDisconnectCallback?.(u))}handleMessage(u){this.onMessageCallback?this.onMessageCallback(u):this.queue.push(u)}updateStatus(u){this.status!==u&&(this.status=u,this.onStatusChangeCallback?.(u))}};return ya.BaseConnection=i,ya}var Bs={},gh;function Rn(){return gh||(gh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ValidationError=n.ConfigurationError=n.StoreError=n.MessageError=n.SessionError=n.FileError=n.RecordingError=n.ConnectionError=n.InternalServerError=n.RateLimitError=n.MethodNotAllowedError=n.NotFoundError=n.PermissionDeniedError=n.UnauthorizedError=n.BadRequestError=n.APIConnectionTimeoutError=n.APIUserAbortError=n.APIError=n.SynapseError=n.SynapseErrorCode=void 0,n.normalizeError=q,n.SynapseErrorCode={API:"API_ERROR",CONNECTION:"CONNECTION_ERROR",RECORDING:"RECORDING_ERROR",FILE:"FILE_ERROR",SESSION:"SESSION_ERROR",MESSAGE:"MESSAGE_ERROR",STORE:"STORE_ERROR",CONFIGURATION:"CONFIGURATION_ERROR",VALIDATION:"VALIDATION_ERROR",AUTH:"AUTH_ERROR",UNKNOWN:"UNKNOWN_ERROR"};class l extends Error{code;timestamp;cause;context;hint;displayMessage;constructor(M,I=n.SynapseErrorCode.UNKNOWN,Y={}){super(M),this.name="SynapseError",this.code=I,this.timestamp=new Date,this.cause=Y.cause,this.context=Y.context,this.hint=Y.hint,this.displayMessage=Y.displayMessage||Y?.hint||M,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}n.SynapseError=l;class i extends l{status;error;headers;constructor(M,I,Y,F){const $=i.makeMessage(I,Y,M);super($,n.SynapseErrorCode.API,{cause:Y,context:{status:I,hasBody:!!Y},hint:I&&I>=500?"Retry the request or contact support if the issue persists.":void 0,displayMessage:M||"Something went wrong"}),this.name="APIError",this.status=I,this.error=Y,this.headers=F}static makeMessage(M,I,Y){const F=I instanceof Error?I.message:Y;return M&&F?`HTTP ${M}: ${F}`:M?`${M} status code (no body)`:F||"(no status code or body)"}static generate(M,I,Y,F){if(!M)return new o({message:Y});const $=I?.error,ie=$&&typeof $=="object"&&!Array.isArray($)?$:void 0;switch(M){case 400:return new s(Y||"Bad Request",M,ie,F);case 401:return new c(Y||"Unauthorized",M,ie,F);case 403:return new f(Y||"Permission Denied",M,ie,F);case 404:return new m(Y||"Not Found",M,ie,F);case 405:return new h(Y||"Method Not Allowed",M,ie,F);case 429:return new g(Y||"Rate Limit Exceeded",M,ie,F);case 500:return new y(Y||"Internal Server Error",M,ie,F);default:return new i(Y||"API Error",M,ie,F)}}}n.APIError=i;class o extends i{constructor({message:M}={}){super(M||"Request was aborted.",void 0,void 0,void 0),this.name="APIUserAbortError"}}n.APIUserAbortError=o;class u extends i{constructor({message:M}={}){super(M||"Request timed out.",void 0,void 0,void 0),this.name="APIConnectionTimeoutError"}}n.APIConnectionTimeoutError=u;class s extends i{constructor(M,I,Y,F){super(M,I,Y,F),this.name="BadRequestError"}}n.BadRequestError=s;class c extends i{constructor(M,I,Y,F){super(M,I,Y,F),this.name="UnauthorizedError"}}n.UnauthorizedError=c;class f extends i{constructor(M,I,Y,F){super(M,I,Y,F),this.name="PermissionDeniedError"}}n.PermissionDeniedError=f;class m extends i{constructor(M,I,Y,F){super(M,I,Y,F),this.name="NotFoundError"}}n.NotFoundError=m;class h extends i{constructor(M,I,Y,F){super(M,I,Y,F),this.name="MethodNotAllowedError"}}n.MethodNotAllowedError=h;class g extends i{constructor(M,I,Y,F){super(M,I,Y,F),this.name="RateLimitError"}}n.RateLimitError=g;class y extends i{constructor(M,I,Y,F){super(M,I,Y,F),this.name="InternalServerError"}}n.InternalServerError=y;class v extends l{constructor(M,I={}){super(M,n.SynapseErrorCode.CONNECTION,I),this.name="ConnectionError"}}n.ConnectionError=v;class b extends l{constructor(M,I={}){super(M,n.SynapseErrorCode.RECORDING,I),this.name="RecordingError"}}n.RecordingError=b;class w extends l{constructor(M,I={}){super(M,n.SynapseErrorCode.FILE,I),this.name="FileError"}}n.FileError=w;class E extends l{constructor(M,I={}){super(M,n.SynapseErrorCode.SESSION,I),this.name="SessionError"}}n.SessionError=E;class T extends l{constructor(M,I={}){super(M,n.SynapseErrorCode.MESSAGE,I),this.name="MessageError"}}n.MessageError=T;class _ extends l{constructor(M,I={}){super(M,n.SynapseErrorCode.STORE,I),this.name="StoreError"}}n.StoreError=_;class A extends l{constructor(M,I={}){super(M,n.SynapseErrorCode.CONFIGURATION,I),this.name="ConfigurationError"}}n.ConfigurationError=A;class k extends l{constructor(M,I={}){super(M,n.SynapseErrorCode.VALIDATION,I),this.name="ValidationError"}}n.ValidationError=k;function q(H,M,I,Y={}){if(H instanceof M)return H;const F={...Y,context:{...H instanceof l?H.context:void 0,...Y.context},hint:Y.hint??(H instanceof l?H.hint:void 0),cause:Y.cause??H};if(H instanceof l)return new M(H.message,F);const $=H instanceof Error&&H.message?H.message:I;return new M($,F)}})(Bs)),Bs}var yh;function bh(){if(yh)return ga;yh=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.WebSocketConnection=void 0;const n=ph(),l=Is(),i=Rn();class o extends n.BaseConnection{conversationId;socket=null;config;reconnectCount=0;constructor(s){super(),this.config={...s,reconnect:s.reconnect||!0,reconnectAttempts:s.reconnectAttempts||3,reconnectDelay:s.reconnectDelay||1e3},this.conversationId=s.auth.sessionId,this.connect()}connect(){try{this.updateStatus(l.ConnectionStatus.CONNECTING);const s=this.buildConnectionUrl();this.socket=new WebSocket(s),this.socket.onopen=this.handleOpen.bind(this),this.socket.onmessage=this.handleSocketMessage.bind(this),this.socket.onerror=this.handleError.bind(this),this.socket.onclose=this.handleClose.bind(this)}catch(s){const c=(0,i.normalizeError)(s,i.ConnectionError,"Failed to establish WebSocket connection",{context:{stage:"connect"}});this.onErrorCallback?.(c),this.disconnect({reason:l.DisconnectionReason.CONNECTION_ERROR,message:c.message,timestamp:new Date})}}buildConnectionUrl(){const s=new URL(this.config.serverUrl);return s.pathname=`/reloaded/ws/med-assist/session/${this.config.auth.sessionId}/`,s.toString()}handleOpen(){this.onOpenCallback?.()}handleSocketMessage(s){try{const c=JSON.parse(s.data);this.handleMessage(c)}catch(c){const f=(0,i.normalizeError)(c,i.MessageError,"Failed to parse incoming WebSocket message",{context:{stage:"handleSocketMessage"}});this.onErrorCallback?.(f)}}handleError(s){const c=new i.ConnectionError("WebSocket error",{context:{stage:"handleError"},cause:s});this.onErrorCallback?.(c)}handleClose(s){const c=s.wasClean,f=s.code,m=s.reason;let h,g;f===1e3?(h=l.DisconnectionReason.CLIENT_CLOSED,g="Connection closed normally"):f===1001||f===1006?(h=l.DisconnectionReason.NETWORK_ERROR,g="Network connection lost"):f===4001?(h=l.DisconnectionReason.AUTHENTICATION_ERROR,g="Authentication failed"):c?(h=l.DisconnectionReason.SERVER_CLOSED,g=m||"Server closed connection"):(h=l.DisconnectionReason.CONNECTION_ERROR,g=m||"Connection closed unexpectedly"),this.config.reconnect&&h!==l.DisconnectionReason.AUTHENTICATION_ERROR&&h!==l.DisconnectionReason.CLIENT_CLOSED&&this.reconnectCount<(this.config.reconnectAttempts||3)?(this.reconnectCount++,setTimeout(()=>{this.connect()},this.config.reconnectDelay||1e3)):this.disconnect({reason:h,message:g,code:f,timestamp:new Date})}sendMessage(s){if(!this.socket||this.socket.readyState!==WebSocket.OPEN)throw new i.ConnectionError("Cannot send message: connection not open",{context:{stage:"sendMessage",readyState:this.socket?.readyState},hint:"Ensure the WebSocket is open before sending messages."});try{this.socket.send(JSON.stringify(s))}catch(c){const f=(0,i.normalizeError)(c,i.ConnectionError,"Failed to send WebSocket message",{context:{stage:"sendMessage"}});throw this.onErrorCallback?.(f),f}}close(){this.socket&&(this.updateStatus(l.ConnectionStatus.NOT_CONNECTED),this.socket.close(1e3,"Client closed connection"),this.socket=null)}isConnected(){return this.socket?.readyState===WebSocket.OPEN}handleConnected(){this.updateStatus(l.ConnectionStatus.CONNECTED),this.reconnectCount=0}}return ga.WebSocketConnection=o,ga}var vh;function Sh(){return vh||(vh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ConnectionFactory=n.ConnectionType=void 0;const l=bh(),i=Rn();n.ConnectionType={SOCKET:"socket"};class o{static async createConnection(s,c){switch(s){case n.ConnectionType.SOCKET:return new l.WebSocketConnection(c);default:throw new i.ConnectionError(`Unsupported connection type: ${s}`,{context:{type:s}})}}}n.ConnectionFactory=o})(Ls)),Ls}var Pr={},Eh;function US(){if(Eh)return Pr;Eh=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.SYNAPSE_TOOL_NAME=Pr.getConfig=void 0;const n={WEBSOCKET_URL:"wss://matrix-ws.eka.care/reloaded",BASE_API_URL:"https://matrix.eka.care/reloaded"},l={WEBSOCKET_URL:"wss://matrix-ws.dev.eka.care/reloaded",BASE_API_URL:"https://matrix.dev.eka.care/reloaded"},i={WEBSOCKET_URL:"wss://matrix-ws.dev.eka.care",BASE_API_URL:"https://matrix.dev.eka.care"},o=(s="production")=>s==="development"?l:s==="production"?n:s==="staging"?i:n;Pr.getConfig=o;var u;return(function(s){s.MOBILE_VERIFICATION="mobile_verification",s.AVAILABILITY_DATES="availability_dates",s.AVAILABILITY_SLOTS="availability_slots",s.DOCTOR_DETAILS="doctor_details",s.GET_LOCATION="get_location"})(u||(Pr.SYNAPSE_TOOL_NAME=u={})),Pr}var va={},Sa={},xh;function _h(){if(xh)return Sa;xh=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.HttpClient=void 0;const n=Rn();let l=class{baseUrl;headers;timeout;maxRetries;constructor(o){this.baseUrl=o.baseUrl.replace(/\/$/,""),this.timeout=o.timeout||3e4,this.maxRetries=o.maxRetries||3,this.headers={"Content-Type":"application/json",...o.headers},o.authorization&&(this.headers.Authorization=o.authorization)}async request(o,u,s){const c=s?.retries??this.maxRetries;let f;for(let m=0;m<=c;m++)try{const h=this.buildUrl(u,s?.params),g=await fetch(h,{method:o,headers:{...this.headers,...s?.headers},body:s?.body?JSON.stringify(s.body):void 0,signal:AbortSignal.timeout(this.timeout)});return g.ok||await this.handleError(g),g.json()}catch(h){if(f=h,m===c||!(h instanceof TypeError&&h.message==="Failed to fetch"||h instanceof DOMException&&h.name==="AbortError"||h instanceof SyntaxError))break;const y=Math.pow(2,m)*100;await new Promise(v=>setTimeout(v,y))}throw f?f instanceof TypeError&&f.message==="Failed to fetch"?new n.APIError("Network error: Unable to connect to the server. Please check your internet connection.",0,{type:"NETWORK_ERROR",originalError:f.message}):f instanceof DOMException&&f.name==="AbortError"?new n.APIConnectionTimeoutError({message:`Request timed out after ${this.timeout}ms`}):f instanceof SyntaxError?new n.APIError("Invalid response format from server",502,{type:"PARSE_ERROR",originalError:f.message}):f instanceof n.APIError?f:new n.APIError(`Request failed: ${f.message||"Unknown error"}`,500,{type:"UNKNOWN_ERROR",originalError:f}):new n.APIError("Unknown error occurred",500,{type:"UNKNOWN_ERROR"})}async get(o,u,s){return this.request("GET",o,{params:u,...s})}async post(o,u,s){return this.request("POST",o,{body:u,...s})}async put(o,u,s){return this.request("PUT",o,{body:u,...s})}async delete(o,u){return this.request("DELETE",o,{...u})}async patch(o,u,s){return this.request("PATCH",o,{body:u,...s})}buildUrl(o,u){let s=`${this.baseUrl}${o}`;if(u){const c=new URLSearchParams(u).toString();s+=`?${c}`}return s}async handleError(o){let u,s;try{s=await o.json(),u=s.message||s?.msg||o.statusText}catch{u=o.statusText}throw n.APIError.generate(o.status,s,u,o.headers)}};return Sa.HttpClient=l,Sa}var Ea={},xa={},wh;function Ch(){if(wh)return xa;wh=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.BaseResource=void 0;let n=class{client;constructor(i){this.client=i}async get(i,o,u){return this.client.get(i,o,u)}async post(i,o,u){return this.client.post(i,o,u)}async put(i,o,u){return this.client.put(i,o,u)}async delete(i,o){return this.client.delete(i,o)}async patch(i,o,u){return this.client.patch(i,o,u)}buildPath(i,o){let u=i;for(const[s,c]of Object.entries(o))u=u.replace(`:${s}`,encodeURIComponent(c));return u}};return xa.BaseResource=n,xa}var Th;function Ah(){if(Th)return Ea;Th=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.Session=void 0;const n=Ch();let l=class extends n.BaseResource{basePath="/med-assist/session";async create(o){return this.post(this.basePath,{user_id:o})}async retrieve(o){return this.get(`${this.basePath}/${o}`)}async refresh(o,u){return this.get(`${this.basePath}/${o}/refresh`,void 0,{headers:{"x-sess-token":u}})}async feedback(o,u,s,c){return this.patch(`${this.basePath}/${o}/${u}`,{feedback:s,feedback_reason:c})}};return Ea.Session=l,Ea}var _a={},Fn={},kh;function Nh(){if(kh)return Fn;kh=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.SYNAPSE_TOOL_CALLBACK_NAME=Fn.SYNAPSE_COMPONENTS=Fn.SYNAPSE_TOOL_NAME=void 0;var n;(function(i){i.MOBILE_VERIFICATION="mobile_verification",i.AVAILABILITY_DATES="availability_dates",i.AVAILABILITY_SLOTS="availability_slots",i.DOCTOR_DETAILS="doctor_details",i.GET_LOCATION="get_location"})(n||(Fn.SYNAPSE_TOOL_NAME=n={})),Fn.SYNAPSE_COMPONENTS={MOBILE_VERIFICATION:"mobile_verification",PILL:"pills",MULTI:"multi",DOCTOR_CARD:"doctor_card"};var l;return(function(i){i.AVAILABILITY_DATES="tool_callback_availability_dates",i.AVAILABILITY_SLOTS="tool_callback_availability_slots",i.MOBILE_VERIFICATION="tool_callback_mobile_verification",i.DOCTOR_DETAILS="tool_callback_doctor_details"})(l||(Fn.SYNAPSE_TOOL_CALLBACK_NAME=l={})),Fn}var Rh;function Oh(){if(Rh)return _a;Rh=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.ToolCall=void 0;const n=Ch(),l=Nh();let i=class extends n.BaseResource{basePath="/med-assist/api-call-tool";async callTool(u,s,c){return s===l.SYNAPSE_TOOL_NAME.GET_LOCATION?this.requestLocation():this.post(`${this.basePath}?session_id=${u}&tool_name=${s}`,{tool_params:c})}async requestLocation(){return new Promise((u,s)=>{if(typeof navigator>"u"||!navigator.geolocation){s({code:500,message:"Geolocation is not supported by this browser",status:500,type:"GEOLOCATION_ERROR",originalError:new Error("Geolocation is not supported by this browser")});return}navigator.geolocation.getCurrentPosition(c=>{u({latitude:c.coords.latitude,longitude:c.coords.longitude,accuracy:c.coords?.accuracy??void 0})},c=>{s({code:c.code,message:c.message,status:500,type:"GEOLOCATION_ERROR",originalError:c})},{timeout:1e4,maximumAge:0,enableHighAccuracy:!0})})}};return _a.ToolCall=i,_a}var zh;function Mh(){if(zh)return va;zh=1,Object.defineProperty(va,"__esModule",{value:!0}),va.ResourceManager=void 0;const n=_h(),l=Ah(),i=Rn(),o=Oh();class u{resourceConfig;httpClient;session;toolCall=null;constructor(c){this.resourceConfig=c,this.httpClient=new n.HttpClient({baseUrl:this.resourceConfig.serverUrl,headers:{"X-agent-id":this.resourceConfig.agentId}}),this.session=new l.Session(this.httpClient)}async createSession(c){try{const f=await this.session.create(c);if(!f?.session_id||!f?.session_token)throw new i.APIError("Failed to start session.",500,void 0,void 0);return f}catch(f){throw f instanceof i.APIError?f:new i.APIError("Failed to start session.",500,void 0,void 0)}}async validateSession(c){try{const f=await this.session.retrieve(c);return f.msg&&f.msg==="Session Active"?{expired:!1,active:!0}:{expired:!0,active:!1}}catch(f){if(f instanceof i.APIError)switch(f.status){case 404:return{expired:!1,active:!1};case 500:return{expired:!1,active:!1};case 401:return{expired:!0,active:!1};default:return{expired:!1,active:!1}}throw new i.APIError("Failed to validate session.",500,void 0,void 0)}}async refreshSession(c,f){return await this.session.refresh(c,f)}async sendFeedback(c,f,m,h){return await this.session.feedback(c,f,m,h)}async callTool(c,f,m){return this.toolCall||(this.toolCall=new o.ToolCall(this.httpClient)),await this.toolCall.callTool(c,f,m)}}return va.ResourceManager=u,va}var wa={},Us={},Dh;function Hs(){return Dh||(Dh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.MULTI_SELECT_ADDITIONAL_OPTION=n.SOCKET_EVENTS=n.SOCKET_CONTENT_TYPES=void 0,n.IsValidSocketMesssage=l,n.SOCKET_CONTENT_TYPES={TEXT:"text",AUDIO:"audio",FILE:"file",TOOL_CALL:"tool",TIPS:"tips",INLINE_TEXT:"inline_text",TOOL_START:"tool_start",TOOL_END:"tool_end"},n.SOCKET_EVENTS={PING:"ping",PONG:"pong",CHAT:"chat",STREAM:"stream",AUTH:"auth",END_OF_STREAM:"eos",SYNC:"sync",ERROR:"err",CONNECTION_ESTABLISHED:"conn"},n.MULTI_SELECT_ADDITIONAL_OPTION={NOTA:"none_of_the_above",AOTA:"all_of_the_above"};function l(i){return[n.SOCKET_EVENTS.PING,n.SOCKET_EVENTS.PONG,n.SOCKET_EVENTS.ERROR,n.SOCKET_EVENTS.SYNC,n.SOCKET_EVENTS.CONNECTION_ESTABLISHED,n.SOCKET_EVENTS.CHAT,n.SOCKET_EVENTS.STREAM,n.SOCKET_EVENTS.END_OF_STREAM].includes(i.ev)}})(Us)),Us}var Fr={};function ql(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var qs={exports:{}};var jh;function HS(){return jh||(jh=1,(function(n,l){(function(i){n.exports=i()})(function(){return(function i(o,u,s){function c(h,g){if(!u[h]){if(!o[h]){var y=typeof ql=="function"&&ql;if(!g&&y)return y(h,!0);if(f)return f(h,!0);var v=new Error("Cannot find module '"+h+"'");throw v.code="MODULE_NOT_FOUND",v}var b=u[h]={exports:{}};o[h][0].call(b.exports,function(w){var E=o[h][1][w];return c(E||w)},b,b.exports,i,o,u,s)}return u[h].exports}for(var f=typeof ql=="function"&&ql,m=0;m<s.length;m++)c(s[m]);return c})({1:[function(i,o,u){var s=i("./utils"),c=i("./support"),f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";u.encode=function(m){for(var h,g,y,v,b,w,E,T=[],_=0,A=m.length,k=A,q=s.getTypeOf(m)!=="string";_<m.length;)k=A-_,y=q?(h=m[_++],g=_<A?m[_++]:0,_<A?m[_++]:0):(h=m.charCodeAt(_++),g=_<A?m.charCodeAt(_++):0,_<A?m.charCodeAt(_++):0),v=h>>2,b=(3&h)<<4|g>>4,w=1<k?(15&g)<<2|y>>6:64,E=2<k?63&y:64,T.push(f.charAt(v)+f.charAt(b)+f.charAt(w)+f.charAt(E));return T.join("")},u.decode=function(m){var h,g,y,v,b,w,E=0,T=0,_="data:";if(m.substr(0,_.length)===_)throw new Error("Invalid base64 input, it looks like a data url.");var A,k=3*(m=m.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(m.charAt(m.length-1)===f.charAt(64)&&k--,m.charAt(m.length-2)===f.charAt(64)&&k--,k%1!=0)throw new Error("Invalid base64 input, bad content length.");for(A=c.uint8array?new Uint8Array(0|k):new Array(0|k);E<m.length;)h=f.indexOf(m.charAt(E++))<<2|(v=f.indexOf(m.charAt(E++)))>>4,g=(15&v)<<4|(b=f.indexOf(m.charAt(E++)))>>2,y=(3&b)<<6|(w=f.indexOf(m.charAt(E++))),A[T++]=h,b!==64&&(A[T++]=g),w!==64&&(A[T++]=y);return A}},{"./support":30,"./utils":32}],2:[function(i,o,u){var s=i("./external"),c=i("./stream/DataWorker"),f=i("./stream/Crc32Probe"),m=i("./stream/DataLengthProbe");function h(g,y,v,b,w){this.compressedSize=g,this.uncompressedSize=y,this.crc32=v,this.compression=b,this.compressedContent=w}h.prototype={getContentWorker:function(){var g=new c(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new m("data_length")),y=this;return g.on("end",function(){if(this.streamInfo.data_length!==y.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),g},getCompressedWorker:function(){return new c(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},h.createWorkerFrom=function(g,y,v){return g.pipe(new f).pipe(new m("uncompressedSize")).pipe(y.compressWorker(v)).pipe(new m("compressedSize")).withStreamInfo("compression",y)},o.exports=h},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(i,o,u){var s=i("./stream/GenericWorker");u.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},u.DEFLATE=i("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(i,o,u){var s=i("./utils"),c=(function(){for(var f,m=[],h=0;h<256;h++){f=h;for(var g=0;g<8;g++)f=1&f?3988292384^f>>>1:f>>>1;m[h]=f}return m})();o.exports=function(f,m){return f!==void 0&&f.length?s.getTypeOf(f)!=="string"?(function(h,g,y,v){var b=c,w=v+y;h^=-1;for(var E=v;E<w;E++)h=h>>>8^b[255&(h^g[E])];return-1^h})(0|m,f,f.length,0):(function(h,g,y,v){var b=c,w=v+y;h^=-1;for(var E=v;E<w;E++)h=h>>>8^b[255&(h^g.charCodeAt(E))];return-1^h})(0|m,f,f.length,0):0}},{"./utils":32}],5:[function(i,o,u){u.base64=!1,u.binary=!1,u.dir=!1,u.createFolders=!0,u.date=null,u.compression=null,u.compressionOptions=null,u.comment=null,u.unixPermissions=null,u.dosPermissions=null},{}],6:[function(i,o,u){var s=null;s=typeof Promise<"u"?Promise:i("lie"),o.exports={Promise:s}},{lie:37}],7:[function(i,o,u){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",c=i("pako"),f=i("./utils"),m=i("./stream/GenericWorker"),h=s?"uint8array":"array";function g(y,v){m.call(this,"FlateWorker/"+y),this._pako=null,this._pakoAction=y,this._pakoOptions=v,this.meta={}}u.magic="\b\0",f.inherits(g,m),g.prototype.processChunk=function(y){this.meta=y.meta,this._pako===null&&this._createPako(),this._pako.push(f.transformTo(h,y.data),!1)},g.prototype.flush=function(){m.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},g.prototype.cleanUp=function(){m.prototype.cleanUp.call(this),this._pako=null},g.prototype._createPako=function(){this._pako=new c[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var y=this;this._pako.onData=function(v){y.push({data:v,meta:y.meta})}},u.compressWorker=function(y){return new g("Deflate",y)},u.uncompressWorker=function(){return new g("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(i,o,u){function s(b,w){var E,T="";for(E=0;E<w;E++)T+=String.fromCharCode(255&b),b>>>=8;return T}function c(b,w,E,T,_,A){var k,q,H=b.file,M=b.compression,I=A!==h.utf8encode,Y=f.transformTo("string",A(H.name)),F=f.transformTo("string",h.utf8encode(H.name)),$=H.comment,ie=f.transformTo("string",A($)),D=f.transformTo("string",h.utf8encode($)),ne=F.length!==H.name.length,C=D.length!==$.length,V="",Z="",Q="",se=H.dir,de=H.date,L={crc32:0,compressedSize:0,uncompressedSize:0};w&&!E||(L.crc32=b.crc32,L.compressedSize=b.compressedSize,L.uncompressedSize=b.uncompressedSize);var N=0;w&&(N|=8),I||!ne&&!C||(N|=2048);var B=0,z=0;se&&(B|=16),_==="UNIX"?(z=798,B|=(function(ce,we){var Te=ce;return ce||(Te=we?16893:33204),(65535&Te)<<16})(H.unixPermissions,se)):(z=20,B|=(function(ce){return 63&(ce||0)})(H.dosPermissions)),k=de.getUTCHours(),k<<=6,k|=de.getUTCMinutes(),k<<=5,k|=de.getUTCSeconds()/2,q=de.getUTCFullYear()-1980,q<<=4,q|=de.getUTCMonth()+1,q<<=5,q|=de.getUTCDate(),ne&&(Z=s(1,1)+s(g(Y),4)+F,V+="up"+s(Z.length,2)+Z),C&&(Q=s(1,1)+s(g(ie),4)+D,V+="uc"+s(Q.length,2)+Q);var re="";return re+=`
|
|
10
|
-
\0`,re+=s(N,2),re+=M.magic,re+=s(k,2),re+=s(q,2),re+=s(L.crc32,4),re+=s(L.compressedSize,4),re+=s(L.uncompressedSize,4),re+=s(Y.length,2),re+=s(V.length,2),{fileRecord:y.LOCAL_FILE_HEADER+re+Y+V,dirRecord:y.CENTRAL_FILE_HEADER+s(z,2)+re+s(ie.length,2)+"\0\0\0\0"+s(B,4)+s(T,4)+Y+V+ie}}var f=i("../utils"),m=i("../stream/GenericWorker"),h=i("../utf8"),g=i("../crc32"),y=i("../signature");function v(b,w,E,T){m.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=E,this.encodeFileName=T,this.streamFiles=b,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}f.inherits(v,m),v.prototype.push=function(b){var w=b.meta.percent||0,E=this.entriesCount,T=this._sources.length;this.accumulate?this.contentBuffer.push(b):(this.bytesWritten+=b.data.length,m.prototype.push.call(this,{data:b.data,meta:{currentFile:this.currentFile,percent:E?(w+100*(E-T-1))/E:100}}))},v.prototype.openedSource=function(b){this.currentSourceOffset=this.bytesWritten,this.currentFile=b.file.name;var w=this.streamFiles&&!b.file.dir;if(w){var E=c(b,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},v.prototype.closedSource=function(b){this.accumulate=!1;var w=this.streamFiles&&!b.file.dir,E=c(b,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),w)this.push({data:(function(T){return y.DATA_DESCRIPTOR+s(T.crc32,4)+s(T.compressedSize,4)+s(T.uncompressedSize,4)})(b),meta:{percent:100}});else for(this.push({data:E.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},v.prototype.flush=function(){for(var b=this.bytesWritten,w=0;w<this.dirRecords.length;w++)this.push({data:this.dirRecords[w],meta:{percent:100}});var E=this.bytesWritten-b,T=(function(_,A,k,q,H){var M=f.transformTo("string",H(q));return y.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(_,2)+s(_,2)+s(A,4)+s(k,4)+s(M.length,2)+M})(this.dirRecords.length,E,b,this.zipComment,this.encodeFileName);this.push({data:T,meta:{percent:100}})},v.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},v.prototype.registerPrevious=function(b){this._sources.push(b);var w=this;return b.on("data",function(E){w.processChunk(E)}),b.on("end",function(){w.closedSource(w.previous.streamInfo),w._sources.length?w.prepareNextSource():w.end()}),b.on("error",function(E){w.error(E)}),this},v.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},v.prototype.error=function(b){var w=this._sources;if(!m.prototype.error.call(this,b))return!1;for(var E=0;E<w.length;E++)try{w[E].error(b)}catch{}return!0},v.prototype.lock=function(){m.prototype.lock.call(this);for(var b=this._sources,w=0;w<b.length;w++)b[w].lock()},o.exports=v},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(i,o,u){var s=i("../compressions"),c=i("./ZipFileWorker");u.generateWorker=function(f,m,h){var g=new c(m.streamFiles,h,m.platform,m.encodeFileName),y=0;try{f.forEach(function(v,b){y++;var w=(function(A,k){var q=A||k,H=s[q];if(!H)throw new Error(q+" is not a valid compression method !");return H})(b.options.compression,m.compression),E=b.options.compressionOptions||m.compressionOptions||{},T=b.dir,_=b.date;b._compressWorker(w,E).withStreamInfo("file",{name:v,dir:T,date:_,comment:b.comment||"",unixPermissions:b.unixPermissions,dosPermissions:b.dosPermissions}).pipe(g)}),g.entriesCount=y}catch(v){g.error(v)}return g}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(i,o,u){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var c=new s;for(var f in this)typeof this[f]!="function"&&(c[f]=this[f]);return c}}(s.prototype=i("./object")).loadAsync=i("./load"),s.support=i("./support"),s.defaults=i("./defaults"),s.version="3.10.1",s.loadAsync=function(c,f){return new s().loadAsync(c,f)},s.external=i("./external"),o.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(i,o,u){var s=i("./utils"),c=i("./external"),f=i("./utf8"),m=i("./zipEntries"),h=i("./stream/Crc32Probe"),g=i("./nodejsUtils");function y(v){return new c.Promise(function(b,w){var E=v.decompressed.getContentWorker().pipe(new h);E.on("error",function(T){w(T)}).on("end",function(){E.streamInfo.crc32!==v.decompressed.crc32?w(new Error("Corrupted zip : CRC32 mismatch")):b()}).resume()})}o.exports=function(v,b){var w=this;return b=s.extend(b||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:f.utf8decode}),g.isNode&&g.isStream(v)?c.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):s.prepareContent("the loaded zip file",v,!0,b.optimizedBinaryString,b.base64).then(function(E){var T=new m(b);return T.load(E),T}).then(function(E){var T=[c.Promise.resolve(E)],_=E.files;if(b.checkCRC32)for(var A=0;A<_.length;A++)T.push(y(_[A]));return c.Promise.all(T)}).then(function(E){for(var T=E.shift(),_=T.files,A=0;A<_.length;A++){var k=_[A],q=k.fileNameStr,H=s.resolve(k.fileNameStr);w.file(H,k.decompressed,{binary:!0,optimizedBinaryString:!0,date:k.date,dir:k.dir,comment:k.fileCommentStr.length?k.fileCommentStr:null,unixPermissions:k.unixPermissions,dosPermissions:k.dosPermissions,createFolders:b.createFolders}),k.dir||(w.file(H).unsafeOriginalName=q)}return T.zipComment.length&&(w.comment=T.zipComment),w})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(i,o,u){var s=i("../utils"),c=i("../stream/GenericWorker");function f(m,h){c.call(this,"Nodejs stream input adapter for "+m),this._upstreamEnded=!1,this._bindStream(h)}s.inherits(f,c),f.prototype._bindStream=function(m){var h=this;(this._stream=m).pause(),m.on("data",function(g){h.push({data:g,meta:{percent:0}})}).on("error",function(g){h.isPaused?this.generatedError=g:h.error(g)}).on("end",function(){h.isPaused?h._upstreamEnded=!0:h.end()})},f.prototype.pause=function(){return!!c.prototype.pause.call(this)&&(this._stream.pause(),!0)},f.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},o.exports=f},{"../stream/GenericWorker":28,"../utils":32}],13:[function(i,o,u){var s=i("readable-stream").Readable;function c(f,m,h){s.call(this,m),this._helper=f;var g=this;f.on("data",function(y,v){g.push(y)||g._helper.pause(),h&&h(v)}).on("error",function(y){g.emit("error",y)}).on("end",function(){g.push(null)})}i("../utils").inherits(c,s),c.prototype._read=function(){this._helper.resume()},o.exports=c},{"../utils":32,"readable-stream":16}],14:[function(i,o,u){o.exports={isNode:typeof Buffer<"u",newBufferFrom:function(s,c){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(s,c);if(typeof s=="number")throw new Error('The "data" argument must not be a number');return new Buffer(s,c)},allocBuffer:function(s){if(Buffer.alloc)return Buffer.alloc(s);var c=new Buffer(s);return c.fill(0),c},isBuffer:function(s){return Buffer.isBuffer(s)},isStream:function(s){return s&&typeof s.on=="function"&&typeof s.pause=="function"&&typeof s.resume=="function"}}},{}],15:[function(i,o,u){function s(H,M,I){var Y,F=f.getTypeOf(M),$=f.extend(I||{},g);$.date=$.date||new Date,$.compression!==null&&($.compression=$.compression.toUpperCase()),typeof $.unixPermissions=="string"&&($.unixPermissions=parseInt($.unixPermissions,8)),$.unixPermissions&&16384&$.unixPermissions&&($.dir=!0),$.dosPermissions&&16&$.dosPermissions&&($.dir=!0),$.dir&&(H=_(H)),$.createFolders&&(Y=T(H))&&A.call(this,Y,!0);var ie=F==="string"&&$.binary===!1&&$.base64===!1;I&&I.binary!==void 0||($.binary=!ie),(M instanceof y&&M.uncompressedSize===0||$.dir||!M||M.length===0)&&($.base64=!1,$.binary=!0,M="",$.compression="STORE",F="string");var D=null;D=M instanceof y||M instanceof m?M:w.isNode&&w.isStream(M)?new E(H,M):f.prepareContent(H,M,$.binary,$.optimizedBinaryString,$.base64);var ne=new v(H,D,$);this.files[H]=ne}var c=i("./utf8"),f=i("./utils"),m=i("./stream/GenericWorker"),h=i("./stream/StreamHelper"),g=i("./defaults"),y=i("./compressedObject"),v=i("./zipObject"),b=i("./generate"),w=i("./nodejsUtils"),E=i("./nodejs/NodejsStreamInputAdapter"),T=function(H){H.slice(-1)==="/"&&(H=H.substring(0,H.length-1));var M=H.lastIndexOf("/");return 0<M?H.substring(0,M):""},_=function(H){return H.slice(-1)!=="/"&&(H+="/"),H},A=function(H,M){return M=M!==void 0?M:g.createFolders,H=_(H),this.files[H]||s.call(this,H,null,{dir:!0,createFolders:M}),this.files[H]};function k(H){return Object.prototype.toString.call(H)==="[object RegExp]"}var q={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(H){var M,I,Y;for(M in this.files)Y=this.files[M],(I=M.slice(this.root.length,M.length))&&M.slice(0,this.root.length)===this.root&&H(I,Y)},filter:function(H){var M=[];return this.forEach(function(I,Y){H(I,Y)&&M.push(Y)}),M},file:function(H,M,I){if(arguments.length!==1)return H=this.root+H,s.call(this,H,M,I),this;if(k(H)){var Y=H;return this.filter(function($,ie){return!ie.dir&&Y.test($)})}var F=this.files[this.root+H];return F&&!F.dir?F:null},folder:function(H){if(!H)return this;if(k(H))return this.filter(function(F,$){return $.dir&&H.test(F)});var M=this.root+H,I=A.call(this,M),Y=this.clone();return Y.root=I.name,Y},remove:function(H){H=this.root+H;var M=this.files[H];if(M||(H.slice(-1)!=="/"&&(H+="/"),M=this.files[H]),M&&!M.dir)delete this.files[H];else for(var I=this.filter(function(F,$){return $.name.slice(0,H.length)===H}),Y=0;Y<I.length;Y++)delete this.files[I[Y].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(H){var M,I={};try{if((I=f.extend(H||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:c.utf8encode})).type=I.type.toLowerCase(),I.compression=I.compression.toUpperCase(),I.type==="binarystring"&&(I.type="string"),!I.type)throw new Error("No output type specified.");f.checkSupport(I.type),I.platform!=="darwin"&&I.platform!=="freebsd"&&I.platform!=="linux"&&I.platform!=="sunos"||(I.platform="UNIX"),I.platform==="win32"&&(I.platform="DOS");var Y=I.comment||this.comment||"";M=b.generateWorker(this,I,Y)}catch(F){(M=new m("error")).error(F)}return new h(M,I.type||"string",I.mimeType)},generateAsync:function(H,M){return this.generateInternalStream(H).accumulate(M)},generateNodeStream:function(H,M){return(H=H||{}).type||(H.type="nodebuffer"),this.generateInternalStream(H).toNodejsStream(M)}};o.exports=q},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(i,o,u){o.exports=i("stream")},{stream:void 0}],17:[function(i,o,u){var s=i("./DataReader");function c(f){s.call(this,f);for(var m=0;m<this.data.length;m++)f[m]=255&f[m]}i("../utils").inherits(c,s),c.prototype.byteAt=function(f){return this.data[this.zero+f]},c.prototype.lastIndexOfSignature=function(f){for(var m=f.charCodeAt(0),h=f.charCodeAt(1),g=f.charCodeAt(2),y=f.charCodeAt(3),v=this.length-4;0<=v;--v)if(this.data[v]===m&&this.data[v+1]===h&&this.data[v+2]===g&&this.data[v+3]===y)return v-this.zero;return-1},c.prototype.readAndCheckSignature=function(f){var m=f.charCodeAt(0),h=f.charCodeAt(1),g=f.charCodeAt(2),y=f.charCodeAt(3),v=this.readData(4);return m===v[0]&&h===v[1]&&g===v[2]&&y===v[3]},c.prototype.readData=function(f){if(this.checkOffset(f),f===0)return[];var m=this.data.slice(this.zero+this.index,this.zero+this.index+f);return this.index+=f,m},o.exports=c},{"../utils":32,"./DataReader":18}],18:[function(i,o,u){var s=i("../utils");function c(f){this.data=f,this.length=f.length,this.index=0,this.zero=0}c.prototype={checkOffset:function(f){this.checkIndex(this.index+f)},checkIndex:function(f){if(this.length<this.zero+f||f<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+f+"). Corrupted zip ?")},setIndex:function(f){this.checkIndex(f),this.index=f},skip:function(f){this.setIndex(this.index+f)},byteAt:function(){},readInt:function(f){var m,h=0;for(this.checkOffset(f),m=this.index+f-1;m>=this.index;m--)h=(h<<8)+this.byteAt(m);return this.index+=f,h},readString:function(f){return s.transformTo("string",this.readData(f))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var f=this.readInt(4);return new Date(Date.UTC(1980+(f>>25&127),(f>>21&15)-1,f>>16&31,f>>11&31,f>>5&63,(31&f)<<1))}},o.exports=c},{"../utils":32}],19:[function(i,o,u){var s=i("./Uint8ArrayReader");function c(f){s.call(this,f)}i("../utils").inherits(c,s),c.prototype.readData=function(f){this.checkOffset(f);var m=this.data.slice(this.zero+this.index,this.zero+this.index+f);return this.index+=f,m},o.exports=c},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(i,o,u){var s=i("./DataReader");function c(f){s.call(this,f)}i("../utils").inherits(c,s),c.prototype.byteAt=function(f){return this.data.charCodeAt(this.zero+f)},c.prototype.lastIndexOfSignature=function(f){return this.data.lastIndexOf(f)-this.zero},c.prototype.readAndCheckSignature=function(f){return f===this.readData(4)},c.prototype.readData=function(f){this.checkOffset(f);var m=this.data.slice(this.zero+this.index,this.zero+this.index+f);return this.index+=f,m},o.exports=c},{"../utils":32,"./DataReader":18}],21:[function(i,o,u){var s=i("./ArrayReader");function c(f){s.call(this,f)}i("../utils").inherits(c,s),c.prototype.readData=function(f){if(this.checkOffset(f),f===0)return new Uint8Array(0);var m=this.data.subarray(this.zero+this.index,this.zero+this.index+f);return this.index+=f,m},o.exports=c},{"../utils":32,"./ArrayReader":17}],22:[function(i,o,u){var s=i("../utils"),c=i("../support"),f=i("./ArrayReader"),m=i("./StringReader"),h=i("./NodeBufferReader"),g=i("./Uint8ArrayReader");o.exports=function(y){var v=s.getTypeOf(y);return s.checkSupport(v),v!=="string"||c.uint8array?v==="nodebuffer"?new h(y):c.uint8array?new g(s.transformTo("uint8array",y)):new f(s.transformTo("array",y)):new m(y)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(i,o,u){u.LOCAL_FILE_HEADER="PK",u.CENTRAL_FILE_HEADER="PK",u.CENTRAL_DIRECTORY_END="PK",u.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",u.ZIP64_CENTRAL_DIRECTORY_END="PK",u.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(i,o,u){var s=i("./GenericWorker"),c=i("../utils");function f(m){s.call(this,"ConvertWorker to "+m),this.destType=m}c.inherits(f,s),f.prototype.processChunk=function(m){this.push({data:c.transformTo(this.destType,m.data),meta:m.meta})},o.exports=f},{"../utils":32,"./GenericWorker":28}],25:[function(i,o,u){var s=i("./GenericWorker"),c=i("../crc32");function f(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}i("../utils").inherits(f,s),f.prototype.processChunk=function(m){this.streamInfo.crc32=c(m.data,this.streamInfo.crc32||0),this.push(m)},o.exports=f},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(i,o,u){var s=i("../utils"),c=i("./GenericWorker");function f(m){c.call(this,"DataLengthProbe for "+m),this.propName=m,this.withStreamInfo(m,0)}s.inherits(f,c),f.prototype.processChunk=function(m){if(m){var h=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=h+m.data.length}c.prototype.processChunk.call(this,m)},o.exports=f},{"../utils":32,"./GenericWorker":28}],27:[function(i,o,u){var s=i("../utils"),c=i("./GenericWorker");function f(m){c.call(this,"DataWorker");var h=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,m.then(function(g){h.dataIsReady=!0,h.data=g,h.max=g&&g.length||0,h.type=s.getTypeOf(g),h.isPaused||h._tickAndRepeat()},function(g){h.error(g)})}s.inherits(f,c),f.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this.data=null},f.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},f.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},f.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var m=null,h=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":m=this.data.substring(this.index,h);break;case"uint8array":m=this.data.subarray(this.index,h);break;case"array":case"nodebuffer":m=this.data.slice(this.index,h)}return this.index=h,this.push({data:m,meta:{percent:this.max?this.index/this.max*100:0}})},o.exports=f},{"../utils":32,"./GenericWorker":28}],28:[function(i,o,u){function s(c){this.name=c||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(c){this.emit("data",c)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(c){this.emit("error",c)}return!0},error:function(c){return!this.isFinished&&(this.isPaused?this.generatedError=c:(this.isFinished=!0,this.emit("error",c),this.previous&&this.previous.error(c),this.cleanUp()),!0)},on:function(c,f){return this._listeners[c].push(f),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(c,f){if(this._listeners[c])for(var m=0;m<this._listeners[c].length;m++)this._listeners[c][m].call(this,f)},pipe:function(c){return c.registerPrevious(this)},registerPrevious:function(c){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=c.streamInfo,this.mergeStreamInfo(),this.previous=c;var f=this;return c.on("data",function(m){f.processChunk(m)}),c.on("end",function(){f.end()}),c.on("error",function(m){f.error(m)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var c=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),c=!0),this.previous&&this.previous.resume(),!c},flush:function(){},processChunk:function(c){this.push(c)},withStreamInfo:function(c,f){return this.extraStreamInfo[c]=f,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var c in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,c)&&(this.streamInfo[c]=this.extraStreamInfo[c])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var c="Worker "+this.name;return this.previous?this.previous+" -> "+c:c}},o.exports=s},{}],29:[function(i,o,u){var s=i("../utils"),c=i("./ConvertWorker"),f=i("./GenericWorker"),m=i("../base64"),h=i("../support"),g=i("../external"),y=null;if(h.nodestream)try{y=i("../nodejs/NodejsStreamOutputAdapter")}catch{}function v(w,E){return new g.Promise(function(T,_){var A=[],k=w._internalType,q=w._outputType,H=w._mimeType;w.on("data",function(M,I){A.push(M),E&&E(I)}).on("error",function(M){A=[],_(M)}).on("end",function(){try{var M=(function(I,Y,F){switch(I){case"blob":return s.newBlob(s.transformTo("arraybuffer",Y),F);case"base64":return m.encode(Y);default:return s.transformTo(I,Y)}})(q,(function(I,Y){var F,$=0,ie=null,D=0;for(F=0;F<Y.length;F++)D+=Y[F].length;switch(I){case"string":return Y.join("");case"array":return Array.prototype.concat.apply([],Y);case"uint8array":for(ie=new Uint8Array(D),F=0;F<Y.length;F++)ie.set(Y[F],$),$+=Y[F].length;return ie;case"nodebuffer":return Buffer.concat(Y);default:throw new Error("concat : unsupported type '"+I+"'")}})(k,A),H);T(M)}catch(I){_(I)}A=[]}).resume()})}function b(w,E,T){var _=E;switch(E){case"blob":case"arraybuffer":_="uint8array";break;case"base64":_="string"}try{this._internalType=_,this._outputType=E,this._mimeType=T,s.checkSupport(_),this._worker=w.pipe(new c(_)),w.lock()}catch(A){this._worker=new f("error"),this._worker.error(A)}}b.prototype={accumulate:function(w){return v(this,w)},on:function(w,E){var T=this;return w==="data"?this._worker.on(w,function(_){E.call(T,_.data,_.meta)}):this._worker.on(w,function(){s.delay(E,arguments,T)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(w){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new y(this,{objectMode:this._outputType!=="nodebuffer"},w)}},o.exports=b},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(i,o,u){if(u.base64=!0,u.array=!0,u.string=!0,u.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",u.nodebuffer=typeof Buffer<"u",u.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")u.blob=!1;else{var s=new ArrayBuffer(0);try{u.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var c=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);c.append(s),u.blob=c.getBlob("application/zip").size===0}catch{u.blob=!1}}}try{u.nodestream=!!i("readable-stream").Readable}catch{u.nodestream=!1}},{"readable-stream":16}],31:[function(i,o,u){for(var s=i("./utils"),c=i("./support"),f=i("./nodejsUtils"),m=i("./stream/GenericWorker"),h=new Array(256),g=0;g<256;g++)h[g]=252<=g?6:248<=g?5:240<=g?4:224<=g?3:192<=g?2:1;h[254]=h[254]=1;function y(){m.call(this,"utf-8 decode"),this.leftOver=null}function v(){m.call(this,"utf-8 encode")}u.utf8encode=function(b){return c.nodebuffer?f.newBufferFrom(b,"utf-8"):(function(w){var E,T,_,A,k,q=w.length,H=0;for(A=0;A<q;A++)(64512&(T=w.charCodeAt(A)))==55296&&A+1<q&&(64512&(_=w.charCodeAt(A+1)))==56320&&(T=65536+(T-55296<<10)+(_-56320),A++),H+=T<128?1:T<2048?2:T<65536?3:4;for(E=c.uint8array?new Uint8Array(H):new Array(H),A=k=0;k<H;A++)(64512&(T=w.charCodeAt(A)))==55296&&A+1<q&&(64512&(_=w.charCodeAt(A+1)))==56320&&(T=65536+(T-55296<<10)+(_-56320),A++),T<128?E[k++]=T:(T<2048?E[k++]=192|T>>>6:(T<65536?E[k++]=224|T>>>12:(E[k++]=240|T>>>18,E[k++]=128|T>>>12&63),E[k++]=128|T>>>6&63),E[k++]=128|63&T);return E})(b)},u.utf8decode=function(b){return c.nodebuffer?s.transformTo("nodebuffer",b).toString("utf-8"):(function(w){var E,T,_,A,k=w.length,q=new Array(2*k);for(E=T=0;E<k;)if((_=w[E++])<128)q[T++]=_;else if(4<(A=h[_]))q[T++]=65533,E+=A-1;else{for(_&=A===2?31:A===3?15:7;1<A&&E<k;)_=_<<6|63&w[E++],A--;1<A?q[T++]=65533:_<65536?q[T++]=_:(_-=65536,q[T++]=55296|_>>10&1023,q[T++]=56320|1023&_)}return q.length!==T&&(q.subarray?q=q.subarray(0,T):q.length=T),s.applyFromCharCode(q)})(b=s.transformTo(c.uint8array?"uint8array":"array",b))},s.inherits(y,m),y.prototype.processChunk=function(b){var w=s.transformTo(c.uint8array?"uint8array":"array",b.data);if(this.leftOver&&this.leftOver.length){if(c.uint8array){var E=w;(w=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),w.set(E,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var T=(function(A,k){var q;for((k=k||A.length)>A.length&&(k=A.length),q=k-1;0<=q&&(192&A[q])==128;)q--;return q<0||q===0?k:q+h[A[q]]>k?q:k})(w),_=w;T!==w.length&&(c.uint8array?(_=w.subarray(0,T),this.leftOver=w.subarray(T,w.length)):(_=w.slice(0,T),this.leftOver=w.slice(T,w.length))),this.push({data:u.utf8decode(_),meta:b.meta})},y.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:u.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},u.Utf8DecodeWorker=y,s.inherits(v,m),v.prototype.processChunk=function(b){this.push({data:u.utf8encode(b.data),meta:b.meta})},u.Utf8EncodeWorker=v},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(i,o,u){var s=i("./support"),c=i("./base64"),f=i("./nodejsUtils"),m=i("./external");function h(E){return E}function g(E,T){for(var _=0;_<E.length;++_)T[_]=255&E.charCodeAt(_);return T}i("setimmediate"),u.newBlob=function(E,T){u.checkSupport("blob");try{return new Blob([E],{type:T})}catch{try{var _=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return _.append(E),_.getBlob(T)}catch{throw new Error("Bug : can't construct the Blob.")}}};var y={stringifyByChunk:function(E,T,_){var A=[],k=0,q=E.length;if(q<=_)return String.fromCharCode.apply(null,E);for(;k<q;)T==="array"||T==="nodebuffer"?A.push(String.fromCharCode.apply(null,E.slice(k,Math.min(k+_,q)))):A.push(String.fromCharCode.apply(null,E.subarray(k,Math.min(k+_,q)))),k+=_;return A.join("")},stringifyByChar:function(E){for(var T="",_=0;_<E.length;_++)T+=String.fromCharCode(E[_]);return T},applyCanBeUsed:{uint8array:(function(){try{return s.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return s.nodebuffer&&String.fromCharCode.apply(null,f.allocBuffer(1)).length===1}catch{return!1}})()}};function v(E){var T=65536,_=u.getTypeOf(E),A=!0;if(_==="uint8array"?A=y.applyCanBeUsed.uint8array:_==="nodebuffer"&&(A=y.applyCanBeUsed.nodebuffer),A)for(;1<T;)try{return y.stringifyByChunk(E,_,T)}catch{T=Math.floor(T/2)}return y.stringifyByChar(E)}function b(E,T){for(var _=0;_<E.length;_++)T[_]=E[_];return T}u.applyFromCharCode=v;var w={};w.string={string:h,array:function(E){return g(E,new Array(E.length))},arraybuffer:function(E){return w.string.uint8array(E).buffer},uint8array:function(E){return g(E,new Uint8Array(E.length))},nodebuffer:function(E){return g(E,f.allocBuffer(E.length))}},w.array={string:v,array:h,arraybuffer:function(E){return new Uint8Array(E).buffer},uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return f.newBufferFrom(E)}},w.arraybuffer={string:function(E){return v(new Uint8Array(E))},array:function(E){return b(new Uint8Array(E),new Array(E.byteLength))},arraybuffer:h,uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return f.newBufferFrom(new Uint8Array(E))}},w.uint8array={string:v,array:function(E){return b(E,new Array(E.length))},arraybuffer:function(E){return E.buffer},uint8array:h,nodebuffer:function(E){return f.newBufferFrom(E)}},w.nodebuffer={string:v,array:function(E){return b(E,new Array(E.length))},arraybuffer:function(E){return w.nodebuffer.uint8array(E).buffer},uint8array:function(E){return b(E,new Uint8Array(E.length))},nodebuffer:h},u.transformTo=function(E,T){if(T=T||"",!E)return T;u.checkSupport(E);var _=u.getTypeOf(T);return w[_][E](T)},u.resolve=function(E){for(var T=E.split("/"),_=[],A=0;A<T.length;A++){var k=T[A];k==="."||k===""&&A!==0&&A!==T.length-1||(k===".."?_.pop():_.push(k))}return _.join("/")},u.getTypeOf=function(E){return typeof E=="string"?"string":Object.prototype.toString.call(E)==="[object Array]"?"array":s.nodebuffer&&f.isBuffer(E)?"nodebuffer":s.uint8array&&E instanceof Uint8Array?"uint8array":s.arraybuffer&&E instanceof ArrayBuffer?"arraybuffer":void 0},u.checkSupport=function(E){if(!s[E.toLowerCase()])throw new Error(E+" is not supported by this platform")},u.MAX_VALUE_16BITS=65535,u.MAX_VALUE_32BITS=-1,u.pretty=function(E){var T,_,A="";for(_=0;_<(E||"").length;_++)A+="\\x"+((T=E.charCodeAt(_))<16?"0":"")+T.toString(16).toUpperCase();return A},u.delay=function(E,T,_){setImmediate(function(){E.apply(_||null,T||[])})},u.inherits=function(E,T){function _(){}_.prototype=T.prototype,E.prototype=new _},u.extend=function(){var E,T,_={};for(E=0;E<arguments.length;E++)for(T in arguments[E])Object.prototype.hasOwnProperty.call(arguments[E],T)&&_[T]===void 0&&(_[T]=arguments[E][T]);return _},u.prepareContent=function(E,T,_,A,k){return m.Promise.resolve(T).then(function(q){return s.blob&&(q instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(q))!==-1)&&typeof FileReader<"u"?new m.Promise(function(H,M){var I=new FileReader;I.onload=function(Y){H(Y.target.result)},I.onerror=function(Y){M(Y.target.error)},I.readAsArrayBuffer(q)}):q}).then(function(q){var H=u.getTypeOf(q);return H?(H==="arraybuffer"?q=u.transformTo("uint8array",q):H==="string"&&(k?q=c.decode(q):_&&A!==!0&&(q=(function(M){return g(M,s.uint8array?new Uint8Array(M.length):new Array(M.length))})(q))),q):m.Promise.reject(new Error("Can't read the data of '"+E+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(i,o,u){var s=i("./reader/readerFor"),c=i("./utils"),f=i("./signature"),m=i("./zipEntry"),h=i("./support");function g(y){this.files=[],this.loadOptions=y}g.prototype={checkSignature:function(y){if(!this.reader.readAndCheckSignature(y)){this.reader.index-=4;var v=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+c.pretty(v)+", expected "+c.pretty(y)+")")}},isSignature:function(y,v){var b=this.reader.index;this.reader.setIndex(y);var w=this.reader.readString(4)===v;return this.reader.setIndex(b),w},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var y=this.reader.readData(this.zipCommentLength),v=h.uint8array?"uint8array":"array",b=c.transformTo(v,y);this.zipComment=this.loadOptions.decodeFileName(b)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var y,v,b,w=this.zip64EndOfCentralSize-44;0<w;)y=this.reader.readInt(2),v=this.reader.readInt(4),b=this.reader.readData(v),this.zip64ExtensibleData[y]={id:y,length:v,value:b}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var y,v;for(y=0;y<this.files.length;y++)v=this.files[y],this.reader.setIndex(v.localHeaderOffset),this.checkSignature(f.LOCAL_FILE_HEADER),v.readLocalPart(this.reader),v.handleUTF8(),v.processAttributes()},readCentralDir:function(){var y;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(f.CENTRAL_FILE_HEADER);)(y=new m({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(y);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var y=this.reader.lastIndexOfSignature(f.CENTRAL_DIRECTORY_END);if(y<0)throw this.isSignature(0,f.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(y);var v=y;if(this.checkSignature(f.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===c.MAX_VALUE_16BITS||this.diskWithCentralDirStart===c.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===c.MAX_VALUE_16BITS||this.centralDirRecords===c.MAX_VALUE_16BITS||this.centralDirSize===c.MAX_VALUE_32BITS||this.centralDirOffset===c.MAX_VALUE_32BITS){if(this.zip64=!0,(y=this.reader.lastIndexOfSignature(f.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(y),this.checkSignature(f.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,f.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(f.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(f.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var b=this.centralDirOffset+this.centralDirSize;this.zip64&&(b+=20,b+=12+this.zip64EndOfCentralSize);var w=v-b;if(0<w)this.isSignature(v,f.CENTRAL_FILE_HEADER)||(this.reader.zero=w);else if(w<0)throw new Error("Corrupted zip: missing "+Math.abs(w)+" bytes.")},prepareReader:function(y){this.reader=s(y)},load:function(y){this.prepareReader(y),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},o.exports=g},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(i,o,u){var s=i("./reader/readerFor"),c=i("./utils"),f=i("./compressedObject"),m=i("./crc32"),h=i("./utf8"),g=i("./compressions"),y=i("./support");function v(b,w){this.options=b,this.loadOptions=w}v.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(b){var w,E;if(b.skip(22),this.fileNameLength=b.readInt(2),E=b.readInt(2),this.fileName=b.readData(this.fileNameLength),b.skip(E),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((w=(function(T){for(var _ in g)if(Object.prototype.hasOwnProperty.call(g,_)&&g[_].magic===T)return g[_];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+c.pretty(this.compressionMethod)+" unknown (inner file : "+c.transformTo("string",this.fileName)+")");this.decompressed=new f(this.compressedSize,this.uncompressedSize,this.crc32,w,b.readData(this.compressedSize))},readCentralPart:function(b){this.versionMadeBy=b.readInt(2),b.skip(2),this.bitFlag=b.readInt(2),this.compressionMethod=b.readString(2),this.date=b.readDate(),this.crc32=b.readInt(4),this.compressedSize=b.readInt(4),this.uncompressedSize=b.readInt(4);var w=b.readInt(2);if(this.extraFieldsLength=b.readInt(2),this.fileCommentLength=b.readInt(2),this.diskNumberStart=b.readInt(2),this.internalFileAttributes=b.readInt(2),this.externalFileAttributes=b.readInt(4),this.localHeaderOffset=b.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");b.skip(w),this.readExtraFields(b),this.parseZIP64ExtraField(b),this.fileComment=b.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var b=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),b==0&&(this.dosPermissions=63&this.externalFileAttributes),b==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var b=s(this.extraFields[1].value);this.uncompressedSize===c.MAX_VALUE_32BITS&&(this.uncompressedSize=b.readInt(8)),this.compressedSize===c.MAX_VALUE_32BITS&&(this.compressedSize=b.readInt(8)),this.localHeaderOffset===c.MAX_VALUE_32BITS&&(this.localHeaderOffset=b.readInt(8)),this.diskNumberStart===c.MAX_VALUE_32BITS&&(this.diskNumberStart=b.readInt(4))}},readExtraFields:function(b){var w,E,T,_=b.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});b.index+4<_;)w=b.readInt(2),E=b.readInt(2),T=b.readData(E),this.extraFields[w]={id:w,length:E,value:T};b.setIndex(_)},handleUTF8:function(){var b=y.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=h.utf8decode(this.fileName),this.fileCommentStr=h.utf8decode(this.fileComment);else{var w=this.findExtraFieldUnicodePath();if(w!==null)this.fileNameStr=w;else{var E=c.transformTo(b,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(E)}var T=this.findExtraFieldUnicodeComment();if(T!==null)this.fileCommentStr=T;else{var _=c.transformTo(b,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(_)}}},findExtraFieldUnicodePath:function(){var b=this.extraFields[28789];if(b){var w=s(b.value);return w.readInt(1)!==1||m(this.fileName)!==w.readInt(4)?null:h.utf8decode(w.readData(b.length-5))}return null},findExtraFieldUnicodeComment:function(){var b=this.extraFields[25461];if(b){var w=s(b.value);return w.readInt(1)!==1||m(this.fileComment)!==w.readInt(4)?null:h.utf8decode(w.readData(b.length-5))}return null}},o.exports=v},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(i,o,u){function s(w,E,T){this.name=w,this.dir=T.dir,this.date=T.date,this.comment=T.comment,this.unixPermissions=T.unixPermissions,this.dosPermissions=T.dosPermissions,this._data=E,this._dataBinary=T.binary,this.options={compression:T.compression,compressionOptions:T.compressionOptions}}var c=i("./stream/StreamHelper"),f=i("./stream/DataWorker"),m=i("./utf8"),h=i("./compressedObject"),g=i("./stream/GenericWorker");s.prototype={internalStream:function(w){var E=null,T="string";try{if(!w)throw new Error("No output type specified.");var _=(T=w.toLowerCase())==="string"||T==="text";T!=="binarystring"&&T!=="text"||(T="string"),E=this._decompressWorker();var A=!this._dataBinary;A&&!_&&(E=E.pipe(new m.Utf8EncodeWorker)),!A&&_&&(E=E.pipe(new m.Utf8DecodeWorker))}catch(k){(E=new g("error")).error(k)}return new c(E,T,"")},async:function(w,E){return this.internalStream(w).accumulate(E)},nodeStream:function(w,E){return this.internalStream(w||"nodebuffer").toNodejsStream(E)},_compressWorker:function(w,E){if(this._data instanceof h&&this._data.compression.magic===w.magic)return this._data.getCompressedWorker();var T=this._decompressWorker();return this._dataBinary||(T=T.pipe(new m.Utf8EncodeWorker)),h.createWorkerFrom(T,w,E)},_decompressWorker:function(){return this._data instanceof h?this._data.getContentWorker():this._data instanceof g?this._data:new f(this._data)}};for(var y=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],v=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},b=0;b<y.length;b++)s.prototype[y[b]]=v;o.exports=s},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(i,o,u){(function(s){var c,f,m=s.MutationObserver||s.WebKitMutationObserver;if(m){var h=0,g=new m(w),y=s.document.createTextNode("");g.observe(y,{characterData:!0}),c=function(){y.data=h=++h%2}}else if(s.setImmediate||s.MessageChannel===void 0)c="document"in s&&"onreadystatechange"in s.document.createElement("script")?function(){var E=s.document.createElement("script");E.onreadystatechange=function(){w(),E.onreadystatechange=null,E.parentNode.removeChild(E),E=null},s.document.documentElement.appendChild(E)}:function(){setTimeout(w,0)};else{var v=new s.MessageChannel;v.port1.onmessage=w,c=function(){v.port2.postMessage(0)}}var b=[];function w(){var E,T;f=!0;for(var _=b.length;_;){for(T=b,b=[],E=-1;++E<_;)T[E]();_=b.length}f=!1}o.exports=function(E){b.push(E)!==1||f||c()}}).call(this,typeof Rl<"u"?Rl:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(i,o,u){var s=i("immediate");function c(){}var f={},m=["REJECTED"],h=["FULFILLED"],g=["PENDING"];function y(_){if(typeof _!="function")throw new TypeError("resolver must be a function");this.state=g,this.queue=[],this.outcome=void 0,_!==c&&E(this,_)}function v(_,A,k){this.promise=_,typeof A=="function"&&(this.onFulfilled=A,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function b(_,A,k){s(function(){var q;try{q=A(k)}catch(H){return f.reject(_,H)}q===_?f.reject(_,new TypeError("Cannot resolve promise with itself")):f.resolve(_,q)})}function w(_){var A=_&&_.then;if(_&&(typeof _=="object"||typeof _=="function")&&typeof A=="function")return function(){A.apply(_,arguments)}}function E(_,A){var k=!1;function q(I){k||(k=!0,f.reject(_,I))}function H(I){k||(k=!0,f.resolve(_,I))}var M=T(function(){A(H,q)});M.status==="error"&&q(M.value)}function T(_,A){var k={};try{k.value=_(A),k.status="success"}catch(q){k.status="error",k.value=q}return k}(o.exports=y).prototype.finally=function(_){if(typeof _!="function")return this;var A=this.constructor;return this.then(function(k){return A.resolve(_()).then(function(){return k})},function(k){return A.resolve(_()).then(function(){throw k})})},y.prototype.catch=function(_){return this.then(null,_)},y.prototype.then=function(_,A){if(typeof _!="function"&&this.state===h||typeof A!="function"&&this.state===m)return this;var k=new this.constructor(c);return this.state!==g?b(k,this.state===h?_:A,this.outcome):this.queue.push(new v(k,_,A)),k},v.prototype.callFulfilled=function(_){f.resolve(this.promise,_)},v.prototype.otherCallFulfilled=function(_){b(this.promise,this.onFulfilled,_)},v.prototype.callRejected=function(_){f.reject(this.promise,_)},v.prototype.otherCallRejected=function(_){b(this.promise,this.onRejected,_)},f.resolve=function(_,A){var k=T(w,A);if(k.status==="error")return f.reject(_,k.value);var q=k.value;if(q)E(_,q);else{_.state=h,_.outcome=A;for(var H=-1,M=_.queue.length;++H<M;)_.queue[H].callFulfilled(A)}return _},f.reject=function(_,A){_.state=m,_.outcome=A;for(var k=-1,q=_.queue.length;++k<q;)_.queue[k].callRejected(A);return _},y.resolve=function(_){return _ instanceof this?_:f.resolve(new this(c),_)},y.reject=function(_){var A=new this(c);return f.reject(A,_)},y.all=function(_){var A=this;if(Object.prototype.toString.call(_)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=_.length,q=!1;if(!k)return this.resolve([]);for(var H=new Array(k),M=0,I=-1,Y=new this(c);++I<k;)F(_[I],I);return Y;function F($,ie){A.resolve($).then(function(D){H[ie]=D,++M!==k||q||(q=!0,f.resolve(Y,H))},function(D){q||(q=!0,f.reject(Y,D))})}},y.race=function(_){var A=this;if(Object.prototype.toString.call(_)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=_.length,q=!1;if(!k)return this.resolve([]);for(var H=-1,M=new this(c);++H<k;)I=_[H],A.resolve(I).then(function(Y){q||(q=!0,f.resolve(M,Y))},function(Y){q||(q=!0,f.reject(M,Y))});var I;return M}},{immediate:36}],38:[function(i,o,u){var s={};(0,i("./lib/utils/common").assign)(s,i("./lib/deflate"),i("./lib/inflate"),i("./lib/zlib/constants")),o.exports=s},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(i,o,u){var s=i("./zlib/deflate"),c=i("./utils/common"),f=i("./utils/strings"),m=i("./zlib/messages"),h=i("./zlib/zstream"),g=Object.prototype.toString,y=0,v=-1,b=0,w=8;function E(_){if(!(this instanceof E))return new E(_);this.options=c.assign({level:v,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:b,to:""},_||{});var A=this.options;A.raw&&0<A.windowBits?A.windowBits=-A.windowBits:A.gzip&&0<A.windowBits&&A.windowBits<16&&(A.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var k=s.deflateInit2(this.strm,A.level,A.method,A.windowBits,A.memLevel,A.strategy);if(k!==y)throw new Error(m[k]);if(A.header&&s.deflateSetHeader(this.strm,A.header),A.dictionary){var q;if(q=typeof A.dictionary=="string"?f.string2buf(A.dictionary):g.call(A.dictionary)==="[object ArrayBuffer]"?new Uint8Array(A.dictionary):A.dictionary,(k=s.deflateSetDictionary(this.strm,q))!==y)throw new Error(m[k]);this._dict_set=!0}}function T(_,A){var k=new E(A);if(k.push(_,!0),k.err)throw k.msg||m[k.err];return k.result}E.prototype.push=function(_,A){var k,q,H=this.strm,M=this.options.chunkSize;if(this.ended)return!1;q=A===~~A?A:A===!0?4:0,typeof _=="string"?H.input=f.string2buf(_):g.call(_)==="[object ArrayBuffer]"?H.input=new Uint8Array(_):H.input=_,H.next_in=0,H.avail_in=H.input.length;do{if(H.avail_out===0&&(H.output=new c.Buf8(M),H.next_out=0,H.avail_out=M),(k=s.deflate(H,q))!==1&&k!==y)return this.onEnd(k),!(this.ended=!0);H.avail_out!==0&&(H.avail_in!==0||q!==4&&q!==2)||(this.options.to==="string"?this.onData(f.buf2binstring(c.shrinkBuf(H.output,H.next_out))):this.onData(c.shrinkBuf(H.output,H.next_out)))}while((0<H.avail_in||H.avail_out===0)&&k!==1);return q===4?(k=s.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===y):q!==2||(this.onEnd(y),!(H.avail_out=0))},E.prototype.onData=function(_){this.chunks.push(_)},E.prototype.onEnd=function(_){_===y&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=_,this.msg=this.strm.msg},u.Deflate=E,u.deflate=T,u.deflateRaw=function(_,A){return(A=A||{}).raw=!0,T(_,A)},u.gzip=function(_,A){return(A=A||{}).gzip=!0,T(_,A)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(i,o,u){var s=i("./zlib/inflate"),c=i("./utils/common"),f=i("./utils/strings"),m=i("./zlib/constants"),h=i("./zlib/messages"),g=i("./zlib/zstream"),y=i("./zlib/gzheader"),v=Object.prototype.toString;function b(E){if(!(this instanceof b))return new b(E);this.options=c.assign({chunkSize:16384,windowBits:0,to:""},E||{});var T=this.options;T.raw&&0<=T.windowBits&&T.windowBits<16&&(T.windowBits=-T.windowBits,T.windowBits===0&&(T.windowBits=-15)),!(0<=T.windowBits&&T.windowBits<16)||E&&E.windowBits||(T.windowBits+=32),15<T.windowBits&&T.windowBits<48&&(15&T.windowBits)==0&&(T.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new g,this.strm.avail_out=0;var _=s.inflateInit2(this.strm,T.windowBits);if(_!==m.Z_OK)throw new Error(h[_]);this.header=new y,s.inflateGetHeader(this.strm,this.header)}function w(E,T){var _=new b(T);if(_.push(E,!0),_.err)throw _.msg||h[_.err];return _.result}b.prototype.push=function(E,T){var _,A,k,q,H,M,I=this.strm,Y=this.options.chunkSize,F=this.options.dictionary,$=!1;if(this.ended)return!1;A=T===~~T?T:T===!0?m.Z_FINISH:m.Z_NO_FLUSH,typeof E=="string"?I.input=f.binstring2buf(E):v.call(E)==="[object ArrayBuffer]"?I.input=new Uint8Array(E):I.input=E,I.next_in=0,I.avail_in=I.input.length;do{if(I.avail_out===0&&(I.output=new c.Buf8(Y),I.next_out=0,I.avail_out=Y),(_=s.inflate(I,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&F&&(M=typeof F=="string"?f.string2buf(F):v.call(F)==="[object ArrayBuffer]"?new Uint8Array(F):F,_=s.inflateSetDictionary(this.strm,M)),_===m.Z_BUF_ERROR&&$===!0&&(_=m.Z_OK,$=!1),_!==m.Z_STREAM_END&&_!==m.Z_OK)return this.onEnd(_),!(this.ended=!0);I.next_out&&(I.avail_out!==0&&_!==m.Z_STREAM_END&&(I.avail_in!==0||A!==m.Z_FINISH&&A!==m.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=f.utf8border(I.output,I.next_out),q=I.next_out-k,H=f.buf2string(I.output,k),I.next_out=q,I.avail_out=Y-q,q&&c.arraySet(I.output,I.output,k,q,0),this.onData(H)):this.onData(c.shrinkBuf(I.output,I.next_out)))),I.avail_in===0&&I.avail_out===0&&($=!0)}while((0<I.avail_in||I.avail_out===0)&&_!==m.Z_STREAM_END);return _===m.Z_STREAM_END&&(A=m.Z_FINISH),A===m.Z_FINISH?(_=s.inflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===m.Z_OK):A!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),!(I.avail_out=0))},b.prototype.onData=function(E){this.chunks.push(E)},b.prototype.onEnd=function(E){E===m.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=E,this.msg=this.strm.msg},u.Inflate=b,u.inflate=w,u.inflateRaw=function(E,T){return(T=T||{}).raw=!0,w(E,T)},u.ungzip=w},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(i,o,u){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";u.assign=function(m){for(var h=Array.prototype.slice.call(arguments,1);h.length;){var g=h.shift();if(g){if(typeof g!="object")throw new TypeError(g+"must be non-object");for(var y in g)g.hasOwnProperty(y)&&(m[y]=g[y])}}return m},u.shrinkBuf=function(m,h){return m.length===h?m:m.subarray?m.subarray(0,h):(m.length=h,m)};var c={arraySet:function(m,h,g,y,v){if(h.subarray&&m.subarray)m.set(h.subarray(g,g+y),v);else for(var b=0;b<y;b++)m[v+b]=h[g+b]},flattenChunks:function(m){var h,g,y,v,b,w;for(h=y=0,g=m.length;h<g;h++)y+=m[h].length;for(w=new Uint8Array(y),h=v=0,g=m.length;h<g;h++)b=m[h],w.set(b,v),v+=b.length;return w}},f={arraySet:function(m,h,g,y,v){for(var b=0;b<y;b++)m[v+b]=h[g+b]},flattenChunks:function(m){return[].concat.apply([],m)}};u.setTyped=function(m){m?(u.Buf8=Uint8Array,u.Buf16=Uint16Array,u.Buf32=Int32Array,u.assign(u,c)):(u.Buf8=Array,u.Buf16=Array,u.Buf32=Array,u.assign(u,f))},u.setTyped(s)},{}],42:[function(i,o,u){var s=i("./common"),c=!0,f=!0;try{String.fromCharCode.apply(null,[0])}catch{c=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{f=!1}for(var m=new s.Buf8(256),h=0;h<256;h++)m[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;function g(y,v){if(v<65537&&(y.subarray&&f||!y.subarray&&c))return String.fromCharCode.apply(null,s.shrinkBuf(y,v));for(var b="",w=0;w<v;w++)b+=String.fromCharCode(y[w]);return b}m[254]=m[254]=1,u.string2buf=function(y){var v,b,w,E,T,_=y.length,A=0;for(E=0;E<_;E++)(64512&(b=y.charCodeAt(E)))==55296&&E+1<_&&(64512&(w=y.charCodeAt(E+1)))==56320&&(b=65536+(b-55296<<10)+(w-56320),E++),A+=b<128?1:b<2048?2:b<65536?3:4;for(v=new s.Buf8(A),E=T=0;T<A;E++)(64512&(b=y.charCodeAt(E)))==55296&&E+1<_&&(64512&(w=y.charCodeAt(E+1)))==56320&&(b=65536+(b-55296<<10)+(w-56320),E++),b<128?v[T++]=b:(b<2048?v[T++]=192|b>>>6:(b<65536?v[T++]=224|b>>>12:(v[T++]=240|b>>>18,v[T++]=128|b>>>12&63),v[T++]=128|b>>>6&63),v[T++]=128|63&b);return v},u.buf2binstring=function(y){return g(y,y.length)},u.binstring2buf=function(y){for(var v=new s.Buf8(y.length),b=0,w=v.length;b<w;b++)v[b]=y.charCodeAt(b);return v},u.buf2string=function(y,v){var b,w,E,T,_=v||y.length,A=new Array(2*_);for(b=w=0;b<_;)if((E=y[b++])<128)A[w++]=E;else if(4<(T=m[E]))A[w++]=65533,b+=T-1;else{for(E&=T===2?31:T===3?15:7;1<T&&b<_;)E=E<<6|63&y[b++],T--;1<T?A[w++]=65533:E<65536?A[w++]=E:(E-=65536,A[w++]=55296|E>>10&1023,A[w++]=56320|1023&E)}return g(A,w)},u.utf8border=function(y,v){var b;for((v=v||y.length)>y.length&&(v=y.length),b=v-1;0<=b&&(192&y[b])==128;)b--;return b<0||b===0?v:b+m[y[b]]>v?b:v}},{"./common":41}],43:[function(i,o,u){o.exports=function(s,c,f,m){for(var h=65535&s|0,g=s>>>16&65535|0,y=0;f!==0;){for(f-=y=2e3<f?2e3:f;g=g+(h=h+c[m++]|0)|0,--y;);h%=65521,g%=65521}return h|g<<16|0}},{}],44:[function(i,o,u){o.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(i,o,u){var s=(function(){for(var c,f=[],m=0;m<256;m++){c=m;for(var h=0;h<8;h++)c=1&c?3988292384^c>>>1:c>>>1;f[m]=c}return f})();o.exports=function(c,f,m,h){var g=s,y=h+m;c^=-1;for(var v=h;v<y;v++)c=c>>>8^g[255&(c^f[v])];return-1^c}},{}],46:[function(i,o,u){var s,c=i("../utils/common"),f=i("./trees"),m=i("./adler32"),h=i("./crc32"),g=i("./messages"),y=0,v=4,b=0,w=-2,E=-1,T=4,_=2,A=8,k=9,q=286,H=30,M=19,I=2*q+1,Y=15,F=3,$=258,ie=$+F+1,D=42,ne=113,C=1,V=2,Z=3,Q=4;function se(S,K){return S.msg=g[K],K}function de(S){return(S<<1)-(4<S?9:0)}function L(S){for(var K=S.length;0<=--K;)S[K]=0}function N(S){var K=S.state,W=K.pending;W>S.avail_out&&(W=S.avail_out),W!==0&&(c.arraySet(S.output,K.pending_buf,K.pending_out,W,S.next_out),S.next_out+=W,K.pending_out+=W,S.total_out+=W,S.avail_out-=W,K.pending-=W,K.pending===0&&(K.pending_out=0))}function B(S,K){f._tr_flush_block(S,0<=S.block_start?S.block_start:-1,S.strstart-S.block_start,K),S.block_start=S.strstart,N(S.strm)}function z(S,K){S.pending_buf[S.pending++]=K}function re(S,K){S.pending_buf[S.pending++]=K>>>8&255,S.pending_buf[S.pending++]=255&K}function ce(S,K){var W,U,j=S.max_chain_length,X=S.strstart,he=S.prev_length,pe=S.nice_match,le=S.strstart>S.w_size-ie?S.strstart-(S.w_size-ie):0,Ee=S.window,_e=S.w_mask,Se=S.prev,te=S.strstart+$,be=Ee[X+he-1],Ce=Ee[X+he];S.prev_length>=S.good_match&&(j>>=2),pe>S.lookahead&&(pe=S.lookahead);do if(Ee[(W=K)+he]===Ce&&Ee[W+he-1]===be&&Ee[W]===Ee[X]&&Ee[++W]===Ee[X+1]){X+=2,W++;do;while(Ee[++X]===Ee[++W]&&Ee[++X]===Ee[++W]&&Ee[++X]===Ee[++W]&&Ee[++X]===Ee[++W]&&Ee[++X]===Ee[++W]&&Ee[++X]===Ee[++W]&&Ee[++X]===Ee[++W]&&Ee[++X]===Ee[++W]&&X<te);if(U=$-(te-X),X=te-$,he<U){if(S.match_start=K,pe<=(he=U))break;be=Ee[X+he-1],Ce=Ee[X+he]}}while((K=Se[K&_e])>le&&--j!=0);return he<=S.lookahead?he:S.lookahead}function we(S){var K,W,U,j,X,he,pe,le,Ee,_e,Se=S.w_size;do{if(j=S.window_size-S.lookahead-S.strstart,S.strstart>=Se+(Se-ie)){for(c.arraySet(S.window,S.window,Se,Se,0),S.match_start-=Se,S.strstart-=Se,S.block_start-=Se,K=W=S.hash_size;U=S.head[--K],S.head[K]=Se<=U?U-Se:0,--W;);for(K=W=Se;U=S.prev[--K],S.prev[K]=Se<=U?U-Se:0,--W;);j+=Se}if(S.strm.avail_in===0)break;if(he=S.strm,pe=S.window,le=S.strstart+S.lookahead,Ee=j,_e=void 0,_e=he.avail_in,Ee<_e&&(_e=Ee),W=_e===0?0:(he.avail_in-=_e,c.arraySet(pe,he.input,he.next_in,_e,le),he.state.wrap===1?he.adler=m(he.adler,pe,_e,le):he.state.wrap===2&&(he.adler=h(he.adler,pe,_e,le)),he.next_in+=_e,he.total_in+=_e,_e),S.lookahead+=W,S.lookahead+S.insert>=F)for(X=S.strstart-S.insert,S.ins_h=S.window[X],S.ins_h=(S.ins_h<<S.hash_shift^S.window[X+1])&S.hash_mask;S.insert&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[X+F-1])&S.hash_mask,S.prev[X&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=X,X++,S.insert--,!(S.lookahead+S.insert<F)););}while(S.lookahead<ie&&S.strm.avail_in!==0)}function Te(S,K){for(var W,U;;){if(S.lookahead<ie){if(we(S),S.lookahead<ie&&K===y)return C;if(S.lookahead===0)break}if(W=0,S.lookahead>=F&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+F-1])&S.hash_mask,W=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart),W!==0&&S.strstart-W<=S.w_size-ie&&(S.match_length=ce(S,W)),S.match_length>=F)if(U=f._tr_tally(S,S.strstart-S.match_start,S.match_length-F),S.lookahead-=S.match_length,S.match_length<=S.max_lazy_match&&S.lookahead>=F){for(S.match_length--;S.strstart++,S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+F-1])&S.hash_mask,W=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart,--S.match_length!=0;);S.strstart++}else S.strstart+=S.match_length,S.match_length=0,S.ins_h=S.window[S.strstart],S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+1])&S.hash_mask;else U=f._tr_tally(S,0,S.window[S.strstart]),S.lookahead--,S.strstart++;if(U&&(B(S,!1),S.strm.avail_out===0))return C}return S.insert=S.strstart<F-1?S.strstart:F-1,K===v?(B(S,!0),S.strm.avail_out===0?Z:Q):S.last_lit&&(B(S,!1),S.strm.avail_out===0)?C:V}function ke(S,K){for(var W,U,j;;){if(S.lookahead<ie){if(we(S),S.lookahead<ie&&K===y)return C;if(S.lookahead===0)break}if(W=0,S.lookahead>=F&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+F-1])&S.hash_mask,W=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart),S.prev_length=S.match_length,S.prev_match=S.match_start,S.match_length=F-1,W!==0&&S.prev_length<S.max_lazy_match&&S.strstart-W<=S.w_size-ie&&(S.match_length=ce(S,W),S.match_length<=5&&(S.strategy===1||S.match_length===F&&4096<S.strstart-S.match_start)&&(S.match_length=F-1)),S.prev_length>=F&&S.match_length<=S.prev_length){for(j=S.strstart+S.lookahead-F,U=f._tr_tally(S,S.strstart-1-S.prev_match,S.prev_length-F),S.lookahead-=S.prev_length-1,S.prev_length-=2;++S.strstart<=j&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+F-1])&S.hash_mask,W=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart),--S.prev_length!=0;);if(S.match_available=0,S.match_length=F-1,S.strstart++,U&&(B(S,!1),S.strm.avail_out===0))return C}else if(S.match_available){if((U=f._tr_tally(S,0,S.window[S.strstart-1]))&&B(S,!1),S.strstart++,S.lookahead--,S.strm.avail_out===0)return C}else S.match_available=1,S.strstart++,S.lookahead--}return S.match_available&&(U=f._tr_tally(S,0,S.window[S.strstart-1]),S.match_available=0),S.insert=S.strstart<F-1?S.strstart:F-1,K===v?(B(S,!0),S.strm.avail_out===0?Z:Q):S.last_lit&&(B(S,!1),S.strm.avail_out===0)?C:V}function Ae(S,K,W,U,j){this.good_length=S,this.max_lazy=K,this.nice_length=W,this.max_chain=U,this.func=j}function He(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=A,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new c.Buf16(2*I),this.dyn_dtree=new c.Buf16(2*(2*H+1)),this.bl_tree=new c.Buf16(2*(2*M+1)),L(this.dyn_ltree),L(this.dyn_dtree),L(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new c.Buf16(Y+1),this.heap=new c.Buf16(2*q+1),L(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new c.Buf16(2*q+1),L(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ve(S){var K;return S&&S.state?(S.total_in=S.total_out=0,S.data_type=_,(K=S.state).pending=0,K.pending_out=0,K.wrap<0&&(K.wrap=-K.wrap),K.status=K.wrap?D:ne,S.adler=K.wrap===2?0:1,K.last_flush=y,f._tr_init(K),b):se(S,w)}function ze(S){var K=ve(S);return K===b&&(function(W){W.window_size=2*W.w_size,L(W.head),W.max_lazy_match=s[W.level].max_lazy,W.good_match=s[W.level].good_length,W.nice_match=s[W.level].nice_length,W.max_chain_length=s[W.level].max_chain,W.strstart=0,W.block_start=0,W.lookahead=0,W.insert=0,W.match_length=W.prev_length=F-1,W.match_available=0,W.ins_h=0})(S.state),K}function je(S,K,W,U,j,X){if(!S)return w;var he=1;if(K===E&&(K=6),U<0?(he=0,U=-U):15<U&&(he=2,U-=16),j<1||k<j||W!==A||U<8||15<U||K<0||9<K||X<0||T<X)return se(S,w);U===8&&(U=9);var pe=new He;return(S.state=pe).strm=S,pe.wrap=he,pe.gzhead=null,pe.w_bits=U,pe.w_size=1<<pe.w_bits,pe.w_mask=pe.w_size-1,pe.hash_bits=j+7,pe.hash_size=1<<pe.hash_bits,pe.hash_mask=pe.hash_size-1,pe.hash_shift=~~((pe.hash_bits+F-1)/F),pe.window=new c.Buf8(2*pe.w_size),pe.head=new c.Buf16(pe.hash_size),pe.prev=new c.Buf16(pe.w_size),pe.lit_bufsize=1<<j+6,pe.pending_buf_size=4*pe.lit_bufsize,pe.pending_buf=new c.Buf8(pe.pending_buf_size),pe.d_buf=1*pe.lit_bufsize,pe.l_buf=3*pe.lit_bufsize,pe.level=K,pe.strategy=X,pe.method=W,ze(S)}s=[new Ae(0,0,0,0,function(S,K){var W=65535;for(W>S.pending_buf_size-5&&(W=S.pending_buf_size-5);;){if(S.lookahead<=1){if(we(S),S.lookahead===0&&K===y)return C;if(S.lookahead===0)break}S.strstart+=S.lookahead,S.lookahead=0;var U=S.block_start+W;if((S.strstart===0||S.strstart>=U)&&(S.lookahead=S.strstart-U,S.strstart=U,B(S,!1),S.strm.avail_out===0)||S.strstart-S.block_start>=S.w_size-ie&&(B(S,!1),S.strm.avail_out===0))return C}return S.insert=0,K===v?(B(S,!0),S.strm.avail_out===0?Z:Q):(S.strstart>S.block_start&&(B(S,!1),S.strm.avail_out),C)}),new Ae(4,4,8,4,Te),new Ae(4,5,16,8,Te),new Ae(4,6,32,32,Te),new Ae(4,4,16,16,ke),new Ae(8,16,32,32,ke),new Ae(8,16,128,128,ke),new Ae(8,32,128,256,ke),new Ae(32,128,258,1024,ke),new Ae(32,258,258,4096,ke)],u.deflateInit=function(S,K){return je(S,K,A,15,8,0)},u.deflateInit2=je,u.deflateReset=ze,u.deflateResetKeep=ve,u.deflateSetHeader=function(S,K){return S&&S.state?S.state.wrap!==2?w:(S.state.gzhead=K,b):w},u.deflate=function(S,K){var W,U,j,X;if(!S||!S.state||5<K||K<0)return S?se(S,w):w;if(U=S.state,!S.output||!S.input&&S.avail_in!==0||U.status===666&&K!==v)return se(S,S.avail_out===0?-5:w);if(U.strm=S,W=U.last_flush,U.last_flush=K,U.status===D)if(U.wrap===2)S.adler=0,z(U,31),z(U,139),z(U,8),U.gzhead?(z(U,(U.gzhead.text?1:0)+(U.gzhead.hcrc?2:0)+(U.gzhead.extra?4:0)+(U.gzhead.name?8:0)+(U.gzhead.comment?16:0)),z(U,255&U.gzhead.time),z(U,U.gzhead.time>>8&255),z(U,U.gzhead.time>>16&255),z(U,U.gzhead.time>>24&255),z(U,U.level===9?2:2<=U.strategy||U.level<2?4:0),z(U,255&U.gzhead.os),U.gzhead.extra&&U.gzhead.extra.length&&(z(U,255&U.gzhead.extra.length),z(U,U.gzhead.extra.length>>8&255)),U.gzhead.hcrc&&(S.adler=h(S.adler,U.pending_buf,U.pending,0)),U.gzindex=0,U.status=69):(z(U,0),z(U,0),z(U,0),z(U,0),z(U,0),z(U,U.level===9?2:2<=U.strategy||U.level<2?4:0),z(U,3),U.status=ne);else{var he=A+(U.w_bits-8<<4)<<8;he|=(2<=U.strategy||U.level<2?0:U.level<6?1:U.level===6?2:3)<<6,U.strstart!==0&&(he|=32),he+=31-he%31,U.status=ne,re(U,he),U.strstart!==0&&(re(U,S.adler>>>16),re(U,65535&S.adler)),S.adler=1}if(U.status===69)if(U.gzhead.extra){for(j=U.pending;U.gzindex<(65535&U.gzhead.extra.length)&&(U.pending!==U.pending_buf_size||(U.gzhead.hcrc&&U.pending>j&&(S.adler=h(S.adler,U.pending_buf,U.pending-j,j)),N(S),j=U.pending,U.pending!==U.pending_buf_size));)z(U,255&U.gzhead.extra[U.gzindex]),U.gzindex++;U.gzhead.hcrc&&U.pending>j&&(S.adler=h(S.adler,U.pending_buf,U.pending-j,j)),U.gzindex===U.gzhead.extra.length&&(U.gzindex=0,U.status=73)}else U.status=73;if(U.status===73)if(U.gzhead.name){j=U.pending;do{if(U.pending===U.pending_buf_size&&(U.gzhead.hcrc&&U.pending>j&&(S.adler=h(S.adler,U.pending_buf,U.pending-j,j)),N(S),j=U.pending,U.pending===U.pending_buf_size)){X=1;break}X=U.gzindex<U.gzhead.name.length?255&U.gzhead.name.charCodeAt(U.gzindex++):0,z(U,X)}while(X!==0);U.gzhead.hcrc&&U.pending>j&&(S.adler=h(S.adler,U.pending_buf,U.pending-j,j)),X===0&&(U.gzindex=0,U.status=91)}else U.status=91;if(U.status===91)if(U.gzhead.comment){j=U.pending;do{if(U.pending===U.pending_buf_size&&(U.gzhead.hcrc&&U.pending>j&&(S.adler=h(S.adler,U.pending_buf,U.pending-j,j)),N(S),j=U.pending,U.pending===U.pending_buf_size)){X=1;break}X=U.gzindex<U.gzhead.comment.length?255&U.gzhead.comment.charCodeAt(U.gzindex++):0,z(U,X)}while(X!==0);U.gzhead.hcrc&&U.pending>j&&(S.adler=h(S.adler,U.pending_buf,U.pending-j,j)),X===0&&(U.status=103)}else U.status=103;if(U.status===103&&(U.gzhead.hcrc?(U.pending+2>U.pending_buf_size&&N(S),U.pending+2<=U.pending_buf_size&&(z(U,255&S.adler),z(U,S.adler>>8&255),S.adler=0,U.status=ne)):U.status=ne),U.pending!==0){if(N(S),S.avail_out===0)return U.last_flush=-1,b}else if(S.avail_in===0&&de(K)<=de(W)&&K!==v)return se(S,-5);if(U.status===666&&S.avail_in!==0)return se(S,-5);if(S.avail_in!==0||U.lookahead!==0||K!==y&&U.status!==666){var pe=U.strategy===2?(function(le,Ee){for(var _e;;){if(le.lookahead===0&&(we(le),le.lookahead===0)){if(Ee===y)return C;break}if(le.match_length=0,_e=f._tr_tally(le,0,le.window[le.strstart]),le.lookahead--,le.strstart++,_e&&(B(le,!1),le.strm.avail_out===0))return C}return le.insert=0,Ee===v?(B(le,!0),le.strm.avail_out===0?Z:Q):le.last_lit&&(B(le,!1),le.strm.avail_out===0)?C:V})(U,K):U.strategy===3?(function(le,Ee){for(var _e,Se,te,be,Ce=le.window;;){if(le.lookahead<=$){if(we(le),le.lookahead<=$&&Ee===y)return C;if(le.lookahead===0)break}if(le.match_length=0,le.lookahead>=F&&0<le.strstart&&(Se=Ce[te=le.strstart-1])===Ce[++te]&&Se===Ce[++te]&&Se===Ce[++te]){be=le.strstart+$;do;while(Se===Ce[++te]&&Se===Ce[++te]&&Se===Ce[++te]&&Se===Ce[++te]&&Se===Ce[++te]&&Se===Ce[++te]&&Se===Ce[++te]&&Se===Ce[++te]&&te<be);le.match_length=$-(be-te),le.match_length>le.lookahead&&(le.match_length=le.lookahead)}if(le.match_length>=F?(_e=f._tr_tally(le,1,le.match_length-F),le.lookahead-=le.match_length,le.strstart+=le.match_length,le.match_length=0):(_e=f._tr_tally(le,0,le.window[le.strstart]),le.lookahead--,le.strstart++),_e&&(B(le,!1),le.strm.avail_out===0))return C}return le.insert=0,Ee===v?(B(le,!0),le.strm.avail_out===0?Z:Q):le.last_lit&&(B(le,!1),le.strm.avail_out===0)?C:V})(U,K):s[U.level].func(U,K);if(pe!==Z&&pe!==Q||(U.status=666),pe===C||pe===Z)return S.avail_out===0&&(U.last_flush=-1),b;if(pe===V&&(K===1?f._tr_align(U):K!==5&&(f._tr_stored_block(U,0,0,!1),K===3&&(L(U.head),U.lookahead===0&&(U.strstart=0,U.block_start=0,U.insert=0))),N(S),S.avail_out===0))return U.last_flush=-1,b}return K!==v?b:U.wrap<=0?1:(U.wrap===2?(z(U,255&S.adler),z(U,S.adler>>8&255),z(U,S.adler>>16&255),z(U,S.adler>>24&255),z(U,255&S.total_in),z(U,S.total_in>>8&255),z(U,S.total_in>>16&255),z(U,S.total_in>>24&255)):(re(U,S.adler>>>16),re(U,65535&S.adler)),N(S),0<U.wrap&&(U.wrap=-U.wrap),U.pending!==0?b:1)},u.deflateEnd=function(S){var K;return S&&S.state?(K=S.state.status)!==D&&K!==69&&K!==73&&K!==91&&K!==103&&K!==ne&&K!==666?se(S,w):(S.state=null,K===ne?se(S,-3):b):w},u.deflateSetDictionary=function(S,K){var W,U,j,X,he,pe,le,Ee,_e=K.length;if(!S||!S.state||(X=(W=S.state).wrap)===2||X===1&&W.status!==D||W.lookahead)return w;for(X===1&&(S.adler=m(S.adler,K,_e,0)),W.wrap=0,_e>=W.w_size&&(X===0&&(L(W.head),W.strstart=0,W.block_start=0,W.insert=0),Ee=new c.Buf8(W.w_size),c.arraySet(Ee,K,_e-W.w_size,W.w_size,0),K=Ee,_e=W.w_size),he=S.avail_in,pe=S.next_in,le=S.input,S.avail_in=_e,S.next_in=0,S.input=K,we(W);W.lookahead>=F;){for(U=W.strstart,j=W.lookahead-(F-1);W.ins_h=(W.ins_h<<W.hash_shift^W.window[U+F-1])&W.hash_mask,W.prev[U&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=U,U++,--j;);W.strstart=U,W.lookahead=F-1,we(W)}return W.strstart+=W.lookahead,W.block_start=W.strstart,W.insert=W.lookahead,W.lookahead=0,W.match_length=W.prev_length=F-1,W.match_available=0,S.next_in=pe,S.input=le,S.avail_in=he,W.wrap=X,b},u.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(i,o,u){o.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(i,o,u){o.exports=function(s,c){var f,m,h,g,y,v,b,w,E,T,_,A,k,q,H,M,I,Y,F,$,ie,D,ne,C,V;f=s.state,m=s.next_in,C=s.input,h=m+(s.avail_in-5),g=s.next_out,V=s.output,y=g-(c-s.avail_out),v=g+(s.avail_out-257),b=f.dmax,w=f.wsize,E=f.whave,T=f.wnext,_=f.window,A=f.hold,k=f.bits,q=f.lencode,H=f.distcode,M=(1<<f.lenbits)-1,I=(1<<f.distbits)-1;e:do{k<15&&(A+=C[m++]<<k,k+=8,A+=C[m++]<<k,k+=8),Y=q[A&M];t:for(;;){if(A>>>=F=Y>>>24,k-=F,(F=Y>>>16&255)===0)V[g++]=65535&Y;else{if(!(16&F)){if((64&F)==0){Y=q[(65535&Y)+(A&(1<<F)-1)];continue t}if(32&F){f.mode=12;break e}s.msg="invalid literal/length code",f.mode=30;break e}$=65535&Y,(F&=15)&&(k<F&&(A+=C[m++]<<k,k+=8),$+=A&(1<<F)-1,A>>>=F,k-=F),k<15&&(A+=C[m++]<<k,k+=8,A+=C[m++]<<k,k+=8),Y=H[A&I];n:for(;;){if(A>>>=F=Y>>>24,k-=F,!(16&(F=Y>>>16&255))){if((64&F)==0){Y=H[(65535&Y)+(A&(1<<F)-1)];continue n}s.msg="invalid distance code",f.mode=30;break e}if(ie=65535&Y,k<(F&=15)&&(A+=C[m++]<<k,(k+=8)<F&&(A+=C[m++]<<k,k+=8)),b<(ie+=A&(1<<F)-1)){s.msg="invalid distance too far back",f.mode=30;break e}if(A>>>=F,k-=F,(F=g-y)<ie){if(E<(F=ie-F)&&f.sane){s.msg="invalid distance too far back",f.mode=30;break e}if(ne=_,(D=0)===T){if(D+=w-F,F<$){for($-=F;V[g++]=_[D++],--F;);D=g-ie,ne=V}}else if(T<F){if(D+=w+T-F,(F-=T)<$){for($-=F;V[g++]=_[D++],--F;);if(D=0,T<$){for($-=F=T;V[g++]=_[D++],--F;);D=g-ie,ne=V}}}else if(D+=T-F,F<$){for($-=F;V[g++]=_[D++],--F;);D=g-ie,ne=V}for(;2<$;)V[g++]=ne[D++],V[g++]=ne[D++],V[g++]=ne[D++],$-=3;$&&(V[g++]=ne[D++],1<$&&(V[g++]=ne[D++]))}else{for(D=g-ie;V[g++]=V[D++],V[g++]=V[D++],V[g++]=V[D++],2<($-=3););$&&(V[g++]=V[D++],1<$&&(V[g++]=V[D++]))}break}}break}}while(m<h&&g<v);m-=$=k>>3,A&=(1<<(k-=$<<3))-1,s.next_in=m,s.next_out=g,s.avail_in=m<h?h-m+5:5-(m-h),s.avail_out=g<v?v-g+257:257-(g-v),f.hold=A,f.bits=k}},{}],49:[function(i,o,u){var s=i("../utils/common"),c=i("./adler32"),f=i("./crc32"),m=i("./inffast"),h=i("./inftrees"),g=1,y=2,v=0,b=-2,w=1,E=852,T=592;function _(D){return(D>>>24&255)+(D>>>8&65280)+((65280&D)<<8)+((255&D)<<24)}function A(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function k(D){var ne;return D&&D.state?(ne=D.state,D.total_in=D.total_out=ne.total=0,D.msg="",ne.wrap&&(D.adler=1&ne.wrap),ne.mode=w,ne.last=0,ne.havedict=0,ne.dmax=32768,ne.head=null,ne.hold=0,ne.bits=0,ne.lencode=ne.lendyn=new s.Buf32(E),ne.distcode=ne.distdyn=new s.Buf32(T),ne.sane=1,ne.back=-1,v):b}function q(D){var ne;return D&&D.state?((ne=D.state).wsize=0,ne.whave=0,ne.wnext=0,k(D)):b}function H(D,ne){var C,V;return D&&D.state?(V=D.state,ne<0?(C=0,ne=-ne):(C=1+(ne>>4),ne<48&&(ne&=15)),ne&&(ne<8||15<ne)?b:(V.window!==null&&V.wbits!==ne&&(V.window=null),V.wrap=C,V.wbits=ne,q(D))):b}function M(D,ne){var C,V;return D?(V=new A,(D.state=V).window=null,(C=H(D,ne))!==v&&(D.state=null),C):b}var I,Y,F=!0;function $(D){if(F){var ne;for(I=new s.Buf32(512),Y=new s.Buf32(32),ne=0;ne<144;)D.lens[ne++]=8;for(;ne<256;)D.lens[ne++]=9;for(;ne<280;)D.lens[ne++]=7;for(;ne<288;)D.lens[ne++]=8;for(h(g,D.lens,0,288,I,0,D.work,{bits:9}),ne=0;ne<32;)D.lens[ne++]=5;h(y,D.lens,0,32,Y,0,D.work,{bits:5}),F=!1}D.lencode=I,D.lenbits=9,D.distcode=Y,D.distbits=5}function ie(D,ne,C,V){var Z,Q=D.state;return Q.window===null&&(Q.wsize=1<<Q.wbits,Q.wnext=0,Q.whave=0,Q.window=new s.Buf8(Q.wsize)),V>=Q.wsize?(s.arraySet(Q.window,ne,C-Q.wsize,Q.wsize,0),Q.wnext=0,Q.whave=Q.wsize):(V<(Z=Q.wsize-Q.wnext)&&(Z=V),s.arraySet(Q.window,ne,C-V,Z,Q.wnext),(V-=Z)?(s.arraySet(Q.window,ne,C-V,V,0),Q.wnext=V,Q.whave=Q.wsize):(Q.wnext+=Z,Q.wnext===Q.wsize&&(Q.wnext=0),Q.whave<Q.wsize&&(Q.whave+=Z))),0}u.inflateReset=q,u.inflateReset2=H,u.inflateResetKeep=k,u.inflateInit=function(D){return M(D,15)},u.inflateInit2=M,u.inflate=function(D,ne){var C,V,Z,Q,se,de,L,N,B,z,re,ce,we,Te,ke,Ae,He,ve,ze,je,S,K,W,U,j=0,X=new s.Buf8(4),he=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!D||!D.state||!D.output||!D.input&&D.avail_in!==0)return b;(C=D.state).mode===12&&(C.mode=13),se=D.next_out,Z=D.output,L=D.avail_out,Q=D.next_in,V=D.input,de=D.avail_in,N=C.hold,B=C.bits,z=de,re=L,K=v;e:for(;;)switch(C.mode){case w:if(C.wrap===0){C.mode=13;break}for(;B<16;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if(2&C.wrap&&N===35615){X[C.check=0]=255&N,X[1]=N>>>8&255,C.check=f(C.check,X,2,0),B=N=0,C.mode=2;break}if(C.flags=0,C.head&&(C.head.done=!1),!(1&C.wrap)||(((255&N)<<8)+(N>>8))%31){D.msg="incorrect header check",C.mode=30;break}if((15&N)!=8){D.msg="unknown compression method",C.mode=30;break}if(B-=4,S=8+(15&(N>>>=4)),C.wbits===0)C.wbits=S;else if(S>C.wbits){D.msg="invalid window size",C.mode=30;break}C.dmax=1<<S,D.adler=C.check=1,C.mode=512&N?10:12,B=N=0;break;case 2:for(;B<16;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if(C.flags=N,(255&C.flags)!=8){D.msg="unknown compression method",C.mode=30;break}if(57344&C.flags){D.msg="unknown header flags set",C.mode=30;break}C.head&&(C.head.text=N>>8&1),512&C.flags&&(X[0]=255&N,X[1]=N>>>8&255,C.check=f(C.check,X,2,0)),B=N=0,C.mode=3;case 3:for(;B<32;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}C.head&&(C.head.time=N),512&C.flags&&(X[0]=255&N,X[1]=N>>>8&255,X[2]=N>>>16&255,X[3]=N>>>24&255,C.check=f(C.check,X,4,0)),B=N=0,C.mode=4;case 4:for(;B<16;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}C.head&&(C.head.xflags=255&N,C.head.os=N>>8),512&C.flags&&(X[0]=255&N,X[1]=N>>>8&255,C.check=f(C.check,X,2,0)),B=N=0,C.mode=5;case 5:if(1024&C.flags){for(;B<16;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}C.length=N,C.head&&(C.head.extra_len=N),512&C.flags&&(X[0]=255&N,X[1]=N>>>8&255,C.check=f(C.check,X,2,0)),B=N=0}else C.head&&(C.head.extra=null);C.mode=6;case 6:if(1024&C.flags&&(de<(ce=C.length)&&(ce=de),ce&&(C.head&&(S=C.head.extra_len-C.length,C.head.extra||(C.head.extra=new Array(C.head.extra_len)),s.arraySet(C.head.extra,V,Q,ce,S)),512&C.flags&&(C.check=f(C.check,V,ce,Q)),de-=ce,Q+=ce,C.length-=ce),C.length))break e;C.length=0,C.mode=7;case 7:if(2048&C.flags){if(de===0)break e;for(ce=0;S=V[Q+ce++],C.head&&S&&C.length<65536&&(C.head.name+=String.fromCharCode(S)),S&&ce<de;);if(512&C.flags&&(C.check=f(C.check,V,ce,Q)),de-=ce,Q+=ce,S)break e}else C.head&&(C.head.name=null);C.length=0,C.mode=8;case 8:if(4096&C.flags){if(de===0)break e;for(ce=0;S=V[Q+ce++],C.head&&S&&C.length<65536&&(C.head.comment+=String.fromCharCode(S)),S&&ce<de;);if(512&C.flags&&(C.check=f(C.check,V,ce,Q)),de-=ce,Q+=ce,S)break e}else C.head&&(C.head.comment=null);C.mode=9;case 9:if(512&C.flags){for(;B<16;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if(N!==(65535&C.check)){D.msg="header crc mismatch",C.mode=30;break}B=N=0}C.head&&(C.head.hcrc=C.flags>>9&1,C.head.done=!0),D.adler=C.check=0,C.mode=12;break;case 10:for(;B<32;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}D.adler=C.check=_(N),B=N=0,C.mode=11;case 11:if(C.havedict===0)return D.next_out=se,D.avail_out=L,D.next_in=Q,D.avail_in=de,C.hold=N,C.bits=B,2;D.adler=C.check=1,C.mode=12;case 12:if(ne===5||ne===6)break e;case 13:if(C.last){N>>>=7&B,B-=7&B,C.mode=27;break}for(;B<3;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}switch(C.last=1&N,B-=1,3&(N>>>=1)){case 0:C.mode=14;break;case 1:if($(C),C.mode=20,ne!==6)break;N>>>=2,B-=2;break e;case 2:C.mode=17;break;case 3:D.msg="invalid block type",C.mode=30}N>>>=2,B-=2;break;case 14:for(N>>>=7&B,B-=7&B;B<32;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if((65535&N)!=(N>>>16^65535)){D.msg="invalid stored block lengths",C.mode=30;break}if(C.length=65535&N,B=N=0,C.mode=15,ne===6)break e;case 15:C.mode=16;case 16:if(ce=C.length){if(de<ce&&(ce=de),L<ce&&(ce=L),ce===0)break e;s.arraySet(Z,V,Q,ce,se),de-=ce,Q+=ce,L-=ce,se+=ce,C.length-=ce;break}C.mode=12;break;case 17:for(;B<14;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if(C.nlen=257+(31&N),N>>>=5,B-=5,C.ndist=1+(31&N),N>>>=5,B-=5,C.ncode=4+(15&N),N>>>=4,B-=4,286<C.nlen||30<C.ndist){D.msg="too many length or distance symbols",C.mode=30;break}C.have=0,C.mode=18;case 18:for(;C.have<C.ncode;){for(;B<3;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}C.lens[he[C.have++]]=7&N,N>>>=3,B-=3}for(;C.have<19;)C.lens[he[C.have++]]=0;if(C.lencode=C.lendyn,C.lenbits=7,W={bits:C.lenbits},K=h(0,C.lens,0,19,C.lencode,0,C.work,W),C.lenbits=W.bits,K){D.msg="invalid code lengths set",C.mode=30;break}C.have=0,C.mode=19;case 19:for(;C.have<C.nlen+C.ndist;){for(;Ae=(j=C.lencode[N&(1<<C.lenbits)-1])>>>16&255,He=65535&j,!((ke=j>>>24)<=B);){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if(He<16)N>>>=ke,B-=ke,C.lens[C.have++]=He;else{if(He===16){for(U=ke+2;B<U;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if(N>>>=ke,B-=ke,C.have===0){D.msg="invalid bit length repeat",C.mode=30;break}S=C.lens[C.have-1],ce=3+(3&N),N>>>=2,B-=2}else if(He===17){for(U=ke+3;B<U;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}B-=ke,S=0,ce=3+(7&(N>>>=ke)),N>>>=3,B-=3}else{for(U=ke+7;B<U;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}B-=ke,S=0,ce=11+(127&(N>>>=ke)),N>>>=7,B-=7}if(C.have+ce>C.nlen+C.ndist){D.msg="invalid bit length repeat",C.mode=30;break}for(;ce--;)C.lens[C.have++]=S}}if(C.mode===30)break;if(C.lens[256]===0){D.msg="invalid code -- missing end-of-block",C.mode=30;break}if(C.lenbits=9,W={bits:C.lenbits},K=h(g,C.lens,0,C.nlen,C.lencode,0,C.work,W),C.lenbits=W.bits,K){D.msg="invalid literal/lengths set",C.mode=30;break}if(C.distbits=6,C.distcode=C.distdyn,W={bits:C.distbits},K=h(y,C.lens,C.nlen,C.ndist,C.distcode,0,C.work,W),C.distbits=W.bits,K){D.msg="invalid distances set",C.mode=30;break}if(C.mode=20,ne===6)break e;case 20:C.mode=21;case 21:if(6<=de&&258<=L){D.next_out=se,D.avail_out=L,D.next_in=Q,D.avail_in=de,C.hold=N,C.bits=B,m(D,re),se=D.next_out,Z=D.output,L=D.avail_out,Q=D.next_in,V=D.input,de=D.avail_in,N=C.hold,B=C.bits,C.mode===12&&(C.back=-1);break}for(C.back=0;Ae=(j=C.lencode[N&(1<<C.lenbits)-1])>>>16&255,He=65535&j,!((ke=j>>>24)<=B);){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if(Ae&&(240&Ae)==0){for(ve=ke,ze=Ae,je=He;Ae=(j=C.lencode[je+((N&(1<<ve+ze)-1)>>ve)])>>>16&255,He=65535&j,!(ve+(ke=j>>>24)<=B);){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}N>>>=ve,B-=ve,C.back+=ve}if(N>>>=ke,B-=ke,C.back+=ke,C.length=He,Ae===0){C.mode=26;break}if(32&Ae){C.back=-1,C.mode=12;break}if(64&Ae){D.msg="invalid literal/length code",C.mode=30;break}C.extra=15&Ae,C.mode=22;case 22:if(C.extra){for(U=C.extra;B<U;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}C.length+=N&(1<<C.extra)-1,N>>>=C.extra,B-=C.extra,C.back+=C.extra}C.was=C.length,C.mode=23;case 23:for(;Ae=(j=C.distcode[N&(1<<C.distbits)-1])>>>16&255,He=65535&j,!((ke=j>>>24)<=B);){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if((240&Ae)==0){for(ve=ke,ze=Ae,je=He;Ae=(j=C.distcode[je+((N&(1<<ve+ze)-1)>>ve)])>>>16&255,He=65535&j,!(ve+(ke=j>>>24)<=B);){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}N>>>=ve,B-=ve,C.back+=ve}if(N>>>=ke,B-=ke,C.back+=ke,64&Ae){D.msg="invalid distance code",C.mode=30;break}C.offset=He,C.extra=15&Ae,C.mode=24;case 24:if(C.extra){for(U=C.extra;B<U;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}C.offset+=N&(1<<C.extra)-1,N>>>=C.extra,B-=C.extra,C.back+=C.extra}if(C.offset>C.dmax){D.msg="invalid distance too far back",C.mode=30;break}C.mode=25;case 25:if(L===0)break e;if(ce=re-L,C.offset>ce){if((ce=C.offset-ce)>C.whave&&C.sane){D.msg="invalid distance too far back",C.mode=30;break}we=ce>C.wnext?(ce-=C.wnext,C.wsize-ce):C.wnext-ce,ce>C.length&&(ce=C.length),Te=C.window}else Te=Z,we=se-C.offset,ce=C.length;for(L<ce&&(ce=L),L-=ce,C.length-=ce;Z[se++]=Te[we++],--ce;);C.length===0&&(C.mode=21);break;case 26:if(L===0)break e;Z[se++]=C.length,L--,C.mode=21;break;case 27:if(C.wrap){for(;B<32;){if(de===0)break e;de--,N|=V[Q++]<<B,B+=8}if(re-=L,D.total_out+=re,C.total+=re,re&&(D.adler=C.check=C.flags?f(C.check,Z,re,se-re):c(C.check,Z,re,se-re)),re=L,(C.flags?N:_(N))!==C.check){D.msg="incorrect data check",C.mode=30;break}B=N=0}C.mode=28;case 28:if(C.wrap&&C.flags){for(;B<32;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if(N!==(4294967295&C.total)){D.msg="incorrect length check",C.mode=30;break}B=N=0}C.mode=29;case 29:K=1;break e;case 30:K=-3;break e;case 31:return-4;case 32:default:return b}return D.next_out=se,D.avail_out=L,D.next_in=Q,D.avail_in=de,C.hold=N,C.bits=B,(C.wsize||re!==D.avail_out&&C.mode<30&&(C.mode<27||ne!==4))&&ie(D,D.output,D.next_out,re-D.avail_out)?(C.mode=31,-4):(z-=D.avail_in,re-=D.avail_out,D.total_in+=z,D.total_out+=re,C.total+=re,C.wrap&&re&&(D.adler=C.check=C.flags?f(C.check,Z,re,D.next_out-re):c(C.check,Z,re,D.next_out-re)),D.data_type=C.bits+(C.last?64:0)+(C.mode===12?128:0)+(C.mode===20||C.mode===15?256:0),(z==0&&re===0||ne===4)&&K===v&&(K=-5),K)},u.inflateEnd=function(D){if(!D||!D.state)return b;var ne=D.state;return ne.window&&(ne.window=null),D.state=null,v},u.inflateGetHeader=function(D,ne){var C;return D&&D.state?(2&(C=D.state).wrap)==0?b:((C.head=ne).done=!1,v):b},u.inflateSetDictionary=function(D,ne){var C,V=ne.length;return D&&D.state?(C=D.state).wrap!==0&&C.mode!==11?b:C.mode===11&&c(1,ne,V,0)!==C.check?-3:ie(D,ne,V,V)?(C.mode=31,-4):(C.havedict=1,v):b},u.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(i,o,u){var s=i("../utils/common"),c=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],f=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],h=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];o.exports=function(g,y,v,b,w,E,T,_){var A,k,q,H,M,I,Y,F,$,ie=_.bits,D=0,ne=0,C=0,V=0,Z=0,Q=0,se=0,de=0,L=0,N=0,B=null,z=0,re=new s.Buf16(16),ce=new s.Buf16(16),we=null,Te=0;for(D=0;D<=15;D++)re[D]=0;for(ne=0;ne<b;ne++)re[y[v+ne]]++;for(Z=ie,V=15;1<=V&&re[V]===0;V--);if(V<Z&&(Z=V),V===0)return w[E++]=20971520,w[E++]=20971520,_.bits=1,0;for(C=1;C<V&&re[C]===0;C++);for(Z<C&&(Z=C),D=de=1;D<=15;D++)if(de<<=1,(de-=re[D])<0)return-1;if(0<de&&(g===0||V!==1))return-1;for(ce[1]=0,D=1;D<15;D++)ce[D+1]=ce[D]+re[D];for(ne=0;ne<b;ne++)y[v+ne]!==0&&(T[ce[y[v+ne]]++]=ne);if(I=g===0?(B=we=T,19):g===1?(B=c,z-=257,we=f,Te-=257,256):(B=m,we=h,-1),D=C,M=E,se=ne=N=0,q=-1,H=(L=1<<(Q=Z))-1,g===1&&852<L||g===2&&592<L)return 1;for(;;){for(Y=D-se,$=T[ne]<I?(F=0,T[ne]):T[ne]>I?(F=we[Te+T[ne]],B[z+T[ne]]):(F=96,0),A=1<<D-se,C=k=1<<Q;w[M+(N>>se)+(k-=A)]=Y<<24|F<<16|$|0,k!==0;);for(A=1<<D-1;N&A;)A>>=1;if(A!==0?(N&=A-1,N+=A):N=0,ne++,--re[D]==0){if(D===V)break;D=y[v+T[ne]]}if(Z<D&&(N&H)!==q){for(se===0&&(se=Z),M+=C,de=1<<(Q=D-se);Q+se<V&&!((de-=re[Q+se])<=0);)Q++,de<<=1;if(L+=1<<Q,g===1&&852<L||g===2&&592<L)return 1;w[q=N&H]=Z<<24|Q<<16|M-E|0}}return N!==0&&(w[M+N]=D-se<<24|4194304|0),_.bits=Z,0}},{"../utils/common":41}],51:[function(i,o,u){o.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(i,o,u){var s=i("../utils/common"),c=0,f=1;function m(j){for(var X=j.length;0<=--X;)j[X]=0}var h=0,g=29,y=256,v=y+1+g,b=30,w=19,E=2*v+1,T=15,_=16,A=7,k=256,q=16,H=17,M=18,I=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Y=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],F=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],$=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ie=new Array(2*(v+2));m(ie);var D=new Array(2*b);m(D);var ne=new Array(512);m(ne);var C=new Array(256);m(C);var V=new Array(g);m(V);var Z,Q,se,de=new Array(b);function L(j,X,he,pe,le){this.static_tree=j,this.extra_bits=X,this.extra_base=he,this.elems=pe,this.max_length=le,this.has_stree=j&&j.length}function N(j,X){this.dyn_tree=j,this.max_code=0,this.stat_desc=X}function B(j){return j<256?ne[j]:ne[256+(j>>>7)]}function z(j,X){j.pending_buf[j.pending++]=255&X,j.pending_buf[j.pending++]=X>>>8&255}function re(j,X,he){j.bi_valid>_-he?(j.bi_buf|=X<<j.bi_valid&65535,z(j,j.bi_buf),j.bi_buf=X>>_-j.bi_valid,j.bi_valid+=he-_):(j.bi_buf|=X<<j.bi_valid&65535,j.bi_valid+=he)}function ce(j,X,he){re(j,he[2*X],he[2*X+1])}function we(j,X){for(var he=0;he|=1&j,j>>>=1,he<<=1,0<--X;);return he>>>1}function Te(j,X,he){var pe,le,Ee=new Array(T+1),_e=0;for(pe=1;pe<=T;pe++)Ee[pe]=_e=_e+he[pe-1]<<1;for(le=0;le<=X;le++){var Se=j[2*le+1];Se!==0&&(j[2*le]=we(Ee[Se]++,Se))}}function ke(j){var X;for(X=0;X<v;X++)j.dyn_ltree[2*X]=0;for(X=0;X<b;X++)j.dyn_dtree[2*X]=0;for(X=0;X<w;X++)j.bl_tree[2*X]=0;j.dyn_ltree[2*k]=1,j.opt_len=j.static_len=0,j.last_lit=j.matches=0}function Ae(j){8<j.bi_valid?z(j,j.bi_buf):0<j.bi_valid&&(j.pending_buf[j.pending++]=j.bi_buf),j.bi_buf=0,j.bi_valid=0}function He(j,X,he,pe){var le=2*X,Ee=2*he;return j[le]<j[Ee]||j[le]===j[Ee]&&pe[X]<=pe[he]}function ve(j,X,he){for(var pe=j.heap[he],le=he<<1;le<=j.heap_len&&(le<j.heap_len&&He(X,j.heap[le+1],j.heap[le],j.depth)&&le++,!He(X,pe,j.heap[le],j.depth));)j.heap[he]=j.heap[le],he=le,le<<=1;j.heap[he]=pe}function ze(j,X,he){var pe,le,Ee,_e,Se=0;if(j.last_lit!==0)for(;pe=j.pending_buf[j.d_buf+2*Se]<<8|j.pending_buf[j.d_buf+2*Se+1],le=j.pending_buf[j.l_buf+Se],Se++,pe===0?ce(j,le,X):(ce(j,(Ee=C[le])+y+1,X),(_e=I[Ee])!==0&&re(j,le-=V[Ee],_e),ce(j,Ee=B(--pe),he),(_e=Y[Ee])!==0&&re(j,pe-=de[Ee],_e)),Se<j.last_lit;);ce(j,k,X)}function je(j,X){var he,pe,le,Ee=X.dyn_tree,_e=X.stat_desc.static_tree,Se=X.stat_desc.has_stree,te=X.stat_desc.elems,be=-1;for(j.heap_len=0,j.heap_max=E,he=0;he<te;he++)Ee[2*he]!==0?(j.heap[++j.heap_len]=be=he,j.depth[he]=0):Ee[2*he+1]=0;for(;j.heap_len<2;)Ee[2*(le=j.heap[++j.heap_len]=be<2?++be:0)]=1,j.depth[le]=0,j.opt_len--,Se&&(j.static_len-=_e[2*le+1]);for(X.max_code=be,he=j.heap_len>>1;1<=he;he--)ve(j,Ee,he);for(le=te;he=j.heap[1],j.heap[1]=j.heap[j.heap_len--],ve(j,Ee,1),pe=j.heap[1],j.heap[--j.heap_max]=he,j.heap[--j.heap_max]=pe,Ee[2*le]=Ee[2*he]+Ee[2*pe],j.depth[le]=(j.depth[he]>=j.depth[pe]?j.depth[he]:j.depth[pe])+1,Ee[2*he+1]=Ee[2*pe+1]=le,j.heap[1]=le++,ve(j,Ee,1),2<=j.heap_len;);j.heap[--j.heap_max]=j.heap[1],(function(Ce,Ie){var Je,pt,qt,Xe,gt,Ot,Ze=Ie.dyn_tree,Cn=Ie.max_code,nn=Ie.stat_desc.static_tree,zu=Ie.stat_desc.has_stree,xi=Ie.stat_desc.extra_bits,Xr=Ie.stat_desc.extra_base,jn=Ie.stat_desc.max_length,hn=0;for(Xe=0;Xe<=T;Xe++)Ce.bl_count[Xe]=0;for(Ze[2*Ce.heap[Ce.heap_max]+1]=0,Je=Ce.heap_max+1;Je<E;Je++)jn<(Xe=Ze[2*Ze[2*(pt=Ce.heap[Je])+1]+1]+1)&&(Xe=jn,hn++),Ze[2*pt+1]=Xe,Cn<pt||(Ce.bl_count[Xe]++,gt=0,Xr<=pt&&(gt=xi[pt-Xr]),Ot=Ze[2*pt],Ce.opt_len+=Ot*(Xe+gt),zu&&(Ce.static_len+=Ot*(nn[2*pt+1]+gt)));if(hn!==0){do{for(Xe=jn-1;Ce.bl_count[Xe]===0;)Xe--;Ce.bl_count[Xe]--,Ce.bl_count[Xe+1]+=2,Ce.bl_count[jn]--,hn-=2}while(0<hn);for(Xe=jn;Xe!==0;Xe--)for(pt=Ce.bl_count[Xe];pt!==0;)Cn<(qt=Ce.heap[--Je])||(Ze[2*qt+1]!==Xe&&(Ce.opt_len+=(Xe-Ze[2*qt+1])*Ze[2*qt],Ze[2*qt+1]=Xe),pt--)}})(j,X),Te(Ee,be,j.bl_count)}function S(j,X,he){var pe,le,Ee=-1,_e=X[1],Se=0,te=7,be=4;for(_e===0&&(te=138,be=3),X[2*(he+1)+1]=65535,pe=0;pe<=he;pe++)le=_e,_e=X[2*(pe+1)+1],++Se<te&&le===_e||(Se<be?j.bl_tree[2*le]+=Se:le!==0?(le!==Ee&&j.bl_tree[2*le]++,j.bl_tree[2*q]++):Se<=10?j.bl_tree[2*H]++:j.bl_tree[2*M]++,Ee=le,be=(Se=0)===_e?(te=138,3):le===_e?(te=6,3):(te=7,4))}function K(j,X,he){var pe,le,Ee=-1,_e=X[1],Se=0,te=7,be=4;for(_e===0&&(te=138,be=3),pe=0;pe<=he;pe++)if(le=_e,_e=X[2*(pe+1)+1],!(++Se<te&&le===_e)){if(Se<be)for(;ce(j,le,j.bl_tree),--Se!=0;);else le!==0?(le!==Ee&&(ce(j,le,j.bl_tree),Se--),ce(j,q,j.bl_tree),re(j,Se-3,2)):Se<=10?(ce(j,H,j.bl_tree),re(j,Se-3,3)):(ce(j,M,j.bl_tree),re(j,Se-11,7));Ee=le,be=(Se=0)===_e?(te=138,3):le===_e?(te=6,3):(te=7,4)}}m(de);var W=!1;function U(j,X,he,pe){re(j,(h<<1)+(pe?1:0),3),(function(le,Ee,_e,Se){Ae(le),z(le,_e),z(le,~_e),s.arraySet(le.pending_buf,le.window,Ee,_e,le.pending),le.pending+=_e})(j,X,he)}u._tr_init=function(j){W||((function(){var X,he,pe,le,Ee,_e=new Array(T+1);for(le=pe=0;le<g-1;le++)for(V[le]=pe,X=0;X<1<<I[le];X++)C[pe++]=le;for(C[pe-1]=le,le=Ee=0;le<16;le++)for(de[le]=Ee,X=0;X<1<<Y[le];X++)ne[Ee++]=le;for(Ee>>=7;le<b;le++)for(de[le]=Ee<<7,X=0;X<1<<Y[le]-7;X++)ne[256+Ee++]=le;for(he=0;he<=T;he++)_e[he]=0;for(X=0;X<=143;)ie[2*X+1]=8,X++,_e[8]++;for(;X<=255;)ie[2*X+1]=9,X++,_e[9]++;for(;X<=279;)ie[2*X+1]=7,X++,_e[7]++;for(;X<=287;)ie[2*X+1]=8,X++,_e[8]++;for(Te(ie,v+1,_e),X=0;X<b;X++)D[2*X+1]=5,D[2*X]=we(X,5);Z=new L(ie,I,y+1,v,T),Q=new L(D,Y,0,b,T),se=new L(new Array(0),F,0,w,A)})(),W=!0),j.l_desc=new N(j.dyn_ltree,Z),j.d_desc=new N(j.dyn_dtree,Q),j.bl_desc=new N(j.bl_tree,se),j.bi_buf=0,j.bi_valid=0,ke(j)},u._tr_stored_block=U,u._tr_flush_block=function(j,X,he,pe){var le,Ee,_e=0;0<j.level?(j.strm.data_type===2&&(j.strm.data_type=(function(Se){var te,be=4093624447;for(te=0;te<=31;te++,be>>>=1)if(1&be&&Se.dyn_ltree[2*te]!==0)return c;if(Se.dyn_ltree[18]!==0||Se.dyn_ltree[20]!==0||Se.dyn_ltree[26]!==0)return f;for(te=32;te<y;te++)if(Se.dyn_ltree[2*te]!==0)return f;return c})(j)),je(j,j.l_desc),je(j,j.d_desc),_e=(function(Se){var te;for(S(Se,Se.dyn_ltree,Se.l_desc.max_code),S(Se,Se.dyn_dtree,Se.d_desc.max_code),je(Se,Se.bl_desc),te=w-1;3<=te&&Se.bl_tree[2*$[te]+1]===0;te--);return Se.opt_len+=3*(te+1)+5+5+4,te})(j),le=j.opt_len+3+7>>>3,(Ee=j.static_len+3+7>>>3)<=le&&(le=Ee)):le=Ee=he+5,he+4<=le&&X!==-1?U(j,X,he,pe):j.strategy===4||Ee===le?(re(j,2+(pe?1:0),3),ze(j,ie,D)):(re(j,4+(pe?1:0),3),(function(Se,te,be,Ce){var Ie;for(re(Se,te-257,5),re(Se,be-1,5),re(Se,Ce-4,4),Ie=0;Ie<Ce;Ie++)re(Se,Se.bl_tree[2*$[Ie]+1],3);K(Se,Se.dyn_ltree,te-1),K(Se,Se.dyn_dtree,be-1)})(j,j.l_desc.max_code+1,j.d_desc.max_code+1,_e+1),ze(j,j.dyn_ltree,j.dyn_dtree)),ke(j),pe&&Ae(j)},u._tr_tally=function(j,X,he){return j.pending_buf[j.d_buf+2*j.last_lit]=X>>>8&255,j.pending_buf[j.d_buf+2*j.last_lit+1]=255&X,j.pending_buf[j.l_buf+j.last_lit]=255&he,j.last_lit++,X===0?j.dyn_ltree[2*he]++:(j.matches++,X--,j.dyn_ltree[2*(C[he]+y+1)]++,j.dyn_dtree[2*B(X)]++),j.last_lit===j.lit_bufsize-1},u._tr_align=function(j){re(j,2,3),ce(j,k,ie),(function(X){X.bi_valid===16?(z(X,X.bi_buf),X.bi_buf=0,X.bi_valid=0):8<=X.bi_valid&&(X.pending_buf[X.pending++]=255&X.bi_buf,X.bi_buf>>=8,X.bi_valid-=8)})(j)}},{"../utils/common":41}],53:[function(i,o,u){o.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(i,o,u){(function(s){(function(c,f){if(!c.setImmediate){var m,h,g,y,v=1,b={},w=!1,E=c.document,T=Object.getPrototypeOf&&Object.getPrototypeOf(c);T=T&&T.setTimeout?T:c,m={}.toString.call(c.process)==="[object process]"?function(q){process.nextTick(function(){A(q)})}:(function(){if(c.postMessage&&!c.importScripts){var q=!0,H=c.onmessage;return c.onmessage=function(){q=!1},c.postMessage("","*"),c.onmessage=H,q}})()?(y="setImmediate$"+Math.random()+"$",c.addEventListener?c.addEventListener("message",k,!1):c.attachEvent("onmessage",k),function(q){c.postMessage(y+q,"*")}):c.MessageChannel?((g=new MessageChannel).port1.onmessage=function(q){A(q.data)},function(q){g.port2.postMessage(q)}):E&&"onreadystatechange"in E.createElement("script")?(h=E.documentElement,function(q){var H=E.createElement("script");H.onreadystatechange=function(){A(q),H.onreadystatechange=null,h.removeChild(H),H=null},h.appendChild(H)}):function(q){setTimeout(A,0,q)},T.setImmediate=function(q){typeof q!="function"&&(q=new Function(""+q));for(var H=new Array(arguments.length-1),M=0;M<H.length;M++)H[M]=arguments[M+1];var I={callback:q,args:H};return b[v]=I,m(v),v++},T.clearImmediate=_}function _(q){delete b[q]}function A(q){if(w)setTimeout(A,0,q);else{var H=b[q];if(H){w=!0;try{(function(M){var I=M.callback,Y=M.args;switch(Y.length){case 0:I();break;case 1:I(Y[0]);break;case 2:I(Y[0],Y[1]);break;case 3:I(Y[0],Y[1],Y[2]);break;default:I.apply(f,Y)}})(H)}finally{_(q),w=!1}}}}function k(q){q.source===c&&typeof q.data=="string"&&q.data.indexOf(y)===0&&A(+q.data.slice(y.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof Rl<"u"?Rl:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(qs)),qs.exports}var Lh;function qS(){if(Lh)return Fr;Lh=1;var n=Fr&&Fr.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.Filemanager=void 0;const l=n(HS()),i=Rn();class o{pendingFiles=[];pendingMessage="";pendingFormat="";setFilesForUpload(s,c){this.pendingFiles.length>0&&this.clearPendingFilesState();const f=s.filter(m=>this.validateFileType(m));if(f.length===0)throw new i.FileError("No valid files provided",{context:{stage:"setFilesForUpload"}});this.pendingFiles=f,c&&c.trim()&&(this.pendingMessage=c),this.pendingFormat=f.length>1?"zip":f?.[0]?.type?.split("/")?.[1]||"unknown"}getPendingFileState(){return{files:this.pendingFiles,message:this.pendingMessage||"",format:this.pendingFormat||""}}async uploadFilesToPresignedUrl(s){let c=0;const f=s.filter(m=>m&&m.trim());try{if(f.length===0)throw new i.FileError("No valid presigned URLs provided",{context:{stage:"uploadFilesToPresignedUrl"}});let m,h;if(this.shouldZipFiles()){const g=await this.zipFiles(),y=this.getUploadFileName();m=this.blobToFile(g,y),h="application/zip"}else m=this.pendingFiles?.[0],h=m.type;for(let g=0;g<f.length;g++){const y=f[g],v=await fetch(y,{method:"PUT",body:m,headers:{"Content-Type":h,"x-ms-blob-type":"BlockBlob"}});if(!v.ok)throw new i.FileError(`Failed to upload ${m.name} to URL ${g+1}: ${v.status} ${v.statusText}`,{context:{stage:"uploadFilesToPresignedUrl",status:v.status,url:y}});c++}return f[0]}catch(m){if(c>0)return f[0];throw(0,i.normalizeError)(m,i.FileError,"Failed to upload files to presigned URL",{context:{stage:"uploadFilesToPresignedUrl"}})}}async zipFiles(){const s=new l.default;return this.pendingFiles.forEach(f=>{s.file(f.name,f)}),await s.generateAsync({type:"blob"})}blobToFile(s,c){return new File([s],c,{type:s.type})}shouldZipFiles(){return this.pendingFiles.length>1}getUploadFileName(){return this.shouldZipFiles()?`uploaded_files_${Date.now()}.zip`:this.pendingFiles[0]?.name||"file"}validateFileType(s){return["application/pdf","image/jpeg","image/png","image/jpg","image/tiff","text/plain","text/markdown","image/heif","image/heic","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes(s.type)}clearPendingFilesState(){this.pendingFiles=[],this.pendingMessage="",this.pendingFormat=""}}return Fr.Filemanager=o,Fr}var wn={},Ih;function Pl(){if(Ih)return wn;Ih=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.SYNAPSE_REALTIME_RESERVED_EVENTS=wn.SYNAPSE_REALTIME_ERROR_CODES=wn.SYNAPSE_REALTIME_EVENTS=wn.SYNAPSE_MESSAGE_TYPES=void 0;const n=Hs();return wn.SYNAPSE_MESSAGE_TYPES=n.SOCKET_CONTENT_TYPES,wn.SYNAPSE_REALTIME_EVENTS={CONNECTED:"connected",DISCONNECTED:"disconnected",PROGRESS_MESSAGE:"progress_message",MESSAGE_CHUNK:"message_chunk",TIPS_MESSAGE:"tips_message",END_OF_STREAM:"end_of_stream",ERROR:"error",TOOL_CALL:"tool_call",INLINE_TEXT:"inline_text",TOOL_START:"tool_start",TOOL_END:"tool_end"},wn.SYNAPSE_REALTIME_ERROR_CODES={SESSION_INACTIVE:"session_not_found",SESSION_EXPIRED:"session_expired",INVALID_EVENT:"invalid_event",INVALID_CONTENT_TYPE:"invalid_content",PARSING_ERROR:"parsing",FILE_UPLOAD_INPROGRESS:"file_upload_inprogress",TIMEOUT:"timeout",SERVER_ERROR:"server_error",SESSION_TOKEN_MISMATCH:"session_token_mismatch"},wn.SYNAPSE_REALTIME_RESERVED_EVENTS={SESSION_EXPIRED:"session_expired"},wn}var Ca={},Bh;function PS(){if(Bh)return Ca;Bh=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.AudioManager=void 0;const n=Rn();class l{mediaRecorder=null;mediaStream=null;recordingStartTime=0;autoPauseTimer=null;config;onAudioData=null;onAudioError=null;suppressCallbacks=!1;constructor(o={}){this.config={mimeType:"audio/webm;codecs=opus",audioBitsPerSecond:128e3,maxRecordingDuration:9e5,autoPauseEnabled:!0,...o}}async checkCurrentPermissionState(){const o=await navigator.permissions.query({name:"microphone"});if(o.state==="denied")throw new n.RecordingError("Microphone permission denied",{context:{permissionState:o.state},hint:"Ensure the browser has microphone access enabled for this site."});return o.state}async start(o,u){try{if(!navigator.mediaDevices)throw new n.RecordingError("Media devices API is not available. This usually means the page is not served over HTTPS or there are browser restrictions.",{context:{feature:"mediaDevices"},hint:"Serve the app over HTTPS and verify browser/device microphone support.",displayMessage:"Microphone access is unavailable."});if(!window.MediaRecorder)throw new n.RecordingError("MediaRecorder is not supported in this browser",{context:{feature:"MediaRecorder"},hint:"Use a browser that supports the MediaRecorder API.",displayMessage:"Microphone access is unavailable."});const s=["audio/mp3","audio/ogg;codecs=opus","audio/mp4","audio/ogg","audio/wav"].filter(c=>MediaRecorder.isTypeSupported(c));if(s.length===0)throw new n.RecordingError("No supported audio formats found in this browser",{context:{requestedTypes:s},hint:"Verify codec support or adjust the requested MIME types.",displayMessage:"Microphone access is unavailable."});if(this.config.mimeType=s[0],await this.checkCurrentPermissionState(),this.onAudioData=o,this.onAudioError=u??null,this.suppressCallbacks=!1,this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!1,noiseSuppression:!1,autoGainControl:!1,sampleRate:44100,channelCount:1}}),this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:this.config.mimeType,audioBitsPerSecond:this.config.audioBitsPerSecond}),this.mediaRecorder.state!=="inactive")throw new n.RecordingError("MediaRecorder is in an invalid state for start()",{context:{recorderState:this.mediaRecorder.state},displayMessage:"Failed to start recording"});this.setupMediaRecorderEvents(),this.mediaRecorder.start(),this.recordingStartTime=Date.now(),this.config.autoPauseEnabled&&this.setupAutoPauseTimer()}catch(s){throw this.toRecordingError(s,"Failed to start audio recording",{stage:"start"})}}async processAudioChunk(o){try{const u=await this.blobToBase64(o),s=Date.now();if(!this.onAudioData)return;const c={audio:u,format:this.config.mimeType,duration:this.recordingStartTime>0?s-this.recordingStartTime:0,timestamp:this.recordingStartTime>0?this.recordingStartTime:s};this.onAudioData(c)}catch(u){this.handleError(u,{stage:"process_audio_chunk"})}}toRecordingError(o,u,s){if(o instanceof n.RecordingError)return o;if(o instanceof n.SynapseError)return new n.RecordingError(o.message,{cause:o,context:{...o.context,...s},hint:o.hint});const c=o instanceof Error&&o.message?o.message:u;return new n.RecordingError(c,{cause:o,context:s})}handleError(o,u){const s=this.toRecordingError(o,"Unexpected recording error",u);if(this.onAudioError)try{this.onAudioError(s)}catch{}}setupAutoPauseTimer(){this.autoPauseTimer&&clearTimeout(this.autoPauseTimer),this.autoPauseTimer=setTimeout(()=>{this.stop()},this.config.maxRecordingDuration)}setupMediaRecorderEvents(){this.mediaRecorder&&(this.mediaRecorder.ondataavailable=o=>{this.suppressCallbacks||o.data.size<=0||this.processAudioChunk(o.data).catch(u=>this.handleError(u,{stage:"media_recorder_ondataavailable",hasData:o.data.size>0}))},this.mediaRecorder.onstop=async()=>{this.recordingStartTime=0},this.mediaRecorder.onerror=o=>{this.handleError(o.error instanceof Error?o.error:new Error("MediaRecorder encountered an unknown error"),{stage:"media_recorder_onerror"})},this.mediaRecorder.onstart=()=>{this.mediaRecorder})}blobToBase64(o){return new Promise((u,s)=>{const c=new FileReader;c.onload=()=>{if(typeof c.result=="string"){const f=c.result.split(",")[1];u(f)}else s(new n.RecordingError("Failed to convert blob to base64",{context:{stage:"blob_to_base64"}}))},c.onerror=()=>s(new n.RecordingError("FileReader error while converting audio chunk to base64",{cause:c.error??void 0,context:{stage:"blob_to_base64"}})),c.readAsDataURL(o)})}stop(){if(this.mediaRecorder)try{this.autoPauseTimer&&(clearTimeout(this.autoPauseTimer),this.autoPauseTimer=null),this.mediaRecorder.state==="recording"&&this.mediaRecorder.stop(),this.mediaStream&&(this.mediaStream.getTracks().forEach(o=>o.stop()),this.mediaStream=null)}catch(o){throw this.toRecordingError(o,"Failed to stop audio recording",{stage:"stop"})}}cancel(){if(this.mediaRecorder)try{this.suppressCallbacks=!0,this.autoPauseTimer&&(clearTimeout(this.autoPauseTimer),this.autoPauseTimer=null),this.mediaRecorder.ondataavailable=null,this.mediaRecorder.state==="recording"&&this.mediaRecorder.stop(),this.mediaStream&&(this.mediaStream.getTracks().forEach(o=>o.stop()),this.mediaStream=null)}catch(o){throw this.toRecordingError(o,"Failed to cancel audio recording",{stage:"cancel"})}}destroy(){try{this.cancel(),this.mediaRecorder&&(this.mediaRecorder=null),this.mediaStream&&(this.mediaStream.getTracks().forEach(o=>o.stop()),this.mediaStream=null)}catch(o){throw this.toRecordingError(o,"Failed to destroy audio resources",{stage:"destroy"})}}}return Ca.AudioManager=l,Ca}var Uh;function Hh(){if(Uh)return wa;Uh=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.MessageManager=void 0;const n=Hs(),l=qS(),i=Pl(),o=PS(),u=Rn();let s=class{connection=null;callbacks=null;fileManager=null;audioManager=null;constructor(f,m){this.connection=f||null,this.callbacks=m||null}handleFileUploadProcess({files:f,message:m,url:h}){this.fileManager||(this.fileManager=new l.Filemanager);let g;if(f&&f.length>0)this.fileManager.setFilesForUpload(f,m),g={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.FILE,_id:Date.now().toString(),ts:Date.now(),data:{extension:this.fileManager.getPendingFileState().format}};else if(h){const y=this.fileManager.getPendingFileState().message;g={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.FILE,_id:Date.now().toString(),ts:Date.now(),data:{url:h,...y&&{text:y}}},this.fileManager?.clearPendingFilesState()}return g}sendSocketMessage({message:f,files:m,audio:h,url:g,tool_declined:y,tool_id:v,initial_prompts:b}){const w=this.assertConnection("sendSocketChatMessage");let E;if(m&&m.length>0||g&&g.trim()!==""?E=this.handleFileUploadProcess({files:m,message:f,url:g}):f?E={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.TEXT,_id:Date.now().toString(),ts:Date.now(),data:{text:f,...y&&{tool_declined:y},...v&&{tool_id:v},...b&&{initial_prompts:b}}}:h&&h?.audio&&h?.format&&(E={ev:n.SOCKET_EVENTS.STREAM,ct:n.SOCKET_CONTENT_TYPES.AUDIO,_id:Date.now().toString(),ts:Date.now(),data:{audio:h?.audio,format:h?.format}}),!E){const T=new u.MessageError("No message to send",{context:{stage:"sendSocketChatMessage"}});throw this.emitError(T),T}w.sendMessage(E)}handleIncomingSocketChatMessage(f){const m=this.assertConnection("handleIncomingSocketChatMessage");switch(f.ct){case n.SOCKET_CONTENT_TYPES.FILE:{f?.data?.urls&&f.data.urls?.length>0&&this.fileManager?.uploadFilesToPresignedUrl(f.data.urls).then(()=>{this.sendSocketMessage({url:f.data.urls?.[0]})}).catch(h=>{const g=this.toFileError(h,"Failed to upload files to presigned URL",{stage:"handleIncomingSocketChatMessage",urls:f.data?.urls?.length});this.emitError(g)});break}case n.SOCKET_CONTENT_TYPES.TEXT:if(f.data.text&&f.data.text.trim()===""&&f._id){const h={data:{text:f.data.text},messageId:f._id,timestamp:f.ts};m.emit(i.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,h)}break;case n.SOCKET_CONTENT_TYPES.TOOL_CALL:if(f?.data?.tool_id&&f._id){const h={data:{...f.data},messageId:f._id,timestamp:f.ts};m.emit(i.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,h)}break;case n.SOCKET_CONTENT_TYPES.INLINE_TEXT:if(f?.data?.text){const h={data:{text:f.data.text},messageId:f._id,timestamp:f.ts};m.emit(i.SYNAPSE_REALTIME_EVENTS.INLINE_TEXT,h)}break}}handleIncomingSocketStreamMessage(f){const m=this.assertConnection("handleIncomingSocketStreamMessage");switch(f.ct){case n.SOCKET_CONTENT_TYPES.TEXT:if(f?.data?.progress_msg){const v={data:{text:f.data.progress_msg},messageId:f._id,timestamp:f.ts};m.emit(i.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE,v);return}if(f?.data?.text){const v={data:{text:f.data.text},messageId:f._id,timestamp:f.ts};m.emit(i.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,v)}break;case n.SOCKET_CONTENT_TYPES.TIPS:if(f?.data?.tips){const v={data:{tips:f.data.tips},messageId:f._id,timestamp:f.ts};m.emit(i.SYNAPSE_REALTIME_EVENTS.TIPS_MESSAGE,v);return}break;case n.SOCKET_CONTENT_TYPES.TOOL_CALL:if(f?.data?.tool_id&&f._id){const v={data:{...f.data},messageId:f._id,timestamp:f.ts};m.emit(i.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,v);return}break;case n.SOCKET_CONTENT_TYPES.TOOL_START:const h={data:f?.data,messageId:f._id||Date.now().toString()};m.emit(i.SYNAPSE_REALTIME_EVENTS.TOOL_START,h);break;case n.SOCKET_CONTENT_TYPES.TOOL_END:const g={data:f?.data,messageId:f._id||Date.now().toString()};m.emit(i.SYNAPSE_REALTIME_EVENTS.TOOL_END,g);break;default:const y=new u.MessageError(`Unsupported content type ${f?.ct}`,{context:{stage:"handleIncomingSocketStreamMessage",contentType:f.ct}});throw this.emitError(y),y}}handleDisconnect(f){this.connection?.emit?.(i.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,f)}handleIncomingSocketEndOfStreamMessage(f){this.assertConnection("handleIncomingSocketEndOfStreamMessage").emit(i.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM)}handleIncomingSocketErrorMessage(f){const m=this.assertConnection("handleIncomingSocketErrorMessage");switch(f.code){case i.SYNAPSE_REALTIME_ERROR_CODES.SESSION_EXPIRED:m.emit(i.SYNAPSE_REALTIME_RESERVED_EVENTS.SESSION_EXPIRED);break;default:const h=new u.MessageError(f.msg||"Socket error received",{context:{stage:"handleIncomingSocketErrorMessage",errorCode:f.code}});m.emit(i.SYNAPSE_REALTIME_EVENTS.ERROR,h),this.emitError(h)}}sendSocketAuthMessage(f){const m=this.assertConnection("sendSocketAuthMessage"),h={ev:n.SOCKET_EVENTS.AUTH,_id:Date.now().toString(),ts:Date.now(),data:{token:f}};m.sendMessage(h)}sendSocketPingMessage(){const f=this.assertConnection("sendSocketPingMessage"),m={ev:n.SOCKET_EVENTS.PING,_id:Date.now().toString(),ts:Date.now()};f.sendMessage(m)}async startRecording({onChunks:f,onError:m}){if(!f){const h=new u.RecordingError("onChunks is required",{context:{stage:"startRecording"},hint:"onChunks is required"});throw this.emitError(h),h}this.assertConnection("startRecording"),this.audioManager||(this.audioManager=new o.AudioManager);try{await this.audioManager.start(f,h=>{const g=this.toRecordingError(h,"Failed to start audio recording",{stage:"startRecording"});m?.(g),this.emitError(g)})}catch(h){const g=this.toRecordingError(h,"Failed to start audio recording",{stage:"startRecording"});throw m?.(g),this.emitError(g),g}}endRecordingWithSocket(){if(!this.audioManager){const f=new u.RecordingError("Audio manager not set. Call startRecording() first.",{context:{stage:"stopRecording"}});throw this.emitError(f),f}try{this.audioManager.stop()}catch(f){const m=this.toRecordingError(f,"Failed to stop audio recording",{stage:"stopRecording"});throw this.emitError(m),m}}sendSocketPongMessage(){const f=this.assertConnection("sendSocketPongMessage"),m={ev:n.SOCKET_EVENTS.PONG,_id:Date.now().toString(),ts:Date.now()};f.sendMessage(m)}handleConnectionEstablished(){this.connection?.handleConnected(),this.connection?.emit(i.SYNAPSE_REALTIME_EVENTS.CONNECTED)}cleanupMessageServerState(){this.fileManager&&(this.fileManager.clearPendingFilesState(),this.fileManager=null),this.audioManager&&(this.audioManager.destroy(),this.audioManager=null)}emitError(f){this.callbacks?.onError?.(f)}toFileError(f,m,h,g){return(0,u.normalizeError)(f,u.FileError,m,{context:h,hint:g})}toRecordingError(f,m,h,g){return(0,u.normalizeError)(f,u.RecordingError,m,{context:h,hint:g})}assertConnection(f){if(!this.connection){const m=new u.ConnectionError("Connection not set. Please ensure the connection is established before calling this method.",{context:{stage:f}});throw this.emitError(m),m}return this.connection}};return wa.MessageManager=s,wa}var Ta={},qh;function Ph(){if(qh)return Ta;qh=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.ErrorUtils=void 0;const n=Rn();class l{static isAPIError(o){return o instanceof n.APIError}static isNetworkError(o){return o instanceof n.APIError&&(o.status===0||o.status===void 0)}static isTimeoutError(o){return o instanceof n.APIConnectionTimeoutError}static isAuthError(o){return o instanceof n.UnauthorizedError||o instanceof n.PermissionDeniedError}static isClientError(o){return o instanceof n.APIError&&o.status!==void 0&&o.status>=400&&o.status<500}static isServerError(o){return o instanceof n.APIError&&o.status!==void 0&&o.status>=500}static getUserFriendlyMessage(o){return l.isNetworkError(o)?"Unable to connect to the server. Please check your internet connection.":l.isTimeoutError(o)?"Request timed out. Please try again.":l.isAuthError(o)?"Authentication failed. Please log in again.":l.isServerError(o)?"Server error occurred. Please try again later.":l.isAPIError(o)||o instanceof Error?o.message:"An unexpected error occurred."}static getErrorDetails(o){return l.isAPIError(o)?{type:o.name,message:o.message,code:o.code,status:o.status,timestamp:o.timestamp,stack:o.stack,context:o.context,hint:o.hint}:o instanceof n.SynapseError?{type:o.name,message:o.message,code:o.code,timestamp:o.timestamp,stack:o.stack,context:o.context,hint:o.hint}:o instanceof Error?{type:o.name,message:o.message,stack:o.stack}:{type:"Unknown",message:String(o)}}}return Ta.ErrorUtils=l,Ta}var Fh;function FS(){if(Fh)return pa;Fh=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.SynapseSDK=void 0;const n=Sh(),l=US(),i=Mh(),o=Hh(),u=Pl(),s=Ph(),c=Rn(),f=Hs();class m{connection=null;messageManager;resourceManager;sessionConfig=null;config;connectionType;constructor(g){this.config={...g,environment:g.environment||"production"},this.connectionType=g.connectionType||n.ConnectionType.SOCKET;const y=(0,l.getConfig)(this.config?.environment).BASE_API_URL;this.resourceManager=new i.ResourceManager({agentId:this.config.agentId,serverUrl:y})}async startSession(g){try{const y=await this.manageSession(g);return await this.initializeConnection(y),this.setupEventHandlers(),y}catch(y){const v=s.ErrorUtils.getUserFriendlyMessage(y),b=s.ErrorUtils.getErrorDetails(y),w=this.toSessionError(y,v||"Failed to start session",{stage:"startSession",details:b},"Check network connectivity or refresh credentials before retrying.");throw this.emitError(w),w}}async sendMessage({message:g,files:y,audio:v,tool_declined:b,tool_id:w,initial_prompts:E}){if(!this.connection){const T=new c.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"sendChatMessage"},hint:"Call startSession() and wait for connection before sending messages."});throw this.emitError(T),T}switch(this.connectionType){case n.ConnectionType.SOCKET:this.messageManager.sendSocketMessage({message:g,files:y,audio:v,...b&&{tool_declined:b},...w&&{tool_id:w},...E?.length&&{initial_prompts:E}});break;default:const T=new c.ConnectionError("Unsupported connection type",{context:{stage:"sendChatMessage",connectionType:this.connectionType}});throw this.emitError(T),T}}on(g,y){this.connection?.on(g,y)}off(g,y){this.connection?.off(g,y)}getSessionConfig(){if(!this.sessionConfig?.session_id||!this.sessionConfig?.session_token)throw new c.SessionError("Session ID or token not found",{context:{stage:"getSessionConfig"},hint:"Ensure the session API returns both identifiers."});return this.sessionConfig}async callTool(g,y){if(!this.connection){const v=new c.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"callTool"},hint:"Call startSession() before attempting to call tool."});throw this.emitError(v),v}if(!this.sessionConfig?.session_id){const v=new c.SessionError("Session ID not found",{context:{stage:"callTool"},hint:"Call startSession() before attempting to call tool."});throw this.emitError(v),v}switch(this.connectionType){case n.ConnectionType.SOCKET:try{const b=await this.resourceManager.callTool(this.sessionConfig.session_id,g,y);if(b.err)throw new c.APIError(b.err.msg,500,b.err);return b}catch(b){if(b instanceof c.APIError&&b?.status===401)return await this.handleSessionExpiry(),await this.callTool(g,y);throw b}default:const v=new c.ConnectionError("Unsupported connection type",{context:{stage:"callTool",connectionType:this.connectionType}});throw this.emitError(v),v}}async startRecording({onChunks:g,onError:y}){if(!this.connection){const v=new c.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"sendAudio"},hint:"Call startSession() before attempting to send audio."});throw this.emitError(v),v}switch(this.connectionType){case n.ConnectionType.SOCKET:try{await this.messageManager.startRecording({onChunks:g,onError:y})}catch(b){throw b}break;default:const v=new c.ConnectionError("Unsupported connection type",{context:{stage:"sendAudio",connectionType:this.connectionType}});throw this.emitError(v),v}}endRecording(){if(!this.connection){const g=new c.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"endRecording"},hint:"Call startRecording() before attempting to stop recording."});throw this.emitError(g),g}switch(this.connectionType){case n.ConnectionType.SOCKET:this.messageManager.endRecordingWithSocket();break;default:const g=new c.ConnectionError("Unsupported connection type",{context:{stage:"endRecording",connectionType:this.connectionType}});throw this.emitError(g),g}}isConnected(){return this.connection?.isConnected()??!1}endSession(){this.connection&&(this.connection.close(),this.connection=null),this.messageManager&&this.messageManager.cleanupMessageServerState()}emitError(g){this.config.callbacks?.onError?.(g)}toSessionError(g,y,v,b){return(0,c.normalizeError)(g,c.SessionError,y,{context:v,hint:b})}async initializeConnection(g){if(this.connection&&(this.connection.close(),this.connection=null),!g.session_id||!g.session_token)throw new c.SessionError("Session ID or token not found",{context:{stage:"initializeConnection"},hint:"Ensure the session API returns both identifiers."});this.sessionConfig=g;const y=(0,l.getConfig)(this.config?.environment).WEBSOCKET_URL,v=(this.config.connectionType==="socket",n.ConnectionType.SOCKET);this.connection=await n.ConnectionFactory.createConnection(v,{serverUrl:y,auth:{sessionId:g.session_id,sessionToken:g.session_token},agentId:this.config.agentId,userId:this.config.userId,overrides:this.config.overrides}),this.messageManager=new o.MessageManager(this.connection,this.config?.callbacks)}async manageSession(g){try{if(!g?.session_id)return this.createNewSession();const y=await this.resourceManager.validateSession(g.session_id);return y.active?g:y.expired?this.refreshSession(g.session_id,g.session_token):this.createNewSession()}catch(y){if(y instanceof c.APIError){const v=y.status;if(v===404||v===500)return this.createNewSession()}throw this.toSessionError(y,"Failed to resolve session",{stage:"resolveSession"})}}async refreshSession(g,y){try{return await this.resourceManager.refreshSession(g,y)}catch(v){if(v instanceof c.APIError){this.emitError(v);const b=v.status;if(b===404||b===500)return this.createNewSession()}throw this.toSessionError(v,"Failed to refresh session",{stage:"refreshSession",sessionId:g})}}async createNewSession(){return await this.resourceManager.createSession(this.config.userId||Date.now().toString())}setupEventHandlers(){if(this.connection){switch(this.connectionType){case n.ConnectionType.SOCKET:this.connection.onOpen(()=>{this.onSocketConnectionOpen()}),this.connection.onMessage(g=>{this.onIncomingSocketMessage(g)}),this.connection.onError(g=>{this.onSocketConnectionError(g)}),this.connection.on(u.SYNAPSE_REALTIME_RESERVED_EVENTS.SESSION_EXPIRED,()=>{this.handleSessionExpiry()});break;default:throw new c.ConnectionError("Unsupported connection type",{context:{stage:"setupEventHandlers",connectionType:this.connectionType},hint:"Use ConnectionType.SOCKET or provide a custom handler."})}this.connection.onDisconnect(g=>{this.messageManager.handleDisconnect(g)})}}onSocketConnectionError(g){this.connection?.emit(u.SYNAPSE_REALTIME_EVENTS.ERROR,g);const y=this.toConnectionError(g,"WebSocket connection error",{stage:"onSocketConnectionError"},"Verify network connectivity or attempt to reconnect.");this.emitError(y)}onSocketConnectionOpen(){if(!this.sessionConfig?.session_token){const g=new c.SessionError("Session token not set. Call startSession() first.",{context:{stage:"onSocketConnectionOpen"},hint:"Ensure startSession() completes successfully before socket opens."});throw this.emitError(g),g}this.messageManager.sendSocketAuthMessage(this.sessionConfig.session_token)}onIncomingSocketMessage(g){switch(g.ev){case f.SOCKET_EVENTS.CHAT:this.messageManager.handleIncomingSocketChatMessage(g);break;case f.SOCKET_EVENTS.CONNECTION_ESTABLISHED:this.messageManager.handleConnectionEstablished();break;case f.SOCKET_EVENTS.STREAM:this.messageManager.handleIncomingSocketStreamMessage(g);break;case f.SOCKET_EVENTS.END_OF_STREAM:this.messageManager.handleIncomingSocketEndOfStreamMessage(g);break;case f.SOCKET_EVENTS.PING:this.messageManager.sendSocketPongMessage();break;case f.SOCKET_EVENTS.PONG:this.messageManager.sendSocketPingMessage();break;case f.SOCKET_EVENTS.SYNC:break;case f.SOCKET_EVENTS.ERROR:this.messageManager.handleIncomingSocketErrorMessage(g);break;default:const y=new c.MessageError("Unsupported message type",{context:{stage:"onIncomingSocketMessage",event:g.ev??"unknown"},hint:"Ensure the server is sending supported socket events."});this.emitError(y);return}}async handleSessionExpiry(){try{if(this.endSession(),!this.sessionConfig?.session_id||!this.sessionConfig?.session_token){const y=new c.SessionError("Session ID or token not found",{context:{stage:"handleSessionExpiry"}});throw this.emitError(y),y}const g=await this.refreshSession(this.sessionConfig.session_id,this.sessionConfig.session_token);if(!g.session_id||!g.session_token)throw new c.SessionError("Session refresh failed",{context:{stage:"handleSessionExpiry"}});this.sessionConfig.session_id=g.session_id,this.sessionConfig.session_token=g.session_token,await this.initializeConnection(g),this.setupEventHandlers(),this.config.callbacks?.onSessionRefreshed?.(g)}catch(g){const y=this.toSessionError(g,"Session expired",{stage:"handleSessionExpiry"});this.emitError(y)}}toConnectionError(g,y,v,b){return(0,c.normalizeError)(g,c.ConnectionError,y,{context:v,hint:b})}}return pa.SynapseSDK=m,pa}var Ps={},Yh;function YS(){return Yh||(Yh=1,Object.defineProperty(Ps,"__esModule",{value:!0})),Ps}var Aa={},Vh;function VS(){return Vh||(Vh=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.USER_FEEDBACK=void 0,Aa.USER_FEEDBACK={LIKE:"LIKE",DISLIKE:"DISLIKE",NONE:"NONE"}),Aa}var Fs={},Gh;function GS(){return Gh||(Gh=1,Object.defineProperty(Fs,"__esModule",{value:!0})),Fs}var ka={},Xh;function XS(){return Xh||(Xh=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.ErrorType=void 0,ka.ErrorType={NETWORK_ERROR:"NETWORK_ERROR",TIMEOUT_ERROR:"TIMEOUT_ERROR",API_ERROR:"API_ERROR",RATE_LIMIT_ERROR:"RATE_LIMIT_ERROR",SERVER_ERROR:"SERVER_ERROR",PARSE_ERROR:"PARSE_ERROR",UNKNOWN_ERROR:"UNKNOWN_ERROR"}),ka}var Ys={},Zh;function ZS(){return Zh||(Zh=1,Object.defineProperty(Ys,"__esModule",{value:!0})),Ys}var Kh;function KS(){return Kh||(Kh=1,(function(n){var l=Hr&&Hr.__createBinding||(Object.create?(function(T,_,A,k){k===void 0&&(k=A);var q=Object.getOwnPropertyDescriptor(_,A);(!q||("get"in q?!_.__esModule:q.writable||q.configurable))&&(q={enumerable:!0,get:function(){return _[A]}}),Object.defineProperty(T,k,q)}):(function(T,_,A,k){k===void 0&&(k=A),T[k]=_[A]})),i=Hr&&Hr.__exportStar||function(T,_){for(var A in T)A!=="default"&&!Object.prototype.hasOwnProperty.call(_,A)&&l(_,T,A)};Object.defineProperty(n,"__esModule",{value:!0}),n.SYNAPSE_MESSAGE_TYPES=n.ErrorUtils=n.ErrorType=n.SynapseErrorCode=n.InternalServerError=n.RateLimitError=n.MethodNotAllowedError=n.NotFoundError=n.PermissionDeniedError=n.UnauthorizedError=n.BadRequestError=n.APIConnectionTimeoutError=n.APIUserAbortError=n.APIError=n.SynapseError=n.HttpClient=n.MessageManager=n.ToolCall=n.Session=n.ResourceManager=n.ConnectionType=n.ConnectionFactory=n.WebSocketConnection=n.BaseConnection=n.SynapseSDK=void 0;var o=FS();Object.defineProperty(n,"SynapseSDK",{enumerable:!0,get:function(){return o.SynapseSDK}});var u=ph();Object.defineProperty(n,"BaseConnection",{enumerable:!0,get:function(){return u.BaseConnection}});var s=bh();Object.defineProperty(n,"WebSocketConnection",{enumerable:!0,get:function(){return s.WebSocketConnection}});var c=Sh();Object.defineProperty(n,"ConnectionFactory",{enumerable:!0,get:function(){return c.ConnectionFactory}}),Object.defineProperty(n,"ConnectionType",{enumerable:!0,get:function(){return c.ConnectionType}}),i(Is(),n);var f=Mh();Object.defineProperty(n,"ResourceManager",{enumerable:!0,get:function(){return f.ResourceManager}}),i(YS(),n);var m=Ah();Object.defineProperty(n,"Session",{enumerable:!0,get:function(){return m.Session}}),i(VS(),n);var h=Oh();Object.defineProperty(n,"ToolCall",{enumerable:!0,get:function(){return h.ToolCall}}),i(Nh(),n);var g=Hh();Object.defineProperty(n,"MessageManager",{enumerable:!0,get:function(){return g.MessageManager}}),i(Pl(),n),i(GS(),n);var y=_h();Object.defineProperty(n,"HttpClient",{enumerable:!0,get:function(){return y.HttpClient}});var v=Rn();Object.defineProperty(n,"SynapseError",{enumerable:!0,get:function(){return v.SynapseError}}),Object.defineProperty(n,"APIError",{enumerable:!0,get:function(){return v.APIError}}),Object.defineProperty(n,"APIUserAbortError",{enumerable:!0,get:function(){return v.APIUserAbortError}}),Object.defineProperty(n,"APIConnectionTimeoutError",{enumerable:!0,get:function(){return v.APIConnectionTimeoutError}}),Object.defineProperty(n,"BadRequestError",{enumerable:!0,get:function(){return v.BadRequestError}}),Object.defineProperty(n,"UnauthorizedError",{enumerable:!0,get:function(){return v.UnauthorizedError}}),Object.defineProperty(n,"PermissionDeniedError",{enumerable:!0,get:function(){return v.PermissionDeniedError}}),Object.defineProperty(n,"NotFoundError",{enumerable:!0,get:function(){return v.NotFoundError}}),Object.defineProperty(n,"MethodNotAllowedError",{enumerable:!0,get:function(){return v.MethodNotAllowedError}}),Object.defineProperty(n,"RateLimitError",{enumerable:!0,get:function(){return v.RateLimitError}}),Object.defineProperty(n,"InternalServerError",{enumerable:!0,get:function(){return v.InternalServerError}}),Object.defineProperty(n,"SynapseErrorCode",{enumerable:!0,get:function(){return v.SynapseErrorCode}});var b=XS();Object.defineProperty(n,"ErrorType",{enumerable:!0,get:function(){return b.ErrorType}});var w=Ph();Object.defineProperty(n,"ErrorUtils",{enumerable:!0,get:function(){return w.ErrorUtils}}),i(ZS(),n);var E=Pl();Object.defineProperty(n,"SYNAPSE_MESSAGE_TYPES",{enumerable:!0,get:function(){return E.SYNAPSE_MESSAGE_TYPES}})})(Hr)),Hr}var Ge=KS();const Qh=n=>{let l;const i=new Set,o=(h,g)=>{const y=typeof h=="function"?h(l):h;if(!Object.is(y,l)){const v=l;l=g??(typeof y!="object"||y===null)?y:Object.assign({},l,y),i.forEach(b=>b(l,v))}},u=()=>l,f={setState:o,getState:u,getInitialState:()=>m,subscribe:h=>(i.add(h),()=>i.delete(h))},m=l=n(o,u,f);return f},QS=(n=>n?Qh(n):Qh),JS=n=>n;function WS(n,l=JS){const i=sa.useSyncExternalStore(n.subscribe,sa.useCallback(()=>l(n.getState()),[n,l]),sa.useCallback(()=>l(n.getInitialState()),[n,l]));return sa.useDebugValue(i),i}const $S=n=>{const l=QS(n),i=o=>WS(l,o);return Object.assign(i,l),i},e1=(n=>$S);function Jh(n,l){let i;try{i=n()}catch{return}return{getItem:u=>{var s;const c=m=>m===null?null:JSON.parse(m,void 0),f=(s=i.getItem(u))!=null?s:null;return f instanceof Promise?f.then(c):c(f)},setItem:(u,s)=>i.setItem(u,JSON.stringify(s,void 0)),removeItem:u=>i.removeItem(u)}}const Vs=n=>l=>{try{const i=n(l);return i instanceof Promise?i:{then(o){return Vs(o)(i)},catch(o){return this}}}catch(i){return{then(o){return this},catch(o){return Vs(o)(i)}}}},t1=(n,l)=>(i,o,u)=>{let s={storage:Jh(()=>localStorage),partialize:E=>E,version:0,merge:(E,T)=>({...T,...E}),...l},c=!1;const f=new Set,m=new Set;let h=s.storage;if(!h)return n((...E)=>{i(...E)},o,u);const g=()=>{const E=s.partialize({...o()});return h.setItem(s.name,{state:E,version:s.version})},y=u.setState;u.setState=(E,T)=>(y(E,T),g());const v=n((...E)=>(i(...E),g()),o,u);u.getInitialState=()=>v;let b;const w=()=>{var E,T;if(!h)return;c=!1,f.forEach(A=>{var k;return A((k=o())!=null?k:v)});const _=((T=s.onRehydrateStorage)==null?void 0:T.call(s,(E=o())!=null?E:v))||void 0;return Vs(h.getItem.bind(h))(s.name).then(A=>{if(A)if(typeof A.version=="number"&&A.version!==s.version){if(s.migrate){const k=s.migrate(A.state,A.version);return k instanceof Promise?k.then(q=>[!0,q]):[!0,k]}}else return[!1,A.state];return[!1,void 0]}).then(A=>{var k;const[q,H]=A;if(b=s.merge(H,(k=o())!=null?k:v),i(b,!0),q)return g()}).then(()=>{_?.(b,void 0),b=o(),c=!0,m.forEach(A=>A(b))}).catch(A=>{_?.(void 0,A)})};return u.persist={setOptions:E=>{s={...s,...E},E.storage&&(h=E.storage)},clearStorage:()=>{h?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>w(),hasHydrated:()=>c,onHydrate:E=>(f.add(E),()=>{f.delete(E)}),onFinishHydration:E=>(m.add(E),()=>{m.delete(E)})},s.skipHydration||w(),b||v},On={USER:"user",ASSISTANT:"assistant"};var Ft=(n=>(n.IDLE="idle",n.LISTENING="listening",n.ERROR="error",n.PROCESSING="processing",n.TRANSCRIBING="transcribing",n))(Ft||{});const n1={sessionId:"",sessionToken:"",isStreaming:!1,recordingStatus:Ft.IDLE,isWaitingForResponse:!1,error:null,isTimeoutError:!1,startNewConnection:!1,showRetryButton:!1,chats:{},inlineText:null,isRefreshingSession:!1,ConnectionStatus:Ge.ConnectionStatus.CONNECTING,streamingTimeoutId:null,responseTimeoutId:null,lastStreamingActivity:null,progressMessage:null},Yr=e1()(t1((n,l)=>({sessionId:"",setSessionId:i=>n({sessionId:i}),sessionToken:"",setSessionToken:i=>n({sessionToken:i}),initialMessage:null,setInitialMessage:i=>n({initialMessage:i}),agentId:"",setAgentId:i=>n({agentId:i}),connectionStatus:Ge.ConnectionStatus.CONNECTING,setConnectionStatus:i=>n({connectionStatus:i}),isStreaming:!1,setIsStreaming:i=>n({isStreaming:i}),isWaitingForResponse:!1,setIsWaitingForResponse:i=>n({isWaitingForResponse:i}),progressMessage:null,setProgressMessage:i=>n({progressMessage:i}),recordingStatus:Ft.IDLE,setRecordingStatus:i=>n({recordingStatus:i}),startNewConnection:!1,setStartNewConnection:i=>n({startNewConnection:i}),inlineText:null,setInlineText:i=>n({inlineText:i}),isBotIconAnimating:!1,setIsBotIconAnimating:i=>n({isBotIconAnimating:i}),chats:{},addMessageToSession:(i,o)=>{n(u=>({chats:{...u.chats,[i]:[...u.chats[i]||[],o]}}))},updateMessageInSession:(i,o,u)=>n(s=>({chats:{...s.chats,[i]:(s.chats[i]||[]).map(c=>c.id===o?{...c,...u}:c)}})),getMessagesForSession:i=>l().chats[i]||[],clearMessagesForSession:i=>n(o=>({chats:{...o.chats,[i]:[]}})),clearAllChats:()=>n({chats:{}}),error:null,setError:i=>n({error:i}),clearError:()=>n({error:null,isTimeoutError:!1,showRetryButton:!1,startNewConnection:!1}),showRetryButton:!1,setShowRetryButton:i=>n({showRetryButton:i}),isTimeoutError:!1,setTimeoutError:i=>n({isTimeoutError:i}),clearSession:async()=>{n(n1),await localStorage.removeItem("med-assist-store")},streamingTimeoutId:null,setStreamingTimeoutId:i=>n({streamingTimeoutId:i}),clearStreamingTimeout:()=>{const i=l();i.streamingTimeoutId&&(clearTimeout(i.streamingTimeoutId),n({streamingTimeoutId:null}))},responseTimeoutId:null,setResponseTimeoutId:i=>n({responseTimeoutId:i}),clearResponseTimeout:()=>{const i=l();i.responseTimeoutId&&(clearTimeout(i.responseTimeoutId),n({responseTimeoutId:null}))},lastStreamingActivity:null,setLastStreamingActivity:i=>n({lastStreamingActivity:i})}),{name:"med-assist-store",storage:Jh(()=>localStorage),partialize:n=>({agentId:n.agentId,chats:n.chats,sessionId:n.sessionId,sessionToken:n.sessionToken,initialMessage:n.initialMessage,connectionStatus:n.connectionStatus})}));function r1({onClose:n,title:l,iconUrl:i,startNewConversation:o}){const u=Yr(f=>f.connectionStatus),c=(()=>{switch(u){case Ge.ConnectionStatus.CONNECTED:return{dotColor:"bg-green-500",text:"Connected",textColor:"text-green-600"};case Ge.ConnectionStatus.CONNECTING:return{dotColor:"bg-amber-500",text:"Connecting",textColor:"text-amber-600"};case Ge.ConnectionStatus.NOT_CONNECTED:return{dotColor:"bg-red-500",text:"Not Connected",textColor:"text-red-600"};default:return{dotColor:"bg-gray-400",text:"Not Connected",textColor:"text-gray-600"}}})();return O.jsx("div",{className:"bg-lavender-100/95 backdrop-blur-md shadow-lg border-b border-lavender-200/60 px-6 py-2",children:O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsxs("div",{className:"flex items-center gap-3",children:[O.jsxs("div",{className:"relative flex-shrink-0",children:[O.jsx(ha,{className:"w-12 h-12 bg-gradient-to-br from-lavender-400 to-lavender-500 flex-shrink-0 shadow-md ring-0",children:O.jsx(ma,{className:"text-white font-bold text-lg bg-transparent",children:i?O.jsx("img",{src:i,alt:"Bot Icon",className:"w-12 h-12 rounded-full object-cover"}):O.jsx("span",{className:"text-white font-bold text-lg bg-transparent",children:"MC"})})}),O.jsx("div",{className:Ye("absolute bottom-0 right-0 w-3.5 h-3.5 rounded-full border-2 border-white shadow-sm",c.dotColor,u===Ge.ConnectionStatus.CONNECTING&&"animate-pulse")})]}),O.jsxs("div",{className:"flex flex-col",children:[O.jsx("p",{className:"text-lg font-semibold text-slate-900",children:l||"Health Assist"}),O.jsx("div",{className:"flex items-center gap-1.5",children:O.jsx("span",{className:Ye("text-xs font-medium",c.textColor),children:c.text})})]})]}),O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(kt,{type:"button",variant:"ghost",size:"icon",title:"Start New Chat",onClick:o,className:"h-8 w-8 text-slate-600 hover:text-slate-900 hover:bg-white/60 active:bg-white/80 rounded-xl transition-all duration-200",children:O.jsx(vS,{className:"w-8 h-8"})}),O.jsx(kt,{onClick:n,type:"button",variant:"ghost",size:"icon",title:"Close",className:"h-8 w-8 text-slate-600 hover:text-slate-900 hover:bg-white/60 active:bg-white/80 rounded-xl transition-all duration-200",children:O.jsx(Os,{className:"w-8 h-8"})})]})]})})}const i1=P.lazy(()=>Promise.resolve().then(()=>m1));function a1({isOpen:n,onClose:l,iconUrl:i,onStartNewSession:o,children:u,title:s,sessionId:c,chatComposer:f,environment:m}){const[h,g]=P.useState(!1),y=P.useRef(null);P.useEffect(()=>{const w=()=>{const E=window?.innerWidth??0,T=navigator?.userAgent?.toLowerCase()??"",_=E<768||/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(T);g(_)};return w(),window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},[]),P.useEffect(()=>{if(!n||!h||!y.current)return;const w=y.current;let E=null,T=null;if(window.visualViewport){const _=()=>{if(w&&window.visualViewport){const q=window.visualViewport.height,H=window.visualViewport.offsetTop;E=requestAnimationFrame(()=>{w.style.transition="none",w.style.top=`${H}px`,w.style.left="0",w.style.right="0",w.style.bottom="auto",w.style.width="100vw",w.style.height=`${q}px`,w.style.maxHeight=`${q}px`,w.style.minHeight=`${q}px`,T&&clearTimeout(T),T=setTimeout(()=>{w.style.transition=""},100)})}},A=()=>{_()},k=()=>{if(w&&window.visualViewport){const q=window.visualViewport.offsetTop;E=requestAnimationFrame(()=>{w.style.transition="none",w.style.top=`${q}px`,setTimeout(()=>{w.style.transition=""},50)})}};return window.visualViewport.addEventListener("resize",A),window.visualViewport.addEventListener("scroll",k),_(),()=>{E&&cancelAnimationFrame(E),T&&clearTimeout(T),window.visualViewport?.removeEventListener("resize",A),window.visualViewport?.removeEventListener("scroll",k)}}else{const _=()=>{w&&(w.style.transition="none",w.style.top="0",w.style.left="0",w.style.right="0",w.style.bottom="auto",w.style.width="100vw",w.style.height="100svh",w.style.maxHeight="100svh",setTimeout(()=>{w.style.transition=""},100))};return window.addEventListener("resize",_),_(),()=>{window.removeEventListener("resize",_)}}},[n,h]),P.useEffect(()=>{if(n){const w=document.body.style.overflow,E=document.body.style.paddingRight,T=document.documentElement.style.overflow,_=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",_>0&&!h&&(document.body.style.paddingRight=`${_}px`),()=>{document.body.style.overflow=w,document.body.style.paddingRight=E,document.documentElement.style.overflow=T}}},[n,h]);const v=Ye("synapse-chat-widget-container","fixed m-0 p-0","box-border",h?"":"transition-all duration-300",h?"w-screen h-[100svh]":"bottom-4 right-4 w-96 h-[600px]","z-[2147483647]",n?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none scale-95"),b=Ye("w-full h-full",h?"bg-white":"bg-white/90 backdrop-blur-2xl","shadow-2xl","flex flex-col","overflow-hidden","border border-white/50 ring-1 ring-white/60",h?"rounded-none":"rounded-3xl");return O.jsxs("div",{ref:y,className:v,style:{margin:0,padding:0,border:"none",outline:"none",position:"fixed",zIndex:2147483647,fontSize:"16px",lineHeight:"2.5",userSelect:"auto",...h&&{top:0,left:0,right:0,bottom:0,width:"100vw",maxHeight:"100svh",height:"100svh",minHeight:"100svh",backgroundColor:"white"}},children:[O.jsx("style",{children:`
|
|
8
|
+
`+a.stack}}var G=Object.prototype.hasOwnProperty,he=n.unstable_scheduleCallback,be=n.unstable_cancelCallback,se=n.unstable_shouldYield,Ee=n.unstable_requestPaint,_e=n.unstable_now,Ce=n.unstable_getCurrentPriorityLevel,te=n.unstable_ImmediatePriority,ve=n.unstable_UserBlockingPriority,Te=n.unstable_NormalPriority,Ie=n.unstable_LowPriority,Je=n.unstable_IdlePriority,pt=n.log,Pt=n.unstable_setDisableYieldValue,Xe=null,gt=null;function Ot(e){if(typeof pt=="function"&&Pt(e),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(Xe,e)}catch{}}var Ze=Math.clz32?Math.clz32:zu,Tn=Math.log,rn=Math.LN2;function zu(e){return e>>>=0,e===0?32:31-(Tn(e)/rn|0)|0}var _i=256,Xr=262144,jn=4194304;function mn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $l(e,t,r){var a=e.pendingLanes;if(a===0)return 0;var d=0,p=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var O=a&134217727;return O!==0?(a=O&~p,a!==0?d=mn(a):(x&=O,x!==0?d=mn(x):r||(r=O&~e,r!==0&&(d=mn(r))))):(O=a&~p,O!==0?d=mn(O):x!==0?d=mn(x):r||(r=a&~e,r!==0&&(d=mn(r)))),d===0?0:t!==0&&t!==d&&(t&p)===0&&(p=d&-d,r=t&-t,p>=r||p===32&&(r&4194048)!==0)?t:d}function Ua(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ww(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Op(){var e=jn;return jn<<=1,(jn&62914560)===0&&(jn=4194304),e}function Mu(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ha(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $w(e,t,r,a,d,p){var x=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var O=e.entanglements,V=e.expirationTimes,le=e.hiddenUpdates;for(r=x&~r;0<r;){var me=31-Ze(r),ge=1<<me;O[me]=0,V[me]=-1;var ue=le[me];if(ue!==null)for(le[me]=null,me=0;me<ue.length;me++){var fe=ue[me];fe!==null&&(fe.lane&=-536870913)}r&=~ge}a!==0&&zp(e,a,0),p!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=p&~(x&~t))}function zp(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Ze(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|r&261930}function Mp(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var a=31-Ze(r),d=1<<a;d&t|e[a]&t&&(e[a]|=t),r&=~d}}function Dp(e,t){var r=t&-t;return r=(r&42)!==0?1:Du(r),(r&(e.suspendedLanes|t))!==0?0:r}function Du(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ju(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function jp(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:Sb(e.type))}function Lp(e,t){var r=K.p;try{return K.p=e,t()}finally{K.p=r}}var pr=Math.random().toString(36).slice(2),Dt="__reactFiber$"+pr,Xt="__reactProps$"+pr,wi="__reactContainer$"+pr,Lu="__reactEvents$"+pr,e2="__reactListeners$"+pr,t2="__reactHandles$"+pr,Ip="__reactResources$"+pr,qa="__reactMarker$"+pr;function Iu(e){delete e[Dt],delete e[Xt],delete e[Lu],delete e[e2],delete e[t2]}function Ci(e){var t=e[Dt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[wi]||r[Dt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=ib(e);e!==null;){if(r=e[Dt])return r;e=ib(e)}return t}e=r,r=e.parentNode}return null}function Ti(e){if(e=e[Dt]||e[wi]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Pa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Ai(e){var t=e[Ip];return t||(t=e[Ip]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function zt(e){e[qa]=!0}var Bp=new Set,Up={};function Zr(e,t){ki(e,t),ki(e+"Capture",t)}function ki(e,t){for(Up[e]=t,e=0;e<t.length;e++)Bp.add(t[e])}var n2=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Hp={},qp={};function r2(e){return G.call(qp,e)?!0:G.call(Hp,e)?!1:n2.test(e)?qp[e]=!0:(Hp[e]=!0,!1)}function eo(e,t,r){if(r2(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function to(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function Yn(e,t,r,a){if(a===null)e.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+a)}}function pn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function i2(e,t,r){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var d=a.get,p=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(x){r=""+x,p.call(this,x)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return r},setValue:function(x){r=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bu(e){if(!e._valueTracker){var t=Pp(e)?"checked":"value";e._valueTracker=i2(e,t,""+e[t])}}function Fp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),a="";return e&&(a=Pp(e)?e.checked?"true":"false":e.value),e=a,e!==r?(t.setValue(e),!0):!1}function no(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var a2=/[\n"\\]/g;function gn(e){return e.replace(a2,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Uu(e,t,r,a,d,p,x,O){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+pn(t)):e.value!==""+pn(t)&&(e.value=""+pn(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Hu(e,x,pn(t)):r!=null?Hu(e,x,pn(r)):a!=null&&e.removeAttribute("value"),d==null&&p!=null&&(e.defaultChecked=!!p),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?e.name=""+pn(O):e.removeAttribute("name")}function Yp(e,t,r,a,d,p,x,O){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.type=p),t!=null||r!=null){if(!(p!=="submit"&&p!=="reset"||t!=null)){Bu(e);return}r=r!=null?""+pn(r):"",t=t!=null?""+pn(t):r,O||t===e.value||(e.value=t),e.defaultValue=t}a=a??d,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=O?e.checked:!!a,e.defaultChecked=!!a,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Bu(e)}function Hu(e,t,r){t==="number"&&no(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function Ni(e,t,r,a){if(e=e.options,t){t={};for(var d=0;d<r.length;d++)t["$"+r[d]]=!0;for(r=0;r<e.length;r++)d=t.hasOwnProperty("$"+e[r].value),e[r].selected!==d&&(e[r].selected=d),d&&a&&(e[r].defaultSelected=!0)}else{for(r=""+pn(r),t=null,d=0;d<e.length;d++){if(e[d].value===r){e[d].selected=!0,a&&(e[d].defaultSelected=!0);return}t!==null||e[d].disabled||(t=e[d])}t!==null&&(t.selected=!0)}}function Vp(e,t,r){if(t!=null&&(t=""+pn(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+pn(r):""}function Gp(e,t,r,a){if(t==null){if(a!=null){if(r!=null)throw Error(o(92));if(X(a)){if(1<a.length)throw Error(o(93));a=a[0]}r=a}r==null&&(r=""),t=r}r=pn(t),e.defaultValue=r,a=e.textContent,a===r&&a!==""&&a!==null&&(e.value=a),Bu(e)}function Ri(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var l2=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Xp(e,t,r){var a=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,r):typeof r!="number"||r===0||l2.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function Zp(e,t,r){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,r!=null){for(var a in r)!r.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var d in t)a=t[d],t.hasOwnProperty(d)&&r[d]!==a&&Xp(e,d,a)}else for(var p in t)t.hasOwnProperty(p)&&Xp(e,p,t[p])}function qu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var o2=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),s2=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ro(e){return s2.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Vn(){}var Pu=null;function Fu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Oi=null,zi=null;function Kp(e){var t=Ti(e);if(t&&(e=t.stateNode)){var r=e[Xt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Uu(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+gn(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var a=r[t];if(a!==e&&a.form===e.form){var d=a[Xt]||null;if(!d)throw Error(o(90));Uu(a,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(t=0;t<r.length;t++)a=r[t],a.form===e.form&&Fp(a)}break e;case"textarea":Vp(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&Ni(e,!!r.multiple,t,!1)}}}var Yu=!1;function Qp(e,t,r){if(Yu)return e(t,r);Yu=!0;try{var a=e(t);return a}finally{if(Yu=!1,(Oi!==null||zi!==null)&&(Vo(),Oi&&(t=Oi,e=zi,zi=Oi=null,Kp(t),e)))for(t=0;t<e.length;t++)Kp(e[t])}}function Fa(e,t){var r=e.stateNode;if(r===null)return null;var a=r[Xt]||null;if(a===null)return null;r=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(o(231,t,typeof r));return r}var Gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vu=!1;if(Gn)try{var Ya={};Object.defineProperty(Ya,"passive",{get:function(){Vu=!0}}),window.addEventListener("test",Ya,Ya),window.removeEventListener("test",Ya,Ya)}catch{Vu=!1}var gr=null,Gu=null,io=null;function Jp(){if(io)return io;var e,t=Gu,r=t.length,a,d="value"in gr?gr.value:gr.textContent,p=d.length;for(e=0;e<r&&t[e]===d[e];e++);var x=r-e;for(a=1;a<=x&&t[r-a]===d[p-a];a++);return io=d.slice(e,1<a?1-a:void 0)}function ao(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function lo(){return!0}function Wp(){return!1}function Zt(e){function t(r,a,d,p,x){this._reactName=r,this._targetInst=d,this.type=a,this.nativeEvent=p,this.target=x,this.currentTarget=null;for(var O in e)e.hasOwnProperty(O)&&(r=e[O],this[O]=r?r(p):p[O]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?lo:Wp,this.isPropagationStopped=Wp,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=lo)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=lo)},persist:function(){},isPersistent:lo}),t}var Kr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oo=Zt(Kr),Va=y({},Kr,{view:0,detail:0}),u2=Zt(Va),Xu,Zu,Ga,so=y({},Va,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ga&&(Ga&&e.type==="mousemove"?(Xu=e.screenX-Ga.screenX,Zu=e.screenY-Ga.screenY):Zu=Xu=0,Ga=e),Xu)},movementY:function(e){return"movementY"in e?e.movementY:Zu}}),$p=Zt(so),c2=y({},so,{dataTransfer:0}),f2=Zt(c2),d2=y({},Va,{relatedTarget:0}),Ku=Zt(d2),h2=y({},Kr,{animationName:0,elapsedTime:0,pseudoElement:0}),m2=Zt(h2),p2=y({},Kr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),g2=Zt(p2),y2=y({},Kr,{data:0}),eg=Zt(y2),b2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},v2={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},S2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function E2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=S2[e])?!!t[e]:!1}function Qu(){return E2}var x2=y({},Va,{key:function(e){if(e.key){var t=b2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ao(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?v2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qu,charCode:function(e){return e.type==="keypress"?ao(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ao(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_2=Zt(x2),w2=y({},so,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tg=Zt(w2),C2=y({},Va,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qu}),T2=Zt(C2),A2=y({},Kr,{propertyName:0,elapsedTime:0,pseudoElement:0}),k2=Zt(A2),N2=y({},so,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),R2=Zt(N2),O2=y({},Kr,{newState:0,oldState:0}),z2=Zt(O2),M2=[9,13,27,32],Ju=Gn&&"CompositionEvent"in window,Xa=null;Gn&&"documentMode"in document&&(Xa=document.documentMode);var D2=Gn&&"TextEvent"in window&&!Xa,ng=Gn&&(!Ju||Xa&&8<Xa&&11>=Xa),rg=" ",ig=!1;function ag(e,t){switch(e){case"keyup":return M2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mi=!1;function j2(e,t){switch(e){case"compositionend":return lg(t);case"keypress":return t.which!==32?null:(ig=!0,rg);case"textInput":return e=t.data,e===rg&&ig?null:e;default:return null}}function L2(e,t){if(Mi)return e==="compositionend"||!Ju&&ag(e,t)?(e=Jp(),io=Gu=gr=null,Mi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ng&&t.locale!=="ko"?null:t.data;default:return null}}var I2={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function og(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!I2[e.type]:t==="textarea"}function sg(e,t,r,a){Oi?zi?zi.push(a):zi=[a]:Oi=a,t=Wo(t,"onChange"),0<t.length&&(r=new oo("onChange","change",null,r,a),e.push({event:r,listeners:t}))}var Za=null,Ka=null;function B2(e){Y0(e,0)}function uo(e){var t=Pa(e);if(Fp(t))return e}function ug(e,t){if(e==="change")return t}var cg=!1;if(Gn){var Wu;if(Gn){var $u="oninput"in document;if(!$u){var fg=document.createElement("div");fg.setAttribute("oninput","return;"),$u=typeof fg.oninput=="function"}Wu=$u}else Wu=!1;cg=Wu&&(!document.documentMode||9<document.documentMode)}function dg(){Za&&(Za.detachEvent("onpropertychange",hg),Ka=Za=null)}function hg(e){if(e.propertyName==="value"&&uo(Ka)){var t=[];sg(t,Ka,e,Fu(e)),Qp(B2,t)}}function U2(e,t,r){e==="focusin"?(dg(),Za=t,Ka=r,Za.attachEvent("onpropertychange",hg)):e==="focusout"&&dg()}function H2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return uo(Ka)}function q2(e,t){if(e==="click")return uo(t)}function P2(e,t){if(e==="input"||e==="change")return uo(t)}function F2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var an=typeof Object.is=="function"?Object.is:F2;function Qa(e,t){if(an(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(a=0;a<r.length;a++){var d=r[a];if(!G.call(t,d)||!an(e[d],t[d]))return!1}return!0}function mg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pg(e,t){var r=mg(e);e=0;for(var a;r;){if(r.nodeType===3){if(a=e+r.textContent.length,e<=t&&a>=t)return{node:r,offset:t-e};e=a}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=mg(r)}}function gg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=no(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=no(e.document)}return t}function ec(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Y2=Gn&&"documentMode"in document&&11>=document.documentMode,Di=null,tc=null,Ja=null,nc=!1;function bg(e,t,r){var a=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;nc||Di==null||Di!==no(a)||(a=Di,"selectionStart"in a&&ec(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ja&&Qa(Ja,a)||(Ja=a,a=Wo(tc,"onSelect"),0<a.length&&(t=new oo("onSelect","select",null,t,r),e.push({event:t,listeners:a}),t.target=Di)))}function Qr(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var ji={animationend:Qr("Animation","AnimationEnd"),animationiteration:Qr("Animation","AnimationIteration"),animationstart:Qr("Animation","AnimationStart"),transitionrun:Qr("Transition","TransitionRun"),transitionstart:Qr("Transition","TransitionStart"),transitioncancel:Qr("Transition","TransitionCancel"),transitionend:Qr("Transition","TransitionEnd")},rc={},vg={};Gn&&(vg=document.createElement("div").style,"AnimationEvent"in window||(delete ji.animationend.animation,delete ji.animationiteration.animation,delete ji.animationstart.animation),"TransitionEvent"in window||delete ji.transitionend.transition);function Jr(e){if(rc[e])return rc[e];if(!ji[e])return e;var t=ji[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in vg)return rc[e]=t[r];return e}var Sg=Jr("animationend"),Eg=Jr("animationiteration"),xg=Jr("animationstart"),V2=Jr("transitionrun"),G2=Jr("transitionstart"),X2=Jr("transitioncancel"),_g=Jr("transitionend"),wg=new Map,ic="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ic.push("scrollEnd");function An(e,t){wg.set(e,t),Zr(t,[e])}var co=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}},yn=[],Li=0,ac=0;function fo(){for(var e=Li,t=ac=Li=0;t<e;){var r=yn[t];yn[t++]=null;var a=yn[t];yn[t++]=null;var d=yn[t];yn[t++]=null;var p=yn[t];if(yn[t++]=null,a!==null&&d!==null){var x=a.pending;x===null?d.next=d:(d.next=x.next,x.next=d),a.pending=d}p!==0&&Cg(r,d,p)}}function ho(e,t,r,a){yn[Li++]=e,yn[Li++]=t,yn[Li++]=r,yn[Li++]=a,ac|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function lc(e,t,r,a){return ho(e,t,r,a),mo(e)}function Wr(e,t){return ho(e,null,null,t),mo(e)}function Cg(e,t,r){e.lanes|=r;var a=e.alternate;a!==null&&(a.lanes|=r);for(var d=!1,p=e.return;p!==null;)p.childLanes|=r,a=p.alternate,a!==null&&(a.childLanes|=r),p.tag===22&&(e=p.stateNode,e===null||e._visibility&1||(d=!0)),e=p,p=p.return;return e.tag===3?(p=e.stateNode,d&&t!==null&&(d=31-Ze(r),e=p.hiddenUpdates,a=e[d],a===null?e[d]=[t]:a.push(t),t.lane=r|536870912),p):null}function mo(e){if(50<vl)throw vl=0,gf=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ii={};function Z2(e,t,r,a){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,t,r,a){return new Z2(e,t,r,a)}function oc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xn(e,t){var r=e.alternate;return r===null?(r=ln(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function Tg(e,t){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function po(e,t,r,a,d,p){var x=0;if(a=e,typeof e=="function")oc(e)&&(x=1);else if(typeof e=="string")x=$C(e,r,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case F:return e=ln(31,r,t,d),e.elementType=F,e.lanes=p,e;case E:return $r(r.children,d,p,t);case T:x=8,d|=24;break;case _:return e=ln(12,r,t,d|2),e.elementType=_,e.lanes=p,e;case U:return e=ln(13,r,t,d),e.elementType=U,e.lanes=p,e;case z:return e=ln(19,r,t,d),e.elementType=z,e.lanes=p,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case j:x=10;break e;case A:x=9;break e;case B:x=11;break e;case H:x=14;break e;case Y:x=16,a=null;break e}x=29,r=Error(o(130,e===null?"null":typeof e,"")),a=null}return t=ln(x,r,t,d),t.elementType=e,t.type=a,t.lanes=p,t}function $r(e,t,r,a){return e=ln(7,e,a,t),e.lanes=r,e}function sc(e,t,r){return e=ln(6,e,null,t),e.lanes=r,e}function Ag(e){var t=ln(18,null,null,0);return t.stateNode=e,t}function uc(e,t,r){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var kg=new WeakMap;function bn(e,t){if(typeof e=="object"&&e!==null){var r=kg.get(e);return r!==void 0?r:(t={value:e,source:t,stack:D(t)},kg.set(e,t),t)}return{value:e,source:t,stack:D(t)}}var Bi=[],Ui=0,go=null,Wa=0,vn=[],Sn=0,yr=null,Ln=1,In="";function Zn(e,t){Bi[Ui++]=Wa,Bi[Ui++]=go,go=e,Wa=t}function Ng(e,t,r){vn[Sn++]=Ln,vn[Sn++]=In,vn[Sn++]=yr,yr=e;var a=Ln;e=In;var d=32-Ze(a)-1;a&=~(1<<d),r+=1;var p=32-Ze(t)+d;if(30<p){var x=d-d%5;p=(a&(1<<x)-1).toString(32),a>>=x,d-=x,Ln=1<<32-Ze(t)+d|r<<d|a,In=p+e}else Ln=1<<p|r<<d|a,In=e}function cc(e){e.return!==null&&(Zn(e,1),Ng(e,1,0))}function fc(e){for(;e===go;)go=Bi[--Ui],Bi[Ui]=null,Wa=Bi[--Ui],Bi[Ui]=null;for(;e===yr;)yr=vn[--Sn],vn[Sn]=null,In=vn[--Sn],vn[Sn]=null,Ln=vn[--Sn],vn[Sn]=null}function Rg(e,t){vn[Sn++]=Ln,vn[Sn++]=In,vn[Sn++]=yr,Ln=t.id,In=t.overflow,yr=e}var jt=null,ht=null,et=!1,br=null,En=!1,dc=Error(o(519));function vr(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $a(bn(t,e)),dc}function Og(e){var t=e.stateNode,r=e.type,a=e.memoizedProps;switch(t[Dt]=e,t[Xt]=a,r){case"dialog":Qe("cancel",t),Qe("close",t);break;case"iframe":case"object":case"embed":Qe("load",t);break;case"video":case"audio":for(r=0;r<El.length;r++)Qe(El[r],t);break;case"source":Qe("error",t);break;case"img":case"image":case"link":Qe("error",t),Qe("load",t);break;case"details":Qe("toggle",t);break;case"input":Qe("invalid",t),Yp(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Qe("invalid",t);break;case"textarea":Qe("invalid",t),Gp(t,a.value,a.defaultValue,a.children)}r=a.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||a.suppressHydrationWarning===!0||Z0(t.textContent,r)?(a.popover!=null&&(Qe("beforetoggle",t),Qe("toggle",t)),a.onScroll!=null&&Qe("scroll",t),a.onScrollEnd!=null&&Qe("scrollend",t),a.onClick!=null&&(t.onclick=Vn),t=!0):t=!1,t||vr(e,!0)}function zg(e){for(jt=e.return;jt;)switch(jt.tag){case 5:case 31:case 13:En=!1;return;case 27:case 3:En=!0;return;default:jt=jt.return}}function Hi(e){if(e!==jt)return!1;if(!et)return zg(e),et=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Of(e.type,e.memoizedProps)),r=!r),r&&ht&&vr(e),zg(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ht=rb(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ht=rb(e)}else t===27?(t=ht,Mr(e.type)?(e=Lf,Lf=null,ht=e):ht=t):ht=jt?_n(e.stateNode.nextSibling):null;return!0}function ei(){ht=jt=null,et=!1}function hc(){var e=br;return e!==null&&(Wt===null?Wt=e:Wt.push.apply(Wt,e),br=null),e}function $a(e){br===null?br=[e]:br.push(e)}var mc=k(null),ti=null,Kn=null;function Sr(e,t,r){N(mc,t._currentValue),t._currentValue=r}function Qn(e){e._currentValue=mc.current,q(mc)}function pc(e,t,r){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===r)break;e=e.return}}function gc(e,t,r,a){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var p=d.dependencies;if(p!==null){var x=d.child;p=p.firstContext;e:for(;p!==null;){var O=p;p=d;for(var V=0;V<t.length;V++)if(O.context===t[V]){p.lanes|=r,O=p.alternate,O!==null&&(O.lanes|=r),pc(p.return,r,e),a||(x=null);break e}p=O.next}}else if(d.tag===18){if(x=d.return,x===null)throw Error(o(341));x.lanes|=r,p=x.alternate,p!==null&&(p.lanes|=r),pc(x,r,e),x=null}else x=d.child;if(x!==null)x.return=d;else for(x=d;x!==null;){if(x===e){x=null;break}if(d=x.sibling,d!==null){d.return=x.return,x=d;break}x=x.return}d=x}}function qi(e,t,r,a){e=null;for(var d=t,p=!1;d!==null;){if(!p){if((d.flags&524288)!==0)p=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var x=d.alternate;if(x===null)throw Error(o(387));if(x=x.memoizedProps,x!==null){var O=d.type;an(d.pendingProps.value,x.value)||(e!==null?e.push(O):e=[O])}}else if(d===Ae.current){if(x=d.alternate,x===null)throw Error(o(387));x.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(Tl):e=[Tl])}d=d.return}e!==null&&gc(t,e,r,a),t.flags|=262144}function yo(e){for(e=e.firstContext;e!==null;){if(!an(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ni(e){ti=e,Kn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Lt(e){return Mg(ti,e)}function bo(e,t){return ti===null&&ni(e),Mg(e,t)}function Mg(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},Kn===null){if(e===null)throw Error(o(308));Kn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Kn=Kn.next=t;return r}var K2=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},Q2=n.unstable_scheduleCallback,J2=n.unstable_NormalPriority,_t={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yc(){return{controller:new K2,data:new Map,refCount:0}}function el(e){e.refCount--,e.refCount===0&&Q2(J2,function(){e.controller.abort()})}var tl=null,bc=0,Pi=0,Fi=null;function W2(e,t){if(tl===null){var r=tl=[];bc=0,Pi=xf(),Fi={status:"pending",value:void 0,then:function(a){r.push(a)}}}return bc++,t.then(Dg,Dg),t}function Dg(){if(--bc===0&&tl!==null){Fi!==null&&(Fi.status="fulfilled");var e=tl;tl=null,Pi=0,Fi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function $2(e,t){var r=[],a={status:"pending",value:null,reason:null,then:function(d){r.push(d)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var d=0;d<r.length;d++)(0,r[d])(t)},function(d){for(a.status="rejected",a.reason=d,d=0;d<r.length;d++)(0,r[d])(void 0)}),a}var jg=Z.S;Z.S=function(e,t){b0=_e(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&W2(e,t),jg!==null&&jg(e,t)};var ri=k(null);function vc(){var e=ri.current;return e!==null?e:ct.pooledCache}function vo(e,t){t===null?N(ri,ri.current):N(ri,t.pool)}function Lg(){var e=vc();return e===null?null:{parent:_t._currentValue,pool:e}}var Yi=Error(o(460)),Sc=Error(o(474)),So=Error(o(542)),Eo={then:function(){}};function Ig(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Bg(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(Vn,Vn),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Hg(e),e;default:if(typeof t.status=="string")t.then(Vn,Vn);else{if(e=ct,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var d=t;d.status="fulfilled",d.value=a}},function(a){if(t.status==="pending"){var d=t;d.status="rejected",d.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Hg(e),e}throw ai=t,Yi}}function ii(e){try{var t=e._init;return t(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(ai=r,Yi):r}}var ai=null;function Ug(){if(ai===null)throw Error(o(459));var e=ai;return ai=null,e}function Hg(e){if(e===Yi||e===So)throw Error(o(483))}var Vi=null,nl=0;function xo(e){var t=nl;return nl+=1,Vi===null&&(Vi=[]),Bg(Vi,e,t)}function rl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function _o(e,t){throw t.$$typeof===v?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function qg(e){function t(W,Q){if(e){var ie=W.deletions;ie===null?(W.deletions=[Q],W.flags|=16):ie.push(Q)}}function r(W,Q){if(!e)return null;for(;Q!==null;)t(W,Q),Q=Q.sibling;return null}function a(W){for(var Q=new Map;W!==null;)W.key!==null?Q.set(W.key,W):Q.set(W.index,W),W=W.sibling;return Q}function d(W,Q){return W=Xn(W,Q),W.index=0,W.sibling=null,W}function p(W,Q,ie){return W.index=ie,e?(ie=W.alternate,ie!==null?(ie=ie.index,ie<Q?(W.flags|=67108866,Q):ie):(W.flags|=67108866,Q)):(W.flags|=1048576,Q)}function x(W){return e&&W.alternate===null&&(W.flags|=67108866),W}function O(W,Q,ie,pe){return Q===null||Q.tag!==6?(Q=sc(ie,W.mode,pe),Q.return=W,Q):(Q=d(Q,ie),Q.return=W,Q)}function V(W,Q,ie,pe){var je=ie.type;return je===E?me(W,Q,ie.props.children,pe,ie.key):Q!==null&&(Q.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===Y&&ii(je)===Q.type)?(Q=d(Q,ie.props),rl(Q,ie),Q.return=W,Q):(Q=po(ie.type,ie.key,ie.props,null,W.mode,pe),rl(Q,ie),Q.return=W,Q)}function le(W,Q,ie,pe){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==ie.containerInfo||Q.stateNode.implementation!==ie.implementation?(Q=uc(ie,W.mode,pe),Q.return=W,Q):(Q=d(Q,ie.children||[]),Q.return=W,Q)}function me(W,Q,ie,pe,je){return Q===null||Q.tag!==7?(Q=$r(ie,W.mode,pe,je),Q.return=W,Q):(Q=d(Q,ie),Q.return=W,Q)}function ge(W,Q,ie){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=sc(""+Q,W.mode,ie),Q.return=W,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case b:return ie=po(Q.type,Q.key,Q.props,null,W.mode,ie),rl(ie,Q),ie.return=W,ie;case w:return Q=uc(Q,W.mode,ie),Q.return=W,Q;case Y:return Q=ii(Q),ge(W,Q,ie)}if(X(Q)||M(Q))return Q=$r(Q,W.mode,ie,null),Q.return=W,Q;if(typeof Q.then=="function")return ge(W,xo(Q),ie);if(Q.$$typeof===j)return ge(W,bo(W,Q),ie);_o(W,Q)}return null}function ue(W,Q,ie,pe){var je=Q!==null?Q.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return je!==null?null:O(W,Q,""+ie,pe);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case b:return ie.key===je?V(W,Q,ie,pe):null;case w:return ie.key===je?le(W,Q,ie,pe):null;case Y:return ie=ii(ie),ue(W,Q,ie,pe)}if(X(ie)||M(ie))return je!==null?null:me(W,Q,ie,pe,null);if(typeof ie.then=="function")return ue(W,Q,xo(ie),pe);if(ie.$$typeof===j)return ue(W,Q,bo(W,ie),pe);_o(W,ie)}return null}function fe(W,Q,ie,pe,je){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return W=W.get(ie)||null,O(Q,W,""+pe,je);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case b:return W=W.get(pe.key===null?ie:pe.key)||null,V(Q,W,pe,je);case w:return W=W.get(pe.key===null?ie:pe.key)||null,le(Q,W,pe,je);case Y:return pe=ii(pe),fe(W,Q,ie,pe,je)}if(X(pe)||M(pe))return W=W.get(ie)||null,me(Q,W,pe,je,null);if(typeof pe.then=="function")return fe(W,Q,ie,xo(pe),je);if(pe.$$typeof===j)return fe(W,Q,ie,bo(Q,pe),je);_o(Q,pe)}return null}function Re(W,Q,ie,pe){for(var je=null,tt=null,De=Q,Ye=Q=0,$e=null;De!==null&&Ye<ie.length;Ye++){De.index>Ye?($e=De,De=null):$e=De.sibling;var nt=ue(W,De,ie[Ye],pe);if(nt===null){De===null&&(De=$e);break}e&&De&&nt.alternate===null&&t(W,De),Q=p(nt,Q,Ye),tt===null?je=nt:tt.sibling=nt,tt=nt,De=$e}if(Ye===ie.length)return r(W,De),et&&Zn(W,Ye),je;if(De===null){for(;Ye<ie.length;Ye++)De=ge(W,ie[Ye],pe),De!==null&&(Q=p(De,Q,Ye),tt===null?je=De:tt.sibling=De,tt=De);return et&&Zn(W,Ye),je}for(De=a(De);Ye<ie.length;Ye++)$e=fe(De,W,Ye,ie[Ye],pe),$e!==null&&(e&&$e.alternate!==null&&De.delete($e.key===null?Ye:$e.key),Q=p($e,Q,Ye),tt===null?je=$e:tt.sibling=$e,tt=$e);return e&&De.forEach(function(Br){return t(W,Br)}),et&&Zn(W,Ye),je}function Le(W,Q,ie,pe){if(ie==null)throw Error(o(151));for(var je=null,tt=null,De=Q,Ye=Q=0,$e=null,nt=ie.next();De!==null&&!nt.done;Ye++,nt=ie.next()){De.index>Ye?($e=De,De=null):$e=De.sibling;var Br=ue(W,De,nt.value,pe);if(Br===null){De===null&&(De=$e);break}e&&De&&Br.alternate===null&&t(W,De),Q=p(Br,Q,Ye),tt===null?je=Br:tt.sibling=Br,tt=Br,De=$e}if(nt.done)return r(W,De),et&&Zn(W,Ye),je;if(De===null){for(;!nt.done;Ye++,nt=ie.next())nt=ge(W,nt.value,pe),nt!==null&&(Q=p(nt,Q,Ye),tt===null?je=nt:tt.sibling=nt,tt=nt);return et&&Zn(W,Ye),je}for(De=a(De);!nt.done;Ye++,nt=ie.next())nt=fe(De,W,Ye,nt.value,pe),nt!==null&&(e&&nt.alternate!==null&&De.delete(nt.key===null?Ye:nt.key),Q=p(nt,Q,Ye),tt===null?je=nt:tt.sibling=nt,tt=nt);return e&&De.forEach(function(cT){return t(W,cT)}),et&&Zn(W,Ye),je}function ut(W,Q,ie,pe){if(typeof ie=="object"&&ie!==null&&ie.type===E&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case b:e:{for(var je=ie.key;Q!==null;){if(Q.key===je){if(je=ie.type,je===E){if(Q.tag===7){r(W,Q.sibling),pe=d(Q,ie.props.children),pe.return=W,W=pe;break e}}else if(Q.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===Y&&ii(je)===Q.type){r(W,Q.sibling),pe=d(Q,ie.props),rl(pe,ie),pe.return=W,W=pe;break e}r(W,Q);break}else t(W,Q);Q=Q.sibling}ie.type===E?(pe=$r(ie.props.children,W.mode,pe,ie.key),pe.return=W,W=pe):(pe=po(ie.type,ie.key,ie.props,null,W.mode,pe),rl(pe,ie),pe.return=W,W=pe)}return x(W);case w:e:{for(je=ie.key;Q!==null;){if(Q.key===je)if(Q.tag===4&&Q.stateNode.containerInfo===ie.containerInfo&&Q.stateNode.implementation===ie.implementation){r(W,Q.sibling),pe=d(Q,ie.children||[]),pe.return=W,W=pe;break e}else{r(W,Q);break}else t(W,Q);Q=Q.sibling}pe=uc(ie,W.mode,pe),pe.return=W,W=pe}return x(W);case Y:return ie=ii(ie),ut(W,Q,ie,pe)}if(X(ie))return Re(W,Q,ie,pe);if(M(ie)){if(je=M(ie),typeof je!="function")throw Error(o(150));return ie=je.call(ie),Le(W,Q,ie,pe)}if(typeof ie.then=="function")return ut(W,Q,xo(ie),pe);if(ie.$$typeof===j)return ut(W,Q,bo(W,ie),pe);_o(W,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,Q!==null&&Q.tag===6?(r(W,Q.sibling),pe=d(Q,ie),pe.return=W,W=pe):(r(W,Q),pe=sc(ie,W.mode,pe),pe.return=W,W=pe),x(W)):r(W,Q)}return function(W,Q,ie,pe){try{nl=0;var je=ut(W,Q,ie,pe);return Vi=null,je}catch(De){if(De===Yi||De===So)throw De;var tt=ln(29,De,null,W.mode);return tt.lanes=pe,tt.return=W,tt}finally{}}}var li=qg(!0),Pg=qg(!1),Er=!1;function Ec(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function xc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function xr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _r(e,t,r){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(it&2)!==0){var d=a.pending;return d===null?t.next=t:(t.next=d.next,d.next=t),a.pending=t,t=mo(e),Cg(e,null,r),t}return ho(e,a,t,r),mo(e)}function il(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,r|=a,t.lanes=r,Mp(e,r)}}function _c(e,t){var r=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,r===a)){var d=null,p=null;if(r=r.firstBaseUpdate,r!==null){do{var x={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};p===null?d=p=x:p=p.next=x,r=r.next}while(r!==null);p===null?d=p=t:p=p.next=t}else d=p=t;r={baseState:a.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:a.shared,callbacks:a.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var wc=!1;function al(){if(wc){var e=Fi;if(e!==null)throw e}}function ll(e,t,r,a){wc=!1;var d=e.updateQueue;Er=!1;var p=d.firstBaseUpdate,x=d.lastBaseUpdate,O=d.shared.pending;if(O!==null){d.shared.pending=null;var V=O,le=V.next;V.next=null,x===null?p=le:x.next=le,x=V;var me=e.alternate;me!==null&&(me=me.updateQueue,O=me.lastBaseUpdate,O!==x&&(O===null?me.firstBaseUpdate=le:O.next=le,me.lastBaseUpdate=V))}if(p!==null){var ge=d.baseState;x=0,me=le=V=null,O=p;do{var ue=O.lane&-536870913,fe=ue!==O.lane;if(fe?(We&ue)===ue:(a&ue)===ue){ue!==0&&ue===Pi&&(wc=!0),me!==null&&(me=me.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});e:{var Re=e,Le=O;ue=t;var ut=r;switch(Le.tag){case 1:if(Re=Le.payload,typeof Re=="function"){ge=Re.call(ut,ge,ue);break e}ge=Re;break e;case 3:Re.flags=Re.flags&-65537|128;case 0:if(Re=Le.payload,ue=typeof Re=="function"?Re.call(ut,ge,ue):Re,ue==null)break e;ge=y({},ge,ue);break e;case 2:Er=!0}}ue=O.callback,ue!==null&&(e.flags|=64,fe&&(e.flags|=8192),fe=d.callbacks,fe===null?d.callbacks=[ue]:fe.push(ue))}else fe={lane:ue,tag:O.tag,payload:O.payload,callback:O.callback,next:null},me===null?(le=me=fe,V=ge):me=me.next=fe,x|=ue;if(O=O.next,O===null){if(O=d.shared.pending,O===null)break;fe=O,O=fe.next,fe.next=null,d.lastBaseUpdate=fe,d.shared.pending=null}}while(!0);me===null&&(V=ge),d.baseState=V,d.firstBaseUpdate=le,d.lastBaseUpdate=me,p===null&&(d.shared.lanes=0),kr|=x,e.lanes=x,e.memoizedState=ge}}function Fg(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Yg(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)Fg(r[e],t)}var Gi=k(null),wo=k(0);function Vg(e,t){e=ar,N(wo,e),N(Gi,t),ar=e|t.baseLanes}function Cc(){N(wo,ar),N(Gi,Gi.current)}function Tc(){ar=wo.current,q(Gi),q(wo)}var on=k(null),xn=null;function wr(e){var t=e.alternate;N(St,St.current&1),N(on,e),xn===null&&(t===null||Gi.current!==null||t.memoizedState!==null)&&(xn=e)}function Ac(e){N(St,St.current),N(on,e),xn===null&&(xn=e)}function Gg(e){e.tag===22?(N(St,St.current),N(on,e),xn===null&&(xn=e)):Cr()}function Cr(){N(St,St.current),N(on,on.current)}function sn(e){q(on),xn===e&&(xn=null),q(St)}var St=k(0);function Co(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Df(r)||jf(r)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Jn=0,qe=null,ot=null,wt=null,To=!1,Xi=!1,oi=!1,Ao=0,ol=0,Zi=null,eC=0;function bt(){throw Error(o(321))}function kc(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!an(e[r],t[r]))return!1;return!0}function Nc(e,t,r,a,d,p){return Jn=p,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Z.H=e===null||e.memoizedState===null?Ny:Yc,oi=!1,p=r(a,d),oi=!1,Xi&&(p=Zg(t,r,a,d)),Xg(e),p}function Xg(e){Z.H=cl;var t=ot!==null&&ot.next!==null;if(Jn=0,wt=ot=qe=null,To=!1,ol=0,Zi=null,t)throw Error(o(300));e===null||Ct||(e=e.dependencies,e!==null&&yo(e)&&(Ct=!0))}function Zg(e,t,r,a){qe=e;var d=0;do{if(Xi&&(Zi=null),ol=0,Xi=!1,25<=d)throw Error(o(301));if(d+=1,wt=ot=null,e.updateQueue!=null){var p=e.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}Z.H=Ry,p=t(r,a)}while(Xi);return p}function tC(){var e=Z.H,t=e.useState()[0];return t=typeof t.then=="function"?sl(t):t,e=e.useState()[0],(ot!==null?ot.memoizedState:null)!==e&&(qe.flags|=1024),t}function Rc(){var e=Ao!==0;return Ao=0,e}function Oc(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function zc(e){if(To){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}To=!1}Jn=0,wt=ot=qe=null,Xi=!1,ol=Ao=0,Zi=null}function Ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?qe.memoizedState=wt=e:wt=wt.next=e,wt}function Et(){if(ot===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=wt===null?qe.memoizedState:wt.next;if(t!==null)wt=t,ot=e;else{if(e===null)throw qe.alternate===null?Error(o(467)):Error(o(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},wt===null?qe.memoizedState=wt=e:wt=wt.next=e}return wt}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function sl(e){var t=ol;return ol+=1,Zi===null&&(Zi=[]),e=Bg(Zi,e,t),t=qe,(wt===null?t.memoizedState:wt.next)===null&&(t=t.alternate,Z.H=t===null||t.memoizedState===null?Ny:Yc),e}function No(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return sl(e);if(e.$$typeof===j)return Lt(e)}throw Error(o(438,String(e)))}function Mc(e){var t=null,r=qe.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var a=qe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(d){return d.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=ko(),qe.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),a=0;a<e;a++)r[a]=$;return t.index++,r}function Wn(e,t){return typeof t=="function"?t(e):t}function Ro(e){var t=Et();return Dc(t,ot,e)}function Dc(e,t,r){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=r;var d=e.baseQueue,p=a.pending;if(p!==null){if(d!==null){var x=d.next;d.next=p.next,p.next=x}t.baseQueue=d=p,a.pending=null}if(p=e.baseState,d===null)e.memoizedState=p;else{t=d.next;var O=x=null,V=null,le=t,me=!1;do{var ge=le.lane&-536870913;if(ge!==le.lane?(We&ge)===ge:(Jn&ge)===ge){var ue=le.revertLane;if(ue===0)V!==null&&(V=V.next={lane:0,revertLane:0,gesture:null,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null}),ge===Pi&&(me=!0);else if((Jn&ue)===ue){le=le.next,ue===Pi&&(me=!0);continue}else ge={lane:0,revertLane:le.revertLane,gesture:null,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null},V===null?(O=V=ge,x=p):V=V.next=ge,qe.lanes|=ue,kr|=ue;ge=le.action,oi&&r(p,ge),p=le.hasEagerState?le.eagerState:r(p,ge)}else ue={lane:ge,revertLane:le.revertLane,gesture:le.gesture,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null},V===null?(O=V=ue,x=p):V=V.next=ue,qe.lanes|=ge,kr|=ge;le=le.next}while(le!==null&&le!==t);if(V===null?x=p:V.next=O,!an(p,e.memoizedState)&&(Ct=!0,me&&(r=Fi,r!==null)))throw r;e.memoizedState=p,e.baseState=x,e.baseQueue=V,a.lastRenderedState=p}return d===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function jc(e){var t=Et(),r=t.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=e;var a=r.dispatch,d=r.pending,p=t.memoizedState;if(d!==null){r.pending=null;var x=d=d.next;do p=e(p,x.action),x=x.next;while(x!==d);an(p,t.memoizedState)||(Ct=!0),t.memoizedState=p,t.baseQueue===null&&(t.baseState=p),r.lastRenderedState=p}return[p,a]}function Kg(e,t,r){var a=qe,d=Et(),p=et;if(p){if(r===void 0)throw Error(o(407));r=r()}else r=t();var x=!an((ot||d).memoizedState,r);if(x&&(d.memoizedState=r,Ct=!0),d=d.queue,Bc(Wg.bind(null,a,d,e),[e]),d.getSnapshot!==t||x||wt!==null&&wt.memoizedState.tag&1){if(a.flags|=2048,Ki(9,{destroy:void 0},Jg.bind(null,a,d,r,t),null),ct===null)throw Error(o(349));p||(Jn&127)!==0||Qg(a,t,r)}return r}function Qg(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=qe.updateQueue,t===null?(t=ko(),qe.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Jg(e,t,r,a){t.value=r,t.getSnapshot=a,$g(t)&&ey(e)}function Wg(e,t,r){return r(function(){$g(t)&&ey(e)})}function $g(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!an(e,r)}catch{return!0}}function ey(e){var t=Wr(e,2);t!==null&&$t(t,e,2)}function Lc(e){var t=Ft();if(typeof e=="function"){var r=e;if(e=r(),oi){Ot(!0);try{r()}finally{Ot(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:e},t}function ty(e,t,r,a){return e.baseState=r,Dc(e,ot,typeof a=="function"?a:Wn)}function nC(e,t,r,a,d){if(Mo(e))throw Error(o(485));if(e=t.action,e!==null){var p={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){p.listeners.push(x)}};Z.T!==null?r(!0):p.isTransition=!1,a(p),r=t.pending,r===null?(p.next=t.pending=p,ny(t,p)):(p.next=r.next,t.pending=r.next=p)}}function ny(e,t){var r=t.action,a=t.payload,d=e.state;if(t.isTransition){var p=Z.T,x={};Z.T=x;try{var O=r(d,a),V=Z.S;V!==null&&V(x,O),ry(e,t,O)}catch(le){Ic(e,t,le)}finally{p!==null&&x.types!==null&&(p.types=x.types),Z.T=p}}else try{p=r(d,a),ry(e,t,p)}catch(le){Ic(e,t,le)}}function ry(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(a){iy(e,t,a)},function(a){return Ic(e,t,a)}):iy(e,t,r)}function iy(e,t,r){t.status="fulfilled",t.value=r,ay(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,ny(e,r)))}function Ic(e,t,r){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=r,ay(t),t=t.next;while(t!==a)}e.action=null}function ay(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ly(e,t){return t}function oy(e,t){if(et){var r=ct.formState;if(r!==null){e:{var a=qe;if(et){if(ht){t:{for(var d=ht,p=En;d.nodeType!==8;){if(!p){d=null;break t}if(d=_n(d.nextSibling),d===null){d=null;break t}}p=d.data,d=p==="F!"||p==="F"?d:null}if(d){ht=_n(d.nextSibling),a=d.data==="F!";break e}}vr(a)}a=!1}a&&(t=r[0])}}return r=Ft(),r.memoizedState=r.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ly,lastRenderedState:t},r.queue=a,r=Ty.bind(null,qe,a),a.dispatch=r,a=Lc(!1),p=Fc.bind(null,qe,!1,a.queue),a=Ft(),d={state:t,dispatch:null,action:e,pending:null},a.queue=d,r=nC.bind(null,qe,d,p,r),d.dispatch=r,a.memoizedState=e,[t,r,!1]}function sy(e){var t=Et();return uy(t,ot,e)}function uy(e,t,r){if(t=Dc(e,t,ly)[0],e=Ro(Wn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=sl(t)}catch(x){throw x===Yi?So:x}else a=t;t=Et();var d=t.queue,p=d.dispatch;return r!==t.memoizedState&&(qe.flags|=2048,Ki(9,{destroy:void 0},rC.bind(null,d,r),null)),[a,p,e]}function rC(e,t){e.action=t}function cy(e){var t=Et(),r=ot;if(r!==null)return uy(t,r,e);Et(),t=t.memoizedState,r=Et();var a=r.queue.dispatch;return r.memoizedState=e,[t,a,!1]}function Ki(e,t,r,a){return e={tag:e,create:r,deps:a,inst:t,next:null},t=qe.updateQueue,t===null&&(t=ko(),qe.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(a=r.next,r.next=e,e.next=a,t.lastEffect=e),e}function fy(){return Et().memoizedState}function Oo(e,t,r,a){var d=Ft();qe.flags|=e,d.memoizedState=Ki(1|t,{destroy:void 0},r,a===void 0?null:a)}function zo(e,t,r,a){var d=Et();a=a===void 0?null:a;var p=d.memoizedState.inst;ot!==null&&a!==null&&kc(a,ot.memoizedState.deps)?d.memoizedState=Ki(t,p,r,a):(qe.flags|=e,d.memoizedState=Ki(1|t,p,r,a))}function dy(e,t){Oo(8390656,8,e,t)}function Bc(e,t){zo(2048,8,e,t)}function iC(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=ko(),qe.updateQueue=t,t.events=[e];else{var r=t.events;r===null?t.events=[e]:r.push(e)}}function hy(e){var t=Et().memoizedState;return iC({ref:t,nextImpl:e}),function(){if((it&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function my(e,t){return zo(4,2,e,t)}function py(e,t){return zo(4,4,e,t)}function gy(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function yy(e,t,r){r=r!=null?r.concat([e]):null,zo(4,4,gy.bind(null,t,e),r)}function Uc(){}function by(e,t){var r=Et();t=t===void 0?null:t;var a=r.memoizedState;return t!==null&&kc(t,a[1])?a[0]:(r.memoizedState=[e,t],e)}function vy(e,t){var r=Et();t=t===void 0?null:t;var a=r.memoizedState;if(t!==null&&kc(t,a[1]))return a[0];if(a=e(),oi){Ot(!0);try{e()}finally{Ot(!1)}}return r.memoizedState=[a,t],a}function Hc(e,t,r){return r===void 0||(Jn&1073741824)!==0&&(We&261930)===0?e.memoizedState=t:(e.memoizedState=r,e=S0(),qe.lanes|=e,kr|=e,r)}function Sy(e,t,r,a){return an(r,t)?r:Gi.current!==null?(e=Hc(e,r,a),an(e,t)||(Ct=!0),e):(Jn&42)===0||(Jn&1073741824)!==0&&(We&261930)===0?(Ct=!0,e.memoizedState=r):(e=S0(),qe.lanes|=e,kr|=e,t)}function Ey(e,t,r,a,d){var p=K.p;K.p=p!==0&&8>p?p:8;var x=Z.T,O={};Z.T=O,Fc(e,!1,t,r);try{var V=d(),le=Z.S;if(le!==null&&le(O,V),V!==null&&typeof V=="object"&&typeof V.then=="function"){var me=$2(V,a);ul(e,t,me,fn(e))}else ul(e,t,a,fn(e))}catch(ge){ul(e,t,{then:function(){},status:"rejected",reason:ge},fn())}finally{K.p=p,x!==null&&O.types!==null&&(x.types=O.types),Z.T=x}}function aC(){}function qc(e,t,r,a){if(e.tag!==5)throw Error(o(476));var d=xy(e).queue;Ey(e,d,t,oe,r===null?aC:function(){return _y(e),r(a)})}function xy(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:oe},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function _y(e){var t=xy(e);t.next===null&&(t=e.alternate.memoizedState),ul(e,t.next.queue,{},fn())}function Pc(){return Lt(Tl)}function wy(){return Et().memoizedState}function Cy(){return Et().memoizedState}function lC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=fn();e=xr(r);var a=_r(t,e,r);a!==null&&($t(a,t,r),il(a,t,r)),t={cache:yc()},e.payload=t;return}t=t.return}}function oC(e,t,r){var a=fn();r={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Mo(e)?Ay(t,r):(r=lc(e,t,r,a),r!==null&&($t(r,e,a),ky(r,t,a)))}function Ty(e,t,r){var a=fn();ul(e,t,r,a)}function ul(e,t,r,a){var d={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(Mo(e))Ay(t,d);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=t.lastRenderedReducer,p!==null))try{var x=t.lastRenderedState,O=p(x,r);if(d.hasEagerState=!0,d.eagerState=O,an(O,x))return ho(e,t,d,0),ct===null&&fo(),!1}catch{}finally{}if(r=lc(e,t,d,a),r!==null)return $t(r,e,a),ky(r,t,a),!0}return!1}function Fc(e,t,r,a){if(a={lane:2,revertLane:xf(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Mo(e)){if(t)throw Error(o(479))}else t=lc(e,r,a,2),t!==null&&$t(t,e,2)}function Mo(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function Ay(e,t){Xi=To=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function ky(e,t,r){if((r&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,r|=a,t.lanes=r,Mp(e,r)}}var cl={readContext:Lt,use:No,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useLayoutEffect:bt,useInsertionEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useSyncExternalStore:bt,useId:bt,useHostTransitionStatus:bt,useFormState:bt,useActionState:bt,useOptimistic:bt,useMemoCache:bt,useCacheRefresh:bt};cl.useEffectEvent=bt;var Ny={readContext:Lt,use:No,useCallback:function(e,t){return Ft().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:dy,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,Oo(4194308,4,gy.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Oo(4194308,4,e,t)},useInsertionEffect:function(e,t){Oo(4,2,e,t)},useMemo:function(e,t){var r=Ft();t=t===void 0?null:t;var a=e();if(oi){Ot(!0);try{e()}finally{Ot(!1)}}return r.memoizedState=[a,t],a},useReducer:function(e,t,r){var a=Ft();if(r!==void 0){var d=r(t);if(oi){Ot(!0);try{r(t)}finally{Ot(!1)}}}else d=t;return a.memoizedState=a.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},a.queue=e,e=e.dispatch=oC.bind(null,qe,e),[a.memoizedState,e]},useRef:function(e){var t=Ft();return e={current:e},t.memoizedState=e},useState:function(e){e=Lc(e);var t=e.queue,r=Ty.bind(null,qe,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:Uc,useDeferredValue:function(e,t){var r=Ft();return Hc(r,e,t)},useTransition:function(){var e=Lc(!1);return e=Ey.bind(null,qe,e.queue,!0,!1),Ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var a=qe,d=Ft();if(et){if(r===void 0)throw Error(o(407));r=r()}else{if(r=t(),ct===null)throw Error(o(349));(We&127)!==0||Qg(a,t,r)}d.memoizedState=r;var p={value:r,getSnapshot:t};return d.queue=p,dy(Wg.bind(null,a,p,e),[e]),a.flags|=2048,Ki(9,{destroy:void 0},Jg.bind(null,a,p,r,t),null),r},useId:function(){var e=Ft(),t=ct.identifierPrefix;if(et){var r=In,a=Ln;r=(a&~(1<<32-Ze(a)-1)).toString(32)+r,t="_"+t+"R_"+r,r=Ao++,0<r&&(t+="H"+r.toString(32)),t+="_"}else r=eC++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Pc,useFormState:oy,useActionState:oy,useOptimistic:function(e){var t=Ft();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=Fc.bind(null,qe,!0,r),r.dispatch=t,[e,t]},useMemoCache:Mc,useCacheRefresh:function(){return Ft().memoizedState=lC.bind(null,qe)},useEffectEvent:function(e){var t=Ft(),r={impl:e};return t.memoizedState=r,function(){if((it&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}},Yc={readContext:Lt,use:No,useCallback:by,useContext:Lt,useEffect:Bc,useImperativeHandle:yy,useInsertionEffect:my,useLayoutEffect:py,useMemo:vy,useReducer:Ro,useRef:fy,useState:function(){return Ro(Wn)},useDebugValue:Uc,useDeferredValue:function(e,t){var r=Et();return Sy(r,ot.memoizedState,e,t)},useTransition:function(){var e=Ro(Wn)[0],t=Et().memoizedState;return[typeof e=="boolean"?e:sl(e),t]},useSyncExternalStore:Kg,useId:wy,useHostTransitionStatus:Pc,useFormState:sy,useActionState:sy,useOptimistic:function(e,t){var r=Et();return ty(r,ot,e,t)},useMemoCache:Mc,useCacheRefresh:Cy};Yc.useEffectEvent=hy;var Ry={readContext:Lt,use:No,useCallback:by,useContext:Lt,useEffect:Bc,useImperativeHandle:yy,useInsertionEffect:my,useLayoutEffect:py,useMemo:vy,useReducer:jc,useRef:fy,useState:function(){return jc(Wn)},useDebugValue:Uc,useDeferredValue:function(e,t){var r=Et();return ot===null?Hc(r,e,t):Sy(r,ot.memoizedState,e,t)},useTransition:function(){var e=jc(Wn)[0],t=Et().memoizedState;return[typeof e=="boolean"?e:sl(e),t]},useSyncExternalStore:Kg,useId:wy,useHostTransitionStatus:Pc,useFormState:cy,useActionState:cy,useOptimistic:function(e,t){var r=Et();return ot!==null?ty(r,ot,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Mc,useCacheRefresh:Cy};Ry.useEffectEvent=hy;function Vc(e,t,r,a){t=e.memoizedState,r=r(a,t),r=r==null?t:y({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Gc={enqueueSetState:function(e,t,r){e=e._reactInternals;var a=fn(),d=xr(a);d.payload=t,r!=null&&(d.callback=r),t=_r(e,d,a),t!==null&&($t(t,e,a),il(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var a=fn(),d=xr(a);d.tag=1,d.payload=t,r!=null&&(d.callback=r),t=_r(e,d,a),t!==null&&($t(t,e,a),il(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=fn(),a=xr(r);a.tag=2,t!=null&&(a.callback=t),t=_r(e,a,r),t!==null&&($t(t,e,r),il(t,e,r))}};function Oy(e,t,r,a,d,p,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,p,x):t.prototype&&t.prototype.isPureReactComponent?!Qa(r,a)||!Qa(d,p):!0}function zy(e,t,r,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,a),t.state!==e&&Gc.enqueueReplaceState(t,t.state,null)}function si(e,t){var r=t;if("ref"in t){r={};for(var a in t)a!=="ref"&&(r[a]=t[a])}if(e=e.defaultProps){r===t&&(r=y({},r));for(var d in e)r[d]===void 0&&(r[d]=e[d])}return r}function My(e){co(e)}function Dy(e){}function jy(e){co(e)}function Do(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Ly(e,t,r){try{var a=e.onCaughtError;a(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Xc(e,t,r){return r=xr(r),r.tag=3,r.payload={element:null},r.callback=function(){Do(e,t)},r}function Iy(e){return e=xr(e),e.tag=3,e}function By(e,t,r,a){var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var p=a.value;e.payload=function(){return d(p)},e.callback=function(){Ly(t,r,a)}}var x=r.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Ly(t,r,a),typeof d!="function"&&(Nr===null?Nr=new Set([this]):Nr.add(this));var O=a.stack;this.componentDidCatch(a.value,{componentStack:O!==null?O:""})})}function sC(e,t,r,a,d){if(r.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=r.alternate,t!==null&&qi(t,r,d,!0),r=on.current,r!==null){switch(r.tag){case 31:case 13:return xn===null?Go():r.alternate===null&&vt===0&&(vt=3),r.flags&=-257,r.flags|=65536,r.lanes=d,a===Eo?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([a]):t.add(a),vf(e,a,d)),!1;case 22:return r.flags|=65536,a===Eo?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([a]):r.add(a)),vf(e,a,d)),!1}throw Error(o(435,r.tag))}return vf(e,a,d),Go(),!1}if(et)return t=on.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=d,a!==dc&&(e=Error(o(422),{cause:a}),$a(bn(e,r)))):(a!==dc&&(t=Error(o(423),{cause:a}),$a(bn(t,r))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,a=bn(a,r),d=Xc(e.stateNode,a,d),_c(e,d),vt!==4&&(vt=2)),!1;var p=Error(o(520),{cause:a});if(p=bn(p,r),bl===null?bl=[p]:bl.push(p),vt!==4&&(vt=2),t===null)return!0;a=bn(a,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=d&-d,r.lanes|=e,e=Xc(r.stateNode,a,e),_c(r,e),!1;case 1:if(t=r.type,p=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Nr===null||!Nr.has(p))))return r.flags|=65536,d&=-d,r.lanes|=d,d=Iy(d),By(d,e,r,a),_c(r,d),!1}r=r.return}while(r!==null);return!1}var Zc=Error(o(461)),Ct=!1;function It(e,t,r,a){t.child=e===null?Pg(t,null,r,a):li(t,e.child,r,a)}function Uy(e,t,r,a,d){r=r.render;var p=t.ref;if("ref"in a){var x={};for(var O in a)O!=="ref"&&(x[O]=a[O])}else x=a;return ni(t),a=Nc(e,t,r,x,p,d),O=Rc(),e!==null&&!Ct?(Oc(e,t,d),$n(e,t,d)):(et&&O&&cc(t),t.flags|=1,It(e,t,a,d),t.child)}function Hy(e,t,r,a,d){if(e===null){var p=r.type;return typeof p=="function"&&!oc(p)&&p.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=p,qy(e,t,p,a,d)):(e=po(r.type,null,a,t,t.mode,d),e.ref=t.ref,e.return=t,t.child=e)}if(p=e.child,!nf(e,d)){var x=p.memoizedProps;if(r=r.compare,r=r!==null?r:Qa,r(x,a)&&e.ref===t.ref)return $n(e,t,d)}return t.flags|=1,e=Xn(p,a),e.ref=t.ref,e.return=t,t.child=e}function qy(e,t,r,a,d){if(e!==null){var p=e.memoizedProps;if(Qa(p,a)&&e.ref===t.ref)if(Ct=!1,t.pendingProps=a=p,nf(e,d))(e.flags&131072)!==0&&(Ct=!0);else return t.lanes=e.lanes,$n(e,t,d)}return Kc(e,t,r,a,d)}function Py(e,t,r,a){var d=a.children,p=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(p=p!==null?p.baseLanes|r:r,e!==null){for(a=t.child=e.child,d=0;a!==null;)d=d|a.lanes|a.childLanes,a=a.sibling;a=d&~p}else a=0,t.child=null;return Fy(e,t,p,r,a)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vo(t,p!==null?p.cachePool:null),p!==null?Vg(t,p):Cc(),Gg(t);else return a=t.lanes=536870912,Fy(e,t,p!==null?p.baseLanes|r:r,r,a)}else p!==null?(vo(t,p.cachePool),Vg(t,p),Cr(),t.memoizedState=null):(e!==null&&vo(t,null),Cc(),Cr());return It(e,t,d,r),t.child}function fl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Fy(e,t,r,a,d){var p=vc();return p=p===null?null:{parent:_t._currentValue,pool:p},t.memoizedState={baseLanes:r,cachePool:p},e!==null&&vo(t,null),Cc(),Gg(t),e!==null&&qi(e,t,a,!0),t.childLanes=d,null}function jo(e,t){return t=Io({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Yy(e,t,r){return li(t,e.child,null,r),e=jo(t,t.pendingProps),e.flags|=2,sn(t),t.memoizedState=null,e}function uC(e,t,r){var a=t.pendingProps,d=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(et){if(a.mode==="hidden")return e=jo(t,a),t.lanes=536870912,fl(null,e);if(Ac(t),(e=ht)?(e=nb(e,En),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yr!==null?{id:Ln,overflow:In}:null,retryLane:536870912,hydrationErrors:null},r=Ag(e),r.return=t,t.child=r,jt=t,ht=null)):e=null,e===null)throw vr(t);return t.lanes=536870912,null}return jo(t,a)}var p=e.memoizedState;if(p!==null){var x=p.dehydrated;if(Ac(t),d)if(t.flags&256)t.flags&=-257,t=Yy(e,t,r);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ct||qi(e,t,r,!1),d=(r&e.childLanes)!==0,Ct||d){if(a=ct,a!==null&&(x=Dp(a,r),x!==0&&x!==p.retryLane))throw p.retryLane=x,Wr(e,x),$t(a,e,x),Zc;Go(),t=Yy(e,t,r)}else e=p.treeContext,ht=_n(x.nextSibling),jt=t,et=!0,br=null,En=!1,e!==null&&Rg(t,e),t=jo(t,a),t.flags|=4096;return t}return e=Xn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Lo(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(o(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function Kc(e,t,r,a,d){return ni(t),r=Nc(e,t,r,a,void 0,d),a=Rc(),e!==null&&!Ct?(Oc(e,t,d),$n(e,t,d)):(et&&a&&cc(t),t.flags|=1,It(e,t,r,d),t.child)}function Vy(e,t,r,a,d,p){return ni(t),t.updateQueue=null,r=Zg(t,a,r,d),Xg(e),a=Rc(),e!==null&&!Ct?(Oc(e,t,p),$n(e,t,p)):(et&&a&&cc(t),t.flags|=1,It(e,t,r,p),t.child)}function Gy(e,t,r,a,d){if(ni(t),t.stateNode===null){var p=Ii,x=r.contextType;typeof x=="object"&&x!==null&&(p=Lt(x)),p=new r(a,p),t.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Gc,t.stateNode=p,p._reactInternals=t,p=t.stateNode,p.props=a,p.state=t.memoizedState,p.refs={},Ec(t),x=r.contextType,p.context=typeof x=="object"&&x!==null?Lt(x):Ii,p.state=t.memoizedState,x=r.getDerivedStateFromProps,typeof x=="function"&&(Vc(t,r,x,a),p.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(x=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),x!==p.state&&Gc.enqueueReplaceState(p,p.state,null),ll(t,a,p,d),al(),p.state=t.memoizedState),typeof p.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){p=t.stateNode;var O=t.memoizedProps,V=si(r,O);p.props=V;var le=p.context,me=r.contextType;x=Ii,typeof me=="object"&&me!==null&&(x=Lt(me));var ge=r.getDerivedStateFromProps;me=typeof ge=="function"||typeof p.getSnapshotBeforeUpdate=="function",O=t.pendingProps!==O,me||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(O||le!==x)&&zy(t,p,a,x),Er=!1;var ue=t.memoizedState;p.state=ue,ll(t,a,p,d),al(),le=t.memoizedState,O||ue!==le||Er?(typeof ge=="function"&&(Vc(t,r,ge,a),le=t.memoizedState),(V=Er||Oy(t,r,V,a,ue,le,x))?(me||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(t.flags|=4194308)):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=le),p.props=a,p.state=le,p.context=x,a=V):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{p=t.stateNode,xc(e,t),x=t.memoizedProps,me=si(r,x),p.props=me,ge=t.pendingProps,ue=p.context,le=r.contextType,V=Ii,typeof le=="object"&&le!==null&&(V=Lt(le)),O=r.getDerivedStateFromProps,(le=typeof O=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(x!==ge||ue!==V)&&zy(t,p,a,V),Er=!1,ue=t.memoizedState,p.state=ue,ll(t,a,p,d),al();var fe=t.memoizedState;x!==ge||ue!==fe||Er||e!==null&&e.dependencies!==null&&yo(e.dependencies)?(typeof O=="function"&&(Vc(t,r,O,a),fe=t.memoizedState),(me=Er||Oy(t,r,me,a,ue,fe,V)||e!==null&&e.dependencies!==null&&yo(e.dependencies))?(le||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(a,fe,V),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(a,fe,V)),typeof p.componentDidUpdate=="function"&&(t.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof p.componentDidUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=fe),p.props=a,p.state=fe,p.context=V,a=me):(typeof p.componentDidUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=1024),a=!1)}return p=a,Lo(e,t),a=(t.flags&128)!==0,p||a?(p=t.stateNode,r=a&&typeof r.getDerivedStateFromError!="function"?null:p.render(),t.flags|=1,e!==null&&a?(t.child=li(t,e.child,null,d),t.child=li(t,null,r,d)):It(e,t,r,d),t.memoizedState=p.state,e=t.child):e=$n(e,t,d),e}function Xy(e,t,r,a){return ei(),t.flags|=256,It(e,t,r,a),t.child}var Qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:Lg()}}function Wc(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=cn),e}function Zy(e,t,r){var a=t.pendingProps,d=!1,p=(t.flags&128)!==0,x;if((x=p)||(x=e!==null&&e.memoizedState===null?!1:(St.current&2)!==0),x&&(d=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(et){if(d?wr(t):Cr(),(e=ht)?(e=nb(e,En),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yr!==null?{id:Ln,overflow:In}:null,retryLane:536870912,hydrationErrors:null},r=Ag(e),r.return=t,t.child=r,jt=t,ht=null)):e=null,e===null)throw vr(t);return jf(e)?t.lanes=32:t.lanes=536870912,null}var O=a.children;return a=a.fallback,d?(Cr(),d=t.mode,O=Io({mode:"hidden",children:O},d),a=$r(a,d,r,null),O.return=t,a.return=t,O.sibling=a,t.child=O,a=t.child,a.memoizedState=Jc(r),a.childLanes=Wc(e,x,r),t.memoizedState=Qc,fl(null,a)):(wr(t),$c(t,O))}var V=e.memoizedState;if(V!==null&&(O=V.dehydrated,O!==null)){if(p)t.flags&256?(wr(t),t.flags&=-257,t=ef(e,t,r)):t.memoizedState!==null?(Cr(),t.child=e.child,t.flags|=128,t=null):(Cr(),O=a.fallback,d=t.mode,a=Io({mode:"visible",children:a.children},d),O=$r(O,d,r,null),O.flags|=2,a.return=t,O.return=t,a.sibling=O,t.child=a,li(t,e.child,null,r),a=t.child,a.memoizedState=Jc(r),a.childLanes=Wc(e,x,r),t.memoizedState=Qc,t=fl(null,a));else if(wr(t),jf(O)){if(x=O.nextSibling&&O.nextSibling.dataset,x)var le=x.dgst;x=le,a=Error(o(419)),a.stack="",a.digest=x,$a({value:a,source:null,stack:null}),t=ef(e,t,r)}else if(Ct||qi(e,t,r,!1),x=(r&e.childLanes)!==0,Ct||x){if(x=ct,x!==null&&(a=Dp(x,r),a!==0&&a!==V.retryLane))throw V.retryLane=a,Wr(e,a),$t(x,e,a),Zc;Df(O)||Go(),t=ef(e,t,r)}else Df(O)?(t.flags|=192,t.child=e.child,t=null):(e=V.treeContext,ht=_n(O.nextSibling),jt=t,et=!0,br=null,En=!1,e!==null&&Rg(t,e),t=$c(t,a.children),t.flags|=4096);return t}return d?(Cr(),O=a.fallback,d=t.mode,V=e.child,le=V.sibling,a=Xn(V,{mode:"hidden",children:a.children}),a.subtreeFlags=V.subtreeFlags&65011712,le!==null?O=Xn(le,O):(O=$r(O,d,r,null),O.flags|=2),O.return=t,a.return=t,a.sibling=O,t.child=a,fl(null,a),a=t.child,O=e.child.memoizedState,O===null?O=Jc(r):(d=O.cachePool,d!==null?(V=_t._currentValue,d=d.parent!==V?{parent:V,pool:V}:d):d=Lg(),O={baseLanes:O.baseLanes|r,cachePool:d}),a.memoizedState=O,a.childLanes=Wc(e,x,r),t.memoizedState=Qc,fl(e.child,a)):(wr(t),r=e.child,e=r.sibling,r=Xn(r,{mode:"visible",children:a.children}),r.return=t,r.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=r,t.memoizedState=null,r)}function $c(e,t){return t=Io({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Io(e,t){return e=ln(22,e,null,t),e.lanes=0,e}function ef(e,t,r){return li(t,e.child,null,r),e=$c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ky(e,t,r){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),pc(e.return,t,r)}function tf(e,t,r,a,d,p){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:r,tailMode:d,treeForkCount:p}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=a,x.tail=r,x.tailMode=d,x.treeForkCount=p)}function Qy(e,t,r){var a=t.pendingProps,d=a.revealOrder,p=a.tail;a=a.children;var x=St.current,O=(x&2)!==0;if(O?(x=x&1|2,t.flags|=128):x&=1,N(St,x),It(e,t,a,r),a=et?Wa:0,!O&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ky(e,r,t);else if(e.tag===19)Ky(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(d){case"forwards":for(r=t.child,d=null;r!==null;)e=r.alternate,e!==null&&Co(e)===null&&(d=r),r=r.sibling;r=d,r===null?(d=t.child,t.child=null):(d=r.sibling,r.sibling=null),tf(t,!1,d,r,p,a);break;case"backwards":case"unstable_legacy-backwards":for(r=null,d=t.child,t.child=null;d!==null;){if(e=d.alternate,e!==null&&Co(e)===null){t.child=d;break}e=d.sibling,d.sibling=r,r=d,d=e}tf(t,!0,r,null,p,a);break;case"together":tf(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function $n(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),kr|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(qi(e,t,r,!1),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,r=Xn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Xn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function nf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&yo(e)))}function cC(e,t,r){switch(t.tag){case 3:Ne(t,t.stateNode.containerInfo),Sr(t,_t,e.memoizedState.cache),ei();break;case 27:case 5:He(t);break;case 4:Ne(t,t.stateNode.containerInfo);break;case 10:Sr(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ac(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(wr(t),t.flags|=128,null):(r&t.child.childLanes)!==0?Zy(e,t,r):(wr(t),e=$n(e,t,r),e!==null?e.sibling:null);wr(t);break;case 19:var d=(e.flags&128)!==0;if(a=(r&t.childLanes)!==0,a||(qi(e,t,r,!1),a=(r&t.childLanes)!==0),d){if(a)return Qy(e,t,r);t.flags|=128}if(d=t.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),N(St,St.current),a)break;return null;case 22:return t.lanes=0,Py(e,t,r,t.pendingProps);case 24:Sr(t,_t,e.memoizedState.cache)}return $n(e,t,r)}function Jy(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ct=!0;else{if(!nf(e,r)&&(t.flags&128)===0)return Ct=!1,cC(e,t,r);Ct=(e.flags&131072)!==0}else Ct=!1,et&&(t.flags&1048576)!==0&&Ng(t,Wa,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ii(t.elementType),t.type=e,typeof e=="function")oc(e)?(a=si(e,a),t.tag=1,t=Gy(null,t,e,a,r)):(t.tag=0,t=Kc(null,t,e,a,r));else{if(e!=null){var d=e.$$typeof;if(d===B){t.tag=11,t=Uy(null,t,e,a,r);break e}else if(d===H){t.tag=14,t=Hy(null,t,e,a,r);break e}}throw t=C(e)||e,Error(o(306,t,""))}}return t;case 0:return Kc(e,t,t.type,t.pendingProps,r);case 1:return a=t.type,d=si(a,t.pendingProps),Gy(e,t,a,d,r);case 3:e:{if(Ne(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var p=t.memoizedState;d=p.element,xc(e,t),ll(t,a,null,r);var x=t.memoizedState;if(a=x.cache,Sr(t,_t,a),a!==p.cache&&gc(t,[_t],r,!0),al(),a=x.element,p.isDehydrated)if(p={element:a,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=p,t.memoizedState=p,t.flags&256){t=Xy(e,t,a,r);break e}else if(a!==d){d=bn(Error(o(424)),t),$a(d),t=Xy(e,t,a,r);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ht=_n(e.firstChild),jt=t,et=!0,br=null,En=!0,r=Pg(t,null,a,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(ei(),a===d){t=$n(e,t,r);break e}It(e,t,a,r)}t=t.child}return t;case 26:return Lo(e,t),e===null?(r=sb(t.type,null,t.pendingProps,null))?t.memoizedState=r:et||(r=t.type,e=t.pendingProps,a=$o(we.current).createElement(r),a[Dt]=t,a[Xt]=e,Bt(a,r,e),zt(a),t.stateNode=a):t.memoizedState=sb(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return He(t),e===null&&et&&(a=t.stateNode=ab(t.type,t.pendingProps,we.current),jt=t,En=!0,d=ht,Mr(t.type)?(Lf=d,ht=_n(a.firstChild)):ht=d),It(e,t,t.pendingProps.children,r),Lo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&et&&((d=a=ht)&&(a=HC(a,t.type,t.pendingProps,En),a!==null?(t.stateNode=a,jt=t,ht=_n(a.firstChild),En=!1,d=!0):d=!1),d||vr(t)),He(t),d=t.type,p=t.pendingProps,x=e!==null?e.memoizedProps:null,a=p.children,Of(d,p)?a=null:x!==null&&Of(d,x)&&(t.flags|=32),t.memoizedState!==null&&(d=Nc(e,t,tC,null,null,r),Tl._currentValue=d),Lo(e,t),It(e,t,a,r),t.child;case 6:return e===null&&et&&((e=r=ht)&&(r=qC(r,t.pendingProps,En),r!==null?(t.stateNode=r,jt=t,ht=null,e=!0):e=!1),e||vr(t)),null;case 13:return Zy(e,t,r);case 4:return Ne(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=li(t,null,a,r):It(e,t,a,r),t.child;case 11:return Uy(e,t,t.type,t.pendingProps,r);case 7:return It(e,t,t.pendingProps,r),t.child;case 8:return It(e,t,t.pendingProps.children,r),t.child;case 12:return It(e,t,t.pendingProps.children,r),t.child;case 10:return a=t.pendingProps,Sr(t,t.type,a.value),It(e,t,a.children,r),t.child;case 9:return d=t.type._context,a=t.pendingProps.children,ni(t),d=Lt(d),a=a(d),t.flags|=1,It(e,t,a,r),t.child;case 14:return Hy(e,t,t.type,t.pendingProps,r);case 15:return qy(e,t,t.type,t.pendingProps,r);case 19:return Qy(e,t,r);case 31:return uC(e,t,r);case 22:return Py(e,t,r,t.pendingProps);case 24:return ni(t),a=Lt(_t),e===null?(d=vc(),d===null&&(d=ct,p=yc(),d.pooledCache=p,p.refCount++,p!==null&&(d.pooledCacheLanes|=r),d=p),t.memoizedState={parent:a,cache:d},Ec(t),Sr(t,_t,d)):((e.lanes&r)!==0&&(xc(e,t),ll(t,null,null,r),al()),d=e.memoizedState,p=t.memoizedState,d.parent!==a?(d={parent:a,cache:a},t.memoizedState=d,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=d),Sr(t,_t,a)):(a=p.cache,Sr(t,_t,a),a!==d.cache&&gc(t,[_t],r,!0))),It(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function er(e){e.flags|=4}function rf(e,t,r,a,d){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(w0())e.flags|=8192;else throw ai=Eo,Sc}else e.flags&=-16777217}function Wy(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!hb(t))if(w0())e.flags|=8192;else throw ai=Eo,Sc}function Bo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Op():536870912,e.lanes|=t,$i|=t)}function dl(e,t){if(!et)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function mt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,a=0;if(t)for(var d=e.child;d!==null;)r|=d.lanes|d.childLanes,a|=d.subtreeFlags&65011712,a|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)r|=d.lanes|d.childLanes,a|=d.subtreeFlags,a|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=a,e.childLanes=r,t}function fC(e,t,r){var a=t.pendingProps;switch(fc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(t),null;case 1:return mt(t),null;case 3:return r=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Qn(_t),ke(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Hi(t)?er(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,hc())),mt(t),null;case 26:var d=t.type,p=t.memoizedState;return e===null?(er(t),p!==null?(mt(t),Wy(t,p)):(mt(t),rf(t,d,null,a,r))):p?p!==e.memoizedState?(er(t),mt(t),Wy(t,p)):(mt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&er(t),mt(t),rf(t,d,e,a,r)),null;case 27:if(Se(t),r=we.current,d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&er(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return mt(t),null}e=re.current,Hi(t)?Og(t):(e=ab(d,a,r),t.stateNode=e,er(t))}return mt(t),null;case 5:if(Se(t),d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&er(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return mt(t),null}if(p=re.current,Hi(t))Og(t);else{var x=$o(we.current);switch(p){case 1:p=x.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:p=x.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":p=x.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":p=x.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":p=x.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof a.is=="string"?x.createElement("select",{is:a.is}):x.createElement("select"),a.multiple?p.multiple=!0:a.size&&(p.size=a.size);break;default:p=typeof a.is=="string"?x.createElement(d,{is:a.is}):x.createElement(d)}}p[Dt]=t,p[Xt]=a;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)p.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=p;e:switch(Bt(p,d,a),d){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&er(t)}}return mt(t),rf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&er(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=we.current,Hi(t)){if(e=t.stateNode,r=t.memoizedProps,a=null,d=jt,d!==null)switch(d.tag){case 27:case 5:a=d.memoizedProps}e[Dt]=t,e=!!(e.nodeValue===r||a!==null&&a.suppressHydrationWarning===!0||Z0(e.nodeValue,r)),e||vr(t,!0)}else e=$o(e).createTextNode(a),e[Dt]=t,t.stateNode=e}return mt(t),null;case 31:if(r=t.memoizedState,e===null||e.memoizedState!==null){if(a=Hi(t),r!==null){if(e===null){if(!a)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Dt]=t}else ei(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),e=!1}else r=hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return t.flags&256?(sn(t),t):(sn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return mt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=Hi(t),a!==null&&a.dehydrated!==null){if(e===null){if(!d)throw Error(o(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(o(317));d[Dt]=t}else ei(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),d=!1}else d=hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return t.flags&256?(sn(t),t):(sn(t),null)}return sn(t),(t.flags&128)!==0?(t.lanes=r,t):(r=a!==null,e=e!==null&&e.memoizedState!==null,r&&(a=t.child,d=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(d=a.alternate.memoizedState.cachePool.pool),p=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(p=a.memoizedState.cachePool.pool),p!==d&&(a.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),Bo(t,t.updateQueue),mt(t),null);case 4:return ke(),e===null&&Tf(t.stateNode.containerInfo),mt(t),null;case 10:return Qn(t.type),mt(t),null;case 19:if(q(St),a=t.memoizedState,a===null)return mt(t),null;if(d=(t.flags&128)!==0,p=a.rendering,p===null)if(d)dl(a,!1);else{if(vt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(p=Co(e),p!==null){for(t.flags|=128,dl(a,!1),e=p.updateQueue,t.updateQueue=e,Bo(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)Tg(r,e),r=r.sibling;return N(St,St.current&1|2),et&&Zn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&_e()>Fo&&(t.flags|=128,d=!0,dl(a,!1),t.lanes=4194304)}else{if(!d)if(e=Co(p),e!==null){if(t.flags|=128,d=!0,e=e.updateQueue,t.updateQueue=e,Bo(t,e),dl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!p.alternate&&!et)return mt(t),null}else 2*_e()-a.renderingStartTime>Fo&&r!==536870912&&(t.flags|=128,d=!0,dl(a,!1),t.lanes=4194304);a.isBackwards?(p.sibling=t.child,t.child=p):(e=a.last,e!==null?e.sibling=p:t.child=p,a.last=p)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=_e(),e.sibling=null,r=St.current,N(St,d?r&1|2:r&1),et&&Zn(t,a.treeForkCount),e):(mt(t),null);case 22:case 23:return sn(t),Tc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(r&536870912)!==0&&(t.flags&128)===0&&(mt(t),t.subtreeFlags&6&&(t.flags|=8192)):mt(t),r=t.updateQueue,r!==null&&Bo(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==r&&(t.flags|=2048),e!==null&&q(ri),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Qn(_t),mt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function dC(e,t){switch(fc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qn(_t),ke(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Se(t),null;case 31:if(t.memoizedState!==null){if(sn(t),t.alternate===null)throw Error(o(340));ei()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(sn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ei()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(St),null;case 4:return ke(),null;case 10:return Qn(t.type),null;case 22:case 23:return sn(t),Tc(),e!==null&&q(ri),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qn(_t),null;case 25:return null;default:return null}}function $y(e,t){switch(fc(t),t.tag){case 3:Qn(_t),ke();break;case 26:case 27:case 5:Se(t);break;case 4:ke();break;case 31:t.memoizedState!==null&&sn(t);break;case 13:sn(t);break;case 19:q(St);break;case 10:Qn(t.type);break;case 22:case 23:sn(t),Tc(),e!==null&&q(ri);break;case 24:Qn(_t)}}function hl(e,t){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var d=a.next;r=d;do{if((r.tag&e)===e){a=void 0;var p=r.create,x=r.inst;a=p(),x.destroy=a}r=r.next}while(r!==d)}}catch(O){lt(t,t.return,O)}}function Tr(e,t,r){try{var a=t.updateQueue,d=a!==null?a.lastEffect:null;if(d!==null){var p=d.next;a=p;do{if((a.tag&e)===e){var x=a.inst,O=x.destroy;if(O!==void 0){x.destroy=void 0,d=t;var V=r,le=O;try{le()}catch(me){lt(d,V,me)}}}a=a.next}while(a!==p)}}catch(me){lt(t,t.return,me)}}function e0(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{Yg(t,r)}catch(a){lt(e,e.return,a)}}}function t0(e,t,r){r.props=si(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(a){lt(e,t,a)}}function ml(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof r=="function"?e.refCleanup=r(a):r.current=a}}catch(d){lt(e,t,d)}}function Bn(e,t){var r=e.ref,a=e.refCleanup;if(r!==null)if(typeof a=="function")try{a()}catch(d){lt(e,t,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(d){lt(e,t,d)}else r.current=null}function n0(e){var t=e.type,r=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&a.focus();break e;case"img":r.src?a.src=r.src:r.srcSet&&(a.srcset=r.srcSet)}}catch(d){lt(e,e.return,d)}}function af(e,t,r){try{var a=e.stateNode;DC(a,e.type,r,t),a[Xt]=t}catch(d){lt(e,e.return,d)}}function r0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Mr(e.type)||e.tag===4}function lf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||r0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Mr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function of(e,t,r){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Vn));else if(a!==4&&(a===27&&Mr(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(of(e,t,r),e=e.sibling;e!==null;)of(e,t,r),e=e.sibling}function Uo(e,t,r){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(a!==4&&(a===27&&Mr(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(Uo(e,t,r),e=e.sibling;e!==null;)Uo(e,t,r),e=e.sibling}function i0(e){var t=e.stateNode,r=e.memoizedProps;try{for(var a=e.type,d=t.attributes;d.length;)t.removeAttributeNode(d[0]);Bt(t,a,r),t[Dt]=e,t[Xt]=r}catch(p){lt(e,e.return,p)}}var tr=!1,Tt=!1,sf=!1,a0=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function hC(e,t){if(e=e.containerInfo,Nf=ls,e=yg(e),ec(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var a=r.getSelection&&r.getSelection();if(a&&a.rangeCount!==0){r=a.anchorNode;var d=a.anchorOffset,p=a.focusNode;a=a.focusOffset;try{r.nodeType,p.nodeType}catch{r=null;break e}var x=0,O=-1,V=-1,le=0,me=0,ge=e,ue=null;t:for(;;){for(var fe;ge!==r||d!==0&&ge.nodeType!==3||(O=x+d),ge!==p||a!==0&&ge.nodeType!==3||(V=x+a),ge.nodeType===3&&(x+=ge.nodeValue.length),(fe=ge.firstChild)!==null;)ue=ge,ge=fe;for(;;){if(ge===e)break t;if(ue===r&&++le===d&&(O=x),ue===p&&++me===a&&(V=x),(fe=ge.nextSibling)!==null)break;ge=ue,ue=ge.parentNode}ge=fe}r=O===-1||V===-1?null:{start:O,end:V}}else r=null}r=r||{start:0,end:0}}else r=null;for(Rf={focusedElem:e,selectionRange:r},ls=!1,Mt=t;Mt!==null;)if(t=Mt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Mt=e;else for(;Mt!==null;){switch(t=Mt,p=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)d=e[r],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&p!==null){e=void 0,r=t,d=p.memoizedProps,p=p.memoizedState,a=r.stateNode;try{var Re=si(r.type,d);e=a.getSnapshotBeforeUpdate(Re,p),a.__reactInternalSnapshotBeforeUpdate=e}catch(Le){lt(r,r.return,Le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)Mf(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Mf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Mt=e;break}Mt=t.return}}function l0(e,t,r){var a=r.flags;switch(r.tag){case 0:case 11:case 15:rr(e,r),a&4&&hl(5,r);break;case 1:if(rr(e,r),a&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(x){lt(r,r.return,x)}else{var d=si(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(d,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){lt(r,r.return,x)}}a&64&&e0(r),a&512&&ml(r,r.return);break;case 3:if(rr(e,r),a&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{Yg(e,t)}catch(x){lt(r,r.return,x)}}break;case 27:t===null&&a&4&&i0(r);case 26:case 5:rr(e,r),t===null&&a&4&&n0(r),a&512&&ml(r,r.return);break;case 12:rr(e,r);break;case 31:rr(e,r),a&4&&u0(e,r);break;case 13:rr(e,r),a&4&&c0(e,r),a&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=xC.bind(null,r),PC(e,r))));break;case 22:if(a=r.memoizedState!==null||tr,!a){t=t!==null&&t.memoizedState!==null||Tt,d=tr;var p=Tt;tr=a,(Tt=t)&&!p?ir(e,r,(r.subtreeFlags&8772)!==0):rr(e,r),tr=d,Tt=p}break;case 30:break;default:rr(e,r)}}function o0(e){var t=e.alternate;t!==null&&(e.alternate=null,o0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Iu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var yt=null,Kt=!1;function nr(e,t,r){for(r=r.child;r!==null;)s0(e,t,r),r=r.sibling}function s0(e,t,r){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Xe,r)}catch{}switch(r.tag){case 26:Tt||Bn(r,t),nr(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Tt||Bn(r,t);var a=yt,d=Kt;Mr(r.type)&&(yt=r.stateNode,Kt=!1),nr(e,t,r),_l(r.stateNode),yt=a,Kt=d;break;case 5:Tt||Bn(r,t);case 6:if(a=yt,d=Kt,yt=null,nr(e,t,r),yt=a,Kt=d,yt!==null)if(Kt)try{(yt.nodeType===9?yt.body:yt.nodeName==="HTML"?yt.ownerDocument.body:yt).removeChild(r.stateNode)}catch(p){lt(r,t,p)}else try{yt.removeChild(r.stateNode)}catch(p){lt(r,t,p)}break;case 18:yt!==null&&(Kt?(e=yt,eb(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),oa(e)):eb(yt,r.stateNode));break;case 4:a=yt,d=Kt,yt=r.stateNode.containerInfo,Kt=!0,nr(e,t,r),yt=a,Kt=d;break;case 0:case 11:case 14:case 15:Tr(2,r,t),Tt||Tr(4,r,t),nr(e,t,r);break;case 1:Tt||(Bn(r,t),a=r.stateNode,typeof a.componentWillUnmount=="function"&&t0(r,t,a)),nr(e,t,r);break;case 21:nr(e,t,r);break;case 22:Tt=(a=Tt)||r.memoizedState!==null,nr(e,t,r),Tt=a;break;default:nr(e,t,r)}}function u0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{oa(e)}catch(r){lt(t,t.return,r)}}}function c0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{oa(e)}catch(r){lt(t,t.return,r)}}function mC(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new a0),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new a0),t;default:throw Error(o(435,e.tag))}}function Ho(e,t){var r=mC(e);t.forEach(function(a){if(!r.has(a)){r.add(a);var d=_C.bind(null,e,a);a.then(d,d)}})}function Qt(e,t){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var d=r[a],p=e,x=t,O=x;e:for(;O!==null;){switch(O.tag){case 27:if(Mr(O.type)){yt=O.stateNode,Kt=!1;break e}break;case 5:yt=O.stateNode,Kt=!1;break e;case 3:case 4:yt=O.stateNode.containerInfo,Kt=!0;break e}O=O.return}if(yt===null)throw Error(o(160));s0(p,x,d),yt=null,Kt=!1,p=d.alternate,p!==null&&(p.return=null),d.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)f0(t,e),t=t.sibling}var kn=null;function f0(e,t){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Qt(t,e),Jt(e),a&4&&(Tr(3,e,e.return),hl(3,e),Tr(5,e,e.return));break;case 1:Qt(t,e),Jt(e),a&512&&(Tt||r===null||Bn(r,r.return)),a&64&&tr&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?a:r.concat(a))));break;case 26:var d=kn;if(Qt(t,e),Jt(e),a&512&&(Tt||r===null||Bn(r,r.return)),a&4){var p=r!==null?r.memoizedState:null;if(a=e.memoizedState,r===null)if(a===null)if(e.stateNode===null){e:{a=e.type,r=e.memoizedProps,d=d.ownerDocument||d;t:switch(a){case"title":p=d.getElementsByTagName("title")[0],(!p||p[qa]||p[Dt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=d.createElement(a),d.head.insertBefore(p,d.querySelector("head > title"))),Bt(p,a,r),p[Dt]=e,zt(p),a=p;break e;case"link":var x=fb("link","href",d).get(a+(r.href||""));if(x){for(var O=0;O<x.length;O++)if(p=x[O],p.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&p.getAttribute("rel")===(r.rel==null?null:r.rel)&&p.getAttribute("title")===(r.title==null?null:r.title)&&p.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){x.splice(O,1);break t}}p=d.createElement(a),Bt(p,a,r),d.head.appendChild(p);break;case"meta":if(x=fb("meta","content",d).get(a+(r.content||""))){for(O=0;O<x.length;O++)if(p=x[O],p.getAttribute("content")===(r.content==null?null:""+r.content)&&p.getAttribute("name")===(r.name==null?null:r.name)&&p.getAttribute("property")===(r.property==null?null:r.property)&&p.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&p.getAttribute("charset")===(r.charSet==null?null:r.charSet)){x.splice(O,1);break t}}p=d.createElement(a),Bt(p,a,r),d.head.appendChild(p);break;default:throw Error(o(468,a))}p[Dt]=e,zt(p),a=p}e.stateNode=a}else db(d,e.type,e.stateNode);else e.stateNode=cb(d,a,e.memoizedProps);else p!==a?(p===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):p.count--,a===null?db(d,e.type,e.stateNode):cb(d,a,e.memoizedProps)):a===null&&e.stateNode!==null&&af(e,e.memoizedProps,r.memoizedProps)}break;case 27:Qt(t,e),Jt(e),a&512&&(Tt||r===null||Bn(r,r.return)),r!==null&&a&4&&af(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Qt(t,e),Jt(e),a&512&&(Tt||r===null||Bn(r,r.return)),e.flags&32){d=e.stateNode;try{Ri(d,"")}catch(Re){lt(e,e.return,Re)}}a&4&&e.stateNode!=null&&(d=e.memoizedProps,af(e,d,r!==null?r.memoizedProps:d)),a&1024&&(sf=!0);break;case 6:if(Qt(t,e),Jt(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,r=e.stateNode;try{r.nodeValue=a}catch(Re){lt(e,e.return,Re)}}break;case 3:if(ns=null,d=kn,kn=es(t.containerInfo),Qt(t,e),kn=d,Jt(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{oa(t.containerInfo)}catch(Re){lt(e,e.return,Re)}sf&&(sf=!1,d0(e));break;case 4:a=kn,kn=es(e.stateNode.containerInfo),Qt(t,e),Jt(e),kn=a;break;case 12:Qt(t,e),Jt(e);break;case 31:Qt(t,e),Jt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ho(e,a)));break;case 13:Qt(t,e),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Po=_e()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ho(e,a)));break;case 22:d=e.memoizedState!==null;var V=r!==null&&r.memoizedState!==null,le=tr,me=Tt;if(tr=le||d,Tt=me||V,Qt(t,e),Tt=me,tr=le,Jt(e),a&8192)e:for(t=e.stateNode,t._visibility=d?t._visibility&-2:t._visibility|1,d&&(r===null||V||tr||Tt||ui(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){V=r=t;try{if(p=V.stateNode,d)x=p.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{O=V.stateNode;var ge=V.memoizedProps.style,ue=ge!=null&&ge.hasOwnProperty("display")?ge.display:null;O.style.display=ue==null||typeof ue=="boolean"?"":(""+ue).trim()}}catch(Re){lt(V,V.return,Re)}}}else if(t.tag===6){if(r===null){V=t;try{V.stateNode.nodeValue=d?"":V.memoizedProps}catch(Re){lt(V,V.return,Re)}}}else if(t.tag===18){if(r===null){V=t;try{var fe=V.stateNode;d?tb(fe,!0):tb(V.stateNode,!1)}catch(Re){lt(V,V.return,Re)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(r=a.retryQueue,r!==null&&(a.retryQueue=null,Ho(e,r))));break;case 19:Qt(t,e),Jt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ho(e,a)));break;case 30:break;case 21:break;default:Qt(t,e),Jt(e)}}function Jt(e){var t=e.flags;if(t&2){try{for(var r,a=e.return;a!==null;){if(r0(a)){r=a;break}a=a.return}if(r==null)throw Error(o(160));switch(r.tag){case 27:var d=r.stateNode,p=lf(e);Uo(e,p,d);break;case 5:var x=r.stateNode;r.flags&32&&(Ri(x,""),r.flags&=-33);var O=lf(e);Uo(e,O,x);break;case 3:case 4:var V=r.stateNode.containerInfo,le=lf(e);of(e,le,V);break;default:throw Error(o(161))}}catch(me){lt(e,e.return,me)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function d0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;d0(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function rr(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)l0(e,t.alternate,t),t=t.sibling}function ui(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Tr(4,t,t.return),ui(t);break;case 1:Bn(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&t0(t,t.return,r),ui(t);break;case 27:_l(t.stateNode);case 26:case 5:Bn(t,t.return),ui(t);break;case 22:t.memoizedState===null&&ui(t);break;case 30:ui(t);break;default:ui(t)}e=e.sibling}}function ir(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,d=e,p=t,x=p.flags;switch(p.tag){case 0:case 11:case 15:ir(d,p,r),hl(4,p);break;case 1:if(ir(d,p,r),a=p,d=a.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(le){lt(a,a.return,le)}if(a=p,d=a.updateQueue,d!==null){var O=a.stateNode;try{var V=d.shared.hiddenCallbacks;if(V!==null)for(d.shared.hiddenCallbacks=null,d=0;d<V.length;d++)Fg(V[d],O)}catch(le){lt(a,a.return,le)}}r&&x&64&&e0(p),ml(p,p.return);break;case 27:i0(p);case 26:case 5:ir(d,p,r),r&&a===null&&x&4&&n0(p),ml(p,p.return);break;case 12:ir(d,p,r);break;case 31:ir(d,p,r),r&&x&4&&u0(d,p);break;case 13:ir(d,p,r),r&&x&4&&c0(d,p);break;case 22:p.memoizedState===null&&ir(d,p,r),ml(p,p.return);break;case 30:break;default:ir(d,p,r)}t=t.sibling}}function uf(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&el(r))}function cf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&el(e))}function Nn(e,t,r,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)h0(e,t,r,a),t=t.sibling}function h0(e,t,r,a){var d=t.flags;switch(t.tag){case 0:case 11:case 15:Nn(e,t,r,a),d&2048&&hl(9,t);break;case 1:Nn(e,t,r,a);break;case 3:Nn(e,t,r,a),d&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&el(e)));break;case 12:if(d&2048){Nn(e,t,r,a),e=t.stateNode;try{var p=t.memoizedProps,x=p.id,O=p.onPostCommit;typeof O=="function"&&O(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(V){lt(t,t.return,V)}}else Nn(e,t,r,a);break;case 31:Nn(e,t,r,a);break;case 13:Nn(e,t,r,a);break;case 23:break;case 22:p=t.stateNode,x=t.alternate,t.memoizedState!==null?p._visibility&2?Nn(e,t,r,a):pl(e,t):p._visibility&2?Nn(e,t,r,a):(p._visibility|=2,Qi(e,t,r,a,(t.subtreeFlags&10256)!==0||!1)),d&2048&&uf(x,t);break;case 24:Nn(e,t,r,a),d&2048&&cf(t.alternate,t);break;default:Nn(e,t,r,a)}}function Qi(e,t,r,a,d){for(d=d&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var p=e,x=t,O=r,V=a,le=x.flags;switch(x.tag){case 0:case 11:case 15:Qi(p,x,O,V,d),hl(8,x);break;case 23:break;case 22:var me=x.stateNode;x.memoizedState!==null?me._visibility&2?Qi(p,x,O,V,d):pl(p,x):(me._visibility|=2,Qi(p,x,O,V,d)),d&&le&2048&&uf(x.alternate,x);break;case 24:Qi(p,x,O,V,d),d&&le&2048&&cf(x.alternate,x);break;default:Qi(p,x,O,V,d)}t=t.sibling}}function pl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,a=t,d=a.flags;switch(a.tag){case 22:pl(r,a),d&2048&&uf(a.alternate,a);break;case 24:pl(r,a),d&2048&&cf(a.alternate,a);break;default:pl(r,a)}t=t.sibling}}var gl=8192;function Ji(e,t,r){if(e.subtreeFlags&gl)for(e=e.child;e!==null;)m0(e,t,r),e=e.sibling}function m0(e,t,r){switch(e.tag){case 26:Ji(e,t,r),e.flags&gl&&e.memoizedState!==null&&eT(r,kn,e.memoizedState,e.memoizedProps);break;case 5:Ji(e,t,r);break;case 3:case 4:var a=kn;kn=es(e.stateNode.containerInfo),Ji(e,t,r),kn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=gl,gl=16777216,Ji(e,t,r),gl=a):Ji(e,t,r));break;default:Ji(e,t,r)}}function p0(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function yl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var a=t[r];Mt=a,y0(a,e)}p0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)g0(e),e=e.sibling}function g0(e){switch(e.tag){case 0:case 11:case 15:yl(e),e.flags&2048&&Tr(9,e,e.return);break;case 3:yl(e);break;case 12:yl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qo(e)):yl(e);break;default:yl(e)}}function qo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var a=t[r];Mt=a,y0(a,e)}p0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Tr(8,t,t.return),qo(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,qo(t));break;default:qo(t)}e=e.sibling}}function y0(e,t){for(;Mt!==null;){var r=Mt;switch(r.tag){case 0:case 11:case 15:Tr(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var a=r.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:el(r.memoizedState.cache)}if(a=r.child,a!==null)a.return=r,Mt=a;else e:for(r=e;Mt!==null;){a=Mt;var d=a.sibling,p=a.return;if(o0(a),a===r){Mt=null;break e}if(d!==null){d.return=p,Mt=d;break e}Mt=p}}}var pC={getCacheForType:function(e){var t=Lt(_t),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return Lt(_t).controller.signal}},gC=typeof WeakMap=="function"?WeakMap:Map,it=0,ct=null,Ke=null,We=0,at=0,un=null,Ar=!1,Wi=!1,ff=!1,ar=0,vt=0,kr=0,ci=0,df=0,cn=0,$i=0,bl=null,Wt=null,hf=!1,Po=0,b0=0,Fo=1/0,Yo=null,Nr=null,Nt=0,Rr=null,ea=null,lr=0,mf=0,pf=null,v0=null,vl=0,gf=null;function fn(){return(it&2)!==0&&We!==0?We&-We:Z.T!==null?xf():jp()}function S0(){if(cn===0)if((We&536870912)===0||et){var e=Xr;Xr<<=1,(Xr&3932160)===0&&(Xr=262144),cn=e}else cn=536870912;return e=on.current,e!==null&&(e.flags|=32),cn}function $t(e,t,r){(e===ct&&(at===2||at===9)||e.cancelPendingCommit!==null)&&(ta(e,0),Or(e,We,cn,!1)),Ha(e,r),((it&2)===0||e!==ct)&&(e===ct&&((it&2)===0&&(ci|=r),vt===4&&Or(e,We,cn,!1)),Un(e))}function E0(e,t,r){if((it&6)!==0)throw Error(o(327));var a=!r&&(t&127)===0&&(t&e.expiredLanes)===0||Ua(e,t),d=a?vC(e,t):bf(e,t,!0),p=a;do{if(d===0){Wi&&!a&&Or(e,t,0,!1);break}else{if(r=e.current.alternate,p&&!yC(r)){d=bf(e,t,!1),p=!1;continue}if(d===2){if(p=t,e.errorRecoveryDisabledLanes&p)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var O=e;d=bl;var V=O.current.memoizedState.isDehydrated;if(V&&(ta(O,x).flags|=256),x=bf(O,x,!1),x!==2){if(ff&&!V){O.errorRecoveryDisabledLanes|=p,ci|=p,d=4;break e}p=Wt,Wt=d,p!==null&&(Wt===null?Wt=p:Wt.push.apply(Wt,p))}d=x}if(p=!1,d!==2)continue}}if(d===1){ta(e,0),Or(e,t,0,!0);break}e:{switch(a=e,p=d,p){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Or(a,t,cn,!Ar);break e;case 2:Wt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(d=Po+300-_e(),10<d)){if(Or(a,t,cn,!Ar),$l(a,0,!0)!==0)break e;lr=t,a.timeoutHandle=W0(x0.bind(null,a,r,Wt,Yo,hf,t,cn,ci,$i,Ar,p,"Throttled",-0,0),d);break e}x0(a,r,Wt,Yo,hf,t,cn,ci,$i,Ar,p,null,-0,0)}}break}while(!0);Un(e)}function x0(e,t,r,a,d,p,x,O,V,le,me,ge,ue,fe){if(e.timeoutHandle=-1,ge=t.subtreeFlags,ge&8192||(ge&16785408)===16785408){ge={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vn},m0(t,p,ge);var Re=(p&62914560)===p?Po-_e():(p&4194048)===p?b0-_e():0;if(Re=tT(ge,Re),Re!==null){lr=p,e.cancelPendingCommit=Re(R0.bind(null,e,t,p,r,a,d,x,O,V,me,ge,null,ue,fe)),Or(e,p,x,!le);return}}R0(e,t,p,r,a,d,x,O,V)}function yC(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var a=0;a<r.length;a++){var d=r[a],p=d.getSnapshot;d=d.value;try{if(!an(p(),d))return!1}catch{return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Or(e,t,r,a){t&=~df,t&=~ci,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var d=t;0<d;){var p=31-Ze(d),x=1<<p;a[p]=-1,d&=~x}r!==0&&zp(e,r,t)}function Vo(){return(it&6)===0?(Sl(0),!1):!0}function yf(){if(Ke!==null){if(at===0)var e=Ke.return;else e=Ke,Kn=ti=null,zc(e),Vi=null,nl=0,e=Ke;for(;e!==null;)$y(e.alternate,e),e=e.return;Ke=null}}function ta(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,IC(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),lr=0,yf(),ct=e,Ke=r=Xn(e.current,null),We=t,at=0,un=null,Ar=!1,Wi=Ua(e,t),ff=!1,$i=cn=df=ci=kr=vt=0,Wt=bl=null,hf=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var d=31-Ze(a),p=1<<d;t|=e[d],a&=~p}return ar=t,fo(),r}function _0(e,t){qe=null,Z.H=cl,t===Yi||t===So?(t=Ug(),at=3):t===Sc?(t=Ug(),at=4):at=t===Zc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,un=t,Ke===null&&(vt=1,Do(e,bn(t,e.current)))}function w0(){var e=on.current;return e===null?!0:(We&4194048)===We?xn===null:(We&62914560)===We||(We&536870912)!==0?e===xn:!1}function C0(){var e=Z.H;return Z.H=cl,e===null?cl:e}function T0(){var e=Z.A;return Z.A=pC,e}function Go(){vt=4,Ar||(We&4194048)!==We&&on.current!==null||(Wi=!0),(kr&134217727)===0&&(ci&134217727)===0||ct===null||Or(ct,We,cn,!1)}function bf(e,t,r){var a=it;it|=2;var d=C0(),p=T0();(ct!==e||We!==t)&&(Yo=null,ta(e,t)),t=!1;var x=vt;e:do try{if(at!==0&&Ke!==null){var O=Ke,V=un;switch(at){case 8:yf(),x=6;break e;case 3:case 2:case 9:case 6:on.current===null&&(t=!0);var le=at;if(at=0,un=null,na(e,O,V,le),r&&Wi){x=0;break e}break;default:le=at,at=0,un=null,na(e,O,V,le)}}bC(),x=vt;break}catch(me){_0(e,me)}while(!0);return t&&e.shellSuspendCounter++,Kn=ti=null,it=a,Z.H=d,Z.A=p,Ke===null&&(ct=null,We=0,fo()),x}function bC(){for(;Ke!==null;)A0(Ke)}function vC(e,t){var r=it;it|=2;var a=C0(),d=T0();ct!==e||We!==t?(Yo=null,Fo=_e()+500,ta(e,t)):Wi=Ua(e,t);e:do try{if(at!==0&&Ke!==null){t=Ke;var p=un;t:switch(at){case 1:at=0,un=null,na(e,t,p,1);break;case 2:case 9:if(Ig(p)){at=0,un=null,k0(t);break}t=function(){at!==2&&at!==9||ct!==e||(at=7),Un(e)},p.then(t,t);break e;case 3:at=7;break e;case 4:at=5;break e;case 7:Ig(p)?(at=0,un=null,k0(t)):(at=0,un=null,na(e,t,p,7));break;case 5:var x=null;switch(Ke.tag){case 26:x=Ke.memoizedState;case 5:case 27:var O=Ke;if(x?hb(x):O.stateNode.complete){at=0,un=null;var V=O.sibling;if(V!==null)Ke=V;else{var le=O.return;le!==null?(Ke=le,Xo(le)):Ke=null}break t}}at=0,un=null,na(e,t,p,5);break;case 6:at=0,un=null,na(e,t,p,6);break;case 8:yf(),vt=6;break e;default:throw Error(o(462))}}SC();break}catch(me){_0(e,me)}while(!0);return Kn=ti=null,Z.H=a,Z.A=d,it=r,Ke!==null?0:(ct=null,We=0,fo(),vt)}function SC(){for(;Ke!==null&&!se();)A0(Ke)}function A0(e){var t=Jy(e.alternate,e,ar);e.memoizedProps=e.pendingProps,t===null?Xo(e):Ke=t}function k0(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=Vy(r,t,t.pendingProps,t.type,void 0,We);break;case 11:t=Vy(r,t,t.pendingProps,t.type.render,t.ref,We);break;case 5:zc(t);default:$y(r,t),t=Ke=Tg(t,ar),t=Jy(r,t,ar)}e.memoizedProps=e.pendingProps,t===null?Xo(e):Ke=t}function na(e,t,r,a){Kn=ti=null,zc(t),Vi=null,nl=0;var d=t.return;try{if(sC(e,d,t,r,We)){vt=1,Do(e,bn(r,e.current)),Ke=null;return}}catch(p){if(d!==null)throw Ke=d,p;vt=1,Do(e,bn(r,e.current)),Ke=null;return}t.flags&32768?(et||a===1?e=!0:Wi||(We&536870912)!==0?e=!1:(Ar=e=!0,(a===2||a===9||a===3||a===6)&&(a=on.current,a!==null&&a.tag===13&&(a.flags|=16384))),N0(t,e)):Xo(t)}function Xo(e){var t=e;do{if((t.flags&32768)!==0){N0(t,Ar);return}e=t.return;var r=fC(t.alternate,t,ar);if(r!==null){Ke=r;return}if(t=t.sibling,t!==null){Ke=t;return}Ke=t=e}while(t!==null);vt===0&&(vt=5)}function N0(e,t){do{var r=dC(e.alternate,e);if(r!==null){r.flags&=32767,Ke=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){Ke=e;return}Ke=e=r}while(e!==null);vt=6,Ke=null}function R0(e,t,r,a,d,p,x,O,V){e.cancelPendingCommit=null;do Zo();while(Nt!==0);if((it&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(p=t.lanes|t.childLanes,p|=ac,$w(e,r,p,x,O,V),e===ct&&(Ke=ct=null,We=0),ea=t,Rr=e,lr=r,mf=p,pf=d,v0=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,wC(Te,function(){return j0(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=Z.T,Z.T=null,d=K.p,K.p=2,x=it,it|=4;try{hC(e,t,r)}finally{it=x,K.p=d,Z.T=a}}Nt=1,O0(),z0(),M0()}}function O0(){if(Nt===1){Nt=0;var e=Rr,t=ea,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=Z.T,Z.T=null;var a=K.p;K.p=2;var d=it;it|=4;try{f0(t,e);var p=Rf,x=yg(e.containerInfo),O=p.focusedElem,V=p.selectionRange;if(x!==O&&O&&O.ownerDocument&&gg(O.ownerDocument.documentElement,O)){if(V!==null&&ec(O)){var le=V.start,me=V.end;if(me===void 0&&(me=le),"selectionStart"in O)O.selectionStart=le,O.selectionEnd=Math.min(me,O.value.length);else{var ge=O.ownerDocument||document,ue=ge&&ge.defaultView||window;if(ue.getSelection){var fe=ue.getSelection(),Re=O.textContent.length,Le=Math.min(V.start,Re),ut=V.end===void 0?Le:Math.min(V.end,Re);!fe.extend&&Le>ut&&(x=ut,ut=Le,Le=x);var W=pg(O,Le),Q=pg(O,ut);if(W&&Q&&(fe.rangeCount!==1||fe.anchorNode!==W.node||fe.anchorOffset!==W.offset||fe.focusNode!==Q.node||fe.focusOffset!==Q.offset)){var ie=ge.createRange();ie.setStart(W.node,W.offset),fe.removeAllRanges(),Le>ut?(fe.addRange(ie),fe.extend(Q.node,Q.offset)):(ie.setEnd(Q.node,Q.offset),fe.addRange(ie))}}}}for(ge=[],fe=O;fe=fe.parentNode;)fe.nodeType===1&&ge.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof O.focus=="function"&&O.focus(),O=0;O<ge.length;O++){var pe=ge[O];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}ls=!!Nf,Rf=Nf=null}finally{it=d,K.p=a,Z.T=r}}e.current=t,Nt=2}}function z0(){if(Nt===2){Nt=0;var e=Rr,t=ea,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=Z.T,Z.T=null;var a=K.p;K.p=2;var d=it;it|=4;try{l0(e,t.alternate,t)}finally{it=d,K.p=a,Z.T=r}}Nt=3}}function M0(){if(Nt===4||Nt===3){Nt=0,Ee();var e=Rr,t=ea,r=lr,a=v0;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Nt=5:(Nt=0,ea=Rr=null,D0(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(Nr=null),ju(r),t=t.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Xe,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=Z.T,d=K.p,K.p=2,Z.T=null;try{for(var p=e.onRecoverableError,x=0;x<a.length;x++){var O=a[x];p(O.value,{componentStack:O.stack})}}finally{Z.T=t,K.p=d}}(lr&3)!==0&&Zo(),Un(e),d=e.pendingLanes,(r&261930)!==0&&(d&42)!==0?e===gf?vl++:(vl=0,gf=e):vl=0,Sl(0)}}function D0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,el(t)))}function Zo(){return O0(),z0(),M0(),j0()}function j0(){if(Nt!==5)return!1;var e=Rr,t=mf;mf=0;var r=ju(lr),a=Z.T,d=K.p;try{K.p=32>r?32:r,Z.T=null,r=pf,pf=null;var p=Rr,x=lr;if(Nt=0,ea=Rr=null,lr=0,(it&6)!==0)throw Error(o(331));var O=it;if(it|=4,g0(p.current),h0(p,p.current,x,r),it=O,Sl(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Xe,p)}catch{}return!0}finally{K.p=d,Z.T=a,D0(e,t)}}function L0(e,t,r){t=bn(r,t),t=Xc(e.stateNode,t,2),e=_r(e,t,2),e!==null&&(Ha(e,2),Un(e))}function lt(e,t,r){if(e.tag===3)L0(e,e,r);else for(;t!==null;){if(t.tag===3){L0(t,e,r);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Nr===null||!Nr.has(a))){e=bn(r,e),r=Iy(2),a=_r(t,r,2),a!==null&&(By(r,a,t,e),Ha(a,2),Un(a));break}}t=t.return}}function vf(e,t,r){var a=e.pingCache;if(a===null){a=e.pingCache=new gC;var d=new Set;a.set(t,d)}else d=a.get(t),d===void 0&&(d=new Set,a.set(t,d));d.has(r)||(ff=!0,d.add(r),e=EC.bind(null,e,t,r),t.then(e,e))}function EC(e,t,r){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,ct===e&&(We&r)===r&&(vt===4||vt===3&&(We&62914560)===We&&300>_e()-Po?(it&2)===0&&ta(e,0):df|=r,$i===We&&($i=0)),Un(e)}function I0(e,t){t===0&&(t=Op()),e=Wr(e,t),e!==null&&(Ha(e,t),Un(e))}function xC(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),I0(e,r)}function _C(e,t){var r=0;switch(e.tag){case 31:case 13:var a=e.stateNode,d=e.memoizedState;d!==null&&(r=d.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),I0(e,r)}function wC(e,t){return he(e,t)}var Ko=null,ra=null,Sf=!1,Qo=!1,Ef=!1,zr=0;function Un(e){e!==ra&&e.next===null&&(ra===null?Ko=ra=e:ra=ra.next=e),Qo=!0,Sf||(Sf=!0,TC())}function Sl(e,t){if(!Ef&&Qo){Ef=!0;do for(var r=!1,a=Ko;a!==null;){if(e!==0){var d=a.pendingLanes;if(d===0)var p=0;else{var x=a.suspendedLanes,O=a.pingedLanes;p=(1<<31-Ze(42|e)+1)-1,p&=d&~(x&~O),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(r=!0,q0(a,p))}else p=We,p=$l(a,a===ct?p:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(p&3)===0||Ua(a,p)||(r=!0,q0(a,p));a=a.next}while(r);Ef=!1}}function CC(){B0()}function B0(){Qo=Sf=!1;var e=0;zr!==0&&LC()&&(e=zr);for(var t=_e(),r=null,a=Ko;a!==null;){var d=a.next,p=U0(a,t);p===0?(a.next=null,r===null?Ko=d:r.next=d,d===null&&(ra=r)):(r=a,(e!==0||(p&3)!==0)&&(Qo=!0)),a=d}Nt!==0&&Nt!==5||Sl(e),zr!==0&&(zr=0)}function U0(e,t){for(var r=e.suspendedLanes,a=e.pingedLanes,d=e.expirationTimes,p=e.pendingLanes&-62914561;0<p;){var x=31-Ze(p),O=1<<x,V=d[x];V===-1?((O&r)===0||(O&a)!==0)&&(d[x]=Ww(O,t)):V<=t&&(e.expiredLanes|=O),p&=~O}if(t=ct,r=We,r=$l(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,r===0||e===t&&(at===2||at===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&be(a),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Ua(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(a!==null&&be(a),ju(r)){case 2:case 8:r=ve;break;case 32:r=Te;break;case 268435456:r=Je;break;default:r=Te}return a=H0.bind(null,e),r=he(r,a),e.callbackPriority=t,e.callbackNode=r,t}return a!==null&&a!==null&&be(a),e.callbackPriority=2,e.callbackNode=null,2}function H0(e,t){if(Nt!==0&&Nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(Zo()&&e.callbackNode!==r)return null;var a=We;return a=$l(e,e===ct?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(E0(e,a,t),U0(e,_e()),e.callbackNode!=null&&e.callbackNode===r?H0.bind(null,e):null)}function q0(e,t){if(Zo())return null;E0(e,t,!0)}function TC(){BC(function(){(it&6)!==0?he(te,CC):B0()})}function xf(){if(zr===0){var e=Pi;e===0&&(e=_i,_i<<=1,(_i&261888)===0&&(_i=256)),zr=e}return zr}function P0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ro(""+e)}function F0(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function AC(e,t,r,a,d){if(t==="submit"&&r&&r.stateNode===d){var p=P0((d[Xt]||null).action),x=a.submitter;x&&(t=(t=x[Xt]||null)?P0(t.formAction):x.getAttribute("formAction"),t!==null&&(p=t,x=null));var O=new oo("action","action",null,a,d);e.push({event:O,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(zr!==0){var V=x?F0(d,x):new FormData(d);qc(r,{pending:!0,data:V,method:d.method,action:p},null,V)}}else typeof p=="function"&&(O.preventDefault(),V=x?F0(d,x):new FormData(d),qc(r,{pending:!0,data:V,method:d.method,action:p},p,V))},currentTarget:d}]})}}for(var _f=0;_f<ic.length;_f++){var wf=ic[_f],kC=wf.toLowerCase(),NC=wf[0].toUpperCase()+wf.slice(1);An(kC,"on"+NC)}An(Sg,"onAnimationEnd"),An(Eg,"onAnimationIteration"),An(xg,"onAnimationStart"),An("dblclick","onDoubleClick"),An("focusin","onFocus"),An("focusout","onBlur"),An(V2,"onTransitionRun"),An(G2,"onTransitionStart"),An(X2,"onTransitionCancel"),An(_g,"onTransitionEnd"),ki("onMouseEnter",["mouseout","mouseover"]),ki("onMouseLeave",["mouseout","mouseover"]),ki("onPointerEnter",["pointerout","pointerover"]),ki("onPointerLeave",["pointerout","pointerover"]),Zr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var El="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),RC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(El));function Y0(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var a=e[r],d=a.event;a=a.listeners;e:{var p=void 0;if(t)for(var x=a.length-1;0<=x;x--){var O=a[x],V=O.instance,le=O.currentTarget;if(O=O.listener,V!==p&&d.isPropagationStopped())break e;p=O,d.currentTarget=le;try{p(d)}catch(me){co(me)}d.currentTarget=null,p=V}else for(x=0;x<a.length;x++){if(O=a[x],V=O.instance,le=O.currentTarget,O=O.listener,V!==p&&d.isPropagationStopped())break e;p=O,d.currentTarget=le;try{p(d)}catch(me){co(me)}d.currentTarget=null,p=V}}}}function Qe(e,t){var r=t[Lu];r===void 0&&(r=t[Lu]=new Set);var a=e+"__bubble";r.has(a)||(V0(t,e,2,!1),r.add(a))}function Cf(e,t,r){var a=0;t&&(a|=4),V0(r,e,a,t)}var Jo="_reactListening"+Math.random().toString(36).slice(2);function Tf(e){if(!e[Jo]){e[Jo]=!0,Bp.forEach(function(r){r!=="selectionchange"&&(RC.has(r)||Cf(r,!1,e),Cf(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jo]||(t[Jo]=!0,Cf("selectionchange",!1,t))}}function V0(e,t,r,a){switch(Sb(t)){case 2:var d=iT;break;case 8:d=aT;break;default:d=qf}r=d.bind(null,t,r,e),d=void 0,!Vu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(d=!0),a?d!==void 0?e.addEventListener(t,r,{capture:!0,passive:d}):e.addEventListener(t,r,!0):d!==void 0?e.addEventListener(t,r,{passive:d}):e.addEventListener(t,r,!1)}function Af(e,t,r,a,d){var p=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var x=a.tag;if(x===3||x===4){var O=a.stateNode.containerInfo;if(O===d)break;if(x===4)for(x=a.return;x!==null;){var V=x.tag;if((V===3||V===4)&&x.stateNode.containerInfo===d)return;x=x.return}for(;O!==null;){if(x=Ci(O),x===null)return;if(V=x.tag,V===5||V===6||V===26||V===27){a=p=x;continue e}O=O.parentNode}}a=a.return}Qp(function(){var le=p,me=Fu(r),ge=[];e:{var ue=wg.get(e);if(ue!==void 0){var fe=oo,Re=e;switch(e){case"keypress":if(ao(r)===0)break e;case"keydown":case"keyup":fe=_2;break;case"focusin":Re="focus",fe=Ku;break;case"focusout":Re="blur",fe=Ku;break;case"beforeblur":case"afterblur":fe=Ku;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=$p;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=f2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=T2;break;case Sg:case Eg:case xg:fe=m2;break;case _g:fe=k2;break;case"scroll":case"scrollend":fe=u2;break;case"wheel":fe=R2;break;case"copy":case"cut":case"paste":fe=g2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=tg;break;case"toggle":case"beforetoggle":fe=z2}var Le=(t&4)!==0,ut=!Le&&(e==="scroll"||e==="scrollend"),W=Le?ue!==null?ue+"Capture":null:ue;Le=[];for(var Q=le,ie;Q!==null;){var pe=Q;if(ie=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ie===null||W===null||(pe=Fa(Q,W),pe!=null&&Le.push(xl(Q,pe,ie))),ut)break;Q=Q.return}0<Le.length&&(ue=new fe(ue,Re,null,r,me),ge.push({event:ue,listeners:Le}))}}if((t&7)===0){e:{if(ue=e==="mouseover"||e==="pointerover",fe=e==="mouseout"||e==="pointerout",ue&&r!==Pu&&(Re=r.relatedTarget||r.fromElement)&&(Ci(Re)||Re[wi]))break e;if((fe||ue)&&(ue=me.window===me?me:(ue=me.ownerDocument)?ue.defaultView||ue.parentWindow:window,fe?(Re=r.relatedTarget||r.toElement,fe=le,Re=Re?Ci(Re):null,Re!==null&&(ut=s(Re),Le=Re.tag,Re!==ut||Le!==5&&Le!==27&&Le!==6)&&(Re=null)):(fe=null,Re=le),fe!==Re)){if(Le=$p,pe="onMouseLeave",W="onMouseEnter",Q="mouse",(e==="pointerout"||e==="pointerover")&&(Le=tg,pe="onPointerLeave",W="onPointerEnter",Q="pointer"),ut=fe==null?ue:Pa(fe),ie=Re==null?ue:Pa(Re),ue=new Le(pe,Q+"leave",fe,r,me),ue.target=ut,ue.relatedTarget=ie,pe=null,Ci(me)===le&&(Le=new Le(W,Q+"enter",Re,r,me),Le.target=ie,Le.relatedTarget=ut,pe=Le),ut=pe,fe&&Re)t:{for(Le=OC,W=fe,Q=Re,ie=0,pe=W;pe;pe=Le(pe))ie++;pe=0;for(var je=Q;je;je=Le(je))pe++;for(;0<ie-pe;)W=Le(W),ie--;for(;0<pe-ie;)Q=Le(Q),pe--;for(;ie--;){if(W===Q||Q!==null&&W===Q.alternate){Le=W;break t}W=Le(W),Q=Le(Q)}Le=null}else Le=null;fe!==null&&G0(ge,ue,fe,Le,!1),Re!==null&&ut!==null&&G0(ge,ut,Re,Le,!0)}}e:{if(ue=le?Pa(le):window,fe=ue.nodeName&&ue.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ue.type==="file")var tt=ug;else if(og(ue))if(cg)tt=P2;else{tt=H2;var De=U2}else fe=ue.nodeName,!fe||fe.toLowerCase()!=="input"||ue.type!=="checkbox"&&ue.type!=="radio"?le&&qu(le.elementType)&&(tt=ug):tt=q2;if(tt&&(tt=tt(e,le))){sg(ge,tt,r,me);break e}De&&De(e,ue,le),e==="focusout"&&le&&ue.type==="number"&&le.memoizedProps.value!=null&&Hu(ue,"number",ue.value)}switch(De=le?Pa(le):window,e){case"focusin":(og(De)||De.contentEditable==="true")&&(Di=De,tc=le,Ja=null);break;case"focusout":Ja=tc=Di=null;break;case"mousedown":nc=!0;break;case"contextmenu":case"mouseup":case"dragend":nc=!1,bg(ge,r,me);break;case"selectionchange":if(Y2)break;case"keydown":case"keyup":bg(ge,r,me)}var Ye;if(Ju)e:{switch(e){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else Mi?ag(e,r)&&($e="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&($e="onCompositionStart");$e&&(ng&&r.locale!=="ko"&&(Mi||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&Mi&&(Ye=Jp()):(gr=me,Gu="value"in gr?gr.value:gr.textContent,Mi=!0)),De=Wo(le,$e),0<De.length&&($e=new eg($e,e,null,r,me),ge.push({event:$e,listeners:De}),Ye?$e.data=Ye:(Ye=lg(r),Ye!==null&&($e.data=Ye)))),(Ye=D2?j2(e,r):L2(e,r))&&($e=Wo(le,"onBeforeInput"),0<$e.length&&(De=new eg("onBeforeInput","beforeinput",null,r,me),ge.push({event:De,listeners:$e}),De.data=Ye)),AC(ge,e,le,r,me)}Y0(ge,t)})}function xl(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Wo(e,t){for(var r=t+"Capture",a=[];e!==null;){var d=e,p=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||p===null||(d=Fa(e,r),d!=null&&a.unshift(xl(e,d,p)),d=Fa(e,t),d!=null&&a.push(xl(e,d,p))),e.tag===3)return a;e=e.return}return[]}function OC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function G0(e,t,r,a,d){for(var p=t._reactName,x=[];r!==null&&r!==a;){var O=r,V=O.alternate,le=O.stateNode;if(O=O.tag,V!==null&&V===a)break;O!==5&&O!==26&&O!==27||le===null||(V=le,d?(le=Fa(r,p),le!=null&&x.unshift(xl(r,le,V))):d||(le=Fa(r,p),le!=null&&x.push(xl(r,le,V)))),r=r.return}x.length!==0&&e.push({event:t,listeners:x})}var zC=/\r\n?/g,MC=/\u0000|\uFFFD/g;function X0(e){return(typeof e=="string"?e:""+e).replace(zC,`
|
|
9
|
+
`).replace(MC,"")}function Z0(e,t){return t=X0(t),X0(e)===t}function st(e,t,r,a,d,p){switch(r){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ri(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ri(e,""+a);break;case"className":to(e,"class",a);break;case"tabIndex":to(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":to(e,r,a);break;case"style":Zp(e,a,p);break;case"data":if(t!=="object"){to(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(r);break}a=ro(""+a),e.setAttribute(r,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(r==="formAction"?(t!=="input"&&st(e,t,"name",d.name,d,null),st(e,t,"formEncType",d.formEncType,d,null),st(e,t,"formMethod",d.formMethod,d,null),st(e,t,"formTarget",d.formTarget,d,null)):(st(e,t,"encType",d.encType,d,null),st(e,t,"method",d.method,d,null),st(e,t,"target",d.target,d,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(r);break}a=ro(""+a),e.setAttribute(r,a);break;case"onClick":a!=null&&(e.onclick=Vn);break;case"onScroll":a!=null&&Qe("scroll",e);break;case"onScrollEnd":a!=null&&Qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(r=a.__html,r!=null){if(d.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}r=ro(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,""+a):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":a===!0?e.setAttribute(r,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,a):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(r,a):e.removeAttribute(r);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(r):e.setAttribute(r,a);break;case"popover":Qe("beforetoggle",e),Qe("toggle",e),eo(e,"popover",a);break;case"xlinkActuate":Yn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Yn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Yn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Yn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Yn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Yn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":eo(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=o2.get(r)||r,eo(e,r,a))}}function kf(e,t,r,a,d,p){switch(r){case"style":Zp(e,a,p);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(r=a.__html,r!=null){if(d.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"children":typeof a=="string"?Ri(e,a):(typeof a=="number"||typeof a=="bigint")&&Ri(e,""+a);break;case"onScroll":a!=null&&Qe("scroll",e);break;case"onScrollEnd":a!=null&&Qe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Vn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Up.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(d=r.endsWith("Capture"),t=r.slice(2,d?r.length-7:void 0),p=e[Xt]||null,p=p!=null?p[r]:null,typeof p=="function"&&e.removeEventListener(t,p,d),typeof a=="function")){typeof p!="function"&&p!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,a,d);break e}r in e?e[r]=a:a===!0?e.setAttribute(r,""):eo(e,r,a)}}}function Bt(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",e),Qe("load",e);var a=!1,d=!1,p;for(p in r)if(r.hasOwnProperty(p)){var x=r[p];if(x!=null)switch(p){case"src":a=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,p,x,r,null)}}d&&st(e,t,"srcSet",r.srcSet,r,null),a&&st(e,t,"src",r.src,r,null);return;case"input":Qe("invalid",e);var O=p=x=d=null,V=null,le=null;for(a in r)if(r.hasOwnProperty(a)){var me=r[a];if(me!=null)switch(a){case"name":d=me;break;case"type":x=me;break;case"checked":V=me;break;case"defaultChecked":le=me;break;case"value":p=me;break;case"defaultValue":O=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(o(137,t));break;default:st(e,t,a,me,r,null)}}Yp(e,p,O,V,le,x,d,!1);return;case"select":Qe("invalid",e),a=x=p=null;for(d in r)if(r.hasOwnProperty(d)&&(O=r[d],O!=null))switch(d){case"value":p=O;break;case"defaultValue":x=O;break;case"multiple":a=O;default:st(e,t,d,O,r,null)}t=p,r=x,e.multiple=!!a,t!=null?Ni(e,!!a,t,!1):r!=null&&Ni(e,!!a,r,!0);return;case"textarea":Qe("invalid",e),p=d=a=null;for(x in r)if(r.hasOwnProperty(x)&&(O=r[x],O!=null))switch(x){case"value":a=O;break;case"defaultValue":d=O;break;case"children":p=O;break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(o(91));break;default:st(e,t,x,O,r,null)}Gp(e,a,d,p);return;case"option":for(V in r)if(r.hasOwnProperty(V)&&(a=r[V],a!=null))switch(V){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:st(e,t,V,a,r,null)}return;case"dialog":Qe("beforetoggle",e),Qe("toggle",e),Qe("cancel",e),Qe("close",e);break;case"iframe":case"object":Qe("load",e);break;case"video":case"audio":for(a=0;a<El.length;a++)Qe(El[a],e);break;case"image":Qe("error",e),Qe("load",e);break;case"details":Qe("toggle",e);break;case"embed":case"source":case"link":Qe("error",e),Qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(le in r)if(r.hasOwnProperty(le)&&(a=r[le],a!=null))switch(le){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,le,a,r,null)}return;default:if(qu(t)){for(me in r)r.hasOwnProperty(me)&&(a=r[me],a!==void 0&&kf(e,t,me,a,r,void 0));return}}for(O in r)r.hasOwnProperty(O)&&(a=r[O],a!=null&&st(e,t,O,a,r,null))}function DC(e,t,r,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,p=null,x=null,O=null,V=null,le=null,me=null;for(fe in r){var ge=r[fe];if(r.hasOwnProperty(fe)&&ge!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":V=ge;default:a.hasOwnProperty(fe)||st(e,t,fe,null,a,ge)}}for(var ue in a){var fe=a[ue];if(ge=r[ue],a.hasOwnProperty(ue)&&(fe!=null||ge!=null))switch(ue){case"type":p=fe;break;case"name":d=fe;break;case"checked":le=fe;break;case"defaultChecked":me=fe;break;case"value":x=fe;break;case"defaultValue":O=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(o(137,t));break;default:fe!==ge&&st(e,t,ue,fe,a,ge)}}Uu(e,x,O,V,le,me,p,d);return;case"select":fe=x=O=ue=null;for(p in r)if(V=r[p],r.hasOwnProperty(p)&&V!=null)switch(p){case"value":break;case"multiple":fe=V;default:a.hasOwnProperty(p)||st(e,t,p,null,a,V)}for(d in a)if(p=a[d],V=r[d],a.hasOwnProperty(d)&&(p!=null||V!=null))switch(d){case"value":ue=p;break;case"defaultValue":O=p;break;case"multiple":x=p;default:p!==V&&st(e,t,d,p,a,V)}t=O,r=x,a=fe,ue!=null?Ni(e,!!r,ue,!1):!!a!=!!r&&(t!=null?Ni(e,!!r,t,!0):Ni(e,!!r,r?[]:"",!1));return;case"textarea":fe=ue=null;for(O in r)if(d=r[O],r.hasOwnProperty(O)&&d!=null&&!a.hasOwnProperty(O))switch(O){case"value":break;case"children":break;default:st(e,t,O,null,a,d)}for(x in a)if(d=a[x],p=r[x],a.hasOwnProperty(x)&&(d!=null||p!=null))switch(x){case"value":ue=d;break;case"defaultValue":fe=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(o(91));break;default:d!==p&&st(e,t,x,d,a,p)}Vp(e,ue,fe);return;case"option":for(var Re in r)if(ue=r[Re],r.hasOwnProperty(Re)&&ue!=null&&!a.hasOwnProperty(Re))switch(Re){case"selected":e.selected=!1;break;default:st(e,t,Re,null,a,ue)}for(V in a)if(ue=a[V],fe=r[V],a.hasOwnProperty(V)&&ue!==fe&&(ue!=null||fe!=null))switch(V){case"selected":e.selected=ue&&typeof ue!="function"&&typeof ue!="symbol";break;default:st(e,t,V,ue,a,fe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Le in r)ue=r[Le],r.hasOwnProperty(Le)&&ue!=null&&!a.hasOwnProperty(Le)&&st(e,t,Le,null,a,ue);for(le in a)if(ue=a[le],fe=r[le],a.hasOwnProperty(le)&&ue!==fe&&(ue!=null||fe!=null))switch(le){case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(o(137,t));break;default:st(e,t,le,ue,a,fe)}return;default:if(qu(t)){for(var ut in r)ue=r[ut],r.hasOwnProperty(ut)&&ue!==void 0&&!a.hasOwnProperty(ut)&&kf(e,t,ut,void 0,a,ue);for(me in a)ue=a[me],fe=r[me],!a.hasOwnProperty(me)||ue===fe||ue===void 0&&fe===void 0||kf(e,t,me,ue,a,fe);return}}for(var W in r)ue=r[W],r.hasOwnProperty(W)&&ue!=null&&!a.hasOwnProperty(W)&&st(e,t,W,null,a,ue);for(ge in a)ue=a[ge],fe=r[ge],!a.hasOwnProperty(ge)||ue===fe||ue==null&&fe==null||st(e,t,ge,ue,a,fe)}function K0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function jC(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),a=0;a<r.length;a++){var d=r[a],p=d.transferSize,x=d.initiatorType,O=d.duration;if(p&&O&&K0(x)){for(x=0,O=d.responseEnd,a+=1;a<r.length;a++){var V=r[a],le=V.startTime;if(le>O)break;var me=V.transferSize,ge=V.initiatorType;me&&K0(ge)&&(V=V.responseEnd,x+=me*(V<O?1:(O-le)/(V-le)))}if(--a,t+=8*(p+x)/(d.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Nf=null,Rf=null;function $o(e){return e.nodeType===9?e:e.ownerDocument}function Q0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function J0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Of(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var zf=null;function LC(){var e=window.event;return e&&e.type==="popstate"?e===zf?!1:(zf=e,!0):(zf=null,!1)}var W0=typeof setTimeout=="function"?setTimeout:void 0,IC=typeof clearTimeout=="function"?clearTimeout:void 0,$0=typeof Promise=="function"?Promise:void 0,BC=typeof queueMicrotask=="function"?queueMicrotask:typeof $0<"u"?function(e){return $0.resolve(null).then(e).catch(UC)}:W0;function UC(e){setTimeout(function(){throw e})}function Mr(e){return e==="head"}function eb(e,t){var r=t,a=0;do{var d=r.nextSibling;if(e.removeChild(r),d&&d.nodeType===8)if(r=d.data,r==="/$"||r==="/&"){if(a===0){e.removeChild(d),oa(t);return}a--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")a++;else if(r==="html")_l(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,_l(r);for(var p=r.firstChild;p;){var x=p.nextSibling,O=p.nodeName;p[qa]||O==="SCRIPT"||O==="STYLE"||O==="LINK"&&p.rel.toLowerCase()==="stylesheet"||r.removeChild(p),p=x}}else r==="body"&&_l(e.ownerDocument.body);r=d}while(r);oa(t)}function tb(e,t){var r=e;e=0;do{var a=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=a}while(r)}function Mf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Mf(r),Iu(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function HC(e,t,r,a){for(;e.nodeType===1;){var d=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[qa])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(p=e.getAttribute("rel"),p==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(p!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(p=e.getAttribute("src"),(p!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&p&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var p=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===p)return e}else return e;if(e=_n(e.nextSibling),e===null)break}return null}function qC(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=_n(e.nextSibling),e===null))return null;return e}function nb(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_n(e.nextSibling),e===null))return null;return e}function Df(e){return e.data==="$?"||e.data==="$~"}function jf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function PC(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else{var a=function(){t(),r.removeEventListener("DOMContentLoaded",a)};r.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function _n(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Lf=null;function rb(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return _n(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function ib(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--}else r!=="/$"&&r!=="/&"||t++}e=e.previousSibling}return null}function ab(e,t,r){switch(t=$o(r),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function _l(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Iu(e)}var wn=new Map,lb=new Set;function es(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var or=K.d;K.d={f:FC,r:YC,D:VC,C:GC,L:XC,m:ZC,X:QC,S:KC,M:JC};function FC(){var e=or.f(),t=Vo();return e||t}function YC(e){var t=Ti(e);t!==null&&t.tag===5&&t.type==="form"?_y(t):or.r(e)}var ia=typeof document>"u"?null:document;function ob(e,t,r){var a=ia;if(a&&typeof t=="string"&&t){var d=gn(t);d='link[rel="'+e+'"][href="'+d+'"]',typeof r=="string"&&(d+='[crossorigin="'+r+'"]'),lb.has(d)||(lb.add(d),e={rel:e,crossOrigin:r,href:t},a.querySelector(d)===null&&(t=a.createElement("link"),Bt(t,"link",e),zt(t),a.head.appendChild(t)))}}function VC(e){or.D(e),ob("dns-prefetch",e,null)}function GC(e,t){or.C(e,t),ob("preconnect",e,t)}function XC(e,t,r){or.L(e,t,r);var a=ia;if(a&&e&&t){var d='link[rel="preload"][as="'+gn(t)+'"]';t==="image"&&r&&r.imageSrcSet?(d+='[imagesrcset="'+gn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(d+='[imagesizes="'+gn(r.imageSizes)+'"]')):d+='[href="'+gn(e)+'"]';var p=d;switch(t){case"style":p=aa(e);break;case"script":p=la(e)}wn.has(p)||(e=y({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),wn.set(p,e),a.querySelector(d)!==null||t==="style"&&a.querySelector(wl(p))||t==="script"&&a.querySelector(Cl(p))||(t=a.createElement("link"),Bt(t,"link",e),zt(t),a.head.appendChild(t)))}}function ZC(e,t){or.m(e,t);var r=ia;if(r&&e){var a=t&&typeof t.as=="string"?t.as:"script",d='link[rel="modulepreload"][as="'+gn(a)+'"][href="'+gn(e)+'"]',p=d;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=la(e)}if(!wn.has(p)&&(e=y({rel:"modulepreload",href:e},t),wn.set(p,e),r.querySelector(d)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Cl(p)))return}a=r.createElement("link"),Bt(a,"link",e),zt(a),r.head.appendChild(a)}}}function KC(e,t,r){or.S(e,t,r);var a=ia;if(a&&e){var d=Ai(a).hoistableStyles,p=aa(e);t=t||"default";var x=d.get(p);if(!x){var O={loading:0,preload:null};if(x=a.querySelector(wl(p)))O.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},r),(r=wn.get(p))&&If(e,r);var V=x=a.createElement("link");zt(V),Bt(V,"link",e),V._p=new Promise(function(le,me){V.onload=le,V.onerror=me}),V.addEventListener("load",function(){O.loading|=1}),V.addEventListener("error",function(){O.loading|=2}),O.loading|=4,ts(x,t,a)}x={type:"stylesheet",instance:x,count:1,state:O},d.set(p,x)}}}function QC(e,t){or.X(e,t);var r=ia;if(r&&e){var a=Ai(r).hoistableScripts,d=la(e),p=a.get(d);p||(p=r.querySelector(Cl(d)),p||(e=y({src:e,async:!0},t),(t=wn.get(d))&&Bf(e,t),p=r.createElement("script"),zt(p),Bt(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},a.set(d,p))}}function JC(e,t){or.M(e,t);var r=ia;if(r&&e){var a=Ai(r).hoistableScripts,d=la(e),p=a.get(d);p||(p=r.querySelector(Cl(d)),p||(e=y({src:e,async:!0,type:"module"},t),(t=wn.get(d))&&Bf(e,t),p=r.createElement("script"),zt(p),Bt(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},a.set(d,p))}}function sb(e,t,r,a){var d=(d=we.current)?es(d):null;if(!d)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=aa(r.href),r=Ai(d).hoistableStyles,a=r.get(t),a||(a={type:"style",instance:null,count:0,state:null},r.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=aa(r.href);var p=Ai(d).hoistableStyles,x=p.get(e);if(x||(d=d.ownerDocument||d,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(e,x),(p=d.querySelector(wl(e)))&&!p._p&&(x.instance=p,x.state.loading=5),wn.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},wn.set(e,r),p||WC(d,e,r,x.state))),t&&a===null)throw Error(o(528,""));return x}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=la(r),r=Ai(d).hoistableScripts,a=r.get(t),a||(a={type:"script",instance:null,count:0,state:null},r.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function aa(e){return'href="'+gn(e)+'"'}function wl(e){return'link[rel="stylesheet"]['+e+"]"}function ub(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function WC(e,t,r,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Bt(t,"link",r),zt(t),e.head.appendChild(t))}function la(e){return'[src="'+gn(e)+'"]'}function Cl(e){return"script[async]"+e}function cb(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+gn(r.href)+'"]');if(a)return t.instance=a,zt(a),a;var d=y({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),zt(a),Bt(a,"style",d),ts(a,r.precedence,e),t.instance=a;case"stylesheet":d=aa(r.href);var p=e.querySelector(wl(d));if(p)return t.state.loading|=4,t.instance=p,zt(p),p;a=ub(r),(d=wn.get(d))&&If(a,d),p=(e.ownerDocument||e).createElement("link"),zt(p);var x=p;return x._p=new Promise(function(O,V){x.onload=O,x.onerror=V}),Bt(p,"link",a),t.state.loading|=4,ts(p,r.precedence,e),t.instance=p;case"script":return p=la(r.src),(d=e.querySelector(Cl(p)))?(t.instance=d,zt(d),d):(a=r,(d=wn.get(p))&&(a=y({},r),Bf(a,d)),e=e.ownerDocument||e,d=e.createElement("script"),zt(d),Bt(d,"link",a),e.head.appendChild(d),t.instance=d);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,ts(a,r.precedence,e));return t.instance}function ts(e,t,r){for(var a=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=a.length?a[a.length-1]:null,p=d,x=0;x<a.length;x++){var O=a[x];if(O.dataset.precedence===t)p=O;else if(p!==d)break}p?p.parentNode.insertBefore(e,p.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function If(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Bf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ns=null;function fb(e,t,r){if(ns===null){var a=new Map,d=ns=new Map;d.set(r,a)}else d=ns,a=d.get(r),a||(a=new Map,d.set(r,a));if(a.has(e))return a;for(a.set(e,null),r=r.getElementsByTagName(e),d=0;d<r.length;d++){var p=r[d];if(!(p[qa]||p[Dt]||e==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var x=p.getAttribute(t)||"";x=e+x;var O=a.get(x);O?O.push(p):a.set(x,[p])}}return a}function db(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function $C(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function hb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function eT(e,t,r,a){if(r.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var d=aa(a.href),p=t.querySelector(wl(d));if(p){t=p._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=rs.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=p,zt(p);return}p=t.ownerDocument||t,a=ub(a),(d=wn.get(d))&&If(a,d),p=p.createElement("link"),zt(p);var x=p;x._p=new Promise(function(O,V){x.onload=O,x.onerror=V}),Bt(p,"link",a),r.instance=p}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=rs.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var Uf=0;function tT(e,t){return e.stylesheets&&e.count===0&&as(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var a=setTimeout(function(){if(e.stylesheets&&as(e,e.stylesheets),e.unsuspend){var p=e.unsuspend;e.unsuspend=null,p()}},6e4+t);0<e.imgBytes&&Uf===0&&(Uf=62500*jC());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&as(e,e.stylesheets),e.unsuspend)){var p=e.unsuspend;e.unsuspend=null,p()}},(e.imgBytes>Uf?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(d)}}:null}function rs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)as(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var is=null;function as(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,is=new Map,t.forEach(nT,e),is=null,rs.call(e))}function nT(e,t){if(!(t.state.loading&4)){var r=is.get(e);if(r)var a=r.get(null);else{r=new Map,is.set(e,r);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<d.length;p++){var x=d[p];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(r.set(x.dataset.precedence,x),a=x)}a&&r.set(null,a)}d=t.instance,x=d.getAttribute("data-precedence"),p=r.get(x)||a,p===a&&r.set(null,d),r.set(x,d),this.count++,a=rs.bind(this),d.addEventListener("load",a),d.addEventListener("error",a),p?p.parentNode.insertBefore(d,p.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),t.state.loading|=4}}var Tl={$$typeof:j,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function rT(e,t,r,a,d,p,x,O,V){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Mu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mu(0),this.hiddenUpdates=Mu(null),this.identifierPrefix=a,this.onUncaughtError=d,this.onCaughtError=p,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=V,this.incompleteTransitions=new Map}function mb(e,t,r,a,d,p,x,O,V,le,me,ge){return e=new rT(e,t,r,x,V,le,me,ge,O),t=1,p===!0&&(t|=24),p=ln(3,null,null,t),e.current=p,p.stateNode=e,t=yc(),t.refCount++,e.pooledCache=t,t.refCount++,p.memoizedState={element:a,isDehydrated:r,cache:t},Ec(p),e}function pb(e){return e?(e=Ii,e):Ii}function gb(e,t,r,a,d,p){d=pb(d),a.context===null?a.context=d:a.pendingContext=d,a=xr(t),a.payload={element:r},p=p===void 0?null:p,p!==null&&(a.callback=p),r=_r(e,a,t),r!==null&&($t(r,e,t),il(r,e,t))}function yb(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Hf(e,t){yb(e,t),(e=e.alternate)&&yb(e,t)}function bb(e){if(e.tag===13||e.tag===31){var t=Wr(e,67108864);t!==null&&$t(t,e,67108864),Hf(e,67108864)}}function vb(e){if(e.tag===13||e.tag===31){var t=fn();t=Du(t);var r=Wr(e,t);r!==null&&$t(r,e,t),Hf(e,t)}}var ls=!0;function iT(e,t,r,a){var d=Z.T;Z.T=null;var p=K.p;try{K.p=2,qf(e,t,r,a)}finally{K.p=p,Z.T=d}}function aT(e,t,r,a){var d=Z.T;Z.T=null;var p=K.p;try{K.p=8,qf(e,t,r,a)}finally{K.p=p,Z.T=d}}function qf(e,t,r,a){if(ls){var d=Pf(a);if(d===null)Af(e,t,a,os,r),Eb(e,a);else if(oT(d,e,t,r,a))a.stopPropagation();else if(Eb(e,a),t&4&&-1<lT.indexOf(e)){for(;d!==null;){var p=Ti(d);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var x=mn(p.pendingLanes);if(x!==0){var O=p;for(O.pendingLanes|=2,O.entangledLanes|=2;x;){var V=1<<31-Ze(x);O.entanglements[1]|=V,x&=~V}Un(p),(it&6)===0&&(Fo=_e()+500,Sl(0))}}break;case 31:case 13:O=Wr(p,2),O!==null&&$t(O,p,2),Vo(),Hf(p,2)}if(p=Pf(a),p===null&&Af(e,t,a,os,r),p===d)break;d=p}d!==null&&a.stopPropagation()}else Af(e,t,a,null,r)}}function Pf(e){return e=Fu(e),Ff(e)}var os=null;function Ff(e){if(os=null,e=Ci(e),e!==null){var t=s(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=c(t),e!==null)return e;e=null}else if(r===31){if(e=f(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return os=e,null}function Sb(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ce()){case te:return 2;case ve:return 8;case Te:case Ie:return 32;case Je:return 268435456;default:return 32}default:return 32}}var Yf=!1,Dr=null,jr=null,Lr=null,Al=new Map,kl=new Map,Ir=[],lT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Eb(e,t){switch(e){case"focusin":case"focusout":Dr=null;break;case"dragenter":case"dragleave":jr=null;break;case"mouseover":case"mouseout":Lr=null;break;case"pointerover":case"pointerout":Al.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(t.pointerId)}}function Nl(e,t,r,a,d,p){return e===null||e.nativeEvent!==p?(e={blockedOn:t,domEventName:r,eventSystemFlags:a,nativeEvent:p,targetContainers:[d]},t!==null&&(t=Ti(t),t!==null&&bb(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,d!==null&&t.indexOf(d)===-1&&t.push(d),e)}function oT(e,t,r,a,d){switch(t){case"focusin":return Dr=Nl(Dr,e,t,r,a,d),!0;case"dragenter":return jr=Nl(jr,e,t,r,a,d),!0;case"mouseover":return Lr=Nl(Lr,e,t,r,a,d),!0;case"pointerover":var p=d.pointerId;return Al.set(p,Nl(Al.get(p)||null,e,t,r,a,d)),!0;case"gotpointercapture":return p=d.pointerId,kl.set(p,Nl(kl.get(p)||null,e,t,r,a,d)),!0}return!1}function xb(e){var t=Ci(e.target);if(t!==null){var r=s(t);if(r!==null){if(t=r.tag,t===13){if(t=c(r),t!==null){e.blockedOn=t,Lp(e.priority,function(){vb(r)});return}}else if(t===31){if(t=f(r),t!==null){e.blockedOn=t,Lp(e.priority,function(){vb(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ss(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Pf(e.nativeEvent);if(r===null){r=e.nativeEvent;var a=new r.constructor(r.type,r);Pu=a,r.target.dispatchEvent(a),Pu=null}else return t=Ti(r),t!==null&&bb(t),e.blockedOn=r,!1;t.shift()}return!0}function _b(e,t,r){ss(e)&&r.delete(t)}function sT(){Yf=!1,Dr!==null&&ss(Dr)&&(Dr=null),jr!==null&&ss(jr)&&(jr=null),Lr!==null&&ss(Lr)&&(Lr=null),Al.forEach(_b),kl.forEach(_b)}function us(e,t){e.blockedOn===t&&(e.blockedOn=null,Yf||(Yf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,sT)))}var cs=null;function wb(e){cs!==e&&(cs=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){cs===e&&(cs=null);for(var t=0;t<e.length;t+=3){var r=e[t],a=e[t+1],d=e[t+2];if(typeof a!="function"){if(Ff(a||r)===null)continue;break}var p=Ti(r);p!==null&&(e.splice(t,3),t-=3,qc(p,{pending:!0,data:d,method:r.method,action:a},a,d))}}))}function oa(e){function t(V){return us(V,e)}Dr!==null&&us(Dr,e),jr!==null&&us(jr,e),Lr!==null&&us(Lr,e),Al.forEach(t),kl.forEach(t);for(var r=0;r<Ir.length;r++){var a=Ir[r];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ir.length&&(r=Ir[0],r.blockedOn===null);)xb(r),r.blockedOn===null&&Ir.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(a=0;a<r.length;a+=3){var d=r[a],p=r[a+1],x=d[Xt]||null;if(typeof p=="function")x||wb(r);else if(x){var O=null;if(p&&p.hasAttribute("formAction")){if(d=p,x=p[Xt]||null)O=x.formAction;else if(Ff(d)!==null)continue}else O=x.action;typeof O=="function"?r[a+1]=O:(r.splice(a,3),a-=3),wb(r)}}}function Cb(){function e(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(x){return d=x})},focusReset:"manual",scroll:"manual"})}function t(){d!==null&&(d(),d=null),a||setTimeout(r,20)}function r(){if(!a&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),d!==null&&(d(),d=null)}}}function Vf(e){this._internalRoot=e}fs.prototype.render=Vf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var r=t.current,a=fn();gb(r,a,e,t,null,null)},fs.prototype.unmount=Vf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gb(e.current,2,null,e,null,null),Vo(),t[wi]=null}};function fs(e){this._internalRoot=e}fs.prototype.unstable_scheduleHydration=function(e){if(e){var t=jp();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ir.length&&t!==0&&t<Ir[r].priority;r++);Ir.splice(r,0,e),r===0&&xb(e)}};var Tb=l.version;if(Tb!=="19.2.0")throw Error(o(527,Tb,"19.2.0"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=m(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var uT={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ds=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ds.isDisabled&&ds.supportsFiber)try{Xe=ds.inject(uT),gt=ds}catch{}}return ca.createRoot=function(e,t){if(!u(e))throw Error(o(299));var r=!1,a="",d=My,p=Dy,x=jy;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(d=t.onUncaughtError),t.onCaughtError!==void 0&&(p=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=mb(e,1,!1,null,null,r,a,null,d,p,x,Cb),e[wi]=t.current,Tf(e),new Vf(t)},ca.hydrateRoot=function(e,t,r){if(!u(e))throw Error(o(299));var a=!1,d="",p=My,x=Dy,O=jy,V=null;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(x=r.onCaughtError),r.onRecoverableError!==void 0&&(O=r.onRecoverableError),r.formState!==void 0&&(V=r.formState)),t=mb(e,1,!0,t,r??null,a,d,V,p,x,O,Cb),t.context=pb(null),r=t.current,a=fn(),a=Du(a),d=xr(a),d.callback=null,_r(r,d,a),r=a,t.current.lanes=r,Ha(t,r),Un(t),e[wi]=t.current,Tf(e),new fs(t)},ca.version="19.2.0",ca}var rd;function jb(){if(rd)return ys.exports;rd=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{}}return n(),ys.exports=Db(),ys.exports}var Lb=jb();td();function id(n,l){if(typeof n=="function")return n(l);n!=null&&(n.current=l)}function Es(...n){return l=>{let i=!1;const o=n.map(u=>{const s=id(u,l);return!i&&typeof s=="function"&&(i=!0),s});if(i)return()=>{for(let u=0;u<o.length;u++){const s=o[u];typeof s=="function"?s():id(n[u],null)}}}}function Hn(...n){return P.useCallback(Es(...n),n)}function Ib(n){const l=Bb(n),i=P.forwardRef((o,u)=>{const{children:s,...c}=o,f=P.Children.toArray(s),h=f.find(Hb);if(h){const m=h.props.children,g=f.map(y=>y===h?P.Children.count(m)>1?P.Children.only(null):P.isValidElement(m)?m.props.children:null:y);return R.jsx(l,{...c,ref:u,children:P.isValidElement(m)?P.cloneElement(m,void 0,g):null})}return R.jsx(l,{...c,ref:u,children:s})});return i.displayName=`${n}.Slot`,i}function Bb(n){const l=P.forwardRef((i,o)=>{const{children:u,...s}=i;if(P.isValidElement(u)){const c=Pb(u),f=qb(s,u.props);return u.type!==P.Fragment&&(f.ref=o?Es(o,c):c),P.cloneElement(u,f)}return P.Children.count(u)>1?P.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var Ub=Symbol("radix.slottable");function Hb(n){return P.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Ub}function qb(n,l){const i={...l};for(const o in l){const u=n[o],s=l[o];/^on[A-Z]/.test(o)?u&&s?i[o]=(...f)=>{const h=s(...f);return u(...f),h}:u&&(i[o]=u):o==="style"?i[o]={...u,...s}:o==="className"&&(i[o]=[u,s].filter(Boolean).join(" "))}return{...n,...i}}function Pb(n){let l=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?n.ref:(l=Object.getOwnPropertyDescriptor(n,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}var Fb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sr=Fb.reduce((n,l)=>{const i=Ib(`Primitive.${l}`),o=P.forwardRef((u,s)=>{const{asChild:c,...f}=u,h=c?i:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),R.jsx(h,{...f,ref:s})});return o.displayName=`Primitive.${l}`,{...n,[l]:o}},{}),ur=globalThis?.document?P.useLayoutEffect:()=>{};function Yb(n,l){return P.useReducer((i,o)=>l[i][o]??i,n)}var fi=n=>{const{present:l,children:i}=n,o=Vb(l),u=typeof i=="function"?i({present:o.isPresent}):P.Children.only(i),s=Hn(o.ref,Gb(u));return typeof i=="function"||o.isPresent?P.cloneElement(u,{ref:s}):null};fi.displayName="Presence";function Vb(n){const[l,i]=P.useState(),o=P.useRef(null),u=P.useRef(n),s=P.useRef("none"),c=n?"mounted":"unmounted",[f,h]=Yb(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const m=zl(o.current);s.current=f==="mounted"?m:"none"},[f]),ur(()=>{const m=o.current,g=u.current;if(g!==n){const v=s.current,b=zl(m);n?h("MOUNT"):b==="none"||m?.display==="none"?h("UNMOUNT"):h(g&&v!==b?"ANIMATION_OUT":"UNMOUNT"),u.current=n}},[n,h]),ur(()=>{if(l){let m;const g=l.ownerDocument.defaultView??window,y=b=>{const E=zl(o.current).includes(CSS.escape(b.animationName));if(b.target===l&&E&&(h("ANIMATION_END"),!u.current)){const T=l.style.animationFillMode;l.style.animationFillMode="forwards",m=g.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=T)})}},v=b=>{b.target===l&&(s.current=zl(o.current))};return l.addEventListener("animationstart",v),l.addEventListener("animationcancel",y),l.addEventListener("animationend",y),()=>{g.clearTimeout(m),l.removeEventListener("animationstart",v),l.removeEventListener("animationcancel",y),l.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[l,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:P.useCallback(m=>{o.current=m?getComputedStyle(m):null,i(m)},[])}}function zl(n){return n?.animationName||"none"}function Gb(n){let l=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?n.ref:(l=Object.getOwnPropertyDescriptor(n,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}function ad(n,l=[]){let i=[];function o(s,c){const f=P.createContext(c),h=i.length;i=[...i,c];const m=y=>{const{scope:v,children:b,...w}=y,E=v?.[n]?.[h]||f,T=P.useMemo(()=>w,Object.values(w));return R.jsx(E.Provider,{value:T,children:b})};m.displayName=s+"Provider";function g(y,v){const b=v?.[n]?.[h]||f,w=P.useContext(b);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${s}\``)}return[m,g]}const u=()=>{const s=i.map(c=>P.createContext(c));return function(f){const h=f?.[n]||s;return P.useMemo(()=>({[`__scope${n}`]:{...f,[n]:h}}),[f,h])}};return u.scopeName=n,[o,Xb(u,...l)]}function Xb(...n){const l=n[0];if(n.length===1)return l;const i=()=>{const o=n.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(s){const c=o.reduce((f,{useScope:h,scopeName:m})=>{const y=h(s)[`__scope${m}`];return{...f,...y}},{});return P.useMemo(()=>({[`__scope${l.scopeName}`]:c}),[c])}};return i.scopeName=l.scopeName,i}function cr(n){const l=P.useRef(n);return P.useEffect(()=>{l.current=n}),P.useMemo(()=>(...i)=>l.current?.(...i),[])}var Zb=P.createContext(void 0);function Kb(n){const l=P.useContext(Zb);return n||l||"ltr"}function Qb(n,[l,i]){return Math.min(i,Math.max(l,n))}function qn(n,l,{checkForDefaultPrevented:i=!0}={}){return function(u){if(n?.(u),i===!1||!u.defaultPrevented)return l?.(u)}}function Jb(n,l){return P.useReducer((i,o)=>l[i][o]??i,n)}var xs="ScrollArea",[ld]=ad(xs),[Wb,dn]=ld(xs),od=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,type:o="hover",dir:u,scrollHideDelay:s=600,...c}=n,[f,h]=P.useState(null),[m,g]=P.useState(null),[y,v]=P.useState(null),[b,w]=P.useState(null),[E,T]=P.useState(null),[_,A]=P.useState(0),[j,B]=P.useState(0),[U,z]=P.useState(!1),[H,Y]=P.useState(!1),F=Hn(l,ae=>h(ae)),$=Kb(u);return R.jsx(Wb,{scope:i,type:o,dir:$,scrollHideDelay:s,scrollArea:f,viewport:m,onViewportChange:g,content:y,onContentChange:v,scrollbarX:b,onScrollbarXChange:w,scrollbarXEnabled:U,onScrollbarXEnabledChange:z,scrollbarY:E,onScrollbarYChange:T,scrollbarYEnabled:H,onScrollbarYEnabledChange:Y,onCornerWidthChange:A,onCornerHeightChange:B,children:R.jsx(sr.div,{dir:$,...c,ref:F,style:{position:"relative","--radix-scroll-area-corner-width":_+"px","--radix-scroll-area-corner-height":j+"px",...n.style}})})});od.displayName=xs;var sd="ScrollAreaViewport",ud=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,children:o,nonce:u,...s}=n,c=dn(sd,i),f=P.useRef(null),h=Hn(l,f,c.onViewportChange);return R.jsxs(R.Fragment,{children:[R.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:u}),R.jsx(sr.div,{"data-radix-scroll-area-viewport":"",...s,ref:h,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...n.style},children:R.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});ud.displayName=sd;var Rn="ScrollAreaScrollbar",_s=P.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=dn(Rn,n.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:c}=u,f=n.orientation==="horizontal";return P.useEffect(()=>(f?s(!0):c(!0),()=>{f?s(!1):c(!1)}),[f,s,c]),u.type==="hover"?R.jsx($b,{...o,ref:l,forceMount:i}):u.type==="scroll"?R.jsx(ev,{...o,ref:l,forceMount:i}):u.type==="auto"?R.jsx(cd,{...o,ref:l,forceMount:i}):u.type==="always"?R.jsx(ws,{...o,ref:l}):null});_s.displayName=Rn;var $b=P.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=dn(Rn,n.__scopeScrollArea),[s,c]=P.useState(!1);return P.useEffect(()=>{const f=u.scrollArea;let h=0;if(f){const m=()=>{window.clearTimeout(h),c(!0)},g=()=>{h=window.setTimeout(()=>c(!1),u.scrollHideDelay)};return f.addEventListener("pointerenter",m),f.addEventListener("pointerleave",g),()=>{window.clearTimeout(h),f.removeEventListener("pointerenter",m),f.removeEventListener("pointerleave",g)}}},[u.scrollArea,u.scrollHideDelay]),R.jsx(fi,{present:i||s,children:R.jsx(cd,{"data-state":s?"visible":"hidden",...o,ref:l})})}),ev=P.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=dn(Rn,n.__scopeScrollArea),s=n.orientation==="horizontal",c=Ll(()=>h("SCROLL_END"),100),[f,h]=Jb("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return P.useEffect(()=>{if(f==="idle"){const m=window.setTimeout(()=>h("HIDE"),u.scrollHideDelay);return()=>window.clearTimeout(m)}},[f,u.scrollHideDelay,h]),P.useEffect(()=>{const m=u.viewport,g=s?"scrollLeft":"scrollTop";if(m){let y=m[g];const v=()=>{const b=m[g];y!==b&&(h("SCROLL"),c()),y=b};return m.addEventListener("scroll",v),()=>m.removeEventListener("scroll",v)}},[u.viewport,s,h,c]),R.jsx(fi,{present:i||f!=="hidden",children:R.jsx(ws,{"data-state":f==="hidden"?"hidden":"visible",...o,ref:l,onPointerEnter:qn(n.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:qn(n.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),cd=P.forwardRef((n,l)=>{const i=dn(Rn,n.__scopeScrollArea),{forceMount:o,...u}=n,[s,c]=P.useState(!1),f=n.orientation==="horizontal",h=Ll(()=>{if(i.viewport){const m=i.viewport.offsetWidth<i.viewport.scrollWidth,g=i.viewport.offsetHeight<i.viewport.scrollHeight;c(f?m:g)}},10);return di(i.viewport,h),di(i.content,h),R.jsx(fi,{present:o||s,children:R.jsx(ws,{"data-state":s?"visible":"hidden",...u,ref:l})})}),ws=P.forwardRef((n,l)=>{const{orientation:i="vertical",...o}=n,u=dn(Rn,n.__scopeScrollArea),s=P.useRef(null),c=P.useRef(0),[f,h]=P.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),m=pd(f.viewport,f.content),g={...o,sizes:f,onSizesChange:h,hasThumb:m>0&&m<1,onThumbChange:v=>s.current=v,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:v=>c.current=v};function y(v,b){return lv(v,c.current,f,b)}return i==="horizontal"?R.jsx(tv,{...g,ref:l,onThumbPositionChange:()=>{if(u.viewport&&s.current){const v=u.viewport.scrollLeft,b=gd(v,f,u.dir);s.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:v=>{u.viewport&&(u.viewport.scrollLeft=v)},onDragScroll:v=>{u.viewport&&(u.viewport.scrollLeft=y(v,u.dir))}}):i==="vertical"?R.jsx(nv,{...g,ref:l,onThumbPositionChange:()=>{if(u.viewport&&s.current){const v=u.viewport.scrollTop,b=gd(v,f);s.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:v=>{u.viewport&&(u.viewport.scrollTop=v)},onDragScroll:v=>{u.viewport&&(u.viewport.scrollTop=y(v))}}):null}),tv=P.forwardRef((n,l)=>{const{sizes:i,onSizesChange:o,...u}=n,s=dn(Rn,n.__scopeScrollArea),[c,f]=P.useState(),h=P.useRef(null),m=Hn(l,h,s.onScrollbarXChange);return P.useEffect(()=>{h.current&&f(getComputedStyle(h.current))},[h]),R.jsx(dd,{"data-orientation":"horizontal",...u,ref:m,sizes:i,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":jl(i)+"px",...n.style},onThumbPointerDown:g=>n.onThumbPointerDown(g.x),onDragScroll:g=>n.onDragScroll(g.x),onWheelScroll:(g,y)=>{if(s.viewport){const v=s.viewport.scrollLeft+g.deltaX;n.onWheelScroll(v),bd(v,y)&&g.preventDefault()}},onResize:()=>{h.current&&s.viewport&&c&&o({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:Dl(c.paddingLeft),paddingEnd:Dl(c.paddingRight)}})}})}),nv=P.forwardRef((n,l)=>{const{sizes:i,onSizesChange:o,...u}=n,s=dn(Rn,n.__scopeScrollArea),[c,f]=P.useState(),h=P.useRef(null),m=Hn(l,h,s.onScrollbarYChange);return P.useEffect(()=>{h.current&&f(getComputedStyle(h.current))},[h]),R.jsx(dd,{"data-orientation":"vertical",...u,ref:m,sizes:i,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":jl(i)+"px",...n.style},onThumbPointerDown:g=>n.onThumbPointerDown(g.y),onDragScroll:g=>n.onDragScroll(g.y),onWheelScroll:(g,y)=>{if(s.viewport){const v=s.viewport.scrollTop+g.deltaY;n.onWheelScroll(v),bd(v,y)&&g.preventDefault()}},onResize:()=>{h.current&&s.viewport&&c&&o({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:Dl(c.paddingTop),paddingEnd:Dl(c.paddingBottom)}})}})}),[rv,fd]=ld(Rn),dd=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,sizes:o,hasThumb:u,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:f,onThumbPositionChange:h,onDragScroll:m,onWheelScroll:g,onResize:y,...v}=n,b=dn(Rn,i),[w,E]=P.useState(null),T=Hn(l,F=>E(F)),_=P.useRef(null),A=P.useRef(""),j=b.viewport,B=o.content-o.viewport,U=cr(g),z=cr(h),H=Ll(y,10);function Y(F){if(_.current){const $=F.clientX-_.current.left,ae=F.clientY-_.current.top;m({x:$,y:ae})}}return P.useEffect(()=>{const F=$=>{const ae=$.target;w?.contains(ae)&&U($,B)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[j,w,B,U]),P.useEffect(z,[o,z]),di(w,H),di(b.content,H),R.jsx(rv,{scope:i,scrollbar:w,hasThumb:u,onThumbChange:cr(s),onThumbPointerUp:cr(c),onThumbPositionChange:z,onThumbPointerDown:cr(f),children:R.jsx(sr.div,{...v,ref:T,style:{position:"absolute",...v.style},onPointerDown:qn(n.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),_.current=w.getBoundingClientRect(),A.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),Y(F))}),onPointerMove:qn(n.onPointerMove,Y),onPointerUp:qn(n.onPointerUp,F=>{const $=F.target;$.hasPointerCapture(F.pointerId)&&$.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=A.current,b.viewport&&(b.viewport.style.scrollBehavior=""),_.current=null})})})}),Ml="ScrollAreaThumb",hd=P.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=fd(Ml,n.__scopeScrollArea);return R.jsx(fi,{present:i||u.hasThumb,children:R.jsx(iv,{ref:l,...o})})}),iv=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,style:o,...u}=n,s=dn(Ml,i),c=fd(Ml,i),{onThumbPositionChange:f}=c,h=Hn(l,y=>c.onThumbChange(y)),m=P.useRef(void 0),g=Ll(()=>{m.current&&(m.current(),m.current=void 0)},100);return P.useEffect(()=>{const y=s.viewport;if(y){const v=()=>{if(g(),!m.current){const b=ov(y,f);m.current=b,f()}};return f(),y.addEventListener("scroll",v),()=>y.removeEventListener("scroll",v)}},[s.viewport,g,f]),R.jsx(sr.div,{"data-state":c.hasThumb?"visible":"hidden",...u,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:qn(n.onPointerDownCapture,y=>{const b=y.target.getBoundingClientRect(),w=y.clientX-b.left,E=y.clientY-b.top;c.onThumbPointerDown({x:w,y:E})}),onPointerUp:qn(n.onPointerUp,c.onThumbPointerUp)})});hd.displayName=Ml;var Cs="ScrollAreaCorner",md=P.forwardRef((n,l)=>{const i=dn(Cs,n.__scopeScrollArea),o=!!(i.scrollbarX&&i.scrollbarY);return i.type!=="scroll"&&o?R.jsx(av,{...n,ref:l}):null});md.displayName=Cs;var av=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,...o}=n,u=dn(Cs,i),[s,c]=P.useState(0),[f,h]=P.useState(0),m=!!(s&&f);return di(u.scrollbarX,()=>{const g=u.scrollbarX?.offsetHeight||0;u.onCornerHeightChange(g),h(g)}),di(u.scrollbarY,()=>{const g=u.scrollbarY?.offsetWidth||0;u.onCornerWidthChange(g),c(g)}),m?R.jsx(sr.div,{...o,ref:l,style:{width:s,height:f,position:"absolute",right:u.dir==="ltr"?0:void 0,left:u.dir==="rtl"?0:void 0,bottom:0,...n.style}}):null});function Dl(n){return n?parseInt(n,10):0}function pd(n,l){const i=n/l;return isNaN(i)?0:i}function jl(n){const l=pd(n.viewport,n.content),i=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,o=(n.scrollbar.size-i)*l;return Math.max(o,18)}function lv(n,l,i,o="ltr"){const u=jl(i),s=u/2,c=l||s,f=u-c,h=i.scrollbar.paddingStart+c,m=i.scrollbar.size-i.scrollbar.paddingEnd-f,g=i.content-i.viewport,y=o==="ltr"?[0,g]:[g*-1,0];return yd([h,m],y)(n)}function gd(n,l,i="ltr"){const o=jl(l),u=l.scrollbar.paddingStart+l.scrollbar.paddingEnd,s=l.scrollbar.size-u,c=l.content-l.viewport,f=s-o,h=i==="ltr"?[0,c]:[c*-1,0],m=Qb(n,h);return yd([0,c],[0,f])(m)}function yd(n,l){return i=>{if(n[0]===n[1]||l[0]===l[1])return l[0];const o=(l[1]-l[0])/(n[1]-n[0]);return l[0]+o*(i-n[0])}}function bd(n,l){return n>0&&n<l}var ov=(n,l=()=>{})=>{let i={left:n.scrollLeft,top:n.scrollTop},o=0;return(function u(){const s={left:n.scrollLeft,top:n.scrollTop},c=i.left!==s.left,f=i.top!==s.top;(c||f)&&l(),i=s,o=window.requestAnimationFrame(u)})(),()=>window.cancelAnimationFrame(o)};function Ll(n,l){const i=cr(n),o=P.useRef(0);return P.useEffect(()=>()=>window.clearTimeout(o.current),[]),P.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(i,l)},[i,l])}function di(n,l){const i=cr(l);ur(()=>{let o=0;if(n){const u=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(i)});return u.observe(n),()=>{window.cancelAnimationFrame(o),u.unobserve(n)}}},[n,i])}var vd=od,sv=ud,uv=md;function Sd(n){var l,i,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(l=0;l<u;l++)n[l]&&(i=Sd(n[l]))&&(o&&(o+=" "),o+=i)}else for(i in n)n[i]&&(o&&(o+=" "),o+=i);return o}function Ed(){for(var n,l,i=0,o="",u=arguments.length;i<u;i++)(n=arguments[i])&&(l=Sd(n))&&(o&&(o+=" "),o+=l);return o}const cv=(n,l)=>{const i=new Array(n.length+l.length);for(let o=0;o<n.length;o++)i[o]=n[o];for(let o=0;o<l.length;o++)i[n.length+o]=l[o];return i},fv=(n,l)=>({classGroupId:n,validator:l}),xd=(n=new Map,l=null,i)=>({nextPart:n,validators:l,classGroupId:i}),Il="-",_d=[],dv="arbitrary..",hv=n=>{const l=pv(n),{conflictingClassGroups:i,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return mv(c);const f=c.split(Il),h=f[0]===""&&f.length>1?1:0;return wd(f,h,l)},getConflictingClassGroupIds:(c,f)=>{if(f){const h=o[c],m=i[c];return h?m?cv(m,h):h:m||_d}return i[c]||_d}}},wd=(n,l,i)=>{if(n.length-l===0)return i.classGroupId;const u=n[l],s=i.nextPart.get(u);if(s){const m=wd(n,l+1,s);if(m)return m}const c=i.validators;if(c===null)return;const f=l===0?n.join(Il):n.slice(l).join(Il),h=c.length;for(let m=0;m<h;m++){const g=c[m];if(g.validator(f))return g.classGroupId}},mv=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const l=n.slice(1,-1),i=l.indexOf(":"),o=l.slice(0,i);return o?dv+o:void 0})(),pv=n=>{const{theme:l,classGroups:i}=n;return gv(i,l)},gv=(n,l)=>{const i=xd();for(const o in n){const u=n[o];Ts(u,i,o,l)}return i},Ts=(n,l,i,o)=>{const u=n.length;for(let s=0;s<u;s++){const c=n[s];yv(c,l,i,o)}},yv=(n,l,i,o)=>{if(typeof n=="string"){bv(n,l,i);return}if(typeof n=="function"){vv(n,l,i,o);return}Sv(n,l,i,o)},bv=(n,l,i)=>{const o=n===""?l:Cd(l,n);o.classGroupId=i},vv=(n,l,i,o)=>{if(Ev(n)){Ts(n(o),l,i,o);return}l.validators===null&&(l.validators=[]),l.validators.push(fv(i,n))},Sv=(n,l,i,o)=>{const u=Object.entries(n),s=u.length;for(let c=0;c<s;c++){const[f,h]=u[c];Ts(h,Cd(l,f),i,o)}},Cd=(n,l)=>{let i=n;const o=l.split(Il),u=o.length;for(let s=0;s<u;s++){const c=o[s];let f=i.nextPart.get(c);f||(f=xd(),i.nextPart.set(c,f)),i=f}return i},Ev=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,xv=n=>{if(n<1)return{get:()=>{},set:()=>{}};let l=0,i=Object.create(null),o=Object.create(null);const u=(s,c)=>{i[s]=c,l++,l>n&&(l=0,o=i,i=Object.create(null))};return{get(s){let c=i[s];if(c!==void 0)return c;if((c=o[s])!==void 0)return u(s,c),c},set(s,c){s in i?i[s]=c:u(s,c)}}},As="!",Td=":",_v=[],Ad=(n,l,i,o,u)=>({modifiers:n,hasImportantModifier:l,baseClassName:i,maybePostfixModifierPosition:o,isExternal:u}),wv=n=>{const{prefix:l,experimentalParseClassName:i}=n;let o=u=>{const s=[];let c=0,f=0,h=0,m;const g=u.length;for(let E=0;E<g;E++){const T=u[E];if(c===0&&f===0){if(T===Td){s.push(u.slice(h,E)),h=E+1;continue}if(T==="/"){m=E;continue}}T==="["?c++:T==="]"?c--:T==="("?f++:T===")"&&f--}const y=s.length===0?u:u.slice(h);let v=y,b=!1;y.endsWith(As)?(v=y.slice(0,-1),b=!0):y.startsWith(As)&&(v=y.slice(1),b=!0);const w=m&&m>h?m-h:void 0;return Ad(s,b,v,w)};if(l){const u=l+Td,s=o;o=c=>c.startsWith(u)?s(c.slice(u.length)):Ad(_v,!1,c,void 0,!0)}if(i){const u=o;o=s=>i({className:s,parseClassName:u})}return o},Cv=n=>{const l=new Map;return n.orderSensitiveModifiers.forEach((i,o)=>{l.set(i,1e6+o)}),i=>{const o=[];let u=[];for(let s=0;s<i.length;s++){const c=i[s],f=c[0]==="[",h=l.has(c);f||h?(u.length>0&&(u.sort(),o.push(...u),u=[]),o.push(c)):u.push(c)}return u.length>0&&(u.sort(),o.push(...u)),o}},Tv=n=>({cache:xv(n.cacheSize),parseClassName:wv(n),sortModifiers:Cv(n),...hv(n)}),Av=/\s+/,kv=(n,l)=>{const{parseClassName:i,getClassGroupId:o,getConflictingClassGroupIds:u,sortModifiers:s}=l,c=[],f=n.trim().split(Av);let h="";for(let m=f.length-1;m>=0;m-=1){const g=f[m],{isExternal:y,modifiers:v,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:E}=i(g);if(y){h=g+(h.length>0?" "+h:h);continue}let T=!!E,_=o(T?w.substring(0,E):w);if(!_){if(!T){h=g+(h.length>0?" "+h:h);continue}if(_=o(w),!_){h=g+(h.length>0?" "+h:h);continue}T=!1}const A=v.length===0?"":v.length===1?v[0]:s(v).join(":"),j=b?A+As:A,B=j+_;if(c.indexOf(B)>-1)continue;c.push(B);const U=u(_,T);for(let z=0;z<U.length;++z){const H=U[z];c.push(j+H)}h=g+(h.length>0?" "+h:h)}return h},Nv=(...n)=>{let l=0,i,o,u="";for(;l<n.length;)(i=n[l++])&&(o=kd(i))&&(u&&(u+=" "),u+=o);return u},kd=n=>{if(typeof n=="string")return n;let l,i="";for(let o=0;o<n.length;o++)n[o]&&(l=kd(n[o]))&&(i&&(i+=" "),i+=l);return i},Rv=(n,...l)=>{let i,o,u,s;const c=h=>{const m=l.reduce((g,y)=>y(g),n());return i=Tv(m),o=i.cache.get,u=i.cache.set,s=f,f(h)},f=h=>{const m=o(h);if(m)return m;const g=kv(h,i);return u(h,g),g};return s=c,(...h)=>s(Nv(...h))},Ov=[],At=n=>{const l=i=>i[n]||Ov;return l.isThemeGetter=!0,l},Nd=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Rd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zv=/^\d+\/\d+$/,Mv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Dv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Lv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Iv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hi=n=>zv.test(n),Ge=n=>!!n&&!Number.isNaN(Number(n)),fr=n=>!!n&&Number.isInteger(Number(n)),ks=n=>n.endsWith("%")&&Ge(n.slice(0,-1)),Pn=n=>Mv.test(n),Bv=()=>!0,Uv=n=>Dv.test(n)&&!jv.test(n),Od=()=>!1,Hv=n=>Lv.test(n),qv=n=>Iv.test(n),Pv=n=>!Oe(n)&&!ze(n),Fv=n=>mi(n,Ld,Od),Oe=n=>Nd.test(n),Ur=n=>mi(n,Id,Uv),Ns=n=>mi(n,Zv,Ge),zd=n=>mi(n,Dd,Od),Yv=n=>mi(n,jd,qv),Bl=n=>mi(n,Bd,Hv),ze=n=>Rd.test(n),fa=n=>pi(n,Id),Vv=n=>pi(n,Kv),Md=n=>pi(n,Dd),Gv=n=>pi(n,Ld),Xv=n=>pi(n,jd),Ul=n=>pi(n,Bd,!0),mi=(n,l,i)=>{const o=Nd.exec(n);return o?o[1]?l(o[1]):i(o[2]):!1},pi=(n,l,i=!1)=>{const o=Rd.exec(n);return o?o[1]?l(o[1]):i:!1},Dd=n=>n==="position"||n==="percentage",jd=n=>n==="image"||n==="url",Ld=n=>n==="length"||n==="size"||n==="bg-size",Id=n=>n==="length",Zv=n=>n==="number",Kv=n=>n==="family-name",Bd=n=>n==="shadow",Qv=Rv(()=>{const n=At("color"),l=At("font"),i=At("text"),o=At("font-weight"),u=At("tracking"),s=At("leading"),c=At("breakpoint"),f=At("container"),h=At("spacing"),m=At("radius"),g=At("shadow"),y=At("inset-shadow"),v=At("text-shadow"),b=At("drop-shadow"),w=At("blur"),E=At("perspective"),T=At("aspect"),_=At("ease"),A=At("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],U=()=>[...B(),ze,Oe],z=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],Y=()=>[ze,Oe,h],F=()=>[hi,"full","auto",...Y()],$=()=>[fr,"none","subgrid",ze,Oe],ae=()=>["auto",{span:["full",fr,ze,Oe]},fr,ze,Oe],M=()=>[fr,"auto",ze,Oe],ne=()=>["auto","min","max","fr",ze,Oe],C=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],Z=()=>["auto",...Y()],K=()=>[hi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Y()],oe=()=>[n,ze,Oe],de=()=>[...B(),Md,zd,{position:[ze,Oe]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],k=()=>["auto","cover","contain",Gv,Fv,{size:[ze,Oe]}],q=()=>[ks,fa,Ur],N=()=>["","none","full",m,ze,Oe],re=()=>["",Ge,fa,Ur],ce=()=>["solid","dashed","dotted","double"],we=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ae=()=>[Ge,ks,Md,zd],Ne=()=>["","none",w,ze,Oe],ke=()=>["none",Ge,ze,Oe],He=()=>["none",Ge,ze,Oe],Se=()=>[Ge,ze,Oe],Me=()=>[hi,"full",...Y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pn],breakpoint:[Pn],color:[Bv],container:[Pn],"drop-shadow":[Pn],ease:["in","out","in-out"],font:[Pv],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Pn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Pn],shadow:[Pn],spacing:["px",Ge],text:[Pn],"text-shadow":[Pn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",hi,Oe,ze,T]}],container:["container"],columns:[{columns:[Ge,Oe,ze,f]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:U()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{start:F()}],end:[{end:F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[fr,"auto",ze,Oe]}],basis:[{basis:[hi,"full","auto",f,...Y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ge,hi,"auto","initial","none",Oe]}],grow:[{grow:["",Ge,ze,Oe]}],shrink:[{shrink:["",Ge,ze,Oe]}],order:[{order:[fr,"first","last","none",ze,Oe]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:ae()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:ae()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:Y()}],"gap-x":[{"gap-x":Y()}],"gap-y":[{"gap-y":Y()}],"justify-content":[{justify:[...C(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...C()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":C()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:Y()}],px:[{px:Y()}],py:[{py:Y()}],ps:[{ps:Y()}],pe:[{pe:Y()}],pt:[{pt:Y()}],pr:[{pr:Y()}],pb:[{pb:Y()}],pl:[{pl:Y()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":Y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Y()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],w:[{w:[f,"screen",...K()]}],"min-w":[{"min-w":[f,"screen","none",...K()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",i,fa,Ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,ze,Ns]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ks,Oe]}],"font-family":[{font:[Vv,Oe,l]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,ze,Oe]}],"line-clamp":[{"line-clamp":[Ge,"none",ze,Ns]}],leading:[{leading:[s,...Y()]}],"list-image":[{"list-image":["none",ze,Oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ze,Oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:oe()}],"text-color":[{text:oe()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ge,"from-font","auto",ze,Ur]}],"text-decoration-color":[{decoration:oe()}],"underline-offset":[{"underline-offset":[Ge,"auto",ze,Oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ze,Oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ze,Oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:de()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:k()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},fr,ze,Oe],radial:["",ze,Oe],conic:[fr,ze,Oe]},Xv,Yv]}],"bg-color":[{bg:oe()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:oe()}],"gradient-via":[{via:oe()}],"gradient-to":[{to:oe()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:oe()}],"border-color-x":[{"border-x":oe()}],"border-color-y":[{"border-y":oe()}],"border-color-s":[{"border-s":oe()}],"border-color-e":[{"border-e":oe()}],"border-color-t":[{"border-t":oe()}],"border-color-r":[{"border-r":oe()}],"border-color-b":[{"border-b":oe()}],"border-color-l":[{"border-l":oe()}],"divide-color":[{divide:oe()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ge,ze,Oe]}],"outline-w":[{outline:["",Ge,fa,Ur]}],"outline-color":[{outline:oe()}],shadow:[{shadow:["","none",g,Ul,Bl]}],"shadow-color":[{shadow:oe()}],"inset-shadow":[{"inset-shadow":["none",y,Ul,Bl]}],"inset-shadow-color":[{"inset-shadow":oe()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:oe()}],"ring-offset-w":[{"ring-offset":[Ge,Ur]}],"ring-offset-color":[{"ring-offset":oe()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":oe()}],"text-shadow":[{"text-shadow":["none",v,Ul,Bl]}],"text-shadow-color":[{"text-shadow":oe()}],opacity:[{opacity:[Ge,ze,Oe]}],"mix-blend":[{"mix-blend":[...we(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":we()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ae()}],"mask-image-linear-from-color":[{"mask-linear-from":oe()}],"mask-image-linear-to-color":[{"mask-linear-to":oe()}],"mask-image-t-from-pos":[{"mask-t-from":Ae()}],"mask-image-t-to-pos":[{"mask-t-to":Ae()}],"mask-image-t-from-color":[{"mask-t-from":oe()}],"mask-image-t-to-color":[{"mask-t-to":oe()}],"mask-image-r-from-pos":[{"mask-r-from":Ae()}],"mask-image-r-to-pos":[{"mask-r-to":Ae()}],"mask-image-r-from-color":[{"mask-r-from":oe()}],"mask-image-r-to-color":[{"mask-r-to":oe()}],"mask-image-b-from-pos":[{"mask-b-from":Ae()}],"mask-image-b-to-pos":[{"mask-b-to":Ae()}],"mask-image-b-from-color":[{"mask-b-from":oe()}],"mask-image-b-to-color":[{"mask-b-to":oe()}],"mask-image-l-from-pos":[{"mask-l-from":Ae()}],"mask-image-l-to-pos":[{"mask-l-to":Ae()}],"mask-image-l-from-color":[{"mask-l-from":oe()}],"mask-image-l-to-color":[{"mask-l-to":oe()}],"mask-image-x-from-pos":[{"mask-x-from":Ae()}],"mask-image-x-to-pos":[{"mask-x-to":Ae()}],"mask-image-x-from-color":[{"mask-x-from":oe()}],"mask-image-x-to-color":[{"mask-x-to":oe()}],"mask-image-y-from-pos":[{"mask-y-from":Ae()}],"mask-image-y-to-pos":[{"mask-y-to":Ae()}],"mask-image-y-from-color":[{"mask-y-from":oe()}],"mask-image-y-to-color":[{"mask-y-to":oe()}],"mask-image-radial":[{"mask-radial":[ze,Oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ae()}],"mask-image-radial-from-color":[{"mask-radial-from":oe()}],"mask-image-radial-to-color":[{"mask-radial-to":oe()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":B()}],"mask-image-conic-pos":[{"mask-conic":[Ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ae()}],"mask-image-conic-from-color":[{"mask-conic-from":oe()}],"mask-image-conic-to-color":[{"mask-conic-to":oe()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:de()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:k()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ze,Oe]}],filter:[{filter:["","none",ze,Oe]}],blur:[{blur:Ne()}],brightness:[{brightness:[Ge,ze,Oe]}],contrast:[{contrast:[Ge,ze,Oe]}],"drop-shadow":[{"drop-shadow":["","none",b,Ul,Bl]}],"drop-shadow-color":[{"drop-shadow":oe()}],grayscale:[{grayscale:["",Ge,ze,Oe]}],"hue-rotate":[{"hue-rotate":[Ge,ze,Oe]}],invert:[{invert:["",Ge,ze,Oe]}],saturate:[{saturate:[Ge,ze,Oe]}],sepia:[{sepia:["",Ge,ze,Oe]}],"backdrop-filter":[{"backdrop-filter":["","none",ze,Oe]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[Ge,ze,Oe]}],"backdrop-contrast":[{"backdrop-contrast":[Ge,ze,Oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ge,ze,Oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ge,ze,Oe]}],"backdrop-invert":[{"backdrop-invert":["",Ge,ze,Oe]}],"backdrop-opacity":[{"backdrop-opacity":[Ge,ze,Oe]}],"backdrop-saturate":[{"backdrop-saturate":[Ge,ze,Oe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ge,ze,Oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Y()}],"border-spacing-x":[{"border-spacing-x":Y()}],"border-spacing-y":[{"border-spacing-y":Y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ze,Oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ge,"initial",ze,Oe]}],ease:[{ease:["linear","initial",_,ze,Oe]}],delay:[{delay:[Ge,ze,Oe]}],animate:[{animate:["none",A,ze,Oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,ze,Oe]}],"perspective-origin":[{"perspective-origin":U()}],rotate:[{rotate:ke()}],"rotate-x":[{"rotate-x":ke()}],"rotate-y":[{"rotate-y":ke()}],"rotate-z":[{"rotate-z":ke()}],scale:[{scale:He()}],"scale-x":[{"scale-x":He()}],"scale-y":[{"scale-y":He()}],"scale-z":[{"scale-z":He()}],"scale-3d":["scale-3d"],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[ze,Oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:U()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Me()}],"translate-x":[{"translate-x":Me()}],"translate-y":[{"translate-y":Me()}],"translate-z":[{"translate-z":Me()}],"translate-none":["translate-none"],accent:[{accent:oe()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:oe()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ze,Oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ze,Oe]}],fill:[{fill:["none",...oe()]}],"stroke-w":[{stroke:[Ge,fa,Ur,Ns]}],stroke:[{stroke:["none",...oe()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Ve(...n){return Qv(Ed(n))}function gi(n){if(!n&&n!==0)return"";const l=n instanceof Date?n:new Date(typeof n=="number"?n:Number(n)||n);return Number.isNaN(l.getTime())?"":l.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}const Jv=n=>new Promise(l=>setTimeout(l,n)),Ud=P.forwardRef(({className:n,children:l,...i},o)=>R.jsxs(vd,{ref:o,className:Ve("relative overflow-hidden",n),...i,children:[R.jsx(sv,{className:"h-full w-full rounded-[inherit]",children:l}),R.jsx(Hd,{}),R.jsx(uv,{})]}));Ud.displayName=vd.displayName;const Hd=P.forwardRef(({className:n,orientation:l="vertical",...i},o)=>R.jsx(_s,{ref:o,orientation:l,className:Ve("flex touch-none select-none transition-colors",l==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",n),...i,children:R.jsx(hd,{className:"relative flex-1 rounded-full bg-border"})}));Hd.displayName=_s.displayName;var Wv=Symbol.for("react.lazy"),Hl=Qf[" use ".trim().toString()];function $v(n){return typeof n=="object"&&n!==null&&"then"in n}function qd(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===Wv&&"_payload"in n&&$v(n._payload)}function Pd(n){const l=tS(n),i=P.forwardRef((o,u)=>{let{children:s,...c}=o;qd(s)&&typeof Hl=="function"&&(s=Hl(s._payload));const f=P.Children.toArray(s),h=f.find(rS);if(h){const m=h.props.children,g=f.map(y=>y===h?P.Children.count(m)>1?P.Children.only(null):P.isValidElement(m)?m.props.children:null:y);return R.jsx(l,{...c,ref:u,children:P.isValidElement(m)?P.cloneElement(m,void 0,g):null})}return R.jsx(l,{...c,ref:u,children:s})});return i.displayName=`${n}.Slot`,i}var eS=Pd("Slot");function tS(n){const l=P.forwardRef((i,o)=>{let{children:u,...s}=i;if(qd(u)&&typeof Hl=="function"&&(u=Hl(u._payload)),P.isValidElement(u)){const c=aS(u),f=iS(s,u.props);return u.type!==P.Fragment&&(f.ref=o?Es(o,c):c),P.cloneElement(u,f)}return P.Children.count(u)>1?P.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var nS=Symbol("radix.slottable");function rS(n){return P.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===nS}function iS(n,l){const i={...l};for(const o in l){const u=n[o],s=l[o];/^on[A-Z]/.test(o)?u&&s?i[o]=(...f)=>{const h=s(...f);return u(...f),h}:u&&(i[o]=u):o==="style"?i[o]={...u,...s}:o==="className"&&(i[o]=[u,s].filter(Boolean).join(" "))}return{...n,...i}}function aS(n){let l=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?n.ref:(l=Object.getOwnPropertyDescriptor(n,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}const Fd=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Yd=Ed,lS=((n,l)=>i=>{var o;if(l?.variants==null)return Yd(n,i?.class,i?.className);const{variants:u,defaultVariants:s}=l,c=Object.keys(u).map(m=>{const g=i?.[m],y=s?.[m];if(g===null)return null;const v=Fd(g)||Fd(y);return u[m][v]}),f=i&&Object.entries(i).reduce((m,g)=>{let[y,v]=g;return v===void 0||(m[y]=v),m},{}),h=l==null||(o=l.compoundVariants)===null||o===void 0?void 0:o.reduce((m,g)=>{let{class:y,className:v,...b}=g;return Object.entries(b).every(w=>{let[E,T]=w;return Array.isArray(T)?T.includes({...s,...f}[E]):{...s,...f}[E]===T})?[...m,y,v]:m},[]);return Yd(n,c,h,i?.class,i?.className)})("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),kt=P.forwardRef(({className:n,variant:l,size:i,asChild:o=!1,...u},s)=>{const c=o?eS:"button";return R.jsx(c,{className:Ve(lS({variant:l,size:i,className:n})),ref:s,...u})});kt.displayName="Button";const oS=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),sS=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,i,o)=>o?o.toUpperCase():i.toLowerCase()),Vd=n=>{const l=sS(n);return l.charAt(0).toUpperCase()+l.slice(1)},Gd=(...n)=>n.filter((l,i,o)=>!!l&&l.trim()!==""&&o.indexOf(l)===i).join(" ").trim(),uS=n=>{for(const l in n)if(l.startsWith("aria-")||l==="role"||l==="title")return!0};var cS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const fS=P.forwardRef(({color:n="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:u="",children:s,iconNode:c,...f},h)=>P.createElement("svg",{ref:h,...cS,width:l,height:l,stroke:n,strokeWidth:o?Number(i)*24/Number(l):i,className:Gd("lucide",u),...!s&&!uS(f)&&{"aria-hidden":"true"},...f},[...c.map(([m,g])=>P.createElement(m,g)),...Array.isArray(s)?s:[s]]));const Rt=(n,l)=>{const i=P.forwardRef(({className:o,...u},s)=>P.createElement(fS,{ref:s,iconNode:l,className:Gd(`lucide-${oS(Vd(n))}`,`lucide-${n}`,o),...u}));return i.displayName=Vd(n),i};const dS=Rt("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const Xd=Rt("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);const Zd=Rt("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);const hS=Rt("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Kd=Rt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Rs=Rt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const mS=Rt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const pS=Rt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const gS=Rt("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const yS=Rt("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const bS=Rt("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);const Qd=Rt("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const vS=Rt("message-square-plus",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]]);const SS=Rt("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);const ES=Rt("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);const xS=Rt("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const _S=Rt("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const Os=Rt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),da=P.forwardRef(({className:n,...l},i)=>R.jsx("div",{ref:i,className:Ve("rounded-xl border bg-card text-card-foreground shadow",n),...l}));da.displayName="Card";const Jd=P.forwardRef(({className:n,...l},i)=>R.jsx("div",{ref:i,className:Ve("flex flex-col space-y-1.5 p-6",n),...l}));Jd.displayName="CardHeader";const wS=P.forwardRef(({className:n,...l},i)=>R.jsx("div",{ref:i,className:Ve("font-semibold leading-none tracking-tight",n),...l}));wS.displayName="CardTitle";const CS=P.forwardRef(({className:n,...l},i)=>R.jsx("div",{ref:i,className:Ve("text-sm text-muted-foreground",n),...l}));CS.displayName="CardDescription";const Wd=P.forwardRef(({className:n,...l},i)=>R.jsx("div",{ref:i,className:Ve("p-6 pt-0",n),...l}));Wd.displayName="CardContent";const TS=P.forwardRef(({className:n,...l},i)=>R.jsx("div",{ref:i,className:Ve("flex items-center p-6 pt-0",n),...l}));TS.displayName="CardFooter";function AS(n,l=[]){let i=[];function o(s,c){const f=P.createContext(c);f.displayName=s+"Context";const h=i.length;i=[...i,c];const m=y=>{const{scope:v,children:b,...w}=y,E=v?.[n]?.[h]||f,T=P.useMemo(()=>w,Object.values(w));return R.jsx(E.Provider,{value:T,children:b})};m.displayName=s+"Provider";function g(y,v){const b=v?.[n]?.[h]||f,w=P.useContext(b);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${s}\``)}return[m,g]}const u=()=>{const s=i.map(c=>P.createContext(c));return function(f){const h=f?.[n]||s;return P.useMemo(()=>({[`__scope${n}`]:{...f,[n]:h}}),[f,h])}};return u.scopeName=n,[o,kS(u,...l)]}function kS(...n){const l=n[0];if(n.length===1)return l;const i=()=>{const o=n.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(s){const c=o.reduce((f,{useScope:h,scopeName:m})=>{const y=h(s)[`__scope${m}`];return{...f,...y}},{});return P.useMemo(()=>({[`__scope${l.scopeName}`]:c}),[c])}};return i.scopeName=l.scopeName,i}var NS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zs=NS.reduce((n,l)=>{const i=Pd(`Primitive.${l}`),o=P.forwardRef((u,s)=>{const{asChild:c,...f}=u,h=c?i:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),R.jsx(h,{...f,ref:s})});return o.displayName=`Primitive.${l}`,{...n,[l]:o}},{}),Ms={exports:{}},Ds={};var $d;function RS(){if($d)return Ds;$d=1;var n=Ol();function l(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}var i=typeof Object.is=="function"?Object.is:l,o=n.useState,u=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function f(y,v){var b=v(),w=o({inst:{value:b,getSnapshot:v}}),E=w[0].inst,T=w[1];return s(function(){E.value=b,E.getSnapshot=v,h(E)&&T({inst:E})},[y,b,v]),u(function(){return h(E)&&T({inst:E}),y(function(){h(E)&&T({inst:E})})},[y]),c(b),b}function h(y){var v=y.getSnapshot;y=y.value;try{var b=v();return!i(y,b)}catch{return!0}}function m(y,v){return v()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:f;return Ds.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:g,Ds}var eh;function OS(){return eh||(eh=1,Ms.exports=RS()),Ms.exports}var zS=OS();function MS(){return zS.useSyncExternalStore(DS,()=>!0,()=>!1)}function DS(){return()=>{}}var js="Avatar",[jS]=AS(js),[LS,th]=jS(js),nh=P.forwardRef((n,l)=>{const{__scopeAvatar:i,...o}=n,[u,s]=P.useState("idle");return R.jsx(LS,{scope:i,imageLoadingStatus:u,onImageLoadingStatusChange:s,children:R.jsx(zs.span,{...o,ref:l})})});nh.displayName=js;var rh="AvatarImage",ih=P.forwardRef((n,l)=>{const{__scopeAvatar:i,src:o,onLoadingStatusChange:u=()=>{},...s}=n,c=th(rh,i),f=IS(o,s),h=cr(m=>{u(m),c.onImageLoadingStatusChange(m)});return ur(()=>{f!=="idle"&&h(f)},[f,h]),f==="loaded"?R.jsx(zs.img,{...s,ref:l,src:o}):null});ih.displayName=rh;var ah="AvatarFallback",lh=P.forwardRef((n,l)=>{const{__scopeAvatar:i,delayMs:o,...u}=n,s=th(ah,i),[c,f]=P.useState(o===void 0);return P.useEffect(()=>{if(o!==void 0){const h=window.setTimeout(()=>f(!0),o);return()=>window.clearTimeout(h)}},[o]),c&&s.imageLoadingStatus!=="loaded"?R.jsx(zs.span,{...u,ref:l}):null});lh.displayName=ah;function oh(n,l){return n?l?(n.src!==l&&(n.src=l),n.complete&&n.naturalWidth>0?"loaded":"loading"):"error":"idle"}function IS(n,{referrerPolicy:l,crossOrigin:i}){const o=MS(),u=P.useRef(null),s=o?(u.current||(u.current=new window.Image),u.current):null,[c,f]=P.useState(()=>oh(s,n));return ur(()=>{f(oh(s,n))},[s,n]),ur(()=>{const h=y=>()=>{f(y)};if(!s)return;const m=h("loaded"),g=h("error");return s.addEventListener("load",m),s.addEventListener("error",g),l&&(s.referrerPolicy=l),typeof i=="string"&&(s.crossOrigin=i),()=>{s.removeEventListener("load",m),s.removeEventListener("error",g)}},[s,i,l]),c}var sh=nh,uh=ih,ch=lh;const ha=P.forwardRef(({className:n,...l},i)=>R.jsx(sh,{ref:i,className:Ve("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",n),...l}));ha.displayName=sh.displayName;const fh=P.forwardRef(({className:n,...l},i)=>R.jsx(uh,{ref:i,className:Ve("aspect-square h-full w-full",n),...l}));fh.displayName=uh.displayName;const ma=P.forwardRef(({className:n,...l},i)=>R.jsx(ch,{ref:i,className:Ve("flex h-full w-full items-center justify-center rounded-full bg-muted",n),...l}));ma.displayName=ch.displayName;var Hr={},pa={},Ls={},ga={},ya={},ba={},dh;function BS(){if(dh)return ba;dh=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.EventEmitter=void 0;let n=class{eventListeners=new Map;on(i,o){const u=this.eventListeners.get(i)||new Set;u.add(o),this.eventListeners.set(i,u)}off(i,o){const u=this.eventListeners.get(i);u&&(u.delete(o),u.size===0&&this.eventListeners.delete(i))}emit(i,...o){const u=this.eventListeners.get(i);u&&u.forEach(s=>s(...o))}};return ba.EventEmitter=n,ba}var qr={},hh;function Is(){return hh||(hh=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.DisconnectionReason=qr.ConnectionStatus=void 0,qr.ConnectionStatus={CONNECTING:"connecting",CONNECTED:"connected",NOT_CONNECTED:"not_connected"},qr.DisconnectionReason={CLIENT_CLOSED:"client_closed",SERVER_CLOSED:"server_closed",CONNECTION_ERROR:"connection_error",AUTHENTICATION_ERROR:"authentication_error",MAX_RECONNECT_ATTEMPTS:"max_reconnect_attempts",TIMEOUT:"timeout",NETWORK_ERROR:"network_error"}),qr}var mh;function ph(){if(mh)return ya;mh=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.BaseConnection=void 0;const n=BS(),l=Is();let i=class{status=l.ConnectionStatus.CONNECTING;queue=[];eventEmitter=new n.EventEmitter;disconnectionDetails=null;onErrorCallback=null;onDisconnectCallback=null;onMessageCallback=null;onOpenCallback=null;onStatusChangeCallback=null;getStatus(){return this.status}onOpen(u){this.onOpenCallback=u}onMessage(u){if(this.onMessageCallback=u,this.queue.length>0){const s=[...this.queue];this.queue.length=0,queueMicrotask(()=>{s.forEach(c=>{this.onMessageCallback?.(c)})})}}onDisconnect(u){this.onDisconnectCallback=u;const s=this.disconnectionDetails;s&&queueMicrotask(()=>{this.onDisconnectCallback?.(s)})}onError(u){this.onErrorCallback=u}on(u,s){this.eventEmitter.on(u,s)}off(u,s){this.eventEmitter.off(u,s)}emit(u,...s){this.eventEmitter.emit(u,...s)}onStatusChange(u){this.onStatusChangeCallback=u,queueMicrotask(()=>{u(this.status)})}disconnect(u){this.disconnectionDetails||(this.disconnectionDetails=u,this.updateStatus(l.ConnectionStatus.NOT_CONNECTED),this.onDisconnectCallback?.(u))}handleMessage(u){this.onMessageCallback?this.onMessageCallback(u):this.queue.push(u)}updateStatus(u){this.status!==u&&(this.status=u,this.onStatusChangeCallback?.(u))}};return ya.BaseConnection=i,ya}var Bs={},gh;function On(){return gh||(gh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ValidationError=n.ConfigurationError=n.StoreError=n.MessageError=n.SessionError=n.FileError=n.RecordingError=n.ConnectionError=n.InternalServerError=n.RateLimitError=n.MethodNotAllowedError=n.NotFoundError=n.PermissionDeniedError=n.UnauthorizedError=n.BadRequestError=n.APIConnectionTimeoutError=n.APIUserAbortError=n.APIError=n.SynapseError=n.SynapseErrorCode=void 0,n.normalizeError=B,n.SynapseErrorCode={API:"API_ERROR",CONNECTION:"CONNECTION_ERROR",RECORDING:"RECORDING_ERROR",FILE:"FILE_ERROR",SESSION:"SESSION_ERROR",MESSAGE:"MESSAGE_ERROR",STORE:"STORE_ERROR",CONFIGURATION:"CONFIGURATION_ERROR",VALIDATION:"VALIDATION_ERROR",AUTH:"AUTH_ERROR",UNKNOWN:"UNKNOWN_ERROR"};class l extends Error{code;timestamp;cause;context;hint;displayMessage;constructor(z,H=n.SynapseErrorCode.UNKNOWN,Y={}){super(z),this.name="SynapseError",this.code=H,this.timestamp=new Date,this.cause=Y.cause,this.context=Y.context,this.hint=Y.hint,this.displayMessage=Y.displayMessage||Y?.hint||z,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}n.SynapseError=l;class i extends l{status;error;headers;constructor(z,H,Y,F){const $=i.makeMessage(H,Y,z);super($,n.SynapseErrorCode.API,{cause:Y,context:{status:H,hasBody:!!Y},hint:H&&H>=500?"Retry the request or contact support if the issue persists.":void 0,displayMessage:z||"Something went wrong"}),this.name="APIError",this.status=H,this.error=Y,this.headers=F}static makeMessage(z,H,Y){const F=H instanceof Error?H.message:Y;return z&&F?`HTTP ${z}: ${F}`:z?`${z} status code (no body)`:F||"(no status code or body)"}static generate(z,H,Y,F){if(!z)return new o({message:Y});const $=H?.error,ae=$&&typeof $=="object"&&!Array.isArray($)?$:void 0;switch(z){case 400:return new s(Y||"Bad Request",z,ae,F);case 401:return new c(Y||"Unauthorized",z,ae,F);case 403:return new f(Y||"Permission Denied",z,ae,F);case 404:return new h(Y||"Not Found",z,ae,F);case 405:return new m(Y||"Method Not Allowed",z,ae,F);case 429:return new g(Y||"Rate Limit Exceeded",z,ae,F);case 500:return new y(Y||"Internal Server Error",z,ae,F);default:return new i(Y||"API Error",z,ae,F)}}}n.APIError=i;class o extends i{constructor({message:z}={}){super(z||"Request was aborted.",void 0,void 0,void 0),this.name="APIUserAbortError"}}n.APIUserAbortError=o;class u extends i{constructor({message:z}={}){super(z||"Request timed out.",void 0,void 0,void 0),this.name="APIConnectionTimeoutError"}}n.APIConnectionTimeoutError=u;class s extends i{constructor(z,H,Y,F){super(z,H,Y,F),this.name="BadRequestError"}}n.BadRequestError=s;class c extends i{constructor(z,H,Y,F){super(z,H,Y,F),this.name="UnauthorizedError"}}n.UnauthorizedError=c;class f extends i{constructor(z,H,Y,F){super(z,H,Y,F),this.name="PermissionDeniedError"}}n.PermissionDeniedError=f;class h extends i{constructor(z,H,Y,F){super(z,H,Y,F),this.name="NotFoundError"}}n.NotFoundError=h;class m extends i{constructor(z,H,Y,F){super(z,H,Y,F),this.name="MethodNotAllowedError"}}n.MethodNotAllowedError=m;class g extends i{constructor(z,H,Y,F){super(z,H,Y,F),this.name="RateLimitError"}}n.RateLimitError=g;class y extends i{constructor(z,H,Y,F){super(z,H,Y,F),this.name="InternalServerError"}}n.InternalServerError=y;class v extends l{constructor(z,H={}){super(z,n.SynapseErrorCode.CONNECTION,H),this.name="ConnectionError"}}n.ConnectionError=v;class b extends l{constructor(z,H={}){super(z,n.SynapseErrorCode.RECORDING,H),this.name="RecordingError"}}n.RecordingError=b;class w extends l{constructor(z,H={}){super(z,n.SynapseErrorCode.FILE,H),this.name="FileError"}}n.FileError=w;class E extends l{constructor(z,H={}){super(z,n.SynapseErrorCode.SESSION,H),this.name="SessionError"}}n.SessionError=E;class T extends l{constructor(z,H={}){super(z,n.SynapseErrorCode.MESSAGE,H),this.name="MessageError"}}n.MessageError=T;class _ extends l{constructor(z,H={}){super(z,n.SynapseErrorCode.STORE,H),this.name="StoreError"}}n.StoreError=_;class A extends l{constructor(z,H={}){super(z,n.SynapseErrorCode.CONFIGURATION,H),this.name="ConfigurationError"}}n.ConfigurationError=A;class j extends l{constructor(z,H={}){super(z,n.SynapseErrorCode.VALIDATION,H),this.name="ValidationError"}}n.ValidationError=j;function B(U,z,H,Y={}){if(U instanceof z)return U;const F={...Y,context:{...U instanceof l?U.context:void 0,...Y.context},hint:Y.hint??(U instanceof l?U.hint:void 0),cause:Y.cause??U};if(U instanceof l)return new z(U.message,F);const $=U instanceof Error&&U.message?U.message:H;return new z($,F)}})(Bs)),Bs}var yh;function bh(){if(yh)return ga;yh=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.WebSocketConnection=void 0;const n=ph(),l=Is(),i=On();class o extends n.BaseConnection{conversationId;socket=null;config;reconnectCount=0;constructor(s){super(),this.config={...s,reconnect:s.reconnect||!0,reconnectAttempts:s.reconnectAttempts||3,reconnectDelay:s.reconnectDelay||1e3},this.conversationId=s.auth.sessionId,this.connect()}connect(){try{this.updateStatus(l.ConnectionStatus.CONNECTING);const s=this.buildConnectionUrl();this.socket=new WebSocket(s),this.socket.onopen=this.handleOpen.bind(this),this.socket.onmessage=this.handleSocketMessage.bind(this),this.socket.onerror=this.handleError.bind(this),this.socket.onclose=this.handleClose.bind(this)}catch(s){const c=(0,i.normalizeError)(s,i.ConnectionError,"Failed to establish WebSocket connection",{context:{stage:"connect"}});this.onErrorCallback?.(c),this.disconnect({reason:l.DisconnectionReason.CONNECTION_ERROR,message:c.message,timestamp:new Date})}}buildConnectionUrl(){const s=new URL(this.config.serverUrl);return s.pathname=`/reloaded/ws/med-assist/session/${this.config.auth.sessionId}/`,s.toString()}handleOpen(){this.onOpenCallback?.()}handleSocketMessage(s){try{const c=JSON.parse(s.data);this.handleMessage(c)}catch(c){const f=(0,i.normalizeError)(c,i.MessageError,"Failed to parse incoming WebSocket message",{context:{stage:"handleSocketMessage"}});this.onErrorCallback?.(f)}}handleError(s){const c=new i.ConnectionError("WebSocket error",{context:{stage:"handleError"},cause:s});this.onErrorCallback?.(c)}handleClose(s){const c=s.wasClean,f=s.code,h=s.reason;let m,g;f===1e3?(m=l.DisconnectionReason.CLIENT_CLOSED,g="Connection closed normally"):f===1001||f===1006?(m=l.DisconnectionReason.NETWORK_ERROR,g="Network connection lost"):f===4001?(m=l.DisconnectionReason.AUTHENTICATION_ERROR,g="Authentication failed"):c?(m=l.DisconnectionReason.SERVER_CLOSED,g=h||"Server closed connection"):(m=l.DisconnectionReason.CONNECTION_ERROR,g=h||"Connection closed unexpectedly"),this.config.reconnect&&m!==l.DisconnectionReason.AUTHENTICATION_ERROR&&m!==l.DisconnectionReason.CLIENT_CLOSED&&this.reconnectCount<(this.config.reconnectAttempts||3)?(this.reconnectCount++,setTimeout(()=>{this.connect()},this.config.reconnectDelay||1e3)):this.disconnect({reason:m,message:g,code:f,timestamp:new Date})}sendMessage(s){if(!this.socket||this.socket.readyState!==WebSocket.OPEN)throw new i.ConnectionError("Cannot send message: connection not open",{context:{stage:"sendMessage",readyState:this.socket?.readyState},hint:"Ensure the WebSocket is open before sending messages."});try{this.socket.send(JSON.stringify(s))}catch(c){const f=(0,i.normalizeError)(c,i.ConnectionError,"Failed to send WebSocket message",{context:{stage:"sendMessage"}});throw this.onErrorCallback?.(f),f}}close(){this.socket&&(this.updateStatus(l.ConnectionStatus.NOT_CONNECTED),this.socket.close(1e3,"Client closed connection"),this.socket=null)}isConnected(){return this.socket?.readyState===WebSocket.OPEN}handleConnected(){this.updateStatus(l.ConnectionStatus.CONNECTED),this.reconnectCount=0}}return ga.WebSocketConnection=o,ga}var vh;function Sh(){return vh||(vh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ConnectionFactory=n.ConnectionType=void 0;const l=bh(),i=On();n.ConnectionType={SOCKET:"socket"};class o{static async createConnection(s,c){switch(s){case n.ConnectionType.SOCKET:return new l.WebSocketConnection(c);default:throw new i.ConnectionError(`Unsupported connection type: ${s}`,{context:{type:s}})}}}n.ConnectionFactory=o})(Ls)),Ls}var Pr={},Eh;function US(){if(Eh)return Pr;Eh=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.SYNAPSE_TOOL_NAME=Pr.getConfig=void 0;const n={WEBSOCKET_URL:"wss://matrix-ws.eka.care/reloaded",BASE_API_URL:"https://matrix.eka.care/reloaded"},l={WEBSOCKET_URL:"wss://matrix-ws.dev.eka.care/reloaded",BASE_API_URL:"https://matrix.dev.eka.care/reloaded"},i={WEBSOCKET_URL:"wss://matrix-ws.dev.eka.care",BASE_API_URL:"https://matrix.dev.eka.care"},o=(s="production")=>s==="development"?l:s==="production"?n:s==="staging"?i:n;Pr.getConfig=o;var u;return(function(s){s.MOBILE_VERIFICATION="mobile_verification",s.AVAILABILITY_DATES="availability_dates",s.AVAILABILITY_SLOTS="availability_slots",s.DOCTOR_DETAILS="doctor_details",s.GET_LOCATION="get_location"})(u||(Pr.SYNAPSE_TOOL_NAME=u={})),Pr}var va={},Sa={},xh;function _h(){if(xh)return Sa;xh=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.HttpClient=void 0;const n=On();let l=class{baseUrl;headers;timeout;maxRetries;constructor(o){this.baseUrl=o.baseUrl.replace(/\/$/,""),this.timeout=o.timeout||3e4,this.maxRetries=o.maxRetries||3,this.headers={"Content-Type":"application/json",...o.headers},o.authorization&&(this.headers.Authorization=o.authorization)}async request(o,u,s){const c=s?.retries??this.maxRetries;let f;for(let h=0;h<=c;h++)try{const m=this.buildUrl(u,s?.params),g=await fetch(m,{method:o,headers:{...this.headers,...s?.headers},body:s?.body?JSON.stringify(s.body):void 0,signal:AbortSignal.timeout(this.timeout)});return g.ok||await this.handleError(g),g.json()}catch(m){if(f=m,h===c||!(m instanceof TypeError&&m.message==="Failed to fetch"||m instanceof DOMException&&m.name==="AbortError"||m instanceof SyntaxError))break;const y=Math.pow(2,h)*100;await new Promise(v=>setTimeout(v,y))}throw f?f instanceof TypeError&&f.message==="Failed to fetch"?new n.APIError("Network error: Unable to connect to the server. Please check your internet connection.",0,{type:"NETWORK_ERROR",originalError:f.message}):f instanceof DOMException&&f.name==="AbortError"?new n.APIConnectionTimeoutError({message:`Request timed out after ${this.timeout}ms`}):f instanceof SyntaxError?new n.APIError("Invalid response format from server",502,{type:"PARSE_ERROR",originalError:f.message}):f instanceof n.APIError?f:new n.APIError(`Request failed: ${f.message||"Unknown error"}`,500,{type:"UNKNOWN_ERROR",originalError:f}):new n.APIError("Unknown error occurred",500,{type:"UNKNOWN_ERROR"})}async get(o,u,s){return this.request("GET",o,{params:u,...s})}async post(o,u,s){return this.request("POST",o,{body:u,...s})}async put(o,u,s){return this.request("PUT",o,{body:u,...s})}async delete(o,u){return this.request("DELETE",o,{...u})}async patch(o,u,s){return this.request("PATCH",o,{body:u,...s})}buildUrl(o,u){let s=`${this.baseUrl}${o}`;if(u){const c=new URLSearchParams(u).toString();s+=`?${c}`}return s}async handleError(o){let u,s;try{s=await o.json(),u=s.message||s?.msg||o.statusText}catch{u=o.statusText}throw n.APIError.generate(o.status,s,u,o.headers)}};return Sa.HttpClient=l,Sa}var Ea={},xa={},wh;function Ch(){if(wh)return xa;wh=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.BaseResource=void 0;let n=class{client;constructor(i){this.client=i}async get(i,o,u){return this.client.get(i,o,u)}async post(i,o,u){return this.client.post(i,o,u)}async put(i,o,u){return this.client.put(i,o,u)}async delete(i,o){return this.client.delete(i,o)}async patch(i,o,u){return this.client.patch(i,o,u)}buildPath(i,o){let u=i;for(const[s,c]of Object.entries(o))u=u.replace(`:${s}`,encodeURIComponent(c));return u}};return xa.BaseResource=n,xa}var Th;function Ah(){if(Th)return Ea;Th=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.Session=void 0;const n=Ch();let l=class extends n.BaseResource{basePath="/med-assist/session";async create(o){return this.post(this.basePath,{user_id:o})}async retrieve(o){return this.get(`${this.basePath}/${o}`)}async refresh(o,u){return this.get(`${this.basePath}/${o}/refresh`,void 0,{headers:{"x-sess-token":u}})}async feedback(o,u,s,c){return this.patch(`${this.basePath}/${o}/${u}`,{feedback:s,feedback_reason:c})}};return Ea.Session=l,Ea}var _a={},Fn={},kh;function Nh(){if(kh)return Fn;kh=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.SYNAPSE_TOOL_CALLBACK_NAME=Fn.SYNAPSE_COMPONENTS=Fn.SYNAPSE_TOOL_NAME=void 0;var n;(function(i){i.MOBILE_VERIFICATION="mobile_verification",i.AVAILABILITY_DATES="availability_dates",i.AVAILABILITY_SLOTS="availability_slots",i.DOCTOR_DETAILS="doctor_details",i.GET_LOCATION="get_location"})(n||(Fn.SYNAPSE_TOOL_NAME=n={})),Fn.SYNAPSE_COMPONENTS={MOBILE_VERIFICATION:"mobile_verification",PILL:"pills",MULTI:"multi",DOCTOR_CARD:"doctor_card"};var l;return(function(i){i.AVAILABILITY_DATES="tool_callback_availability_dates",i.AVAILABILITY_SLOTS="tool_callback_availability_slots",i.MOBILE_VERIFICATION="tool_callback_mobile_verification",i.DOCTOR_DETAILS="tool_callback_doctor_details"})(l||(Fn.SYNAPSE_TOOL_CALLBACK_NAME=l={})),Fn}var Rh;function Oh(){if(Rh)return _a;Rh=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.ToolCall=void 0;const n=Ch(),l=Nh();let i=class extends n.BaseResource{basePath="/med-assist/api-call-tool";async callTool(u,s,c){return s===l.SYNAPSE_TOOL_NAME.GET_LOCATION?this.requestLocation():this.post(`${this.basePath}?session_id=${u}&tool_name=${s}`,{tool_params:c})}async requestLocation(){return new Promise((u,s)=>{if(typeof navigator>"u"||!navigator.geolocation){s({code:500,message:"Geolocation is not supported by this browser",status:500,type:"GEOLOCATION_ERROR",originalError:new Error("Geolocation is not supported by this browser")});return}navigator.geolocation.getCurrentPosition(c=>{u({latitude:c.coords.latitude,longitude:c.coords.longitude,accuracy:c.coords?.accuracy??void 0})},c=>{s({code:c.code,message:c.message,status:500,type:"GEOLOCATION_ERROR",originalError:c})},{timeout:1e4,maximumAge:0,enableHighAccuracy:!0})})}};return _a.ToolCall=i,_a}var zh;function Mh(){if(zh)return va;zh=1,Object.defineProperty(va,"__esModule",{value:!0}),va.ResourceManager=void 0;const n=_h(),l=Ah(),i=On(),o=Oh();class u{resourceConfig;httpClient;session;toolCall=null;constructor(c){this.resourceConfig=c,this.httpClient=new n.HttpClient({baseUrl:this.resourceConfig.serverUrl,headers:{"X-agent-id":this.resourceConfig.agentId}}),this.session=new l.Session(this.httpClient)}async createSession(c){try{const f=await this.session.create(c);if(!f?.session_id||!f?.session_token)throw new i.APIError("Failed to start session.",500,void 0,void 0);return f}catch(f){throw f instanceof i.APIError?f:new i.APIError("Failed to start session.",500,void 0,void 0)}}async validateSession(c){try{const f=await this.session.retrieve(c);return f.msg&&f.msg==="Session Active"?{expired:!1,active:!0}:{expired:!0,active:!1}}catch(f){if(f instanceof i.APIError)switch(f.status){case 404:return{expired:!1,active:!1};case 500:return{expired:!1,active:!1};case 401:return{expired:!0,active:!1};default:return{expired:!1,active:!1}}throw new i.APIError("Failed to validate session.",500,void 0,void 0)}}async refreshSession(c,f){return await this.session.refresh(c,f)}async sendFeedback(c,f,h,m){return await this.session.feedback(c,f,h,m)}async callTool(c,f,h){return this.toolCall||(this.toolCall=new o.ToolCall(this.httpClient)),await this.toolCall.callTool(c,f,h)}}return va.ResourceManager=u,va}var wa={},Us={},Dh;function Hs(){return Dh||(Dh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.MULTI_SELECT_ADDITIONAL_OPTION=n.SOCKET_EVENTS=n.SOCKET_CONTENT_TYPES=void 0,n.IsValidSocketMesssage=l,n.SOCKET_CONTENT_TYPES={TEXT:"text",AUDIO:"audio",FILE:"file",TOOL_CALL:"tool",TIPS:"tips",INLINE_TEXT:"inline_text",TOOL_START:"tool_start",TOOL_END:"tool_end"},n.SOCKET_EVENTS={PING:"ping",PONG:"pong",CHAT:"chat",STREAM:"stream",AUTH:"auth",END_OF_STREAM:"eos",SYNC:"sync",ERROR:"err",CONNECTION_ESTABLISHED:"conn"},n.MULTI_SELECT_ADDITIONAL_OPTION={NOTA:"none_of_the_above",AOTA:"all_of_the_above"};function l(i){return[n.SOCKET_EVENTS.PING,n.SOCKET_EVENTS.PONG,n.SOCKET_EVENTS.ERROR,n.SOCKET_EVENTS.SYNC,n.SOCKET_EVENTS.CONNECTION_ESTABLISHED,n.SOCKET_EVENTS.CHAT,n.SOCKET_EVENTS.STREAM,n.SOCKET_EVENTS.END_OF_STREAM].includes(i.ev)}})(Us)),Us}var Fr={};function ql(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var qs={exports:{}};var jh;function HS(){return jh||(jh=1,(function(n,l){(function(i){n.exports=i()})(function(){return(function i(o,u,s){function c(m,g){if(!u[m]){if(!o[m]){var y=typeof ql=="function"&&ql;if(!g&&y)return y(m,!0);if(f)return f(m,!0);var v=new Error("Cannot find module '"+m+"'");throw v.code="MODULE_NOT_FOUND",v}var b=u[m]={exports:{}};o[m][0].call(b.exports,function(w){var E=o[m][1][w];return c(E||w)},b,b.exports,i,o,u,s)}return u[m].exports}for(var f=typeof ql=="function"&&ql,h=0;h<s.length;h++)c(s[h]);return c})({1:[function(i,o,u){var s=i("./utils"),c=i("./support"),f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";u.encode=function(h){for(var m,g,y,v,b,w,E,T=[],_=0,A=h.length,j=A,B=s.getTypeOf(h)!=="string";_<h.length;)j=A-_,y=B?(m=h[_++],g=_<A?h[_++]:0,_<A?h[_++]:0):(m=h.charCodeAt(_++),g=_<A?h.charCodeAt(_++):0,_<A?h.charCodeAt(_++):0),v=m>>2,b=(3&m)<<4|g>>4,w=1<j?(15&g)<<2|y>>6:64,E=2<j?63&y:64,T.push(f.charAt(v)+f.charAt(b)+f.charAt(w)+f.charAt(E));return T.join("")},u.decode=function(h){var m,g,y,v,b,w,E=0,T=0,_="data:";if(h.substr(0,_.length)===_)throw new Error("Invalid base64 input, it looks like a data url.");var A,j=3*(h=h.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(h.charAt(h.length-1)===f.charAt(64)&&j--,h.charAt(h.length-2)===f.charAt(64)&&j--,j%1!=0)throw new Error("Invalid base64 input, bad content length.");for(A=c.uint8array?new Uint8Array(0|j):new Array(0|j);E<h.length;)m=f.indexOf(h.charAt(E++))<<2|(v=f.indexOf(h.charAt(E++)))>>4,g=(15&v)<<4|(b=f.indexOf(h.charAt(E++)))>>2,y=(3&b)<<6|(w=f.indexOf(h.charAt(E++))),A[T++]=m,b!==64&&(A[T++]=g),w!==64&&(A[T++]=y);return A}},{"./support":30,"./utils":32}],2:[function(i,o,u){var s=i("./external"),c=i("./stream/DataWorker"),f=i("./stream/Crc32Probe"),h=i("./stream/DataLengthProbe");function m(g,y,v,b,w){this.compressedSize=g,this.uncompressedSize=y,this.crc32=v,this.compression=b,this.compressedContent=w}m.prototype={getContentWorker:function(){var g=new c(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new h("data_length")),y=this;return g.on("end",function(){if(this.streamInfo.data_length!==y.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),g},getCompressedWorker:function(){return new c(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},m.createWorkerFrom=function(g,y,v){return g.pipe(new f).pipe(new h("uncompressedSize")).pipe(y.compressWorker(v)).pipe(new h("compressedSize")).withStreamInfo("compression",y)},o.exports=m},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(i,o,u){var s=i("./stream/GenericWorker");u.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},u.DEFLATE=i("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(i,o,u){var s=i("./utils"),c=(function(){for(var f,h=[],m=0;m<256;m++){f=m;for(var g=0;g<8;g++)f=1&f?3988292384^f>>>1:f>>>1;h[m]=f}return h})();o.exports=function(f,h){return f!==void 0&&f.length?s.getTypeOf(f)!=="string"?(function(m,g,y,v){var b=c,w=v+y;m^=-1;for(var E=v;E<w;E++)m=m>>>8^b[255&(m^g[E])];return-1^m})(0|h,f,f.length,0):(function(m,g,y,v){var b=c,w=v+y;m^=-1;for(var E=v;E<w;E++)m=m>>>8^b[255&(m^g.charCodeAt(E))];return-1^m})(0|h,f,f.length,0):0}},{"./utils":32}],5:[function(i,o,u){u.base64=!1,u.binary=!1,u.dir=!1,u.createFolders=!0,u.date=null,u.compression=null,u.compressionOptions=null,u.comment=null,u.unixPermissions=null,u.dosPermissions=null},{}],6:[function(i,o,u){var s=null;s=typeof Promise<"u"?Promise:i("lie"),o.exports={Promise:s}},{lie:37}],7:[function(i,o,u){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",c=i("pako"),f=i("./utils"),h=i("./stream/GenericWorker"),m=s?"uint8array":"array";function g(y,v){h.call(this,"FlateWorker/"+y),this._pako=null,this._pakoAction=y,this._pakoOptions=v,this.meta={}}u.magic="\b\0",f.inherits(g,h),g.prototype.processChunk=function(y){this.meta=y.meta,this._pako===null&&this._createPako(),this._pako.push(f.transformTo(m,y.data),!1)},g.prototype.flush=function(){h.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},g.prototype.cleanUp=function(){h.prototype.cleanUp.call(this),this._pako=null},g.prototype._createPako=function(){this._pako=new c[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var y=this;this._pako.onData=function(v){y.push({data:v,meta:y.meta})}},u.compressWorker=function(y){return new g("Deflate",y)},u.uncompressWorker=function(){return new g("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(i,o,u){function s(b,w){var E,T="";for(E=0;E<w;E++)T+=String.fromCharCode(255&b),b>>>=8;return T}function c(b,w,E,T,_,A){var j,B,U=b.file,z=b.compression,H=A!==m.utf8encode,Y=f.transformTo("string",A(U.name)),F=f.transformTo("string",m.utf8encode(U.name)),$=U.comment,ae=f.transformTo("string",A($)),M=f.transformTo("string",m.utf8encode($)),ne=F.length!==U.name.length,C=M.length!==$.length,X="",Z="",K="",oe=U.dir,de=U.date,L={crc32:0,compressedSize:0,uncompressedSize:0};w&&!E||(L.crc32=b.crc32,L.compressedSize=b.compressedSize,L.uncompressedSize=b.uncompressedSize);var k=0;w&&(k|=8),H||!ne&&!C||(k|=2048);var q=0,N=0;oe&&(q|=16),_==="UNIX"?(N=798,q|=(function(ce,we){var Ae=ce;return ce||(Ae=we?16893:33204),(65535&Ae)<<16})(U.unixPermissions,oe)):(N=20,q|=(function(ce){return 63&(ce||0)})(U.dosPermissions)),j=de.getUTCHours(),j<<=6,j|=de.getUTCMinutes(),j<<=5,j|=de.getUTCSeconds()/2,B=de.getUTCFullYear()-1980,B<<=4,B|=de.getUTCMonth()+1,B<<=5,B|=de.getUTCDate(),ne&&(Z=s(1,1)+s(g(Y),4)+F,X+="up"+s(Z.length,2)+Z),C&&(K=s(1,1)+s(g(ae),4)+M,X+="uc"+s(K.length,2)+K);var re="";return re+=`
|
|
10
|
+
\0`,re+=s(k,2),re+=z.magic,re+=s(j,2),re+=s(B,2),re+=s(L.crc32,4),re+=s(L.compressedSize,4),re+=s(L.uncompressedSize,4),re+=s(Y.length,2),re+=s(X.length,2),{fileRecord:y.LOCAL_FILE_HEADER+re+Y+X,dirRecord:y.CENTRAL_FILE_HEADER+s(N,2)+re+s(ae.length,2)+"\0\0\0\0"+s(q,4)+s(T,4)+Y+X+ae}}var f=i("../utils"),h=i("../stream/GenericWorker"),m=i("../utf8"),g=i("../crc32"),y=i("../signature");function v(b,w,E,T){h.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=E,this.encodeFileName=T,this.streamFiles=b,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}f.inherits(v,h),v.prototype.push=function(b){var w=b.meta.percent||0,E=this.entriesCount,T=this._sources.length;this.accumulate?this.contentBuffer.push(b):(this.bytesWritten+=b.data.length,h.prototype.push.call(this,{data:b.data,meta:{currentFile:this.currentFile,percent:E?(w+100*(E-T-1))/E:100}}))},v.prototype.openedSource=function(b){this.currentSourceOffset=this.bytesWritten,this.currentFile=b.file.name;var w=this.streamFiles&&!b.file.dir;if(w){var E=c(b,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},v.prototype.closedSource=function(b){this.accumulate=!1;var w=this.streamFiles&&!b.file.dir,E=c(b,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),w)this.push({data:(function(T){return y.DATA_DESCRIPTOR+s(T.crc32,4)+s(T.compressedSize,4)+s(T.uncompressedSize,4)})(b),meta:{percent:100}});else for(this.push({data:E.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},v.prototype.flush=function(){for(var b=this.bytesWritten,w=0;w<this.dirRecords.length;w++)this.push({data:this.dirRecords[w],meta:{percent:100}});var E=this.bytesWritten-b,T=(function(_,A,j,B,U){var z=f.transformTo("string",U(B));return y.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(_,2)+s(_,2)+s(A,4)+s(j,4)+s(z.length,2)+z})(this.dirRecords.length,E,b,this.zipComment,this.encodeFileName);this.push({data:T,meta:{percent:100}})},v.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},v.prototype.registerPrevious=function(b){this._sources.push(b);var w=this;return b.on("data",function(E){w.processChunk(E)}),b.on("end",function(){w.closedSource(w.previous.streamInfo),w._sources.length?w.prepareNextSource():w.end()}),b.on("error",function(E){w.error(E)}),this},v.prototype.resume=function(){return!!h.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},v.prototype.error=function(b){var w=this._sources;if(!h.prototype.error.call(this,b))return!1;for(var E=0;E<w.length;E++)try{w[E].error(b)}catch{}return!0},v.prototype.lock=function(){h.prototype.lock.call(this);for(var b=this._sources,w=0;w<b.length;w++)b[w].lock()},o.exports=v},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(i,o,u){var s=i("../compressions"),c=i("./ZipFileWorker");u.generateWorker=function(f,h,m){var g=new c(h.streamFiles,m,h.platform,h.encodeFileName),y=0;try{f.forEach(function(v,b){y++;var w=(function(A,j){var B=A||j,U=s[B];if(!U)throw new Error(B+" is not a valid compression method !");return U})(b.options.compression,h.compression),E=b.options.compressionOptions||h.compressionOptions||{},T=b.dir,_=b.date;b._compressWorker(w,E).withStreamInfo("file",{name:v,dir:T,date:_,comment:b.comment||"",unixPermissions:b.unixPermissions,dosPermissions:b.dosPermissions}).pipe(g)}),g.entriesCount=y}catch(v){g.error(v)}return g}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(i,o,u){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var c=new s;for(var f in this)typeof this[f]!="function"&&(c[f]=this[f]);return c}}(s.prototype=i("./object")).loadAsync=i("./load"),s.support=i("./support"),s.defaults=i("./defaults"),s.version="3.10.1",s.loadAsync=function(c,f){return new s().loadAsync(c,f)},s.external=i("./external"),o.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(i,o,u){var s=i("./utils"),c=i("./external"),f=i("./utf8"),h=i("./zipEntries"),m=i("./stream/Crc32Probe"),g=i("./nodejsUtils");function y(v){return new c.Promise(function(b,w){var E=v.decompressed.getContentWorker().pipe(new m);E.on("error",function(T){w(T)}).on("end",function(){E.streamInfo.crc32!==v.decompressed.crc32?w(new Error("Corrupted zip : CRC32 mismatch")):b()}).resume()})}o.exports=function(v,b){var w=this;return b=s.extend(b||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:f.utf8decode}),g.isNode&&g.isStream(v)?c.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):s.prepareContent("the loaded zip file",v,!0,b.optimizedBinaryString,b.base64).then(function(E){var T=new h(b);return T.load(E),T}).then(function(E){var T=[c.Promise.resolve(E)],_=E.files;if(b.checkCRC32)for(var A=0;A<_.length;A++)T.push(y(_[A]));return c.Promise.all(T)}).then(function(E){for(var T=E.shift(),_=T.files,A=0;A<_.length;A++){var j=_[A],B=j.fileNameStr,U=s.resolve(j.fileNameStr);w.file(U,j.decompressed,{binary:!0,optimizedBinaryString:!0,date:j.date,dir:j.dir,comment:j.fileCommentStr.length?j.fileCommentStr:null,unixPermissions:j.unixPermissions,dosPermissions:j.dosPermissions,createFolders:b.createFolders}),j.dir||(w.file(U).unsafeOriginalName=B)}return T.zipComment.length&&(w.comment=T.zipComment),w})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(i,o,u){var s=i("../utils"),c=i("../stream/GenericWorker");function f(h,m){c.call(this,"Nodejs stream input adapter for "+h),this._upstreamEnded=!1,this._bindStream(m)}s.inherits(f,c),f.prototype._bindStream=function(h){var m=this;(this._stream=h).pause(),h.on("data",function(g){m.push({data:g,meta:{percent:0}})}).on("error",function(g){m.isPaused?this.generatedError=g:m.error(g)}).on("end",function(){m.isPaused?m._upstreamEnded=!0:m.end()})},f.prototype.pause=function(){return!!c.prototype.pause.call(this)&&(this._stream.pause(),!0)},f.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},o.exports=f},{"../stream/GenericWorker":28,"../utils":32}],13:[function(i,o,u){var s=i("readable-stream").Readable;function c(f,h,m){s.call(this,h),this._helper=f;var g=this;f.on("data",function(y,v){g.push(y)||g._helper.pause(),m&&m(v)}).on("error",function(y){g.emit("error",y)}).on("end",function(){g.push(null)})}i("../utils").inherits(c,s),c.prototype._read=function(){this._helper.resume()},o.exports=c},{"../utils":32,"readable-stream":16}],14:[function(i,o,u){o.exports={isNode:typeof Buffer<"u",newBufferFrom:function(s,c){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(s,c);if(typeof s=="number")throw new Error('The "data" argument must not be a number');return new Buffer(s,c)},allocBuffer:function(s){if(Buffer.alloc)return Buffer.alloc(s);var c=new Buffer(s);return c.fill(0),c},isBuffer:function(s){return Buffer.isBuffer(s)},isStream:function(s){return s&&typeof s.on=="function"&&typeof s.pause=="function"&&typeof s.resume=="function"}}},{}],15:[function(i,o,u){function s(U,z,H){var Y,F=f.getTypeOf(z),$=f.extend(H||{},g);$.date=$.date||new Date,$.compression!==null&&($.compression=$.compression.toUpperCase()),typeof $.unixPermissions=="string"&&($.unixPermissions=parseInt($.unixPermissions,8)),$.unixPermissions&&16384&$.unixPermissions&&($.dir=!0),$.dosPermissions&&16&$.dosPermissions&&($.dir=!0),$.dir&&(U=_(U)),$.createFolders&&(Y=T(U))&&A.call(this,Y,!0);var ae=F==="string"&&$.binary===!1&&$.base64===!1;H&&H.binary!==void 0||($.binary=!ae),(z instanceof y&&z.uncompressedSize===0||$.dir||!z||z.length===0)&&($.base64=!1,$.binary=!0,z="",$.compression="STORE",F="string");var M=null;M=z instanceof y||z instanceof h?z:w.isNode&&w.isStream(z)?new E(U,z):f.prepareContent(U,z,$.binary,$.optimizedBinaryString,$.base64);var ne=new v(U,M,$);this.files[U]=ne}var c=i("./utf8"),f=i("./utils"),h=i("./stream/GenericWorker"),m=i("./stream/StreamHelper"),g=i("./defaults"),y=i("./compressedObject"),v=i("./zipObject"),b=i("./generate"),w=i("./nodejsUtils"),E=i("./nodejs/NodejsStreamInputAdapter"),T=function(U){U.slice(-1)==="/"&&(U=U.substring(0,U.length-1));var z=U.lastIndexOf("/");return 0<z?U.substring(0,z):""},_=function(U){return U.slice(-1)!=="/"&&(U+="/"),U},A=function(U,z){return z=z!==void 0?z:g.createFolders,U=_(U),this.files[U]||s.call(this,U,null,{dir:!0,createFolders:z}),this.files[U]};function j(U){return Object.prototype.toString.call(U)==="[object RegExp]"}var B={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(U){var z,H,Y;for(z in this.files)Y=this.files[z],(H=z.slice(this.root.length,z.length))&&z.slice(0,this.root.length)===this.root&&U(H,Y)},filter:function(U){var z=[];return this.forEach(function(H,Y){U(H,Y)&&z.push(Y)}),z},file:function(U,z,H){if(arguments.length!==1)return U=this.root+U,s.call(this,U,z,H),this;if(j(U)){var Y=U;return this.filter(function($,ae){return!ae.dir&&Y.test($)})}var F=this.files[this.root+U];return F&&!F.dir?F:null},folder:function(U){if(!U)return this;if(j(U))return this.filter(function(F,$){return $.dir&&U.test(F)});var z=this.root+U,H=A.call(this,z),Y=this.clone();return Y.root=H.name,Y},remove:function(U){U=this.root+U;var z=this.files[U];if(z||(U.slice(-1)!=="/"&&(U+="/"),z=this.files[U]),z&&!z.dir)delete this.files[U];else for(var H=this.filter(function(F,$){return $.name.slice(0,U.length)===U}),Y=0;Y<H.length;Y++)delete this.files[H[Y].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(U){var z,H={};try{if((H=f.extend(U||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:c.utf8encode})).type=H.type.toLowerCase(),H.compression=H.compression.toUpperCase(),H.type==="binarystring"&&(H.type="string"),!H.type)throw new Error("No output type specified.");f.checkSupport(H.type),H.platform!=="darwin"&&H.platform!=="freebsd"&&H.platform!=="linux"&&H.platform!=="sunos"||(H.platform="UNIX"),H.platform==="win32"&&(H.platform="DOS");var Y=H.comment||this.comment||"";z=b.generateWorker(this,H,Y)}catch(F){(z=new h("error")).error(F)}return new m(z,H.type||"string",H.mimeType)},generateAsync:function(U,z){return this.generateInternalStream(U).accumulate(z)},generateNodeStream:function(U,z){return(U=U||{}).type||(U.type="nodebuffer"),this.generateInternalStream(U).toNodejsStream(z)}};o.exports=B},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(i,o,u){o.exports=i("stream")},{stream:void 0}],17:[function(i,o,u){var s=i("./DataReader");function c(f){s.call(this,f);for(var h=0;h<this.data.length;h++)f[h]=255&f[h]}i("../utils").inherits(c,s),c.prototype.byteAt=function(f){return this.data[this.zero+f]},c.prototype.lastIndexOfSignature=function(f){for(var h=f.charCodeAt(0),m=f.charCodeAt(1),g=f.charCodeAt(2),y=f.charCodeAt(3),v=this.length-4;0<=v;--v)if(this.data[v]===h&&this.data[v+1]===m&&this.data[v+2]===g&&this.data[v+3]===y)return v-this.zero;return-1},c.prototype.readAndCheckSignature=function(f){var h=f.charCodeAt(0),m=f.charCodeAt(1),g=f.charCodeAt(2),y=f.charCodeAt(3),v=this.readData(4);return h===v[0]&&m===v[1]&&g===v[2]&&y===v[3]},c.prototype.readData=function(f){if(this.checkOffset(f),f===0)return[];var h=this.data.slice(this.zero+this.index,this.zero+this.index+f);return this.index+=f,h},o.exports=c},{"../utils":32,"./DataReader":18}],18:[function(i,o,u){var s=i("../utils");function c(f){this.data=f,this.length=f.length,this.index=0,this.zero=0}c.prototype={checkOffset:function(f){this.checkIndex(this.index+f)},checkIndex:function(f){if(this.length<this.zero+f||f<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+f+"). Corrupted zip ?")},setIndex:function(f){this.checkIndex(f),this.index=f},skip:function(f){this.setIndex(this.index+f)},byteAt:function(){},readInt:function(f){var h,m=0;for(this.checkOffset(f),h=this.index+f-1;h>=this.index;h--)m=(m<<8)+this.byteAt(h);return this.index+=f,m},readString:function(f){return s.transformTo("string",this.readData(f))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var f=this.readInt(4);return new Date(Date.UTC(1980+(f>>25&127),(f>>21&15)-1,f>>16&31,f>>11&31,f>>5&63,(31&f)<<1))}},o.exports=c},{"../utils":32}],19:[function(i,o,u){var s=i("./Uint8ArrayReader");function c(f){s.call(this,f)}i("../utils").inherits(c,s),c.prototype.readData=function(f){this.checkOffset(f);var h=this.data.slice(this.zero+this.index,this.zero+this.index+f);return this.index+=f,h},o.exports=c},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(i,o,u){var s=i("./DataReader");function c(f){s.call(this,f)}i("../utils").inherits(c,s),c.prototype.byteAt=function(f){return this.data.charCodeAt(this.zero+f)},c.prototype.lastIndexOfSignature=function(f){return this.data.lastIndexOf(f)-this.zero},c.prototype.readAndCheckSignature=function(f){return f===this.readData(4)},c.prototype.readData=function(f){this.checkOffset(f);var h=this.data.slice(this.zero+this.index,this.zero+this.index+f);return this.index+=f,h},o.exports=c},{"../utils":32,"./DataReader":18}],21:[function(i,o,u){var s=i("./ArrayReader");function c(f){s.call(this,f)}i("../utils").inherits(c,s),c.prototype.readData=function(f){if(this.checkOffset(f),f===0)return new Uint8Array(0);var h=this.data.subarray(this.zero+this.index,this.zero+this.index+f);return this.index+=f,h},o.exports=c},{"../utils":32,"./ArrayReader":17}],22:[function(i,o,u){var s=i("../utils"),c=i("../support"),f=i("./ArrayReader"),h=i("./StringReader"),m=i("./NodeBufferReader"),g=i("./Uint8ArrayReader");o.exports=function(y){var v=s.getTypeOf(y);return s.checkSupport(v),v!=="string"||c.uint8array?v==="nodebuffer"?new m(y):c.uint8array?new g(s.transformTo("uint8array",y)):new f(s.transformTo("array",y)):new h(y)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(i,o,u){u.LOCAL_FILE_HEADER="PK",u.CENTRAL_FILE_HEADER="PK",u.CENTRAL_DIRECTORY_END="PK",u.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",u.ZIP64_CENTRAL_DIRECTORY_END="PK",u.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(i,o,u){var s=i("./GenericWorker"),c=i("../utils");function f(h){s.call(this,"ConvertWorker to "+h),this.destType=h}c.inherits(f,s),f.prototype.processChunk=function(h){this.push({data:c.transformTo(this.destType,h.data),meta:h.meta})},o.exports=f},{"../utils":32,"./GenericWorker":28}],25:[function(i,o,u){var s=i("./GenericWorker"),c=i("../crc32");function f(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}i("../utils").inherits(f,s),f.prototype.processChunk=function(h){this.streamInfo.crc32=c(h.data,this.streamInfo.crc32||0),this.push(h)},o.exports=f},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(i,o,u){var s=i("../utils"),c=i("./GenericWorker");function f(h){c.call(this,"DataLengthProbe for "+h),this.propName=h,this.withStreamInfo(h,0)}s.inherits(f,c),f.prototype.processChunk=function(h){if(h){var m=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=m+h.data.length}c.prototype.processChunk.call(this,h)},o.exports=f},{"../utils":32,"./GenericWorker":28}],27:[function(i,o,u){var s=i("../utils"),c=i("./GenericWorker");function f(h){c.call(this,"DataWorker");var m=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,h.then(function(g){m.dataIsReady=!0,m.data=g,m.max=g&&g.length||0,m.type=s.getTypeOf(g),m.isPaused||m._tickAndRepeat()},function(g){m.error(g)})}s.inherits(f,c),f.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this.data=null},f.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},f.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},f.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var h=null,m=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":h=this.data.substring(this.index,m);break;case"uint8array":h=this.data.subarray(this.index,m);break;case"array":case"nodebuffer":h=this.data.slice(this.index,m)}return this.index=m,this.push({data:h,meta:{percent:this.max?this.index/this.max*100:0}})},o.exports=f},{"../utils":32,"./GenericWorker":28}],28:[function(i,o,u){function s(c){this.name=c||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(c){this.emit("data",c)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(c){this.emit("error",c)}return!0},error:function(c){return!this.isFinished&&(this.isPaused?this.generatedError=c:(this.isFinished=!0,this.emit("error",c),this.previous&&this.previous.error(c),this.cleanUp()),!0)},on:function(c,f){return this._listeners[c].push(f),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(c,f){if(this._listeners[c])for(var h=0;h<this._listeners[c].length;h++)this._listeners[c][h].call(this,f)},pipe:function(c){return c.registerPrevious(this)},registerPrevious:function(c){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=c.streamInfo,this.mergeStreamInfo(),this.previous=c;var f=this;return c.on("data",function(h){f.processChunk(h)}),c.on("end",function(){f.end()}),c.on("error",function(h){f.error(h)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var c=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),c=!0),this.previous&&this.previous.resume(),!c},flush:function(){},processChunk:function(c){this.push(c)},withStreamInfo:function(c,f){return this.extraStreamInfo[c]=f,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var c in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,c)&&(this.streamInfo[c]=this.extraStreamInfo[c])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var c="Worker "+this.name;return this.previous?this.previous+" -> "+c:c}},o.exports=s},{}],29:[function(i,o,u){var s=i("../utils"),c=i("./ConvertWorker"),f=i("./GenericWorker"),h=i("../base64"),m=i("../support"),g=i("../external"),y=null;if(m.nodestream)try{y=i("../nodejs/NodejsStreamOutputAdapter")}catch{}function v(w,E){return new g.Promise(function(T,_){var A=[],j=w._internalType,B=w._outputType,U=w._mimeType;w.on("data",function(z,H){A.push(z),E&&E(H)}).on("error",function(z){A=[],_(z)}).on("end",function(){try{var z=(function(H,Y,F){switch(H){case"blob":return s.newBlob(s.transformTo("arraybuffer",Y),F);case"base64":return h.encode(Y);default:return s.transformTo(H,Y)}})(B,(function(H,Y){var F,$=0,ae=null,M=0;for(F=0;F<Y.length;F++)M+=Y[F].length;switch(H){case"string":return Y.join("");case"array":return Array.prototype.concat.apply([],Y);case"uint8array":for(ae=new Uint8Array(M),F=0;F<Y.length;F++)ae.set(Y[F],$),$+=Y[F].length;return ae;case"nodebuffer":return Buffer.concat(Y);default:throw new Error("concat : unsupported type '"+H+"'")}})(j,A),U);T(z)}catch(H){_(H)}A=[]}).resume()})}function b(w,E,T){var _=E;switch(E){case"blob":case"arraybuffer":_="uint8array";break;case"base64":_="string"}try{this._internalType=_,this._outputType=E,this._mimeType=T,s.checkSupport(_),this._worker=w.pipe(new c(_)),w.lock()}catch(A){this._worker=new f("error"),this._worker.error(A)}}b.prototype={accumulate:function(w){return v(this,w)},on:function(w,E){var T=this;return w==="data"?this._worker.on(w,function(_){E.call(T,_.data,_.meta)}):this._worker.on(w,function(){s.delay(E,arguments,T)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(w){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new y(this,{objectMode:this._outputType!=="nodebuffer"},w)}},o.exports=b},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(i,o,u){if(u.base64=!0,u.array=!0,u.string=!0,u.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",u.nodebuffer=typeof Buffer<"u",u.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")u.blob=!1;else{var s=new ArrayBuffer(0);try{u.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var c=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);c.append(s),u.blob=c.getBlob("application/zip").size===0}catch{u.blob=!1}}}try{u.nodestream=!!i("readable-stream").Readable}catch{u.nodestream=!1}},{"readable-stream":16}],31:[function(i,o,u){for(var s=i("./utils"),c=i("./support"),f=i("./nodejsUtils"),h=i("./stream/GenericWorker"),m=new Array(256),g=0;g<256;g++)m[g]=252<=g?6:248<=g?5:240<=g?4:224<=g?3:192<=g?2:1;m[254]=m[254]=1;function y(){h.call(this,"utf-8 decode"),this.leftOver=null}function v(){h.call(this,"utf-8 encode")}u.utf8encode=function(b){return c.nodebuffer?f.newBufferFrom(b,"utf-8"):(function(w){var E,T,_,A,j,B=w.length,U=0;for(A=0;A<B;A++)(64512&(T=w.charCodeAt(A)))==55296&&A+1<B&&(64512&(_=w.charCodeAt(A+1)))==56320&&(T=65536+(T-55296<<10)+(_-56320),A++),U+=T<128?1:T<2048?2:T<65536?3:4;for(E=c.uint8array?new Uint8Array(U):new Array(U),A=j=0;j<U;A++)(64512&(T=w.charCodeAt(A)))==55296&&A+1<B&&(64512&(_=w.charCodeAt(A+1)))==56320&&(T=65536+(T-55296<<10)+(_-56320),A++),T<128?E[j++]=T:(T<2048?E[j++]=192|T>>>6:(T<65536?E[j++]=224|T>>>12:(E[j++]=240|T>>>18,E[j++]=128|T>>>12&63),E[j++]=128|T>>>6&63),E[j++]=128|63&T);return E})(b)},u.utf8decode=function(b){return c.nodebuffer?s.transformTo("nodebuffer",b).toString("utf-8"):(function(w){var E,T,_,A,j=w.length,B=new Array(2*j);for(E=T=0;E<j;)if((_=w[E++])<128)B[T++]=_;else if(4<(A=m[_]))B[T++]=65533,E+=A-1;else{for(_&=A===2?31:A===3?15:7;1<A&&E<j;)_=_<<6|63&w[E++],A--;1<A?B[T++]=65533:_<65536?B[T++]=_:(_-=65536,B[T++]=55296|_>>10&1023,B[T++]=56320|1023&_)}return B.length!==T&&(B.subarray?B=B.subarray(0,T):B.length=T),s.applyFromCharCode(B)})(b=s.transformTo(c.uint8array?"uint8array":"array",b))},s.inherits(y,h),y.prototype.processChunk=function(b){var w=s.transformTo(c.uint8array?"uint8array":"array",b.data);if(this.leftOver&&this.leftOver.length){if(c.uint8array){var E=w;(w=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),w.set(E,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var T=(function(A,j){var B;for((j=j||A.length)>A.length&&(j=A.length),B=j-1;0<=B&&(192&A[B])==128;)B--;return B<0||B===0?j:B+m[A[B]]>j?B:j})(w),_=w;T!==w.length&&(c.uint8array?(_=w.subarray(0,T),this.leftOver=w.subarray(T,w.length)):(_=w.slice(0,T),this.leftOver=w.slice(T,w.length))),this.push({data:u.utf8decode(_),meta:b.meta})},y.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:u.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},u.Utf8DecodeWorker=y,s.inherits(v,h),v.prototype.processChunk=function(b){this.push({data:u.utf8encode(b.data),meta:b.meta})},u.Utf8EncodeWorker=v},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(i,o,u){var s=i("./support"),c=i("./base64"),f=i("./nodejsUtils"),h=i("./external");function m(E){return E}function g(E,T){for(var _=0;_<E.length;++_)T[_]=255&E.charCodeAt(_);return T}i("setimmediate"),u.newBlob=function(E,T){u.checkSupport("blob");try{return new Blob([E],{type:T})}catch{try{var _=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return _.append(E),_.getBlob(T)}catch{throw new Error("Bug : can't construct the Blob.")}}};var y={stringifyByChunk:function(E,T,_){var A=[],j=0,B=E.length;if(B<=_)return String.fromCharCode.apply(null,E);for(;j<B;)T==="array"||T==="nodebuffer"?A.push(String.fromCharCode.apply(null,E.slice(j,Math.min(j+_,B)))):A.push(String.fromCharCode.apply(null,E.subarray(j,Math.min(j+_,B)))),j+=_;return A.join("")},stringifyByChar:function(E){for(var T="",_=0;_<E.length;_++)T+=String.fromCharCode(E[_]);return T},applyCanBeUsed:{uint8array:(function(){try{return s.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return s.nodebuffer&&String.fromCharCode.apply(null,f.allocBuffer(1)).length===1}catch{return!1}})()}};function v(E){var T=65536,_=u.getTypeOf(E),A=!0;if(_==="uint8array"?A=y.applyCanBeUsed.uint8array:_==="nodebuffer"&&(A=y.applyCanBeUsed.nodebuffer),A)for(;1<T;)try{return y.stringifyByChunk(E,_,T)}catch{T=Math.floor(T/2)}return y.stringifyByChar(E)}function b(E,T){for(var _=0;_<E.length;_++)T[_]=E[_];return T}u.applyFromCharCode=v;var w={};w.string={string:m,array:function(E){return g(E,new Array(E.length))},arraybuffer:function(E){return w.string.uint8array(E).buffer},uint8array:function(E){return g(E,new Uint8Array(E.length))},nodebuffer:function(E){return g(E,f.allocBuffer(E.length))}},w.array={string:v,array:m,arraybuffer:function(E){return new Uint8Array(E).buffer},uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return f.newBufferFrom(E)}},w.arraybuffer={string:function(E){return v(new Uint8Array(E))},array:function(E){return b(new Uint8Array(E),new Array(E.byteLength))},arraybuffer:m,uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return f.newBufferFrom(new Uint8Array(E))}},w.uint8array={string:v,array:function(E){return b(E,new Array(E.length))},arraybuffer:function(E){return E.buffer},uint8array:m,nodebuffer:function(E){return f.newBufferFrom(E)}},w.nodebuffer={string:v,array:function(E){return b(E,new Array(E.length))},arraybuffer:function(E){return w.nodebuffer.uint8array(E).buffer},uint8array:function(E){return b(E,new Uint8Array(E.length))},nodebuffer:m},u.transformTo=function(E,T){if(T=T||"",!E)return T;u.checkSupport(E);var _=u.getTypeOf(T);return w[_][E](T)},u.resolve=function(E){for(var T=E.split("/"),_=[],A=0;A<T.length;A++){var j=T[A];j==="."||j===""&&A!==0&&A!==T.length-1||(j===".."?_.pop():_.push(j))}return _.join("/")},u.getTypeOf=function(E){return typeof E=="string"?"string":Object.prototype.toString.call(E)==="[object Array]"?"array":s.nodebuffer&&f.isBuffer(E)?"nodebuffer":s.uint8array&&E instanceof Uint8Array?"uint8array":s.arraybuffer&&E instanceof ArrayBuffer?"arraybuffer":void 0},u.checkSupport=function(E){if(!s[E.toLowerCase()])throw new Error(E+" is not supported by this platform")},u.MAX_VALUE_16BITS=65535,u.MAX_VALUE_32BITS=-1,u.pretty=function(E){var T,_,A="";for(_=0;_<(E||"").length;_++)A+="\\x"+((T=E.charCodeAt(_))<16?"0":"")+T.toString(16).toUpperCase();return A},u.delay=function(E,T,_){setImmediate(function(){E.apply(_||null,T||[])})},u.inherits=function(E,T){function _(){}_.prototype=T.prototype,E.prototype=new _},u.extend=function(){var E,T,_={};for(E=0;E<arguments.length;E++)for(T in arguments[E])Object.prototype.hasOwnProperty.call(arguments[E],T)&&_[T]===void 0&&(_[T]=arguments[E][T]);return _},u.prepareContent=function(E,T,_,A,j){return h.Promise.resolve(T).then(function(B){return s.blob&&(B instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(B))!==-1)&&typeof FileReader<"u"?new h.Promise(function(U,z){var H=new FileReader;H.onload=function(Y){U(Y.target.result)},H.onerror=function(Y){z(Y.target.error)},H.readAsArrayBuffer(B)}):B}).then(function(B){var U=u.getTypeOf(B);return U?(U==="arraybuffer"?B=u.transformTo("uint8array",B):U==="string"&&(j?B=c.decode(B):_&&A!==!0&&(B=(function(z){return g(z,s.uint8array?new Uint8Array(z.length):new Array(z.length))})(B))),B):h.Promise.reject(new Error("Can't read the data of '"+E+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(i,o,u){var s=i("./reader/readerFor"),c=i("./utils"),f=i("./signature"),h=i("./zipEntry"),m=i("./support");function g(y){this.files=[],this.loadOptions=y}g.prototype={checkSignature:function(y){if(!this.reader.readAndCheckSignature(y)){this.reader.index-=4;var v=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+c.pretty(v)+", expected "+c.pretty(y)+")")}},isSignature:function(y,v){var b=this.reader.index;this.reader.setIndex(y);var w=this.reader.readString(4)===v;return this.reader.setIndex(b),w},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var y=this.reader.readData(this.zipCommentLength),v=m.uint8array?"uint8array":"array",b=c.transformTo(v,y);this.zipComment=this.loadOptions.decodeFileName(b)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var y,v,b,w=this.zip64EndOfCentralSize-44;0<w;)y=this.reader.readInt(2),v=this.reader.readInt(4),b=this.reader.readData(v),this.zip64ExtensibleData[y]={id:y,length:v,value:b}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var y,v;for(y=0;y<this.files.length;y++)v=this.files[y],this.reader.setIndex(v.localHeaderOffset),this.checkSignature(f.LOCAL_FILE_HEADER),v.readLocalPart(this.reader),v.handleUTF8(),v.processAttributes()},readCentralDir:function(){var y;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(f.CENTRAL_FILE_HEADER);)(y=new h({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(y);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var y=this.reader.lastIndexOfSignature(f.CENTRAL_DIRECTORY_END);if(y<0)throw this.isSignature(0,f.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(y);var v=y;if(this.checkSignature(f.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===c.MAX_VALUE_16BITS||this.diskWithCentralDirStart===c.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===c.MAX_VALUE_16BITS||this.centralDirRecords===c.MAX_VALUE_16BITS||this.centralDirSize===c.MAX_VALUE_32BITS||this.centralDirOffset===c.MAX_VALUE_32BITS){if(this.zip64=!0,(y=this.reader.lastIndexOfSignature(f.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(y),this.checkSignature(f.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,f.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(f.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(f.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var b=this.centralDirOffset+this.centralDirSize;this.zip64&&(b+=20,b+=12+this.zip64EndOfCentralSize);var w=v-b;if(0<w)this.isSignature(v,f.CENTRAL_FILE_HEADER)||(this.reader.zero=w);else if(w<0)throw new Error("Corrupted zip: missing "+Math.abs(w)+" bytes.")},prepareReader:function(y){this.reader=s(y)},load:function(y){this.prepareReader(y),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},o.exports=g},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(i,o,u){var s=i("./reader/readerFor"),c=i("./utils"),f=i("./compressedObject"),h=i("./crc32"),m=i("./utf8"),g=i("./compressions"),y=i("./support");function v(b,w){this.options=b,this.loadOptions=w}v.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(b){var w,E;if(b.skip(22),this.fileNameLength=b.readInt(2),E=b.readInt(2),this.fileName=b.readData(this.fileNameLength),b.skip(E),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((w=(function(T){for(var _ in g)if(Object.prototype.hasOwnProperty.call(g,_)&&g[_].magic===T)return g[_];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+c.pretty(this.compressionMethod)+" unknown (inner file : "+c.transformTo("string",this.fileName)+")");this.decompressed=new f(this.compressedSize,this.uncompressedSize,this.crc32,w,b.readData(this.compressedSize))},readCentralPart:function(b){this.versionMadeBy=b.readInt(2),b.skip(2),this.bitFlag=b.readInt(2),this.compressionMethod=b.readString(2),this.date=b.readDate(),this.crc32=b.readInt(4),this.compressedSize=b.readInt(4),this.uncompressedSize=b.readInt(4);var w=b.readInt(2);if(this.extraFieldsLength=b.readInt(2),this.fileCommentLength=b.readInt(2),this.diskNumberStart=b.readInt(2),this.internalFileAttributes=b.readInt(2),this.externalFileAttributes=b.readInt(4),this.localHeaderOffset=b.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");b.skip(w),this.readExtraFields(b),this.parseZIP64ExtraField(b),this.fileComment=b.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var b=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),b==0&&(this.dosPermissions=63&this.externalFileAttributes),b==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var b=s(this.extraFields[1].value);this.uncompressedSize===c.MAX_VALUE_32BITS&&(this.uncompressedSize=b.readInt(8)),this.compressedSize===c.MAX_VALUE_32BITS&&(this.compressedSize=b.readInt(8)),this.localHeaderOffset===c.MAX_VALUE_32BITS&&(this.localHeaderOffset=b.readInt(8)),this.diskNumberStart===c.MAX_VALUE_32BITS&&(this.diskNumberStart=b.readInt(4))}},readExtraFields:function(b){var w,E,T,_=b.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});b.index+4<_;)w=b.readInt(2),E=b.readInt(2),T=b.readData(E),this.extraFields[w]={id:w,length:E,value:T};b.setIndex(_)},handleUTF8:function(){var b=y.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=m.utf8decode(this.fileName),this.fileCommentStr=m.utf8decode(this.fileComment);else{var w=this.findExtraFieldUnicodePath();if(w!==null)this.fileNameStr=w;else{var E=c.transformTo(b,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(E)}var T=this.findExtraFieldUnicodeComment();if(T!==null)this.fileCommentStr=T;else{var _=c.transformTo(b,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(_)}}},findExtraFieldUnicodePath:function(){var b=this.extraFields[28789];if(b){var w=s(b.value);return w.readInt(1)!==1||h(this.fileName)!==w.readInt(4)?null:m.utf8decode(w.readData(b.length-5))}return null},findExtraFieldUnicodeComment:function(){var b=this.extraFields[25461];if(b){var w=s(b.value);return w.readInt(1)!==1||h(this.fileComment)!==w.readInt(4)?null:m.utf8decode(w.readData(b.length-5))}return null}},o.exports=v},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(i,o,u){function s(w,E,T){this.name=w,this.dir=T.dir,this.date=T.date,this.comment=T.comment,this.unixPermissions=T.unixPermissions,this.dosPermissions=T.dosPermissions,this._data=E,this._dataBinary=T.binary,this.options={compression:T.compression,compressionOptions:T.compressionOptions}}var c=i("./stream/StreamHelper"),f=i("./stream/DataWorker"),h=i("./utf8"),m=i("./compressedObject"),g=i("./stream/GenericWorker");s.prototype={internalStream:function(w){var E=null,T="string";try{if(!w)throw new Error("No output type specified.");var _=(T=w.toLowerCase())==="string"||T==="text";T!=="binarystring"&&T!=="text"||(T="string"),E=this._decompressWorker();var A=!this._dataBinary;A&&!_&&(E=E.pipe(new h.Utf8EncodeWorker)),!A&&_&&(E=E.pipe(new h.Utf8DecodeWorker))}catch(j){(E=new g("error")).error(j)}return new c(E,T,"")},async:function(w,E){return this.internalStream(w).accumulate(E)},nodeStream:function(w,E){return this.internalStream(w||"nodebuffer").toNodejsStream(E)},_compressWorker:function(w,E){if(this._data instanceof m&&this._data.compression.magic===w.magic)return this._data.getCompressedWorker();var T=this._decompressWorker();return this._dataBinary||(T=T.pipe(new h.Utf8EncodeWorker)),m.createWorkerFrom(T,w,E)},_decompressWorker:function(){return this._data instanceof m?this._data.getContentWorker():this._data instanceof g?this._data:new f(this._data)}};for(var y=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],v=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},b=0;b<y.length;b++)s.prototype[y[b]]=v;o.exports=s},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(i,o,u){(function(s){var c,f,h=s.MutationObserver||s.WebKitMutationObserver;if(h){var m=0,g=new h(w),y=s.document.createTextNode("");g.observe(y,{characterData:!0}),c=function(){y.data=m=++m%2}}else if(s.setImmediate||s.MessageChannel===void 0)c="document"in s&&"onreadystatechange"in s.document.createElement("script")?function(){var E=s.document.createElement("script");E.onreadystatechange=function(){w(),E.onreadystatechange=null,E.parentNode.removeChild(E),E=null},s.document.documentElement.appendChild(E)}:function(){setTimeout(w,0)};else{var v=new s.MessageChannel;v.port1.onmessage=w,c=function(){v.port2.postMessage(0)}}var b=[];function w(){var E,T;f=!0;for(var _=b.length;_;){for(T=b,b=[],E=-1;++E<_;)T[E]();_=b.length}f=!1}o.exports=function(E){b.push(E)!==1||f||c()}}).call(this,typeof Rl<"u"?Rl:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(i,o,u){var s=i("immediate");function c(){}var f={},h=["REJECTED"],m=["FULFILLED"],g=["PENDING"];function y(_){if(typeof _!="function")throw new TypeError("resolver must be a function");this.state=g,this.queue=[],this.outcome=void 0,_!==c&&E(this,_)}function v(_,A,j){this.promise=_,typeof A=="function"&&(this.onFulfilled=A,this.callFulfilled=this.otherCallFulfilled),typeof j=="function"&&(this.onRejected=j,this.callRejected=this.otherCallRejected)}function b(_,A,j){s(function(){var B;try{B=A(j)}catch(U){return f.reject(_,U)}B===_?f.reject(_,new TypeError("Cannot resolve promise with itself")):f.resolve(_,B)})}function w(_){var A=_&&_.then;if(_&&(typeof _=="object"||typeof _=="function")&&typeof A=="function")return function(){A.apply(_,arguments)}}function E(_,A){var j=!1;function B(H){j||(j=!0,f.reject(_,H))}function U(H){j||(j=!0,f.resolve(_,H))}var z=T(function(){A(U,B)});z.status==="error"&&B(z.value)}function T(_,A){var j={};try{j.value=_(A),j.status="success"}catch(B){j.status="error",j.value=B}return j}(o.exports=y).prototype.finally=function(_){if(typeof _!="function")return this;var A=this.constructor;return this.then(function(j){return A.resolve(_()).then(function(){return j})},function(j){return A.resolve(_()).then(function(){throw j})})},y.prototype.catch=function(_){return this.then(null,_)},y.prototype.then=function(_,A){if(typeof _!="function"&&this.state===m||typeof A!="function"&&this.state===h)return this;var j=new this.constructor(c);return this.state!==g?b(j,this.state===m?_:A,this.outcome):this.queue.push(new v(j,_,A)),j},v.prototype.callFulfilled=function(_){f.resolve(this.promise,_)},v.prototype.otherCallFulfilled=function(_){b(this.promise,this.onFulfilled,_)},v.prototype.callRejected=function(_){f.reject(this.promise,_)},v.prototype.otherCallRejected=function(_){b(this.promise,this.onRejected,_)},f.resolve=function(_,A){var j=T(w,A);if(j.status==="error")return f.reject(_,j.value);var B=j.value;if(B)E(_,B);else{_.state=m,_.outcome=A;for(var U=-1,z=_.queue.length;++U<z;)_.queue[U].callFulfilled(A)}return _},f.reject=function(_,A){_.state=h,_.outcome=A;for(var j=-1,B=_.queue.length;++j<B;)_.queue[j].callRejected(A);return _},y.resolve=function(_){return _ instanceof this?_:f.resolve(new this(c),_)},y.reject=function(_){var A=new this(c);return f.reject(A,_)},y.all=function(_){var A=this;if(Object.prototype.toString.call(_)!=="[object Array]")return this.reject(new TypeError("must be an array"));var j=_.length,B=!1;if(!j)return this.resolve([]);for(var U=new Array(j),z=0,H=-1,Y=new this(c);++H<j;)F(_[H],H);return Y;function F($,ae){A.resolve($).then(function(M){U[ae]=M,++z!==j||B||(B=!0,f.resolve(Y,U))},function(M){B||(B=!0,f.reject(Y,M))})}},y.race=function(_){var A=this;if(Object.prototype.toString.call(_)!=="[object Array]")return this.reject(new TypeError("must be an array"));var j=_.length,B=!1;if(!j)return this.resolve([]);for(var U=-1,z=new this(c);++U<j;)H=_[U],A.resolve(H).then(function(Y){B||(B=!0,f.resolve(z,Y))},function(Y){B||(B=!0,f.reject(z,Y))});var H;return z}},{immediate:36}],38:[function(i,o,u){var s={};(0,i("./lib/utils/common").assign)(s,i("./lib/deflate"),i("./lib/inflate"),i("./lib/zlib/constants")),o.exports=s},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(i,o,u){var s=i("./zlib/deflate"),c=i("./utils/common"),f=i("./utils/strings"),h=i("./zlib/messages"),m=i("./zlib/zstream"),g=Object.prototype.toString,y=0,v=-1,b=0,w=8;function E(_){if(!(this instanceof E))return new E(_);this.options=c.assign({level:v,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:b,to:""},_||{});var A=this.options;A.raw&&0<A.windowBits?A.windowBits=-A.windowBits:A.gzip&&0<A.windowBits&&A.windowBits<16&&(A.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m,this.strm.avail_out=0;var j=s.deflateInit2(this.strm,A.level,A.method,A.windowBits,A.memLevel,A.strategy);if(j!==y)throw new Error(h[j]);if(A.header&&s.deflateSetHeader(this.strm,A.header),A.dictionary){var B;if(B=typeof A.dictionary=="string"?f.string2buf(A.dictionary):g.call(A.dictionary)==="[object ArrayBuffer]"?new Uint8Array(A.dictionary):A.dictionary,(j=s.deflateSetDictionary(this.strm,B))!==y)throw new Error(h[j]);this._dict_set=!0}}function T(_,A){var j=new E(A);if(j.push(_,!0),j.err)throw j.msg||h[j.err];return j.result}E.prototype.push=function(_,A){var j,B,U=this.strm,z=this.options.chunkSize;if(this.ended)return!1;B=A===~~A?A:A===!0?4:0,typeof _=="string"?U.input=f.string2buf(_):g.call(_)==="[object ArrayBuffer]"?U.input=new Uint8Array(_):U.input=_,U.next_in=0,U.avail_in=U.input.length;do{if(U.avail_out===0&&(U.output=new c.Buf8(z),U.next_out=0,U.avail_out=z),(j=s.deflate(U,B))!==1&&j!==y)return this.onEnd(j),!(this.ended=!0);U.avail_out!==0&&(U.avail_in!==0||B!==4&&B!==2)||(this.options.to==="string"?this.onData(f.buf2binstring(c.shrinkBuf(U.output,U.next_out))):this.onData(c.shrinkBuf(U.output,U.next_out)))}while((0<U.avail_in||U.avail_out===0)&&j!==1);return B===4?(j=s.deflateEnd(this.strm),this.onEnd(j),this.ended=!0,j===y):B!==2||(this.onEnd(y),!(U.avail_out=0))},E.prototype.onData=function(_){this.chunks.push(_)},E.prototype.onEnd=function(_){_===y&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=_,this.msg=this.strm.msg},u.Deflate=E,u.deflate=T,u.deflateRaw=function(_,A){return(A=A||{}).raw=!0,T(_,A)},u.gzip=function(_,A){return(A=A||{}).gzip=!0,T(_,A)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(i,o,u){var s=i("./zlib/inflate"),c=i("./utils/common"),f=i("./utils/strings"),h=i("./zlib/constants"),m=i("./zlib/messages"),g=i("./zlib/zstream"),y=i("./zlib/gzheader"),v=Object.prototype.toString;function b(E){if(!(this instanceof b))return new b(E);this.options=c.assign({chunkSize:16384,windowBits:0,to:""},E||{});var T=this.options;T.raw&&0<=T.windowBits&&T.windowBits<16&&(T.windowBits=-T.windowBits,T.windowBits===0&&(T.windowBits=-15)),!(0<=T.windowBits&&T.windowBits<16)||E&&E.windowBits||(T.windowBits+=32),15<T.windowBits&&T.windowBits<48&&(15&T.windowBits)==0&&(T.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new g,this.strm.avail_out=0;var _=s.inflateInit2(this.strm,T.windowBits);if(_!==h.Z_OK)throw new Error(m[_]);this.header=new y,s.inflateGetHeader(this.strm,this.header)}function w(E,T){var _=new b(T);if(_.push(E,!0),_.err)throw _.msg||m[_.err];return _.result}b.prototype.push=function(E,T){var _,A,j,B,U,z,H=this.strm,Y=this.options.chunkSize,F=this.options.dictionary,$=!1;if(this.ended)return!1;A=T===~~T?T:T===!0?h.Z_FINISH:h.Z_NO_FLUSH,typeof E=="string"?H.input=f.binstring2buf(E):v.call(E)==="[object ArrayBuffer]"?H.input=new Uint8Array(E):H.input=E,H.next_in=0,H.avail_in=H.input.length;do{if(H.avail_out===0&&(H.output=new c.Buf8(Y),H.next_out=0,H.avail_out=Y),(_=s.inflate(H,h.Z_NO_FLUSH))===h.Z_NEED_DICT&&F&&(z=typeof F=="string"?f.string2buf(F):v.call(F)==="[object ArrayBuffer]"?new Uint8Array(F):F,_=s.inflateSetDictionary(this.strm,z)),_===h.Z_BUF_ERROR&&$===!0&&(_=h.Z_OK,$=!1),_!==h.Z_STREAM_END&&_!==h.Z_OK)return this.onEnd(_),!(this.ended=!0);H.next_out&&(H.avail_out!==0&&_!==h.Z_STREAM_END&&(H.avail_in!==0||A!==h.Z_FINISH&&A!==h.Z_SYNC_FLUSH)||(this.options.to==="string"?(j=f.utf8border(H.output,H.next_out),B=H.next_out-j,U=f.buf2string(H.output,j),H.next_out=B,H.avail_out=Y-B,B&&c.arraySet(H.output,H.output,j,B,0),this.onData(U)):this.onData(c.shrinkBuf(H.output,H.next_out)))),H.avail_in===0&&H.avail_out===0&&($=!0)}while((0<H.avail_in||H.avail_out===0)&&_!==h.Z_STREAM_END);return _===h.Z_STREAM_END&&(A=h.Z_FINISH),A===h.Z_FINISH?(_=s.inflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===h.Z_OK):A!==h.Z_SYNC_FLUSH||(this.onEnd(h.Z_OK),!(H.avail_out=0))},b.prototype.onData=function(E){this.chunks.push(E)},b.prototype.onEnd=function(E){E===h.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=E,this.msg=this.strm.msg},u.Inflate=b,u.inflate=w,u.inflateRaw=function(E,T){return(T=T||{}).raw=!0,w(E,T)},u.ungzip=w},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(i,o,u){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";u.assign=function(h){for(var m=Array.prototype.slice.call(arguments,1);m.length;){var g=m.shift();if(g){if(typeof g!="object")throw new TypeError(g+"must be non-object");for(var y in g)g.hasOwnProperty(y)&&(h[y]=g[y])}}return h},u.shrinkBuf=function(h,m){return h.length===m?h:h.subarray?h.subarray(0,m):(h.length=m,h)};var c={arraySet:function(h,m,g,y,v){if(m.subarray&&h.subarray)h.set(m.subarray(g,g+y),v);else for(var b=0;b<y;b++)h[v+b]=m[g+b]},flattenChunks:function(h){var m,g,y,v,b,w;for(m=y=0,g=h.length;m<g;m++)y+=h[m].length;for(w=new Uint8Array(y),m=v=0,g=h.length;m<g;m++)b=h[m],w.set(b,v),v+=b.length;return w}},f={arraySet:function(h,m,g,y,v){for(var b=0;b<y;b++)h[v+b]=m[g+b]},flattenChunks:function(h){return[].concat.apply([],h)}};u.setTyped=function(h){h?(u.Buf8=Uint8Array,u.Buf16=Uint16Array,u.Buf32=Int32Array,u.assign(u,c)):(u.Buf8=Array,u.Buf16=Array,u.Buf32=Array,u.assign(u,f))},u.setTyped(s)},{}],42:[function(i,o,u){var s=i("./common"),c=!0,f=!0;try{String.fromCharCode.apply(null,[0])}catch{c=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{f=!1}for(var h=new s.Buf8(256),m=0;m<256;m++)h[m]=252<=m?6:248<=m?5:240<=m?4:224<=m?3:192<=m?2:1;function g(y,v){if(v<65537&&(y.subarray&&f||!y.subarray&&c))return String.fromCharCode.apply(null,s.shrinkBuf(y,v));for(var b="",w=0;w<v;w++)b+=String.fromCharCode(y[w]);return b}h[254]=h[254]=1,u.string2buf=function(y){var v,b,w,E,T,_=y.length,A=0;for(E=0;E<_;E++)(64512&(b=y.charCodeAt(E)))==55296&&E+1<_&&(64512&(w=y.charCodeAt(E+1)))==56320&&(b=65536+(b-55296<<10)+(w-56320),E++),A+=b<128?1:b<2048?2:b<65536?3:4;for(v=new s.Buf8(A),E=T=0;T<A;E++)(64512&(b=y.charCodeAt(E)))==55296&&E+1<_&&(64512&(w=y.charCodeAt(E+1)))==56320&&(b=65536+(b-55296<<10)+(w-56320),E++),b<128?v[T++]=b:(b<2048?v[T++]=192|b>>>6:(b<65536?v[T++]=224|b>>>12:(v[T++]=240|b>>>18,v[T++]=128|b>>>12&63),v[T++]=128|b>>>6&63),v[T++]=128|63&b);return v},u.buf2binstring=function(y){return g(y,y.length)},u.binstring2buf=function(y){for(var v=new s.Buf8(y.length),b=0,w=v.length;b<w;b++)v[b]=y.charCodeAt(b);return v},u.buf2string=function(y,v){var b,w,E,T,_=v||y.length,A=new Array(2*_);for(b=w=0;b<_;)if((E=y[b++])<128)A[w++]=E;else if(4<(T=h[E]))A[w++]=65533,b+=T-1;else{for(E&=T===2?31:T===3?15:7;1<T&&b<_;)E=E<<6|63&y[b++],T--;1<T?A[w++]=65533:E<65536?A[w++]=E:(E-=65536,A[w++]=55296|E>>10&1023,A[w++]=56320|1023&E)}return g(A,w)},u.utf8border=function(y,v){var b;for((v=v||y.length)>y.length&&(v=y.length),b=v-1;0<=b&&(192&y[b])==128;)b--;return b<0||b===0?v:b+h[y[b]]>v?b:v}},{"./common":41}],43:[function(i,o,u){o.exports=function(s,c,f,h){for(var m=65535&s|0,g=s>>>16&65535|0,y=0;f!==0;){for(f-=y=2e3<f?2e3:f;g=g+(m=m+c[h++]|0)|0,--y;);m%=65521,g%=65521}return m|g<<16|0}},{}],44:[function(i,o,u){o.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(i,o,u){var s=(function(){for(var c,f=[],h=0;h<256;h++){c=h;for(var m=0;m<8;m++)c=1&c?3988292384^c>>>1:c>>>1;f[h]=c}return f})();o.exports=function(c,f,h,m){var g=s,y=m+h;c^=-1;for(var v=m;v<y;v++)c=c>>>8^g[255&(c^f[v])];return-1^c}},{}],46:[function(i,o,u){var s,c=i("../utils/common"),f=i("./trees"),h=i("./adler32"),m=i("./crc32"),g=i("./messages"),y=0,v=4,b=0,w=-2,E=-1,T=4,_=2,A=8,j=9,B=286,U=30,z=19,H=2*B+1,Y=15,F=3,$=258,ae=$+F+1,M=42,ne=113,C=1,X=2,Z=3,K=4;function oe(S,J){return S.msg=g[J],J}function de(S){return(S<<1)-(4<S?9:0)}function L(S){for(var J=S.length;0<=--J;)S[J]=0}function k(S){var J=S.state,ee=J.pending;ee>S.avail_out&&(ee=S.avail_out),ee!==0&&(c.arraySet(S.output,J.pending_buf,J.pending_out,ee,S.next_out),S.next_out+=ee,J.pending_out+=ee,S.total_out+=ee,S.avail_out-=ee,J.pending-=ee,J.pending===0&&(J.pending_out=0))}function q(S,J){f._tr_flush_block(S,0<=S.block_start?S.block_start:-1,S.strstart-S.block_start,J),S.block_start=S.strstart,k(S.strm)}function N(S,J){S.pending_buf[S.pending++]=J}function re(S,J){S.pending_buf[S.pending++]=J>>>8&255,S.pending_buf[S.pending++]=255&J}function ce(S,J){var ee,I,D=S.max_chain_length,G=S.strstart,he=S.prev_length,be=S.nice_match,se=S.strstart>S.w_size-ae?S.strstart-(S.w_size-ae):0,Ee=S.window,_e=S.w_mask,Ce=S.prev,te=S.strstart+$,ve=Ee[G+he-1],Te=Ee[G+he];S.prev_length>=S.good_match&&(D>>=2),be>S.lookahead&&(be=S.lookahead);do if(Ee[(ee=J)+he]===Te&&Ee[ee+he-1]===ve&&Ee[ee]===Ee[G]&&Ee[++ee]===Ee[G+1]){G+=2,ee++;do;while(Ee[++G]===Ee[++ee]&&Ee[++G]===Ee[++ee]&&Ee[++G]===Ee[++ee]&&Ee[++G]===Ee[++ee]&&Ee[++G]===Ee[++ee]&&Ee[++G]===Ee[++ee]&&Ee[++G]===Ee[++ee]&&Ee[++G]===Ee[++ee]&&G<te);if(I=$-(te-G),G=te-$,he<I){if(S.match_start=J,be<=(he=I))break;ve=Ee[G+he-1],Te=Ee[G+he]}}while((J=Ce[J&_e])>se&&--D!=0);return he<=S.lookahead?he:S.lookahead}function we(S){var J,ee,I,D,G,he,be,se,Ee,_e,Ce=S.w_size;do{if(D=S.window_size-S.lookahead-S.strstart,S.strstart>=Ce+(Ce-ae)){for(c.arraySet(S.window,S.window,Ce,Ce,0),S.match_start-=Ce,S.strstart-=Ce,S.block_start-=Ce,J=ee=S.hash_size;I=S.head[--J],S.head[J]=Ce<=I?I-Ce:0,--ee;);for(J=ee=Ce;I=S.prev[--J],S.prev[J]=Ce<=I?I-Ce:0,--ee;);D+=Ce}if(S.strm.avail_in===0)break;if(he=S.strm,be=S.window,se=S.strstart+S.lookahead,Ee=D,_e=void 0,_e=he.avail_in,Ee<_e&&(_e=Ee),ee=_e===0?0:(he.avail_in-=_e,c.arraySet(be,he.input,he.next_in,_e,se),he.state.wrap===1?he.adler=h(he.adler,be,_e,se):he.state.wrap===2&&(he.adler=m(he.adler,be,_e,se)),he.next_in+=_e,he.total_in+=_e,_e),S.lookahead+=ee,S.lookahead+S.insert>=F)for(G=S.strstart-S.insert,S.ins_h=S.window[G],S.ins_h=(S.ins_h<<S.hash_shift^S.window[G+1])&S.hash_mask;S.insert&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[G+F-1])&S.hash_mask,S.prev[G&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=G,G++,S.insert--,!(S.lookahead+S.insert<F)););}while(S.lookahead<ae&&S.strm.avail_in!==0)}function Ae(S,J){for(var ee,I;;){if(S.lookahead<ae){if(we(S),S.lookahead<ae&&J===y)return C;if(S.lookahead===0)break}if(ee=0,S.lookahead>=F&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+F-1])&S.hash_mask,ee=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart),ee!==0&&S.strstart-ee<=S.w_size-ae&&(S.match_length=ce(S,ee)),S.match_length>=F)if(I=f._tr_tally(S,S.strstart-S.match_start,S.match_length-F),S.lookahead-=S.match_length,S.match_length<=S.max_lazy_match&&S.lookahead>=F){for(S.match_length--;S.strstart++,S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+F-1])&S.hash_mask,ee=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart,--S.match_length!=0;);S.strstart++}else S.strstart+=S.match_length,S.match_length=0,S.ins_h=S.window[S.strstart],S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+1])&S.hash_mask;else I=f._tr_tally(S,0,S.window[S.strstart]),S.lookahead--,S.strstart++;if(I&&(q(S,!1),S.strm.avail_out===0))return C}return S.insert=S.strstart<F-1?S.strstart:F-1,J===v?(q(S,!0),S.strm.avail_out===0?Z:K):S.last_lit&&(q(S,!1),S.strm.avail_out===0)?C:X}function Ne(S,J){for(var ee,I,D;;){if(S.lookahead<ae){if(we(S),S.lookahead<ae&&J===y)return C;if(S.lookahead===0)break}if(ee=0,S.lookahead>=F&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+F-1])&S.hash_mask,ee=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart),S.prev_length=S.match_length,S.prev_match=S.match_start,S.match_length=F-1,ee!==0&&S.prev_length<S.max_lazy_match&&S.strstart-ee<=S.w_size-ae&&(S.match_length=ce(S,ee),S.match_length<=5&&(S.strategy===1||S.match_length===F&&4096<S.strstart-S.match_start)&&(S.match_length=F-1)),S.prev_length>=F&&S.match_length<=S.prev_length){for(D=S.strstart+S.lookahead-F,I=f._tr_tally(S,S.strstart-1-S.prev_match,S.prev_length-F),S.lookahead-=S.prev_length-1,S.prev_length-=2;++S.strstart<=D&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+F-1])&S.hash_mask,ee=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart),--S.prev_length!=0;);if(S.match_available=0,S.match_length=F-1,S.strstart++,I&&(q(S,!1),S.strm.avail_out===0))return C}else if(S.match_available){if((I=f._tr_tally(S,0,S.window[S.strstart-1]))&&q(S,!1),S.strstart++,S.lookahead--,S.strm.avail_out===0)return C}else S.match_available=1,S.strstart++,S.lookahead--}return S.match_available&&(I=f._tr_tally(S,0,S.window[S.strstart-1]),S.match_available=0),S.insert=S.strstart<F-1?S.strstart:F-1,J===v?(q(S,!0),S.strm.avail_out===0?Z:K):S.last_lit&&(q(S,!1),S.strm.avail_out===0)?C:X}function ke(S,J,ee,I,D){this.good_length=S,this.max_lazy=J,this.nice_length=ee,this.max_chain=I,this.func=D}function He(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=A,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new c.Buf16(2*H),this.dyn_dtree=new c.Buf16(2*(2*U+1)),this.bl_tree=new c.Buf16(2*(2*z+1)),L(this.dyn_ltree),L(this.dyn_dtree),L(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new c.Buf16(Y+1),this.heap=new c.Buf16(2*B+1),L(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new c.Buf16(2*B+1),L(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Se(S){var J;return S&&S.state?(S.total_in=S.total_out=0,S.data_type=_,(J=S.state).pending=0,J.pending_out=0,J.wrap<0&&(J.wrap=-J.wrap),J.status=J.wrap?M:ne,S.adler=J.wrap===2?0:1,J.last_flush=y,f._tr_init(J),b):oe(S,w)}function Me(S){var J=Se(S);return J===b&&(function(ee){ee.window_size=2*ee.w_size,L(ee.head),ee.max_lazy_match=s[ee.level].max_lazy,ee.good_match=s[ee.level].good_length,ee.nice_match=s[ee.level].nice_length,ee.max_chain_length=s[ee.level].max_chain,ee.strstart=0,ee.block_start=0,ee.lookahead=0,ee.insert=0,ee.match_length=ee.prev_length=F-1,ee.match_available=0,ee.ins_h=0})(S.state),J}function ye(S,J,ee,I,D,G){if(!S)return w;var he=1;if(J===E&&(J=6),I<0?(he=0,I=-I):15<I&&(he=2,I-=16),D<1||j<D||ee!==A||I<8||15<I||J<0||9<J||G<0||T<G)return oe(S,w);I===8&&(I=9);var be=new He;return(S.state=be).strm=S,be.wrap=he,be.gzhead=null,be.w_bits=I,be.w_size=1<<be.w_bits,be.w_mask=be.w_size-1,be.hash_bits=D+7,be.hash_size=1<<be.hash_bits,be.hash_mask=be.hash_size-1,be.hash_shift=~~((be.hash_bits+F-1)/F),be.window=new c.Buf8(2*be.w_size),be.head=new c.Buf16(be.hash_size),be.prev=new c.Buf16(be.w_size),be.lit_bufsize=1<<D+6,be.pending_buf_size=4*be.lit_bufsize,be.pending_buf=new c.Buf8(be.pending_buf_size),be.d_buf=1*be.lit_bufsize,be.l_buf=3*be.lit_bufsize,be.level=J,be.strategy=G,be.method=ee,Me(S)}s=[new ke(0,0,0,0,function(S,J){var ee=65535;for(ee>S.pending_buf_size-5&&(ee=S.pending_buf_size-5);;){if(S.lookahead<=1){if(we(S),S.lookahead===0&&J===y)return C;if(S.lookahead===0)break}S.strstart+=S.lookahead,S.lookahead=0;var I=S.block_start+ee;if((S.strstart===0||S.strstart>=I)&&(S.lookahead=S.strstart-I,S.strstart=I,q(S,!1),S.strm.avail_out===0)||S.strstart-S.block_start>=S.w_size-ae&&(q(S,!1),S.strm.avail_out===0))return C}return S.insert=0,J===v?(q(S,!0),S.strm.avail_out===0?Z:K):(S.strstart>S.block_start&&(q(S,!1),S.strm.avail_out),C)}),new ke(4,4,8,4,Ae),new ke(4,5,16,8,Ae),new ke(4,6,32,32,Ae),new ke(4,4,16,16,Ne),new ke(8,16,32,32,Ne),new ke(8,16,128,128,Ne),new ke(8,32,128,256,Ne),new ke(32,128,258,1024,Ne),new ke(32,258,258,4096,Ne)],u.deflateInit=function(S,J){return ye(S,J,A,15,8,0)},u.deflateInit2=ye,u.deflateReset=Me,u.deflateResetKeep=Se,u.deflateSetHeader=function(S,J){return S&&S.state?S.state.wrap!==2?w:(S.state.gzhead=J,b):w},u.deflate=function(S,J){var ee,I,D,G;if(!S||!S.state||5<J||J<0)return S?oe(S,w):w;if(I=S.state,!S.output||!S.input&&S.avail_in!==0||I.status===666&&J!==v)return oe(S,S.avail_out===0?-5:w);if(I.strm=S,ee=I.last_flush,I.last_flush=J,I.status===M)if(I.wrap===2)S.adler=0,N(I,31),N(I,139),N(I,8),I.gzhead?(N(I,(I.gzhead.text?1:0)+(I.gzhead.hcrc?2:0)+(I.gzhead.extra?4:0)+(I.gzhead.name?8:0)+(I.gzhead.comment?16:0)),N(I,255&I.gzhead.time),N(I,I.gzhead.time>>8&255),N(I,I.gzhead.time>>16&255),N(I,I.gzhead.time>>24&255),N(I,I.level===9?2:2<=I.strategy||I.level<2?4:0),N(I,255&I.gzhead.os),I.gzhead.extra&&I.gzhead.extra.length&&(N(I,255&I.gzhead.extra.length),N(I,I.gzhead.extra.length>>8&255)),I.gzhead.hcrc&&(S.adler=m(S.adler,I.pending_buf,I.pending,0)),I.gzindex=0,I.status=69):(N(I,0),N(I,0),N(I,0),N(I,0),N(I,0),N(I,I.level===9?2:2<=I.strategy||I.level<2?4:0),N(I,3),I.status=ne);else{var he=A+(I.w_bits-8<<4)<<8;he|=(2<=I.strategy||I.level<2?0:I.level<6?1:I.level===6?2:3)<<6,I.strstart!==0&&(he|=32),he+=31-he%31,I.status=ne,re(I,he),I.strstart!==0&&(re(I,S.adler>>>16),re(I,65535&S.adler)),S.adler=1}if(I.status===69)if(I.gzhead.extra){for(D=I.pending;I.gzindex<(65535&I.gzhead.extra.length)&&(I.pending!==I.pending_buf_size||(I.gzhead.hcrc&&I.pending>D&&(S.adler=m(S.adler,I.pending_buf,I.pending-D,D)),k(S),D=I.pending,I.pending!==I.pending_buf_size));)N(I,255&I.gzhead.extra[I.gzindex]),I.gzindex++;I.gzhead.hcrc&&I.pending>D&&(S.adler=m(S.adler,I.pending_buf,I.pending-D,D)),I.gzindex===I.gzhead.extra.length&&(I.gzindex=0,I.status=73)}else I.status=73;if(I.status===73)if(I.gzhead.name){D=I.pending;do{if(I.pending===I.pending_buf_size&&(I.gzhead.hcrc&&I.pending>D&&(S.adler=m(S.adler,I.pending_buf,I.pending-D,D)),k(S),D=I.pending,I.pending===I.pending_buf_size)){G=1;break}G=I.gzindex<I.gzhead.name.length?255&I.gzhead.name.charCodeAt(I.gzindex++):0,N(I,G)}while(G!==0);I.gzhead.hcrc&&I.pending>D&&(S.adler=m(S.adler,I.pending_buf,I.pending-D,D)),G===0&&(I.gzindex=0,I.status=91)}else I.status=91;if(I.status===91)if(I.gzhead.comment){D=I.pending;do{if(I.pending===I.pending_buf_size&&(I.gzhead.hcrc&&I.pending>D&&(S.adler=m(S.adler,I.pending_buf,I.pending-D,D)),k(S),D=I.pending,I.pending===I.pending_buf_size)){G=1;break}G=I.gzindex<I.gzhead.comment.length?255&I.gzhead.comment.charCodeAt(I.gzindex++):0,N(I,G)}while(G!==0);I.gzhead.hcrc&&I.pending>D&&(S.adler=m(S.adler,I.pending_buf,I.pending-D,D)),G===0&&(I.status=103)}else I.status=103;if(I.status===103&&(I.gzhead.hcrc?(I.pending+2>I.pending_buf_size&&k(S),I.pending+2<=I.pending_buf_size&&(N(I,255&S.adler),N(I,S.adler>>8&255),S.adler=0,I.status=ne)):I.status=ne),I.pending!==0){if(k(S),S.avail_out===0)return I.last_flush=-1,b}else if(S.avail_in===0&&de(J)<=de(ee)&&J!==v)return oe(S,-5);if(I.status===666&&S.avail_in!==0)return oe(S,-5);if(S.avail_in!==0||I.lookahead!==0||J!==y&&I.status!==666){var be=I.strategy===2?(function(se,Ee){for(var _e;;){if(se.lookahead===0&&(we(se),se.lookahead===0)){if(Ee===y)return C;break}if(se.match_length=0,_e=f._tr_tally(se,0,se.window[se.strstart]),se.lookahead--,se.strstart++,_e&&(q(se,!1),se.strm.avail_out===0))return C}return se.insert=0,Ee===v?(q(se,!0),se.strm.avail_out===0?Z:K):se.last_lit&&(q(se,!1),se.strm.avail_out===0)?C:X})(I,J):I.strategy===3?(function(se,Ee){for(var _e,Ce,te,ve,Te=se.window;;){if(se.lookahead<=$){if(we(se),se.lookahead<=$&&Ee===y)return C;if(se.lookahead===0)break}if(se.match_length=0,se.lookahead>=F&&0<se.strstart&&(Ce=Te[te=se.strstart-1])===Te[++te]&&Ce===Te[++te]&&Ce===Te[++te]){ve=se.strstart+$;do;while(Ce===Te[++te]&&Ce===Te[++te]&&Ce===Te[++te]&&Ce===Te[++te]&&Ce===Te[++te]&&Ce===Te[++te]&&Ce===Te[++te]&&Ce===Te[++te]&&te<ve);se.match_length=$-(ve-te),se.match_length>se.lookahead&&(se.match_length=se.lookahead)}if(se.match_length>=F?(_e=f._tr_tally(se,1,se.match_length-F),se.lookahead-=se.match_length,se.strstart+=se.match_length,se.match_length=0):(_e=f._tr_tally(se,0,se.window[se.strstart]),se.lookahead--,se.strstart++),_e&&(q(se,!1),se.strm.avail_out===0))return C}return se.insert=0,Ee===v?(q(se,!0),se.strm.avail_out===0?Z:K):se.last_lit&&(q(se,!1),se.strm.avail_out===0)?C:X})(I,J):s[I.level].func(I,J);if(be!==Z&&be!==K||(I.status=666),be===C||be===Z)return S.avail_out===0&&(I.last_flush=-1),b;if(be===X&&(J===1?f._tr_align(I):J!==5&&(f._tr_stored_block(I,0,0,!1),J===3&&(L(I.head),I.lookahead===0&&(I.strstart=0,I.block_start=0,I.insert=0))),k(S),S.avail_out===0))return I.last_flush=-1,b}return J!==v?b:I.wrap<=0?1:(I.wrap===2?(N(I,255&S.adler),N(I,S.adler>>8&255),N(I,S.adler>>16&255),N(I,S.adler>>24&255),N(I,255&S.total_in),N(I,S.total_in>>8&255),N(I,S.total_in>>16&255),N(I,S.total_in>>24&255)):(re(I,S.adler>>>16),re(I,65535&S.adler)),k(S),0<I.wrap&&(I.wrap=-I.wrap),I.pending!==0?b:1)},u.deflateEnd=function(S){var J;return S&&S.state?(J=S.state.status)!==M&&J!==69&&J!==73&&J!==91&&J!==103&&J!==ne&&J!==666?oe(S,w):(S.state=null,J===ne?oe(S,-3):b):w},u.deflateSetDictionary=function(S,J){var ee,I,D,G,he,be,se,Ee,_e=J.length;if(!S||!S.state||(G=(ee=S.state).wrap)===2||G===1&&ee.status!==M||ee.lookahead)return w;for(G===1&&(S.adler=h(S.adler,J,_e,0)),ee.wrap=0,_e>=ee.w_size&&(G===0&&(L(ee.head),ee.strstart=0,ee.block_start=0,ee.insert=0),Ee=new c.Buf8(ee.w_size),c.arraySet(Ee,J,_e-ee.w_size,ee.w_size,0),J=Ee,_e=ee.w_size),he=S.avail_in,be=S.next_in,se=S.input,S.avail_in=_e,S.next_in=0,S.input=J,we(ee);ee.lookahead>=F;){for(I=ee.strstart,D=ee.lookahead-(F-1);ee.ins_h=(ee.ins_h<<ee.hash_shift^ee.window[I+F-1])&ee.hash_mask,ee.prev[I&ee.w_mask]=ee.head[ee.ins_h],ee.head[ee.ins_h]=I,I++,--D;);ee.strstart=I,ee.lookahead=F-1,we(ee)}return ee.strstart+=ee.lookahead,ee.block_start=ee.strstart,ee.insert=ee.lookahead,ee.lookahead=0,ee.match_length=ee.prev_length=F-1,ee.match_available=0,S.next_in=be,S.input=se,S.avail_in=he,ee.wrap=G,b},u.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(i,o,u){o.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(i,o,u){o.exports=function(s,c){var f,h,m,g,y,v,b,w,E,T,_,A,j,B,U,z,H,Y,F,$,ae,M,ne,C,X;f=s.state,h=s.next_in,C=s.input,m=h+(s.avail_in-5),g=s.next_out,X=s.output,y=g-(c-s.avail_out),v=g+(s.avail_out-257),b=f.dmax,w=f.wsize,E=f.whave,T=f.wnext,_=f.window,A=f.hold,j=f.bits,B=f.lencode,U=f.distcode,z=(1<<f.lenbits)-1,H=(1<<f.distbits)-1;e:do{j<15&&(A+=C[h++]<<j,j+=8,A+=C[h++]<<j,j+=8),Y=B[A&z];t:for(;;){if(A>>>=F=Y>>>24,j-=F,(F=Y>>>16&255)===0)X[g++]=65535&Y;else{if(!(16&F)){if((64&F)==0){Y=B[(65535&Y)+(A&(1<<F)-1)];continue t}if(32&F){f.mode=12;break e}s.msg="invalid literal/length code",f.mode=30;break e}$=65535&Y,(F&=15)&&(j<F&&(A+=C[h++]<<j,j+=8),$+=A&(1<<F)-1,A>>>=F,j-=F),j<15&&(A+=C[h++]<<j,j+=8,A+=C[h++]<<j,j+=8),Y=U[A&H];n:for(;;){if(A>>>=F=Y>>>24,j-=F,!(16&(F=Y>>>16&255))){if((64&F)==0){Y=U[(65535&Y)+(A&(1<<F)-1)];continue n}s.msg="invalid distance code",f.mode=30;break e}if(ae=65535&Y,j<(F&=15)&&(A+=C[h++]<<j,(j+=8)<F&&(A+=C[h++]<<j,j+=8)),b<(ae+=A&(1<<F)-1)){s.msg="invalid distance too far back",f.mode=30;break e}if(A>>>=F,j-=F,(F=g-y)<ae){if(E<(F=ae-F)&&f.sane){s.msg="invalid distance too far back",f.mode=30;break e}if(ne=_,(M=0)===T){if(M+=w-F,F<$){for($-=F;X[g++]=_[M++],--F;);M=g-ae,ne=X}}else if(T<F){if(M+=w+T-F,(F-=T)<$){for($-=F;X[g++]=_[M++],--F;);if(M=0,T<$){for($-=F=T;X[g++]=_[M++],--F;);M=g-ae,ne=X}}}else if(M+=T-F,F<$){for($-=F;X[g++]=_[M++],--F;);M=g-ae,ne=X}for(;2<$;)X[g++]=ne[M++],X[g++]=ne[M++],X[g++]=ne[M++],$-=3;$&&(X[g++]=ne[M++],1<$&&(X[g++]=ne[M++]))}else{for(M=g-ae;X[g++]=X[M++],X[g++]=X[M++],X[g++]=X[M++],2<($-=3););$&&(X[g++]=X[M++],1<$&&(X[g++]=X[M++]))}break}}break}}while(h<m&&g<v);h-=$=j>>3,A&=(1<<(j-=$<<3))-1,s.next_in=h,s.next_out=g,s.avail_in=h<m?m-h+5:5-(h-m),s.avail_out=g<v?v-g+257:257-(g-v),f.hold=A,f.bits=j}},{}],49:[function(i,o,u){var s=i("../utils/common"),c=i("./adler32"),f=i("./crc32"),h=i("./inffast"),m=i("./inftrees"),g=1,y=2,v=0,b=-2,w=1,E=852,T=592;function _(M){return(M>>>24&255)+(M>>>8&65280)+((65280&M)<<8)+((255&M)<<24)}function A(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function j(M){var ne;return M&&M.state?(ne=M.state,M.total_in=M.total_out=ne.total=0,M.msg="",ne.wrap&&(M.adler=1&ne.wrap),ne.mode=w,ne.last=0,ne.havedict=0,ne.dmax=32768,ne.head=null,ne.hold=0,ne.bits=0,ne.lencode=ne.lendyn=new s.Buf32(E),ne.distcode=ne.distdyn=new s.Buf32(T),ne.sane=1,ne.back=-1,v):b}function B(M){var ne;return M&&M.state?((ne=M.state).wsize=0,ne.whave=0,ne.wnext=0,j(M)):b}function U(M,ne){var C,X;return M&&M.state?(X=M.state,ne<0?(C=0,ne=-ne):(C=1+(ne>>4),ne<48&&(ne&=15)),ne&&(ne<8||15<ne)?b:(X.window!==null&&X.wbits!==ne&&(X.window=null),X.wrap=C,X.wbits=ne,B(M))):b}function z(M,ne){var C,X;return M?(X=new A,(M.state=X).window=null,(C=U(M,ne))!==v&&(M.state=null),C):b}var H,Y,F=!0;function $(M){if(F){var ne;for(H=new s.Buf32(512),Y=new s.Buf32(32),ne=0;ne<144;)M.lens[ne++]=8;for(;ne<256;)M.lens[ne++]=9;for(;ne<280;)M.lens[ne++]=7;for(;ne<288;)M.lens[ne++]=8;for(m(g,M.lens,0,288,H,0,M.work,{bits:9}),ne=0;ne<32;)M.lens[ne++]=5;m(y,M.lens,0,32,Y,0,M.work,{bits:5}),F=!1}M.lencode=H,M.lenbits=9,M.distcode=Y,M.distbits=5}function ae(M,ne,C,X){var Z,K=M.state;return K.window===null&&(K.wsize=1<<K.wbits,K.wnext=0,K.whave=0,K.window=new s.Buf8(K.wsize)),X>=K.wsize?(s.arraySet(K.window,ne,C-K.wsize,K.wsize,0),K.wnext=0,K.whave=K.wsize):(X<(Z=K.wsize-K.wnext)&&(Z=X),s.arraySet(K.window,ne,C-X,Z,K.wnext),(X-=Z)?(s.arraySet(K.window,ne,C-X,X,0),K.wnext=X,K.whave=K.wsize):(K.wnext+=Z,K.wnext===K.wsize&&(K.wnext=0),K.whave<K.wsize&&(K.whave+=Z))),0}u.inflateReset=B,u.inflateReset2=U,u.inflateResetKeep=j,u.inflateInit=function(M){return z(M,15)},u.inflateInit2=z,u.inflate=function(M,ne){var C,X,Z,K,oe,de,L,k,q,N,re,ce,we,Ae,Ne,ke,He,Se,Me,ye,S,J,ee,I,D=0,G=new s.Buf8(4),he=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!M||!M.state||!M.output||!M.input&&M.avail_in!==0)return b;(C=M.state).mode===12&&(C.mode=13),oe=M.next_out,Z=M.output,L=M.avail_out,K=M.next_in,X=M.input,de=M.avail_in,k=C.hold,q=C.bits,N=de,re=L,J=v;e:for(;;)switch(C.mode){case w:if(C.wrap===0){C.mode=13;break}for(;q<16;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}if(2&C.wrap&&k===35615){G[C.check=0]=255&k,G[1]=k>>>8&255,C.check=f(C.check,G,2,0),q=k=0,C.mode=2;break}if(C.flags=0,C.head&&(C.head.done=!1),!(1&C.wrap)||(((255&k)<<8)+(k>>8))%31){M.msg="incorrect header check",C.mode=30;break}if((15&k)!=8){M.msg="unknown compression method",C.mode=30;break}if(q-=4,S=8+(15&(k>>>=4)),C.wbits===0)C.wbits=S;else if(S>C.wbits){M.msg="invalid window size",C.mode=30;break}C.dmax=1<<S,M.adler=C.check=1,C.mode=512&k?10:12,q=k=0;break;case 2:for(;q<16;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}if(C.flags=k,(255&C.flags)!=8){M.msg="unknown compression method",C.mode=30;break}if(57344&C.flags){M.msg="unknown header flags set",C.mode=30;break}C.head&&(C.head.text=k>>8&1),512&C.flags&&(G[0]=255&k,G[1]=k>>>8&255,C.check=f(C.check,G,2,0)),q=k=0,C.mode=3;case 3:for(;q<32;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}C.head&&(C.head.time=k),512&C.flags&&(G[0]=255&k,G[1]=k>>>8&255,G[2]=k>>>16&255,G[3]=k>>>24&255,C.check=f(C.check,G,4,0)),q=k=0,C.mode=4;case 4:for(;q<16;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}C.head&&(C.head.xflags=255&k,C.head.os=k>>8),512&C.flags&&(G[0]=255&k,G[1]=k>>>8&255,C.check=f(C.check,G,2,0)),q=k=0,C.mode=5;case 5:if(1024&C.flags){for(;q<16;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}C.length=k,C.head&&(C.head.extra_len=k),512&C.flags&&(G[0]=255&k,G[1]=k>>>8&255,C.check=f(C.check,G,2,0)),q=k=0}else C.head&&(C.head.extra=null);C.mode=6;case 6:if(1024&C.flags&&(de<(ce=C.length)&&(ce=de),ce&&(C.head&&(S=C.head.extra_len-C.length,C.head.extra||(C.head.extra=new Array(C.head.extra_len)),s.arraySet(C.head.extra,X,K,ce,S)),512&C.flags&&(C.check=f(C.check,X,ce,K)),de-=ce,K+=ce,C.length-=ce),C.length))break e;C.length=0,C.mode=7;case 7:if(2048&C.flags){if(de===0)break e;for(ce=0;S=X[K+ce++],C.head&&S&&C.length<65536&&(C.head.name+=String.fromCharCode(S)),S&&ce<de;);if(512&C.flags&&(C.check=f(C.check,X,ce,K)),de-=ce,K+=ce,S)break e}else C.head&&(C.head.name=null);C.length=0,C.mode=8;case 8:if(4096&C.flags){if(de===0)break e;for(ce=0;S=X[K+ce++],C.head&&S&&C.length<65536&&(C.head.comment+=String.fromCharCode(S)),S&&ce<de;);if(512&C.flags&&(C.check=f(C.check,X,ce,K)),de-=ce,K+=ce,S)break e}else C.head&&(C.head.comment=null);C.mode=9;case 9:if(512&C.flags){for(;q<16;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}if(k!==(65535&C.check)){M.msg="header crc mismatch",C.mode=30;break}q=k=0}C.head&&(C.head.hcrc=C.flags>>9&1,C.head.done=!0),M.adler=C.check=0,C.mode=12;break;case 10:for(;q<32;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}M.adler=C.check=_(k),q=k=0,C.mode=11;case 11:if(C.havedict===0)return M.next_out=oe,M.avail_out=L,M.next_in=K,M.avail_in=de,C.hold=k,C.bits=q,2;M.adler=C.check=1,C.mode=12;case 12:if(ne===5||ne===6)break e;case 13:if(C.last){k>>>=7&q,q-=7&q,C.mode=27;break}for(;q<3;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}switch(C.last=1&k,q-=1,3&(k>>>=1)){case 0:C.mode=14;break;case 1:if($(C),C.mode=20,ne!==6)break;k>>>=2,q-=2;break e;case 2:C.mode=17;break;case 3:M.msg="invalid block type",C.mode=30}k>>>=2,q-=2;break;case 14:for(k>>>=7&q,q-=7&q;q<32;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}if((65535&k)!=(k>>>16^65535)){M.msg="invalid stored block lengths",C.mode=30;break}if(C.length=65535&k,q=k=0,C.mode=15,ne===6)break e;case 15:C.mode=16;case 16:if(ce=C.length){if(de<ce&&(ce=de),L<ce&&(ce=L),ce===0)break e;s.arraySet(Z,X,K,ce,oe),de-=ce,K+=ce,L-=ce,oe+=ce,C.length-=ce;break}C.mode=12;break;case 17:for(;q<14;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}if(C.nlen=257+(31&k),k>>>=5,q-=5,C.ndist=1+(31&k),k>>>=5,q-=5,C.ncode=4+(15&k),k>>>=4,q-=4,286<C.nlen||30<C.ndist){M.msg="too many length or distance symbols",C.mode=30;break}C.have=0,C.mode=18;case 18:for(;C.have<C.ncode;){for(;q<3;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}C.lens[he[C.have++]]=7&k,k>>>=3,q-=3}for(;C.have<19;)C.lens[he[C.have++]]=0;if(C.lencode=C.lendyn,C.lenbits=7,ee={bits:C.lenbits},J=m(0,C.lens,0,19,C.lencode,0,C.work,ee),C.lenbits=ee.bits,J){M.msg="invalid code lengths set",C.mode=30;break}C.have=0,C.mode=19;case 19:for(;C.have<C.nlen+C.ndist;){for(;ke=(D=C.lencode[k&(1<<C.lenbits)-1])>>>16&255,He=65535&D,!((Ne=D>>>24)<=q);){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}if(He<16)k>>>=Ne,q-=Ne,C.lens[C.have++]=He;else{if(He===16){for(I=Ne+2;q<I;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}if(k>>>=Ne,q-=Ne,C.have===0){M.msg="invalid bit length repeat",C.mode=30;break}S=C.lens[C.have-1],ce=3+(3&k),k>>>=2,q-=2}else if(He===17){for(I=Ne+3;q<I;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}q-=Ne,S=0,ce=3+(7&(k>>>=Ne)),k>>>=3,q-=3}else{for(I=Ne+7;q<I;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}q-=Ne,S=0,ce=11+(127&(k>>>=Ne)),k>>>=7,q-=7}if(C.have+ce>C.nlen+C.ndist){M.msg="invalid bit length repeat",C.mode=30;break}for(;ce--;)C.lens[C.have++]=S}}if(C.mode===30)break;if(C.lens[256]===0){M.msg="invalid code -- missing end-of-block",C.mode=30;break}if(C.lenbits=9,ee={bits:C.lenbits},J=m(g,C.lens,0,C.nlen,C.lencode,0,C.work,ee),C.lenbits=ee.bits,J){M.msg="invalid literal/lengths set",C.mode=30;break}if(C.distbits=6,C.distcode=C.distdyn,ee={bits:C.distbits},J=m(y,C.lens,C.nlen,C.ndist,C.distcode,0,C.work,ee),C.distbits=ee.bits,J){M.msg="invalid distances set",C.mode=30;break}if(C.mode=20,ne===6)break e;case 20:C.mode=21;case 21:if(6<=de&&258<=L){M.next_out=oe,M.avail_out=L,M.next_in=K,M.avail_in=de,C.hold=k,C.bits=q,h(M,re),oe=M.next_out,Z=M.output,L=M.avail_out,K=M.next_in,X=M.input,de=M.avail_in,k=C.hold,q=C.bits,C.mode===12&&(C.back=-1);break}for(C.back=0;ke=(D=C.lencode[k&(1<<C.lenbits)-1])>>>16&255,He=65535&D,!((Ne=D>>>24)<=q);){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}if(ke&&(240&ke)==0){for(Se=Ne,Me=ke,ye=He;ke=(D=C.lencode[ye+((k&(1<<Se+Me)-1)>>Se)])>>>16&255,He=65535&D,!(Se+(Ne=D>>>24)<=q);){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}k>>>=Se,q-=Se,C.back+=Se}if(k>>>=Ne,q-=Ne,C.back+=Ne,C.length=He,ke===0){C.mode=26;break}if(32&ke){C.back=-1,C.mode=12;break}if(64&ke){M.msg="invalid literal/length code",C.mode=30;break}C.extra=15&ke,C.mode=22;case 22:if(C.extra){for(I=C.extra;q<I;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}C.length+=k&(1<<C.extra)-1,k>>>=C.extra,q-=C.extra,C.back+=C.extra}C.was=C.length,C.mode=23;case 23:for(;ke=(D=C.distcode[k&(1<<C.distbits)-1])>>>16&255,He=65535&D,!((Ne=D>>>24)<=q);){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}if((240&ke)==0){for(Se=Ne,Me=ke,ye=He;ke=(D=C.distcode[ye+((k&(1<<Se+Me)-1)>>Se)])>>>16&255,He=65535&D,!(Se+(Ne=D>>>24)<=q);){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}k>>>=Se,q-=Se,C.back+=Se}if(k>>>=Ne,q-=Ne,C.back+=Ne,64&ke){M.msg="invalid distance code",C.mode=30;break}C.offset=He,C.extra=15&ke,C.mode=24;case 24:if(C.extra){for(I=C.extra;q<I;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}C.offset+=k&(1<<C.extra)-1,k>>>=C.extra,q-=C.extra,C.back+=C.extra}if(C.offset>C.dmax){M.msg="invalid distance too far back",C.mode=30;break}C.mode=25;case 25:if(L===0)break e;if(ce=re-L,C.offset>ce){if((ce=C.offset-ce)>C.whave&&C.sane){M.msg="invalid distance too far back",C.mode=30;break}we=ce>C.wnext?(ce-=C.wnext,C.wsize-ce):C.wnext-ce,ce>C.length&&(ce=C.length),Ae=C.window}else Ae=Z,we=oe-C.offset,ce=C.length;for(L<ce&&(ce=L),L-=ce,C.length-=ce;Z[oe++]=Ae[we++],--ce;);C.length===0&&(C.mode=21);break;case 26:if(L===0)break e;Z[oe++]=C.length,L--,C.mode=21;break;case 27:if(C.wrap){for(;q<32;){if(de===0)break e;de--,k|=X[K++]<<q,q+=8}if(re-=L,M.total_out+=re,C.total+=re,re&&(M.adler=C.check=C.flags?f(C.check,Z,re,oe-re):c(C.check,Z,re,oe-re)),re=L,(C.flags?k:_(k))!==C.check){M.msg="incorrect data check",C.mode=30;break}q=k=0}C.mode=28;case 28:if(C.wrap&&C.flags){for(;q<32;){if(de===0)break e;de--,k+=X[K++]<<q,q+=8}if(k!==(4294967295&C.total)){M.msg="incorrect length check",C.mode=30;break}q=k=0}C.mode=29;case 29:J=1;break e;case 30:J=-3;break e;case 31:return-4;case 32:default:return b}return M.next_out=oe,M.avail_out=L,M.next_in=K,M.avail_in=de,C.hold=k,C.bits=q,(C.wsize||re!==M.avail_out&&C.mode<30&&(C.mode<27||ne!==4))&&ae(M,M.output,M.next_out,re-M.avail_out)?(C.mode=31,-4):(N-=M.avail_in,re-=M.avail_out,M.total_in+=N,M.total_out+=re,C.total+=re,C.wrap&&re&&(M.adler=C.check=C.flags?f(C.check,Z,re,M.next_out-re):c(C.check,Z,re,M.next_out-re)),M.data_type=C.bits+(C.last?64:0)+(C.mode===12?128:0)+(C.mode===20||C.mode===15?256:0),(N==0&&re===0||ne===4)&&J===v&&(J=-5),J)},u.inflateEnd=function(M){if(!M||!M.state)return b;var ne=M.state;return ne.window&&(ne.window=null),M.state=null,v},u.inflateGetHeader=function(M,ne){var C;return M&&M.state?(2&(C=M.state).wrap)==0?b:((C.head=ne).done=!1,v):b},u.inflateSetDictionary=function(M,ne){var C,X=ne.length;return M&&M.state?(C=M.state).wrap!==0&&C.mode!==11?b:C.mode===11&&c(1,ne,X,0)!==C.check?-3:ae(M,ne,X,X)?(C.mode=31,-4):(C.havedict=1,v):b},u.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(i,o,u){var s=i("../utils/common"),c=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],f=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],m=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];o.exports=function(g,y,v,b,w,E,T,_){var A,j,B,U,z,H,Y,F,$,ae=_.bits,M=0,ne=0,C=0,X=0,Z=0,K=0,oe=0,de=0,L=0,k=0,q=null,N=0,re=new s.Buf16(16),ce=new s.Buf16(16),we=null,Ae=0;for(M=0;M<=15;M++)re[M]=0;for(ne=0;ne<b;ne++)re[y[v+ne]]++;for(Z=ae,X=15;1<=X&&re[X]===0;X--);if(X<Z&&(Z=X),X===0)return w[E++]=20971520,w[E++]=20971520,_.bits=1,0;for(C=1;C<X&&re[C]===0;C++);for(Z<C&&(Z=C),M=de=1;M<=15;M++)if(de<<=1,(de-=re[M])<0)return-1;if(0<de&&(g===0||X!==1))return-1;for(ce[1]=0,M=1;M<15;M++)ce[M+1]=ce[M]+re[M];for(ne=0;ne<b;ne++)y[v+ne]!==0&&(T[ce[y[v+ne]]++]=ne);if(H=g===0?(q=we=T,19):g===1?(q=c,N-=257,we=f,Ae-=257,256):(q=h,we=m,-1),M=C,z=E,oe=ne=k=0,B=-1,U=(L=1<<(K=Z))-1,g===1&&852<L||g===2&&592<L)return 1;for(;;){for(Y=M-oe,$=T[ne]<H?(F=0,T[ne]):T[ne]>H?(F=we[Ae+T[ne]],q[N+T[ne]]):(F=96,0),A=1<<M-oe,C=j=1<<K;w[z+(k>>oe)+(j-=A)]=Y<<24|F<<16|$|0,j!==0;);for(A=1<<M-1;k&A;)A>>=1;if(A!==0?(k&=A-1,k+=A):k=0,ne++,--re[M]==0){if(M===X)break;M=y[v+T[ne]]}if(Z<M&&(k&U)!==B){for(oe===0&&(oe=Z),z+=C,de=1<<(K=M-oe);K+oe<X&&!((de-=re[K+oe])<=0);)K++,de<<=1;if(L+=1<<K,g===1&&852<L||g===2&&592<L)return 1;w[B=k&U]=Z<<24|K<<16|z-E|0}}return k!==0&&(w[z+k]=M-oe<<24|4194304|0),_.bits=Z,0}},{"../utils/common":41}],51:[function(i,o,u){o.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(i,o,u){var s=i("../utils/common"),c=0,f=1;function h(D){for(var G=D.length;0<=--G;)D[G]=0}var m=0,g=29,y=256,v=y+1+g,b=30,w=19,E=2*v+1,T=15,_=16,A=7,j=256,B=16,U=17,z=18,H=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Y=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],F=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],$=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ae=new Array(2*(v+2));h(ae);var M=new Array(2*b);h(M);var ne=new Array(512);h(ne);var C=new Array(256);h(C);var X=new Array(g);h(X);var Z,K,oe,de=new Array(b);function L(D,G,he,be,se){this.static_tree=D,this.extra_bits=G,this.extra_base=he,this.elems=be,this.max_length=se,this.has_stree=D&&D.length}function k(D,G){this.dyn_tree=D,this.max_code=0,this.stat_desc=G}function q(D){return D<256?ne[D]:ne[256+(D>>>7)]}function N(D,G){D.pending_buf[D.pending++]=255&G,D.pending_buf[D.pending++]=G>>>8&255}function re(D,G,he){D.bi_valid>_-he?(D.bi_buf|=G<<D.bi_valid&65535,N(D,D.bi_buf),D.bi_buf=G>>_-D.bi_valid,D.bi_valid+=he-_):(D.bi_buf|=G<<D.bi_valid&65535,D.bi_valid+=he)}function ce(D,G,he){re(D,he[2*G],he[2*G+1])}function we(D,G){for(var he=0;he|=1&D,D>>>=1,he<<=1,0<--G;);return he>>>1}function Ae(D,G,he){var be,se,Ee=new Array(T+1),_e=0;for(be=1;be<=T;be++)Ee[be]=_e=_e+he[be-1]<<1;for(se=0;se<=G;se++){var Ce=D[2*se+1];Ce!==0&&(D[2*se]=we(Ee[Ce]++,Ce))}}function Ne(D){var G;for(G=0;G<v;G++)D.dyn_ltree[2*G]=0;for(G=0;G<b;G++)D.dyn_dtree[2*G]=0;for(G=0;G<w;G++)D.bl_tree[2*G]=0;D.dyn_ltree[2*j]=1,D.opt_len=D.static_len=0,D.last_lit=D.matches=0}function ke(D){8<D.bi_valid?N(D,D.bi_buf):0<D.bi_valid&&(D.pending_buf[D.pending++]=D.bi_buf),D.bi_buf=0,D.bi_valid=0}function He(D,G,he,be){var se=2*G,Ee=2*he;return D[se]<D[Ee]||D[se]===D[Ee]&&be[G]<=be[he]}function Se(D,G,he){for(var be=D.heap[he],se=he<<1;se<=D.heap_len&&(se<D.heap_len&&He(G,D.heap[se+1],D.heap[se],D.depth)&&se++,!He(G,be,D.heap[se],D.depth));)D.heap[he]=D.heap[se],he=se,se<<=1;D.heap[he]=be}function Me(D,G,he){var be,se,Ee,_e,Ce=0;if(D.last_lit!==0)for(;be=D.pending_buf[D.d_buf+2*Ce]<<8|D.pending_buf[D.d_buf+2*Ce+1],se=D.pending_buf[D.l_buf+Ce],Ce++,be===0?ce(D,se,G):(ce(D,(Ee=C[se])+y+1,G),(_e=H[Ee])!==0&&re(D,se-=X[Ee],_e),ce(D,Ee=q(--be),he),(_e=Y[Ee])!==0&&re(D,be-=de[Ee],_e)),Ce<D.last_lit;);ce(D,j,G)}function ye(D,G){var he,be,se,Ee=G.dyn_tree,_e=G.stat_desc.static_tree,Ce=G.stat_desc.has_stree,te=G.stat_desc.elems,ve=-1;for(D.heap_len=0,D.heap_max=E,he=0;he<te;he++)Ee[2*he]!==0?(D.heap[++D.heap_len]=ve=he,D.depth[he]=0):Ee[2*he+1]=0;for(;D.heap_len<2;)Ee[2*(se=D.heap[++D.heap_len]=ve<2?++ve:0)]=1,D.depth[se]=0,D.opt_len--,Ce&&(D.static_len-=_e[2*se+1]);for(G.max_code=ve,he=D.heap_len>>1;1<=he;he--)Se(D,Ee,he);for(se=te;he=D.heap[1],D.heap[1]=D.heap[D.heap_len--],Se(D,Ee,1),be=D.heap[1],D.heap[--D.heap_max]=he,D.heap[--D.heap_max]=be,Ee[2*se]=Ee[2*he]+Ee[2*be],D.depth[se]=(D.depth[he]>=D.depth[be]?D.depth[he]:D.depth[be])+1,Ee[2*he+1]=Ee[2*be+1]=se,D.heap[1]=se++,Se(D,Ee,1),2<=D.heap_len;);D.heap[--D.heap_max]=D.heap[1],(function(Te,Ie){var Je,pt,Pt,Xe,gt,Ot,Ze=Ie.dyn_tree,Tn=Ie.max_code,rn=Ie.stat_desc.static_tree,zu=Ie.stat_desc.has_stree,_i=Ie.stat_desc.extra_bits,Xr=Ie.stat_desc.extra_base,jn=Ie.stat_desc.max_length,mn=0;for(Xe=0;Xe<=T;Xe++)Te.bl_count[Xe]=0;for(Ze[2*Te.heap[Te.heap_max]+1]=0,Je=Te.heap_max+1;Je<E;Je++)jn<(Xe=Ze[2*Ze[2*(pt=Te.heap[Je])+1]+1]+1)&&(Xe=jn,mn++),Ze[2*pt+1]=Xe,Tn<pt||(Te.bl_count[Xe]++,gt=0,Xr<=pt&&(gt=_i[pt-Xr]),Ot=Ze[2*pt],Te.opt_len+=Ot*(Xe+gt),zu&&(Te.static_len+=Ot*(rn[2*pt+1]+gt)));if(mn!==0){do{for(Xe=jn-1;Te.bl_count[Xe]===0;)Xe--;Te.bl_count[Xe]--,Te.bl_count[Xe+1]+=2,Te.bl_count[jn]--,mn-=2}while(0<mn);for(Xe=jn;Xe!==0;Xe--)for(pt=Te.bl_count[Xe];pt!==0;)Tn<(Pt=Te.heap[--Je])||(Ze[2*Pt+1]!==Xe&&(Te.opt_len+=(Xe-Ze[2*Pt+1])*Ze[2*Pt],Ze[2*Pt+1]=Xe),pt--)}})(D,G),Ae(Ee,ve,D.bl_count)}function S(D,G,he){var be,se,Ee=-1,_e=G[1],Ce=0,te=7,ve=4;for(_e===0&&(te=138,ve=3),G[2*(he+1)+1]=65535,be=0;be<=he;be++)se=_e,_e=G[2*(be+1)+1],++Ce<te&&se===_e||(Ce<ve?D.bl_tree[2*se]+=Ce:se!==0?(se!==Ee&&D.bl_tree[2*se]++,D.bl_tree[2*B]++):Ce<=10?D.bl_tree[2*U]++:D.bl_tree[2*z]++,Ee=se,ve=(Ce=0)===_e?(te=138,3):se===_e?(te=6,3):(te=7,4))}function J(D,G,he){var be,se,Ee=-1,_e=G[1],Ce=0,te=7,ve=4;for(_e===0&&(te=138,ve=3),be=0;be<=he;be++)if(se=_e,_e=G[2*(be+1)+1],!(++Ce<te&&se===_e)){if(Ce<ve)for(;ce(D,se,D.bl_tree),--Ce!=0;);else se!==0?(se!==Ee&&(ce(D,se,D.bl_tree),Ce--),ce(D,B,D.bl_tree),re(D,Ce-3,2)):Ce<=10?(ce(D,U,D.bl_tree),re(D,Ce-3,3)):(ce(D,z,D.bl_tree),re(D,Ce-11,7));Ee=se,ve=(Ce=0)===_e?(te=138,3):se===_e?(te=6,3):(te=7,4)}}h(de);var ee=!1;function I(D,G,he,be){re(D,(m<<1)+(be?1:0),3),(function(se,Ee,_e,Ce){ke(se),N(se,_e),N(se,~_e),s.arraySet(se.pending_buf,se.window,Ee,_e,se.pending),se.pending+=_e})(D,G,he)}u._tr_init=function(D){ee||((function(){var G,he,be,se,Ee,_e=new Array(T+1);for(se=be=0;se<g-1;se++)for(X[se]=be,G=0;G<1<<H[se];G++)C[be++]=se;for(C[be-1]=se,se=Ee=0;se<16;se++)for(de[se]=Ee,G=0;G<1<<Y[se];G++)ne[Ee++]=se;for(Ee>>=7;se<b;se++)for(de[se]=Ee<<7,G=0;G<1<<Y[se]-7;G++)ne[256+Ee++]=se;for(he=0;he<=T;he++)_e[he]=0;for(G=0;G<=143;)ae[2*G+1]=8,G++,_e[8]++;for(;G<=255;)ae[2*G+1]=9,G++,_e[9]++;for(;G<=279;)ae[2*G+1]=7,G++,_e[7]++;for(;G<=287;)ae[2*G+1]=8,G++,_e[8]++;for(Ae(ae,v+1,_e),G=0;G<b;G++)M[2*G+1]=5,M[2*G]=we(G,5);Z=new L(ae,H,y+1,v,T),K=new L(M,Y,0,b,T),oe=new L(new Array(0),F,0,w,A)})(),ee=!0),D.l_desc=new k(D.dyn_ltree,Z),D.d_desc=new k(D.dyn_dtree,K),D.bl_desc=new k(D.bl_tree,oe),D.bi_buf=0,D.bi_valid=0,Ne(D)},u._tr_stored_block=I,u._tr_flush_block=function(D,G,he,be){var se,Ee,_e=0;0<D.level?(D.strm.data_type===2&&(D.strm.data_type=(function(Ce){var te,ve=4093624447;for(te=0;te<=31;te++,ve>>>=1)if(1&ve&&Ce.dyn_ltree[2*te]!==0)return c;if(Ce.dyn_ltree[18]!==0||Ce.dyn_ltree[20]!==0||Ce.dyn_ltree[26]!==0)return f;for(te=32;te<y;te++)if(Ce.dyn_ltree[2*te]!==0)return f;return c})(D)),ye(D,D.l_desc),ye(D,D.d_desc),_e=(function(Ce){var te;for(S(Ce,Ce.dyn_ltree,Ce.l_desc.max_code),S(Ce,Ce.dyn_dtree,Ce.d_desc.max_code),ye(Ce,Ce.bl_desc),te=w-1;3<=te&&Ce.bl_tree[2*$[te]+1]===0;te--);return Ce.opt_len+=3*(te+1)+5+5+4,te})(D),se=D.opt_len+3+7>>>3,(Ee=D.static_len+3+7>>>3)<=se&&(se=Ee)):se=Ee=he+5,he+4<=se&&G!==-1?I(D,G,he,be):D.strategy===4||Ee===se?(re(D,2+(be?1:0),3),Me(D,ae,M)):(re(D,4+(be?1:0),3),(function(Ce,te,ve,Te){var Ie;for(re(Ce,te-257,5),re(Ce,ve-1,5),re(Ce,Te-4,4),Ie=0;Ie<Te;Ie++)re(Ce,Ce.bl_tree[2*$[Ie]+1],3);J(Ce,Ce.dyn_ltree,te-1),J(Ce,Ce.dyn_dtree,ve-1)})(D,D.l_desc.max_code+1,D.d_desc.max_code+1,_e+1),Me(D,D.dyn_ltree,D.dyn_dtree)),Ne(D),be&&ke(D)},u._tr_tally=function(D,G,he){return D.pending_buf[D.d_buf+2*D.last_lit]=G>>>8&255,D.pending_buf[D.d_buf+2*D.last_lit+1]=255&G,D.pending_buf[D.l_buf+D.last_lit]=255&he,D.last_lit++,G===0?D.dyn_ltree[2*he]++:(D.matches++,G--,D.dyn_ltree[2*(C[he]+y+1)]++,D.dyn_dtree[2*q(G)]++),D.last_lit===D.lit_bufsize-1},u._tr_align=function(D){re(D,2,3),ce(D,j,ae),(function(G){G.bi_valid===16?(N(G,G.bi_buf),G.bi_buf=0,G.bi_valid=0):8<=G.bi_valid&&(G.pending_buf[G.pending++]=255&G.bi_buf,G.bi_buf>>=8,G.bi_valid-=8)})(D)}},{"../utils/common":41}],53:[function(i,o,u){o.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(i,o,u){(function(s){(function(c,f){if(!c.setImmediate){var h,m,g,y,v=1,b={},w=!1,E=c.document,T=Object.getPrototypeOf&&Object.getPrototypeOf(c);T=T&&T.setTimeout?T:c,h={}.toString.call(c.process)==="[object process]"?function(B){process.nextTick(function(){A(B)})}:(function(){if(c.postMessage&&!c.importScripts){var B=!0,U=c.onmessage;return c.onmessage=function(){B=!1},c.postMessage("","*"),c.onmessage=U,B}})()?(y="setImmediate$"+Math.random()+"$",c.addEventListener?c.addEventListener("message",j,!1):c.attachEvent("onmessage",j),function(B){c.postMessage(y+B,"*")}):c.MessageChannel?((g=new MessageChannel).port1.onmessage=function(B){A(B.data)},function(B){g.port2.postMessage(B)}):E&&"onreadystatechange"in E.createElement("script")?(m=E.documentElement,function(B){var U=E.createElement("script");U.onreadystatechange=function(){A(B),U.onreadystatechange=null,m.removeChild(U),U=null},m.appendChild(U)}):function(B){setTimeout(A,0,B)},T.setImmediate=function(B){typeof B!="function"&&(B=new Function(""+B));for(var U=new Array(arguments.length-1),z=0;z<U.length;z++)U[z]=arguments[z+1];var H={callback:B,args:U};return b[v]=H,h(v),v++},T.clearImmediate=_}function _(B){delete b[B]}function A(B){if(w)setTimeout(A,0,B);else{var U=b[B];if(U){w=!0;try{(function(z){var H=z.callback,Y=z.args;switch(Y.length){case 0:H();break;case 1:H(Y[0]);break;case 2:H(Y[0],Y[1]);break;case 3:H(Y[0],Y[1],Y[2]);break;default:H.apply(f,Y)}})(U)}finally{_(B),w=!1}}}}function j(B){B.source===c&&typeof B.data=="string"&&B.data.indexOf(y)===0&&A(+B.data.slice(y.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof Rl<"u"?Rl:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(qs)),qs.exports}var Lh;function qS(){if(Lh)return Fr;Lh=1;var n=Fr&&Fr.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.Filemanager=void 0;const l=n(HS()),i=On();class o{pendingFiles=[];pendingMessage="";pendingFormat="";setFilesForUpload(s,c){this.pendingFiles.length>0&&this.clearPendingFilesState();const f=s.filter(h=>this.validateFileType(h));if(f.length===0)throw new i.FileError("No valid files provided",{context:{stage:"setFilesForUpload"}});this.pendingFiles=f,c&&c.trim()&&(this.pendingMessage=c),this.pendingFormat=f.length>1?"zip":f?.[0]?.type?.split("/")?.[1]||"unknown"}getPendingFileState(){return{files:this.pendingFiles,message:this.pendingMessage||"",format:this.pendingFormat||""}}async uploadFilesToPresignedUrl(s){let c=0;const f=s.filter(h=>h&&h.trim());try{if(f.length===0)throw new i.FileError("No valid presigned URLs provided",{context:{stage:"uploadFilesToPresignedUrl"}});let h,m;if(this.shouldZipFiles()){const g=await this.zipFiles(),y=this.getUploadFileName();h=this.blobToFile(g,y),m="application/zip"}else h=this.pendingFiles?.[0],m=h.type;for(let g=0;g<f.length;g++){const y=f[g],v=await fetch(y,{method:"PUT",body:h,headers:{"Content-Type":m,"x-ms-blob-type":"BlockBlob"}});if(!v.ok)throw new i.FileError(`Failed to upload ${h.name} to URL ${g+1}: ${v.status} ${v.statusText}`,{context:{stage:"uploadFilesToPresignedUrl",status:v.status,url:y}});c++}return f[0]}catch(h){if(c>0)return f[0];throw(0,i.normalizeError)(h,i.FileError,"Failed to upload files to presigned URL",{context:{stage:"uploadFilesToPresignedUrl"}})}}async zipFiles(){const s=new l.default;return this.pendingFiles.forEach(f=>{s.file(f.name,f)}),await s.generateAsync({type:"blob"})}blobToFile(s,c){return new File([s],c,{type:s.type})}shouldZipFiles(){return this.pendingFiles.length>1}getUploadFileName(){return this.shouldZipFiles()?`uploaded_files_${Date.now()}.zip`:this.pendingFiles[0]?.name||"file"}validateFileType(s){return["application/pdf","image/jpeg","image/png","image/jpg","image/tiff","text/plain","text/markdown","image/heif","image/heic","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes(s.type)}clearPendingFilesState(){this.pendingFiles=[],this.pendingMessage="",this.pendingFormat=""}}return Fr.Filemanager=o,Fr}var Cn={},Ih;function Pl(){if(Ih)return Cn;Ih=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.SYNAPSE_REALTIME_RESERVED_EVENTS=Cn.SYNAPSE_REALTIME_ERROR_CODES=Cn.SYNAPSE_REALTIME_EVENTS=Cn.SYNAPSE_MESSAGE_TYPES=void 0;const n=Hs();return Cn.SYNAPSE_MESSAGE_TYPES=n.SOCKET_CONTENT_TYPES,Cn.SYNAPSE_REALTIME_EVENTS={CONNECTED:"connected",DISCONNECTED:"disconnected",PROGRESS_MESSAGE:"progress_message",MESSAGE_CHUNK:"message_chunk",TIPS_MESSAGE:"tips_message",END_OF_STREAM:"end_of_stream",ERROR:"error",TOOL_CALL:"tool_call",INLINE_TEXT:"inline_text",TOOL_START:"tool_start",TOOL_END:"tool_end"},Cn.SYNAPSE_REALTIME_ERROR_CODES={SESSION_INACTIVE:"session_not_found",SESSION_EXPIRED:"session_expired",INVALID_EVENT:"invalid_event",INVALID_CONTENT_TYPE:"invalid_content",PARSING_ERROR:"parsing",FILE_UPLOAD_INPROGRESS:"file_upload_inprogress",TIMEOUT:"timeout",SERVER_ERROR:"server_error",SESSION_TOKEN_MISMATCH:"session_token_mismatch"},Cn.SYNAPSE_REALTIME_RESERVED_EVENTS={SESSION_EXPIRED:"session_expired"},Cn}var Ca={},Bh;function PS(){if(Bh)return Ca;Bh=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.AudioManager=void 0;const n=On();class l{mediaRecorder=null;mediaStream=null;recordingStartTime=0;autoPauseTimer=null;config;onAudioData=null;onAudioError=null;suppressCallbacks=!1;constructor(o={}){this.config={mimeType:"audio/webm;codecs=opus",audioBitsPerSecond:128e3,maxRecordingDuration:9e5,autoPauseEnabled:!0,...o}}async checkCurrentPermissionState(){const o=await navigator.permissions.query({name:"microphone"});if(o.state==="denied")throw new n.RecordingError("Microphone permission denied",{context:{permissionState:o.state},hint:"Ensure the browser has microphone access enabled for this site."});return o.state}async start(o,u){try{if(!navigator.mediaDevices)throw new n.RecordingError("Media devices API is not available. This usually means the page is not served over HTTPS or there are browser restrictions.",{context:{feature:"mediaDevices"},hint:"Serve the app over HTTPS and verify browser/device microphone support.",displayMessage:"Microphone access is unavailable."});if(!window.MediaRecorder)throw new n.RecordingError("MediaRecorder is not supported in this browser",{context:{feature:"MediaRecorder"},hint:"Use a browser that supports the MediaRecorder API.",displayMessage:"Microphone access is unavailable."});const s=["audio/mp3","audio/ogg;codecs=opus","audio/mp4","audio/ogg","audio/wav"].filter(c=>MediaRecorder.isTypeSupported(c));if(s.length===0)throw new n.RecordingError("No supported audio formats found in this browser",{context:{requestedTypes:s},hint:"Verify codec support or adjust the requested MIME types.",displayMessage:"Microphone access is unavailable."});if(this.config.mimeType=s[0],await this.checkCurrentPermissionState(),this.onAudioData=o,this.onAudioError=u??null,this.suppressCallbacks=!1,this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!1,noiseSuppression:!1,autoGainControl:!1,sampleRate:44100,channelCount:1}}),this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:this.config.mimeType,audioBitsPerSecond:this.config.audioBitsPerSecond}),this.mediaRecorder.state!=="inactive")throw new n.RecordingError("MediaRecorder is in an invalid state for start()",{context:{recorderState:this.mediaRecorder.state},displayMessage:"Failed to start recording"});this.setupMediaRecorderEvents(),this.mediaRecorder.start(),this.recordingStartTime=Date.now(),this.config.autoPauseEnabled&&this.setupAutoPauseTimer()}catch(s){throw this.toRecordingError(s,"Failed to start audio recording",{stage:"start"})}}async processAudioChunk(o){try{const u=await this.blobToBase64(o),s=Date.now();if(!this.onAudioData)return;const c={audio:u,format:this.config.mimeType,duration:this.recordingStartTime>0?s-this.recordingStartTime:0,timestamp:this.recordingStartTime>0?this.recordingStartTime:s};this.onAudioData(c)}catch(u){this.handleError(u,{stage:"process_audio_chunk"})}}toRecordingError(o,u,s){if(o instanceof n.RecordingError)return o;if(o instanceof n.SynapseError)return new n.RecordingError(o.message,{cause:o,context:{...o.context,...s},hint:o.hint});const c=o instanceof Error&&o.message?o.message:u;return new n.RecordingError(c,{cause:o,context:s})}handleError(o,u){const s=this.toRecordingError(o,"Unexpected recording error",u);if(this.onAudioError)try{this.onAudioError(s)}catch{}}setupAutoPauseTimer(){this.autoPauseTimer&&clearTimeout(this.autoPauseTimer),this.autoPauseTimer=setTimeout(()=>{this.stop()},this.config.maxRecordingDuration)}setupMediaRecorderEvents(){this.mediaRecorder&&(this.mediaRecorder.ondataavailable=o=>{this.suppressCallbacks||o.data.size<=0||this.processAudioChunk(o.data).catch(u=>this.handleError(u,{stage:"media_recorder_ondataavailable",hasData:o.data.size>0}))},this.mediaRecorder.onstop=async()=>{this.recordingStartTime=0},this.mediaRecorder.onerror=o=>{this.handleError(o.error instanceof Error?o.error:new Error("MediaRecorder encountered an unknown error"),{stage:"media_recorder_onerror"})},this.mediaRecorder.onstart=()=>{this.mediaRecorder})}blobToBase64(o){return new Promise((u,s)=>{const c=new FileReader;c.onload=()=>{if(typeof c.result=="string"){const f=c.result.split(",")[1];u(f)}else s(new n.RecordingError("Failed to convert blob to base64",{context:{stage:"blob_to_base64"}}))},c.onerror=()=>s(new n.RecordingError("FileReader error while converting audio chunk to base64",{cause:c.error??void 0,context:{stage:"blob_to_base64"}})),c.readAsDataURL(o)})}stop(){if(this.mediaRecorder)try{this.autoPauseTimer&&(clearTimeout(this.autoPauseTimer),this.autoPauseTimer=null),this.mediaRecorder.state==="recording"&&this.mediaRecorder.stop(),this.mediaStream&&(this.mediaStream.getTracks().forEach(o=>o.stop()),this.mediaStream=null)}catch(o){throw this.toRecordingError(o,"Failed to stop audio recording",{stage:"stop"})}}cancel(){if(this.mediaRecorder)try{this.suppressCallbacks=!0,this.autoPauseTimer&&(clearTimeout(this.autoPauseTimer),this.autoPauseTimer=null),this.mediaRecorder.ondataavailable=null,this.mediaRecorder.state==="recording"&&this.mediaRecorder.stop(),this.mediaStream&&(this.mediaStream.getTracks().forEach(o=>o.stop()),this.mediaStream=null)}catch(o){throw this.toRecordingError(o,"Failed to cancel audio recording",{stage:"cancel"})}}destroy(){try{this.cancel(),this.mediaRecorder&&(this.mediaRecorder=null),this.mediaStream&&(this.mediaStream.getTracks().forEach(o=>o.stop()),this.mediaStream=null)}catch(o){throw this.toRecordingError(o,"Failed to destroy audio resources",{stage:"destroy"})}}}return Ca.AudioManager=l,Ca}var Uh;function Hh(){if(Uh)return wa;Uh=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.MessageManager=void 0;const n=Hs(),l=qS(),i=Pl(),o=PS(),u=On();let s=class{connection=null;callbacks=null;fileManager=null;audioManager=null;constructor(f,h){this.connection=f||null,this.callbacks=h||null}handleFileUploadProcess({files:f,message:h,url:m}){this.fileManager||(this.fileManager=new l.Filemanager);let g;if(f&&f.length>0)this.fileManager.setFilesForUpload(f,h),g={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.FILE,_id:Date.now().toString(),ts:Date.now(),data:{extension:this.fileManager.getPendingFileState().format}};else if(m){const y=this.fileManager.getPendingFileState().message;g={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.FILE,_id:Date.now().toString(),ts:Date.now(),data:{url:m,...y&&{text:y}}},this.fileManager?.clearPendingFilesState()}return g}sendSocketMessage({message:f,files:h,audio:m,url:g,tool_declined:y,tool_id:v,initial_prompts:b}){const w=this.assertConnection("sendSocketChatMessage");let E;if(h&&h.length>0||g&&g.trim()!==""?E=this.handleFileUploadProcess({files:h,message:f,url:g}):f?E={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.TEXT,_id:Date.now().toString(),ts:Date.now(),data:{text:f,...y&&{tool_declined:y},...v&&{tool_id:v},...b&&{initial_prompts:b}}}:m&&m?.audio&&m?.format&&(E={ev:n.SOCKET_EVENTS.STREAM,ct:n.SOCKET_CONTENT_TYPES.AUDIO,_id:Date.now().toString(),ts:Date.now(),data:{audio:m?.audio,format:m?.format}}),!E){const T=new u.MessageError("No message to send",{context:{stage:"sendSocketChatMessage"}});throw this.emitError(T),T}w.sendMessage(E)}handleIncomingSocketChatMessage(f){const h=this.assertConnection("handleIncomingSocketChatMessage");switch(f.ct){case n.SOCKET_CONTENT_TYPES.FILE:{f?.data?.urls&&f.data.urls?.length>0&&this.fileManager?.uploadFilesToPresignedUrl(f.data.urls).then(()=>{this.sendSocketMessage({url:f.data.urls?.[0]})}).catch(m=>{const g=this.toFileError(m,"Failed to upload files to presigned URL",{stage:"handleIncomingSocketChatMessage",urls:f.data?.urls?.length});this.emitError(g)});break}case n.SOCKET_CONTENT_TYPES.TEXT:if(f.data.text&&f.data.text.trim()===""&&f._id){const m={data:{text:f.data.text},messageId:f._id,timestamp:f.ts};h.emit(i.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,m)}break;case n.SOCKET_CONTENT_TYPES.TOOL_CALL:if(f?.data?.tool_id&&f._id){const m={data:{...f.data},messageId:f._id,timestamp:f.ts};h.emit(i.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,m)}break;case n.SOCKET_CONTENT_TYPES.INLINE_TEXT:if(f?.data?.text){const m={data:{text:f.data.text},messageId:f._id,timestamp:f.ts};h.emit(i.SYNAPSE_REALTIME_EVENTS.INLINE_TEXT,m)}break}}handleIncomingSocketStreamMessage(f){const h=this.assertConnection("handleIncomingSocketStreamMessage");switch(f.ct){case n.SOCKET_CONTENT_TYPES.TEXT:if(f?.data?.progress_msg){const v={data:{text:f.data.progress_msg},messageId:f._id,timestamp:f.ts};h.emit(i.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE,v);return}if(f?.data?.text){const v={data:{text:f.data.text},messageId:f._id,timestamp:f.ts};h.emit(i.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,v)}break;case n.SOCKET_CONTENT_TYPES.TIPS:if(f?.data?.tips){const v={data:{tips:f.data.tips},messageId:f._id,timestamp:f.ts};h.emit(i.SYNAPSE_REALTIME_EVENTS.TIPS_MESSAGE,v);return}break;case n.SOCKET_CONTENT_TYPES.TOOL_CALL:if(f?.data?.tool_id&&f._id){const v={data:{...f.data},messageId:f._id,timestamp:f.ts};h.emit(i.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,v);return}break;case n.SOCKET_CONTENT_TYPES.TOOL_START:const m={data:f?.data,messageId:f._id||Date.now().toString()};h.emit(i.SYNAPSE_REALTIME_EVENTS.TOOL_START,m);break;case n.SOCKET_CONTENT_TYPES.TOOL_END:const g={data:f?.data,messageId:f._id||Date.now().toString()};h.emit(i.SYNAPSE_REALTIME_EVENTS.TOOL_END,g);break;default:const y=new u.MessageError(`Unsupported content type ${f?.ct}`,{context:{stage:"handleIncomingSocketStreamMessage",contentType:f.ct}});throw this.emitError(y),y}}handleDisconnect(f){this.connection?.emit?.(i.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,f)}handleIncomingSocketEndOfStreamMessage(f){this.assertConnection("handleIncomingSocketEndOfStreamMessage").emit(i.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM)}handleIncomingSocketErrorMessage(f){const h=this.assertConnection("handleIncomingSocketErrorMessage");switch(f.code){case i.SYNAPSE_REALTIME_ERROR_CODES.SESSION_EXPIRED:h.emit(i.SYNAPSE_REALTIME_RESERVED_EVENTS.SESSION_EXPIRED);break;default:const m=new u.MessageError(f.msg||"Socket error received",{context:{stage:"handleIncomingSocketErrorMessage",errorCode:f.code}});h.emit(i.SYNAPSE_REALTIME_EVENTS.ERROR,m),this.emitError(m)}}sendSocketAuthMessage(f){const h=this.assertConnection("sendSocketAuthMessage"),m={ev:n.SOCKET_EVENTS.AUTH,_id:Date.now().toString(),ts:Date.now(),data:{token:f}};h.sendMessage(m)}sendSocketPingMessage(){const f=this.assertConnection("sendSocketPingMessage"),h={ev:n.SOCKET_EVENTS.PING,_id:Date.now().toString(),ts:Date.now()};f.sendMessage(h)}async startRecording({onChunks:f,onError:h}){if(!f){const m=new u.RecordingError("onChunks is required",{context:{stage:"startRecording"},hint:"onChunks is required"});throw this.emitError(m),m}this.assertConnection("startRecording"),this.audioManager||(this.audioManager=new o.AudioManager);try{await this.audioManager.start(f,m=>{const g=this.toRecordingError(m,"Failed to start audio recording",{stage:"startRecording"});h?.(g),this.emitError(g)})}catch(m){const g=this.toRecordingError(m,"Failed to start audio recording",{stage:"startRecording"});throw h?.(g),this.emitError(g),g}}endRecordingWithSocket(){if(!this.audioManager){const f=new u.RecordingError("Audio manager not set. Call startRecording() first.",{context:{stage:"stopRecording"}});throw this.emitError(f),f}try{this.audioManager.stop()}catch(f){const h=this.toRecordingError(f,"Failed to stop audio recording",{stage:"stopRecording"});throw this.emitError(h),h}}sendSocketPongMessage(){const f=this.assertConnection("sendSocketPongMessage"),h={ev:n.SOCKET_EVENTS.PONG,_id:Date.now().toString(),ts:Date.now()};f.sendMessage(h)}handleConnectionEstablished(){this.connection?.handleConnected(),this.connection?.emit(i.SYNAPSE_REALTIME_EVENTS.CONNECTED)}cleanupMessageServerState(){this.fileManager&&(this.fileManager.clearPendingFilesState(),this.fileManager=null),this.audioManager&&(this.audioManager.destroy(),this.audioManager=null)}emitError(f){this.callbacks?.onError?.(f)}toFileError(f,h,m,g){return(0,u.normalizeError)(f,u.FileError,h,{context:m,hint:g})}toRecordingError(f,h,m,g){return(0,u.normalizeError)(f,u.RecordingError,h,{context:m,hint:g})}assertConnection(f){if(!this.connection){const h=new u.ConnectionError("Connection not set. Please ensure the connection is established before calling this method.",{context:{stage:f}});throw this.emitError(h),h}return this.connection}};return wa.MessageManager=s,wa}var Ta={},qh;function Ph(){if(qh)return Ta;qh=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.ErrorUtils=void 0;const n=On();class l{static isAPIError(o){return o instanceof n.APIError}static isNetworkError(o){return o instanceof n.APIError&&(o.status===0||o.status===void 0)}static isTimeoutError(o){return o instanceof n.APIConnectionTimeoutError}static isAuthError(o){return o instanceof n.UnauthorizedError||o instanceof n.PermissionDeniedError}static isClientError(o){return o instanceof n.APIError&&o.status!==void 0&&o.status>=400&&o.status<500}static isServerError(o){return o instanceof n.APIError&&o.status!==void 0&&o.status>=500}static getUserFriendlyMessage(o){return l.isNetworkError(o)?"Unable to connect to the server. Please check your internet connection.":l.isTimeoutError(o)?"Request timed out. Please try again.":l.isAuthError(o)?"Authentication failed. Please log in again.":l.isServerError(o)?"Server error occurred. Please try again later.":l.isAPIError(o)||o instanceof Error?o.message:"An unexpected error occurred."}static getErrorDetails(o){return l.isAPIError(o)?{type:o.name,message:o.message,code:o.code,status:o.status,timestamp:o.timestamp,stack:o.stack,context:o.context,hint:o.hint}:o instanceof n.SynapseError?{type:o.name,message:o.message,code:o.code,timestamp:o.timestamp,stack:o.stack,context:o.context,hint:o.hint}:o instanceof Error?{type:o.name,message:o.message,stack:o.stack}:{type:"Unknown",message:String(o)}}}return Ta.ErrorUtils=l,Ta}var Fh;function FS(){if(Fh)return pa;Fh=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.SynapseSDK=void 0;const n=Sh(),l=US(),i=Mh(),o=Hh(),u=Pl(),s=Ph(),c=On(),f=Hs();class h{connection=null;messageManager;resourceManager;sessionConfig=null;config;connectionType;constructor(g){this.config={...g,environment:g.environment||"production"},this.connectionType=g.connectionType||n.ConnectionType.SOCKET;const y=(0,l.getConfig)(this.config?.environment).BASE_API_URL;this.resourceManager=new i.ResourceManager({agentId:this.config.agentId,serverUrl:y})}async startSession(g){try{const y=await this.manageSession(g);return await this.initializeConnection(y),this.setupEventHandlers(),y}catch(y){const v=s.ErrorUtils.getUserFriendlyMessage(y),b=s.ErrorUtils.getErrorDetails(y),w=this.toSessionError(y,v||"Failed to start session",{stage:"startSession",details:b},"Check network connectivity or refresh credentials before retrying.");throw this.emitError(w),w}}async sendMessage({message:g,files:y,audio:v,tool_declined:b,tool_id:w,initial_prompts:E}){if(!this.connection){const T=new c.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"sendChatMessage"},hint:"Call startSession() and wait for connection before sending messages."});throw this.emitError(T),T}switch(this.connectionType){case n.ConnectionType.SOCKET:this.messageManager.sendSocketMessage({message:g,files:y,audio:v,...b&&{tool_declined:b},...w&&{tool_id:w},...E?.length&&{initial_prompts:E}});break;default:const T=new c.ConnectionError("Unsupported connection type",{context:{stage:"sendChatMessage",connectionType:this.connectionType}});throw this.emitError(T),T}}on(g,y){this.connection?.on(g,y)}off(g,y){this.connection?.off(g,y)}getSessionConfig(){if(!this.sessionConfig?.session_id||!this.sessionConfig?.session_token)throw new c.SessionError("Session ID or token not found",{context:{stage:"getSessionConfig"},hint:"Ensure the session API returns both identifiers."});return this.sessionConfig}async callTool(g,y){if(!this.connection){const v=new c.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"callTool"},hint:"Call startSession() before attempting to call tool."});throw this.emitError(v),v}if(!this.sessionConfig?.session_id){const v=new c.SessionError("Session ID not found",{context:{stage:"callTool"},hint:"Call startSession() before attempting to call tool."});throw this.emitError(v),v}switch(this.connectionType){case n.ConnectionType.SOCKET:try{const b=await this.resourceManager.callTool(this.sessionConfig.session_id,g,y);if(b.err)throw new c.APIError(b.err.msg,500,b.err);return b}catch(b){if(b instanceof c.APIError&&b?.status===401)return await this.handleSessionExpiry(),await this.callTool(g,y);throw b}default:const v=new c.ConnectionError("Unsupported connection type",{context:{stage:"callTool",connectionType:this.connectionType}});throw this.emitError(v),v}}async startRecording({onChunks:g,onError:y}){if(!this.connection){const v=new c.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"sendAudio"},hint:"Call startSession() before attempting to send audio."});throw this.emitError(v),v}switch(this.connectionType){case n.ConnectionType.SOCKET:try{await this.messageManager.startRecording({onChunks:g,onError:y})}catch(b){throw b}break;default:const v=new c.ConnectionError("Unsupported connection type",{context:{stage:"sendAudio",connectionType:this.connectionType}});throw this.emitError(v),v}}endRecording(){if(!this.connection){const g=new c.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"endRecording"},hint:"Call startRecording() before attempting to stop recording."});throw this.emitError(g),g}switch(this.connectionType){case n.ConnectionType.SOCKET:this.messageManager.endRecordingWithSocket();break;default:const g=new c.ConnectionError("Unsupported connection type",{context:{stage:"endRecording",connectionType:this.connectionType}});throw this.emitError(g),g}}isConnected(){return this.connection?.isConnected()??!1}endSession(){this.connection&&(this.connection.close(),this.connection=null),this.messageManager&&this.messageManager.cleanupMessageServerState()}emitError(g){this.config.callbacks?.onError?.(g)}toSessionError(g,y,v,b){return(0,c.normalizeError)(g,c.SessionError,y,{context:v,hint:b})}async initializeConnection(g){if(this.connection&&(this.connection.close(),this.connection=null),!g.session_id||!g.session_token)throw new c.SessionError("Session ID or token not found",{context:{stage:"initializeConnection"},hint:"Ensure the session API returns both identifiers."});this.sessionConfig=g;const y=(0,l.getConfig)(this.config?.environment).WEBSOCKET_URL,v=(this.config.connectionType==="socket",n.ConnectionType.SOCKET);this.connection=await n.ConnectionFactory.createConnection(v,{serverUrl:y,auth:{sessionId:g.session_id,sessionToken:g.session_token},agentId:this.config.agentId,userId:this.config.userId,overrides:this.config.overrides}),this.messageManager=new o.MessageManager(this.connection,this.config?.callbacks)}async manageSession(g){try{if(!g?.session_id)return this.createNewSession();const y=await this.resourceManager.validateSession(g.session_id);return y.active?g:y.expired?this.refreshSession(g.session_id,g.session_token):this.createNewSession()}catch(y){if(y instanceof c.APIError){const v=y.status;if(v===404||v===500)return this.createNewSession()}throw this.toSessionError(y,"Failed to resolve session",{stage:"resolveSession"})}}async refreshSession(g,y){try{return await this.resourceManager.refreshSession(g,y)}catch(v){if(v instanceof c.APIError){this.emitError(v);const b=v.status;if(b===404||b===500)return this.createNewSession()}throw this.toSessionError(v,"Failed to refresh session",{stage:"refreshSession",sessionId:g})}}async createNewSession(){return await this.resourceManager.createSession(this.config.userId||Date.now().toString())}setupEventHandlers(){if(this.connection){switch(this.connectionType){case n.ConnectionType.SOCKET:this.connection.onOpen(()=>{this.onSocketConnectionOpen()}),this.connection.onMessage(g=>{this.onIncomingSocketMessage(g)}),this.connection.onError(g=>{this.onSocketConnectionError(g)}),this.connection.on(u.SYNAPSE_REALTIME_RESERVED_EVENTS.SESSION_EXPIRED,()=>{this.handleSessionExpiry()});break;default:throw new c.ConnectionError("Unsupported connection type",{context:{stage:"setupEventHandlers",connectionType:this.connectionType},hint:"Use ConnectionType.SOCKET or provide a custom handler."})}this.connection.onDisconnect(g=>{this.messageManager.handleDisconnect(g)})}}onSocketConnectionError(g){this.connection?.emit(u.SYNAPSE_REALTIME_EVENTS.ERROR,g);const y=this.toConnectionError(g,"WebSocket connection error",{stage:"onSocketConnectionError"},"Verify network connectivity or attempt to reconnect.");this.emitError(y)}onSocketConnectionOpen(){if(!this.sessionConfig?.session_token){const g=new c.SessionError("Session token not set. Call startSession() first.",{context:{stage:"onSocketConnectionOpen"},hint:"Ensure startSession() completes successfully before socket opens."});throw this.emitError(g),g}this.messageManager.sendSocketAuthMessage(this.sessionConfig.session_token)}onIncomingSocketMessage(g){switch(g.ev){case f.SOCKET_EVENTS.CHAT:this.messageManager.handleIncomingSocketChatMessage(g);break;case f.SOCKET_EVENTS.CONNECTION_ESTABLISHED:this.messageManager.handleConnectionEstablished();break;case f.SOCKET_EVENTS.STREAM:this.messageManager.handleIncomingSocketStreamMessage(g);break;case f.SOCKET_EVENTS.END_OF_STREAM:this.messageManager.handleIncomingSocketEndOfStreamMessage(g);break;case f.SOCKET_EVENTS.PING:this.messageManager.sendSocketPongMessage();break;case f.SOCKET_EVENTS.PONG:this.messageManager.sendSocketPingMessage();break;case f.SOCKET_EVENTS.SYNC:break;case f.SOCKET_EVENTS.ERROR:this.messageManager.handleIncomingSocketErrorMessage(g);break;default:const y=new c.MessageError("Unsupported message type",{context:{stage:"onIncomingSocketMessage",event:g.ev??"unknown"},hint:"Ensure the server is sending supported socket events."});this.emitError(y);return}}async handleSessionExpiry(){try{if(this.endSession(),!this.sessionConfig?.session_id||!this.sessionConfig?.session_token){const y=new c.SessionError("Session ID or token not found",{context:{stage:"handleSessionExpiry"}});throw this.emitError(y),y}const g=await this.refreshSession(this.sessionConfig.session_id,this.sessionConfig.session_token);if(!g.session_id||!g.session_token)throw new c.SessionError("Session refresh failed",{context:{stage:"handleSessionExpiry"}});this.sessionConfig.session_id=g.session_id,this.sessionConfig.session_token=g.session_token,await this.initializeConnection(g),this.setupEventHandlers(),this.config.callbacks?.onSessionRefreshed?.(g)}catch(g){const y=this.toSessionError(g,"Session expired",{stage:"handleSessionExpiry"});this.emitError(y)}}toConnectionError(g,y,v,b){return(0,c.normalizeError)(g,c.ConnectionError,y,{context:v,hint:b})}}return pa.SynapseSDK=h,pa}var Ps={},Yh;function YS(){return Yh||(Yh=1,Object.defineProperty(Ps,"__esModule",{value:!0})),Ps}var Aa={},Vh;function VS(){return Vh||(Vh=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.USER_FEEDBACK=void 0,Aa.USER_FEEDBACK={LIKE:"LIKE",DISLIKE:"DISLIKE",NONE:"NONE"}),Aa}var Fs={},Gh;function GS(){return Gh||(Gh=1,Object.defineProperty(Fs,"__esModule",{value:!0})),Fs}var ka={},Xh;function XS(){return Xh||(Xh=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.ErrorType=void 0,ka.ErrorType={NETWORK_ERROR:"NETWORK_ERROR",TIMEOUT_ERROR:"TIMEOUT_ERROR",API_ERROR:"API_ERROR",RATE_LIMIT_ERROR:"RATE_LIMIT_ERROR",SERVER_ERROR:"SERVER_ERROR",PARSE_ERROR:"PARSE_ERROR",UNKNOWN_ERROR:"UNKNOWN_ERROR"}),ka}var Ys={},Zh;function ZS(){return Zh||(Zh=1,Object.defineProperty(Ys,"__esModule",{value:!0})),Ys}var Kh;function KS(){return Kh||(Kh=1,(function(n){var l=Hr&&Hr.__createBinding||(Object.create?(function(T,_,A,j){j===void 0&&(j=A);var B=Object.getOwnPropertyDescriptor(_,A);(!B||("get"in B?!_.__esModule:B.writable||B.configurable))&&(B={enumerable:!0,get:function(){return _[A]}}),Object.defineProperty(T,j,B)}):(function(T,_,A,j){j===void 0&&(j=A),T[j]=_[A]})),i=Hr&&Hr.__exportStar||function(T,_){for(var A in T)A!=="default"&&!Object.prototype.hasOwnProperty.call(_,A)&&l(_,T,A)};Object.defineProperty(n,"__esModule",{value:!0}),n.SYNAPSE_MESSAGE_TYPES=n.ErrorUtils=n.ErrorType=n.SynapseErrorCode=n.InternalServerError=n.RateLimitError=n.MethodNotAllowedError=n.NotFoundError=n.PermissionDeniedError=n.UnauthorizedError=n.BadRequestError=n.APIConnectionTimeoutError=n.APIUserAbortError=n.APIError=n.SynapseError=n.HttpClient=n.MessageManager=n.ToolCall=n.Session=n.ResourceManager=n.ConnectionType=n.ConnectionFactory=n.WebSocketConnection=n.BaseConnection=n.SynapseSDK=void 0;var o=FS();Object.defineProperty(n,"SynapseSDK",{enumerable:!0,get:function(){return o.SynapseSDK}});var u=ph();Object.defineProperty(n,"BaseConnection",{enumerable:!0,get:function(){return u.BaseConnection}});var s=bh();Object.defineProperty(n,"WebSocketConnection",{enumerable:!0,get:function(){return s.WebSocketConnection}});var c=Sh();Object.defineProperty(n,"ConnectionFactory",{enumerable:!0,get:function(){return c.ConnectionFactory}}),Object.defineProperty(n,"ConnectionType",{enumerable:!0,get:function(){return c.ConnectionType}}),i(Is(),n);var f=Mh();Object.defineProperty(n,"ResourceManager",{enumerable:!0,get:function(){return f.ResourceManager}}),i(YS(),n);var h=Ah();Object.defineProperty(n,"Session",{enumerable:!0,get:function(){return h.Session}}),i(VS(),n);var m=Oh();Object.defineProperty(n,"ToolCall",{enumerable:!0,get:function(){return m.ToolCall}}),i(Nh(),n);var g=Hh();Object.defineProperty(n,"MessageManager",{enumerable:!0,get:function(){return g.MessageManager}}),i(Pl(),n),i(GS(),n);var y=_h();Object.defineProperty(n,"HttpClient",{enumerable:!0,get:function(){return y.HttpClient}});var v=On();Object.defineProperty(n,"SynapseError",{enumerable:!0,get:function(){return v.SynapseError}}),Object.defineProperty(n,"APIError",{enumerable:!0,get:function(){return v.APIError}}),Object.defineProperty(n,"APIUserAbortError",{enumerable:!0,get:function(){return v.APIUserAbortError}}),Object.defineProperty(n,"APIConnectionTimeoutError",{enumerable:!0,get:function(){return v.APIConnectionTimeoutError}}),Object.defineProperty(n,"BadRequestError",{enumerable:!0,get:function(){return v.BadRequestError}}),Object.defineProperty(n,"UnauthorizedError",{enumerable:!0,get:function(){return v.UnauthorizedError}}),Object.defineProperty(n,"PermissionDeniedError",{enumerable:!0,get:function(){return v.PermissionDeniedError}}),Object.defineProperty(n,"NotFoundError",{enumerable:!0,get:function(){return v.NotFoundError}}),Object.defineProperty(n,"MethodNotAllowedError",{enumerable:!0,get:function(){return v.MethodNotAllowedError}}),Object.defineProperty(n,"RateLimitError",{enumerable:!0,get:function(){return v.RateLimitError}}),Object.defineProperty(n,"InternalServerError",{enumerable:!0,get:function(){return v.InternalServerError}}),Object.defineProperty(n,"SynapseErrorCode",{enumerable:!0,get:function(){return v.SynapseErrorCode}});var b=XS();Object.defineProperty(n,"ErrorType",{enumerable:!0,get:function(){return b.ErrorType}});var w=Ph();Object.defineProperty(n,"ErrorUtils",{enumerable:!0,get:function(){return w.ErrorUtils}}),i(ZS(),n);var E=Pl();Object.defineProperty(n,"SYNAPSE_MESSAGE_TYPES",{enumerable:!0,get:function(){return E.SYNAPSE_MESSAGE_TYPES}})})(Hr)),Hr}var Pe=KS();const Qh=n=>{let l;const i=new Set,o=(m,g)=>{const y=typeof m=="function"?m(l):m;if(!Object.is(y,l)){const v=l;l=g??(typeof y!="object"||y===null)?y:Object.assign({},l,y),i.forEach(b=>b(l,v))}},u=()=>l,f={setState:o,getState:u,getInitialState:()=>h,subscribe:m=>(i.add(m),()=>i.delete(m))},h=l=n(o,u,f);return f},QS=(n=>n?Qh(n):Qh),JS=n=>n;function WS(n,l=JS){const i=ua.useSyncExternalStore(n.subscribe,ua.useCallback(()=>l(n.getState()),[n,l]),ua.useCallback(()=>l(n.getInitialState()),[n,l]));return ua.useDebugValue(i),i}const $S=n=>{const l=QS(n),i=o=>WS(l,o);return Object.assign(i,l),i},e1=(n=>$S);function Jh(n,l){let i;try{i=n()}catch{return}return{getItem:u=>{var s;const c=h=>h===null?null:JSON.parse(h,void 0),f=(s=i.getItem(u))!=null?s:null;return f instanceof Promise?f.then(c):c(f)},setItem:(u,s)=>i.setItem(u,JSON.stringify(s,void 0)),removeItem:u=>i.removeItem(u)}}const Vs=n=>l=>{try{const i=n(l);return i instanceof Promise?i:{then(o){return Vs(o)(i)},catch(o){return this}}}catch(i){return{then(o){return this},catch(o){return Vs(o)(i)}}}},t1=(n,l)=>(i,o,u)=>{let s={storage:Jh(()=>localStorage),partialize:E=>E,version:0,merge:(E,T)=>({...T,...E}),...l},c=!1;const f=new Set,h=new Set;let m=s.storage;if(!m)return n((...E)=>{i(...E)},o,u);const g=()=>{const E=s.partialize({...o()});return m.setItem(s.name,{state:E,version:s.version})},y=u.setState;u.setState=(E,T)=>(y(E,T),g());const v=n((...E)=>(i(...E),g()),o,u);u.getInitialState=()=>v;let b;const w=()=>{var E,T;if(!m)return;c=!1,f.forEach(A=>{var j;return A((j=o())!=null?j:v)});const _=((T=s.onRehydrateStorage)==null?void 0:T.call(s,(E=o())!=null?E:v))||void 0;return Vs(m.getItem.bind(m))(s.name).then(A=>{if(A)if(typeof A.version=="number"&&A.version!==s.version){if(s.migrate){const j=s.migrate(A.state,A.version);return j instanceof Promise?j.then(B=>[!0,B]):[!0,j]}}else return[!1,A.state];return[!1,void 0]}).then(A=>{var j;const[B,U]=A;if(b=s.merge(U,(j=o())!=null?j:v),i(b,!0),B)return g()}).then(()=>{_?.(b,void 0),b=o(),c=!0,h.forEach(A=>A(b))}).catch(A=>{_?.(void 0,A)})};return u.persist={setOptions:E=>{s={...s,...E},E.storage&&(m=E.storage)},clearStorage:()=>{m?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>w(),hasHydrated:()=>c,onHydrate:E=>(f.add(E),()=>{f.delete(E)}),onFinishHydration:E=>(h.add(E),()=>{h.delete(E)})},s.skipHydration||w(),b||v},en={USER:"user",ASSISTANT:"assistant"};var Ht=(n=>(n.IDLE="idle",n.LISTENING="listening",n.ERROR="error",n.PROCESSING="processing",n.TRANSCRIBING="transcribing",n))(Ht||{});const n1={sessionId:"",sessionToken:"",isStreaming:!1,recordingStatus:Ht.IDLE,isWaitingForResponse:!1,error:null,isTimeoutError:!1,startNewConnection:!1,showRetryButton:!1,chats:{},inlineText:null,isRefreshingSession:!1,ConnectionStatus:Pe.ConnectionStatus.CONNECTING,streamingTimeoutId:null,responseTimeoutId:null,lastStreamingActivity:null,progressMessage:null},Yr=e1()(t1((n,l)=>({sessionId:"",setSessionId:i=>n({sessionId:i}),sessionToken:"",setSessionToken:i=>n({sessionToken:i}),initialMessage:null,setInitialMessage:i=>n({initialMessage:i}),agentId:"",setAgentId:i=>n({agentId:i}),connectionStatus:Pe.ConnectionStatus.CONNECTING,setConnectionStatus:i=>n({connectionStatus:i}),isStreaming:!1,setIsStreaming:i=>n({isStreaming:i}),isWaitingForResponse:!1,setIsWaitingForResponse:i=>n({isWaitingForResponse:i}),progressMessage:null,setProgressMessage:i=>n({progressMessage:i}),recordingStatus:Ht.IDLE,setRecordingStatus:i=>n({recordingStatus:i}),startNewConnection:!1,setStartNewConnection:i=>n({startNewConnection:i}),inlineText:null,setInlineText:i=>n({inlineText:i}),isBotIconAnimating:!1,setIsBotIconAnimating:i=>n({isBotIconAnimating:i}),chats:{},addMessageToSession:(i,o)=>{n(u=>({chats:{...u.chats,[i]:[...u.chats[i]||[],o]}}))},updateMessageInSession:(i,o,u)=>n(s=>({chats:{...s.chats,[i]:(s.chats[i]||[]).map(c=>c.id===o?{...c,...u}:c)}})),getMessagesForSession:i=>l().chats[i]||[],clearMessagesForSession:i=>n(o=>({chats:{...o.chats,[i]:[]}})),clearAllChats:()=>n({chats:{}}),error:null,setError:i=>n({error:i}),clearError:()=>n({error:null,isTimeoutError:!1,showRetryButton:!1,startNewConnection:!1}),showRetryButton:!1,setShowRetryButton:i=>n({showRetryButton:i}),isTimeoutError:!1,setTimeoutError:i=>n({isTimeoutError:i}),clearSession:async()=>{n(n1),await localStorage.removeItem("med-assist-store")},streamingTimeoutId:null,setStreamingTimeoutId:i=>n({streamingTimeoutId:i}),clearStreamingTimeout:()=>{const i=l();i.streamingTimeoutId&&(clearTimeout(i.streamingTimeoutId),n({streamingTimeoutId:null}))},responseTimeoutId:null,setResponseTimeoutId:i=>n({responseTimeoutId:i}),clearResponseTimeout:()=>{const i=l();i.responseTimeoutId&&(clearTimeout(i.responseTimeoutId),n({responseTimeoutId:null}))},lastStreamingActivity:null,setLastStreamingActivity:i=>n({lastStreamingActivity:i})}),{name:"med-assist-store",storage:Jh(()=>localStorage),partialize:n=>({agentId:n.agentId,chats:n.chats,sessionId:n.sessionId,sessionToken:n.sessionToken,initialMessage:n.initialMessage,connectionStatus:n.connectionStatus})}));function r1({onClose:n,title:l,iconUrl:i,startNewConversation:o}){const u=Yr(f=>f.connectionStatus),c=(()=>{switch(u){case Pe.ConnectionStatus.CONNECTED:return{dotColor:"bg-green-500",text:"Connected",textColor:"text-green-600"};case Pe.ConnectionStatus.CONNECTING:return{dotColor:"bg-amber-500",text:"Connecting",textColor:"text-amber-600"};case Pe.ConnectionStatus.NOT_CONNECTED:return{dotColor:"bg-red-500",text:"Not Connected",textColor:"text-red-600"};default:return{dotColor:"bg-gray-400",text:"Not Connected",textColor:"text-gray-600"}}})();return R.jsx("div",{className:"bg-lavender-100/95 backdrop-blur-md shadow-lg border-b border-lavender-200/60 px-6 py-2",children:R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsxs("div",{className:"flex items-center gap-3",children:[R.jsxs("div",{className:"relative flex-shrink-0",children:[R.jsx(ha,{className:"w-12 h-12 bg-gradient-to-br from-lavender-400 to-lavender-500 flex-shrink-0 shadow-md ring-0",children:R.jsx(ma,{className:"text-white font-bold text-lg bg-transparent",children:i?R.jsx("img",{src:i,alt:"Bot Icon",className:"w-12 h-12 rounded-full object-cover"}):R.jsx("span",{className:"text-white font-bold text-lg bg-transparent",children:"MC"})})}),R.jsx("div",{className:Ve("absolute bottom-0 right-0 w-3.5 h-3.5 rounded-full border-2 border-white shadow-sm",c.dotColor,u===Pe.ConnectionStatus.CONNECTING&&"animate-pulse")})]}),R.jsxs("div",{className:"flex flex-col",children:[R.jsx("p",{className:"text-lg font-semibold text-slate-900",children:l||"Health Assist"}),R.jsx("div",{className:"flex items-center gap-1.5",children:R.jsx("span",{className:Ve("text-xs font-medium",c.textColor),children:c.text})})]})]}),R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx(kt,{type:"button",variant:"ghost",size:"icon",title:"Start New Chat",onClick:o,className:"h-8 w-8 text-slate-600 hover:text-slate-900 hover:bg-white/60 active:bg-white/80 rounded-xl transition-all duration-200",children:R.jsx(vS,{className:"w-8 h-8"})}),R.jsx(kt,{onClick:n,type:"button",variant:"ghost",size:"icon",title:"Close",className:"h-8 w-8 text-slate-600 hover:text-slate-900 hover:bg-white/60 active:bg-white/80 rounded-xl transition-all duration-200",children:R.jsx(Os,{className:"w-8 h-8"})})]})]})})}const i1=P.lazy(()=>Promise.resolve().then(()=>m1));function a1({isOpen:n,onClose:l,iconUrl:i,onStartNewSession:o,children:u,title:s,sessionId:c,chatComposer:f,environment:h}){const[m,g]=P.useState(!1),y=P.useRef(null);P.useEffect(()=>{const w=()=>{const E=window?.innerWidth??0,T=navigator?.userAgent?.toLowerCase()??"",_=E<768||/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(T);g(_)};return w(),window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},[]),P.useEffect(()=>{if(!n||!m||!y.current)return;const w=y.current;let E=null,T=null;if(window.visualViewport){const _=()=>{if(w&&window.visualViewport){const B=window.visualViewport.height,U=window.visualViewport.offsetTop;E=requestAnimationFrame(()=>{w.style.transition="none",w.style.top=`${U}px`,w.style.left="0",w.style.right="0",w.style.bottom="auto",w.style.width="100vw",w.style.height=`${B}px`,w.style.maxHeight=`${B}px`,w.style.minHeight=`${B}px`,T&&clearTimeout(T),T=setTimeout(()=>{w.style.transition=""},100)})}},A=()=>{_()},j=()=>{if(w&&window.visualViewport){const B=window.visualViewport.offsetTop;E=requestAnimationFrame(()=>{w.style.transition="none",w.style.top=`${B}px`,setTimeout(()=>{w.style.transition=""},50)})}};return window.visualViewport.addEventListener("resize",A),window.visualViewport.addEventListener("scroll",j),_(),()=>{E&&cancelAnimationFrame(E),T&&clearTimeout(T),window.visualViewport?.removeEventListener("resize",A),window.visualViewport?.removeEventListener("scroll",j)}}else{const _=()=>{w&&(w.style.transition="none",w.style.top="0",w.style.left="0",w.style.right="0",w.style.bottom="auto",w.style.width="100vw",w.style.height="100svh",w.style.maxHeight="100svh",setTimeout(()=>{w.style.transition=""},100))};return window.addEventListener("resize",_),_(),()=>{window.removeEventListener("resize",_)}}},[n,m]),P.useEffect(()=>{if(n){const w=document.body.style.overflow,E=document.body.style.paddingRight,T=document.documentElement.style.overflow,_=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",_>0&&!m&&(document.body.style.paddingRight=`${_}px`),()=>{document.body.style.overflow=w,document.body.style.paddingRight=E,document.documentElement.style.overflow=T}}},[n,m]);const v=Ve("synapse-chat-widget-container","fixed m-0 p-0","box-border",m?"":"transition-all duration-300",m?"w-screen h-[100svh]":"bottom-4 right-4 w-96 h-[600px]","z-[2147483647]",n?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none scale-95"),b=Ve("w-full h-full",m?"bg-white":"bg-white/90 backdrop-blur-2xl","shadow-2xl","flex flex-col","overflow-hidden","border border-white/50 ring-1 ring-white/60",m?"rounded-none":"rounded-3xl");return R.jsxs("div",{ref:y,className:v,style:{margin:0,padding:0,border:"none",outline:"none",position:"fixed",zIndex:2147483647,fontSize:"16px",lineHeight:"2.5",userSelect:"auto",...m&&{top:0,left:0,right:0,bottom:0,width:"100vw",maxHeight:"100svh",height:"100svh",minHeight:"100svh",backgroundColor:"white"}},children:[R.jsx("style",{children:`
|
|
11
11
|
/* Isolate widget from host website styles */
|
|
12
12
|
.synapse-chat-widget-container,
|
|
13
13
|
.synapse-chat-widget-container *,
|
|
@@ -40,18 +40,18 @@ Error generating stack: `+a.message+`
|
|
|
40
40
|
max-height: 100svh;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
`}),O.jsxs(da,{className:b,children:[O.jsx("div",{className:"flex-shrink-0 sticky top-0 z-50",children:O.jsx(r1,{onClose:l,title:s,iconUrl:i,startNewConversation:o})}),O.jsx("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col",children:u}),f&&O.jsxs("div",{className:"flex-shrink-0 sticky bottom-0 z-50",children:[O.jsx(P.Suspense,{fallback:null,children:O.jsx(i1,{value:f.value,onChange:f.onChange,onSend:f.onSend,onFileChange:f.onFileChange,onRecording:f.onRecording,isRecording:f.isRecording,hasAttachment:f.hasAttachment,attachmentFiles:f.attachmentFiles,isDisabled:f.isDisabled,isMobile:h,placeholder:f.placeholder,recordingStatus:f.recordingStatus})}),c&&m==="development"&&O.jsx("div",{className:"px-6 flex justify-center items-center",children:O.jsxs("p",{className:"text-[8px] text-gray-600 font-mono opacity-50",children:["Session ID: ",c]})})]})]})]})}function Wh(){const[n,l]=P.useState(typeof navigator<"u"?navigator.onLine:!0);return P.useEffect(()=>{const i=()=>l(!0),o=()=>l(!1);return window.addEventListener("online",i),window.addEventListener("offline",o),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",o)}},[]),{isOnline:n}}const l1=({environment:n,userId:l,onInlineText:i})=>{const[o,u]=P.useState([]),[s,c]=P.useState(!1),[f,m]=P.useState(0),[h,g]=P.useState(!1),[y,v]=P.useState([]),b=P.useRef(null),w=P.useRef(null),{isOnline:E}=Wh(),{agentId:T,setSessionId:_,setSessionToken:A,sessionId:k,sessionToken:q,setError:H,setConnectionStatus:M,setShowRetryButton:I,setStartNewConnection:Y,setIsStreaming:F,setIsWaitingForResponse:$,isStreaming:ie,initialMessage:D,isWaitingForResponse:ne,setProgressMessage:C,setRecordingStatus:V,clearSession:Z,addMessageToSession:Q,getMessagesForSession:se,updateMessageInSession:de,setInitialMessage:L}=Yr();P.useEffect(()=>{E?h?B()&&(M(Ge.ConnectionStatus.CONNECTED),re()):M(Ge.ConnectionStatus.CONNECTING):M(Ge.ConnectionStatus.NOT_CONNECTED)},[E,h]),P.useEffect(()=>{if(k){const S=se(k)||[];u(S),v([])}},[k]),P.useEffect(()=>{if(g(!1),!T)return;const S=new Ge.SynapseSDK({agentId:T,environment:n,userId:l,callbacks:{onError:K=>{if(K instanceof Ge.SynapseError)switch(K.code){case Ge.SynapseErrorCode.SESSION:M(Ge.ConnectionStatus.NOT_CONNECTED),I(!0);break;case Ge.SynapseErrorCode.RECORDING:H({title:"Recording failed",description:K?.displayMessage||"Please try again later"});break;default:H({title:"Something went wrong",description:"Please try again later"}),I(!0);break}},onSessionRefreshed:K=>{K?.session_id&&K?.session_token&&(_(K.session_id),A(K.session_token))}}});return b.current=S,g(!0),()=>{g(!1),b.current?.endSession(),b.current=null,w.current&&(clearTimeout(w.current),w.current=null)}},[T,n,l]),P.useEffect(()=>{const S=o[o.length-1];!S?.role||!k||(S?.role===On.USER?Q(k,S):!ie&&!S.isStored&&(u(K=>{const W=[...K];return W[W.length-1]={...S,isStored:!0},W}),Q(k,{...S,isStored:!0})))},[o,ie]),P.useEffect(()=>{const S=o[o.length-1];return()=>{S&&!S?.isStored&&k&&Q(k,{...S,isStored:!0})}},[]),P.useEffect(()=>(w.current&&(clearTimeout(w.current),w.current=null),ne&&!ie?w.current=setTimeout(()=>{$(!1),w.current=null},3e4):ie&&w.current&&(clearTimeout(w.current),w.current=null),()=>{w.current&&(clearTimeout(w.current),w.current=null)}),[ne,ie,$]);const N=async(S=!1)=>{try{if(!b.current){H({title:"SDK not initialized",description:"Please ensure agentId is configured"}),c(!1);return}c(!0);let K;S?(await Z(),re(),K=await b.current.startSession()):K=await b.current.startSession({session_id:k||"",session_token:q||""}),K?.session_id&&K?.session_token&&(_(K.session_id),A(K.session_token),K?.initial_message?.text&&K?.initial_message?.suggestions?.length&&L(K.initial_message)),ce()}catch{H({title:"Something Went wrong!",description:"Please try again later."}),c(!1);return}finally{c(!1)}},B=()=>b.current?.isConnected()??!1,z=()=>{b.current?.endSession()},re=()=>{m(0),I(!1),Y(!1),H(null)},ce=()=>{b.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,S=>{const K=S;if(K.data?.text&&K.messageId){ie||($(!1),F(!0));const W=K.data.text,U=K.messageId,j=K.timestamp;u(X=>{const he=X[X.length-1];if(he&&he.id===U&&he.role===On.ASSISTANT){const pe=[...X];return pe[pe.length-1]={...he,content:he.content+W},pe}else return[...X,{id:U,content:W,role:On.ASSISTANT,timestamp:fa(j??Date.now()),isStored:!1}]})}}),b.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM,()=>{F(!1),C(null)}),b.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.CONNECTED,()=>{re(),M(Ge.ConnectionStatus.CONNECTED)}),b.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,S=>{const K=S;if(!K?.messageId||!K?.data||!K?.data?.details?.component)return;const W=K.messageId,U=K.timestamp??Date.now();u(j=>{const X=j[j.length-1];if(X.id===W&&X.role===On.ASSISTANT){const he=[...j],pe={...X,toolEscalationData:{...K.data,isResponded:!1},isResponseFromTool:!0};return he[j.length-1]=pe,de(k,W,pe),he}else{const he={id:W,content:K.data?.text||"",role:On.ASSISTANT,toolEscalationData:{...K.data,isResponded:!1},isResponseFromTool:!0,timestamp:fa(U),isStored:!1};return[...j,he]}})}),b.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,S=>{M(Ge.ConnectionStatus.NOT_CONNECTED),f<2?(m(K=>K+1),I(!0)):Y(!0)}),b.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.ERROR,S=>{I(!0)}),b.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.INLINE_TEXT,S=>{const K=S;K?.data?.text&&i&&(V(Ft.IDLE),i?.(K.data.text)),F(!1),$(!1),C(null)}),b.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE,S=>{const K=S;K.data?.text&&($(!1),C(K.data.text))})},we=async({message:S,messageId:K,files:W,audio:U,toolCalled:j})=>{if(!B()||W&&W.length<0&&S?.trim()===""&&!U?.audio)return;H(null);const X=o.length==2&&y.length==2?y:null;if(S||W&&W.length>0||U?.audio){const he=o.length-1,pe=he>=0?o[he]:null,le=pe?pe?.isResponseFromTool||pe.role===On.ASSISTANT&&pe.toolEscalationData:null;await b.current?.sendMessage({message:S,files:W,audio:U,...X&&{initial_prompts:X},...le&&!j?{tool_declined:!0,tool_id:pe?.toolEscalationData?.tool_id||""}:{}}),u(Ee=>{const _e=[...Ee],Se=_e.length-1;return le&&Se>=0&&_e[Se].toolEscalationData&&(_e[Se]={..._e[Se],toolEscalationData:{..._e[Se].toolEscalationData,tool_id:null,isResponded:!0}},de(k,_e[he].id||Date.now().toString(),_e[he])),[..._e,{id:K||Date.now().toString(),content:S||"",files:W||[],role:On.USER,timestamp:fa(Date.now()),isStored:!0}]}),$(!0)}};return{sendMessage:we,startSession:N,incomingMessages:o,loading:s,endSession:z,isReady:h,startRecording:async()=>{if(!B())throw new Error("Not connected to the server");try{await b.current?.startRecording({onChunks:async S=>{V(Ft.PROCESSING),await we({audio:S}),V(Ft.TRANSCRIBING)},onError(S){V(Ft.IDLE)}}),V(Ft.LISTENING)}catch(S){throw V(Ft.IDLE),S}},stopRecording:()=>{B()&&b.current?.endRecording()},handleRetry:async()=>{if(!B())re(),await N(!1);else{const S=o[o.length-1];S&&S.role===On.USER&&b.current?.sendMessage({message:S.content,files:S.files||[],messageId:S.id})}},isValidFile:S=>{const K=S.type.toLowerCase(),U=S.name.toLowerCase().split(".").pop()||"";return K&&["application/pdf","image/jpeg","image/jpg","image/png","image/heic","image/heif","application/vnd.openxmlformats-officedocument.wordprocessingml.document","image/tiff","text/plain","text/markdown"].some(X=>K.includes(X))?!0:!K||K===""?["pdf","jpg","jpeg","png","heic","docx","tiff","txt","md"].includes(U):!1},handleStartNewConnection:async()=>{re(),await Z(),await N(!0)},callTool:async(S,K)=>{try{if(!B())throw new Error("Not connected to the server");const W=await b.current?.callTool(S,K);if(!W)throw new Error("Failed to call tool");return W}catch(W){throw W}},handleInitialTaskClick:async S=>{if(!D?.suggestions.length||!S)return;const K=D.suggestions.find(W=>W.value===S);if(!K||!K.response){await we({message:S});return}u(W=>[...W,{id:Date.now().toString(),content:S,role:On.USER,timestamp:fa(Date.now()),isStored:!0}]),$(!0),await Jv(1e3),$(!1),u(W=>[...W,{id:Date.now().toString(),content:K.response||"Please try again",role:On.ASSISTANT,timestamp:fa(Date.now()),isStored:!1}]),v([{role:"user",text:S},{role:"assistant",text:K.response}])}}},o1=P.lazy(()=>Promise.resolve().then(()=>Gw)),s1=P.lazy(()=>Promise.resolve().then(()=>Kw)),u1=P.lazy(()=>Promise.resolve().then(()=>Jw).then(n=>({default:n.ConnectionStatus})));function c1({isOpen:n,agentId:l,config:i}){const[o,u]=P.useState(""),[s,c]=P.useState(!1),[f,m]=P.useState(!1),[h,g]=P.useState([]),y=P.useRef(!1),v=P.useRef(null),b=P.useRef(null),[w,E]=P.useState(!1),T=P.useRef(0),{setAgentId:_,startNewConnection:A,showRetryButton:k,clearError:q,error:H,connectionStatus:M,recordingStatus:I,isWaitingForResponse:Y,isStreaming:F,setError:$,initialMessage:ie,sessionId:D}=Yr(),{incomingMessages:ne,loading:C,sendMessage:V,startSession:Z,isReady:Q,startRecording:se,stopRecording:de,handleRetry:L,handleStartNewConnection:N,isValidFile:B,callTool:z,handleInitialTaskClick:re}=l1({environment:"production",onInlineText:j=>{u(X=>X+j)}});P.useEffect(()=>{l&&(_(l),n&&Q&&!y.current&&(y.current=!0,Z(!1)))},[n,Q,l]);const ce=()=>v.current?.querySelector("[data-radix-scroll-area-viewport]")||null,we=()=>{const j=ce();j&&(j.scrollTo({top:j.scrollHeight,behavior:"smooth"}),E(!1))},Te=()=>{const j=ce();return j?j.scrollHeight-j.scrollTop-j.clientHeight<50:!0};P.useEffect(()=>{ne.length>T.current&&(setTimeout(()=>{we()},100),T.current=ne.length)},[ne.length]),P.useEffect(()=>{const j=ce();if(!j)return;const X=()=>{E(!Te())},he=()=>{X()},pe=new MutationObserver(()=>{X()});return pe.observe(j,{childList:!0,subtree:!0}),j.addEventListener("scroll",he),X(),()=>{pe.disconnect(),j.removeEventListener("scroll",he)}},[ne.length]);const ke=ne.length>0,Ae=M===Ge.ConnectionStatus.CONNECTED,He=C||!Ae||Y||F,ve=C||!Ae,ze=P.useMemo(()=>I===Ft.IDLE?null:I===Ft.LISTENING?"Listening...":I===Ft.PROCESSING?"Processing...":I===Ft.TRANSCRIBING?"Transcribing...":null,[I]),je=ve?"Connecting...":ze||(Y||F?"Please wait for the response...":"Ask me anything…"),S=async()=>{if(!He&&(o.trim()||s||f)){const j=Date.now().toString();h.length>0?(await V({files:h,message:o.trim(),messageId:j}),g([]),m(!1)):o.trim()&&await V({message:o,messageId:j}),u(""),c(!1),m(!1),setTimeout(()=>{we()},100)}},K=async j=>{j&&await re(j)},W=j=>{if(j&&j.length>0){const X=j.filter(he=>B(he)?!0:($({title:`File type not supported: ${he.name}`,description:"Only PDF, images (JPG, JPEG, PNG, HEIC), documents (DOCX, TIFF), and text files (TXT, MD) are allowed."}),!1));if(X?.length>0)j=X;else return}g(X=>(m((X?.length??0)+(j?.length??0)>0),[...X,...j]))},U=async()=>{if(s)await de(),c(!1);else{if(He)return;try{await se(),c(!0)}catch{}}};return O.jsx(a1,{isOpen:n,onClose:i.onClose,title:i.title,iconUrl:i.iconUrl,onStartNewSession:()=>Z(!0),sessionId:D,environment:i.environment,chatComposer:{value:o,onChange:u,onSend:S,onFileChange:W,onRecording:U,isRecording:s,hasAttachment:f,attachmentFiles:h,isDisabled:He,placeholder:je,recordingStatus:I},children:!C&&O.jsx(P.Suspense,{fallback:O.jsx(f1,{}),children:O.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl relative",children:[O.jsx(Ud,{ref:v,className:"flex-1 min-h-0",children:O.jsxs("div",{className:Ye("transition-all duration-300",ke?"p-4 space-y-3":"p-6 space-y-6"),children:[!ke&&ie?.text?O.jsx(s1,{tasks:ie.suggestions,initialPrompt:ie.text,onTaskClick:K,disabled:He}):O.jsx(o1,{messages:ne,onSendMessage:V,iconUrl:i.iconUrl,callTool:z}),O.jsx("div",{ref:b})]})}),w&&O.jsx("div",{className:"absolute bottom-[10px] left-1/2 transform -translate-x-1/2 z-10",children:O.jsx(kt,{onClick:we,size:"icon",className:"h-10 w-10 rounded-full bg-white/90 backdrop-blur-sm shadow-lg border border-lavender-200/60 hover:bg-white hover:shadow-xl transition-all duration-200",children:O.jsx(Rs,{className:"w-5 h-5 text-slate-700"})})}),O.jsx(u1,{className:"mt-2",onRetry:L,onStartNewSession:N,showRetryButton:k,startNewConnection:A,clearError:q,error:H,isConnected:Ae})]})})})}function f1(){return O.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl animate-pulse",children:[O.jsxs("div",{className:"flex-1 p-6 space-y-4",children:[O.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),O.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),O.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"})]}),O.jsx("div",{className:"h-24 border-t border-gray-100 bg-gray-50"})]})}function d1({agentId:n,config:l}){const[i,o]=P.useState(!1);P.useEffect(()=>{o(!0)},[]);const u=()=>{o(!1),l?.onClose?.()};return O.jsx(c1,{isOpen:i,agentId:n,config:{...l,environment:l.environment??"production",onClose:u,title:l.title??"Medi Clinic",iconUrl:l.iconUrl??"https://cdn.eka.care/bot-icon.svg"}})}const $h=(n,l,i)=>{Lb.createRoot(n).render(O.jsx(P.StrictMode,{children:O.jsx(d1,{agentId:l,config:i||{}})}))};typeof window<"u"&&(window.renderMedAssist=$h);const em=P.forwardRef(({className:n,...l},i)=>O.jsx("textarea",{className:Ye("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:i,...l}));em.displayName="Textarea";function h1({value:n,onChange:l,onSend:i,onFileChange:o,onRecording:u,isRecording:s,hasAttachment:c,attachmentFiles:f,isDisabled:m,placeholder:h,isMobile:g,recordingStatus:y}){const v=P.useRef(null),b=P.useRef(null),w=n.trim().length>0||c,E=(m||y!==Ft.IDLE)&&!s,T=Ye("rounded-full transition-all duration-200 ",s?"bg-gradient-to-r from-rose-400 via-lavender-500 to-indigo-500 text-white ring-2 ring-white/60 animate-pulse shadow-[0_0_20px_rgba(139,92,246,0.45)]":E?"text-lavender-300 cursor-not-allowed shadow-none":"text-lavender-600 hover:bg-gray-100"),_=M=>{const I=Array.from(M.target.files||[]);I.length>0&&o(I)},A=()=>{m||v.current?.click()},k=M=>{M.key==="Enter"&&!M.shiftKey&&w&&!m&&(M.preventDefault(),i())},q=M=>{M.style.height="auto",M.style.overflow="hidden";const I=M.scrollHeight,Y=40,F=120,$=Math.max(Y,Math.min(I,F));M.style.height=$+"px",I>F?M.style.overflow="auto":M.style.overflow="hidden"},H=M=>{q(M.currentTarget)};return P.useEffect(()=>{b.current&&q(b.current)},[n]),P.useEffect(()=>{!m&&!g&&b.current?.focus()},[m]),O.jsxs("div",{className:"border-t border-white/20 bg-white/70 backdrop-blur-xl px-4 py-2",children:[O.jsx("input",{ref:v,type:"file",multiple:!0,accept:"image/jpeg, image/png, image/jpg, image/tiff, application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document, text/plain, text/markdown, image/heif, image/heic",className:"hidden",onChange:_,disabled:m,title:"Attach file","aria-label":"Attach file"}),O.jsxs("div",{className:Ye("flex items-center gap-2 bg-white/70 backdrop-blur rounded-xl px-4 py-2 shadow-md focus-within:border-lavender-100/50 focus-within:ring-2 focus-within:ring-lavender-400/50 transition-all",s||c?"ring-2 ring-lavender-200/40":"ring-2 ring-lavender-300/40 backdrop-blur-xl",m&&"opacity-60"),children:[c&&f.length>0&&O.jsxs("span",{className:"text-xs text-lavender-600 mr-2",children:[f.length," file(s)"]}),O.jsx(em,{ref:b,onInput:H,placeholder:h,value:n,onChange:M=>l(M.target.value),rows:1,maxLength:1e3,autoFocus:!m,style:{wordBreak:"break-word",overflowWrap:"anywhere",minHeight:"40px",maxHeight:"120px",fontSize:window.innerWidth<=768?"16px":"14px"},onKeyPress:k,disabled:m,title:"Enter your message",className:"flex-1 border-0 outline-none focus-visible:ring-0 focus-visible:ring-offset-0 text-sm !placeholder:text-gray-400 bg-transparent disabled:cursor-not-allowed rounded-none break-words overflow-wrap-anywhere whitespace-pre-wrap"}),O.jsx(kt,{type:"button",variant:"ghost",size:"icon",onClick:A,disabled:m,className:`rounded-full transition-all ${c?"bg-lavender-200/30 text-lavender-600 hover:bg-lavender-200/40":"hover:bg-gray-100 text-lavender-600 hover:text-gray-700"}`,title:"Attach file",children:O.jsx(ES,{className:"w-5 h-5"})}),s?O.jsx(kt,{type:"button",variant:"ghost",size:"icon",onClick:u,className:"rounded-full bg-gradient-to-r from-red-400 to-rose-500 text-white hover:from-red-500 hover:to-rose-600 shadow-lg transition-all duration-200 hover:scale-105 active:scale-95",title:"Stop recording",children:O.jsx(_S,{className:"w-4 h-4"})}):O.jsx(kt,{type:"button",variant:"ghost",size:"icon",onClick:u,disabled:E,className:T,title:"Start recording",children:O.jsx(SS,{className:"w-5 h-5"})}),w&&!m&&O.jsx(kt,{type:"button",size:"icon",onClick:i,className:"h-10 w-10 bg-gradient-to-r from-lavender-400 to-lavender-500 hover:from-lavender-500 hover:to-lavender-600 rounded-full text-white transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95",children:O.jsx(xS,{className:"w-4 h-4"})})]})]})}const m1=Object.freeze(Object.defineProperty({__proto__:null,default:h1},Symbol.toStringTag,{value:"Module"}));function zT(){}function MT(){}function p1(n,l){const i={};return(n[n.length-1]===""?[...n,""]:n).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const g1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,y1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,b1={};function tm(n,l){return(b1.jsx?y1:g1).test(n)}const v1=/[ \t\n\f\r]/g;function S1(n){return typeof n=="object"?n.type==="text"?nm(n.value):!1:nm(n)}function nm(n){return n.replace(v1,"")===""}class Na{constructor(l,i,o){this.normal=i,this.property=l,o&&(this.space=o)}}Na.prototype.normal={},Na.prototype.property={},Na.prototype.space=void 0;function rm(n,l){const i={},o={};for(const u of n)Object.assign(i,u.property),Object.assign(o,u.normal);return new Na(i,o,l)}function Gs(n){return n.toLowerCase()}class Yt{constructor(l,i){this.attribute=i,this.property=l}}Yt.prototype.attribute="",Yt.prototype.booleanish=!1,Yt.prototype.boolean=!1,Yt.prototype.commaOrSpaceSeparated=!1,Yt.prototype.commaSeparated=!1,Yt.prototype.defined=!1,Yt.prototype.mustUseProperty=!1,Yt.prototype.number=!1,Yt.prototype.overloadedBoolean=!1,Yt.prototype.property="",Yt.prototype.spaceSeparated=!1,Yt.prototype.space=void 0;let E1=0;const Pe=Vr(),xt=Vr(),Xs=Vr(),xe=Vr(),ft=Vr(),gi=Vr(),en=Vr();function Vr(){return 2**++E1}const Zs=Object.freeze(Object.defineProperty({__proto__:null,boolean:Pe,booleanish:xt,commaOrSpaceSeparated:en,commaSeparated:gi,number:xe,overloadedBoolean:Xs,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),Ks=Object.keys(Zs);class Qs extends Yt{constructor(l,i,o,u){let s=-1;if(super(l,i),im(this,"space",u),typeof o=="number")for(;++s<Ks.length;){const c=Ks[s];im(this,Ks[s],(o&Zs[c])===Zs[c])}}}Qs.prototype.defined=!0;function im(n,l,i){i&&(n[l]=i)}function yi(n){const l={},i={};for(const[o,u]of Object.entries(n.properties)){const s=new Qs(o,n.transform(n.attributes||{},o),u,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(s.mustUseProperty=!0),l[o]=s,i[Gs(o)]=o,i[Gs(s.attribute)]=o}return new Na(l,i,n.space)}const am=yi({properties:{ariaActiveDescendant:null,ariaAtomic:xt,ariaAutoComplete:null,ariaBusy:xt,ariaChecked:xt,ariaColCount:xe,ariaColIndex:xe,ariaColSpan:xe,ariaControls:ft,ariaCurrent:null,ariaDescribedBy:ft,ariaDetails:null,ariaDisabled:xt,ariaDropEffect:ft,ariaErrorMessage:null,ariaExpanded:xt,ariaFlowTo:ft,ariaGrabbed:xt,ariaHasPopup:null,ariaHidden:xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ft,ariaLevel:xe,ariaLive:null,ariaModal:xt,ariaMultiLine:xt,ariaMultiSelectable:xt,ariaOrientation:null,ariaOwns:ft,ariaPlaceholder:null,ariaPosInSet:xe,ariaPressed:xt,ariaReadOnly:xt,ariaRelevant:null,ariaRequired:xt,ariaRoleDescription:ft,ariaRowCount:xe,ariaRowIndex:xe,ariaRowSpan:xe,ariaSelected:xt,ariaSetSize:xe,ariaSort:null,ariaValueMax:xe,ariaValueMin:xe,ariaValueNow:xe,ariaValueText:null,role:null},transform(n,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function lm(n,l){return l in n?n[l]:l}function om(n,l){return lm(n,l.toLowerCase())}const x1=yi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:gi,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:Pe,allowPaymentRequest:Pe,allowUserMedia:Pe,alt:null,as:null,async:Pe,autoCapitalize:null,autoComplete:ft,autoFocus:Pe,autoPlay:Pe,blocking:ft,capture:null,charSet:null,checked:Pe,cite:null,className:ft,cols:xe,colSpan:null,content:null,contentEditable:xt,controls:Pe,controlsList:ft,coords:xe|gi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Pe,defer:Pe,dir:null,dirName:null,disabled:Pe,download:Xs,draggable:xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Pe,formTarget:null,headers:ft,height:xe,hidden:Xs,high:xe,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:Pe,inputMode:null,integrity:null,is:null,isMap:Pe,itemId:null,itemProp:ft,itemRef:ft,itemScope:Pe,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Pe,low:xe,manifest:null,max:null,maxLength:xe,media:null,method:null,min:null,minLength:xe,multiple:Pe,muted:Pe,name:null,nonce:null,noModule:Pe,noValidate:Pe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Pe,optimum:xe,pattern:null,ping:ft,placeholder:null,playsInline:Pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Pe,referrerPolicy:null,rel:ft,required:Pe,reversed:Pe,rows:xe,rowSpan:xe,sandbox:ft,scope:null,scoped:Pe,seamless:Pe,selected:Pe,shadowRootClonable:Pe,shadowRootDelegatesFocus:Pe,shadowRootMode:null,shape:null,size:xe,sizes:null,slot:null,span:xe,spellCheck:xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:xe,step:null,style:null,tabIndex:xe,target:null,title:null,translate:null,type:null,typeMustMatch:Pe,useMap:null,value:xt,width:xe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ft,axis:null,background:null,bgColor:null,border:xe,borderColor:null,bottomMargin:xe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Pe,declare:Pe,event:null,face:null,frame:null,frameBorder:null,hSpace:xe,leftMargin:xe,link:null,longDesc:null,lowSrc:null,marginHeight:xe,marginWidth:xe,noResize:Pe,noHref:Pe,noShade:Pe,noWrap:Pe,object:null,profile:null,prompt:null,rev:null,rightMargin:xe,rules:null,scheme:null,scrolling:xt,standby:null,summary:null,text:null,topMargin:xe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:xe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Pe,disableRemotePlayback:Pe,prefix:null,property:null,results:xe,security:null,unselectable:null},space:"html",transform:om}),_1=yi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:en,accentHeight:xe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:xe,amplitude:xe,arabicForm:null,ascent:xe,attributeName:null,attributeType:null,azimuth:xe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:xe,by:null,calcMode:null,capHeight:xe,className:ft,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:xe,diffuseConstant:xe,direction:null,display:null,dur:null,divisor:xe,dominantBaseline:null,download:Pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:xe,enableBackground:null,end:null,event:null,exponent:xe,externalResourcesRequired:null,fill:null,fillOpacity:xe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:gi,g2:gi,glyphName:gi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:xe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:xe,horizOriginX:xe,horizOriginY:xe,id:null,ideographic:xe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:xe,k:xe,k1:xe,k2:xe,k3:xe,k4:xe,kernelMatrix:en,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:xe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:xe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:xe,overlineThickness:xe,paintOrder:null,panose1:null,path:null,pathLength:xe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:xe,pointsAtY:xe,pointsAtZ:xe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:en,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:en,rev:en,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:en,requiredFeatures:en,requiredFonts:en,requiredFormats:en,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:xe,specularExponent:xe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:xe,strikethroughThickness:xe,string:null,stroke:null,strokeDashArray:en,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:xe,strokeOpacity:xe,strokeWidth:null,style:null,surfaceScale:xe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:en,tabIndex:xe,tableValues:null,target:null,targetX:xe,targetY:xe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:en,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:xe,underlineThickness:xe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:xe,values:null,vAlphabetic:xe,vMathematical:xe,vectorEffect:null,vHanging:xe,vIdeographic:xe,version:null,vertAdvY:xe,vertOriginX:xe,vertOriginY:xe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:xe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:lm}),sm=yi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,l){return"xlink:"+l.slice(5).toLowerCase()}}),um=yi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:om}),cm=yi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,l){return"xml:"+l.slice(3).toLowerCase()}}),w1={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},C1=/[A-Z]/g,fm=/-[a-z]/g,T1=/^data[-\w.:]+$/i;function A1(n,l){const i=Gs(l);let o=l,u=Yt;if(i in n.normal)return n.property[n.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&T1.test(l)){if(l.charAt(4)==="-"){const s=l.slice(5).replace(fm,N1);o="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=l.slice(4);if(!fm.test(s)){let c=s.replace(C1,k1);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}u=Qs}return new u(o,l)}function k1(n){return"-"+n.toLowerCase()}function N1(n){return n.charAt(1).toUpperCase()}const R1=rm([am,x1,sm,um,cm],"html"),Js=rm([am,_1,sm,um,cm],"svg");function O1(n){return n.join(" ").trim()}var bi={},Ws,dm;function z1(){if(dm)return Ws;dm=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,i=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,u=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,m=`
|
|
44
|
-
`,h="/",g="*",y="",v="comment",b="declaration";function w(T,_){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];_=_||{};var A=1,k=1;function q(C){var V=C.match(l);V&&(A+=V.length);var Z=C.lastIndexOf(m);k=~Z?C.length-Z:k+C.length}function H(){var C={line:A,column:k};return function(V){return V.position=new M(C),F(),V}}function M(C){this.start=C,this.end={line:A,column:k},this.source=_.source}M.prototype.content=T;function I(C){var V=new Error(_.source+":"+A+":"+k+": "+C);if(V.reason=C,V.filename=_.source,V.line=A,V.column=k,V.source=T,!_.silent)throw V}function Y(C){var V=C.exec(T);if(V){var Z=V[0];return q(Z),T=T.slice(Z.length),V}}function F(){Y(i)}function $(C){var V;for(C=C||[];V=ie();)V!==!1&&C.push(V);return C}function ie(){var C=H();if(!(h!=T.charAt(0)||g!=T.charAt(1))){for(var V=2;y!=T.charAt(V)&&(g!=T.charAt(V)||h!=T.charAt(V+1));)++V;if(V+=2,y===T.charAt(V-1))return I("End of comment missing");var Z=T.slice(2,V-2);return k+=2,q(Z),T=T.slice(V),k+=2,C({type:v,comment:Z})}}function D(){var C=H(),V=Y(o);if(V){if(ie(),!Y(u))return I("property missing ':'");var Z=Y(s),Q=C({type:b,property:E(V[0].replace(n,y)),value:Z?E(Z[0].replace(n,y)):y});return Y(c),Q}}function ne(){var C=[];$(C);for(var V;V=D();)V!==!1&&(C.push(V),$(C));return C}return F(),ne()}function E(T){return T?T.replace(f,y):y}return Ws=w,Ws}var hm;function M1(){if(hm)return bi;hm=1;var n=bi&&bi.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(bi,"__esModule",{value:!0}),bi.default=i;const l=n(z1());function i(o,u){let s=null;if(!o||typeof o!="string")return s;const c=(0,l.default)(o),f=typeof u=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:h,value:g}=m;f?u(h,g,m):g&&(s=s||{},s[h]=g)}),s}return bi}var Ra={},mm;function D1(){if(mm)return Ra;mm=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,i=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,u=/^-(ms)-/,s=function(h){return!h||i.test(h)||n.test(h)},c=function(h,g){return g.toUpperCase()},f=function(h,g){return"".concat(g,"-")},m=function(h,g){return g===void 0&&(g={}),s(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(u,f):h=h.replace(o,f),h.replace(l,c))};return Ra.camelCase=m,Ra}var Oa,pm;function j1(){if(pm)return Oa;pm=1;var n=Oa&&Oa.__importDefault||function(u){return u&&u.__esModule?u:{default:u}},l=n(M1()),i=D1();function o(u,s){var c={};return!u||typeof u!="string"||(0,l.default)(u,function(f,m){f&&m&&(c[(0,i.camelCase)(f,s)]=m)}),c}return o.default=o,Oa=o,Oa}var L1=j1();const I1=ms(L1),gm=ym("end"),$s=ym("start");function ym(n){return l;function l(i){const o=i&&i.position&&i.position[n]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function B1(n){const l=$s(n),i=gm(n);if(l&&i)return{start:l,end:i}}function za(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?bm(n.position):"start"in n||"end"in n?bm(n):"line"in n||"column"in n?eu(n):""}function eu(n){return vm(n&&n.line)+":"+vm(n&&n.column)}function bm(n){return eu(n&&n.start)+"-"+eu(n&&n.end)}function vm(n){return n&&typeof n=="number"?n:1}class Ht extends Error{constructor(l,i,o){super(),typeof i=="string"&&(o=i,i=void 0);let u="",s={},c=!1;if(i&&("line"in i&&"column"in i?s={place:i}:"start"in i&&"end"in i?s={place:i}:"type"in i?s={ancestors:[i],place:i.position}:s={...i}),typeof l=="string"?u=l:!s.cause&&l&&(c=!0,u=l.message,s.cause=l),!s.ruleId&&!s.source&&typeof o=="string"){const m=o.indexOf(":");m===-1?s.ruleId=o:(s.source=o.slice(0,m),s.ruleId=o.slice(m+1))}if(!s.place&&s.ancestors&&s.ancestors){const m=s.ancestors[s.ancestors.length-1];m&&(s.place=m.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=u,this.line=f?f.line:void 0,this.name=za(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ht.prototype.file="",Ht.prototype.name="",Ht.prototype.reason="",Ht.prototype.message="",Ht.prototype.stack="",Ht.prototype.column=void 0,Ht.prototype.line=void 0,Ht.prototype.ancestors=void 0,Ht.prototype.cause=void 0,Ht.prototype.fatal=void 0,Ht.prototype.place=void 0,Ht.prototype.ruleId=void 0,Ht.prototype.source=void 0;const tu={}.hasOwnProperty,U1=new Map,H1=/[A-Z]/g,q1=new Set(["table","tbody","thead","tfoot","tr"]),P1=new Set(["td","th"]),Sm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function F1(n,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=l.filePath||void 0;let o;if(l.development){if(typeof l.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=J1(i,l.jsxDEV)}else{if(typeof l.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof l.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=Q1(i,l.jsx,l.jsxs)}const u={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:o,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?Js:R1,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},s=Em(u,n,void 0);return s&&typeof s!="string"?s:u.create(n,u.Fragment,{children:s||void 0},void 0)}function Em(n,l,i){if(l.type==="element")return Y1(n,l,i);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return V1(n,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return X1(n,l,i);if(l.type==="mdxjsEsm")return G1(n,l);if(l.type==="root")return Z1(n,l,i);if(l.type==="text")return K1(n,l)}function Y1(n,l,i){const o=n.schema;let u=o;l.tagName.toLowerCase()==="svg"&&o.space==="html"&&(u=Js,n.schema=u),n.ancestors.push(l);const s=_m(n,l.tagName,!1),c=W1(n,l);let f=ru(n,l);return q1.has(l.tagName)&&(f=f.filter(function(m){return typeof m=="string"?!S1(m):!0})),xm(n,c,s,l),nu(c,f),n.ancestors.pop(),n.schema=o,n.create(l,s,c,i)}function V1(n,l){if(l.data&&l.data.estree&&n.evaluater){const o=l.data.estree.body[0];return o.type,n.evaluater.evaluateExpression(o.expression)}Ma(n,l.position)}function G1(n,l){if(l.data&&l.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(l.data.estree);Ma(n,l.position)}function X1(n,l,i){const o=n.schema;let u=o;l.name==="svg"&&o.space==="html"&&(u=Js,n.schema=u),n.ancestors.push(l);const s=l.name===null?n.Fragment:_m(n,l.name,!0),c=$1(n,l),f=ru(n,l);return xm(n,c,s,l),nu(c,f),n.ancestors.pop(),n.schema=o,n.create(l,s,c,i)}function Z1(n,l,i){const o={};return nu(o,ru(n,l)),n.create(l,n.Fragment,o,i)}function K1(n,l){return l.value}function xm(n,l,i,o){typeof i!="string"&&i!==n.Fragment&&n.passNode&&(l.node=o)}function nu(n,l){if(l.length>0){const i=l.length>1?l:l[0];i&&(n.children=i)}}function Q1(n,l,i){return o;function o(u,s,c,f){const h=Array.isArray(c.children)?i:l;return f?h(s,c,f):h(s,c)}}function J1(n,l){return i;function i(o,u,s,c){const f=Array.isArray(s.children),m=$s(o);return l(u,s,c,f,{columnNumber:m?m.column-1:void 0,fileName:n,lineNumber:m?m.line:void 0},void 0)}}function W1(n,l){const i={};let o,u;for(u in l.properties)if(u!=="children"&&tu.call(l.properties,u)){const s=eE(n,u,l.properties[u]);if(s){const[c,f]=s;n.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&P1.has(l.tagName)?o=f:i[c]=f}}if(o){const s=i.style||(i.style={});s[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return i}function $1(n,l){const i={};for(const o of l.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const s=o.data.estree.body[0];s.type;const c=s.expression;c.type;const f=c.properties[0];f.type,Object.assign(i,n.evaluater.evaluateExpression(f.argument))}else Ma(n,l.position);else{const u=o.name;let s;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&n.evaluater){const f=o.value.data.estree.body[0];f.type,s=n.evaluater.evaluateExpression(f.expression)}else Ma(n,l.position);else s=o.value===null?!0:o.value;i[u]=s}return i}function ru(n,l){const i=[];let o=-1;const u=n.passKeys?new Map:U1;for(;++o<l.children.length;){const s=l.children[o];let c;if(n.passKeys){const m=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(m){const h=u.get(m)||0;c=m+"-"+h,u.set(m,h+1)}}const f=Em(n,s,c);f!==void 0&&i.push(f)}return i}function eE(n,l,i){const o=A1(n.schema,l);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=o.commaSeparated?p1(i):O1(i)),o.property==="style"){let u=typeof i=="object"?i:tE(n,String(i));return n.stylePropertyNameCase==="css"&&(u=nE(u)),["style",u]}return[n.elementAttributeNameCase==="react"&&o.space?w1[o.property]||o.property:o.attribute,i]}}function tE(n,l){try{return I1(l,{reactCompat:!0})}catch(i){if(n.ignoreInvalidStyle)return{};const o=i,u=new Ht("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw u.file=n.filePath||void 0,u.url=Sm+"#cannot-parse-style-attribute",u}}function _m(n,l,i){let o;if(!i)o={type:"Literal",value:l};else if(l.includes(".")){const u=l.split(".");let s=-1,c;for(;++s<u.length;){const f=tm(u[s])?{type:"Identifier",name:u[s]}:{type:"Literal",value:u[s]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}o=c}else o=tm(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(o.type==="Literal"){const u=o.value;return tu.call(n.components,u)?n.components[u]:u}if(n.evaluater)return n.evaluater.evaluateExpression(o);Ma(n)}function Ma(n,l){const i=new Ht("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=n.filePath||void 0,i.url=Sm+"#cannot-handle-mdx-estrees-without-createevaluater",i}function nE(n){const l={};let i;for(i in n)tu.call(n,i)&&(l[rE(i)]=n[i]);return l}function rE(n){let l=n.replace(H1,iE);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function iE(n){return"-"+n.toLowerCase()}const iu={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},aE={};function lE(n,l){const i=aE,o=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,u=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return wm(n,o,u)}function wm(n,l,i){if(oE(n)){if("value"in n)return n.type==="html"&&!i?"":n.value;if(l&&"alt"in n&&n.alt)return n.alt;if("children"in n)return Cm(n.children,l,i)}return Array.isArray(n)?Cm(n,l,i):""}function Cm(n,l,i){const o=[];let u=-1;for(;++u<n.length;)o[u]=wm(n[u],l,i);return o.join("")}function oE(n){return!!(n&&typeof n=="object")}const Tm=document.createElement("i");function au(n){const l="&"+n+";";Tm.innerHTML=l;const i=Tm.textContent;return i.charCodeAt(i.length-1)===59&&n!=="semi"||i===l?!1:i}function zn(n,l,i,o){const u=n.length;let s=0,c;if(l<0?l=-l>u?0:u+l:l=l>u?u:l,i=i>0?i:0,o.length<1e4)c=Array.from(o),c.unshift(l,i),n.splice(...c);else for(i&&n.splice(l,i);s<o.length;)c=o.slice(s,s+1e4),c.unshift(l,0),n.splice(...c),s+=1e4,l+=1e4}function dn(n,l){return n.length>0?(zn(n,n.length,0,l),n):l}const Am={}.hasOwnProperty;function sE(n){const l={};let i=-1;for(;++i<n.length;)uE(l,n[i]);return l}function uE(n,l){let i;for(i in l){const u=(Am.call(n,i)?n[i]:void 0)||(n[i]={}),s=l[i];let c;if(s)for(c in s){Am.call(u,c)||(u[c]=[]);const f=s[c];cE(u[c],Array.isArray(f)?f:f?[f]:[])}}}function cE(n,l){let i=-1;const o=[];for(;++i<l.length;)(l[i].add==="after"?n:o).push(l[i]);zn(n,0,0,o)}function km(n,l){const i=Number.parseInt(n,l);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function vi(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mn=dr(/[A-Za-z]/),tn=dr(/[\dA-Za-z]/),fE=dr(/[#-'*+\--9=?A-Z^-~]/);function lu(n){return n!==null&&(n<32||n===127)}const ou=dr(/\d/),dE=dr(/[\dA-Fa-f]/),hE=dr(/[!-/:-@[-`{-~]/);function Be(n){return n!==null&&n<-2}function Vt(n){return n!==null&&(n<0||n===32)}function rt(n){return n===-2||n===-1||n===32}const mE=dr(new RegExp("\\p{P}|\\p{S}","u")),pE=dr(/\s/);function dr(n){return l;function l(i){return i!==null&&i>-1&&n.test(String.fromCharCode(i))}}function Si(n){const l=[];let i=-1,o=0,u=0;for(;++i<n.length;){const s=n.charCodeAt(i);let c="";if(s===37&&tn(n.charCodeAt(i+1))&&tn(n.charCodeAt(i+2)))u=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const f=n.charCodeAt(i+1);s<56320&&f>56319&&f<57344?(c=String.fromCharCode(s,f),u=1):c="�"}else c=String.fromCharCode(s);c&&(l.push(n.slice(o,i),encodeURIComponent(c)),o=i+u+1,c=""),u&&(i+=u,u=0)}return l.join("")+n.slice(o)}function dt(n,l,i,o){const u=o?o-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(m){return rt(m)?(n.enter(i),f(m)):l(m)}function f(m){return rt(m)&&s++<u?(n.consume(m),f):(n.exit(i),l(m))}}const gE={tokenize:yE};function yE(n){const l=n.attempt(this.parser.constructs.contentInitial,o,u);let i;return l;function o(f){if(f===null){n.consume(f);return}return n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),dt(n,l,"linePrefix")}function u(f){return n.enter("paragraph"),s(f)}function s(f){const m=n.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=m),i=m,c(f)}function c(f){if(f===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(f);return}return Be(f)?(n.consume(f),n.exit("chunkText"),s):(n.consume(f),c)}}const bE={tokenize:vE},Nm={tokenize:SE};function vE(n){const l=this,i=[];let o=0,u,s,c;return f;function f(k){if(o<i.length){const q=i[o];return l.containerState=q[1],n.attempt(q[0].continuation,m,h)(k)}return h(k)}function m(k){if(o++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,u&&A();const q=l.events.length;let H=q,M;for(;H--;)if(l.events[H][0]==="exit"&&l.events[H][1].type==="chunkFlow"){M=l.events[H][1].end;break}_(o);let I=q;for(;I<l.events.length;)l.events[I][1].end={...M},I++;return zn(l.events,H+1,0,l.events.slice(q)),l.events.length=I,h(k)}return f(k)}function h(k){if(o===i.length){if(!u)return v(k);if(u.currentConstruct&&u.currentConstruct.concrete)return w(k);l.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return l.containerState={},n.check(Nm,g,y)(k)}function g(k){return u&&A(),_(o),v(k)}function y(k){return l.parser.lazy[l.now().line]=o!==i.length,c=l.now().offset,w(k)}function v(k){return l.containerState={},n.attempt(Nm,b,w)(k)}function b(k){return o++,i.push([l.currentConstruct,l.containerState]),v(k)}function w(k){if(k===null){u&&A(),_(0),n.consume(k);return}return u=u||l.parser.flow(l.now()),n.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:s}),E(k)}function E(k){if(k===null){T(n.exit("chunkFlow"),!0),_(0),n.consume(k);return}return Be(k)?(n.consume(k),T(n.exit("chunkFlow")),o=0,l.interrupt=void 0,f):(n.consume(k),E)}function T(k,q){const H=l.sliceStream(k);if(q&&H.push(null),k.previous=s,s&&(s.next=k),s=k,u.defineSkip(k.start),u.write(H),l.parser.lazy[k.start.line]){let M=u.events.length;for(;M--;)if(u.events[M][1].start.offset<c&&(!u.events[M][1].end||u.events[M][1].end.offset>c))return;const I=l.events.length;let Y=I,F,$;for(;Y--;)if(l.events[Y][0]==="exit"&&l.events[Y][1].type==="chunkFlow"){if(F){$=l.events[Y][1].end;break}F=!0}for(_(o),M=I;M<l.events.length;)l.events[M][1].end={...$},M++;zn(l.events,Y+1,0,l.events.slice(I)),l.events.length=M}}function _(k){let q=i.length;for(;q-- >k;){const H=i[q];l.containerState=H[1],H[0].exit.call(l,n)}i.length=k}function A(){u.write([null]),s=void 0,u=void 0,l.containerState._closeFlow=void 0}}function SE(n,l,i){return dt(n,n.attempt(this.parser.constructs.document,l,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Rm(n){if(n===null||Vt(n)||pE(n))return 1;if(mE(n))return 2}function su(n,l,i){const o=[];let u=-1;for(;++u<n.length;){const s=n[u].resolveAll;s&&!o.includes(s)&&(l=s(l,i),o.push(s))}return l}const uu={name:"attention",resolveAll:EE,tokenize:xE};function EE(n,l){let i=-1,o,u,s,c,f,m,h,g;for(;++i<n.length;)if(n[i][0]==="enter"&&n[i][1].type==="attentionSequence"&&n[i][1]._close){for(o=i;o--;)if(n[o][0]==="exit"&&n[o][1].type==="attentionSequence"&&n[o][1]._open&&l.sliceSerialize(n[o][1]).charCodeAt(0)===l.sliceSerialize(n[i][1]).charCodeAt(0)){if((n[o][1]._close||n[i][1]._open)&&(n[i][1].end.offset-n[i][1].start.offset)%3&&!((n[o][1].end.offset-n[o][1].start.offset+n[i][1].end.offset-n[i][1].start.offset)%3))continue;m=n[o][1].end.offset-n[o][1].start.offset>1&&n[i][1].end.offset-n[i][1].start.offset>1?2:1;const y={...n[o][1].end},v={...n[i][1].start};Om(y,-m),Om(v,m),c={type:m>1?"strongSequence":"emphasisSequence",start:y,end:{...n[o][1].end}},f={type:m>1?"strongSequence":"emphasisSequence",start:{...n[i][1].start},end:v},s={type:m>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[i][1].start}},u={type:m>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},n[o][1].end={...c.start},n[i][1].start={...f.end},h=[],n[o][1].end.offset-n[o][1].start.offset&&(h=dn(h,[["enter",n[o][1],l],["exit",n[o][1],l]])),h=dn(h,[["enter",u,l],["enter",c,l],["exit",c,l],["enter",s,l]]),h=dn(h,su(l.parser.constructs.insideSpan.null,n.slice(o+1,i),l)),h=dn(h,[["exit",s,l],["enter",f,l],["exit",f,l],["exit",u,l]]),n[i][1].end.offset-n[i][1].start.offset?(g=2,h=dn(h,[["enter",n[i][1],l],["exit",n[i][1],l]])):g=0,zn(n,o-1,i-o+3,h),i=o+h.length-g-2;break}}for(i=-1;++i<n.length;)n[i][1].type==="attentionSequence"&&(n[i][1].type="data");return n}function xE(n,l){const i=this.parser.constructs.attentionMarkers.null,o=this.previous,u=Rm(o);let s;return c;function c(m){return s=m,n.enter("attentionSequence"),f(m)}function f(m){if(m===s)return n.consume(m),f;const h=n.exit("attentionSequence"),g=Rm(m),y=!g||g===2&&u||i.includes(m),v=!u||u===2&&g||i.includes(o);return h._open=!!(s===42?y:y&&(u||!v)),h._close=!!(s===42?v:v&&(g||!y)),l(m)}}function Om(n,l){n.column+=l,n.offset+=l,n._bufferIndex+=l}const _E={name:"autolink",tokenize:wE};function wE(n,l,i){let o=0;return u;function u(b){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),s}function s(b){return Mn(b)?(n.consume(b),c):b===64?i(b):h(b)}function c(b){return b===43||b===45||b===46||tn(b)?(o=1,f(b)):h(b)}function f(b){return b===58?(n.consume(b),o=0,m):(b===43||b===45||b===46||tn(b))&&o++<32?(n.consume(b),f):(o=0,h(b))}function m(b){return b===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.exit("autolink"),l):b===null||b===32||b===60||lu(b)?i(b):(n.consume(b),m)}function h(b){return b===64?(n.consume(b),g):fE(b)?(n.consume(b),h):i(b)}function g(b){return tn(b)?y(b):i(b)}function y(b){return b===46?(n.consume(b),o=0,g):b===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.exit("autolink"),l):v(b)}function v(b){if((b===45||tn(b))&&o++<63){const w=b===45?v:y;return n.consume(b),w}return i(b)}}const Fl={partial:!0,tokenize:CE};function CE(n,l,i){return o;function o(s){return rt(s)?dt(n,u,"linePrefix")(s):u(s)}function u(s){return s===null||Be(s)?l(s):i(s)}}const zm={continuation:{tokenize:AE},exit:kE,name:"blockQuote",tokenize:TE};function TE(n,l,i){const o=this;return u;function u(c){if(c===62){const f=o.containerState;return f.open||(n.enter("blockQuote",{_container:!0}),f.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(c),n.exit("blockQuoteMarker"),s}return i(c)}function s(c){return rt(c)?(n.enter("blockQuotePrefixWhitespace"),n.consume(c),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),l):(n.exit("blockQuotePrefix"),l(c))}}function AE(n,l,i){const o=this;return u;function u(c){return rt(c)?dt(n,s,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return n.attempt(zm,l,i)(c)}}function kE(n){n.exit("blockQuote")}const Mm={name:"characterEscape",tokenize:NE};function NE(n,l,i){return o;function o(s){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(s),n.exit("escapeMarker"),u}function u(s){return hE(s)?(n.enter("characterEscapeValue"),n.consume(s),n.exit("characterEscapeValue"),n.exit("characterEscape"),l):i(s)}}const Dm={name:"characterReference",tokenize:RE};function RE(n,l,i){const o=this;let u=0,s,c;return f;function f(y){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),m}function m(y){return y===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(y),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),s=31,c=tn,g(y))}function h(y){return y===88||y===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(y),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),s=6,c=dE,g):(n.enter("characterReferenceValue"),s=7,c=ou,g(y))}function g(y){if(y===59&&u){const v=n.exit("characterReferenceValue");return c===tn&&!au(o.sliceSerialize(v))?i(y):(n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),n.exit("characterReference"),l)}return c(y)&&u++<s?(n.consume(y),g):i(y)}}const jm={partial:!0,tokenize:zE},Lm={concrete:!0,name:"codeFenced",tokenize:OE};function OE(n,l,i){const o=this,u={partial:!0,tokenize:H};let s=0,c=0,f;return m;function m(M){return h(M)}function h(M){const I=o.events[o.events.length-1];return s=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,f=M,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),g(M)}function g(M){return M===f?(c++,n.consume(M),g):c<3?i(M):(n.exit("codeFencedFenceSequence"),rt(M)?dt(n,y,"whitespace")(M):y(M))}function y(M){return M===null||Be(M)?(n.exit("codeFencedFence"),o.interrupt?l(M):n.check(jm,E,q)(M)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),v(M))}function v(M){return M===null||Be(M)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),y(M)):rt(M)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),dt(n,b,"whitespace")(M)):M===96&&M===f?i(M):(n.consume(M),v)}function b(M){return M===null||Be(M)?y(M):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),w(M))}function w(M){return M===null||Be(M)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),y(M)):M===96&&M===f?i(M):(n.consume(M),w)}function E(M){return n.attempt(u,q,T)(M)}function T(M){return n.enter("lineEnding"),n.consume(M),n.exit("lineEnding"),_}function _(M){return s>0&&rt(M)?dt(n,A,"linePrefix",s+1)(M):A(M)}function A(M){return M===null||Be(M)?n.check(jm,E,q)(M):(n.enter("codeFlowValue"),k(M))}function k(M){return M===null||Be(M)?(n.exit("codeFlowValue"),A(M)):(n.consume(M),k)}function q(M){return n.exit("codeFenced"),l(M)}function H(M,I,Y){let F=0;return $;function $(V){return M.enter("lineEnding"),M.consume(V),M.exit("lineEnding"),ie}function ie(V){return M.enter("codeFencedFence"),rt(V)?dt(M,D,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):D(V)}function D(V){return V===f?(M.enter("codeFencedFenceSequence"),ne(V)):Y(V)}function ne(V){return V===f?(F++,M.consume(V),ne):F>=c?(M.exit("codeFencedFenceSequence"),rt(V)?dt(M,C,"whitespace")(V):C(V)):Y(V)}function C(V){return V===null||Be(V)?(M.exit("codeFencedFence"),I(V)):Y(V)}}}function zE(n,l,i){const o=this;return u;function u(c){return c===null?i(c):(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),s)}function s(c){return o.parser.lazy[o.now().line]?i(c):l(c)}}const cu={name:"codeIndented",tokenize:DE},ME={partial:!0,tokenize:jE};function DE(n,l,i){const o=this;return u;function u(h){return n.enter("codeIndented"),dt(n,s,"linePrefix",5)(h)}function s(h){const g=o.events[o.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(h):i(h)}function c(h){return h===null?m(h):Be(h)?n.attempt(ME,c,m)(h):(n.enter("codeFlowValue"),f(h))}function f(h){return h===null||Be(h)?(n.exit("codeFlowValue"),c(h)):(n.consume(h),f)}function m(h){return n.exit("codeIndented"),l(h)}}function jE(n,l,i){const o=this;return u;function u(c){return o.parser.lazy[o.now().line]?i(c):Be(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),u):dt(n,s,"linePrefix",5)(c)}function s(c){const f=o.events[o.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(c):Be(c)?u(c):i(c)}}const LE={name:"codeText",previous:BE,resolve:IE,tokenize:UE};function IE(n){let l=n.length-4,i=3,o,u;if((n[i][1].type==="lineEnding"||n[i][1].type==="space")&&(n[l][1].type==="lineEnding"||n[l][1].type==="space")){for(o=i;++o<l;)if(n[o][1].type==="codeTextData"){n[i][1].type="codeTextPadding",n[l][1].type="codeTextPadding",i+=2,l-=2;break}}for(o=i-1,l++;++o<=l;)u===void 0?o!==l&&n[o][1].type!=="lineEnding"&&(u=o):(o===l||n[o][1].type==="lineEnding")&&(n[u][1].type="codeTextData",o!==u+2&&(n[u][1].end=n[o-1][1].end,n.splice(u+2,o-u-2),l-=o-u-2,o=u+2),u=void 0);return n}function BE(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UE(n,l,i){let o=0,u,s;return c;function c(y){return n.enter("codeText"),n.enter("codeTextSequence"),f(y)}function f(y){return y===96?(n.consume(y),o++,f):(n.exit("codeTextSequence"),m(y))}function m(y){return y===null?i(y):y===32?(n.enter("space"),n.consume(y),n.exit("space"),m):y===96?(s=n.enter("codeTextSequence"),u=0,g(y)):Be(y)?(n.enter("lineEnding"),n.consume(y),n.exit("lineEnding"),m):(n.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||Be(y)?(n.exit("codeTextData"),m(y)):(n.consume(y),h)}function g(y){return y===96?(n.consume(y),u++,g):u===o?(n.exit("codeTextSequence"),n.exit("codeText"),l(y)):(s.type="codeTextData",h(y))}}class HE{constructor(l){this.left=l?[...l]:[],this.right=[]}get(l){if(l<0||l>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+l+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return l<this.left.length?this.left[l]:this.right[this.right.length-l+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(l,i){const o=i??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(l,o):l>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-l+this.left.length).reverse():this.left.slice(l).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(l,i,o){const u=i||0;this.setCursor(Math.trunc(l));const s=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return o&&Da(this.left,o),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(l){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(l)}pushMany(l){this.setCursor(Number.POSITIVE_INFINITY),Da(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),Da(this.right,l.reverse())}setCursor(l){if(!(l===this.left.length||l>this.left.length&&this.right.length===0||l<0&&this.left.length===0))if(l<this.left.length){const i=this.left.splice(l,Number.POSITIVE_INFINITY);Da(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);Da(this.left,i.reverse())}}}function Da(n,l){let i=0;if(l.length<1e4)n.push(...l);else for(;i<l.length;)n.push(...l.slice(i,i+1e4)),i+=1e4}function Im(n){const l={};let i=-1,o,u,s,c,f,m,h;const g=new HE(n);for(;++i<g.length;){for(;i in l;)i=l[i];if(o=g.get(i),i&&o[1].type==="chunkFlow"&&g.get(i-1)[1].type==="listItemPrefix"&&(m=o[1]._tokenizer.events,s=0,s<m.length&&m[s][1].type==="lineEndingBlank"&&(s+=2),s<m.length&&m[s][1].type==="content"))for(;++s<m.length&&m[s][1].type!=="content";)m[s][1].type==="chunkText"&&(m[s][1]._isInFirstContentOfListItem=!0,s++);if(o[0]==="enter")o[1].contentType&&(Object.assign(l,qE(g,i)),i=l[i],h=!0);else if(o[1]._container){for(s=i,u=void 0;s--;)if(c=g.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(u&&(g.get(u)[1].type="lineEndingBlank"),c[1].type="lineEnding",u=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;u&&(o[1].end={...g.get(u)[1].start},f=g.slice(u,i),f.unshift(o),g.splice(u,i-u+1,f))}}return zn(n,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function qE(n,l){const i=n.get(l)[1],o=n.get(l)[2];let u=l-1;const s=[];let c=i._tokenizer;c||(c=o.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,m=[],h={};let g,y,v=-1,b=i,w=0,E=0;const T=[E];for(;b;){for(;n.get(++u)[1]!==b;);s.push(u),b._tokenizer||(g=o.sliceStream(b),b.next||g.push(null),y&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=i;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(E=v+1,T.push(E),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):T.pop(),v=T.length;v--;){const _=f.slice(T[v],T[v+1]),A=s.pop();m.push([A,A+_.length-1]),n.splice(A,2,_)}for(m.reverse(),v=-1;++v<m.length;)h[w+m[v][0]]=w+m[v][1],w+=m[v][1]-m[v][0]-1;return h}const PE={resolve:YE,tokenize:VE},FE={partial:!0,tokenize:GE};function YE(n){return Im(n),n}function VE(n,l){let i;return o;function o(f){return n.enter("content"),i=n.enter("chunkContent",{contentType:"content"}),u(f)}function u(f){return f===null?s(f):Be(f)?n.check(FE,c,s)(f):(n.consume(f),u)}function s(f){return n.exit("chunkContent"),n.exit("content"),l(f)}function c(f){return n.consume(f),n.exit("chunkContent"),i.next=n.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,u}}function GE(n,l,i){const o=this;return u;function u(c){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),dt(n,s,"linePrefix")}function s(c){if(c===null||Be(c))return i(c);const f=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(c):n.interrupt(o.parser.constructs.flow,i,l)(c)}}function Bm(n,l,i,o,u,s,c,f,m){const h=m||Number.POSITIVE_INFINITY;let g=0;return y;function y(_){return _===60?(n.enter(o),n.enter(u),n.enter(s),n.consume(_),n.exit(s),v):_===null||_===32||_===41||lu(_)?i(_):(n.enter(o),n.enter(c),n.enter(f),n.enter("chunkString",{contentType:"string"}),E(_))}function v(_){return _===62?(n.enter(s),n.consume(_),n.exit(s),n.exit(u),n.exit(o),l):(n.enter(f),n.enter("chunkString",{contentType:"string"}),b(_))}function b(_){return _===62?(n.exit("chunkString"),n.exit(f),v(_)):_===null||_===60||Be(_)?i(_):(n.consume(_),_===92?w:b)}function w(_){return _===60||_===62||_===92?(n.consume(_),b):b(_)}function E(_){return!g&&(_===null||_===41||Vt(_))?(n.exit("chunkString"),n.exit(f),n.exit(c),n.exit(o),l(_)):g<h&&_===40?(n.consume(_),g++,E):_===41?(n.consume(_),g--,E):_===null||_===32||_===40||lu(_)?i(_):(n.consume(_),_===92?T:E)}function T(_){return _===40||_===41||_===92?(n.consume(_),E):E(_)}}function Um(n,l,i,o,u,s){const c=this;let f=0,m;return h;function h(b){return n.enter(o),n.enter(u),n.consume(b),n.exit(u),n.enter(s),g}function g(b){return f>999||b===null||b===91||b===93&&!m||b===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(b):b===93?(n.exit(s),n.enter(u),n.consume(b),n.exit(u),n.exit(o),l):Be(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),g):(n.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||Be(b)||f++>999?(n.exit("chunkString"),g(b)):(n.consume(b),m||(m=!rt(b)),b===92?v:y)}function v(b){return b===91||b===92||b===93?(n.consume(b),f++,y):y(b)}}function Hm(n,l,i,o,u,s){let c;return f;function f(v){return v===34||v===39||v===40?(n.enter(o),n.enter(u),n.consume(v),n.exit(u),c=v===40?41:v,m):i(v)}function m(v){return v===c?(n.enter(u),n.consume(v),n.exit(u),n.exit(o),l):(n.enter(s),h(v))}function h(v){return v===c?(n.exit(s),m(c)):v===null?i(v):Be(v)?(n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),dt(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===c||v===null||Be(v)?(n.exit("chunkString"),h(v)):(n.consume(v),v===92?y:g)}function y(v){return v===c||v===92?(n.consume(v),g):g(v)}}function ja(n,l){let i;return o;function o(u){return Be(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),i=!0,o):rt(u)?dt(n,o,i?"linePrefix":"lineSuffix")(u):l(u)}}const XE={name:"definition",tokenize:KE},ZE={partial:!0,tokenize:QE};function KE(n,l,i){const o=this;let u;return s;function s(b){return n.enter("definition"),c(b)}function c(b){return Um.call(o,n,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return u=vi(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),b===58?(n.enter("definitionMarker"),n.consume(b),n.exit("definitionMarker"),m):i(b)}function m(b){return Vt(b)?ja(n,h)(b):h(b)}function h(b){return Bm(n,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return n.attempt(ZE,y,y)(b)}function y(b){return rt(b)?dt(n,v,"whitespace")(b):v(b)}function v(b){return b===null||Be(b)?(n.exit("definition"),o.parser.defined.push(u),l(b)):i(b)}}function QE(n,l,i){return o;function o(f){return Vt(f)?ja(n,u)(f):i(f)}function u(f){return Hm(n,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return rt(f)?dt(n,c,"whitespace")(f):c(f)}function c(f){return f===null||Be(f)?l(f):i(f)}}const JE={name:"hardBreakEscape",tokenize:WE};function WE(n,l,i){return o;function o(s){return n.enter("hardBreakEscape"),n.consume(s),u}function u(s){return Be(s)?(n.exit("hardBreakEscape"),l(s)):i(s)}}const $E={name:"headingAtx",resolve:ex,tokenize:tx};function ex(n,l){let i=n.length-2,o=3,u,s;return n[o][1].type==="whitespace"&&(o+=2),i-2>o&&n[i][1].type==="whitespace"&&(i-=2),n[i][1].type==="atxHeadingSequence"&&(o===i-1||i-4>o&&n[i-2][1].type==="whitespace")&&(i-=o+1===i?2:4),i>o&&(u={type:"atxHeadingText",start:n[o][1].start,end:n[i][1].end},s={type:"chunkText",start:n[o][1].start,end:n[i][1].end,contentType:"text"},zn(n,o,i-o+1,[["enter",u,l],["enter",s,l],["exit",s,l],["exit",u,l]])),n}function tx(n,l,i){let o=0;return u;function u(g){return n.enter("atxHeading"),s(g)}function s(g){return n.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&o++<6?(n.consume(g),c):g===null||Vt(g)?(n.exit("atxHeadingSequence"),f(g)):i(g)}function f(g){return g===35?(n.enter("atxHeadingSequence"),m(g)):g===null||Be(g)?(n.exit("atxHeading"),l(g)):rt(g)?dt(n,f,"whitespace")(g):(n.enter("atxHeadingText"),h(g))}function m(g){return g===35?(n.consume(g),m):(n.exit("atxHeadingSequence"),f(g))}function h(g){return g===null||g===35||Vt(g)?(n.exit("atxHeadingText"),f(g)):(n.consume(g),h)}}const nx=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],qm=["pre","script","style","textarea"],rx={concrete:!0,name:"htmlFlow",resolveTo:lx,tokenize:ox},ix={partial:!0,tokenize:ux},ax={partial:!0,tokenize:sx};function lx(n){let l=n.length;for(;l--&&!(n[l][0]==="enter"&&n[l][1].type==="htmlFlow"););return l>1&&n[l-2][1].type==="linePrefix"&&(n[l][1].start=n[l-2][1].start,n[l+1][1].start=n[l-2][1].start,n.splice(l-2,2)),n}function ox(n,l,i){const o=this;let u,s,c,f,m;return h;function h(z){return g(z)}function g(z){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(z),y}function y(z){return z===33?(n.consume(z),v):z===47?(n.consume(z),s=!0,E):z===63?(n.consume(z),u=3,o.interrupt?l:L):Mn(z)?(n.consume(z),c=String.fromCharCode(z),T):i(z)}function v(z){return z===45?(n.consume(z),u=2,b):z===91?(n.consume(z),u=5,f=0,w):Mn(z)?(n.consume(z),u=4,o.interrupt?l:L):i(z)}function b(z){return z===45?(n.consume(z),o.interrupt?l:L):i(z)}function w(z){const re="CDATA[";return z===re.charCodeAt(f++)?(n.consume(z),f===re.length?o.interrupt?l:D:w):i(z)}function E(z){return Mn(z)?(n.consume(z),c=String.fromCharCode(z),T):i(z)}function T(z){if(z===null||z===47||z===62||Vt(z)){const re=z===47,ce=c.toLowerCase();return!re&&!s&&qm.includes(ce)?(u=1,o.interrupt?l(z):D(z)):nx.includes(c.toLowerCase())?(u=6,re?(n.consume(z),_):o.interrupt?l(z):D(z)):(u=7,o.interrupt&&!o.parser.lazy[o.now().line]?i(z):s?A(z):k(z))}return z===45||tn(z)?(n.consume(z),c+=String.fromCharCode(z),T):i(z)}function _(z){return z===62?(n.consume(z),o.interrupt?l:D):i(z)}function A(z){return rt(z)?(n.consume(z),A):$(z)}function k(z){return z===47?(n.consume(z),$):z===58||z===95||Mn(z)?(n.consume(z),q):rt(z)?(n.consume(z),k):$(z)}function q(z){return z===45||z===46||z===58||z===95||tn(z)?(n.consume(z),q):H(z)}function H(z){return z===61?(n.consume(z),M):rt(z)?(n.consume(z),H):k(z)}function M(z){return z===null||z===60||z===61||z===62||z===96?i(z):z===34||z===39?(n.consume(z),m=z,I):rt(z)?(n.consume(z),M):Y(z)}function I(z){return z===m?(n.consume(z),m=null,F):z===null||Be(z)?i(z):(n.consume(z),I)}function Y(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||Vt(z)?H(z):(n.consume(z),Y)}function F(z){return z===47||z===62||rt(z)?k(z):i(z)}function $(z){return z===62?(n.consume(z),ie):i(z)}function ie(z){return z===null||Be(z)?D(z):rt(z)?(n.consume(z),ie):i(z)}function D(z){return z===45&&u===2?(n.consume(z),Z):z===60&&u===1?(n.consume(z),Q):z===62&&u===4?(n.consume(z),N):z===63&&u===3?(n.consume(z),L):z===93&&u===5?(n.consume(z),de):Be(z)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(ix,B,ne)(z)):z===null||Be(z)?(n.exit("htmlFlowData"),ne(z)):(n.consume(z),D)}function ne(z){return n.check(ax,C,B)(z)}function C(z){return n.enter("lineEnding"),n.consume(z),n.exit("lineEnding"),V}function V(z){return z===null||Be(z)?ne(z):(n.enter("htmlFlowData"),D(z))}function Z(z){return z===45?(n.consume(z),L):D(z)}function Q(z){return z===47?(n.consume(z),c="",se):D(z)}function se(z){if(z===62){const re=c.toLowerCase();return qm.includes(re)?(n.consume(z),N):D(z)}return Mn(z)&&c.length<8?(n.consume(z),c+=String.fromCharCode(z),se):D(z)}function de(z){return z===93?(n.consume(z),L):D(z)}function L(z){return z===62?(n.consume(z),N):z===45&&u===2?(n.consume(z),L):D(z)}function N(z){return z===null||Be(z)?(n.exit("htmlFlowData"),B(z)):(n.consume(z),N)}function B(z){return n.exit("htmlFlow"),l(z)}}function sx(n,l,i){const o=this;return u;function u(c){return Be(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),s):i(c)}function s(c){return o.parser.lazy[o.now().line]?i(c):l(c)}}function ux(n,l,i){return o;function o(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),n.attempt(Fl,l,i)}}const cx={name:"htmlText",tokenize:fx};function fx(n,l,i){const o=this;let u,s,c;return f;function f(L){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(L),m}function m(L){return L===33?(n.consume(L),h):L===47?(n.consume(L),H):L===63?(n.consume(L),k):Mn(L)?(n.consume(L),Y):i(L)}function h(L){return L===45?(n.consume(L),g):L===91?(n.consume(L),s=0,w):Mn(L)?(n.consume(L),A):i(L)}function g(L){return L===45?(n.consume(L),b):i(L)}function y(L){return L===null?i(L):L===45?(n.consume(L),v):Be(L)?(c=y,Q(L)):(n.consume(L),y)}function v(L){return L===45?(n.consume(L),b):y(L)}function b(L){return L===62?Z(L):L===45?v(L):y(L)}function w(L){const N="CDATA[";return L===N.charCodeAt(s++)?(n.consume(L),s===N.length?E:w):i(L)}function E(L){return L===null?i(L):L===93?(n.consume(L),T):Be(L)?(c=E,Q(L)):(n.consume(L),E)}function T(L){return L===93?(n.consume(L),_):E(L)}function _(L){return L===62?Z(L):L===93?(n.consume(L),_):E(L)}function A(L){return L===null||L===62?Z(L):Be(L)?(c=A,Q(L)):(n.consume(L),A)}function k(L){return L===null?i(L):L===63?(n.consume(L),q):Be(L)?(c=k,Q(L)):(n.consume(L),k)}function q(L){return L===62?Z(L):k(L)}function H(L){return Mn(L)?(n.consume(L),M):i(L)}function M(L){return L===45||tn(L)?(n.consume(L),M):I(L)}function I(L){return Be(L)?(c=I,Q(L)):rt(L)?(n.consume(L),I):Z(L)}function Y(L){return L===45||tn(L)?(n.consume(L),Y):L===47||L===62||Vt(L)?F(L):i(L)}function F(L){return L===47?(n.consume(L),Z):L===58||L===95||Mn(L)?(n.consume(L),$):Be(L)?(c=F,Q(L)):rt(L)?(n.consume(L),F):Z(L)}function $(L){return L===45||L===46||L===58||L===95||tn(L)?(n.consume(L),$):ie(L)}function ie(L){return L===61?(n.consume(L),D):Be(L)?(c=ie,Q(L)):rt(L)?(n.consume(L),ie):F(L)}function D(L){return L===null||L===60||L===61||L===62||L===96?i(L):L===34||L===39?(n.consume(L),u=L,ne):Be(L)?(c=D,Q(L)):rt(L)?(n.consume(L),D):(n.consume(L),C)}function ne(L){return L===u?(n.consume(L),u=void 0,V):L===null?i(L):Be(L)?(c=ne,Q(L)):(n.consume(L),ne)}function C(L){return L===null||L===34||L===39||L===60||L===61||L===96?i(L):L===47||L===62||Vt(L)?F(L):(n.consume(L),C)}function V(L){return L===47||L===62||Vt(L)?F(L):i(L)}function Z(L){return L===62?(n.consume(L),n.exit("htmlTextData"),n.exit("htmlText"),l):i(L)}function Q(L){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(L),n.exit("lineEnding"),se}function se(L){return rt(L)?dt(n,de,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):de(L)}function de(L){return n.enter("htmlTextData"),c(L)}}const fu={name:"labelEnd",resolveAll:px,resolveTo:gx,tokenize:yx},dx={tokenize:bx},hx={tokenize:vx},mx={tokenize:Sx};function px(n){let l=-1;const i=[];for(;++l<n.length;){const o=n[l][1];if(i.push(n[l]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const u=o.type==="labelImage"?4:2;o.type="data",l+=u}}return n.length!==i.length&&zn(n,0,n.length,i),n}function gx(n,l){let i=n.length,o=0,u,s,c,f;for(;i--;)if(u=n[i][1],s){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;n[i][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(c){if(n[i][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(s=i,u.type!=="labelLink")){o=2;break}}else u.type==="labelEnd"&&(c=i);const m={type:n[s][1].type==="labelLink"?"link":"image",start:{...n[s][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[s][1].start},end:{...n[c][1].end}},g={type:"labelText",start:{...n[s+o+2][1].end},end:{...n[c-2][1].start}};return f=[["enter",m,l],["enter",h,l]],f=dn(f,n.slice(s+1,s+o+3)),f=dn(f,[["enter",g,l]]),f=dn(f,su(l.parser.constructs.insideSpan.null,n.slice(s+o+4,c-3),l)),f=dn(f,[["exit",g,l],n[c-2],n[c-1],["exit",h,l]]),f=dn(f,n.slice(c+1)),f=dn(f,[["exit",m,l]]),zn(n,s,n.length,f),n}function yx(n,l,i){const o=this;let u=o.events.length,s,c;for(;u--;)if((o.events[u][1].type==="labelImage"||o.events[u][1].type==="labelLink")&&!o.events[u][1]._balanced){s=o.events[u][1];break}return f;function f(v){return s?s._inactive?y(v):(c=o.parser.defined.includes(vi(o.sliceSerialize({start:s.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(v),n.exit("labelMarker"),n.exit("labelEnd"),m):i(v)}function m(v){return v===40?n.attempt(dx,g,c?g:y)(v):v===91?n.attempt(hx,g,c?h:y)(v):c?g(v):y(v)}function h(v){return n.attempt(mx,g,y)(v)}function g(v){return l(v)}function y(v){return s._balanced=!0,i(v)}}function bx(n,l,i){return o;function o(y){return n.enter("resource"),n.enter("resourceMarker"),n.consume(y),n.exit("resourceMarker"),u}function u(y){return Vt(y)?ja(n,s)(y):s(y)}function s(y){return y===41?g(y):Bm(n,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Vt(y)?ja(n,m)(y):g(y)}function f(y){return i(y)}function m(y){return y===34||y===39||y===40?Hm(n,h,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function h(y){return Vt(y)?ja(n,g)(y):g(y)}function g(y){return y===41?(n.enter("resourceMarker"),n.consume(y),n.exit("resourceMarker"),n.exit("resource"),l):i(y)}}function vx(n,l,i){const o=this;return u;function u(f){return Um.call(o,n,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return o.parser.defined.includes(vi(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?l(f):i(f)}function c(f){return i(f)}}function Sx(n,l,i){return o;function o(s){return n.enter("reference"),n.enter("referenceMarker"),n.consume(s),n.exit("referenceMarker"),u}function u(s){return s===93?(n.enter("referenceMarker"),n.consume(s),n.exit("referenceMarker"),n.exit("reference"),l):i(s)}}const Ex={name:"labelStartImage",resolveAll:fu.resolveAll,tokenize:xx};function xx(n,l,i){const o=this;return u;function u(f){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(f),n.exit("labelImageMarker"),s}function s(f){return f===91?(n.enter("labelMarker"),n.consume(f),n.exit("labelMarker"),n.exit("labelImage"),c):i(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in o.parser.constructs?i(f):l(f)}}const _x={name:"labelStartLink",resolveAll:fu.resolveAll,tokenize:wx};function wx(n,l,i){const o=this;return u;function u(c){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(c),n.exit("labelMarker"),n.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in o.parser.constructs?i(c):l(c)}}const du={name:"lineEnding",tokenize:Cx};function Cx(n,l){return i;function i(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),dt(n,l,"linePrefix")}}const Yl={name:"thematicBreak",tokenize:Tx};function Tx(n,l,i){let o=0,u;return s;function s(h){return n.enter("thematicBreak"),c(h)}function c(h){return u=h,f(h)}function f(h){return h===u?(n.enter("thematicBreakSequence"),m(h)):o>=3&&(h===null||Be(h))?(n.exit("thematicBreak"),l(h)):i(h)}function m(h){return h===u?(n.consume(h),o++,m):(n.exit("thematicBreakSequence"),rt(h)?dt(n,f,"whitespace")(h):f(h))}}const Gt={continuation:{tokenize:Rx},exit:zx,name:"list",tokenize:Nx},Ax={partial:!0,tokenize:Mx},kx={partial:!0,tokenize:Ox};function Nx(n,l,i){const o=this,u=o.events[o.events.length-1];let s=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,c=0;return f;function f(b){const w=o.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!o.containerState.marker||b===o.containerState.marker:ou(b)){if(o.containerState.type||(o.containerState.type=w,n.enter(w,{_container:!0})),w==="listUnordered")return n.enter("listItemPrefix"),b===42||b===45?n.check(Yl,i,h)(b):h(b);if(!o.interrupt||b===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),m(b)}return i(b)}function m(b){return ou(b)&&++c<10?(n.consume(b),m):(!o.interrupt||c<2)&&(o.containerState.marker?b===o.containerState.marker:b===41||b===46)?(n.exit("listItemValue"),h(b)):i(b)}function h(b){return n.enter("listItemMarker"),n.consume(b),n.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||b,n.check(Fl,o.interrupt?i:g,n.attempt(Ax,v,y))}function g(b){return o.containerState.initialBlankLine=!0,s++,v(b)}function y(b){return rt(b)?(n.enter("listItemPrefixWhitespace"),n.consume(b),n.exit("listItemPrefixWhitespace"),v):i(b)}function v(b){return o.containerState.size=s+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,l(b)}}function Rx(n,l,i){const o=this;return o.containerState._closeFlow=void 0,n.check(Fl,u,s);function u(f){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,dt(n,l,"listItemIndent",o.containerState.size+1)(f)}function s(f){return o.containerState.furtherBlankLines||!rt(f)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,c(f)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n.attempt(kx,l,c)(f))}function c(f){return o.containerState._closeFlow=!0,o.interrupt=void 0,dt(n,n.attempt(Gt,l,i),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function Ox(n,l,i){const o=this;return dt(n,u,"listItemIndent",o.containerState.size+1);function u(s){const c=o.events[o.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===o.containerState.size?l(s):i(s)}}function zx(n){n.exit(this.containerState.type)}function Mx(n,l,i){const o=this;return dt(n,u,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(s){const c=o.events[o.events.length-1];return!rt(s)&&c&&c[1].type==="listItemPrefixWhitespace"?l(s):i(s)}}const Pm={name:"setextUnderline",resolveTo:Dx,tokenize:jx};function Dx(n,l){let i=n.length,o,u,s;for(;i--;)if(n[i][0]==="enter"){if(n[i][1].type==="content"){o=i;break}n[i][1].type==="paragraph"&&(u=i)}else n[i][1].type==="content"&&n.splice(i,1),!s&&n[i][1].type==="definition"&&(s=i);const c={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[u][1].type="setextHeadingText",s?(n.splice(u,0,["enter",c,l]),n.splice(s+1,0,["exit",n[o][1],l]),n[o][1].end={...n[s][1].end}):n[o][1]=c,n.push(["exit",c,l]),n}function jx(n,l,i){const o=this;let u;return s;function s(h){let g=o.events.length,y;for(;g--;)if(o.events[g][1].type!=="lineEnding"&&o.events[g][1].type!=="linePrefix"&&o.events[g][1].type!=="content"){y=o.events[g][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||y)?(n.enter("setextHeadingLine"),u=h,c(h)):i(h)}function c(h){return n.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===u?(n.consume(h),f):(n.exit("setextHeadingLineSequence"),rt(h)?dt(n,m,"lineSuffix")(h):m(h))}function m(h){return h===null||Be(h)?(n.exit("setextHeadingLine"),l(h)):i(h)}}const Lx={tokenize:Ix};function Ix(n){const l=this,i=n.attempt(Fl,o,n.attempt(this.parser.constructs.flowInitial,u,dt(n,n.attempt(this.parser.constructs.flow,u,n.attempt(PE,u)),"linePrefix")));return i;function o(s){if(s===null){n.consume(s);return}return n.enter("lineEndingBlank"),n.consume(s),n.exit("lineEndingBlank"),l.currentConstruct=void 0,i}function u(s){if(s===null){n.consume(s);return}return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),l.currentConstruct=void 0,i}}const Bx={resolveAll:Ym()},Ux=Fm("string"),Hx=Fm("text");function Fm(n){return{resolveAll:Ym(n==="text"?qx:void 0),tokenize:l};function l(i){const o=this,u=this.parser.constructs[n],s=i.attempt(u,c,f);return c;function c(g){return h(g)?s(g):f(g)}function f(g){if(g===null){i.consume(g);return}return i.enter("data"),i.consume(g),m}function m(g){return h(g)?(i.exit("data"),s(g)):(i.consume(g),m)}function h(g){if(g===null)return!0;const y=u[g];let v=-1;if(y)for(;++v<y.length;){const b=y[v];if(!b.previous||b.previous.call(o,o.previous))return!0}return!1}}}function Ym(n){return l;function l(i,o){let u=-1,s;for(;++u<=i.length;)s===void 0?i[u]&&i[u][1].type==="data"&&(s=u,u++):(!i[u]||i[u][1].type!=="data")&&(u!==s+2&&(i[s][1].end=i[u-1][1].end,i.splice(s+2,u-s-2),u=s+2),s=void 0);return n?n(i,o):i}}function qx(n,l){let i=0;for(;++i<=n.length;)if((i===n.length||n[i][1].type==="lineEnding")&&n[i-1][1].type==="data"){const o=n[i-1][1],u=l.sliceStream(o);let s=u.length,c=-1,f=0,m;for(;s--;){const h=u[s];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)m=!0,f++;else if(h!==-1){s++;break}}if(l._contentTypeTextTrailing&&i===n.length&&(f=0),f){const h={type:i===n.length||m||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:o.start._bufferIndex+c,_index:o.start._index+s,line:o.end.line,column:o.end.column-f,offset:o.end.offset-f},end:{...o.end}};o.end={...h.start},o.start.offset===o.end.offset?Object.assign(o,h):(n.splice(i,0,["enter",h,l],["exit",h,l]),i+=2)}i++}return n}const Px=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:XE},disable:{null:[]},document:{42:Gt,43:Gt,45:Gt,48:Gt,49:Gt,50:Gt,51:Gt,52:Gt,53:Gt,54:Gt,55:Gt,56:Gt,57:Gt,62:zm},flow:{35:$E,42:Yl,45:[Pm,Yl],60:rx,61:Pm,95:Yl,96:Lm,126:Lm},flowInitial:{[-2]:cu,[-1]:cu,32:cu},insideSpan:{null:[uu,Bx]},string:{38:Dm,92:Mm},text:{[-5]:du,[-4]:du,[-3]:du,33:Ex,38:Dm,42:uu,60:[_E,cx],91:_x,92:[JE,Mm],93:fu,95:uu,96:LE}},Symbol.toStringTag,{value:"Module"}));function Fx(n,l,i){let o={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const u={},s=[];let c=[],f=[];const m={attempt:I(H),check:I(M),consume:A,enter:k,exit:q,interrupt:I(M,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:w,parser:n,previous:null,sliceSerialize:v,sliceStream:b,write:y};let g=l.tokenize.call(h,m);return l.resolveAll&&s.push(l),h;function y(ie){return c=dn(c,ie),T(),c[c.length-1]!==null?[]:(Y(l,0),h.events=su(s,h.events,h),h.events)}function v(ie,D){return Vx(b(ie),D)}function b(ie){return Yx(c,ie)}function w(){const{_bufferIndex:ie,_index:D,line:ne,column:C,offset:V}=o;return{_bufferIndex:ie,_index:D,line:ne,column:C,offset:V}}function E(ie){u[ie.line]=ie.column,$()}function T(){let ie;for(;o._index<c.length;){const D=c[o._index];if(typeof D=="string")for(ie=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===ie&&o._bufferIndex<D.length;)_(D.charCodeAt(o._bufferIndex));else _(D)}}function _(ie){g=g(ie)}function A(ie){Be(ie)?(o.line++,o.column=1,o.offset+=ie===-3?2:1,$()):ie!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===c[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=ie}function k(ie,D){const ne=D||{};return ne.type=ie,ne.start=w(),h.events.push(["enter",ne,h]),f.push(ne),ne}function q(ie){const D=f.pop();return D.end=w(),h.events.push(["exit",D,h]),D}function H(ie,D){Y(ie,D.from)}function M(ie,D){D.restore()}function I(ie,D){return ne;function ne(C,V,Z){let Q,se,de,L;return Array.isArray(C)?B(C):"tokenize"in C?B([C]):N(C);function N(we){return Te;function Te(ke){const Ae=ke!==null&&we[ke],He=ke!==null&&we.null,ve=[...Array.isArray(Ae)?Ae:Ae?[Ae]:[],...Array.isArray(He)?He:He?[He]:[]];return B(ve)(ke)}}function B(we){return Q=we,se=0,we.length===0?Z:z(we[se])}function z(we){return Te;function Te(ke){return L=F(),de=we,we.partial||(h.currentConstruct=we),we.name&&h.parser.constructs.disable.null.includes(we.name)?ce():we.tokenize.call(D?Object.assign(Object.create(h),D):h,m,re,ce)(ke)}}function re(we){return ie(de,L),V}function ce(we){return L.restore(),++se<Q.length?z(Q[se]):Z}}}function Y(ie,D){ie.resolveAll&&!s.includes(ie)&&s.push(ie),ie.resolve&&zn(h.events,D,h.events.length-D,ie.resolve(h.events.slice(D),h)),ie.resolveTo&&(h.events=ie.resolveTo(h.events,h))}function F(){const ie=w(),D=h.previous,ne=h.currentConstruct,C=h.events.length,V=Array.from(f);return{from:C,restore:Z};function Z(){o=ie,h.previous=D,h.currentConstruct=ne,h.events.length=C,f=V,$()}}function $(){o.line in u&&o.column<2&&(o.column=u[o.line],o.offset+=u[o.line]-1)}}function Yx(n,l){const i=l.start._index,o=l.start._bufferIndex,u=l.end._index,s=l.end._bufferIndex;let c;if(i===u)c=[n[i].slice(o,s)];else{if(c=n.slice(i,u),o>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(o):c.shift()}s>0&&c.push(n[u].slice(0,s))}return c}function Vx(n,l){let i=-1;const o=[];let u;for(;++i<n.length;){const s=n[i];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
|
|
43
|
+
`}),R.jsxs(da,{className:b,children:[R.jsx("div",{className:"flex-shrink-0 sticky top-0 z-50",children:R.jsx(r1,{onClose:l,title:s,iconUrl:i,startNewConversation:o})}),R.jsx("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col",children:u}),f&&R.jsxs("div",{className:"flex-shrink-0 sticky bottom-0 z-50",children:[R.jsx(P.Suspense,{fallback:null,children:R.jsx(i1,{value:f.value,onChange:f.onChange,onSend:f.onSend,onFileChange:f.onFileChange,onRecording:f.onRecording,isRecording:f.isRecording,hasAttachment:f.hasAttachment,attachmentFiles:f.attachmentFiles,isDisabled:f.isDisabled,isMobile:m,placeholder:f.placeholder,recordingStatus:f.recordingStatus})}),c&&h==="development"&&R.jsx("div",{className:"px-6 flex justify-center items-center",children:R.jsxs("p",{className:"text-[8px] text-gray-600 font-mono opacity-50",children:["Session ID: ",c]})})]})]})]})}function Wh(){const[n,l]=P.useState(typeof navigator<"u"?navigator.onLine:!0);return P.useEffect(()=>{const i=()=>l(!0),o=()=>l(!1);return window.addEventListener("online",i),window.addEventListener("offline",o),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",o)}},[]),{isOnline:n}}const l1=({environment:n,userId:l})=>{const[i,o]=P.useState([]),[u,s]=P.useState(!1),[c,f]=P.useState(0),[h,m]=P.useState(!1),[g,y]=P.useState([]),v=P.useRef(null),b=P.useRef(null),{isOnline:w}=Wh(),{agentId:E,setSessionId:T,setSessionToken:_,sessionId:A,sessionToken:j,setError:B,setConnectionStatus:U,setShowRetryButton:z,setStartNewConnection:H,setIsStreaming:Y,setIsWaitingForResponse:F,isStreaming:$,initialMessage:ae,isWaitingForResponse:M,setProgressMessage:ne,setRecordingStatus:C,clearSession:X,addMessageToSession:Z,getMessagesForSession:K,updateMessageInSession:oe,setInitialMessage:de}=Yr();P.useEffect(()=>{w?h?k()&&(U(Pe.ConnectionStatus.CONNECTED),N()):U(Pe.ConnectionStatus.CONNECTING):U(Pe.ConnectionStatus.NOT_CONNECTED)},[w,h]),P.useEffect(()=>{if(A){const ye=K(A)||[];o(ye),y([])}},[A]),P.useEffect(()=>{if(m(!1),!E)return;const ye=new Pe.SynapseSDK({agentId:E,environment:n,userId:l,callbacks:{onError:S=>{if(S instanceof Pe.SynapseError)switch(S.code){case Pe.SynapseErrorCode.SESSION:U(Pe.ConnectionStatus.NOT_CONNECTED),z(!0);break;case Pe.SynapseErrorCode.RECORDING:B({title:"Recording failed",description:S?.displayMessage||"Please try again later"});break;default:B({title:"Something went wrong",description:"Please try again later"}),z(!0);break}},onSessionRefreshed:S=>{S?.session_id&&S?.session_token&&(T(S.session_id),_(S.session_token))}}});return v.current=ye,m(!0),()=>{m(!1),v.current?.endSession(),v.current=null,b.current&&(clearTimeout(b.current),b.current=null)}},[E,n,l]),P.useEffect(()=>{const ye=i[i.length-1];!ye?.role||!A||(ye?.role===en.USER?Z(A,ye):!$&&!ye.isStored&&(o(S=>{const J=[...S];return J[J.length-1]={...ye,isStored:!0},J}),Z(A,{...ye,isStored:!0})))},[i,$]),P.useEffect(()=>{const ye=i[i.length-1];return()=>{ye&&!ye?.isStored&&A&&Z(A,{...ye,isStored:!0})}},[]),P.useEffect(()=>(b.current&&(clearTimeout(b.current),b.current=null),M&&!$?b.current=setTimeout(()=>{F(!1),b.current=null},3e4):$&&b.current&&(clearTimeout(b.current),b.current=null),()=>{b.current&&(clearTimeout(b.current),b.current=null)}),[M,$,F]);const L=async(ye=!1)=>{try{if(!v.current){B({title:"SDK not initialized",description:"Please ensure agentId is configured"}),s(!1);return}s(!0);let S;ye?(await X(),N(),S=await v.current.startSession()):S=await v.current.startSession({session_id:A||"",session_token:j||""}),S?.session_id&&S?.session_token&&(T(S.session_id),_(S.session_token),S?.initial_message?.text&&S?.initial_message?.suggestions?.length&&de(S.initial_message)),re()}catch{B({title:"Something Went wrong!",description:"Please try again later."}),s(!1);return}finally{s(!1)}},k=()=>v.current?.isConnected()??!1,q=()=>{v.current?.endSession()},N=()=>{f(0),z(!1),H(!1),B(null)},re=()=>{v.current?.on(Pe.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,ye=>{const S=ye;if(S.data?.text&&S.messageId){$||(F(!1),Y(!0));const J=S.data.text,ee=S.messageId,I=S.timestamp;o(D=>{const G=D[D.length-1];if(G&&G.id===ee&&G.role===en.ASSISTANT){const he=[...D];return he[he.length-1]={...G,content:G.content+J},he}else return[...D,{id:ee,content:J,role:en.ASSISTANT,timestamp:gi(I??Date.now()),isStored:!1}]})}}),v.current?.on(Pe.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM,()=>{Y(!1),ne(null)}),v.current?.on(Pe.SYNAPSE_REALTIME_EVENTS.CONNECTED,()=>{N(),U(Pe.ConnectionStatus.CONNECTED)}),v.current?.on(Pe.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,ye=>{const S=ye;if(!S?.messageId||!S?.data||!S?.data?.details?.component)return;const J=S.messageId,ee=S.timestamp??Date.now();o(I=>{const D=I[I.length-1];if(D.id===J&&D.role===en.ASSISTANT){const G=[...I],he={...D,toolEscalationData:{...S.data,isResponded:!1},isResponseFromTool:!0};return G[I.length-1]=he,oe(A,J,he),G}else{const G={id:J,content:S.data?.text||"",role:en.ASSISTANT,toolEscalationData:{...S.data,isResponded:!1},isResponseFromTool:!0,timestamp:gi(ee),isStored:!1};return[...I,G]}})}),v.current?.on(Pe.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,ye=>{U(Pe.ConnectionStatus.NOT_CONNECTED),c<2?(f(S=>S+1),z(!0)):H(!0)}),v.current?.on(Pe.SYNAPSE_REALTIME_EVENTS.ERROR,ye=>{z(!0),C(Ht.IDLE)}),v.current?.on(Pe.SYNAPSE_REALTIME_EVENTS.AUDIO_TRANSCRIPT,async ye=>{const S=ye;S?.data?.text&&(o(J=>[...J,{id:Date.now().toString(),content:S.data.text||"",role:en.USER,timestamp:gi(Date.now()),isStored:!0}]),C(Ht.IDLE)),Y(!1),F(!1),ne(null)}),v.current?.on(Pe.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE,ye=>{const S=ye;S.data?.text&&(F(!1),ne(S.data.text))}),v.current?.on(Pe.SYNAPSE_REALTIME_EVENTS.TOOL_START,ye=>{const S=ye;if(S.data?.name&&S.messageId){const J=S.messageId;o(ee=>{const I=ee[ee.length-1];if(I&&I.id===J&&I.role===en.ASSISTANT){const D=[...ee];return D[D.length-1]={...I,toolCallStatus:`Calling tool: ${S.data.name}...`},A&&oe(A,J,{toolCallStatus:`Calling tool: ${S.data.name}...`}),D}return ee})}}),v.current?.on(Pe.SYNAPSE_REALTIME_EVENTS.TOOL_END,ye=>{const S=ye;if(S.data?.name&&S.messageId){const J=S.messageId;o(ee=>{const I=ee[ee.length-1];if(I&&I.id===J&&I.role===en.ASSISTANT){const D=[...ee];return D[D.length-1]={...I,toolCallStatus:"Tool call completed."},A&&oe(A,J,{toolCallStatus:"Tool call completed."}),D}return ee})}})},ce=async({message:ye,messageId:S,files:J,audio:ee,toolCalled:I})=>{if(!k()||J&&J.length<0&&ye?.trim()===""&&!ee?.audio)return;B(null);const D=i.length==2&&g.length==2?g:null,G=i.length-1,he=G>=0?i[G]:null,be=he?he?.isResponseFromTool||he.role===en.ASSISTANT&&he.toolEscalationData:null;await v.current?.sendMessage({message:ye,files:J,audio:ee,...D&&{initial_prompts:D},...be&&!I?{tool_declined:!0,tool_id:he?.toolEscalationData?.tool_id||""}:{}}),(ye||J&&J.length>0)&&(o(se=>{const Ee=[...se],_e=Ee.length-1;return be&&_e>=0&&Ee[_e].toolEscalationData&&(Ee[_e]={...Ee[_e],toolEscalationData:{...Ee[_e].toolEscalationData,tool_id:null,isResponded:!0}},oe(A,Ee[G].id||Date.now().toString(),Ee[G])),[...Ee,{id:S||Date.now().toString(),content:ye||"",files:J||[],role:en.USER,timestamp:gi(Date.now()),isStored:!0}]}),F(!0))};return{sendMessage:ce,startSession:L,incomingMessages:i,loading:u,endSession:q,isReady:h,startRecording:async()=>{if(!k())throw new Error("Not connected to the server");try{await v.current?.startRecording({onChunks:async ye=>{C(Ht.PROCESSING),await ce({audio:ye}),C(Ht.TRANSCRIBING)},onError(ye){C(Ht.IDLE)}}),C(Ht.LISTENING)}catch(ye){throw C(Ht.IDLE),ye}},stopRecording:()=>{k()&&v.current?.endRecording()},handleRetry:async()=>{if(!k())N(),await L(!1);else{const ye=i[i.length-1];ye&&ye.role===en.USER&&v.current?.sendMessage({message:ye.content,files:ye.files||[],messageId:ye.id})}},isValidFile:ye=>{const S=ye.type.toLowerCase(),ee=ye.name.toLowerCase().split(".").pop()||"";return S&&["application/pdf","image/jpeg","image/jpg","image/png","image/heic","image/heif","application/vnd.openxmlformats-officedocument.wordprocessingml.document","image/tiff","text/plain","text/markdown"].some(D=>S.includes(D))?!0:!S||S===""?["pdf","jpg","jpeg","png","heic","docx","tiff","txt","md"].includes(ee):!1},handleStartNewConnection:async()=>{N(),await X(),await L(!0)},callTool:async(ye,S)=>{try{if(!k())throw new Error("Not connected to the server");const J=await v.current?.callTool(ye,S);if(!J)throw new Error("Failed to call tool");return J}catch(J){throw J}},handleInitialTaskClick:async ye=>{if(!ae?.suggestions.length||!ye)return;const S=ae.suggestions.find(J=>J.value===ye);if(!S||!S.response){await ce({message:ye});return}o(J=>[...J,{id:Date.now().toString(),content:ye,role:en.USER,timestamp:gi(Date.now()),isStored:!0}]),F(!0),await Jv(1e3),F(!1),o(J=>[...J,{id:Date.now().toString(),content:S.response||"Please try again",role:en.ASSISTANT,timestamp:gi(Date.now()),isStored:!1}]),y([{role:"user",text:ye},{role:"assistant",text:S.response}])}}},o1=P.lazy(()=>Promise.resolve().then(()=>Gw)),s1=P.lazy(()=>Promise.resolve().then(()=>Kw)),u1=P.lazy(()=>Promise.resolve().then(()=>Jw).then(n=>({default:n.ConnectionStatus})));function c1({isOpen:n,agentId:l,config:i}){const[o,u]=P.useState(""),[s,c]=P.useState(!1),[f,h]=P.useState(!1),[m,g]=P.useState([]),y=P.useRef(!1),v=P.useRef(null),b=P.useRef(null),[w,E]=P.useState(!1),T=P.useRef(0),{setAgentId:_,startNewConnection:A,showRetryButton:j,clearError:B,error:U,connectionStatus:z,recordingStatus:H,isWaitingForResponse:Y,isStreaming:F,setError:$,initialMessage:ae,sessionId:M}=Yr(),{incomingMessages:ne,loading:C,sendMessage:X,startSession:Z,isReady:K,startRecording:oe,stopRecording:de,handleRetry:L,handleStartNewConnection:k,isValidFile:q,callTool:N,handleInitialTaskClick:re}=l1({environment:"production"});P.useEffect(()=>{l&&(_(l),n&&K&&!y.current&&(y.current=!0,Z(!1)))},[n,K,l]);const ce=()=>v.current?.querySelector("[data-radix-scroll-area-viewport]")||null,we=()=>{const D=ce();D&&(D.scrollTo({top:D.scrollHeight,behavior:"smooth"}),E(!1))},Ae=()=>{const D=ce();return D?D.scrollHeight-D.scrollTop-D.clientHeight<50:!0};P.useEffect(()=>{ne.length>T.current&&(setTimeout(()=>{we()},100),T.current=ne.length)},[ne.length]),P.useEffect(()=>{const D=ce();if(!D)return;const G=()=>{E(!Ae())},he=()=>{G()},be=new MutationObserver(()=>{G()});return be.observe(D,{childList:!0,subtree:!0}),D.addEventListener("scroll",he),G(),()=>{be.disconnect(),D.removeEventListener("scroll",he)}},[ne.length]);const Ne=ne.length>0,ke=z===Pe.ConnectionStatus.CONNECTED,He=C||!ke||Y||F,Se=C||!ke,Me=P.useMemo(()=>H===Ht.IDLE?null:H===Ht.LISTENING?"Listening...":H===Ht.PROCESSING?"Processing...":H===Ht.TRANSCRIBING?"Transcribing...":null,[H]),ye=Se?"Connecting...":Me&&H!==Ht.IDLE?Me:Y||F?"Please wait for the response...":"Ask me anything…",S=async()=>{if(!He&&(o.trim()||s||f)){const D=Date.now().toString();m.length>0?(await X({files:m,message:o.trim(),messageId:D}),g([]),h(!1)):o.trim()&&await X({message:o,messageId:D}),u(""),c(!1),h(!1),setTimeout(()=>{we()},100)}},J=async D=>{D&&await re(D)},ee=D=>{if(D&&D.length>0){const G=D.filter(he=>q(he)?!0:($({title:`File type not supported: ${he.name}`,description:"Only PDF, images (JPG, JPEG, PNG, HEIC), documents (DOCX, TIFF), and text files (TXT, MD) are allowed."}),!1));if(G?.length>0)D=G;else return}g(G=>(h((G?.length??0)+(D?.length??0)>0),[...G,...D]))},I=async()=>{if(s)await de(),c(!1);else{if(He)return;try{await oe(),c(!0)}catch{}}};return R.jsx(a1,{isOpen:n,onClose:i.onClose,title:i.title,iconUrl:i.iconUrl,onStartNewSession:()=>Z(!0),sessionId:M,environment:i.environment,chatComposer:{value:o,onChange:u,onSend:S,onFileChange:ee,onRecording:I,isRecording:s,hasAttachment:f,attachmentFiles:m,isDisabled:He,placeholder:ye,recordingStatus:H},children:!C&&R.jsx(P.Suspense,{fallback:R.jsx(f1,{}),children:R.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl relative",children:[R.jsx(Ud,{ref:v,className:"flex-1 min-h-0",children:R.jsxs("div",{className:Ve("transition-all duration-300",Ne?"p-4 space-y-3":"p-6 space-y-6"),children:[!Ne&&ae?.text?R.jsx(s1,{tasks:ae.suggestions,initialPrompt:ae.text,onTaskClick:J,disabled:He}):R.jsx(o1,{messages:ne,onSendMessage:X,iconUrl:i.iconUrl,callTool:N}),R.jsx("div",{ref:b})]})}),w&&R.jsx("div",{className:"absolute bottom-[10px] left-1/2 transform -translate-x-1/2 z-10",children:R.jsx(kt,{onClick:we,size:"icon",className:"h-10 w-10 rounded-full bg-white/90 backdrop-blur-sm shadow-lg border border-lavender-200/60 hover:bg-white hover:shadow-xl transition-all duration-200",children:R.jsx(Rs,{className:"w-5 h-5 text-slate-700"})})}),R.jsx(u1,{className:"mt-2",onRetry:L,onStartNewSession:k,showRetryButton:j,startNewConnection:A,clearError:B,error:U,isConnected:ke})]})})})}function f1(){return R.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl animate-pulse",children:[R.jsxs("div",{className:"flex-1 p-6 space-y-4",children:[R.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),R.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),R.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"})]}),R.jsx("div",{className:"h-24 border-t border-gray-100 bg-gray-50"})]})}function d1({agentId:n,config:l}){const[i,o]=P.useState(!1);P.useEffect(()=>{o(!0)},[]);const u=()=>{o(!1),l?.onClose?.()};return R.jsx(c1,{isOpen:i,agentId:n,config:{...l,environment:l.environment??"production",onClose:u,title:l.title??"Medi Clinic"}})}const $h=(n,l,i)=>{Lb.createRoot(n).render(R.jsx(P.StrictMode,{children:R.jsx(d1,{agentId:l,config:i||{}})}))};typeof window<"u"&&(window.renderMedAssist=$h);const em=P.forwardRef(({className:n,...l},i)=>R.jsx("textarea",{className:Ve("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:i,...l}));em.displayName="Textarea";function h1({value:n,onChange:l,onSend:i,onFileChange:o,onRecording:u,isRecording:s,hasAttachment:c,attachmentFiles:f,isDisabled:h,placeholder:m,isMobile:g,recordingStatus:y}){const v=P.useRef(null),b=P.useRef(null),w=n.trim().length>0||c,E=(h||y!==Ht.IDLE)&&!s,T=Ve("rounded-full transition-all duration-200 ",s?"bg-gradient-to-r from-rose-400 via-lavender-500 to-indigo-500 text-white ring-2 ring-white/60 animate-pulse shadow-[0_0_20px_rgba(139,92,246,0.45)]":E?"text-lavender-300 cursor-not-allowed shadow-none":"text-lavender-600 hover:bg-gray-100"),_=z=>{const H=Array.from(z.target.files||[]);H.length>0&&o(H)},A=()=>{h||v.current?.click()},j=z=>{z.key==="Enter"&&!z.shiftKey&&w&&!h&&(z.preventDefault(),i())},B=z=>{z.style.height="auto",z.style.overflow="hidden";const H=z.scrollHeight,Y=40,F=120,$=Math.max(Y,Math.min(H,F));z.style.height=$+"px",H>F?z.style.overflow="auto":z.style.overflow="hidden"},U=z=>{B(z.currentTarget)};return P.useEffect(()=>{b.current&&B(b.current)},[n]),P.useEffect(()=>{!h&&!g&&b.current?.focus()},[h]),R.jsxs("div",{className:"border-t border-white/20 bg-white/70 backdrop-blur-xl px-4 py-2",children:[R.jsx("input",{ref:v,type:"file",multiple:!0,accept:"image/jpeg, image/png, image/jpg, image/tiff, application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document, text/plain, text/markdown, image/heif, image/heic",className:"hidden",onChange:_,disabled:h,title:"Attach file","aria-label":"Attach file"}),R.jsxs("div",{className:Ve("flex items-center gap-2 bg-white/70 backdrop-blur rounded-xl px-4 py-2 shadow-md focus-within:border-lavender-100/50 focus-within:ring-2 focus-within:ring-lavender-400/50 transition-all",s||c?"ring-2 ring-lavender-200/40":"ring-2 ring-lavender-300/40 backdrop-blur-xl",h&&"opacity-60"),children:[c&&f.length>0&&R.jsxs("span",{className:"text-xs text-lavender-600 mr-2",children:[f.length," file(s)"]}),R.jsx(em,{ref:b,onInput:U,placeholder:m,value:n,onChange:z=>l(z.target.value),rows:1,maxLength:1e3,autoFocus:!h,style:{wordBreak:"break-word",overflowWrap:"anywhere",minHeight:"40px",maxHeight:"120px",fontSize:window.innerWidth<=768?"16px":"14px"},onKeyPress:j,disabled:h,title:"Enter your message",className:"flex-1 border-0 outline-none focus-visible:ring-0 focus-visible:ring-offset-0 text-sm !placeholder:text-gray-400 bg-transparent disabled:cursor-not-allowed rounded-none break-words overflow-wrap-anywhere whitespace-pre-wrap"}),R.jsx(kt,{type:"button",variant:"ghost",size:"icon",onClick:A,disabled:h,className:`rounded-full transition-all ${c?"bg-lavender-200/30 text-lavender-600 hover:bg-lavender-200/40":"hover:bg-gray-100 text-lavender-600 hover:text-gray-700"}`,title:"Attach file",children:R.jsx(ES,{className:"w-5 h-5"})}),s?R.jsx(kt,{type:"button",variant:"ghost",size:"icon",onClick:u,className:"rounded-full bg-gradient-to-r from-red-400 to-rose-500 text-white hover:from-red-500 hover:to-rose-600 shadow-lg transition-all duration-200 hover:scale-105 active:scale-95",title:"Stop recording",children:R.jsx(_S,{className:"w-4 h-4"})}):R.jsx(kt,{type:"button",variant:"ghost",size:"icon",onClick:u,disabled:E,className:T,title:"Start recording",children:R.jsx(SS,{className:"w-5 h-5"})}),w&&!h&&R.jsx(kt,{type:"button",size:"icon",onClick:i,className:"h-10 w-10 bg-gradient-to-r from-lavender-400 to-lavender-500 hover:from-lavender-500 hover:to-lavender-600 rounded-full text-white transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95",children:R.jsx(xS,{className:"w-4 h-4"})})]})]})}const m1=Object.freeze(Object.defineProperty({__proto__:null,default:h1},Symbol.toStringTag,{value:"Module"}));function zT(){}function MT(){}function p1(n,l){const i={};return(n[n.length-1]===""?[...n,""]:n).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const g1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,y1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,b1={};function tm(n,l){return(b1.jsx?y1:g1).test(n)}const v1=/[ \t\n\f\r]/g;function S1(n){return typeof n=="object"?n.type==="text"?nm(n.value):!1:nm(n)}function nm(n){return n.replace(v1,"")===""}class Na{constructor(l,i,o){this.normal=i,this.property=l,o&&(this.space=o)}}Na.prototype.normal={},Na.prototype.property={},Na.prototype.space=void 0;function rm(n,l){const i={},o={};for(const u of n)Object.assign(i,u.property),Object.assign(o,u.normal);return new Na(i,o,l)}function Gs(n){return n.toLowerCase()}class Yt{constructor(l,i){this.attribute=i,this.property=l}}Yt.prototype.attribute="",Yt.prototype.booleanish=!1,Yt.prototype.boolean=!1,Yt.prototype.commaOrSpaceSeparated=!1,Yt.prototype.commaSeparated=!1,Yt.prototype.defined=!1,Yt.prototype.mustUseProperty=!1,Yt.prototype.number=!1,Yt.prototype.overloadedBoolean=!1,Yt.prototype.property="",Yt.prototype.spaceSeparated=!1,Yt.prototype.space=void 0;let E1=0;const Fe=Vr(),xt=Vr(),Xs=Vr(),xe=Vr(),ft=Vr(),yi=Vr(),tn=Vr();function Vr(){return 2**++E1}const Zs=Object.freeze(Object.defineProperty({__proto__:null,boolean:Fe,booleanish:xt,commaOrSpaceSeparated:tn,commaSeparated:yi,number:xe,overloadedBoolean:Xs,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),Ks=Object.keys(Zs);class Qs extends Yt{constructor(l,i,o,u){let s=-1;if(super(l,i),im(this,"space",u),typeof o=="number")for(;++s<Ks.length;){const c=Ks[s];im(this,Ks[s],(o&Zs[c])===Zs[c])}}}Qs.prototype.defined=!0;function im(n,l,i){i&&(n[l]=i)}function bi(n){const l={},i={};for(const[o,u]of Object.entries(n.properties)){const s=new Qs(o,n.transform(n.attributes||{},o),u,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(s.mustUseProperty=!0),l[o]=s,i[Gs(o)]=o,i[Gs(s.attribute)]=o}return new Na(l,i,n.space)}const am=bi({properties:{ariaActiveDescendant:null,ariaAtomic:xt,ariaAutoComplete:null,ariaBusy:xt,ariaChecked:xt,ariaColCount:xe,ariaColIndex:xe,ariaColSpan:xe,ariaControls:ft,ariaCurrent:null,ariaDescribedBy:ft,ariaDetails:null,ariaDisabled:xt,ariaDropEffect:ft,ariaErrorMessage:null,ariaExpanded:xt,ariaFlowTo:ft,ariaGrabbed:xt,ariaHasPopup:null,ariaHidden:xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ft,ariaLevel:xe,ariaLive:null,ariaModal:xt,ariaMultiLine:xt,ariaMultiSelectable:xt,ariaOrientation:null,ariaOwns:ft,ariaPlaceholder:null,ariaPosInSet:xe,ariaPressed:xt,ariaReadOnly:xt,ariaRelevant:null,ariaRequired:xt,ariaRoleDescription:ft,ariaRowCount:xe,ariaRowIndex:xe,ariaRowSpan:xe,ariaSelected:xt,ariaSetSize:xe,ariaSort:null,ariaValueMax:xe,ariaValueMin:xe,ariaValueNow:xe,ariaValueText:null,role:null},transform(n,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function lm(n,l){return l in n?n[l]:l}function om(n,l){return lm(n,l.toLowerCase())}const x1=bi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:yi,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:Fe,allowPaymentRequest:Fe,allowUserMedia:Fe,alt:null,as:null,async:Fe,autoCapitalize:null,autoComplete:ft,autoFocus:Fe,autoPlay:Fe,blocking:ft,capture:null,charSet:null,checked:Fe,cite:null,className:ft,cols:xe,colSpan:null,content:null,contentEditable:xt,controls:Fe,controlsList:ft,coords:xe|yi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Fe,defer:Fe,dir:null,dirName:null,disabled:Fe,download:Xs,draggable:xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Fe,formTarget:null,headers:ft,height:xe,hidden:Xs,high:xe,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:Fe,inputMode:null,integrity:null,is:null,isMap:Fe,itemId:null,itemProp:ft,itemRef:ft,itemScope:Fe,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Fe,low:xe,manifest:null,max:null,maxLength:xe,media:null,method:null,min:null,minLength:xe,multiple:Fe,muted:Fe,name:null,nonce:null,noModule:Fe,noValidate:Fe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Fe,optimum:xe,pattern:null,ping:ft,placeholder:null,playsInline:Fe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Fe,referrerPolicy:null,rel:ft,required:Fe,reversed:Fe,rows:xe,rowSpan:xe,sandbox:ft,scope:null,scoped:Fe,seamless:Fe,selected:Fe,shadowRootClonable:Fe,shadowRootDelegatesFocus:Fe,shadowRootMode:null,shape:null,size:xe,sizes:null,slot:null,span:xe,spellCheck:xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:xe,step:null,style:null,tabIndex:xe,target:null,title:null,translate:null,type:null,typeMustMatch:Fe,useMap:null,value:xt,width:xe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ft,axis:null,background:null,bgColor:null,border:xe,borderColor:null,bottomMargin:xe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Fe,declare:Fe,event:null,face:null,frame:null,frameBorder:null,hSpace:xe,leftMargin:xe,link:null,longDesc:null,lowSrc:null,marginHeight:xe,marginWidth:xe,noResize:Fe,noHref:Fe,noShade:Fe,noWrap:Fe,object:null,profile:null,prompt:null,rev:null,rightMargin:xe,rules:null,scheme:null,scrolling:xt,standby:null,summary:null,text:null,topMargin:xe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:xe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Fe,disableRemotePlayback:Fe,prefix:null,property:null,results:xe,security:null,unselectable:null},space:"html",transform:om}),_1=bi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:tn,accentHeight:xe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:xe,amplitude:xe,arabicForm:null,ascent:xe,attributeName:null,attributeType:null,azimuth:xe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:xe,by:null,calcMode:null,capHeight:xe,className:ft,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:xe,diffuseConstant:xe,direction:null,display:null,dur:null,divisor:xe,dominantBaseline:null,download:Fe,dx:null,dy:null,edgeMode:null,editable:null,elevation:xe,enableBackground:null,end:null,event:null,exponent:xe,externalResourcesRequired:null,fill:null,fillOpacity:xe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:yi,g2:yi,glyphName:yi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:xe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:xe,horizOriginX:xe,horizOriginY:xe,id:null,ideographic:xe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:xe,k:xe,k1:xe,k2:xe,k3:xe,k4:xe,kernelMatrix:tn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:xe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:xe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:xe,overlineThickness:xe,paintOrder:null,panose1:null,path:null,pathLength:xe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:xe,pointsAtY:xe,pointsAtZ:xe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:tn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:tn,rev:tn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:tn,requiredFeatures:tn,requiredFonts:tn,requiredFormats:tn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:xe,specularExponent:xe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:xe,strikethroughThickness:xe,string:null,stroke:null,strokeDashArray:tn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:xe,strokeOpacity:xe,strokeWidth:null,style:null,surfaceScale:xe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:tn,tabIndex:xe,tableValues:null,target:null,targetX:xe,targetY:xe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:tn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:xe,underlineThickness:xe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:xe,values:null,vAlphabetic:xe,vMathematical:xe,vectorEffect:null,vHanging:xe,vIdeographic:xe,version:null,vertAdvY:xe,vertOriginX:xe,vertOriginY:xe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:xe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:lm}),sm=bi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,l){return"xlink:"+l.slice(5).toLowerCase()}}),um=bi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:om}),cm=bi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,l){return"xml:"+l.slice(3).toLowerCase()}}),w1={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},C1=/[A-Z]/g,fm=/-[a-z]/g,T1=/^data[-\w.:]+$/i;function A1(n,l){const i=Gs(l);let o=l,u=Yt;if(i in n.normal)return n.property[n.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&T1.test(l)){if(l.charAt(4)==="-"){const s=l.slice(5).replace(fm,N1);o="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=l.slice(4);if(!fm.test(s)){let c=s.replace(C1,k1);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}u=Qs}return new u(o,l)}function k1(n){return"-"+n.toLowerCase()}function N1(n){return n.charAt(1).toUpperCase()}const R1=rm([am,x1,sm,um,cm],"html"),Js=rm([am,_1,sm,um,cm],"svg");function O1(n){return n.join(" ").trim()}var vi={},Ws,dm;function z1(){if(dm)return Ws;dm=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,i=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,u=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
|
|
44
|
+
`,m="/",g="*",y="",v="comment",b="declaration";function w(T,_){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];_=_||{};var A=1,j=1;function B(C){var X=C.match(l);X&&(A+=X.length);var Z=C.lastIndexOf(h);j=~Z?C.length-Z:j+C.length}function U(){var C={line:A,column:j};return function(X){return X.position=new z(C),F(),X}}function z(C){this.start=C,this.end={line:A,column:j},this.source=_.source}z.prototype.content=T;function H(C){var X=new Error(_.source+":"+A+":"+j+": "+C);if(X.reason=C,X.filename=_.source,X.line=A,X.column=j,X.source=T,!_.silent)throw X}function Y(C){var X=C.exec(T);if(X){var Z=X[0];return B(Z),T=T.slice(Z.length),X}}function F(){Y(i)}function $(C){var X;for(C=C||[];X=ae();)X!==!1&&C.push(X);return C}function ae(){var C=U();if(!(m!=T.charAt(0)||g!=T.charAt(1))){for(var X=2;y!=T.charAt(X)&&(g!=T.charAt(X)||m!=T.charAt(X+1));)++X;if(X+=2,y===T.charAt(X-1))return H("End of comment missing");var Z=T.slice(2,X-2);return j+=2,B(Z),T=T.slice(X),j+=2,C({type:v,comment:Z})}}function M(){var C=U(),X=Y(o);if(X){if(ae(),!Y(u))return H("property missing ':'");var Z=Y(s),K=C({type:b,property:E(X[0].replace(n,y)),value:Z?E(Z[0].replace(n,y)):y});return Y(c),K}}function ne(){var C=[];$(C);for(var X;X=M();)X!==!1&&(C.push(X),$(C));return C}return F(),ne()}function E(T){return T?T.replace(f,y):y}return Ws=w,Ws}var hm;function M1(){if(hm)return vi;hm=1;var n=vi&&vi.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(vi,"__esModule",{value:!0}),vi.default=i;const l=n(z1());function i(o,u){let s=null;if(!o||typeof o!="string")return s;const c=(0,l.default)(o),f=typeof u=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:m,value:g}=h;f?u(m,g,h):g&&(s=s||{},s[m]=g)}),s}return vi}var Ra={},mm;function D1(){if(mm)return Ra;mm=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,i=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,u=/^-(ms)-/,s=function(m){return!m||i.test(m)||n.test(m)},c=function(m,g){return g.toUpperCase()},f=function(m,g){return"".concat(g,"-")},h=function(m,g){return g===void 0&&(g={}),s(m)?m:(m=m.toLowerCase(),g.reactCompat?m=m.replace(u,f):m=m.replace(o,f),m.replace(l,c))};return Ra.camelCase=h,Ra}var Oa,pm;function j1(){if(pm)return Oa;pm=1;var n=Oa&&Oa.__importDefault||function(u){return u&&u.__esModule?u:{default:u}},l=n(M1()),i=D1();function o(u,s){var c={};return!u||typeof u!="string"||(0,l.default)(u,function(f,h){f&&h&&(c[(0,i.camelCase)(f,s)]=h)}),c}return o.default=o,Oa=o,Oa}var L1=j1();const I1=ms(L1),gm=ym("end"),$s=ym("start");function ym(n){return l;function l(i){const o=i&&i.position&&i.position[n]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function B1(n){const l=$s(n),i=gm(n);if(l&&i)return{start:l,end:i}}function za(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?bm(n.position):"start"in n||"end"in n?bm(n):"line"in n||"column"in n?eu(n):""}function eu(n){return vm(n&&n.line)+":"+vm(n&&n.column)}function bm(n){return eu(n&&n.start)+"-"+eu(n&&n.end)}function vm(n){return n&&typeof n=="number"?n:1}class qt extends Error{constructor(l,i,o){super(),typeof i=="string"&&(o=i,i=void 0);let u="",s={},c=!1;if(i&&("line"in i&&"column"in i?s={place:i}:"start"in i&&"end"in i?s={place:i}:"type"in i?s={ancestors:[i],place:i.position}:s={...i}),typeof l=="string"?u=l:!s.cause&&l&&(c=!0,u=l.message,s.cause=l),!s.ruleId&&!s.source&&typeof o=="string"){const h=o.indexOf(":");h===-1?s.ruleId=o:(s.source=o.slice(0,h),s.ruleId=o.slice(h+1))}if(!s.place&&s.ancestors&&s.ancestors){const h=s.ancestors[s.ancestors.length-1];h&&(s.place=h.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=u,this.line=f?f.line:void 0,this.name=za(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}qt.prototype.file="",qt.prototype.name="",qt.prototype.reason="",qt.prototype.message="",qt.prototype.stack="",qt.prototype.column=void 0,qt.prototype.line=void 0,qt.prototype.ancestors=void 0,qt.prototype.cause=void 0,qt.prototype.fatal=void 0,qt.prototype.place=void 0,qt.prototype.ruleId=void 0,qt.prototype.source=void 0;const tu={}.hasOwnProperty,U1=new Map,H1=/[A-Z]/g,q1=new Set(["table","tbody","thead","tfoot","tr"]),P1=new Set(["td","th"]),Sm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function F1(n,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=l.filePath||void 0;let o;if(l.development){if(typeof l.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=J1(i,l.jsxDEV)}else{if(typeof l.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof l.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=Q1(i,l.jsx,l.jsxs)}const u={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:o,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?Js:R1,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},s=Em(u,n,void 0);return s&&typeof s!="string"?s:u.create(n,u.Fragment,{children:s||void 0},void 0)}function Em(n,l,i){if(l.type==="element")return Y1(n,l,i);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return V1(n,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return X1(n,l,i);if(l.type==="mdxjsEsm")return G1(n,l);if(l.type==="root")return Z1(n,l,i);if(l.type==="text")return K1(n,l)}function Y1(n,l,i){const o=n.schema;let u=o;l.tagName.toLowerCase()==="svg"&&o.space==="html"&&(u=Js,n.schema=u),n.ancestors.push(l);const s=_m(n,l.tagName,!1),c=W1(n,l);let f=ru(n,l);return q1.has(l.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!S1(h):!0})),xm(n,c,s,l),nu(c,f),n.ancestors.pop(),n.schema=o,n.create(l,s,c,i)}function V1(n,l){if(l.data&&l.data.estree&&n.evaluater){const o=l.data.estree.body[0];return o.type,n.evaluater.evaluateExpression(o.expression)}Ma(n,l.position)}function G1(n,l){if(l.data&&l.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(l.data.estree);Ma(n,l.position)}function X1(n,l,i){const o=n.schema;let u=o;l.name==="svg"&&o.space==="html"&&(u=Js,n.schema=u),n.ancestors.push(l);const s=l.name===null?n.Fragment:_m(n,l.name,!0),c=$1(n,l),f=ru(n,l);return xm(n,c,s,l),nu(c,f),n.ancestors.pop(),n.schema=o,n.create(l,s,c,i)}function Z1(n,l,i){const o={};return nu(o,ru(n,l)),n.create(l,n.Fragment,o,i)}function K1(n,l){return l.value}function xm(n,l,i,o){typeof i!="string"&&i!==n.Fragment&&n.passNode&&(l.node=o)}function nu(n,l){if(l.length>0){const i=l.length>1?l:l[0];i&&(n.children=i)}}function Q1(n,l,i){return o;function o(u,s,c,f){const m=Array.isArray(c.children)?i:l;return f?m(s,c,f):m(s,c)}}function J1(n,l){return i;function i(o,u,s,c){const f=Array.isArray(s.children),h=$s(o);return l(u,s,c,f,{columnNumber:h?h.column-1:void 0,fileName:n,lineNumber:h?h.line:void 0},void 0)}}function W1(n,l){const i={};let o,u;for(u in l.properties)if(u!=="children"&&tu.call(l.properties,u)){const s=eE(n,u,l.properties[u]);if(s){const[c,f]=s;n.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&P1.has(l.tagName)?o=f:i[c]=f}}if(o){const s=i.style||(i.style={});s[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return i}function $1(n,l){const i={};for(const o of l.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const s=o.data.estree.body[0];s.type;const c=s.expression;c.type;const f=c.properties[0];f.type,Object.assign(i,n.evaluater.evaluateExpression(f.argument))}else Ma(n,l.position);else{const u=o.name;let s;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&n.evaluater){const f=o.value.data.estree.body[0];f.type,s=n.evaluater.evaluateExpression(f.expression)}else Ma(n,l.position);else s=o.value===null?!0:o.value;i[u]=s}return i}function ru(n,l){const i=[];let o=-1;const u=n.passKeys?new Map:U1;for(;++o<l.children.length;){const s=l.children[o];let c;if(n.passKeys){const h=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(h){const m=u.get(h)||0;c=h+"-"+m,u.set(h,m+1)}}const f=Em(n,s,c);f!==void 0&&i.push(f)}return i}function eE(n,l,i){const o=A1(n.schema,l);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=o.commaSeparated?p1(i):O1(i)),o.property==="style"){let u=typeof i=="object"?i:tE(n,String(i));return n.stylePropertyNameCase==="css"&&(u=nE(u)),["style",u]}return[n.elementAttributeNameCase==="react"&&o.space?w1[o.property]||o.property:o.attribute,i]}}function tE(n,l){try{return I1(l,{reactCompat:!0})}catch(i){if(n.ignoreInvalidStyle)return{};const o=i,u=new qt("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw u.file=n.filePath||void 0,u.url=Sm+"#cannot-parse-style-attribute",u}}function _m(n,l,i){let o;if(!i)o={type:"Literal",value:l};else if(l.includes(".")){const u=l.split(".");let s=-1,c;for(;++s<u.length;){const f=tm(u[s])?{type:"Identifier",name:u[s]}:{type:"Literal",value:u[s]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}o=c}else o=tm(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(o.type==="Literal"){const u=o.value;return tu.call(n.components,u)?n.components[u]:u}if(n.evaluater)return n.evaluater.evaluateExpression(o);Ma(n)}function Ma(n,l){const i=new qt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=n.filePath||void 0,i.url=Sm+"#cannot-handle-mdx-estrees-without-createevaluater",i}function nE(n){const l={};let i;for(i in n)tu.call(n,i)&&(l[rE(i)]=n[i]);return l}function rE(n){let l=n.replace(H1,iE);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function iE(n){return"-"+n.toLowerCase()}const iu={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},aE={};function lE(n,l){const i=aE,o=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,u=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return wm(n,o,u)}function wm(n,l,i){if(oE(n)){if("value"in n)return n.type==="html"&&!i?"":n.value;if(l&&"alt"in n&&n.alt)return n.alt;if("children"in n)return Cm(n.children,l,i)}return Array.isArray(n)?Cm(n,l,i):""}function Cm(n,l,i){const o=[];let u=-1;for(;++u<n.length;)o[u]=wm(n[u],l,i);return o.join("")}function oE(n){return!!(n&&typeof n=="object")}const Tm=document.createElement("i");function au(n){const l="&"+n+";";Tm.innerHTML=l;const i=Tm.textContent;return i.charCodeAt(i.length-1)===59&&n!=="semi"||i===l?!1:i}function zn(n,l,i,o){const u=n.length;let s=0,c;if(l<0?l=-l>u?0:u+l:l=l>u?u:l,i=i>0?i:0,o.length<1e4)c=Array.from(o),c.unshift(l,i),n.splice(...c);else for(i&&n.splice(l,i);s<o.length;)c=o.slice(s,s+1e4),c.unshift(l,0),n.splice(...c),s+=1e4,l+=1e4}function hn(n,l){return n.length>0?(zn(n,n.length,0,l),n):l}const Am={}.hasOwnProperty;function sE(n){const l={};let i=-1;for(;++i<n.length;)uE(l,n[i]);return l}function uE(n,l){let i;for(i in l){const u=(Am.call(n,i)?n[i]:void 0)||(n[i]={}),s=l[i];let c;if(s)for(c in s){Am.call(u,c)||(u[c]=[]);const f=s[c];cE(u[c],Array.isArray(f)?f:f?[f]:[])}}}function cE(n,l){let i=-1;const o=[];for(;++i<l.length;)(l[i].add==="after"?n:o).push(l[i]);zn(n,0,0,o)}function km(n,l){const i=Number.parseInt(n,l);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function Si(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mn=dr(/[A-Za-z]/),nn=dr(/[\dA-Za-z]/),fE=dr(/[#-'*+\--9=?A-Z^-~]/);function lu(n){return n!==null&&(n<32||n===127)}const ou=dr(/\d/),dE=dr(/[\dA-Fa-f]/),hE=dr(/[!-/:-@[-`{-~]/);function Be(n){return n!==null&&n<-2}function Vt(n){return n!==null&&(n<0||n===32)}function rt(n){return n===-2||n===-1||n===32}const mE=dr(new RegExp("\\p{P}|\\p{S}","u")),pE=dr(/\s/);function dr(n){return l;function l(i){return i!==null&&i>-1&&n.test(String.fromCharCode(i))}}function Ei(n){const l=[];let i=-1,o=0,u=0;for(;++i<n.length;){const s=n.charCodeAt(i);let c="";if(s===37&&nn(n.charCodeAt(i+1))&&nn(n.charCodeAt(i+2)))u=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const f=n.charCodeAt(i+1);s<56320&&f>56319&&f<57344?(c=String.fromCharCode(s,f),u=1):c="�"}else c=String.fromCharCode(s);c&&(l.push(n.slice(o,i),encodeURIComponent(c)),o=i+u+1,c=""),u&&(i+=u,u=0)}return l.join("")+n.slice(o)}function dt(n,l,i,o){const u=o?o-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(h){return rt(h)?(n.enter(i),f(h)):l(h)}function f(h){return rt(h)&&s++<u?(n.consume(h),f):(n.exit(i),l(h))}}const gE={tokenize:yE};function yE(n){const l=n.attempt(this.parser.constructs.contentInitial,o,u);let i;return l;function o(f){if(f===null){n.consume(f);return}return n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),dt(n,l,"linePrefix")}function u(f){return n.enter("paragraph"),s(f)}function s(f){const h=n.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=h),i=h,c(f)}function c(f){if(f===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(f);return}return Be(f)?(n.consume(f),n.exit("chunkText"),s):(n.consume(f),c)}}const bE={tokenize:vE},Nm={tokenize:SE};function vE(n){const l=this,i=[];let o=0,u,s,c;return f;function f(j){if(o<i.length){const B=i[o];return l.containerState=B[1],n.attempt(B[0].continuation,h,m)(j)}return m(j)}function h(j){if(o++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,u&&A();const B=l.events.length;let U=B,z;for(;U--;)if(l.events[U][0]==="exit"&&l.events[U][1].type==="chunkFlow"){z=l.events[U][1].end;break}_(o);let H=B;for(;H<l.events.length;)l.events[H][1].end={...z},H++;return zn(l.events,U+1,0,l.events.slice(B)),l.events.length=H,m(j)}return f(j)}function m(j){if(o===i.length){if(!u)return v(j);if(u.currentConstruct&&u.currentConstruct.concrete)return w(j);l.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return l.containerState={},n.check(Nm,g,y)(j)}function g(j){return u&&A(),_(o),v(j)}function y(j){return l.parser.lazy[l.now().line]=o!==i.length,c=l.now().offset,w(j)}function v(j){return l.containerState={},n.attempt(Nm,b,w)(j)}function b(j){return o++,i.push([l.currentConstruct,l.containerState]),v(j)}function w(j){if(j===null){u&&A(),_(0),n.consume(j);return}return u=u||l.parser.flow(l.now()),n.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:s}),E(j)}function E(j){if(j===null){T(n.exit("chunkFlow"),!0),_(0),n.consume(j);return}return Be(j)?(n.consume(j),T(n.exit("chunkFlow")),o=0,l.interrupt=void 0,f):(n.consume(j),E)}function T(j,B){const U=l.sliceStream(j);if(B&&U.push(null),j.previous=s,s&&(s.next=j),s=j,u.defineSkip(j.start),u.write(U),l.parser.lazy[j.start.line]){let z=u.events.length;for(;z--;)if(u.events[z][1].start.offset<c&&(!u.events[z][1].end||u.events[z][1].end.offset>c))return;const H=l.events.length;let Y=H,F,$;for(;Y--;)if(l.events[Y][0]==="exit"&&l.events[Y][1].type==="chunkFlow"){if(F){$=l.events[Y][1].end;break}F=!0}for(_(o),z=H;z<l.events.length;)l.events[z][1].end={...$},z++;zn(l.events,Y+1,0,l.events.slice(H)),l.events.length=z}}function _(j){let B=i.length;for(;B-- >j;){const U=i[B];l.containerState=U[1],U[0].exit.call(l,n)}i.length=j}function A(){u.write([null]),s=void 0,u=void 0,l.containerState._closeFlow=void 0}}function SE(n,l,i){return dt(n,n.attempt(this.parser.constructs.document,l,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Rm(n){if(n===null||Vt(n)||pE(n))return 1;if(mE(n))return 2}function su(n,l,i){const o=[];let u=-1;for(;++u<n.length;){const s=n[u].resolveAll;s&&!o.includes(s)&&(l=s(l,i),o.push(s))}return l}const uu={name:"attention",resolveAll:EE,tokenize:xE};function EE(n,l){let i=-1,o,u,s,c,f,h,m,g;for(;++i<n.length;)if(n[i][0]==="enter"&&n[i][1].type==="attentionSequence"&&n[i][1]._close){for(o=i;o--;)if(n[o][0]==="exit"&&n[o][1].type==="attentionSequence"&&n[o][1]._open&&l.sliceSerialize(n[o][1]).charCodeAt(0)===l.sliceSerialize(n[i][1]).charCodeAt(0)){if((n[o][1]._close||n[i][1]._open)&&(n[i][1].end.offset-n[i][1].start.offset)%3&&!((n[o][1].end.offset-n[o][1].start.offset+n[i][1].end.offset-n[i][1].start.offset)%3))continue;h=n[o][1].end.offset-n[o][1].start.offset>1&&n[i][1].end.offset-n[i][1].start.offset>1?2:1;const y={...n[o][1].end},v={...n[i][1].start};Om(y,-h),Om(v,h),c={type:h>1?"strongSequence":"emphasisSequence",start:y,end:{...n[o][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...n[i][1].start},end:v},s={type:h>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[i][1].start}},u={type:h>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},n[o][1].end={...c.start},n[i][1].start={...f.end},m=[],n[o][1].end.offset-n[o][1].start.offset&&(m=hn(m,[["enter",n[o][1],l],["exit",n[o][1],l]])),m=hn(m,[["enter",u,l],["enter",c,l],["exit",c,l],["enter",s,l]]),m=hn(m,su(l.parser.constructs.insideSpan.null,n.slice(o+1,i),l)),m=hn(m,[["exit",s,l],["enter",f,l],["exit",f,l],["exit",u,l]]),n[i][1].end.offset-n[i][1].start.offset?(g=2,m=hn(m,[["enter",n[i][1],l],["exit",n[i][1],l]])):g=0,zn(n,o-1,i-o+3,m),i=o+m.length-g-2;break}}for(i=-1;++i<n.length;)n[i][1].type==="attentionSequence"&&(n[i][1].type="data");return n}function xE(n,l){const i=this.parser.constructs.attentionMarkers.null,o=this.previous,u=Rm(o);let s;return c;function c(h){return s=h,n.enter("attentionSequence"),f(h)}function f(h){if(h===s)return n.consume(h),f;const m=n.exit("attentionSequence"),g=Rm(h),y=!g||g===2&&u||i.includes(h),v=!u||u===2&&g||i.includes(o);return m._open=!!(s===42?y:y&&(u||!v)),m._close=!!(s===42?v:v&&(g||!y)),l(h)}}function Om(n,l){n.column+=l,n.offset+=l,n._bufferIndex+=l}const _E={name:"autolink",tokenize:wE};function wE(n,l,i){let o=0;return u;function u(b){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),s}function s(b){return Mn(b)?(n.consume(b),c):b===64?i(b):m(b)}function c(b){return b===43||b===45||b===46||nn(b)?(o=1,f(b)):m(b)}function f(b){return b===58?(n.consume(b),o=0,h):(b===43||b===45||b===46||nn(b))&&o++<32?(n.consume(b),f):(o=0,m(b))}function h(b){return b===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.exit("autolink"),l):b===null||b===32||b===60||lu(b)?i(b):(n.consume(b),h)}function m(b){return b===64?(n.consume(b),g):fE(b)?(n.consume(b),m):i(b)}function g(b){return nn(b)?y(b):i(b)}function y(b){return b===46?(n.consume(b),o=0,g):b===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.exit("autolink"),l):v(b)}function v(b){if((b===45||nn(b))&&o++<63){const w=b===45?v:y;return n.consume(b),w}return i(b)}}const Fl={partial:!0,tokenize:CE};function CE(n,l,i){return o;function o(s){return rt(s)?dt(n,u,"linePrefix")(s):u(s)}function u(s){return s===null||Be(s)?l(s):i(s)}}const zm={continuation:{tokenize:AE},exit:kE,name:"blockQuote",tokenize:TE};function TE(n,l,i){const o=this;return u;function u(c){if(c===62){const f=o.containerState;return f.open||(n.enter("blockQuote",{_container:!0}),f.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(c),n.exit("blockQuoteMarker"),s}return i(c)}function s(c){return rt(c)?(n.enter("blockQuotePrefixWhitespace"),n.consume(c),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),l):(n.exit("blockQuotePrefix"),l(c))}}function AE(n,l,i){const o=this;return u;function u(c){return rt(c)?dt(n,s,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return n.attempt(zm,l,i)(c)}}function kE(n){n.exit("blockQuote")}const Mm={name:"characterEscape",tokenize:NE};function NE(n,l,i){return o;function o(s){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(s),n.exit("escapeMarker"),u}function u(s){return hE(s)?(n.enter("characterEscapeValue"),n.consume(s),n.exit("characterEscapeValue"),n.exit("characterEscape"),l):i(s)}}const Dm={name:"characterReference",tokenize:RE};function RE(n,l,i){const o=this;let u=0,s,c;return f;function f(y){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),h}function h(y){return y===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(y),n.exit("characterReferenceMarkerNumeric"),m):(n.enter("characterReferenceValue"),s=31,c=nn,g(y))}function m(y){return y===88||y===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(y),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),s=6,c=dE,g):(n.enter("characterReferenceValue"),s=7,c=ou,g(y))}function g(y){if(y===59&&u){const v=n.exit("characterReferenceValue");return c===nn&&!au(o.sliceSerialize(v))?i(y):(n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),n.exit("characterReference"),l)}return c(y)&&u++<s?(n.consume(y),g):i(y)}}const jm={partial:!0,tokenize:zE},Lm={concrete:!0,name:"codeFenced",tokenize:OE};function OE(n,l,i){const o=this,u={partial:!0,tokenize:U};let s=0,c=0,f;return h;function h(z){return m(z)}function m(z){const H=o.events[o.events.length-1];return s=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,f=z,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),g(z)}function g(z){return z===f?(c++,n.consume(z),g):c<3?i(z):(n.exit("codeFencedFenceSequence"),rt(z)?dt(n,y,"whitespace")(z):y(z))}function y(z){return z===null||Be(z)?(n.exit("codeFencedFence"),o.interrupt?l(z):n.check(jm,E,B)(z)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),v(z))}function v(z){return z===null||Be(z)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),y(z)):rt(z)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),dt(n,b,"whitespace")(z)):z===96&&z===f?i(z):(n.consume(z),v)}function b(z){return z===null||Be(z)?y(z):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),w(z))}function w(z){return z===null||Be(z)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),y(z)):z===96&&z===f?i(z):(n.consume(z),w)}function E(z){return n.attempt(u,B,T)(z)}function T(z){return n.enter("lineEnding"),n.consume(z),n.exit("lineEnding"),_}function _(z){return s>0&&rt(z)?dt(n,A,"linePrefix",s+1)(z):A(z)}function A(z){return z===null||Be(z)?n.check(jm,E,B)(z):(n.enter("codeFlowValue"),j(z))}function j(z){return z===null||Be(z)?(n.exit("codeFlowValue"),A(z)):(n.consume(z),j)}function B(z){return n.exit("codeFenced"),l(z)}function U(z,H,Y){let F=0;return $;function $(X){return z.enter("lineEnding"),z.consume(X),z.exit("lineEnding"),ae}function ae(X){return z.enter("codeFencedFence"),rt(X)?dt(z,M,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):M(X)}function M(X){return X===f?(z.enter("codeFencedFenceSequence"),ne(X)):Y(X)}function ne(X){return X===f?(F++,z.consume(X),ne):F>=c?(z.exit("codeFencedFenceSequence"),rt(X)?dt(z,C,"whitespace")(X):C(X)):Y(X)}function C(X){return X===null||Be(X)?(z.exit("codeFencedFence"),H(X)):Y(X)}}}function zE(n,l,i){const o=this;return u;function u(c){return c===null?i(c):(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),s)}function s(c){return o.parser.lazy[o.now().line]?i(c):l(c)}}const cu={name:"codeIndented",tokenize:DE},ME={partial:!0,tokenize:jE};function DE(n,l,i){const o=this;return u;function u(m){return n.enter("codeIndented"),dt(n,s,"linePrefix",5)(m)}function s(m){const g=o.events[o.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(m):i(m)}function c(m){return m===null?h(m):Be(m)?n.attempt(ME,c,h)(m):(n.enter("codeFlowValue"),f(m))}function f(m){return m===null||Be(m)?(n.exit("codeFlowValue"),c(m)):(n.consume(m),f)}function h(m){return n.exit("codeIndented"),l(m)}}function jE(n,l,i){const o=this;return u;function u(c){return o.parser.lazy[o.now().line]?i(c):Be(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),u):dt(n,s,"linePrefix",5)(c)}function s(c){const f=o.events[o.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(c):Be(c)?u(c):i(c)}}const LE={name:"codeText",previous:BE,resolve:IE,tokenize:UE};function IE(n){let l=n.length-4,i=3,o,u;if((n[i][1].type==="lineEnding"||n[i][1].type==="space")&&(n[l][1].type==="lineEnding"||n[l][1].type==="space")){for(o=i;++o<l;)if(n[o][1].type==="codeTextData"){n[i][1].type="codeTextPadding",n[l][1].type="codeTextPadding",i+=2,l-=2;break}}for(o=i-1,l++;++o<=l;)u===void 0?o!==l&&n[o][1].type!=="lineEnding"&&(u=o):(o===l||n[o][1].type==="lineEnding")&&(n[u][1].type="codeTextData",o!==u+2&&(n[u][1].end=n[o-1][1].end,n.splice(u+2,o-u-2),l-=o-u-2,o=u+2),u=void 0);return n}function BE(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UE(n,l,i){let o=0,u,s;return c;function c(y){return n.enter("codeText"),n.enter("codeTextSequence"),f(y)}function f(y){return y===96?(n.consume(y),o++,f):(n.exit("codeTextSequence"),h(y))}function h(y){return y===null?i(y):y===32?(n.enter("space"),n.consume(y),n.exit("space"),h):y===96?(s=n.enter("codeTextSequence"),u=0,g(y)):Be(y)?(n.enter("lineEnding"),n.consume(y),n.exit("lineEnding"),h):(n.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||Be(y)?(n.exit("codeTextData"),h(y)):(n.consume(y),m)}function g(y){return y===96?(n.consume(y),u++,g):u===o?(n.exit("codeTextSequence"),n.exit("codeText"),l(y)):(s.type="codeTextData",m(y))}}class HE{constructor(l){this.left=l?[...l]:[],this.right=[]}get(l){if(l<0||l>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+l+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return l<this.left.length?this.left[l]:this.right[this.right.length-l+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(l,i){const o=i??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(l,o):l>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-l+this.left.length).reverse():this.left.slice(l).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(l,i,o){const u=i||0;this.setCursor(Math.trunc(l));const s=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return o&&Da(this.left,o),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(l){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(l)}pushMany(l){this.setCursor(Number.POSITIVE_INFINITY),Da(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),Da(this.right,l.reverse())}setCursor(l){if(!(l===this.left.length||l>this.left.length&&this.right.length===0||l<0&&this.left.length===0))if(l<this.left.length){const i=this.left.splice(l,Number.POSITIVE_INFINITY);Da(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);Da(this.left,i.reverse())}}}function Da(n,l){let i=0;if(l.length<1e4)n.push(...l);else for(;i<l.length;)n.push(...l.slice(i,i+1e4)),i+=1e4}function Im(n){const l={};let i=-1,o,u,s,c,f,h,m;const g=new HE(n);for(;++i<g.length;){for(;i in l;)i=l[i];if(o=g.get(i),i&&o[1].type==="chunkFlow"&&g.get(i-1)[1].type==="listItemPrefix"&&(h=o[1]._tokenizer.events,s=0,s<h.length&&h[s][1].type==="lineEndingBlank"&&(s+=2),s<h.length&&h[s][1].type==="content"))for(;++s<h.length&&h[s][1].type!=="content";)h[s][1].type==="chunkText"&&(h[s][1]._isInFirstContentOfListItem=!0,s++);if(o[0]==="enter")o[1].contentType&&(Object.assign(l,qE(g,i)),i=l[i],m=!0);else if(o[1]._container){for(s=i,u=void 0;s--;)if(c=g.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(u&&(g.get(u)[1].type="lineEndingBlank"),c[1].type="lineEnding",u=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;u&&(o[1].end={...g.get(u)[1].start},f=g.slice(u,i),f.unshift(o),g.splice(u,i-u+1,f))}}return zn(n,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function qE(n,l){const i=n.get(l)[1],o=n.get(l)[2];let u=l-1;const s=[];let c=i._tokenizer;c||(c=o.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,h=[],m={};let g,y,v=-1,b=i,w=0,E=0;const T=[E];for(;b;){for(;n.get(++u)[1]!==b;);s.push(u),b._tokenizer||(g=o.sliceStream(b),b.next||g.push(null),y&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=i;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(E=v+1,T.push(E),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):T.pop(),v=T.length;v--;){const _=f.slice(T[v],T[v+1]),A=s.pop();h.push([A,A+_.length-1]),n.splice(A,2,_)}for(h.reverse(),v=-1;++v<h.length;)m[w+h[v][0]]=w+h[v][1],w+=h[v][1]-h[v][0]-1;return m}const PE={resolve:YE,tokenize:VE},FE={partial:!0,tokenize:GE};function YE(n){return Im(n),n}function VE(n,l){let i;return o;function o(f){return n.enter("content"),i=n.enter("chunkContent",{contentType:"content"}),u(f)}function u(f){return f===null?s(f):Be(f)?n.check(FE,c,s)(f):(n.consume(f),u)}function s(f){return n.exit("chunkContent"),n.exit("content"),l(f)}function c(f){return n.consume(f),n.exit("chunkContent"),i.next=n.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,u}}function GE(n,l,i){const o=this;return u;function u(c){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),dt(n,s,"linePrefix")}function s(c){if(c===null||Be(c))return i(c);const f=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(c):n.interrupt(o.parser.constructs.flow,i,l)(c)}}function Bm(n,l,i,o,u,s,c,f,h){const m=h||Number.POSITIVE_INFINITY;let g=0;return y;function y(_){return _===60?(n.enter(o),n.enter(u),n.enter(s),n.consume(_),n.exit(s),v):_===null||_===32||_===41||lu(_)?i(_):(n.enter(o),n.enter(c),n.enter(f),n.enter("chunkString",{contentType:"string"}),E(_))}function v(_){return _===62?(n.enter(s),n.consume(_),n.exit(s),n.exit(u),n.exit(o),l):(n.enter(f),n.enter("chunkString",{contentType:"string"}),b(_))}function b(_){return _===62?(n.exit("chunkString"),n.exit(f),v(_)):_===null||_===60||Be(_)?i(_):(n.consume(_),_===92?w:b)}function w(_){return _===60||_===62||_===92?(n.consume(_),b):b(_)}function E(_){return!g&&(_===null||_===41||Vt(_))?(n.exit("chunkString"),n.exit(f),n.exit(c),n.exit(o),l(_)):g<m&&_===40?(n.consume(_),g++,E):_===41?(n.consume(_),g--,E):_===null||_===32||_===40||lu(_)?i(_):(n.consume(_),_===92?T:E)}function T(_){return _===40||_===41||_===92?(n.consume(_),E):E(_)}}function Um(n,l,i,o,u,s){const c=this;let f=0,h;return m;function m(b){return n.enter(o),n.enter(u),n.consume(b),n.exit(u),n.enter(s),g}function g(b){return f>999||b===null||b===91||b===93&&!h||b===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(b):b===93?(n.exit(s),n.enter(u),n.consume(b),n.exit(u),n.exit(o),l):Be(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),g):(n.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||Be(b)||f++>999?(n.exit("chunkString"),g(b)):(n.consume(b),h||(h=!rt(b)),b===92?v:y)}function v(b){return b===91||b===92||b===93?(n.consume(b),f++,y):y(b)}}function Hm(n,l,i,o,u,s){let c;return f;function f(v){return v===34||v===39||v===40?(n.enter(o),n.enter(u),n.consume(v),n.exit(u),c=v===40?41:v,h):i(v)}function h(v){return v===c?(n.enter(u),n.consume(v),n.exit(u),n.exit(o),l):(n.enter(s),m(v))}function m(v){return v===c?(n.exit(s),h(c)):v===null?i(v):Be(v)?(n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),dt(n,m,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===c||v===null||Be(v)?(n.exit("chunkString"),m(v)):(n.consume(v),v===92?y:g)}function y(v){return v===c||v===92?(n.consume(v),g):g(v)}}function ja(n,l){let i;return o;function o(u){return Be(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),i=!0,o):rt(u)?dt(n,o,i?"linePrefix":"lineSuffix")(u):l(u)}}const XE={name:"definition",tokenize:KE},ZE={partial:!0,tokenize:QE};function KE(n,l,i){const o=this;let u;return s;function s(b){return n.enter("definition"),c(b)}function c(b){return Um.call(o,n,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return u=Si(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),b===58?(n.enter("definitionMarker"),n.consume(b),n.exit("definitionMarker"),h):i(b)}function h(b){return Vt(b)?ja(n,m)(b):m(b)}function m(b){return Bm(n,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return n.attempt(ZE,y,y)(b)}function y(b){return rt(b)?dt(n,v,"whitespace")(b):v(b)}function v(b){return b===null||Be(b)?(n.exit("definition"),o.parser.defined.push(u),l(b)):i(b)}}function QE(n,l,i){return o;function o(f){return Vt(f)?ja(n,u)(f):i(f)}function u(f){return Hm(n,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return rt(f)?dt(n,c,"whitespace")(f):c(f)}function c(f){return f===null||Be(f)?l(f):i(f)}}const JE={name:"hardBreakEscape",tokenize:WE};function WE(n,l,i){return o;function o(s){return n.enter("hardBreakEscape"),n.consume(s),u}function u(s){return Be(s)?(n.exit("hardBreakEscape"),l(s)):i(s)}}const $E={name:"headingAtx",resolve:ex,tokenize:tx};function ex(n,l){let i=n.length-2,o=3,u,s;return n[o][1].type==="whitespace"&&(o+=2),i-2>o&&n[i][1].type==="whitespace"&&(i-=2),n[i][1].type==="atxHeadingSequence"&&(o===i-1||i-4>o&&n[i-2][1].type==="whitespace")&&(i-=o+1===i?2:4),i>o&&(u={type:"atxHeadingText",start:n[o][1].start,end:n[i][1].end},s={type:"chunkText",start:n[o][1].start,end:n[i][1].end,contentType:"text"},zn(n,o,i-o+1,[["enter",u,l],["enter",s,l],["exit",s,l],["exit",u,l]])),n}function tx(n,l,i){let o=0;return u;function u(g){return n.enter("atxHeading"),s(g)}function s(g){return n.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&o++<6?(n.consume(g),c):g===null||Vt(g)?(n.exit("atxHeadingSequence"),f(g)):i(g)}function f(g){return g===35?(n.enter("atxHeadingSequence"),h(g)):g===null||Be(g)?(n.exit("atxHeading"),l(g)):rt(g)?dt(n,f,"whitespace")(g):(n.enter("atxHeadingText"),m(g))}function h(g){return g===35?(n.consume(g),h):(n.exit("atxHeadingSequence"),f(g))}function m(g){return g===null||g===35||Vt(g)?(n.exit("atxHeadingText"),f(g)):(n.consume(g),m)}}const nx=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],qm=["pre","script","style","textarea"],rx={concrete:!0,name:"htmlFlow",resolveTo:lx,tokenize:ox},ix={partial:!0,tokenize:ux},ax={partial:!0,tokenize:sx};function lx(n){let l=n.length;for(;l--&&!(n[l][0]==="enter"&&n[l][1].type==="htmlFlow"););return l>1&&n[l-2][1].type==="linePrefix"&&(n[l][1].start=n[l-2][1].start,n[l+1][1].start=n[l-2][1].start,n.splice(l-2,2)),n}function ox(n,l,i){const o=this;let u,s,c,f,h;return m;function m(N){return g(N)}function g(N){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(N),y}function y(N){return N===33?(n.consume(N),v):N===47?(n.consume(N),s=!0,E):N===63?(n.consume(N),u=3,o.interrupt?l:L):Mn(N)?(n.consume(N),c=String.fromCharCode(N),T):i(N)}function v(N){return N===45?(n.consume(N),u=2,b):N===91?(n.consume(N),u=5,f=0,w):Mn(N)?(n.consume(N),u=4,o.interrupt?l:L):i(N)}function b(N){return N===45?(n.consume(N),o.interrupt?l:L):i(N)}function w(N){const re="CDATA[";return N===re.charCodeAt(f++)?(n.consume(N),f===re.length?o.interrupt?l:M:w):i(N)}function E(N){return Mn(N)?(n.consume(N),c=String.fromCharCode(N),T):i(N)}function T(N){if(N===null||N===47||N===62||Vt(N)){const re=N===47,ce=c.toLowerCase();return!re&&!s&&qm.includes(ce)?(u=1,o.interrupt?l(N):M(N)):nx.includes(c.toLowerCase())?(u=6,re?(n.consume(N),_):o.interrupt?l(N):M(N)):(u=7,o.interrupt&&!o.parser.lazy[o.now().line]?i(N):s?A(N):j(N))}return N===45||nn(N)?(n.consume(N),c+=String.fromCharCode(N),T):i(N)}function _(N){return N===62?(n.consume(N),o.interrupt?l:M):i(N)}function A(N){return rt(N)?(n.consume(N),A):$(N)}function j(N){return N===47?(n.consume(N),$):N===58||N===95||Mn(N)?(n.consume(N),B):rt(N)?(n.consume(N),j):$(N)}function B(N){return N===45||N===46||N===58||N===95||nn(N)?(n.consume(N),B):U(N)}function U(N){return N===61?(n.consume(N),z):rt(N)?(n.consume(N),U):j(N)}function z(N){return N===null||N===60||N===61||N===62||N===96?i(N):N===34||N===39?(n.consume(N),h=N,H):rt(N)?(n.consume(N),z):Y(N)}function H(N){return N===h?(n.consume(N),h=null,F):N===null||Be(N)?i(N):(n.consume(N),H)}function Y(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Vt(N)?U(N):(n.consume(N),Y)}function F(N){return N===47||N===62||rt(N)?j(N):i(N)}function $(N){return N===62?(n.consume(N),ae):i(N)}function ae(N){return N===null||Be(N)?M(N):rt(N)?(n.consume(N),ae):i(N)}function M(N){return N===45&&u===2?(n.consume(N),Z):N===60&&u===1?(n.consume(N),K):N===62&&u===4?(n.consume(N),k):N===63&&u===3?(n.consume(N),L):N===93&&u===5?(n.consume(N),de):Be(N)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(ix,q,ne)(N)):N===null||Be(N)?(n.exit("htmlFlowData"),ne(N)):(n.consume(N),M)}function ne(N){return n.check(ax,C,q)(N)}function C(N){return n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),X}function X(N){return N===null||Be(N)?ne(N):(n.enter("htmlFlowData"),M(N))}function Z(N){return N===45?(n.consume(N),L):M(N)}function K(N){return N===47?(n.consume(N),c="",oe):M(N)}function oe(N){if(N===62){const re=c.toLowerCase();return qm.includes(re)?(n.consume(N),k):M(N)}return Mn(N)&&c.length<8?(n.consume(N),c+=String.fromCharCode(N),oe):M(N)}function de(N){return N===93?(n.consume(N),L):M(N)}function L(N){return N===62?(n.consume(N),k):N===45&&u===2?(n.consume(N),L):M(N)}function k(N){return N===null||Be(N)?(n.exit("htmlFlowData"),q(N)):(n.consume(N),k)}function q(N){return n.exit("htmlFlow"),l(N)}}function sx(n,l,i){const o=this;return u;function u(c){return Be(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),s):i(c)}function s(c){return o.parser.lazy[o.now().line]?i(c):l(c)}}function ux(n,l,i){return o;function o(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),n.attempt(Fl,l,i)}}const cx={name:"htmlText",tokenize:fx};function fx(n,l,i){const o=this;let u,s,c;return f;function f(L){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(L),h}function h(L){return L===33?(n.consume(L),m):L===47?(n.consume(L),U):L===63?(n.consume(L),j):Mn(L)?(n.consume(L),Y):i(L)}function m(L){return L===45?(n.consume(L),g):L===91?(n.consume(L),s=0,w):Mn(L)?(n.consume(L),A):i(L)}function g(L){return L===45?(n.consume(L),b):i(L)}function y(L){return L===null?i(L):L===45?(n.consume(L),v):Be(L)?(c=y,K(L)):(n.consume(L),y)}function v(L){return L===45?(n.consume(L),b):y(L)}function b(L){return L===62?Z(L):L===45?v(L):y(L)}function w(L){const k="CDATA[";return L===k.charCodeAt(s++)?(n.consume(L),s===k.length?E:w):i(L)}function E(L){return L===null?i(L):L===93?(n.consume(L),T):Be(L)?(c=E,K(L)):(n.consume(L),E)}function T(L){return L===93?(n.consume(L),_):E(L)}function _(L){return L===62?Z(L):L===93?(n.consume(L),_):E(L)}function A(L){return L===null||L===62?Z(L):Be(L)?(c=A,K(L)):(n.consume(L),A)}function j(L){return L===null?i(L):L===63?(n.consume(L),B):Be(L)?(c=j,K(L)):(n.consume(L),j)}function B(L){return L===62?Z(L):j(L)}function U(L){return Mn(L)?(n.consume(L),z):i(L)}function z(L){return L===45||nn(L)?(n.consume(L),z):H(L)}function H(L){return Be(L)?(c=H,K(L)):rt(L)?(n.consume(L),H):Z(L)}function Y(L){return L===45||nn(L)?(n.consume(L),Y):L===47||L===62||Vt(L)?F(L):i(L)}function F(L){return L===47?(n.consume(L),Z):L===58||L===95||Mn(L)?(n.consume(L),$):Be(L)?(c=F,K(L)):rt(L)?(n.consume(L),F):Z(L)}function $(L){return L===45||L===46||L===58||L===95||nn(L)?(n.consume(L),$):ae(L)}function ae(L){return L===61?(n.consume(L),M):Be(L)?(c=ae,K(L)):rt(L)?(n.consume(L),ae):F(L)}function M(L){return L===null||L===60||L===61||L===62||L===96?i(L):L===34||L===39?(n.consume(L),u=L,ne):Be(L)?(c=M,K(L)):rt(L)?(n.consume(L),M):(n.consume(L),C)}function ne(L){return L===u?(n.consume(L),u=void 0,X):L===null?i(L):Be(L)?(c=ne,K(L)):(n.consume(L),ne)}function C(L){return L===null||L===34||L===39||L===60||L===61||L===96?i(L):L===47||L===62||Vt(L)?F(L):(n.consume(L),C)}function X(L){return L===47||L===62||Vt(L)?F(L):i(L)}function Z(L){return L===62?(n.consume(L),n.exit("htmlTextData"),n.exit("htmlText"),l):i(L)}function K(L){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(L),n.exit("lineEnding"),oe}function oe(L){return rt(L)?dt(n,de,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):de(L)}function de(L){return n.enter("htmlTextData"),c(L)}}const fu={name:"labelEnd",resolveAll:px,resolveTo:gx,tokenize:yx},dx={tokenize:bx},hx={tokenize:vx},mx={tokenize:Sx};function px(n){let l=-1;const i=[];for(;++l<n.length;){const o=n[l][1];if(i.push(n[l]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const u=o.type==="labelImage"?4:2;o.type="data",l+=u}}return n.length!==i.length&&zn(n,0,n.length,i),n}function gx(n,l){let i=n.length,o=0,u,s,c,f;for(;i--;)if(u=n[i][1],s){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;n[i][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(c){if(n[i][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(s=i,u.type!=="labelLink")){o=2;break}}else u.type==="labelEnd"&&(c=i);const h={type:n[s][1].type==="labelLink"?"link":"image",start:{...n[s][1].start},end:{...n[n.length-1][1].end}},m={type:"label",start:{...n[s][1].start},end:{...n[c][1].end}},g={type:"labelText",start:{...n[s+o+2][1].end},end:{...n[c-2][1].start}};return f=[["enter",h,l],["enter",m,l]],f=hn(f,n.slice(s+1,s+o+3)),f=hn(f,[["enter",g,l]]),f=hn(f,su(l.parser.constructs.insideSpan.null,n.slice(s+o+4,c-3),l)),f=hn(f,[["exit",g,l],n[c-2],n[c-1],["exit",m,l]]),f=hn(f,n.slice(c+1)),f=hn(f,[["exit",h,l]]),zn(n,s,n.length,f),n}function yx(n,l,i){const o=this;let u=o.events.length,s,c;for(;u--;)if((o.events[u][1].type==="labelImage"||o.events[u][1].type==="labelLink")&&!o.events[u][1]._balanced){s=o.events[u][1];break}return f;function f(v){return s?s._inactive?y(v):(c=o.parser.defined.includes(Si(o.sliceSerialize({start:s.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(v),n.exit("labelMarker"),n.exit("labelEnd"),h):i(v)}function h(v){return v===40?n.attempt(dx,g,c?g:y)(v):v===91?n.attempt(hx,g,c?m:y)(v):c?g(v):y(v)}function m(v){return n.attempt(mx,g,y)(v)}function g(v){return l(v)}function y(v){return s._balanced=!0,i(v)}}function bx(n,l,i){return o;function o(y){return n.enter("resource"),n.enter("resourceMarker"),n.consume(y),n.exit("resourceMarker"),u}function u(y){return Vt(y)?ja(n,s)(y):s(y)}function s(y){return y===41?g(y):Bm(n,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Vt(y)?ja(n,h)(y):g(y)}function f(y){return i(y)}function h(y){return y===34||y===39||y===40?Hm(n,m,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function m(y){return Vt(y)?ja(n,g)(y):g(y)}function g(y){return y===41?(n.enter("resourceMarker"),n.consume(y),n.exit("resourceMarker"),n.exit("resource"),l):i(y)}}function vx(n,l,i){const o=this;return u;function u(f){return Um.call(o,n,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return o.parser.defined.includes(Si(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?l(f):i(f)}function c(f){return i(f)}}function Sx(n,l,i){return o;function o(s){return n.enter("reference"),n.enter("referenceMarker"),n.consume(s),n.exit("referenceMarker"),u}function u(s){return s===93?(n.enter("referenceMarker"),n.consume(s),n.exit("referenceMarker"),n.exit("reference"),l):i(s)}}const Ex={name:"labelStartImage",resolveAll:fu.resolveAll,tokenize:xx};function xx(n,l,i){const o=this;return u;function u(f){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(f),n.exit("labelImageMarker"),s}function s(f){return f===91?(n.enter("labelMarker"),n.consume(f),n.exit("labelMarker"),n.exit("labelImage"),c):i(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in o.parser.constructs?i(f):l(f)}}const _x={name:"labelStartLink",resolveAll:fu.resolveAll,tokenize:wx};function wx(n,l,i){const o=this;return u;function u(c){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(c),n.exit("labelMarker"),n.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in o.parser.constructs?i(c):l(c)}}const du={name:"lineEnding",tokenize:Cx};function Cx(n,l){return i;function i(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),dt(n,l,"linePrefix")}}const Yl={name:"thematicBreak",tokenize:Tx};function Tx(n,l,i){let o=0,u;return s;function s(m){return n.enter("thematicBreak"),c(m)}function c(m){return u=m,f(m)}function f(m){return m===u?(n.enter("thematicBreakSequence"),h(m)):o>=3&&(m===null||Be(m))?(n.exit("thematicBreak"),l(m)):i(m)}function h(m){return m===u?(n.consume(m),o++,h):(n.exit("thematicBreakSequence"),rt(m)?dt(n,f,"whitespace")(m):f(m))}}const Gt={continuation:{tokenize:Rx},exit:zx,name:"list",tokenize:Nx},Ax={partial:!0,tokenize:Mx},kx={partial:!0,tokenize:Ox};function Nx(n,l,i){const o=this,u=o.events[o.events.length-1];let s=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,c=0;return f;function f(b){const w=o.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!o.containerState.marker||b===o.containerState.marker:ou(b)){if(o.containerState.type||(o.containerState.type=w,n.enter(w,{_container:!0})),w==="listUnordered")return n.enter("listItemPrefix"),b===42||b===45?n.check(Yl,i,m)(b):m(b);if(!o.interrupt||b===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),h(b)}return i(b)}function h(b){return ou(b)&&++c<10?(n.consume(b),h):(!o.interrupt||c<2)&&(o.containerState.marker?b===o.containerState.marker:b===41||b===46)?(n.exit("listItemValue"),m(b)):i(b)}function m(b){return n.enter("listItemMarker"),n.consume(b),n.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||b,n.check(Fl,o.interrupt?i:g,n.attempt(Ax,v,y))}function g(b){return o.containerState.initialBlankLine=!0,s++,v(b)}function y(b){return rt(b)?(n.enter("listItemPrefixWhitespace"),n.consume(b),n.exit("listItemPrefixWhitespace"),v):i(b)}function v(b){return o.containerState.size=s+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,l(b)}}function Rx(n,l,i){const o=this;return o.containerState._closeFlow=void 0,n.check(Fl,u,s);function u(f){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,dt(n,l,"listItemIndent",o.containerState.size+1)(f)}function s(f){return o.containerState.furtherBlankLines||!rt(f)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,c(f)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n.attempt(kx,l,c)(f))}function c(f){return o.containerState._closeFlow=!0,o.interrupt=void 0,dt(n,n.attempt(Gt,l,i),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function Ox(n,l,i){const o=this;return dt(n,u,"listItemIndent",o.containerState.size+1);function u(s){const c=o.events[o.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===o.containerState.size?l(s):i(s)}}function zx(n){n.exit(this.containerState.type)}function Mx(n,l,i){const o=this;return dt(n,u,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(s){const c=o.events[o.events.length-1];return!rt(s)&&c&&c[1].type==="listItemPrefixWhitespace"?l(s):i(s)}}const Pm={name:"setextUnderline",resolveTo:Dx,tokenize:jx};function Dx(n,l){let i=n.length,o,u,s;for(;i--;)if(n[i][0]==="enter"){if(n[i][1].type==="content"){o=i;break}n[i][1].type==="paragraph"&&(u=i)}else n[i][1].type==="content"&&n.splice(i,1),!s&&n[i][1].type==="definition"&&(s=i);const c={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[u][1].type="setextHeadingText",s?(n.splice(u,0,["enter",c,l]),n.splice(s+1,0,["exit",n[o][1],l]),n[o][1].end={...n[s][1].end}):n[o][1]=c,n.push(["exit",c,l]),n}function jx(n,l,i){const o=this;let u;return s;function s(m){let g=o.events.length,y;for(;g--;)if(o.events[g][1].type!=="lineEnding"&&o.events[g][1].type!=="linePrefix"&&o.events[g][1].type!=="content"){y=o.events[g][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||y)?(n.enter("setextHeadingLine"),u=m,c(m)):i(m)}function c(m){return n.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===u?(n.consume(m),f):(n.exit("setextHeadingLineSequence"),rt(m)?dt(n,h,"lineSuffix")(m):h(m))}function h(m){return m===null||Be(m)?(n.exit("setextHeadingLine"),l(m)):i(m)}}const Lx={tokenize:Ix};function Ix(n){const l=this,i=n.attempt(Fl,o,n.attempt(this.parser.constructs.flowInitial,u,dt(n,n.attempt(this.parser.constructs.flow,u,n.attempt(PE,u)),"linePrefix")));return i;function o(s){if(s===null){n.consume(s);return}return n.enter("lineEndingBlank"),n.consume(s),n.exit("lineEndingBlank"),l.currentConstruct=void 0,i}function u(s){if(s===null){n.consume(s);return}return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),l.currentConstruct=void 0,i}}const Bx={resolveAll:Ym()},Ux=Fm("string"),Hx=Fm("text");function Fm(n){return{resolveAll:Ym(n==="text"?qx:void 0),tokenize:l};function l(i){const o=this,u=this.parser.constructs[n],s=i.attempt(u,c,f);return c;function c(g){return m(g)?s(g):f(g)}function f(g){if(g===null){i.consume(g);return}return i.enter("data"),i.consume(g),h}function h(g){return m(g)?(i.exit("data"),s(g)):(i.consume(g),h)}function m(g){if(g===null)return!0;const y=u[g];let v=-1;if(y)for(;++v<y.length;){const b=y[v];if(!b.previous||b.previous.call(o,o.previous))return!0}return!1}}}function Ym(n){return l;function l(i,o){let u=-1,s;for(;++u<=i.length;)s===void 0?i[u]&&i[u][1].type==="data"&&(s=u,u++):(!i[u]||i[u][1].type!=="data")&&(u!==s+2&&(i[s][1].end=i[u-1][1].end,i.splice(s+2,u-s-2),u=s+2),s=void 0);return n?n(i,o):i}}function qx(n,l){let i=0;for(;++i<=n.length;)if((i===n.length||n[i][1].type==="lineEnding")&&n[i-1][1].type==="data"){const o=n[i-1][1],u=l.sliceStream(o);let s=u.length,c=-1,f=0,h;for(;s--;){const m=u[s];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(m===-2)h=!0,f++;else if(m!==-1){s++;break}}if(l._contentTypeTextTrailing&&i===n.length&&(f=0),f){const m={type:i===n.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:o.start._bufferIndex+c,_index:o.start._index+s,line:o.end.line,column:o.end.column-f,offset:o.end.offset-f},end:{...o.end}};o.end={...m.start},o.start.offset===o.end.offset?Object.assign(o,m):(n.splice(i,0,["enter",m,l],["exit",m,l]),i+=2)}i++}return n}const Px=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:XE},disable:{null:[]},document:{42:Gt,43:Gt,45:Gt,48:Gt,49:Gt,50:Gt,51:Gt,52:Gt,53:Gt,54:Gt,55:Gt,56:Gt,57:Gt,62:zm},flow:{35:$E,42:Yl,45:[Pm,Yl],60:rx,61:Pm,95:Yl,96:Lm,126:Lm},flowInitial:{[-2]:cu,[-1]:cu,32:cu},insideSpan:{null:[uu,Bx]},string:{38:Dm,92:Mm},text:{[-5]:du,[-4]:du,[-3]:du,33:Ex,38:Dm,42:uu,60:[_E,cx],91:_x,92:[JE,Mm],93:fu,95:uu,96:LE}},Symbol.toStringTag,{value:"Module"}));function Fx(n,l,i){let o={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const u={},s=[];let c=[],f=[];const h={attempt:H(U),check:H(z),consume:A,enter:j,exit:B,interrupt:H(z,{interrupt:!0})},m={code:null,containerState:{},defineSkip:E,events:[],now:w,parser:n,previous:null,sliceSerialize:v,sliceStream:b,write:y};let g=l.tokenize.call(m,h);return l.resolveAll&&s.push(l),m;function y(ae){return c=hn(c,ae),T(),c[c.length-1]!==null?[]:(Y(l,0),m.events=su(s,m.events,m),m.events)}function v(ae,M){return Vx(b(ae),M)}function b(ae){return Yx(c,ae)}function w(){const{_bufferIndex:ae,_index:M,line:ne,column:C,offset:X}=o;return{_bufferIndex:ae,_index:M,line:ne,column:C,offset:X}}function E(ae){u[ae.line]=ae.column,$()}function T(){let ae;for(;o._index<c.length;){const M=c[o._index];if(typeof M=="string")for(ae=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===ae&&o._bufferIndex<M.length;)_(M.charCodeAt(o._bufferIndex));else _(M)}}function _(ae){g=g(ae)}function A(ae){Be(ae)?(o.line++,o.column=1,o.offset+=ae===-3?2:1,$()):ae!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===c[o._index].length&&(o._bufferIndex=-1,o._index++)),m.previous=ae}function j(ae,M){const ne=M||{};return ne.type=ae,ne.start=w(),m.events.push(["enter",ne,m]),f.push(ne),ne}function B(ae){const M=f.pop();return M.end=w(),m.events.push(["exit",M,m]),M}function U(ae,M){Y(ae,M.from)}function z(ae,M){M.restore()}function H(ae,M){return ne;function ne(C,X,Z){let K,oe,de,L;return Array.isArray(C)?q(C):"tokenize"in C?q([C]):k(C);function k(we){return Ae;function Ae(Ne){const ke=Ne!==null&&we[Ne],He=Ne!==null&&we.null,Se=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(He)?He:He?[He]:[]];return q(Se)(Ne)}}function q(we){return K=we,oe=0,we.length===0?Z:N(we[oe])}function N(we){return Ae;function Ae(Ne){return L=F(),de=we,we.partial||(m.currentConstruct=we),we.name&&m.parser.constructs.disable.null.includes(we.name)?ce():we.tokenize.call(M?Object.assign(Object.create(m),M):m,h,re,ce)(Ne)}}function re(we){return ae(de,L),X}function ce(we){return L.restore(),++oe<K.length?N(K[oe]):Z}}}function Y(ae,M){ae.resolveAll&&!s.includes(ae)&&s.push(ae),ae.resolve&&zn(m.events,M,m.events.length-M,ae.resolve(m.events.slice(M),m)),ae.resolveTo&&(m.events=ae.resolveTo(m.events,m))}function F(){const ae=w(),M=m.previous,ne=m.currentConstruct,C=m.events.length,X=Array.from(f);return{from:C,restore:Z};function Z(){o=ae,m.previous=M,m.currentConstruct=ne,m.events.length=C,f=X,$()}}function $(){o.line in u&&o.column<2&&(o.column=u[o.line],o.offset+=u[o.line]-1)}}function Yx(n,l){const i=l.start._index,o=l.start._bufferIndex,u=l.end._index,s=l.end._bufferIndex;let c;if(i===u)c=[n[i].slice(o,s)];else{if(c=n.slice(i,u),o>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(o):c.shift()}s>0&&c.push(n[u].slice(0,s))}return c}function Vx(n,l){let i=-1;const o=[];let u;for(;++i<n.length;){const s=n[i];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
|
|
45
45
|
`;break}case-3:{c=`\r
|
|
46
|
-
`;break}case-2:{c=l?" ":" ";break}case-1:{if(!l&&u)continue;c=" ";break}default:c=String.fromCharCode(s)}u=s===-2,o.push(c)}return o.join("")}function Gx(n){const o={constructs:sE([Px,...(n||{}).extensions||[]]),content:u(gE),defined:[],document:u(bE),flow:u(Lx),lazy:{},string:u(Ux),text:u(Hx)};return o;function u(s){return c;function c(f){return Fx(o,s,f)}}}function Xx(n){for(;!Im(n););return n}const Vm=/[\0\t\n\r]/g;function Zx(){let n=1,l="",i=!0,o;return u;function u(s,c,f){const m=[];let h,g,y,v,b;for(s=l+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),y=0,l="",i&&(s.charCodeAt(0)===65279&&y++,i=void 0);y<s.length;){if(Vm.lastIndex=y,h=Vm.exec(s),v=h&&h.index!==void 0?h.index:s.length,b=s.charCodeAt(v),!h){l=s.slice(y);break}if(b===10&&y===v&&o)m.push(-3),o=void 0;else switch(o&&(m.push(-5),o=void 0),y<v&&(m.push(s.slice(y,v)),n+=v-y),b){case 0:{m.push(65533),n++;break}case 9:{for(g=Math.ceil(n/4)*4,m.push(-2);n++<g;)m.push(-1);break}case 10:{m.push(-4),n=1;break}default:o=!0,n=1}y=v+1}return f&&(o&&m.push(-5),l&&m.push(l),m.push(null)),m}}const Kx=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Qx(n){return n.replace(Kx,Jx)}function Jx(n,l,i){if(l)return l;if(i.charCodeAt(0)===35){const u=i.charCodeAt(1),s=u===120||u===88;return km(i.slice(s?2:1),s?16:10)}return au(i)||n}const Gm={}.hasOwnProperty;function Wx(n,l,i){return typeof l!="string"&&(i=l,l=void 0),$x(i)(Xx(Gx(i).document().write(Zx()(n,l,!0))))}function $x(n){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(X),autolinkProtocol:F,autolinkEmail:F,atxHeading:s(K),blockQuote:s(He),characterEscape:F,characterReference:F,codeFenced:s(ve),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(ve,c),codeText:s(ze,c),codeTextData:F,data:F,codeFlowValue:F,definition:s(je),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(S),hardBreakEscape:s(W),hardBreakTrailing:s(W),htmlFlow:s(U,c),htmlFlowData:F,htmlText:s(U,c),htmlTextData:F,image:s(j),label:c,link:s(X),listItem:s(pe),listItemValue:v,listOrdered:s(he,y),listUnordered:s(he),paragraph:s(le),reference:z,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(K),strong:s(Ee),thematicBreak:s(Se)},exit:{atxHeading:m(),atxHeadingSequence:H,autolink:m(),autolinkEmail:Ae,autolinkProtocol:ke,blockQuote:m(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:we,characterReference:Te,codeFenced:m(T),codeFencedFence:E,codeFencedFenceInfo:b,codeFencedFenceMeta:w,codeFlowValue:$,codeIndented:m(_),codeText:m(V),codeTextData:$,data:$,definition:m(),definitionDestinationString:q,definitionLabelString:A,definitionTitleString:k,emphasis:m(),hardBreakEscape:m(D),hardBreakTrailing:m(D),htmlFlow:m(ne),htmlFlowData:$,htmlText:m(C),htmlTextData:$,image:m(Q),label:de,labelText:se,lineEnding:ie,link:m(Z),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:re,resourceDestinationString:L,resourceTitleString:N,resource:B,setextHeading:m(Y),setextHeadingLineSequence:I,setextHeadingText:M,strong:m(),thematicBreak:m()}};Xm(l,(n||{}).mdastExtensions||[]);const i={};return o;function o(te){let be={type:"root",children:[]};const Ce={stack:[be],tokenStack:[],config:l,enter:f,exit:h,buffer:c,resume:g,data:i},Ie=[];let Je=-1;for(;++Je<te.length;)if(te[Je][1].type==="listOrdered"||te[Je][1].type==="listUnordered")if(te[Je][0]==="enter")Ie.push(Je);else{const pt=Ie.pop();Je=u(te,pt,Je)}for(Je=-1;++Je<te.length;){const pt=l[te[Je][0]];Gm.call(pt,te[Je][1].type)&&pt[te[Je][1].type].call(Object.assign({sliceSerialize:te[Je][2].sliceSerialize},Ce),te[Je][1])}if(Ce.tokenStack.length>0){const pt=Ce.tokenStack[Ce.tokenStack.length-1];(pt[1]||Zm).call(Ce,void 0,pt[0])}for(be.position={start:hr(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:hr(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<l.transforms.length;)be=l.transforms[Je](be)||be;return be}function u(te,be,Ce){let Ie=be-1,Je=-1,pt=!1,qt,Xe,gt,Ot;for(;++Ie<=Ce;){const Ze=te[Ie];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?Je++:Je--,Ot=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(qt&&!Ot&&!Je&&!gt&&(gt=Ie),Ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ot=void 0}if(!Je&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||Je===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(qt){let Cn=Ie;for(Xe=void 0;Cn--;){const nn=te[Cn];if(nn[1].type==="lineEnding"||nn[1].type==="lineEndingBlank"){if(nn[0]==="exit")continue;Xe&&(te[Xe][1].type="lineEndingBlank",pt=!0),nn[1].type="lineEnding",Xe=Cn}else if(!(nn[1].type==="linePrefix"||nn[1].type==="blockQuotePrefix"||nn[1].type==="blockQuotePrefixWhitespace"||nn[1].type==="blockQuoteMarker"||nn[1].type==="listItemIndent"))break}gt&&(!Xe||gt<Xe)&&(qt._spread=!0),qt.end=Object.assign({},Xe?te[Xe][1].start:Ze[1].end),te.splice(Xe||Ie,0,["exit",qt,Ze[2]]),Ie++,Ce++}if(Ze[1].type==="listItemPrefix"){const Cn={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};qt=Cn,te.splice(Ie,0,["enter",Cn,Ze[2]]),Ie++,Ce++,gt=void 0,Ot=!0}}}return te[be][1]._spread=pt,Ce}function s(te,be){return Ce;function Ce(Ie){f.call(this,te(Ie),Ie),be&&be.call(this,Ie)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(te,be,Ce){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([be,Ce||void 0]),te.position={start:hr(be.start),end:void 0}}function m(te){return be;function be(Ce){te&&te.call(this,Ce),h.call(this,Ce)}}function h(te,be){const Ce=this.stack.pop(),Ie=this.tokenStack.pop();if(Ie)Ie[0].type!==te.type&&(be?be.call(this,te,Ie[0]):(Ie[1]||Zm).call(this,te,Ie[0]));else throw new Error("Cannot close `"+te.type+"` ("+za({start:te.start,end:te.end})+"): it’s not open");Ce.position.end=hr(te.end)}function g(){return lE(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function v(te){if(this.data.expectingFirstListItemValue){const be=this.stack[this.stack.length-2];be.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function b(){const te=this.resume(),be=this.stack[this.stack.length-1];be.lang=te}function w(){const te=this.resume(),be=this.stack[this.stack.length-1];be.meta=te}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const te=this.resume(),be=this.stack[this.stack.length-1];be.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const te=this.resume(),be=this.stack[this.stack.length-1];be.value=te.replace(/(\r?\n|\r)$/g,"")}function A(te){const be=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=be,Ce.identifier=vi(this.sliceSerialize(te)).toLowerCase()}function k(){const te=this.resume(),be=this.stack[this.stack.length-1];be.title=te}function q(){const te=this.resume(),be=this.stack[this.stack.length-1];be.url=te}function H(te){const be=this.stack[this.stack.length-1];if(!be.depth){const Ce=this.sliceSerialize(te).length;be.depth=Ce}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function I(te){const be=this.stack[this.stack.length-1];be.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function Y(){this.data.setextHeadingSlurpLineEnding=void 0}function F(te){const Ce=this.stack[this.stack.length-1].children;let Ie=Ce[Ce.length-1];(!Ie||Ie.type!=="text")&&(Ie=_e(),Ie.position={start:hr(te.start),end:void 0},Ce.push(Ie)),this.stack.push(Ie)}function $(te){const be=this.stack.pop();be.value+=this.sliceSerialize(te),be.position.end=hr(te.end)}function ie(te){const be=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=be.children[be.children.length-1];Ce.position.end=hr(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(be.type)&&(F.call(this,te),$.call(this,te))}function D(){this.data.atHardBreak=!0}function ne(){const te=this.resume(),be=this.stack[this.stack.length-1];be.value=te}function C(){const te=this.resume(),be=this.stack[this.stack.length-1];be.value=te}function V(){const te=this.resume(),be=this.stack[this.stack.length-1];be.value=te}function Z(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=be,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function Q(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=be,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function se(te){const be=this.sliceSerialize(te),Ce=this.stack[this.stack.length-2];Ce.label=Qx(be),Ce.identifier=vi(be).toLowerCase()}function de(){const te=this.stack[this.stack.length-1],be=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Ie=te.children;Ce.children=Ie}else Ce.alt=be}function L(){const te=this.resume(),be=this.stack[this.stack.length-1];be.url=te}function N(){const te=this.resume(),be=this.stack[this.stack.length-1];be.title=te}function B(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function re(te){const be=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=be,Ce.identifier=vi(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function ce(te){this.data.characterReferenceType=te.type}function we(te){const be=this.sliceSerialize(te),Ce=this.data.characterReferenceType;let Ie;Ce?(Ie=km(be,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ie=au(be);const Je=this.stack[this.stack.length-1];Je.value+=Ie}function Te(te){const be=this.stack.pop();be.position.end=hr(te.end)}function ke(te){$.call(this,te);const be=this.stack[this.stack.length-1];be.url=this.sliceSerialize(te)}function Ae(te){$.call(this,te);const be=this.stack[this.stack.length-1];be.url="mailto:"+this.sliceSerialize(te)}function He(){return{type:"blockquote",children:[]}}function ve(){return{type:"code",lang:null,meta:null,value:""}}function ze(){return{type:"inlineCode",value:""}}function je(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function S(){return{type:"emphasis",children:[]}}function K(){return{type:"heading",depth:0,children:[]}}function W(){return{type:"break"}}function U(){return{type:"html",value:""}}function j(){return{type:"image",title:null,url:"",alt:null}}function X(){return{type:"link",title:null,url:"",children:[]}}function he(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[]}}function pe(te){return{type:"listItem",spread:te._spread,checked:null,children:[]}}function le(){return{type:"paragraph",children:[]}}function Ee(){return{type:"strong",children:[]}}function _e(){return{type:"text",value:""}}function Se(){return{type:"thematicBreak"}}}function hr(n){return{line:n.line,column:n.column,offset:n.offset}}function Xm(n,l){let i=-1;for(;++i<l.length;){const o=l[i];Array.isArray(o)?Xm(n,o):e_(n,o)}}function e_(n,l){let i;for(i in l)if(Gm.call(l,i))switch(i){case"canContainEols":{const o=l[i];o&&n[i].push(...o);break}case"transforms":{const o=l[i];o&&n[i].push(...o);break}case"enter":case"exit":{const o=l[i];o&&Object.assign(n[i],o);break}}}function Zm(n,l){throw n?new Error("Cannot close `"+n.type+"` ("+za({start:n.start,end:n.end})+"): a different token (`"+l.type+"`, "+za({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+za({start:l.start,end:l.end})+") is still open")}function t_(n){const l=this;l.parser=i;function i(o){return Wx(o,{...l.data("settings"),...n,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function n_(n,l){const i={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(l),!0)};return n.patch(l,i),n.applyData(l,i)}function r_(n,l){const i={type:"element",tagName:"br",properties:{},children:[]};return n.patch(l,i),[n.applyData(l,i),{type:"text",value:`
|
|
46
|
+
`;break}case-2:{c=l?" ":" ";break}case-1:{if(!l&&u)continue;c=" ";break}default:c=String.fromCharCode(s)}u=s===-2,o.push(c)}return o.join("")}function Gx(n){const o={constructs:sE([Px,...(n||{}).extensions||[]]),content:u(gE),defined:[],document:u(bE),flow:u(Lx),lazy:{},string:u(Ux),text:u(Hx)};return o;function u(s){return c;function c(f){return Fx(o,s,f)}}}function Xx(n){for(;!Im(n););return n}const Vm=/[\0\t\n\r]/g;function Zx(){let n=1,l="",i=!0,o;return u;function u(s,c,f){const h=[];let m,g,y,v,b;for(s=l+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),y=0,l="",i&&(s.charCodeAt(0)===65279&&y++,i=void 0);y<s.length;){if(Vm.lastIndex=y,m=Vm.exec(s),v=m&&m.index!==void 0?m.index:s.length,b=s.charCodeAt(v),!m){l=s.slice(y);break}if(b===10&&y===v&&o)h.push(-3),o=void 0;else switch(o&&(h.push(-5),o=void 0),y<v&&(h.push(s.slice(y,v)),n+=v-y),b){case 0:{h.push(65533),n++;break}case 9:{for(g=Math.ceil(n/4)*4,h.push(-2);n++<g;)h.push(-1);break}case 10:{h.push(-4),n=1;break}default:o=!0,n=1}y=v+1}return f&&(o&&h.push(-5),l&&h.push(l),h.push(null)),h}}const Kx=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Qx(n){return n.replace(Kx,Jx)}function Jx(n,l,i){if(l)return l;if(i.charCodeAt(0)===35){const u=i.charCodeAt(1),s=u===120||u===88;return km(i.slice(s?2:1),s?16:10)}return au(i)||n}const Gm={}.hasOwnProperty;function Wx(n,l,i){return typeof l!="string"&&(i=l,l=void 0),$x(i)(Xx(Gx(i).document().write(Zx()(n,l,!0))))}function $x(n){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(G),autolinkProtocol:F,autolinkEmail:F,atxHeading:s(J),blockQuote:s(He),characterEscape:F,characterReference:F,codeFenced:s(Se),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Se,c),codeText:s(Me,c),codeTextData:F,data:F,codeFlowValue:F,definition:s(ye),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(S),hardBreakEscape:s(ee),hardBreakTrailing:s(ee),htmlFlow:s(I,c),htmlFlowData:F,htmlText:s(I,c),htmlTextData:F,image:s(D),label:c,link:s(G),listItem:s(be),listItemValue:v,listOrdered:s(he,y),listUnordered:s(he),paragraph:s(se),reference:N,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(J),strong:s(Ee),thematicBreak:s(Ce)},exit:{atxHeading:h(),atxHeadingSequence:U,autolink:h(),autolinkEmail:ke,autolinkProtocol:Ne,blockQuote:h(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:we,characterReference:Ae,codeFenced:h(T),codeFencedFence:E,codeFencedFenceInfo:b,codeFencedFenceMeta:w,codeFlowValue:$,codeIndented:h(_),codeText:h(X),codeTextData:$,data:$,definition:h(),definitionDestinationString:B,definitionLabelString:A,definitionTitleString:j,emphasis:h(),hardBreakEscape:h(M),hardBreakTrailing:h(M),htmlFlow:h(ne),htmlFlowData:$,htmlText:h(C),htmlTextData:$,image:h(K),label:de,labelText:oe,lineEnding:ae,link:h(Z),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:re,resourceDestinationString:L,resourceTitleString:k,resource:q,setextHeading:h(Y),setextHeadingLineSequence:H,setextHeadingText:z,strong:h(),thematicBreak:h()}};Xm(l,(n||{}).mdastExtensions||[]);const i={};return o;function o(te){let ve={type:"root",children:[]};const Te={stack:[ve],tokenStack:[],config:l,enter:f,exit:m,buffer:c,resume:g,data:i},Ie=[];let Je=-1;for(;++Je<te.length;)if(te[Je][1].type==="listOrdered"||te[Je][1].type==="listUnordered")if(te[Je][0]==="enter")Ie.push(Je);else{const pt=Ie.pop();Je=u(te,pt,Je)}for(Je=-1;++Je<te.length;){const pt=l[te[Je][0]];Gm.call(pt,te[Je][1].type)&&pt[te[Je][1].type].call(Object.assign({sliceSerialize:te[Je][2].sliceSerialize},Te),te[Je][1])}if(Te.tokenStack.length>0){const pt=Te.tokenStack[Te.tokenStack.length-1];(pt[1]||Zm).call(Te,void 0,pt[0])}for(ve.position={start:hr(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:hr(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<l.transforms.length;)ve=l.transforms[Je](ve)||ve;return ve}function u(te,ve,Te){let Ie=ve-1,Je=-1,pt=!1,Pt,Xe,gt,Ot;for(;++Ie<=Te;){const Ze=te[Ie];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?Je++:Je--,Ot=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(Pt&&!Ot&&!Je&&!gt&&(gt=Ie),Ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ot=void 0}if(!Je&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||Je===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(Pt){let Tn=Ie;for(Xe=void 0;Tn--;){const rn=te[Tn];if(rn[1].type==="lineEnding"||rn[1].type==="lineEndingBlank"){if(rn[0]==="exit")continue;Xe&&(te[Xe][1].type="lineEndingBlank",pt=!0),rn[1].type="lineEnding",Xe=Tn}else if(!(rn[1].type==="linePrefix"||rn[1].type==="blockQuotePrefix"||rn[1].type==="blockQuotePrefixWhitespace"||rn[1].type==="blockQuoteMarker"||rn[1].type==="listItemIndent"))break}gt&&(!Xe||gt<Xe)&&(Pt._spread=!0),Pt.end=Object.assign({},Xe?te[Xe][1].start:Ze[1].end),te.splice(Xe||Ie,0,["exit",Pt,Ze[2]]),Ie++,Te++}if(Ze[1].type==="listItemPrefix"){const Tn={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};Pt=Tn,te.splice(Ie,0,["enter",Tn,Ze[2]]),Ie++,Te++,gt=void 0,Ot=!0}}}return te[ve][1]._spread=pt,Te}function s(te,ve){return Te;function Te(Ie){f.call(this,te(Ie),Ie),ve&&ve.call(this,Ie)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(te,ve,Te){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([ve,Te||void 0]),te.position={start:hr(ve.start),end:void 0}}function h(te){return ve;function ve(Te){te&&te.call(this,Te),m.call(this,Te)}}function m(te,ve){const Te=this.stack.pop(),Ie=this.tokenStack.pop();if(Ie)Ie[0].type!==te.type&&(ve?ve.call(this,te,Ie[0]):(Ie[1]||Zm).call(this,te,Ie[0]));else throw new Error("Cannot close `"+te.type+"` ("+za({start:te.start,end:te.end})+"): it’s not open");Te.position.end=hr(te.end)}function g(){return lE(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function v(te){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function b(){const te=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=te}function w(){const te=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=te}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const te=this.resume(),ve=this.stack[this.stack.length-1];ve.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const te=this.resume(),ve=this.stack[this.stack.length-1];ve.value=te.replace(/(\r?\n|\r)$/g,"")}function A(te){const ve=this.resume(),Te=this.stack[this.stack.length-1];Te.label=ve,Te.identifier=Si(this.sliceSerialize(te)).toLowerCase()}function j(){const te=this.resume(),ve=this.stack[this.stack.length-1];ve.title=te}function B(){const te=this.resume(),ve=this.stack[this.stack.length-1];ve.url=te}function U(te){const ve=this.stack[this.stack.length-1];if(!ve.depth){const Te=this.sliceSerialize(te).length;ve.depth=Te}}function z(){this.data.setextHeadingSlurpLineEnding=!0}function H(te){const ve=this.stack[this.stack.length-1];ve.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function Y(){this.data.setextHeadingSlurpLineEnding=void 0}function F(te){const Te=this.stack[this.stack.length-1].children;let Ie=Te[Te.length-1];(!Ie||Ie.type!=="text")&&(Ie=_e(),Ie.position={start:hr(te.start),end:void 0},Te.push(Ie)),this.stack.push(Ie)}function $(te){const ve=this.stack.pop();ve.value+=this.sliceSerialize(te),ve.position.end=hr(te.end)}function ae(te){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Te=ve.children[ve.children.length-1];Te.position.end=hr(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(ve.type)&&(F.call(this,te),$.call(this,te))}function M(){this.data.atHardBreak=!0}function ne(){const te=this.resume(),ve=this.stack[this.stack.length-1];ve.value=te}function C(){const te=this.resume(),ve=this.stack[this.stack.length-1];ve.value=te}function X(){const te=this.resume(),ve=this.stack[this.stack.length-1];ve.value=te}function Z(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=ve,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function K(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=ve,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function oe(te){const ve=this.sliceSerialize(te),Te=this.stack[this.stack.length-2];Te.label=Qx(ve),Te.identifier=Si(ve).toLowerCase()}function de(){const te=this.stack[this.stack.length-1],ve=this.resume(),Te=this.stack[this.stack.length-1];if(this.data.inReference=!0,Te.type==="link"){const Ie=te.children;Te.children=Ie}else Te.alt=ve}function L(){const te=this.resume(),ve=this.stack[this.stack.length-1];ve.url=te}function k(){const te=this.resume(),ve=this.stack[this.stack.length-1];ve.title=te}function q(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function re(te){const ve=this.resume(),Te=this.stack[this.stack.length-1];Te.label=ve,Te.identifier=Si(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function ce(te){this.data.characterReferenceType=te.type}function we(te){const ve=this.sliceSerialize(te),Te=this.data.characterReferenceType;let Ie;Te?(Ie=km(ve,Te==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ie=au(ve);const Je=this.stack[this.stack.length-1];Je.value+=Ie}function Ae(te){const ve=this.stack.pop();ve.position.end=hr(te.end)}function Ne(te){$.call(this,te);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(te)}function ke(te){$.call(this,te);const ve=this.stack[this.stack.length-1];ve.url="mailto:"+this.sliceSerialize(te)}function He(){return{type:"blockquote",children:[]}}function Se(){return{type:"code",lang:null,meta:null,value:""}}function Me(){return{type:"inlineCode",value:""}}function ye(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function S(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function ee(){return{type:"break"}}function I(){return{type:"html",value:""}}function D(){return{type:"image",title:null,url:"",alt:null}}function G(){return{type:"link",title:null,url:"",children:[]}}function he(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[]}}function be(te){return{type:"listItem",spread:te._spread,checked:null,children:[]}}function se(){return{type:"paragraph",children:[]}}function Ee(){return{type:"strong",children:[]}}function _e(){return{type:"text",value:""}}function Ce(){return{type:"thematicBreak"}}}function hr(n){return{line:n.line,column:n.column,offset:n.offset}}function Xm(n,l){let i=-1;for(;++i<l.length;){const o=l[i];Array.isArray(o)?Xm(n,o):e_(n,o)}}function e_(n,l){let i;for(i in l)if(Gm.call(l,i))switch(i){case"canContainEols":{const o=l[i];o&&n[i].push(...o);break}case"transforms":{const o=l[i];o&&n[i].push(...o);break}case"enter":case"exit":{const o=l[i];o&&Object.assign(n[i],o);break}}}function Zm(n,l){throw n?new Error("Cannot close `"+n.type+"` ("+za({start:n.start,end:n.end})+"): a different token (`"+l.type+"`, "+za({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+za({start:l.start,end:l.end})+") is still open")}function t_(n){const l=this;l.parser=i;function i(o){return Wx(o,{...l.data("settings"),...n,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function n_(n,l){const i={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(l),!0)};return n.patch(l,i),n.applyData(l,i)}function r_(n,l){const i={type:"element",tagName:"br",properties:{},children:[]};return n.patch(l,i),[n.applyData(l,i),{type:"text",value:`
|
|
47
47
|
`}]}function i_(n,l){const i=l.value?l.value+`
|
|
48
|
-
`:"",o={};l.lang&&(o.className=["language-"+l.lang]);let u={type:"element",tagName:"code",properties:o,children:[{type:"text",value:i}]};return l.meta&&(u.data={meta:l.meta}),n.patch(l,u),u=n.applyData(l,u),u={type:"element",tagName:"pre",properties:{},children:[u]},n.patch(l,u),u}function a_(n,l){const i={type:"element",tagName:"del",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function l_(n,l){const i={type:"element",tagName:"em",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function o_(n,l){const i=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",o=String(l.identifier).toUpperCase(),u=
|
|
49
|
-
`}),g.type==="element"&&g.tagName==="p"&&!u?c.push(...g.children):c.push(g)}const
|
|
50
|
-
`});const
|
|
48
|
+
`:"",o={};l.lang&&(o.className=["language-"+l.lang]);let u={type:"element",tagName:"code",properties:o,children:[{type:"text",value:i}]};return l.meta&&(u.data={meta:l.meta}),n.patch(l,u),u=n.applyData(l,u),u={type:"element",tagName:"pre",properties:{},children:[u]},n.patch(l,u),u}function a_(n,l){const i={type:"element",tagName:"del",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function l_(n,l){const i={type:"element",tagName:"em",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function o_(n,l){const i=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",o=String(l.identifier).toUpperCase(),u=Ei(o.toLowerCase()),s=n.footnoteOrder.indexOf(o);let c,f=n.footnoteCounts.get(o);f===void 0?(f=0,n.footnoteOrder.push(o),c=n.footnoteOrder.length):c=s+1,f+=1,n.footnoteCounts.set(o,f);const h={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+u,id:i+"fnref-"+u+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};n.patch(l,h);const m={type:"element",tagName:"sup",properties:{},children:[h]};return n.patch(l,m),n.applyData(l,m)}function s_(n,l){const i={type:"element",tagName:"h"+l.depth,properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function u_(n,l){if(n.options.allowDangerousHtml){const i={type:"raw",value:l.value};return n.patch(l,i),n.applyData(l,i)}}function Km(n,l){const i=l.referenceType;let o="]";if(i==="collapsed"?o+="[]":i==="full"&&(o+="["+(l.label||l.identifier)+"]"),l.type==="imageReference")return[{type:"text",value:"!["+l.alt+o}];const u=n.all(l),s=u[0];s&&s.type==="text"?s.value="["+s.value:u.unshift({type:"text",value:"["});const c=u[u.length-1];return c&&c.type==="text"?c.value+=o:u.push({type:"text",value:o}),u}function c_(n,l){const i=String(l.identifier).toUpperCase(),o=n.definitionById.get(i);if(!o)return Km(n,l);const u={src:Ei(o.url||""),alt:l.alt};o.title!==null&&o.title!==void 0&&(u.title=o.title);const s={type:"element",tagName:"img",properties:u,children:[]};return n.patch(l,s),n.applyData(l,s)}function f_(n,l){const i={src:Ei(l.url)};l.alt!==null&&l.alt!==void 0&&(i.alt=l.alt),l.title!==null&&l.title!==void 0&&(i.title=l.title);const o={type:"element",tagName:"img",properties:i,children:[]};return n.patch(l,o),n.applyData(l,o)}function d_(n,l){const i={type:"text",value:l.value.replace(/\r?\n|\r/g," ")};n.patch(l,i);const o={type:"element",tagName:"code",properties:{},children:[i]};return n.patch(l,o),n.applyData(l,o)}function h_(n,l){const i=String(l.identifier).toUpperCase(),o=n.definitionById.get(i);if(!o)return Km(n,l);const u={href:Ei(o.url||"")};o.title!==null&&o.title!==void 0&&(u.title=o.title);const s={type:"element",tagName:"a",properties:u,children:n.all(l)};return n.patch(l,s),n.applyData(l,s)}function m_(n,l){const i={href:Ei(l.url)};l.title!==null&&l.title!==void 0&&(i.title=l.title);const o={type:"element",tagName:"a",properties:i,children:n.all(l)};return n.patch(l,o),n.applyData(l,o)}function p_(n,l,i){const o=n.all(l),u=i?g_(i):Qm(l),s={},c=[];if(typeof l.checked=="boolean"){const g=o[0];let y;g&&g.type==="element"&&g.tagName==="p"?y=g:(y={type:"element",tagName:"p",properties:{},children:[]},o.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:l.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let f=-1;for(;++f<o.length;){const g=o[f];(u||f!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
|
|
49
|
+
`}),g.type==="element"&&g.tagName==="p"&&!u?c.push(...g.children):c.push(g)}const h=o[o.length-1];h&&(u||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
|
|
50
|
+
`});const m={type:"element",tagName:"li",properties:s,children:c};return n.patch(l,m),n.applyData(l,m)}function g_(n){let l=!1;if(n.type==="list"){l=n.spread||!1;const i=n.children;let o=-1;for(;!l&&++o<i.length;)l=Qm(i[o])}return l}function Qm(n){const l=n.spread;return l??n.children.length>1}function y_(n,l){const i={},o=n.all(l);let u=-1;for(typeof l.start=="number"&&l.start!==1&&(i.start=l.start);++u<o.length;){const c=o[u];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const s={type:"element",tagName:l.ordered?"ol":"ul",properties:i,children:n.wrap(o,!0)};return n.patch(l,s),n.applyData(l,s)}function b_(n,l){const i={type:"element",tagName:"p",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function v_(n,l){const i={type:"root",children:n.wrap(n.all(l))};return n.patch(l,i),n.applyData(l,i)}function S_(n,l){const i={type:"element",tagName:"strong",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function E_(n,l){const i=n.all(l),o=i.shift(),u=[];if(o){const c={type:"element",tagName:"thead",properties:{},children:n.wrap([o],!0)};n.patch(l.children[0],c),u.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:n.wrap(i,!0)},f=$s(l.children[1]),h=gm(l.children[l.children.length-1]);f&&h&&(c.position={start:f,end:h}),u.push(c)}const s={type:"element",tagName:"table",properties:{},children:n.wrap(u,!0)};return n.patch(l,s),n.applyData(l,s)}function x_(n,l,i){const o=i?i.children:void 0,s=(o?o.indexOf(l):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,f=c?c.length:l.children.length;let h=-1;const m=[];for(;++h<f;){const y=l.children[h],v={},b=c?c[h]:void 0;b&&(v.align=b);let w={type:"element",tagName:s,properties:v,children:[]};y&&(w.children=n.all(y),n.patch(y,w),w=n.applyData(y,w)),m.push(w)}const g={type:"element",tagName:"tr",properties:{},children:n.wrap(m,!0)};return n.patch(l,g),n.applyData(l,g)}function __(n,l){const i={type:"element",tagName:"td",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}const Jm=9,Wm=32;function w_(n){const l=String(n),i=/\r?\n|\r/g;let o=i.exec(l),u=0;const s=[];for(;o;)s.push($m(l.slice(u,o.index),u>0,!0),o[0]),u=o.index+o[0].length,o=i.exec(l);return s.push($m(l.slice(u),u>0,!1)),s.join("")}function $m(n,l,i){let o=0,u=n.length;if(l){let s=n.codePointAt(o);for(;s===Jm||s===Wm;)o++,s=n.codePointAt(o)}if(i){let s=n.codePointAt(u-1);for(;s===Jm||s===Wm;)u--,s=n.codePointAt(u-1)}return u>o?n.slice(o,u):""}function C_(n,l){const i={type:"text",value:w_(String(l.value))};return n.patch(l,i),n.applyData(l,i)}function T_(n,l){const i={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(l,i),n.applyData(l,i)}const A_={blockquote:n_,break:r_,code:i_,delete:a_,emphasis:l_,footnoteReference:o_,heading:s_,html:u_,imageReference:c_,image:f_,inlineCode:d_,linkReference:h_,link:m_,listItem:p_,list:y_,paragraph:b_,root:v_,strong:S_,table:E_,tableCell:__,tableRow:x_,text:C_,thematicBreak:T_,toml:Vl,yaml:Vl,definition:Vl,footnoteDefinition:Vl};function Vl(){}const ep=-1,Gl=0,La=1,Xl=2,hu=3,mu=4,pu=5,gu=6,tp=7,np=8,rp=typeof self=="object"?self:globalThis,k_=(n,l)=>{const i=(u,s)=>(n.set(s,u),u),o=u=>{if(n.has(u))return n.get(u);const[s,c]=l[u];switch(s){case Gl:case ep:return i(c,u);case La:{const f=i([],u);for(const h of c)f.push(o(h));return f}case Xl:{const f=i({},u);for(const[h,m]of c)f[o(h)]=o(m);return f}case hu:return i(new Date(c),u);case mu:{const{source:f,flags:h}=c;return i(new RegExp(f,h),u)}case pu:{const f=i(new Map,u);for(const[h,m]of c)f.set(o(h),o(m));return f}case gu:{const f=i(new Set,u);for(const h of c)f.add(o(h));return f}case tp:{const{name:f,message:h}=c;return i(new rp[f](h),u)}case np:return i(BigInt(c),u);case"BigInt":return i(Object(BigInt(c)),u);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return i(new DataView(f),c)}}return i(new rp[s](c),u)};return o},ip=n=>k_(new Map,n)(0),xi="",{toString:N_}={},{keys:R_}=Object,Ia=n=>{const l=typeof n;if(l!=="object"||!n)return[Gl,l];const i=N_.call(n).slice(8,-1);switch(i){case"Array":return[La,xi];case"Object":return[Xl,xi];case"Date":return[hu,xi];case"RegExp":return[mu,xi];case"Map":return[pu,xi];case"Set":return[gu,xi];case"DataView":return[La,i]}return i.includes("Array")?[La,i]:i.includes("Error")?[tp,i]:[Xl,i]},Zl=([n,l])=>n===Gl&&(l==="function"||l==="symbol"),O_=(n,l,i,o)=>{const u=(c,f)=>{const h=o.push(c)-1;return i.set(f,h),h},s=c=>{if(i.has(c))return i.get(c);let[f,h]=Ia(c);switch(f){case Gl:{let g=c;switch(h){case"bigint":f=np,g=c.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+h);g=null;break;case"undefined":return u([ep],c)}return u([f,g],c)}case La:{if(h){let v=c;return h==="DataView"?v=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(v=new Uint8Array(c)),u([h,[...v]],c)}const g=[],y=u([f,g],c);for(const v of c)g.push(s(v));return y}case Xl:{if(h)switch(h){case"BigInt":return u([h,c.toString()],c);case"Boolean":case"Number":case"String":return u([h,c.valueOf()],c)}if(l&&"toJSON"in c)return s(c.toJSON());const g=[],y=u([f,g],c);for(const v of R_(c))(n||!Zl(Ia(c[v])))&&g.push([s(v),s(c[v])]);return y}case hu:return u([f,c.toISOString()],c);case mu:{const{source:g,flags:y}=c;return u([f,{source:g,flags:y}],c)}case pu:{const g=[],y=u([f,g],c);for(const[v,b]of c)(n||!(Zl(Ia(v))||Zl(Ia(b))))&&g.push([s(v),s(b)]);return y}case gu:{const g=[],y=u([f,g],c);for(const v of c)(n||!Zl(Ia(v)))&&g.push(s(v));return y}}const{message:m}=c;return u([f,{name:h,message:m}],c)};return s},ap=(n,{json:l,lossy:i}={})=>{const o=[];return O_(!(l||i),!!l,new Map,o)(n),o},Kl=typeof structuredClone=="function"?(n,l)=>l&&("json"in l||"lossy"in l)?ip(ap(n,l)):structuredClone(n):(n,l)=>ip(ap(n,l));function z_(n,l){const i=[{type:"text",value:"↩"}];return l>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(l)}]}),i}function M_(n,l){return"Back to reference "+(n+1)+(l>1?"-"+l:"")}function D_(n){const l=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",i=n.options.footnoteBackContent||z_,o=n.options.footnoteBackLabel||M_,u=n.options.footnoteLabel||"Footnotes",s=n.options.footnoteLabelTagName||"h2",c=n.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<n.footnoteOrder.length;){const m=n.footnoteById.get(n.footnoteOrder[h]);if(!m)continue;const g=n.all(m),y=String(m.identifier).toUpperCase(),v=Ei(y.toLowerCase());let b=0;const w=[],E=n.footnoteCounts.get(y);for(;E!==void 0&&++b<=E;){w.length>0&&w.push({type:"text",value:" "});let A=typeof i=="string"?i:i(h,b);typeof A=="string"&&(A={type:"text",value:A}),w.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+v+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(h,b),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const T=g[g.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const A=T.children[T.children.length-1];A&&A.type==="text"?A.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...w)}else g.push(...w);const _={type:"element",tagName:"li",properties:{id:l+"fn-"+v},children:n.wrap(g,!0)};n.patch(m,_),f.push(_)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Kl(c),id:"footnote-label"},children:[{type:"text",value:u}]},{type:"text",value:`
|
|
51
51
|
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(f,!0)},{type:"text",value:`
|
|
52
|
-
`}]}}const lp=(function(n){if(n==null)return B_;if(typeof n=="function")return Ql(n);if(typeof n=="object")return Array.isArray(n)?j_(n):L_(n);if(typeof n=="string")return I_(n);throw new Error("Expected function, string, or object as test")});function j_(n){const l=[];let i=-1;for(;++i<n.length;)l[i]=lp(n[i]);return Ql(o);function o(...u){let s=-1;for(;++s<l.length;)if(l[s].apply(this,u))return!0;return!1}}function L_(n){const l=n;return Ql(i);function i(o){const u=o;let s;for(s in n)if(u[s]!==l[s])return!1;return!0}}function I_(n){return Ql(l);function l(i){return i&&i.type===n}}function Ql(n){return l;function l(i,o,u){return!!(U_(i)&&n.call(this,i,typeof o=="number"?o:void 0,u||void 0))}}function B_(){return!0}function U_(n){return n!==null&&typeof n=="object"&&"type"in n}function FT(n){return n}const op=[],H_=!0,sp=!1,q_="skip";function P_(n,l,i,o){let u;typeof l=="function"&&typeof i!="function"?(o=i,i=l):u=l;const s=lp(u),c=o?-1:1;f(n,void 0,[])();function f(m,
|
|
52
|
+
`}]}}const lp=(function(n){if(n==null)return B_;if(typeof n=="function")return Ql(n);if(typeof n=="object")return Array.isArray(n)?j_(n):L_(n);if(typeof n=="string")return I_(n);throw new Error("Expected function, string, or object as test")});function j_(n){const l=[];let i=-1;for(;++i<n.length;)l[i]=lp(n[i]);return Ql(o);function o(...u){let s=-1;for(;++s<l.length;)if(l[s].apply(this,u))return!0;return!1}}function L_(n){const l=n;return Ql(i);function i(o){const u=o;let s;for(s in n)if(u[s]!==l[s])return!1;return!0}}function I_(n){return Ql(l);function l(i){return i&&i.type===n}}function Ql(n){return l;function l(i,o,u){return!!(U_(i)&&n.call(this,i,typeof o=="number"?o:void 0,u||void 0))}}function B_(){return!0}function U_(n){return n!==null&&typeof n=="object"&&"type"in n}function FT(n){return n}const op=[],H_=!0,sp=!1,q_="skip";function P_(n,l,i,o){let u;typeof l=="function"&&typeof i!="function"?(o=i,i=l):u=l;const s=lp(u),c=o?-1:1;f(n,void 0,[])();function f(h,m,g){const y=h&&typeof h=="object"?h:{};if(typeof y.type=="string"){const b=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(h.type+(b?"<"+b+">":""))+")"})}return v;function v(){let b=op,w,E,T;if((!l||s(h,m,g[g.length-1]||void 0))&&(b=F_(i(h,g)),b[0]===sp))return b;if("children"in h&&h.children){const _=h;if(_.children&&b[0]!==q_)for(E=(o?_.children.length:-1)+c,T=g.concat(_);E>-1&&E<_.children.length;){const A=_.children[E];if(w=f(A,E,T)(),w[0]===sp)return w;E=typeof w[1]=="number"?w[1]:E+c}}return b}}}function F_(n){return Array.isArray(n)?n:typeof n=="number"?[H_,n]:n==null?op:[n]}function up(n,l,i,o){let u,s,c;typeof l=="function"&&typeof i!="function"?(s=void 0,c=l,u=i):(s=l,c=i,u=o),P_(n,s,f,u);function f(h,m){const g=m[m.length-1],y=g?g.children.indexOf(h):void 0;return c(h,y,g)}}const yu={}.hasOwnProperty,Y_={};function V_(n,l){const i=l||Y_,o=new Map,u=new Map,s=new Map,c={...A_,...i.handlers},f={all:m,applyData:X_,definitionById:o,footnoteById:u,footnoteCounts:s,footnoteOrder:[],handlers:c,one:h,options:i,patch:G_,wrap:K_};return up(n,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?o:u,v=String(g.identifier).toUpperCase();y.has(v)||y.set(v,g)}}),f;function h(g,y){const v=g.type,b=f.handlers[v];if(yu.call(f.handlers,v)&&b)return b(f,g,y);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in g){const{children:E,...T}=g,_=Kl(T);return _.children=f.all(g),_}return Kl(g)}return(f.options.unknownHandler||Z_)(f,g,y)}function m(g){const y=[];if("children"in g){const v=g.children;let b=-1;for(;++b<v.length;){const w=f.one(v[b],g);if(w){if(b&&v[b-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=cp(w.value)),!Array.isArray(w)&&w.type==="element")){const E=w.children[0];E&&E.type==="text"&&(E.value=cp(E.value))}Array.isArray(w)?y.push(...w):y.push(w)}}}return y}}function G_(n,l){n.position&&(l.position=B1(n))}function X_(n,l){let i=l;if(n&&n.data){const o=n.data.hName,u=n.data.hChildren,s=n.data.hProperties;if(typeof o=="string")if(i.type==="element")i.tagName=o;else{const c="children"in i?i.children:[i];i={type:"element",tagName:o,properties:{},children:c}}i.type==="element"&&s&&Object.assign(i.properties,Kl(s)),"children"in i&&i.children&&u!==null&&u!==void 0&&(i.children=u)}return i}function Z_(n,l){const i=l.data||{},o="value"in l&&!(yu.call(i,"hProperties")||yu.call(i,"hChildren"))?{type:"text",value:l.value}:{type:"element",tagName:"div",properties:{},children:n.all(l)};return n.patch(l,o),n.applyData(l,o)}function K_(n,l){const i=[];let o=-1;for(l&&i.push({type:"text",value:`
|
|
53
53
|
`});++o<n.length;)o&&i.push({type:"text",value:`
|
|
54
54
|
`}),i.push(n[o]);return l&&n.length>0&&i.push({type:"text",value:`
|
|
55
55
|
`}),i}function cp(n){let l=0,i=n.charCodeAt(l);for(;i===9||i===32;)l++,i=n.charCodeAt(l);return n.slice(l)}function fp(n,l){const i=V_(n,l),o=i.one(n,void 0),u=D_(i),s=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return u&&s.children.push({type:"text",value:`
|
|
56
|
-
`},u),s}function Q_(n,l){return n&&"run"in n?async function(i,o){const u=fp(i,{file:o,...l});await n.run(u,o)}:function(i,o){return fp(i,{file:o,...n||l})}}function dp(n){if(n)throw n}var bu,hp;function J_(){if(hp)return bu;hp=1;var n=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u=function(h){return typeof Array.isArray=="function"?Array.isArray(h):l.call(h)==="[object Array]"},s=function(h){if(!h||l.call(h)!=="[object Object]")return!1;var g=n.call(h,"constructor"),y=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!y)return!1;var v;for(v in h);return typeof v>"u"||n.call(h,v)},c=function(h,g){i&&g.name==="__proto__"?i(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},f=function(h,g){if(g==="__proto__")if(n.call(h,g)){if(o)return o(h,g).value}else return;return h[g]};return bu=function m(){var h,g,y,v,b,w,E=arguments[0],T=1,_=arguments.length,A=!1;for(typeof E=="boolean"&&(A=E,E=arguments[1]||{},T=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});T<_;++T)if(h=arguments[T],h!=null)for(g in h)y=f(E,g),v=f(h,g),E!==v&&(A&&v&&(s(v)||(b=u(v)))?(b?(b=!1,w=y&&u(y)?y:[]):w=y&&s(y)?y:{},c(E,{name:g,newValue:m(A,w,v)})):typeof v<"u"&&c(E,{name:g,newValue:v}));return E},bu}var W_=J_();const vu=ms(W_);function Su(n){if(typeof n!="object"||n===null)return!1;const l=Object.getPrototypeOf(n);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function $_(){const n=[],l={run:i,use:o};return l;function i(...u){let s=-1;const c=u.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...u);function f(m,...h){const g=n[++s];let y=-1;if(m){c(m);return}for(;++y<u.length;)(h[y]===null||h[y]===void 0)&&(h[y]=u[y]);u=h,g?ew(g,f)(...h):c(null,...h)}}function o(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return n.push(u),l}}function ew(n,l){let i;return o;function o(...c){const f=n.length>c.length;let m;f&&c.push(u);try{m=n.apply(this,c)}catch(h){const g=h;if(f&&i)throw g;return u(g)}f||(m&&m.then&&typeof m.then=="function"?m.then(s,u):m instanceof Error?u(m):s(m))}function u(c,...f){i||(i=!0,l(c,...f))}function s(c){u(null,c)}}const Dn={basename:tw,dirname:nw,extname:rw,join:iw,sep:"/"};function tw(n,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');Ba(n);let i=0,o=-1,u=n.length,s;if(l===void 0||l.length===0||l.length>n.length){for(;u--;)if(n.codePointAt(u)===47){if(s){i=u+1;break}}else o<0&&(s=!0,o=u+1);return o<0?"":n.slice(i,o)}if(l===n)return"";let c=-1,f=l.length-1;for(;u--;)if(n.codePointAt(u)===47){if(s){i=u+1;break}}else c<0&&(s=!0,c=u+1),f>-1&&(n.codePointAt(u)===l.codePointAt(f--)?f<0&&(o=u):(f=-1,o=c));return i===o?o=c:o<0&&(o=n.length),n.slice(i,o)}function nw(n){if(Ba(n),n.length===0)return".";let l=-1,i=n.length,o;for(;--i;)if(n.codePointAt(i)===47){if(o){l=i;break}}else o||(o=!0);return l<0?n.codePointAt(0)===47?"/":".":l===1&&n.codePointAt(0)===47?"//":n.slice(0,l)}function rw(n){Ba(n);let l=n.length,i=-1,o=0,u=-1,s=0,c;for(;l--;){const f=n.codePointAt(l);if(f===47){if(c){o=l+1;break}continue}i<0&&(c=!0,i=l+1),f===46?u<0?u=l:s!==1&&(s=1):u>-1&&(s=-1)}return u<0||i<0||s===0||s===1&&u===i-1&&u===o+1?"":n.slice(u,i)}function iw(...n){let l=-1,i;for(;++l<n.length;)Ba(n[l]),n[l]&&(i=i===void 0?n[l]:i+"/"+n[l]);return i===void 0?".":aw(i)}function aw(n){Ba(n);const l=n.codePointAt(0)===47;let i=lw(n,!l);return i.length===0&&!l&&(i="."),i.length>0&&n.codePointAt(n.length-1)===47&&(i+="/"),l?"/"+i:i}function lw(n,l){let i="",o=0,u=-1,s=0,c=-1,f,m;for(;++c<=n.length;){if(c<n.length)f=n.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(u===c-1||s===1))if(u!==c-1&&s===2){if(i.length<2||o!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(m=i.lastIndexOf("/"),m!==i.length-1){m<0?(i="",o=0):(i=i.slice(0,m),o=i.length-1-i.lastIndexOf("/")),u=c,s=0;continue}}else if(i.length>0){i="",o=0,u=c,s=0;continue}}l&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+n.slice(u+1,c):i=n.slice(u+1,c),o=c-u-1;u=c,s=0}else f===46&&s>-1?s++:s=-1}return i}function Ba(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const ow={cwd:sw};function sw(){return"/"}function Eu(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function uw(n){if(typeof n=="string")n=new URL(n);else if(!Eu(n)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(n.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return cw(n)}function cw(n){if(n.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const l=n.pathname;let i=-1;for(;++i<l.length;)if(l.codePointAt(i)===37&&l.codePointAt(i+1)===50){const o=l.codePointAt(i+2);if(o===70||o===102){const u=new TypeError("File URL path must not include encoded / characters");throw u.code="ERR_INVALID_FILE_URL_PATH",u}}return decodeURIComponent(l)}const xu=["history","path","basename","stem","extname","dirname"];class mp{constructor(l){let i;l?Eu(l)?i={path:l}:typeof l=="string"||fw(l)?i={value:l}:i=l:i={},this.cwd="cwd"in i?"":ow.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<xu.length;){const s=xu[o];s in i&&i[s]!==void 0&&i[s]!==null&&(this[s]=s==="history"?[...i[s]]:i[s])}let u;for(u in i)xu.includes(u)||(this[u]=i[u])}get basename(){return typeof this.path=="string"?Dn.basename(this.path):void 0}set basename(l){wu(l,"basename"),_u(l,"basename"),this.path=Dn.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?Dn.dirname(this.path):void 0}set dirname(l){pp(this.basename,"dirname"),this.path=Dn.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?Dn.extname(this.path):void 0}set extname(l){if(_u(l,"extname"),pp(this.dirname,"extname"),l){if(l.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(l.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Dn.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){Eu(l)&&(l=uw(l)),wu(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?Dn.basename(this.path,this.extname):void 0}set stem(l){wu(l,"stem"),_u(l,"stem"),this.path=Dn.join(this.dirname||"",l+(this.extname||""))}fail(l,i,o){const u=this.message(l,i,o);throw u.fatal=!0,u}info(l,i,o){const u=this.message(l,i,o);return u.fatal=void 0,u}message(l,i,o){const u=new Ht(l,i,o);return this.path&&(u.name=this.path+":"+u.name,u.file=this.path),u.fatal=!1,this.messages.push(u),u}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function _u(n,l){if(n&&n.includes(Dn.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+Dn.sep+"`")}function wu(n,l){if(!n)throw new Error("`"+l+"` cannot be empty")}function pp(n,l){if(!n)throw new Error("Setting `"+l+"` requires `path` to be set too")}function fw(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const dw=(function(n){const o=this.constructor.prototype,u=o[n],s=function(){return u.apply(s,arguments)};return Object.setPrototypeOf(s,o),s}),hw={}.hasOwnProperty;class Cu extends dw{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=$_()}copy(){const l=new Cu;let i=-1;for(;++i<this.attachers.length;){const o=this.attachers[i];l.use(...o)}return l.data(vu(!0,{},this.namespace)),l}data(l,i){return typeof l=="string"?arguments.length===2?(ku("data",this.frozen),this.namespace[l]=i,this):hw.call(this.namespace,l)&&this.namespace[l]||void 0:l?(ku("data",this.frozen),this.namespace=l,this):this.namespace}freeze(){if(this.frozen)return this;const l=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const u=i.call(l,...o);typeof u=="function"&&this.transformers.use(u)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const i=Jl(l),o=this.parser||this.Parser;return Tu("parse",o),o(String(i),i)}process(l,i){const o=this;return this.freeze(),Tu("process",this.parser||this.Parser),Au("process",this.compiler||this.Compiler),i?u(void 0,i):new Promise(u);function u(s,c){const f=Jl(l),m=o.parse(f);o.run(m,f,function(g,y,v){if(g||!y||!v)return h(g);const b=y,w=o.stringify(b,v);gw(w)?v.value=w:v.result=w,h(g,v)});function h(g,y){g||!y?c(g):s?s(y):i(void 0,y)}}}processSync(l){let i=!1,o;return this.freeze(),Tu("processSync",this.parser||this.Parser),Au("processSync",this.compiler||this.Compiler),this.process(l,u),yp("processSync","process",i),o;function u(s,c){i=!0,dp(s),o=c}}run(l,i,o){gp(l),this.freeze();const u=this.transformers;return!o&&typeof i=="function"&&(o=i,i=void 0),o?s(void 0,o):new Promise(s);function s(c,f){const m=Jl(i);u.run(l,m,h);function h(g,y,v){const b=y||l;g?f(g):c?c(b):o(void 0,b,v)}}}runSync(l,i){let o=!1,u;return this.run(l,i,s),yp("runSync","run",o),u;function s(c,f){dp(c),u=f,o=!0}}stringify(l,i){this.freeze();const o=Jl(i),u=this.compiler||this.Compiler;return Au("stringify",u),gp(l),u(l,o)}use(l,...i){const o=this.attachers,u=this.namespace;if(ku("use",this.frozen),l!=null)if(typeof l=="function")m(l,i);else if(typeof l=="object")Array.isArray(l)?f(l):c(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function s(h){if(typeof h=="function")m(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...y]=h;m(g,y)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(h.plugins),h.settings&&(u.settings=vu(!0,u.settings,h.settings))}function f(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const y=h[g];s(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function m(h,g){let y=-1,v=-1;for(;++y<o.length;)if(o[y][0]===h){v=y;break}if(v===-1)o.push([h,...g]);else if(g.length>0){let[b,...w]=g;const E=o[v][1];Su(E)&&Su(b)&&(b=vu(!0,E,b)),o[v]=[h,b,...w]}}}}const mw=new Cu().freeze();function Tu(n,l){if(typeof l!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Au(n,l){if(typeof l!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function ku(n,l){if(l)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function gp(n){if(!Su(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function yp(n,l,i){if(!i)throw new Error("`"+n+"` finished async. Use `"+l+"` instead")}function Jl(n){return pw(n)?n:new mp(n)}function pw(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function gw(n){return typeof n=="string"||yw(n)}function yw(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const bw="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",bp=[],vp={allowDangerousHtml:!0},vw=/^(https?|ircs?|mailto|xmpp)$/i,Sw=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Ew(n){const l=xw(n),i=_w(n);return ww(l.runSync(l.parse(i),i),n)}function xw(n){const l=n.rehypePlugins||bp,i=n.remarkPlugins||bp,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...vp}:vp;return mw().use(t_).use(i).use(Q_,o).use(l)}function _w(n){const l=n.children||"",i=new mp;return typeof l=="string"&&(i.value=l),i}function ww(n,l){const i=l.allowedElements,o=l.allowElement,u=l.components,s=l.disallowedElements,c=l.skipHtml,f=l.unwrapDisallowed,m=l.urlTransform||Cw;for(const g of Sw)Object.hasOwn(l,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+bw+g.id,void 0);return up(n,h),F1(n,{Fragment:O.Fragment,components:u,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0});function h(g,y,v){if(g.type==="raw"&&v&&typeof y=="number")return c?v.children.splice(y,1):v.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let b;for(b in iu)if(Object.hasOwn(iu,b)&&Object.hasOwn(g.properties,b)){const w=g.properties[b],E=iu[b];(E===null||E.includes(g.tagName))&&(g.properties[b]=m(String(w||""),b,g))}}if(g.type==="element"){let b=i?!i.includes(g.tagName):s?s.includes(g.tagName):!1;if(!b&&o&&typeof y=="number"&&(b=!o(g,y,v)),b&&v&&typeof y=="number")return f&&g.children?v.children.splice(y,1,...g.children):v.children.splice(y,1),y}}}function Cw(n){const l=n.indexOf(":"),i=n.indexOf("?"),o=n.indexOf("#"),u=n.indexOf("/");return l===-1||u!==-1&&l>u||i!==-1&&l>i||o!==-1&&l>o||vw.test(n.slice(0,l))?n:""}function Tw({text:n,maxWidth:l="200px",className:i="",icon:o,onClick:u,disabled:s=!1}){const[c,f]=P.useState(!1),m=P.useRef(null),h=P.useRef(null);return P.useEffect(()=>{const g=()=>{if(m.current&&h.current){const y=m.current.offsetWidth,v=h.current.scrollWidth;f(v>y)}};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[n,l]),n?O.jsxs("div",{ref:m,onClick:s?void 0:u,className:Ye("inline-flex items-center gap-2 rounded-full border border-lavender-200/60 bg-white/80 px-3 py-1 shadow-sm text-xs text-slate-700 hover: cursor-pointer",i,s?"opacity-50 cursor-not-allowed":""),style:{maxWidth:l},title:n,children:[o&&O.jsx("span",{className:"text-lavender-500",children:o}),O.jsx("div",{className:"pill-marquee-wrapper",children:O.jsx("span",{ref:h,className:Ye("block whitespace-normal",c?"pill-marquee":""),children:n})})]}):null}var Aw=Qf[" useInsertionEffect ".trim().toString()]||ur;function kw({prop:n,defaultProp:l,onChange:i=()=>{},caller:o}){const[u,s,c]=Nw({defaultProp:l,onChange:i}),f=n!==void 0,m=f?n:u;{const g=P.useRef(n!==void 0);P.useEffect(()=>{const y=g.current;if(y!==f){const v=y?"controlled":"uncontrolled",b=f?"controlled":"uncontrolled"}g.current=f},[f,o])}const h=P.useCallback(g=>{if(f){const y=Rw(g)?g(n):g;y!==n&&c.current?.(y)}else s(g)},[f,n,s,c]);return[m,h]}function Nw({defaultProp:n,onChange:l}){const[i,o]=P.useState(n),u=P.useRef(i),s=P.useRef(l);return Aw(()=>{s.current=l},[l]),P.useEffect(()=>{u.current!==i&&(s.current?.(i),u.current=i)},[i,u]),[i,o,s]}function Rw(n){return typeof n=="function"}function Ow(n){const l=P.useRef({value:n,previous:n});return P.useMemo(()=>(l.current.value!==n&&(l.current.previous=l.current.value,l.current.value=n),l.current.previous),[n])}function zw(n){const[l,i]=P.useState(void 0);return ur(()=>{if(n){i({width:n.offsetWidth,height:n.offsetHeight});const o=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const s=u[0];let c,f;if("borderBoxSize"in s){const m=s.borderBoxSize,h=Array.isArray(m)?m[0]:m;c=h.inlineSize,f=h.blockSize}else c=n.offsetWidth,f=n.offsetHeight;i({width:c,height:f})});return o.observe(n,{box:"border-box"}),()=>o.unobserve(n)}else i(void 0)},[n]),l}var Wl="Checkbox",[Mw]=ad(Wl),[Dw,Nu]=Mw(Wl);function jw(n){const{__scopeCheckbox:l,checked:i,children:o,defaultChecked:u,disabled:s,form:c,name:f,onCheckedChange:m,required:h,value:g="on",internal_do_not_use_render:y}=n,[v,b]=kw({prop:i,defaultProp:u??!1,onChange:m,caller:Wl}),[w,E]=P.useState(null),[T,_]=P.useState(null),A=P.useRef(!1),k=w?!!c||!!w.closest("form"):!0,q={checked:v,disabled:s,setChecked:b,control:w,setControl:E,name:f,form:c,value:g,hasConsumerStoppedPropagationRef:A,required:h,defaultChecked:mr(u)?!1:u,isFormControl:k,bubbleInput:T,setBubbleInput:_};return O.jsx(Dw,{scope:l,...q,children:Lw(y)?y(q):o})}var Sp="CheckboxTrigger",Ep=P.forwardRef(({__scopeCheckbox:n,onKeyDown:l,onClick:i,...o},u)=>{const{control:s,value:c,disabled:f,checked:m,required:h,setControl:g,setChecked:y,hasConsumerStoppedPropagationRef:v,isFormControl:b,bubbleInput:w}=Nu(Sp,n),E=Hn(u,g),T=P.useRef(m);return P.useEffect(()=>{const _=s?.form;if(_){const A=()=>y(T.current);return _.addEventListener("reset",A),()=>_.removeEventListener("reset",A)}},[s,y]),O.jsx(sr.button,{type:"button",role:"checkbox","aria-checked":mr(m)?"mixed":m,"aria-required":h,"data-state":Tp(m),"data-disabled":f?"":void 0,disabled:f,value:c,...o,ref:E,onKeyDown:qn(l,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:qn(i,_=>{y(A=>mr(A)?!0:!A),w&&b&&(v.current=_.isPropagationStopped(),v.current||_.stopPropagation())})})});Ep.displayName=Sp;var Ru=P.forwardRef((n,l)=>{const{__scopeCheckbox:i,name:o,checked:u,defaultChecked:s,required:c,disabled:f,value:m,onCheckedChange:h,form:g,...y}=n;return O.jsx(jw,{__scopeCheckbox:i,checked:u,defaultChecked:s,disabled:f,required:c,onCheckedChange:h,name:o,form:g,value:m,internal_do_not_use_render:({isFormControl:v})=>O.jsxs(O.Fragment,{children:[O.jsx(Ep,{...y,ref:l,__scopeCheckbox:i}),v&&O.jsx(Cp,{__scopeCheckbox:i})]})})});Ru.displayName=Wl;var xp="CheckboxIndicator",_p=P.forwardRef((n,l)=>{const{__scopeCheckbox:i,forceMount:o,...u}=n,s=Nu(xp,i);return O.jsx(fi,{present:o||mr(s.checked)||s.checked===!0,children:O.jsx(sr.span,{"data-state":Tp(s.checked),"data-disabled":s.disabled?"":void 0,...u,ref:l,style:{pointerEvents:"none",...n.style}})})});_p.displayName=xp;var wp="CheckboxBubbleInput",Cp=P.forwardRef(({__scopeCheckbox:n,...l},i)=>{const{control:o,hasConsumerStoppedPropagationRef:u,checked:s,defaultChecked:c,required:f,disabled:m,name:h,value:g,form:y,bubbleInput:v,setBubbleInput:b}=Nu(wp,n),w=Hn(i,b),E=Ow(s),T=zw(o);P.useEffect(()=>{const A=v;if(!A)return;const k=window.HTMLInputElement.prototype,H=Object.getOwnPropertyDescriptor(k,"checked").set,M=!u.current;if(E!==s&&H){const I=new Event("click",{bubbles:M});A.indeterminate=mr(s),H.call(A,mr(s)?!1:s),A.dispatchEvent(I)}},[v,E,s,u]);const _=P.useRef(mr(s)?!1:s);return O.jsx(sr.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??_.current,required:f,disabled:m,name:h,value:g,form:y,...l,tabIndex:-1,ref:w,style:{...l.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Cp.displayName=wp;function Lw(n){return typeof n=="function"}function mr(n){return n==="indeterminate"}function Tp(n){return mr(n)?"indeterminate":n?"checked":"unchecked"}const Ou=P.forwardRef(({className:n,...l},i)=>O.jsx(Ru,{ref:i,className:Ye("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",n),...l,children:O.jsx(_p,{className:Ye("grid place-content-center text-current"),children:O.jsx(Kd,{className:"h-4 w-4"})})}));Ou.displayName=Ru.displayName;var Gr=(n=>(n.NOTA="none_of_the_above",n.AOTA="all_of_the_above",n))(Gr||{});function Iw({options:n,selectedValues:l,onSelectionChange:i,additionalOption:o,className:u,required:s=!0,maxSelections:c,error:f,disabled:m}){const h=o?{id:`extra-${o}`,label:o==="all_of_the_above"?"All of the above":"None of the above",value:o==="all_of_the_above"?"All of the above":"None of the above"}:{id:"extra-None of the above",label:"None of the above",value:"None of the above"},g=_=>h?_.filter(A=>A!==h.value):_,y=_=>h?o==="none_of_the_above"?_?[h.value]:[]:o==="all_of_the_above"?_?[...n.map(A=>A.value),h.value]:g(l):_?[...l,h.value]:g(l):l,v=(_,A)=>{const k=h?g(l):l;return A?c&&k.length>=c?null:[...k,_]:k.filter(q=>q!==_)},b=_=>!(s&&_.length===0&&l.length===1),w=(_,A)=>{const q=h&&_===h.value?y(A):v(_,A);q!==null&&b(q)&&i(q)},E=!s||l.length>0,T=h?l.filter(_=>_!==h.value).length:l.length;return n.length?O.jsxs("div",{className:Ye("bg-gray-50","rounded-lg","p-4","border border-gray-200",u),children:[O.jsxs("div",{className:"space-y-3",children:[n.map(_=>{const A=m||c&&T>=c&&!l.includes(_.value);return O.jsxs("div",{className:"flex items-center space-x-3",children:[O.jsx(Ou,{id:_.id,checked:!!l.includes(_.value),disabled:!!A,onCheckedChange:k=>w(_.value,!!k),className:"mt-0.5 border border-muted-foreground"}),O.jsx("label",{htmlFor:_.id,className:Ye("text-sm font-medium leading-none cursor-pointer",A?"text-muted-foreground cursor-not-allowed":"text-secondary-foreground"),children:_.label})]},_.id)}),h&&O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"border-t border-gray-300 my-3"}),O.jsxs("div",{className:"flex items-center space-x-3",children:[O.jsx(Ou,{id:h.id,checked:l.includes(h.value),onCheckedChange:_=>w(h.value,_),className:"mt-0.5 border border-muted-foreground"}),O.jsx("label",{htmlFor:h.id,className:"text-sm font-medium leading-none cursor-pointer text-secondary-foreground",children:h.label})]})]})]}),f&&O.jsx("p",{className:"text-sm text-red-500 mt-3",children:f}),s&&!E&&O.jsx("p",{className:"text-sm text-red-500 mt-3",children:"Please select at least one option"}),c&&T>=c&&O.jsx("p",{className:"text-sm text-blue-600 mt-3",children:c===1?"You can select only 1 option":`Maximum ${c} selections allowed`})]}):null}function Ap({file:n,onRemove:l,isPreview:i=!0,className:o=""}){const[u,s]=P.useState(!1),[c,f]=P.useState(""),m=n?.type?.startsWith("image/")??!1,h=n?.type==="application/pdf";P.useEffect(()=>{if(m){const v=URL.createObjectURL(n);return f(v),()=>URL.revokeObjectURL(v)}},[n,m]),P.useEffect(()=>{s(!1)},[n]);const g=()=>m?"text-green-600":"text-gray-600",y=v=>{if(v===0)return"0 B";const b=1024,w=["B","KB","MB","GB"],E=Math.floor(Math.log(v)/Math.log(b));return`${(v/Math.pow(b,E)).toFixed(1)} ${w[E]}`.toLowerCase()};return!m||u?O.jsxs("div",{className:`relative group inline-flex flex-shrink-0 bg-white border border-neutral-300 rounded-lg flex items-center gap-3 px-3 py-2.5 max-w-full ${i?"hover:bg-neutral-50":""} ${o}`,children:[O.jsx("div",{className:`flex-shrink-0 ${g()}`,children:O.jsx(yS,{className:"h-5 w-5"})}),O.jsxs("div",{className:"flex-1 min-w-0 max-w-[200px]",children:[n?.name&&O.jsx("div",{className:"text-sm font-medium text-[var(--color-foreground)] truncate",children:n.name}),n?.size&&O.jsx("div",{className:"text-xs text-[var(--color-muted-foreground)]",children:y(n.size)})]}),i&&l&&O.jsx("button",{onClick:l,"aria-label":`Remove ${n.name}`,className:"flex-shrink-0 flex items-center justify-center w-5 h-5 text-[var(--color-muted-foreground)] hover:text-[var(--color-foreground)] transition-colors",children:O.jsx(Os,{className:"h-4 w-4"})})]}):O.jsxs("div",{className:`relative group flex-shrink-0 ${o}`,children:[O.jsx("div",{className:`w-20 h-20 bg-white border border-neutral-300 rounded-lg flex items-center justify-center overflow-hidden ${i?"hover:bg-neutral-100 cursor-pointer":""}`,children:c&&O.jsx("img",{src:c,alt:n.name,className:"w-full h-full object-cover",onError:()=>s(!0)})}),i&&l&&O.jsx("button",{onClick:l,"aria-label":`Remove ${n.name}`,className:"absolute top-0 right-0 bg-[var(--color-muted)] text-black rounded-full w-5 h-5 flex items-center justify-center hover:bg-[var(--color-muted-foreground)] transition-colors z-10 transform translate-x-1 -translate-y-1",children:O.jsx(Os,{className:"h-3 w-3 text-black"})})]})}function Bw({files:n,onRemoveFile:l,isPreview:i=!0,className:o=""}){if(n.length===0)return null;const u=n.filter(c=>c.type?.startsWith("image/")),s=n.filter(c=>!c.type?.startsWith("image/"));return O.jsxs("div",{className:`flex flex-wrap justify-end gap-2 max-w-full ${o}`,children:[s.map(c=>{const f=n.indexOf(c);return O.jsx(Ap,{file:c,onRemove:l?()=>l(f):void 0,isPreview:i},`${c.name}-${c.size}-${f}`)}),u.length>0&&O.jsx("div",{className:"flex gap-2 overflow-x-auto max-w-full p-1 scrollbar-hide",children:u.map(c=>{const f=n.indexOf(c);return O.jsx(Ap,{file:c,onRemove:l?()=>l(f):void 0,isPreview:i},`${c.name}-${c.size}-${f}`)})})]})}function Uw({value:n,onValueChange:l,placeholder:i="Select an option",className:o,triggerClassName:u,contentClassName:s,disabled:c=!1,options:f=[],size:m="default"}){const[h,g]=P.useState(!1),y=P.useRef(null),v=P.useRef(null),b=f.find(T=>T.value===n);P.useEffect(()=>{const T=_=>{h&&_.key==="Escape"&&(g(!1),v.current?.focus())};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[h]);const w=T=>{l?.(T),g(!1),v.current?.focus()},E=()=>{c||g(!h)};return O.jsxs("div",{className:Ye("relative w-full",o),children:[O.jsxs("button",{ref:v,type:"button",onClick:E,disabled:c,className:Ye('border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*="text-"])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 overflow-hidden',m==="default"?"min-h-9":"min-h-8",u),"aria-expanded":h,"aria-haspopup":"listbox",children:[O.jsx("span",{className:Ye("flex-1 text-left min-w-0 overflow-hidden break-words line-clamp-2",!b&&"text-muted-foreground"),children:b?b.label:i}),O.jsx(Rs,{className:Ye("size-4 opacity-50 pointer-events-none shrink-0 transition-transform duration-200",h&&"rotate-180")})]}),h&&O.jsx("div",{ref:y,className:Ye("bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 relative z-50 max-h-[300px] min-w-[8rem] w-full overflow-x-hidden overflow-y-auto rounded-md shadow-md mt-1",s),role:"listbox",children:O.jsx("div",{className:"p-1",children:f.length===0?O.jsx("div",{className:"px-3 py-2 text-sm text-muted-foreground text-center",children:"No options available"}):f.map(T=>{const _=T.value===n;return O.jsxs("div",{onClick:()=>w(T.value),className:Ye("relative flex w-full cursor-pointer items-center gap-1 rounded-sm py-2.5 px-3 text-sm outline-none select-none transition-colors duration-150","hover:bg-accent hover:text-accent-foreground","focus-visible:bg-accent focus-visible:text-accent-foreground","active:bg-accent/80",_&&"bg-accent/50 text-foreground",c&&"pointer-events-none opacity-50 cursor-not-allowed"),role:"option","aria-selected":_,tabIndex:c?-1:0,onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),c||w(T.value))},children:[O.jsx("span",{className:"flex-1 text-left min-w-0 break-words line-clamp-2",children:T.label}),_&&O.jsx("span",{className:"absolute right-3 flex size-4 items-center justify-center shrink-0 pointer-events-none",children:O.jsx(Kd,{className:"size-4 text-foreground"})})]},T.value)})})})]})}const Hw=n=>n?n.split(" ").map(l=>l[0]).slice(0,2).join("").toUpperCase():"DR",kp=n=>{const l=n.toLocaleDateString(void 0,{weekday:"short"}).toUpperCase(),i=n.toLocaleDateString(void 0,{day:"2-digit"});return{weekday:l,dayNum:i}},Np=n=>[...n].sort((l,i)=>new Date(l.date).getTime()-new Date(i.date).getTime()),Rp=(n,l)=>(n?.[l]?.slots_details?.length??0)>0;function qw({doctor:n,availability:l,callbacks:i,onBook:o,disabled:u=!1,getAvailabilityDatesForAppointment:s,getAvailableSlotsForAppointment:c}){const[f,m]=P.useState(!1),[h,g]=P.useState(0),[y,v]=P.useState(null),[b,w]=P.useState(0),[E,T]=P.useState(()=>n.hospitals[0]||null),[_,A]=P.useState(!0),[k,q]=P.useState(!1),[H,M]=P.useState(null),[I,Y]=P.useState(!1),[F,$]=P.useState(null),ie=Yr(ve=>ve.sessionId),D=E?.hospital_id,ne=!!i?.[Ge.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES],C=!!i?.[Ge.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_SLOTS],V=P.useMemo(()=>{if(!D)return l||null;const ve=H?.[D],ze=l?.[D];return ve?{...l||{},[D]:ve}:ze?l:l||null},[H,l,D]),Z=P.useCallback(async()=>{if(!(!n.doctor_id||!ie||!D)){A(!0),$(null);try{const ve=await s({doctor_id:n.doctor_id,hospital_id:D,region_id:E?.region_id||""}),ze=ve?.available_dates?.length&&ve?.available_dates?.map(X=>({date:X,slots:[]}))||[],je=l?.[D]?.slots_details||[],S=H?.[D]?.slots_details||[],K=new Map;je.forEach(X=>{K.set(X.date,X)}),S.forEach(X=>{K.set(X.date,X)});const U=[...Array.from(K.values())];ze.forEach(X=>{K.has(X.date)||U.push(X)});const j=Np(U);M(X=>({...X||{},[D]:{slots_details:j}}))}catch{$("Failed to load availability dates")}finally{A(!1)}}},[n.doctor_id,ie,D,E?.region_id,s,l,H]);P.useEffect(()=>{if(!D)return;const ve=Rp(H,D),ze=Rp(l??null,D);Y(!1),g(0),w(0),v(null),$(null),!ve&&!ze&&ne&&ie?Z():A(!1)},[D]);const Q=P.useMemo(()=>{if(!D)return new Date;const ve=V?.[D]?.slots_details;if(!ve?.length)return new Date;const ze=ve[0];return ze?new Date(ze.date):new Date},[V,D]),se=P.useCallback(async ve=>{if(!(!n.doctor_id||!D||!E?.region_id||!ie)){q(!0);try{const ze=await c(ve,{doctor_id:n.doctor_id,hospital_id:D,region_id:E.region_id});if(!ze?.slots?.length)return;M(je=>{if(!je||!je?.[D]?.slots_details?.length)return{...je||{},[D]:{slots_details:[{date:ve,slots:ze.slots}]}};const S=je[D].slots_details.map(U=>U.date===ve?{...U,slots:ze.slots}:U),W=je[D].slots_details.some(U=>U.date===ve)?S:[...S,{date:ve,slots:ze.slots}];return{...je,[D]:{slots_details:Np(W)}}})}catch{$("Failed to load slots")}finally{q(!1)}}},[n.doctor_id,D,E?.region_id,ie,c]);P.useEffect(()=>{if(!D||I||_)return;const ve=V?.[D],ze=ve?.slots_details||[];if(D&&ze.length>0&&!I){let je=0;const S=ve?.selected_date||l?.[D]?.selected_date;if(S){const W=ze.findIndex(U=>U.date===S);W>=0&&(je=W)}else{const W=l?.[D]?.slots_details||[],U=ze.findIndex(j=>{const X=W.find(he=>he.date===j.date);return X?.slots&&X.slots.length>0});U>=0&&(je=U)}g(je),w(Math.floor(je/3)*3);const K=ze[je];K&&(!K?.slots||K.slots.length===0)&&C&&ie&&se(K.date)}},[V,D,l,I,_]);const de=P.useMemo(()=>{const ve=D?V?.[D]?.slots_details:null;if(ve?.length){const je=Math.max(0,Math.floor(b/3)*3),S=Math.min(ve.length,je+3);return ve.slice(je,S).map(K=>{const W=new Date(K.date),{weekday:U,dayNum:j}=kp(W);return{weekday:U,dayNum:j,date:K.date,hasAvailability:!0,fullDate:W,hasSlots:!!(K.slots&&K.slots.length>0)}})}const ze=new Date(Q);return ze.setDate(ze.getDate()+b),Array.from({length:3},(je,S)=>{const K=new Date(ze);K.setDate(ze.getDate()+S);const{weekday:W,dayNum:U}=kp(K),j=K.toISOString().split("T")[0];return{weekday:W,dayNum:U,date:j,hasAvailability:!1,fullDate:K,hasSlots:!1}})},[Q,b,V,D]),L=P.useMemo(()=>(D?V?.[D]?.slots_details:null)?.[h]||null,[V,D,h]),N=P.useMemo(()=>Hw(n.name),[n.name]),B=P.useCallback(()=>{Y(!0),w(ve=>Math.max(0,ve-3)),v(null)},[]),z=P.useCallback(()=>{Y(!0);const ve=D?V?.[D]?.slots_details:null,ze=ve?.length?Math.max(0,ve.length-3):0;w(je=>Math.min(ze,je+3)),v(null)},[D,V]),re=P.useCallback(ve=>{Y(!0);const ze=D?V?.[D]?.slots_details:null,je=ze?.findIndex(K=>K.date===ve)??-1;je>=0&&g(je),v(null);const S=ze?.find(K=>K.date===ve);C&&(!S?.slots||S.slots.length===0)&&n.doctor_id&&D&&E?.region_id&&ie&&se(ve)},[D,V,C,n.doctor_id,E?.region_id]),ce=P.useMemo(()=>b>0,[b]),we=P.useMemo(()=>{const ve=D?V?.[D]?.slots_details:null;if(!ve||ve.length===0)return!1;const ze=Math.max(0,ve.length-3);return b<ze},[b,V,D]),Te=P.useCallback(()=>{o&&L&&y&&o({date:L.date,time:y,doctorData:{doctor:n,hospital_id:D||"",region_id:E?.region_id||""}})},[o,L,y,n,D,E?.region_id]),ke=P.useMemo(()=>n.hospitals.map(ve=>({value:ve.hospital_id,label:ve.name})),[n.hospitals]),Ae=P.useCallback(ve=>{v(ve)},[]),He=P.useCallback(ve=>{const ze=n.hospitals.find(je=>je.hospital_id===ve);ze&&T(ze)},[n.hospitals]);return O.jsxs(da,{className:"max-w-md rounded-xl border-lavender-200 shadow-md p-0 bg-white overflow-hidden","aria-label":"Appointment card",children:[O.jsx(Jd,{className:"flex flex-row items-center justify-between gap-3 bg-lavender-50 rounded-t-xl p-4 border-b border-lavender-100 overflow-hidden",children:O.jsxs("div",{className:"flex items-center gap-3",children:[n.profile_pic&&O.jsxs(ha,{className:"h-12 w-12 ring-2 ring-lavender-200",children:[O.jsx(fh,{src:n.profile_pic,alt:`${n.name} profile photo`,crossOrigin:"anonymous"}),O.jsx(ma,{className:"bg-lavender-100 text-lavender-700",children:N})]}),O.jsxs("div",{className:"min-w-0",children:[O.jsxs("div",{className:"flex flex-wrap items-baseline gap-2",children:[O.jsx("h3",{className:" text-base font-bold text-slate-900",children:n.name}),n.profile_link?O.jsx("a",{href:n.profile_link,target:"_blank",rel:"noreferrer",className:"text-xs font-semibold text-lavender-600 hover:text-lavender-700 hover:underline",children:"View profile"}):null]}),O.jsxs("p",{className:"mt-0.5 text-sm text-slate-600",children:[n.specialty,n.experience&&O.jsxs(O.Fragment,{children:[" • ",n.experience]})]})]})]})}),O.jsxs(Wd,{className:"px-4 py-2",children:[O.jsxs("div",{className:"grid gap-2 border-b border-lavender-100 pb-3",children:[n?.timings&&O.jsxs("div",{className:"flex items-start gap-2 text-sm text-slate-900",children:[O.jsx(gS,{className:"h-4 w-4 text-lavender-600 mt-0.5 flex-shrink-0","aria-hidden":!0}),O.jsx("span",{className:"text-slate-600 text-xs",children:n?.timings})]}),n.languages?O.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[O.jsx(bS,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),O.jsx("span",{className:"text-slate-600",children:n.languages})]}):null,n?.hospitals&&n.hospitals?.length>1?E&&E.name&&O.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[O.jsx(Zd,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),O.jsx(Uw,{options:ke,placeholder:"Select Hospital",disabled:u,onValueChange:He,value:E?.hospital_id||""})]}):E&&E.name&&O.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[O.jsx(Zd,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),O.jsx("span",{className:"text-slate-600",children:E.name})]})]}),E?.hospital_id&&V?.[E?.hospital_id]?.slots_details?.length||i?.[Ge.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES]||_?O.jsx(kt,{type:"button",variant:"outline","aria-expanded":f,"aria-controls":"ap-slots",onClick:()=>m(ve=>!ve),disabled:_,className:"mt-3 w-full border-lavender-500 text-lavender-600 hover:bg-lavender-50 hover:border-lavender-600 disabled:opacity-50",children:_?O.jsxs(O.Fragment,{children:[O.jsx(Qd,{className:"h-4 w-4 mr-2 animate-spin"}),"Loading availability..."]}):O.jsxs(O.Fragment,{children:[O.jsx("span",{className:"mr-1",children:f?"Hide slots":"Show available slots"}),O.jsx(Rs,{className:`h-4 w-4 transition-transform ${f?"rotate-180":""}`,"aria-hidden":!0})]})}):O.jsx("div",{className:"mt-3 w-full flex items-center justify-center py-3 px-4 bg-lavender-50 border border-lavender-200 rounded-lg",children:O.jsx("span",{className:"text-sm text-slate-600 font-medium",children:"No details available"})}),f&&E?.hospital_id&&V?.[E?.hospital_id]?.slots_details?.length&&O.jsx("div",{id:"ap-slots",role:"region","aria-label":"Available slots",className:"pt-3",children:V?.[E?.hospital_id??""]?.slots_details?.length?O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"flex items-center gap-2 px-0.5",children:[O.jsx(kt,{type:"button",variant:"outline",size:"icon",onClick:B,"aria-label":"Previous 3 days",disabled:u||!ce,className:"h-8 w-8 flex-shrink-0 rounded-md border-lavender-200 bg-white text-lavender-700 hover:bg-lavender-50 hover:border-lavender-300 disabled:opacity-50",children:O.jsx(mS,{className:"h-4 w-4"})}),O.jsx("div",{className:"flex-1 grid grid-cols-3 gap-1 min-w-0",children:de.map((ve,ze)=>{const je=L?.date===ve.date,S=!ve.hasAvailability;return O.jsxs(kt,{type:"button",variant:"outline",onClick:()=>!S&&re(ve.date),disabled:S||u,"aria-current":je?"date":void 0,className:["flex flex-col items-center justify-center h-12 rounded-lg border-2 p-2 gap-0.5 min-w-0 transition-all",je?"border-lavender-500 ring-2 ring-lavender-200 bg-lavender-50 shadow-sm":S?"border-slate-200 bg-slate-50 text-slate-300 cursor-not-allowed":"border-slate-200 bg-white hover:bg-lavender-50 hover:border-lavender-300"].join(" "),children:[O.jsx("span",{className:["text-[10px] tracking-wide w-full text-center font-medium",je?"text-lavender-700":S?"text-slate-300":"text-slate-600"].join(" "),children:ve.weekday}),O.jsx("span",{className:["text-xs font-bold w-full text-center",je?"text-lavender-700":S?"text-slate-300":"text-slate-900"].join(" "),children:ve.dayNum})]},`${ve.date}-${ze}`)})}),O.jsx(kt,{type:"button",variant:"outline",size:"icon",onClick:z,"aria-label":"Next 3 days",disabled:u||!we,className:"h-8 w-8 flex-shrink-0 rounded-md border-lavender-200 bg-white text-lavender-700 hover:bg-lavender-50 hover:border-lavender-300 disabled:opacity-50",children:O.jsx(pS,{className:"h-4 w-4"})})]}),O.jsx("div",{className:"px-0.5 py-3",children:k?O.jsxs("div",{className:"flex items-center justify-center py-4",children:[O.jsx(Qd,{className:"h-4 w-4 animate-spin text-lavender-600 mr-2"}),O.jsx("span",{className:"text-sm text-slate-600",children:"Loading slots..."})]}):L?.slots?.length?O.jsx("div",{className:"grid grid-cols-2 gap-2 max-h-48 overflow-y-auto",children:L.slots.map((ve,ze)=>{const je=y===ve;return O.jsxs(kt,{type:"button",variant:"outline",onClick:()=>Ae(ve),"aria-pressed":je,disabled:u,className:["inline-flex h-9 items-center justify-center gap-2 rounded-lg px-3 text-xs font-semibold transition-all",je?"border-lavender-600 bg-lavender-600 text-white shadow-sm hover:bg-lavender-700 hover:border-lavender-700":"border-lavender-200 bg-white text-slate-900 hover:bg-lavender-50 hover:border-lavender-300"].join(" "),children:[O.jsx(hS,{className:`h-3.5 w-3.5 flex-shrink-0${je?"text-white":"text-lavender-600"}`}),O.jsx("span",{className:"truncate",children:ve})]},ve||`slot-${ze}`)})}):O.jsx("p",{className:"px-1 text-sm text-slate-600",children:"No slots available for this day."})}),O.jsx("div",{className:"px-0.5 pb-1.5",children:O.jsxs(kt,{type:"button",onClick:Te,disabled:!y||u,"aria-disabled":!y,className:"w-full h-10 gap-2 bg-lavender-600 text-white hover:bg-lavender-700 disabled:opacity-60 shadow-sm font-semibold",children:["Book appointment",O.jsx(dS,{className:"h-4 w-4"})]})})]}):O.jsx("div",{className:"px-1 pb-2 pt-1",children:O.jsx("p",{className:"text-sm text-slate-600",children:F||"No availability provided."})})}),f&&!V?.[E?.hospital_id??""]?.slots_details?.length&&O.jsx("div",{className:"px-1 pb-2 pt-1",children:O.jsx("p",{className:"text-sm text-slate-600",children:F||"No availability provided."})})]})]})}function Pw({callTool:n,doctorDetails:l,callbacks:i,onBook:o,disabled:u=!1}){const[s,c]=P.useState([]),[f,m]=P.useState(!1),[h,g]=P.useState(0),[y,v]=P.useState(null),b=Yr(M=>M.sessionId),w=l.doctor_ids||[],E=w.length,T=Math.min(3,E),_=E-T;P.useEffect(()=>{if(w.length===0||!b)return;(async()=>{m(!0),v(null);try{const Y=w.slice(0,T).map(ie=>n(Ge.SYNAPSE_TOOL_NAME.DOCTOR_DETAILS,{doctor_id:ie})),F=await Promise.allSettled(Y),$=[];F.forEach((ie,D)=>{ie.status==="fulfilled"&&$.push(ie.value)}),c($),g($.length)}catch{v("Failed to load doctor details. Please try again.")}finally{m(!1)}})()},[w,b,T]);const A=async()=>{if(!(h>=E||!b)){m(!0),v(null);try{const I=w.slice(h).map($=>n(Ge.SYNAPSE_TOOL_NAME.DOCTOR_DETAILS,{doctor_id:$})),Y=await Promise.allSettled(I),F=[];Y.forEach(($,ie)=>{$.status==="fulfilled"&&F.push($.value)}),c($=>[...$,...F]),g($=>$+F.length)}catch{v("Failed to load more doctor details. Please try again.")}finally{m(!1)}}},k=M=>{o&&o(M)},q=async M=>{const I=i?.[Ge.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES].tool_name||Ge.SYNAPSE_TOOL_NAME.AVAILABILITY_DATES;return await n(I,{doctor_id:M.doctor_id,hospital_id:M.hospital_id,region_id:M.region_id})},H=async(M,I)=>{const Y=i?.[Ge.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_SLOTS].tool_name||Ge.SYNAPSE_TOOL_NAME.AVAILABILITY_SLOTS;return await n(Y,{appointment_date:M,doctor_id:I.doctor_id,hospital_id:I.hospital_id,region_id:I.region_id})};return f&&s.length===0?O.jsx("div",{className:"flex items-center justify-center py-8",children:O.jsxs("div",{className:"text-center",children:[O.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[var(--color-primary)] mx-auto mb-3"}),O.jsx("p",{className:"text-sm text-gray-500",children:"Loading doctor details..."})]})}):y&&s.length===0?O.jsx("div",{className:"flex items-center justify-center py-8",children:O.jsxs("div",{className:"text-center",children:[O.jsx("p",{className:"text-sm text-red-500 mb-2",children:y}),O.jsx(kt,{variant:"outline",size:"sm",onClick:()=>{v(null),w.length>0&&b&&(async()=>{m(!0);try{const Y=w.slice(0,T).map(ie=>n(Ge.SYNAPSE_TOOL_NAME.DOCTOR_DETAILS,{doctor_id:ie})),F=await Promise.allSettled(Y),$=[];F.forEach((ie,D)=>{ie.status==="fulfilled"&&$.push(ie.value)}),c($),g($.length)}catch{v("Failed to load doctor details. Please try again.")}finally{m(!1)}})()},children:"Retry"})]})}):s.length===0?O.jsx("div",{className:"flex items-center justify-center py-2",children:O.jsx("p",{className:"text-sm text-gray-500",children:"No doctor details available."})}):O.jsxs("div",{className:"space-y-4",children:[O.jsx("div",{className:"space-y-4",children:s.map((M,I)=>M?.doctor_id&&O.jsx(qw,{doctor:M,availability:l.availability,callbacks:i,onBook:k,disabled:u,getAvailabilityDatesForAppointment:q,getAvailableSlotsForAppointment:H},`${I}`))}),h<E&&O.jsx("div",{className:"flex justify-center",children:O.jsx(kt,{variant:"outline",onClick:A,disabled:f,className:"px-6 py-2",children:f?O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-[var(--color-primary)] mr-2"}),"Loading more doctors..."]}):`Show more (${_} more)`})}),y&&s.length>0&&O.jsxs("div",{className:"text-center",children:[O.jsx("p",{className:"text-sm text-red-500 mb-2",children:y}),O.jsx(kt,{variant:"outline",size:"sm",onClick:A,disabled:f,children:"Retry loading more"})]})]})}function Fw({role:n,content:l,timestamp:i,iconUrl:o,files:u,isLastMessage:s,progressMessage:c,toolEscalationData:f,callTool:m,onSendMessage:h}){const g=n==="user",[y,v]=P.useState([]),b=async k=>{const q=Date.now().toString();await h({message:k,messageId:q,toolCalled:!0})},w=async k=>{await h({message:`I want to book an appointment for ${k.doctorData?.doctor?.name||"the doctor"} on ${k.date} for ${k.time}`,toolCalled:!0})},E=k=>{v(k)},T=()=>{if(!f?.details?.input?.additional_option)return;const k=f.details?.input?.additional_option;if(typeof k=="string"&&(k===Gr.NOTA||k===Gr.AOTA))return k;if(typeof k=="object"&&k!==null){if(k.NOTA===Gr.NOTA)return Gr.NOTA;if(k.AOTA===Gr.AOTA)return Gr.AOTA}},_=()=>{const k=f?.details?.input?.options;return k?Array.isArray(k)?k.map((q,H)=>({id:`option-${H}`,label:q.label,value:q.value})):Object.keys(k).map((q,H)=>({id:`option-${H}`,label:q,value:q})):[]},A=async()=>{if(y.length>0){const k=y.join(", "),q=Date.now().toString();await h({message:k,messageId:q,toolCalled:!0})}};return O.jsx("div",{className:Ye("flex",g?"justify-end":"justify-start"),children:O.jsxs("div",{className:Ye("flex gap-3",g?"flex-row-reverse":"flex-row",f?.details?.component===Ge.SYNAPSE_COMPONENTS.MULTI?"max-w-md":g?"max-w-[60%]":"max-w-xs"),children:[!g&&O.jsx(ha,{className:"w-8 h-8 bg-gradient-to-br from-lavender-400 to-lavender-500 text-white text-xs font-bold flex-shrink-0",children:O.jsx(ma,{className:"bg-transparent text-white text-xs font-bold",children:o?O.jsx("img",{src:o,alt:"Bot Icon",className:"w-full h-full"}):O.jsx(Xd,{className:"w-full h-full"})})}),O.jsxs(da,{className:Ye("px-4 py-2 rounded-2xl shadow-none break-words overflow-wrap-anywhere whitespace-pre-wrap",g?"bg-lavender-100/95 backdrop-blur-md text-slate-900 rounded-br-none border border-lavender-200/60":"bg-white/80 backdrop-blur-md text-slate-800 shadow-sm rounded-bl-none border border-lavender-200/40",f&&"w-full"),children:[c&&!g&&s&&O.jsx("p",{className:"text-sm font-medium text-slate-500 pb-2",children:c}),l&&O.jsx("div",{className:"text-sm markdown-content mb-3",children:O.jsx(Ew,{children:l})}),u&&u.length>0&&O.jsx("div",{className:"mt-2",children:O.jsx(Bw,{files:u,isPreview:!1,className:""})}),f?.details?.component===Ge.SYNAPSE_COMPONENTS.PILL&&f?.details?.input?.options&&O.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:f.details?.input?.options.map((k,q)=>O.jsx(Tw,{disabled:f?.isResponded,text:k?.label||"",onClick:()=>b(k?.value||""),className:"cursor-pointer hover:bg-lavender-100/80 transition-colors"},q))}),f?.details?.component===Ge.SYNAPSE_COMPONENTS.MULTI&&f?.details?.input?.options&&O.jsxs("div",{className:"mt-3 space-y-3 break-words overflow-wrap-anywhere whitespace-pre-wrap",children:[O.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Select multiple options:"}),O.jsx(Iw,{options:_(),selectedValues:y,onSelectionChange:E,additionalOption:T(),disabled:f?.isResponded}),O.jsx(kt,{onClick:A,disabled:y.length===0||f?.isResponded,className:Ye("w-full rounded-lg px-4 py-2 text-sm font-medium transition-all","bg-blue-100 hover:bg-blue-200 text-blue-600 border border-blue-200","disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400 disabled:border-gray-200","shadow-sm hover:shadow-md active:scale-[0.98] "),children:"Confirm"})]}),f?.details?.component===Ge.SYNAPSE_COMPONENTS.DOCTOR_CARD&&f?.details?.input?.doctor_details&&m?O.jsx("div",{className:"mt-3",children:O.jsx(Pw,{doctorDetails:f?.details?.input?.doctor_details,callTool:m,callbacks:f?.details?._meta?.callbacks,onBook:w,disabled:f?.isResponded})}):null,c&&!g&&s&&O.jsx("p",{className:"text-sm font-medium text-teal-600",children:c}),i&&O.jsx("p",{className:Ye("text-xs mt-2 text-right","text-slate-500"),children:i})]})]})})}function Yw({messages:n,onSendMessage:l,iconUrl:i,callTool:o}){const u=Yr(c=>c.isWaitingForResponse),s=Yr(c=>c.progressMessage);return O.jsxs(O.Fragment,{children:[(n&&n.length>0||s)&&O.jsx(O.Fragment,{children:n.map((c,f)=>O.jsx("div",{className:"animate-slideUp scroll-mt-[80px]",id:f===n.length-1?"last-message":void 0,children:O.jsx(Fw,{role:c.role,content:c.content,files:c.files||[],iconUrl:i,toolEscalationData:c.toolEscalationData,timestamp:c.timestamp,onSendMessage:l,isLastMessage:f===n.length-1,progressMessage:s,callTool:o})},c.id))}),u&&O.jsx(Vw,{iconUrl:i})]})}function Vw({iconUrl:n}){return O.jsx("div",{className:"animate-slideUp",children:O.jsx("div",{className:"flex justify-start",children:O.jsxs("div",{className:"flex gap-3",children:[O.jsx(ha,{className:"w-8 h-8 bg-gradient-to-br from-lavender-400 to-lavender-500 text-white text-xs font-bold flex-shrink-0",children:O.jsx(ma,{className:"bg-transparent text-white text-xs font-bold",children:n?O.jsx("img",{src:n,alt:"Bot Icon",className:"w-4 h-4",loading:"lazy"}):O.jsx(Xd,{className:"w-4 h-4"})})}),O.jsx(da,{className:"px-4 py-2 rounded-2xl shadow-none bg-white/80 backdrop-blur-md text-slate-800 shadow-sm rounded-bl-none border border-lavender-200/40",children:O.jsx("div",{className:"flex items-center gap-1.5","aria-label":"Bot is typing",children:[0,1,2].map(l=>O.jsx("span",{className:"w-2 h-2 rounded-full bg-slate-400 animate-pulse",style:{animationDelay:`${l*150}ms`}},l))})})]})})})}const Gw=Object.freeze(Object.defineProperty({__proto__:null,default:Yw},Symbol.toStringTag,{value:"Module"}));function Xw({onTaskClick:n,disabled:l,tasks:i}){return i?.length?O.jsx("div",{className:"grid grid-cols-2 gap-3",children:i.map(o=>O.jsx(kt,{type:"button",variant:"ghost",disabled:l,onClick:()=>n(o.value||""),className:"h-auto w-full flex flex-col items-start bg-white shadow-lg ring-1 ring-lavender-100 backdrop-blur-sm rounded-2xl p-4 hover:bg-white/95 hover:border-lavender-300 hover:shadow-lg transition-all text-left group",children:O.jsx("div",{className:"flex items-start justify-between gap-3",children:O.jsx("h3",{className:"font-semibold text-sm text-slate-900 text-wrap group-hover:text-lavender-600 transition-colors",children:o.label||""})})},o.value))}):null}function Zw({initialPrompt:n,tasks:l,onTaskClick:i,disabled:o}){return O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"text-center space-y-2 animate-fadeIn",children:O.jsx("h1",{className:"text-xl-minus font-semibold text-slate-900",children:n||"How can I assist you today?"})}),O.jsx(Xw,{onTaskClick:i,disabled:o,tasks:l})]})}const Kw=Object.freeze(Object.defineProperty({__proto__:null,default:Zw},Symbol.toStringTag,{value:"Module"}));function Qw({className:n="",onRetry:l,onStartNewSession:i,showRetryButton:o,startNewConnection:u,clearError:s,error:c,isConnected:f}){const{isOnline:m}=Wh(),[h,g]=P.useState(!0);return P.useEffect(()=>{if(!u&&!o&&!!c){g(!0);const b=setTimeout(()=>g(!1),5e3);return()=>clearTimeout(b)}g(!0)},[c,u,o]),u?O.jsx("div",{className:Ye("mx-4 mb-3 px-2 py-1 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:O.jsxs("div",{className:"flex items-center gap-3",children:[O.jsx("div",{className:"w-4 h-4 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:O.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),O.jsxs("div",{className:"flex-1",children:[O.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:c?.title??"Something went wrong"}),O.jsx("div",{className:"text-[#666666] text-xs mt-1",children:"Start a new session."})]}),O.jsxs("button",{onClick:()=>{s(),i?.()},className:"p-2 bg-[#3B71F7] text-white text-xs font-semibold rounded-lg hover:bg-[#2E5CD9] transition-colors flex items-center gap-2 flex-shrink-0",children:[O.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),O.jsx("span",{className:"text-xs font-semibold",children:"Start new chat"})]})]})}):o?O.jsx("div",{className:Ye("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:O.jsxs("div",{className:"flex items-center gap-3",children:[O.jsx("div",{className:"w-5 h-5 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:O.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),O.jsxs("div",{className:"flex-1",children:[O.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:c?.title??"Failed to connect"}),O.jsx("div",{className:"text-slate-500 text-xs mt-1",children:c?.description??"Please check your connection and try again"})]}),O.jsxs("button",{onClick:()=>{s(),l?.()},className:"px-4 py-2 bg-lavender-600 text-white text-sm font-semibold rounded-lg hover:bg-lavender-700 transition-colors flex items-center gap-2 flex-shrink-0",children:[O.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Retry"]})]})}):f&&m&&!c?.title||!u&&!o&&!h?null:O.jsx("div",{className:Ye("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FDD835] rounded-lg transition-opacity duration-500",n),children:O.jsxs("div",{className:"flex items-center gap-3",children:[O.jsx("div",{className:"w-5 h-5 bg-[#FDD835] rounded-full flex items-center justify-center flex-shrink-0",children:O.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),O.jsxs("div",{className:"flex-1",children:[O.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:m?c?.title||"Connecting...":"No internet connection"}),O.jsx("div",{className:"text-slate-500 text-xs mt-1",children:m?c?.description??"Please wait while we try to connect":"Please check your internet connection"})]}),!f&&O.jsx("div",{className:"flex-shrink-0",children:O.jsx("div",{className:"w-6 h-6 border-2 border-[#FDD835] border-t-transparent rounded-full animate-spin"})})]})})}const Jw=Object.freeze(Object.defineProperty({__proto__:null,ConnectionStatus:Qw},Symbol.toStringTag,{value:"Module"}));return hs.renderMedAssist=$h,Object.defineProperty(hs,Symbol.toStringTag,{value:"Module"}),hs})({});
|
|
56
|
+
`},u),s}function Q_(n,l){return n&&"run"in n?async function(i,o){const u=fp(i,{file:o,...l});await n.run(u,o)}:function(i,o){return fp(i,{file:o,...n||l})}}function dp(n){if(n)throw n}var bu,hp;function J_(){if(hp)return bu;hp=1;var n=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u=function(m){return typeof Array.isArray=="function"?Array.isArray(m):l.call(m)==="[object Array]"},s=function(m){if(!m||l.call(m)!=="[object Object]")return!1;var g=n.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&n.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!g&&!y)return!1;var v;for(v in m);return typeof v>"u"||n.call(m,v)},c=function(m,g){i&&g.name==="__proto__"?i(m,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):m[g.name]=g.newValue},f=function(m,g){if(g==="__proto__")if(n.call(m,g)){if(o)return o(m,g).value}else return;return m[g]};return bu=function h(){var m,g,y,v,b,w,E=arguments[0],T=1,_=arguments.length,A=!1;for(typeof E=="boolean"&&(A=E,E=arguments[1]||{},T=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});T<_;++T)if(m=arguments[T],m!=null)for(g in m)y=f(E,g),v=f(m,g),E!==v&&(A&&v&&(s(v)||(b=u(v)))?(b?(b=!1,w=y&&u(y)?y:[]):w=y&&s(y)?y:{},c(E,{name:g,newValue:h(A,w,v)})):typeof v<"u"&&c(E,{name:g,newValue:v}));return E},bu}var W_=J_();const vu=ms(W_);function Su(n){if(typeof n!="object"||n===null)return!1;const l=Object.getPrototypeOf(n);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function $_(){const n=[],l={run:i,use:o};return l;function i(...u){let s=-1;const c=u.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...u);function f(h,...m){const g=n[++s];let y=-1;if(h){c(h);return}for(;++y<u.length;)(m[y]===null||m[y]===void 0)&&(m[y]=u[y]);u=m,g?ew(g,f)(...m):c(null,...m)}}function o(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return n.push(u),l}}function ew(n,l){let i;return o;function o(...c){const f=n.length>c.length;let h;f&&c.push(u);try{h=n.apply(this,c)}catch(m){const g=m;if(f&&i)throw g;return u(g)}f||(h&&h.then&&typeof h.then=="function"?h.then(s,u):h instanceof Error?u(h):s(h))}function u(c,...f){i||(i=!0,l(c,...f))}function s(c){u(null,c)}}const Dn={basename:tw,dirname:nw,extname:rw,join:iw,sep:"/"};function tw(n,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');Ba(n);let i=0,o=-1,u=n.length,s;if(l===void 0||l.length===0||l.length>n.length){for(;u--;)if(n.codePointAt(u)===47){if(s){i=u+1;break}}else o<0&&(s=!0,o=u+1);return o<0?"":n.slice(i,o)}if(l===n)return"";let c=-1,f=l.length-1;for(;u--;)if(n.codePointAt(u)===47){if(s){i=u+1;break}}else c<0&&(s=!0,c=u+1),f>-1&&(n.codePointAt(u)===l.codePointAt(f--)?f<0&&(o=u):(f=-1,o=c));return i===o?o=c:o<0&&(o=n.length),n.slice(i,o)}function nw(n){if(Ba(n),n.length===0)return".";let l=-1,i=n.length,o;for(;--i;)if(n.codePointAt(i)===47){if(o){l=i;break}}else o||(o=!0);return l<0?n.codePointAt(0)===47?"/":".":l===1&&n.codePointAt(0)===47?"//":n.slice(0,l)}function rw(n){Ba(n);let l=n.length,i=-1,o=0,u=-1,s=0,c;for(;l--;){const f=n.codePointAt(l);if(f===47){if(c){o=l+1;break}continue}i<0&&(c=!0,i=l+1),f===46?u<0?u=l:s!==1&&(s=1):u>-1&&(s=-1)}return u<0||i<0||s===0||s===1&&u===i-1&&u===o+1?"":n.slice(u,i)}function iw(...n){let l=-1,i;for(;++l<n.length;)Ba(n[l]),n[l]&&(i=i===void 0?n[l]:i+"/"+n[l]);return i===void 0?".":aw(i)}function aw(n){Ba(n);const l=n.codePointAt(0)===47;let i=lw(n,!l);return i.length===0&&!l&&(i="."),i.length>0&&n.codePointAt(n.length-1)===47&&(i+="/"),l?"/"+i:i}function lw(n,l){let i="",o=0,u=-1,s=0,c=-1,f,h;for(;++c<=n.length;){if(c<n.length)f=n.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(u===c-1||s===1))if(u!==c-1&&s===2){if(i.length<2||o!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(h=i.lastIndexOf("/"),h!==i.length-1){h<0?(i="",o=0):(i=i.slice(0,h),o=i.length-1-i.lastIndexOf("/")),u=c,s=0;continue}}else if(i.length>0){i="",o=0,u=c,s=0;continue}}l&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+n.slice(u+1,c):i=n.slice(u+1,c),o=c-u-1;u=c,s=0}else f===46&&s>-1?s++:s=-1}return i}function Ba(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const ow={cwd:sw};function sw(){return"/"}function Eu(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function uw(n){if(typeof n=="string")n=new URL(n);else if(!Eu(n)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(n.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return cw(n)}function cw(n){if(n.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const l=n.pathname;let i=-1;for(;++i<l.length;)if(l.codePointAt(i)===37&&l.codePointAt(i+1)===50){const o=l.codePointAt(i+2);if(o===70||o===102){const u=new TypeError("File URL path must not include encoded / characters");throw u.code="ERR_INVALID_FILE_URL_PATH",u}}return decodeURIComponent(l)}const xu=["history","path","basename","stem","extname","dirname"];class mp{constructor(l){let i;l?Eu(l)?i={path:l}:typeof l=="string"||fw(l)?i={value:l}:i=l:i={},this.cwd="cwd"in i?"":ow.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<xu.length;){const s=xu[o];s in i&&i[s]!==void 0&&i[s]!==null&&(this[s]=s==="history"?[...i[s]]:i[s])}let u;for(u in i)xu.includes(u)||(this[u]=i[u])}get basename(){return typeof this.path=="string"?Dn.basename(this.path):void 0}set basename(l){wu(l,"basename"),_u(l,"basename"),this.path=Dn.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?Dn.dirname(this.path):void 0}set dirname(l){pp(this.basename,"dirname"),this.path=Dn.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?Dn.extname(this.path):void 0}set extname(l){if(_u(l,"extname"),pp(this.dirname,"extname"),l){if(l.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(l.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Dn.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){Eu(l)&&(l=uw(l)),wu(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?Dn.basename(this.path,this.extname):void 0}set stem(l){wu(l,"stem"),_u(l,"stem"),this.path=Dn.join(this.dirname||"",l+(this.extname||""))}fail(l,i,o){const u=this.message(l,i,o);throw u.fatal=!0,u}info(l,i,o){const u=this.message(l,i,o);return u.fatal=void 0,u}message(l,i,o){const u=new qt(l,i,o);return this.path&&(u.name=this.path+":"+u.name,u.file=this.path),u.fatal=!1,this.messages.push(u),u}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function _u(n,l){if(n&&n.includes(Dn.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+Dn.sep+"`")}function wu(n,l){if(!n)throw new Error("`"+l+"` cannot be empty")}function pp(n,l){if(!n)throw new Error("Setting `"+l+"` requires `path` to be set too")}function fw(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const dw=(function(n){const o=this.constructor.prototype,u=o[n],s=function(){return u.apply(s,arguments)};return Object.setPrototypeOf(s,o),s}),hw={}.hasOwnProperty;class Cu extends dw{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=$_()}copy(){const l=new Cu;let i=-1;for(;++i<this.attachers.length;){const o=this.attachers[i];l.use(...o)}return l.data(vu(!0,{},this.namespace)),l}data(l,i){return typeof l=="string"?arguments.length===2?(ku("data",this.frozen),this.namespace[l]=i,this):hw.call(this.namespace,l)&&this.namespace[l]||void 0:l?(ku("data",this.frozen),this.namespace=l,this):this.namespace}freeze(){if(this.frozen)return this;const l=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const u=i.call(l,...o);typeof u=="function"&&this.transformers.use(u)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const i=Jl(l),o=this.parser||this.Parser;return Tu("parse",o),o(String(i),i)}process(l,i){const o=this;return this.freeze(),Tu("process",this.parser||this.Parser),Au("process",this.compiler||this.Compiler),i?u(void 0,i):new Promise(u);function u(s,c){const f=Jl(l),h=o.parse(f);o.run(h,f,function(g,y,v){if(g||!y||!v)return m(g);const b=y,w=o.stringify(b,v);gw(w)?v.value=w:v.result=w,m(g,v)});function m(g,y){g||!y?c(g):s?s(y):i(void 0,y)}}}processSync(l){let i=!1,o;return this.freeze(),Tu("processSync",this.parser||this.Parser),Au("processSync",this.compiler||this.Compiler),this.process(l,u),yp("processSync","process",i),o;function u(s,c){i=!0,dp(s),o=c}}run(l,i,o){gp(l),this.freeze();const u=this.transformers;return!o&&typeof i=="function"&&(o=i,i=void 0),o?s(void 0,o):new Promise(s);function s(c,f){const h=Jl(i);u.run(l,h,m);function m(g,y,v){const b=y||l;g?f(g):c?c(b):o(void 0,b,v)}}}runSync(l,i){let o=!1,u;return this.run(l,i,s),yp("runSync","run",o),u;function s(c,f){dp(c),u=f,o=!0}}stringify(l,i){this.freeze();const o=Jl(i),u=this.compiler||this.Compiler;return Au("stringify",u),gp(l),u(l,o)}use(l,...i){const o=this.attachers,u=this.namespace;if(ku("use",this.frozen),l!=null)if(typeof l=="function")h(l,i);else if(typeof l=="object")Array.isArray(l)?f(l):c(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function s(m){if(typeof m=="function")h(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[g,...y]=m;h(g,y)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(m.plugins),m.settings&&(u.settings=vu(!0,u.settings,m.settings))}function f(m){let g=-1;if(m!=null)if(Array.isArray(m))for(;++g<m.length;){const y=m[g];s(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function h(m,g){let y=-1,v=-1;for(;++y<o.length;)if(o[y][0]===m){v=y;break}if(v===-1)o.push([m,...g]);else if(g.length>0){let[b,...w]=g;const E=o[v][1];Su(E)&&Su(b)&&(b=vu(!0,E,b)),o[v]=[m,b,...w]}}}}const mw=new Cu().freeze();function Tu(n,l){if(typeof l!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Au(n,l){if(typeof l!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function ku(n,l){if(l)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function gp(n){if(!Su(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function yp(n,l,i){if(!i)throw new Error("`"+n+"` finished async. Use `"+l+"` instead")}function Jl(n){return pw(n)?n:new mp(n)}function pw(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function gw(n){return typeof n=="string"||yw(n)}function yw(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const bw="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",bp=[],vp={allowDangerousHtml:!0},vw=/^(https?|ircs?|mailto|xmpp)$/i,Sw=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Ew(n){const l=xw(n),i=_w(n);return ww(l.runSync(l.parse(i),i),n)}function xw(n){const l=n.rehypePlugins||bp,i=n.remarkPlugins||bp,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...vp}:vp;return mw().use(t_).use(i).use(Q_,o).use(l)}function _w(n){const l=n.children||"",i=new mp;return typeof l=="string"&&(i.value=l),i}function ww(n,l){const i=l.allowedElements,o=l.allowElement,u=l.components,s=l.disallowedElements,c=l.skipHtml,f=l.unwrapDisallowed,h=l.urlTransform||Cw;for(const g of Sw)Object.hasOwn(l,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+bw+g.id,void 0);return up(n,m),F1(n,{Fragment:R.Fragment,components:u,ignoreInvalidStyle:!0,jsx:R.jsx,jsxs:R.jsxs,passKeys:!0,passNode:!0});function m(g,y,v){if(g.type==="raw"&&v&&typeof y=="number")return c?v.children.splice(y,1):v.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let b;for(b in iu)if(Object.hasOwn(iu,b)&&Object.hasOwn(g.properties,b)){const w=g.properties[b],E=iu[b];(E===null||E.includes(g.tagName))&&(g.properties[b]=h(String(w||""),b,g))}}if(g.type==="element"){let b=i?!i.includes(g.tagName):s?s.includes(g.tagName):!1;if(!b&&o&&typeof y=="number"&&(b=!o(g,y,v)),b&&v&&typeof y=="number")return f&&g.children?v.children.splice(y,1,...g.children):v.children.splice(y,1),y}}}function Cw(n){const l=n.indexOf(":"),i=n.indexOf("?"),o=n.indexOf("#"),u=n.indexOf("/");return l===-1||u!==-1&&l>u||i!==-1&&l>i||o!==-1&&l>o||vw.test(n.slice(0,l))?n:""}function Tw({text:n,maxWidth:l="200px",className:i="",icon:o,onClick:u,disabled:s=!1}){const[c,f]=P.useState(!1),h=P.useRef(null),m=P.useRef(null);return P.useEffect(()=>{const g=()=>{if(h.current&&m.current){const y=h.current.offsetWidth,v=m.current.scrollWidth;f(v>y)}};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[n,l]),n?R.jsxs("div",{ref:h,onClick:s?void 0:u,className:Ve("inline-flex items-center gap-2 rounded-full border border-lavender-200/60 bg-white/80 px-3 py-1 shadow-sm text-xs text-slate-700 hover: cursor-pointer",i,s?"opacity-50 cursor-not-allowed":""),style:{maxWidth:l},title:n,children:[o&&R.jsx("span",{className:"text-lavender-500",children:o}),R.jsx("div",{className:"pill-marquee-wrapper",children:R.jsx("span",{ref:m,className:Ve("block whitespace-normal",c?"pill-marquee":""),children:n})})]}):null}var Aw=Qf[" useInsertionEffect ".trim().toString()]||ur;function kw({prop:n,defaultProp:l,onChange:i=()=>{},caller:o}){const[u,s,c]=Nw({defaultProp:l,onChange:i}),f=n!==void 0,h=f?n:u;{const g=P.useRef(n!==void 0);P.useEffect(()=>{const y=g.current;if(y!==f){const v=y?"controlled":"uncontrolled",b=f?"controlled":"uncontrolled"}g.current=f},[f,o])}const m=P.useCallback(g=>{if(f){const y=Rw(g)?g(n):g;y!==n&&c.current?.(y)}else s(g)},[f,n,s,c]);return[h,m]}function Nw({defaultProp:n,onChange:l}){const[i,o]=P.useState(n),u=P.useRef(i),s=P.useRef(l);return Aw(()=>{s.current=l},[l]),P.useEffect(()=>{u.current!==i&&(s.current?.(i),u.current=i)},[i,u]),[i,o,s]}function Rw(n){return typeof n=="function"}function Ow(n){const l=P.useRef({value:n,previous:n});return P.useMemo(()=>(l.current.value!==n&&(l.current.previous=l.current.value,l.current.value=n),l.current.previous),[n])}function zw(n){const[l,i]=P.useState(void 0);return ur(()=>{if(n){i({width:n.offsetWidth,height:n.offsetHeight});const o=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const s=u[0];let c,f;if("borderBoxSize"in s){const h=s.borderBoxSize,m=Array.isArray(h)?h[0]:h;c=m.inlineSize,f=m.blockSize}else c=n.offsetWidth,f=n.offsetHeight;i({width:c,height:f})});return o.observe(n,{box:"border-box"}),()=>o.unobserve(n)}else i(void 0)},[n]),l}var Wl="Checkbox",[Mw]=ad(Wl),[Dw,Nu]=Mw(Wl);function jw(n){const{__scopeCheckbox:l,checked:i,children:o,defaultChecked:u,disabled:s,form:c,name:f,onCheckedChange:h,required:m,value:g="on",internal_do_not_use_render:y}=n,[v,b]=kw({prop:i,defaultProp:u??!1,onChange:h,caller:Wl}),[w,E]=P.useState(null),[T,_]=P.useState(null),A=P.useRef(!1),j=w?!!c||!!w.closest("form"):!0,B={checked:v,disabled:s,setChecked:b,control:w,setControl:E,name:f,form:c,value:g,hasConsumerStoppedPropagationRef:A,required:m,defaultChecked:mr(u)?!1:u,isFormControl:j,bubbleInput:T,setBubbleInput:_};return R.jsx(Dw,{scope:l,...B,children:Lw(y)?y(B):o})}var Sp="CheckboxTrigger",Ep=P.forwardRef(({__scopeCheckbox:n,onKeyDown:l,onClick:i,...o},u)=>{const{control:s,value:c,disabled:f,checked:h,required:m,setControl:g,setChecked:y,hasConsumerStoppedPropagationRef:v,isFormControl:b,bubbleInput:w}=Nu(Sp,n),E=Hn(u,g),T=P.useRef(h);return P.useEffect(()=>{const _=s?.form;if(_){const A=()=>y(T.current);return _.addEventListener("reset",A),()=>_.removeEventListener("reset",A)}},[s,y]),R.jsx(sr.button,{type:"button",role:"checkbox","aria-checked":mr(h)?"mixed":h,"aria-required":m,"data-state":Tp(h),"data-disabled":f?"":void 0,disabled:f,value:c,...o,ref:E,onKeyDown:qn(l,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:qn(i,_=>{y(A=>mr(A)?!0:!A),w&&b&&(v.current=_.isPropagationStopped(),v.current||_.stopPropagation())})})});Ep.displayName=Sp;var Ru=P.forwardRef((n,l)=>{const{__scopeCheckbox:i,name:o,checked:u,defaultChecked:s,required:c,disabled:f,value:h,onCheckedChange:m,form:g,...y}=n;return R.jsx(jw,{__scopeCheckbox:i,checked:u,defaultChecked:s,disabled:f,required:c,onCheckedChange:m,name:o,form:g,value:h,internal_do_not_use_render:({isFormControl:v})=>R.jsxs(R.Fragment,{children:[R.jsx(Ep,{...y,ref:l,__scopeCheckbox:i}),v&&R.jsx(Cp,{__scopeCheckbox:i})]})})});Ru.displayName=Wl;var xp="CheckboxIndicator",_p=P.forwardRef((n,l)=>{const{__scopeCheckbox:i,forceMount:o,...u}=n,s=Nu(xp,i);return R.jsx(fi,{present:o||mr(s.checked)||s.checked===!0,children:R.jsx(sr.span,{"data-state":Tp(s.checked),"data-disabled":s.disabled?"":void 0,...u,ref:l,style:{pointerEvents:"none",...n.style}})})});_p.displayName=xp;var wp="CheckboxBubbleInput",Cp=P.forwardRef(({__scopeCheckbox:n,...l},i)=>{const{control:o,hasConsumerStoppedPropagationRef:u,checked:s,defaultChecked:c,required:f,disabled:h,name:m,value:g,form:y,bubbleInput:v,setBubbleInput:b}=Nu(wp,n),w=Hn(i,b),E=Ow(s),T=zw(o);P.useEffect(()=>{const A=v;if(!A)return;const j=window.HTMLInputElement.prototype,U=Object.getOwnPropertyDescriptor(j,"checked").set,z=!u.current;if(E!==s&&U){const H=new Event("click",{bubbles:z});A.indeterminate=mr(s),U.call(A,mr(s)?!1:s),A.dispatchEvent(H)}},[v,E,s,u]);const _=P.useRef(mr(s)?!1:s);return R.jsx(sr.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??_.current,required:f,disabled:h,name:m,value:g,form:y,...l,tabIndex:-1,ref:w,style:{...l.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Cp.displayName=wp;function Lw(n){return typeof n=="function"}function mr(n){return n==="indeterminate"}function Tp(n){return mr(n)?"indeterminate":n?"checked":"unchecked"}const Ou=P.forwardRef(({className:n,...l},i)=>R.jsx(Ru,{ref:i,className:Ve("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",n),...l,children:R.jsx(_p,{className:Ve("grid place-content-center text-current"),children:R.jsx(Kd,{className:"h-4 w-4"})})}));Ou.displayName=Ru.displayName;var Gr=(n=>(n.NOTA="none_of_the_above",n.AOTA="all_of_the_above",n))(Gr||{});function Iw({options:n,selectedValues:l,onSelectionChange:i,additionalOption:o,className:u,required:s=!0,maxSelections:c,error:f,disabled:h}){const m=o?{id:`extra-${o}`,label:o==="all_of_the_above"?"All of the above":"None of the above",value:o==="all_of_the_above"?"All of the above":"None of the above"}:{id:"extra-None of the above",label:"None of the above",value:"None of the above"},g=_=>m?_.filter(A=>A!==m.value):_,y=_=>m?o==="none_of_the_above"?_?[m.value]:[]:o==="all_of_the_above"?_?[...n.map(A=>A.value),m.value]:g(l):_?[...l,m.value]:g(l):l,v=(_,A)=>{const j=m?g(l):l;return A?c&&j.length>=c?null:[...j,_]:j.filter(B=>B!==_)},b=_=>!(s&&_.length===0&&l.length===1),w=(_,A)=>{const B=m&&_===m.value?y(A):v(_,A);B!==null&&b(B)&&i(B)},E=!s||l.length>0,T=m?l.filter(_=>_!==m.value).length:l.length;return n.length?R.jsxs("div",{className:Ve("bg-gray-50","rounded-lg","p-4","border border-gray-200",u),children:[R.jsxs("div",{className:"space-y-3",children:[n.map(_=>{const A=h||c&&T>=c&&!l.includes(_.value);return R.jsxs("div",{className:"flex items-center space-x-3",children:[R.jsx(Ou,{id:_.id,checked:!!l.includes(_.value),disabled:!!A,onCheckedChange:j=>w(_.value,!!j),className:"mt-0.5 border border-muted-foreground"}),R.jsx("label",{htmlFor:_.id,className:Ve("text-sm font-medium leading-none cursor-pointer",A?"text-muted-foreground cursor-not-allowed":"text-secondary-foreground"),children:_.label})]},_.id)}),m&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"border-t border-gray-300 my-3"}),R.jsxs("div",{className:"flex items-center space-x-3",children:[R.jsx(Ou,{id:m.id,checked:l.includes(m.value),onCheckedChange:_=>w(m.value,_),className:"mt-0.5 border border-muted-foreground"}),R.jsx("label",{htmlFor:m.id,className:"text-sm font-medium leading-none cursor-pointer text-secondary-foreground",children:m.label})]})]})]}),f&&R.jsx("p",{className:"text-sm text-red-500 mt-3",children:f}),s&&!E&&R.jsx("p",{className:"text-sm text-red-500 mt-3",children:"Please select at least one option"}),c&&T>=c&&R.jsx("p",{className:"text-sm text-blue-600 mt-3",children:c===1?"You can select only 1 option":`Maximum ${c} selections allowed`})]}):null}function Ap({file:n,onRemove:l,isPreview:i=!0,className:o=""}){const[u,s]=P.useState(!1),[c,f]=P.useState(""),h=n?.type?.startsWith("image/")??!1,m=n?.type==="application/pdf";P.useEffect(()=>{if(h){const v=URL.createObjectURL(n);return f(v),()=>URL.revokeObjectURL(v)}},[n,h]),P.useEffect(()=>{s(!1)},[n]);const g=()=>h?"text-green-600":"text-gray-600",y=v=>{if(v===0)return"0 B";const b=1024,w=["B","KB","MB","GB"],E=Math.floor(Math.log(v)/Math.log(b));return`${(v/Math.pow(b,E)).toFixed(1)} ${w[E]}`.toLowerCase()};return!h||u?R.jsxs("div",{className:`relative group inline-flex flex-shrink-0 bg-white border border-neutral-300 rounded-lg flex items-center gap-3 px-3 py-2.5 max-w-full ${i?"hover:bg-neutral-50":""} ${o}`,children:[R.jsx("div",{className:`flex-shrink-0 ${g()}`,children:R.jsx(yS,{className:"h-5 w-5"})}),R.jsxs("div",{className:"flex-1 min-w-0 max-w-[200px]",children:[n?.name&&R.jsx("div",{className:"text-sm font-medium text-[var(--color-foreground)] truncate",children:n.name}),n?.size&&R.jsx("div",{className:"text-xs text-[var(--color-muted-foreground)]",children:y(n.size)})]}),i&&l&&R.jsx("button",{onClick:l,"aria-label":`Remove ${n.name}`,className:"flex-shrink-0 flex items-center justify-center w-5 h-5 text-[var(--color-muted-foreground)] hover:text-[var(--color-foreground)] transition-colors",children:R.jsx(Os,{className:"h-4 w-4"})})]}):R.jsxs("div",{className:`relative group flex-shrink-0 ${o}`,children:[R.jsx("div",{className:`w-20 h-20 bg-white border border-neutral-300 rounded-lg flex items-center justify-center overflow-hidden ${i?"hover:bg-neutral-100 cursor-pointer":""}`,children:c&&R.jsx("img",{src:c,alt:n.name,className:"w-full h-full object-cover",onError:()=>s(!0)})}),i&&l&&R.jsx("button",{onClick:l,"aria-label":`Remove ${n.name}`,className:"absolute top-0 right-0 bg-[var(--color-muted)] text-black rounded-full w-5 h-5 flex items-center justify-center hover:bg-[var(--color-muted-foreground)] transition-colors z-10 transform translate-x-1 -translate-y-1",children:R.jsx(Os,{className:"h-3 w-3 text-black"})})]})}function Bw({files:n,onRemoveFile:l,isPreview:i=!0,className:o=""}){if(n.length===0)return null;const u=n.filter(c=>c.type?.startsWith("image/")),s=n.filter(c=>!c.type?.startsWith("image/"));return R.jsxs("div",{className:`flex flex-wrap justify-end gap-2 max-w-full ${o}`,children:[s.map(c=>{const f=n.indexOf(c);return R.jsx(Ap,{file:c,onRemove:l?()=>l(f):void 0,isPreview:i},`${c.name}-${c.size}-${f}`)}),u.length>0&&R.jsx("div",{className:"flex gap-2 overflow-x-auto max-w-full p-1 scrollbar-hide",children:u.map(c=>{const f=n.indexOf(c);return R.jsx(Ap,{file:c,onRemove:l?()=>l(f):void 0,isPreview:i},`${c.name}-${c.size}-${f}`)})})]})}function Uw({value:n,onValueChange:l,placeholder:i="Select an option",className:o,triggerClassName:u,contentClassName:s,disabled:c=!1,options:f=[],size:h="default"}){const[m,g]=P.useState(!1),y=P.useRef(null),v=P.useRef(null),b=f.find(T=>T.value===n);P.useEffect(()=>{const T=_=>{m&&_.key==="Escape"&&(g(!1),v.current?.focus())};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[m]);const w=T=>{l?.(T),g(!1),v.current?.focus()},E=()=>{c||g(!m)};return R.jsxs("div",{className:Ve("relative w-full",o),children:[R.jsxs("button",{ref:v,type:"button",onClick:E,disabled:c,className:Ve('border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*="text-"])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 overflow-hidden',h==="default"?"min-h-9":"min-h-8",u),"aria-expanded":m,"aria-haspopup":"listbox",children:[R.jsx("span",{className:Ve("flex-1 text-left min-w-0 overflow-hidden break-words line-clamp-2",!b&&"text-muted-foreground"),children:b?b.label:i}),R.jsx(Rs,{className:Ve("size-4 opacity-50 pointer-events-none shrink-0 transition-transform duration-200",m&&"rotate-180")})]}),m&&R.jsx("div",{ref:y,className:Ve("bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 relative z-50 max-h-[300px] min-w-[8rem] w-full overflow-x-hidden overflow-y-auto rounded-md shadow-md mt-1",s),role:"listbox",children:R.jsx("div",{className:"p-1",children:f.length===0?R.jsx("div",{className:"px-3 py-2 text-sm text-muted-foreground text-center",children:"No options available"}):f.map(T=>{const _=T.value===n;return R.jsxs("div",{onClick:()=>w(T.value),className:Ve("relative flex w-full cursor-pointer items-center gap-1 rounded-sm py-2.5 px-3 text-sm outline-none select-none transition-colors duration-150","hover:bg-accent hover:text-accent-foreground","focus-visible:bg-accent focus-visible:text-accent-foreground","active:bg-accent/80",_&&"bg-accent/50 text-foreground",c&&"pointer-events-none opacity-50 cursor-not-allowed"),role:"option","aria-selected":_,tabIndex:c?-1:0,onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),c||w(T.value))},children:[R.jsx("span",{className:"flex-1 text-left min-w-0 break-words line-clamp-2",children:T.label}),_&&R.jsx("span",{className:"absolute right-3 flex size-4 items-center justify-center shrink-0 pointer-events-none",children:R.jsx(Kd,{className:"size-4 text-foreground"})})]},T.value)})})})]})}const Hw=n=>n?n.split(" ").map(l=>l[0]).slice(0,2).join("").toUpperCase():"DR",kp=n=>{const l=n.toLocaleDateString(void 0,{weekday:"short"}).toUpperCase(),i=n.toLocaleDateString(void 0,{day:"2-digit"});return{weekday:l,dayNum:i}},Np=n=>[...n].sort((l,i)=>new Date(l.date).getTime()-new Date(i.date).getTime()),Rp=(n,l)=>(n?.[l]?.slots_details?.length??0)>0;function qw({doctor:n,availability:l,callbacks:i,onBook:o,disabled:u=!1,getAvailabilityDatesForAppointment:s,getAvailableSlotsForAppointment:c}){const[f,h]=P.useState(!1),[m,g]=P.useState(0),[y,v]=P.useState(null),[b,w]=P.useState(0),[E,T]=P.useState(()=>n.hospitals[0]||null),[_,A]=P.useState(!0),[j,B]=P.useState(!1),[U,z]=P.useState(null),[H,Y]=P.useState(!1),[F,$]=P.useState(null),ae=Yr(Se=>Se.sessionId),M=E?.hospital_id,ne=!!i?.[Pe.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES],C=!!i?.[Pe.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_SLOTS],X=P.useMemo(()=>{if(!M)return l||null;const Se=U?.[M],Me=l?.[M];return Se?{...l||{},[M]:Se}:Me?l:l||null},[U,l,M]),Z=P.useCallback(async()=>{if(!(!n.doctor_id||!ae||!M)){A(!0),$(null);try{const Se=await s({doctor_id:n.doctor_id,hospital_id:M,region_id:E?.region_id||""}),Me=Se?.available_dates?.length&&Se?.available_dates?.map(G=>({date:G,slots:[]}))||[],ye=l?.[M]?.slots_details||[],S=U?.[M]?.slots_details||[],J=new Map;ye.forEach(G=>{J.set(G.date,G)}),S.forEach(G=>{J.set(G.date,G)});const I=[...Array.from(J.values())];Me.forEach(G=>{J.has(G.date)||I.push(G)});const D=Np(I);z(G=>({...G||{},[M]:{slots_details:D}}))}catch{$("Failed to load availability dates")}finally{A(!1)}}},[n.doctor_id,ae,M,E?.region_id,s,l,U]);P.useEffect(()=>{if(!M)return;const Se=Rp(U,M),Me=Rp(l??null,M);Y(!1),g(0),w(0),v(null),$(null),!Se&&!Me&&ne&&ae?Z():A(!1)},[M]);const K=P.useMemo(()=>{if(!M)return new Date;const Se=X?.[M]?.slots_details;if(!Se?.length)return new Date;const Me=Se[0];return Me?new Date(Me.date):new Date},[X,M]),oe=P.useCallback(async Se=>{if(!(!n.doctor_id||!M||!E?.region_id||!ae)){B(!0);try{const Me=await c(Se,{doctor_id:n.doctor_id,hospital_id:M,region_id:E.region_id});if(!Me?.slots?.length)return;z(ye=>{if(!ye||!ye?.[M]?.slots_details?.length)return{...ye||{},[M]:{slots_details:[{date:Se,slots:Me.slots}]}};const S=ye[M].slots_details.map(I=>I.date===Se?{...I,slots:Me.slots}:I),ee=ye[M].slots_details.some(I=>I.date===Se)?S:[...S,{date:Se,slots:Me.slots}];return{...ye,[M]:{slots_details:Np(ee)}}})}catch{$("Failed to load slots")}finally{B(!1)}}},[n.doctor_id,M,E?.region_id,ae,c]);P.useEffect(()=>{if(!M||H||_)return;const Se=X?.[M],Me=Se?.slots_details||[];if(M&&Me.length>0&&!H){let ye=0;const S=Se?.selected_date||l?.[M]?.selected_date;if(S){const ee=Me.findIndex(I=>I.date===S);ee>=0&&(ye=ee)}else{const ee=l?.[M]?.slots_details||[],I=Me.findIndex(D=>{const G=ee.find(he=>he.date===D.date);return G?.slots&&G.slots.length>0});I>=0&&(ye=I)}g(ye),w(Math.floor(ye/3)*3);const J=Me[ye];J&&(!J?.slots||J.slots.length===0)&&C&&ae&&oe(J.date)}},[X,M,l,H,_]);const de=P.useMemo(()=>{const Se=M?X?.[M]?.slots_details:null;if(Se?.length){const ye=Math.max(0,Math.floor(b/3)*3),S=Math.min(Se.length,ye+3);return Se.slice(ye,S).map(J=>{const ee=new Date(J.date),{weekday:I,dayNum:D}=kp(ee);return{weekday:I,dayNum:D,date:J.date,hasAvailability:!0,fullDate:ee,hasSlots:!!(J.slots&&J.slots.length>0)}})}const Me=new Date(K);return Me.setDate(Me.getDate()+b),Array.from({length:3},(ye,S)=>{const J=new Date(Me);J.setDate(Me.getDate()+S);const{weekday:ee,dayNum:I}=kp(J),D=J.toISOString().split("T")[0];return{weekday:ee,dayNum:I,date:D,hasAvailability:!1,fullDate:J,hasSlots:!1}})},[K,b,X,M]),L=P.useMemo(()=>(M?X?.[M]?.slots_details:null)?.[m]||null,[X,M,m]),k=P.useMemo(()=>Hw(n.name),[n.name]),q=P.useCallback(()=>{Y(!0),w(Se=>Math.max(0,Se-3)),v(null)},[]),N=P.useCallback(()=>{Y(!0);const Se=M?X?.[M]?.slots_details:null,Me=Se?.length?Math.max(0,Se.length-3):0;w(ye=>Math.min(Me,ye+3)),v(null)},[M,X]),re=P.useCallback(Se=>{Y(!0);const Me=M?X?.[M]?.slots_details:null,ye=Me?.findIndex(J=>J.date===Se)??-1;ye>=0&&g(ye),v(null);const S=Me?.find(J=>J.date===Se);C&&(!S?.slots||S.slots.length===0)&&n.doctor_id&&M&&E?.region_id&&ae&&oe(Se)},[M,X,C,n.doctor_id,E?.region_id]),ce=P.useMemo(()=>b>0,[b]),we=P.useMemo(()=>{const Se=M?X?.[M]?.slots_details:null;if(!Se||Se.length===0)return!1;const Me=Math.max(0,Se.length-3);return b<Me},[b,X,M]),Ae=P.useCallback(()=>{o&&L&&y&&o({date:L.date,time:y,doctorData:{doctor:n,hospital_id:M||"",region_id:E?.region_id||""}})},[o,L,y,n,M,E?.region_id]),Ne=P.useMemo(()=>n.hospitals.map(Se=>({value:Se.hospital_id,label:Se.name})),[n.hospitals]),ke=P.useCallback(Se=>{v(Se)},[]),He=P.useCallback(Se=>{const Me=n.hospitals.find(ye=>ye.hospital_id===Se);Me&&T(Me)},[n.hospitals]);return R.jsxs(da,{className:"max-w-md rounded-xl border-lavender-200 shadow-md p-0 bg-white overflow-hidden","aria-label":"Appointment card",children:[R.jsx(Jd,{className:"flex flex-row items-center justify-between gap-3 bg-lavender-50 rounded-t-xl p-4 border-b border-lavender-100 overflow-hidden",children:R.jsxs("div",{className:"flex items-center gap-3",children:[n.profile_pic&&R.jsxs(ha,{className:"h-12 w-12 ring-2 ring-lavender-200",children:[R.jsx(fh,{src:n.profile_pic,alt:`${n.name} profile photo`,crossOrigin:"anonymous"}),R.jsx(ma,{className:"bg-lavender-100 text-lavender-700",children:k})]}),R.jsxs("div",{className:"min-w-0",children:[R.jsxs("div",{className:"flex flex-wrap items-baseline gap-2",children:[R.jsx("h3",{className:" text-base font-bold text-slate-900",children:n.name}),n.profile_link?R.jsx("a",{href:n.profile_link,target:"_blank",rel:"noreferrer",className:"text-xs font-semibold text-lavender-600 hover:text-lavender-700 hover:underline",children:"View profile"}):null]}),R.jsxs("p",{className:"mt-0.5 text-sm text-slate-600",children:[n.specialty,n.experience&&R.jsxs(R.Fragment,{children:[" • ",n.experience]})]})]})]})}),R.jsxs(Wd,{className:"px-4 py-2",children:[R.jsxs("div",{className:"grid gap-2 border-b border-lavender-100 pb-3",children:[n?.timings&&R.jsxs("div",{className:"flex items-start gap-2 text-sm text-slate-900",children:[R.jsx(gS,{className:"h-4 w-4 text-lavender-600 mt-0.5 flex-shrink-0","aria-hidden":!0}),R.jsx("span",{className:"text-slate-600 text-xs",children:n?.timings})]}),n.languages?R.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[R.jsx(bS,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),R.jsx("span",{className:"text-slate-600",children:n.languages})]}):null,n?.hospitals&&n.hospitals?.length>1?E&&E.name&&R.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[R.jsx(Zd,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),R.jsx(Uw,{options:Ne,placeholder:"Select Hospital",disabled:u,onValueChange:He,value:E?.hospital_id||""})]}):E&&E.name&&R.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[R.jsx(Zd,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),R.jsx("span",{className:"text-slate-600",children:E.name})]})]}),E?.hospital_id&&X?.[E?.hospital_id]?.slots_details?.length||i?.[Pe.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES]||_?R.jsx(kt,{type:"button",variant:"outline","aria-expanded":f,"aria-controls":"ap-slots",onClick:()=>h(Se=>!Se),disabled:_,className:"mt-3 w-full border-lavender-500 text-lavender-600 hover:bg-lavender-50 hover:border-lavender-600 disabled:opacity-50",children:_?R.jsxs(R.Fragment,{children:[R.jsx(Qd,{className:"h-4 w-4 mr-2 animate-spin"}),"Loading availability..."]}):R.jsxs(R.Fragment,{children:[R.jsx("span",{className:"mr-1",children:f?"Hide slots":"Show available slots"}),R.jsx(Rs,{className:`h-4 w-4 transition-transform ${f?"rotate-180":""}`,"aria-hidden":!0})]})}):R.jsx("div",{className:"mt-3 w-full flex items-center justify-center py-3 px-4 bg-lavender-50 border border-lavender-200 rounded-lg",children:R.jsx("span",{className:"text-sm text-slate-600 font-medium",children:"No details available"})}),f&&E?.hospital_id&&X?.[E?.hospital_id]?.slots_details?.length&&R.jsx("div",{id:"ap-slots",role:"region","aria-label":"Available slots",className:"pt-3",children:X?.[E?.hospital_id??""]?.slots_details?.length?R.jsxs(R.Fragment,{children:[R.jsxs("div",{className:"flex items-center gap-2 px-0.5",children:[R.jsx(kt,{type:"button",variant:"outline",size:"icon",onClick:q,"aria-label":"Previous 3 days",disabled:u||!ce,className:"h-8 w-8 flex-shrink-0 rounded-md border-lavender-200 bg-white text-lavender-700 hover:bg-lavender-50 hover:border-lavender-300 disabled:opacity-50",children:R.jsx(mS,{className:"h-4 w-4"})}),R.jsx("div",{className:"flex-1 grid grid-cols-3 gap-1 min-w-0",children:de.map((Se,Me)=>{const ye=L?.date===Se.date,S=!Se.hasAvailability;return R.jsxs(kt,{type:"button",variant:"outline",onClick:()=>!S&&re(Se.date),disabled:S||u,"aria-current":ye?"date":void 0,className:["flex flex-col items-center justify-center h-12 rounded-lg border-2 p-2 gap-0.5 min-w-0 transition-all",ye?"border-lavender-500 ring-2 ring-lavender-200 bg-lavender-50 shadow-sm":S?"border-slate-200 bg-slate-50 text-slate-300 cursor-not-allowed":"border-slate-200 bg-white hover:bg-lavender-50 hover:border-lavender-300"].join(" "),children:[R.jsx("span",{className:["text-[10px] tracking-wide w-full text-center font-medium",ye?"text-lavender-700":S?"text-slate-300":"text-slate-600"].join(" "),children:Se.weekday}),R.jsx("span",{className:["text-xs font-bold w-full text-center",ye?"text-lavender-700":S?"text-slate-300":"text-slate-900"].join(" "),children:Se.dayNum})]},`${Se.date}-${Me}`)})}),R.jsx(kt,{type:"button",variant:"outline",size:"icon",onClick:N,"aria-label":"Next 3 days",disabled:u||!we,className:"h-8 w-8 flex-shrink-0 rounded-md border-lavender-200 bg-white text-lavender-700 hover:bg-lavender-50 hover:border-lavender-300 disabled:opacity-50",children:R.jsx(pS,{className:"h-4 w-4"})})]}),R.jsx("div",{className:"px-0.5 py-3",children:j?R.jsxs("div",{className:"flex items-center justify-center py-4",children:[R.jsx(Qd,{className:"h-4 w-4 animate-spin text-lavender-600 mr-2"}),R.jsx("span",{className:"text-sm text-slate-600",children:"Loading slots..."})]}):L?.slots?.length?R.jsx("div",{className:"grid grid-cols-2 gap-2 max-h-48 overflow-y-auto",children:L.slots.map((Se,Me)=>{const ye=y===Se;return R.jsxs(kt,{type:"button",variant:"outline",onClick:()=>ke(Se),"aria-pressed":ye,disabled:u,className:["inline-flex h-9 items-center justify-center gap-2 rounded-lg px-3 text-xs font-semibold transition-all",ye?"border-lavender-600 bg-lavender-600 text-white shadow-sm hover:bg-lavender-700 hover:border-lavender-700":"border-lavender-200 bg-white text-slate-900 hover:bg-lavender-50 hover:border-lavender-300"].join(" "),children:[R.jsx(hS,{className:`h-3.5 w-3.5 flex-shrink-0${ye?"text-white":"text-lavender-600"}`}),R.jsx("span",{className:"truncate",children:Se})]},Se||`slot-${Me}`)})}):R.jsx("p",{className:"px-1 text-sm text-slate-600",children:"No slots available for this day."})}),R.jsx("div",{className:"px-0.5 pb-1.5",children:R.jsxs(kt,{type:"button",onClick:Ae,disabled:!y||u,"aria-disabled":!y,className:"w-full h-10 gap-2 bg-lavender-600 text-white hover:bg-lavender-700 disabled:opacity-60 shadow-sm font-semibold",children:["Book appointment",R.jsx(dS,{className:"h-4 w-4"})]})})]}):R.jsx("div",{className:"px-1 pb-2 pt-1",children:R.jsx("p",{className:"text-sm text-slate-600",children:F||"No availability provided."})})}),f&&!X?.[E?.hospital_id??""]?.slots_details?.length&&R.jsx("div",{className:"px-1 pb-2 pt-1",children:R.jsx("p",{className:"text-sm text-slate-600",children:F||"No availability provided."})})]})]})}function Pw({callTool:n,doctorDetails:l,callbacks:i,onBook:o,disabled:u=!1}){const[s,c]=P.useState([]),[f,h]=P.useState(!1),[m,g]=P.useState(0),[y,v]=P.useState(null),b=Yr(z=>z.sessionId),w=l.doctor_ids||[],E=w.length,T=Math.min(3,E),_=E-T;P.useEffect(()=>{if(w.length===0||!b)return;(async()=>{h(!0),v(null);try{const Y=w.slice(0,T).map(ae=>n(Pe.SYNAPSE_TOOL_NAME.DOCTOR_DETAILS,{doctor_id:ae})),F=await Promise.allSettled(Y),$=[];F.forEach((ae,M)=>{ae.status==="fulfilled"&&$.push(ae.value)}),c($),g($.length)}catch{v("Failed to load doctor details. Please try again.")}finally{h(!1)}})()},[w,b,T]);const A=async()=>{if(!(m>=E||!b)){h(!0),v(null);try{const H=w.slice(m).map($=>n(Pe.SYNAPSE_TOOL_NAME.DOCTOR_DETAILS,{doctor_id:$})),Y=await Promise.allSettled(H),F=[];Y.forEach(($,ae)=>{$.status==="fulfilled"&&F.push($.value)}),c($=>[...$,...F]),g($=>$+F.length)}catch{v("Failed to load more doctor details. Please try again.")}finally{h(!1)}}},j=z=>{o&&o(z)},B=async z=>{const H=i?.[Pe.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES].tool_name||Pe.SYNAPSE_TOOL_NAME.AVAILABILITY_DATES;return await n(H,{doctor_id:z.doctor_id,hospital_id:z.hospital_id,region_id:z.region_id})},U=async(z,H)=>{const Y=i?.[Pe.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_SLOTS].tool_name||Pe.SYNAPSE_TOOL_NAME.AVAILABILITY_SLOTS;return await n(Y,{appointment_date:z,doctor_id:H.doctor_id,hospital_id:H.hospital_id,region_id:H.region_id})};return f&&s.length===0?R.jsx("div",{className:"flex items-center justify-center py-8",children:R.jsxs("div",{className:"text-center",children:[R.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[var(--color-primary)] mx-auto mb-3"}),R.jsx("p",{className:"text-sm text-gray-500",children:"Loading doctor details..."})]})}):y&&s.length===0?R.jsx("div",{className:"flex items-center justify-center py-8",children:R.jsxs("div",{className:"text-center",children:[R.jsx("p",{className:"text-sm text-red-500 mb-2",children:y}),R.jsx(kt,{variant:"outline",size:"sm",onClick:()=>{v(null),w.length>0&&b&&(async()=>{h(!0);try{const Y=w.slice(0,T).map(ae=>n(Pe.SYNAPSE_TOOL_NAME.DOCTOR_DETAILS,{doctor_id:ae})),F=await Promise.allSettled(Y),$=[];F.forEach((ae,M)=>{ae.status==="fulfilled"&&$.push(ae.value)}),c($),g($.length)}catch{v("Failed to load doctor details. Please try again.")}finally{h(!1)}})()},children:"Retry"})]})}):s.length===0?R.jsx("div",{className:"flex items-center justify-center py-2",children:R.jsx("p",{className:"text-sm text-gray-500",children:"No doctor details available."})}):R.jsxs("div",{className:"space-y-4",children:[R.jsx("div",{className:"space-y-4",children:s.map((z,H)=>z?.doctor_id&&R.jsx(qw,{doctor:z,availability:l.availability,callbacks:i,onBook:j,disabled:u,getAvailabilityDatesForAppointment:B,getAvailableSlotsForAppointment:U},`${H}`))}),m<E&&R.jsx("div",{className:"flex justify-center",children:R.jsx(kt,{variant:"outline",onClick:A,disabled:f,className:"px-6 py-2",children:f?R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-[var(--color-primary)] mr-2"}),"Loading more doctors..."]}):`Show more (${_} more)`})}),y&&s.length>0&&R.jsxs("div",{className:"text-center",children:[R.jsx("p",{className:"text-sm text-red-500 mb-2",children:y}),R.jsx(kt,{variant:"outline",size:"sm",onClick:A,disabled:f,children:"Retry loading more"})]})]})}function Fw({role:n,content:l,timestamp:i,iconUrl:o,files:u,isLastMessage:s,progressMessage:c,toolEscalationData:f,toolCallStatus:h,callTool:m,onSendMessage:g}){const y=n==="user",[v,b]=P.useState([]),w=async B=>{const U=Date.now().toString();await g({message:B,messageId:U,toolCalled:!0})},E=async B=>{await g({message:`I want to book an appointment for ${B.doctorData?.doctor?.name||"the doctor"} on ${B.date} for ${B.time}`,toolCalled:!0})},T=B=>{b(B)},_=()=>{if(!f?.details?.input?.additional_option)return;const B=f.details?.input?.additional_option;if(typeof B=="string"&&(B===Gr.NOTA||B===Gr.AOTA))return B;if(typeof B=="object"&&B!==null){if(B.NOTA===Gr.NOTA)return Gr.NOTA;if(B.AOTA===Gr.AOTA)return Gr.AOTA}},A=()=>{const B=f?.details?.input?.options;return B?Array.isArray(B)?B.map((U,z)=>({id:`option-${z}`,label:U.label,value:U.value})):Object.keys(B).map((U,z)=>({id:`option-${z}`,label:U,value:U})):[]},j=async()=>{if(v.length>0){const B=v.join(", "),U=Date.now().toString();await g({message:B,messageId:U,toolCalled:!0})}};return R.jsx("div",{className:Ve("flex",y?"justify-end":"justify-start"),children:R.jsxs("div",{className:Ve("flex gap-3",y?"flex-row-reverse":"flex-row",f?.details?.component===Pe.SYNAPSE_COMPONENTS.MULTI?"max-w-md":y?"max-w-[60%]":"max-w-xs"),children:[!y&&R.jsx(ha,{className:"w-8 h-8 bg-gradient-to-br from-lavender-400 to-lavender-500 text-white text-xs font-bold flex-shrink-0",children:R.jsx(ma,{className:"bg-transparent text-white text-xs font-bold",children:o?R.jsx("img",{src:o,alt:"Bot Icon",className:"w-full h-full"}):R.jsx(Xd,{className:"w-full h-full"})})}),R.jsxs(da,{className:Ve("px-4 py-2 rounded-2xl shadow-none break-words overflow-wrap-anywhere whitespace-pre-wrap",y?"bg-lavender-100/95 backdrop-blur-md text-slate-900 rounded-br-none border border-lavender-200/60":"bg-white/80 backdrop-blur-md text-slate-800 shadow-sm rounded-bl-none border border-lavender-200/40",f&&"w-full"),children:[h&&!y&&R.jsx("div",{className:"text-xs text-slate-500 mb-2 pb-2 border-b border-slate-200",children:h}),!h&&c&&!y&&s&&R.jsx("p",{className:"text-sm font-medium text-slate-500 pb-2",children:c}),l&&R.jsx("div",{className:"text-sm markdown-content mb-3",children:R.jsx(Ew,{children:l})}),u&&u.length>0&&R.jsx("div",{className:"mt-2",children:R.jsx(Bw,{files:u,isPreview:!1,className:""})}),f?.details?.component===Pe.SYNAPSE_COMPONENTS.PILL&&f?.details?.input?.options&&R.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:f.details?.input?.options.map((B,U)=>R.jsx(Tw,{disabled:f?.isResponded,text:B?.label||"",onClick:()=>w(B?.value||""),className:"cursor-pointer hover:bg-lavender-100/80 transition-colors"},U))}),f?.details?.component===Pe.SYNAPSE_COMPONENTS.MULTI&&f?.details?.input?.options&&R.jsxs("div",{className:"mt-3 space-y-3 break-words overflow-wrap-anywhere whitespace-pre-wrap",children:[R.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Select multiple options:"}),R.jsx(Iw,{options:A(),selectedValues:v,onSelectionChange:T,additionalOption:_(),disabled:f?.isResponded}),R.jsx(kt,{onClick:j,disabled:v.length===0||f?.isResponded,className:Ve("w-full rounded-lg px-4 py-2 text-sm font-medium transition-all","bg-blue-100 hover:bg-blue-200 text-blue-600 border border-blue-200","disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400 disabled:border-gray-200","shadow-sm hover:shadow-md active:scale-[0.98] "),children:"Confirm"})]}),f?.details?.component===Pe.SYNAPSE_COMPONENTS.DOCTOR_CARD&&f?.details?.input?.doctor_details&&m?R.jsx("div",{className:"mt-3",children:R.jsx(Pw,{doctorDetails:f?.details?.input?.doctor_details,callTool:m,callbacks:f?.details?._meta?.callbacks,onBook:E,disabled:f?.isResponded})}):null,c&&!y&&s&&R.jsx("p",{className:"text-sm font-medium text-teal-600",children:c}),i&&R.jsx("p",{className:Ve("text-xs mt-2 text-right","text-slate-500"),children:i})]})]})})}function Yw({messages:n,onSendMessage:l,iconUrl:i,callTool:o}){const u=Yr(c=>c.isWaitingForResponse),s=Yr(c=>c.progressMessage);return R.jsxs(R.Fragment,{children:[(n&&n.length>0||s)&&R.jsx(R.Fragment,{children:n.map((c,f)=>R.jsx("div",{className:"animate-slideUp scroll-mt-[80px]",id:f===n.length-1?"last-message":void 0,children:R.jsx(Fw,{role:c.role,content:c.content,files:c.files||[],iconUrl:i,toolEscalationData:c.toolEscalationData,timestamp:c.timestamp,onSendMessage:l,isLastMessage:f===n.length-1,progressMessage:s,toolCallStatus:c.toolCallStatus,callTool:o})},c.id))}),u&&R.jsx(Vw,{iconUrl:i})]})}function Vw({iconUrl:n}){return R.jsx("div",{className:"animate-slideUp",children:R.jsx("div",{className:"flex justify-start",children:R.jsxs("div",{className:"flex gap-3",children:[R.jsx(ha,{className:"w-8 h-8 bg-gradient-to-br from-lavender-400 to-lavender-500 text-white text-xs font-bold flex-shrink-0",children:R.jsx(ma,{className:"bg-transparent text-white text-xs font-bold",children:n?R.jsx("img",{src:n,alt:"Bot Icon",className:"w-4 h-4",loading:"lazy"}):R.jsx(Xd,{className:"w-4 h-4"})})}),R.jsx(da,{className:"px-4 py-2 rounded-2xl shadow-none bg-white/80 backdrop-blur-md text-slate-800 shadow-sm rounded-bl-none border border-lavender-200/40",children:R.jsx("div",{className:"flex items-center gap-1.5","aria-label":"Bot is typing",children:[0,1,2].map(l=>R.jsx("span",{className:"w-2 h-2 rounded-full bg-slate-400 animate-pulse",style:{animationDelay:`${l*150}ms`}},l))})})]})})})}const Gw=Object.freeze(Object.defineProperty({__proto__:null,default:Yw},Symbol.toStringTag,{value:"Module"}));function Xw({onTaskClick:n,disabled:l,tasks:i}){return i?.length?R.jsx("div",{className:"grid grid-cols-2 gap-3",children:i.map(o=>R.jsx(kt,{type:"button",variant:"ghost",disabled:l,onClick:()=>n(o.value||""),className:"h-auto w-full flex flex-col items-start bg-white shadow-lg ring-1 ring-lavender-100 backdrop-blur-sm rounded-2xl p-4 hover:bg-white/95 hover:border-lavender-300 hover:shadow-lg transition-all text-left group",children:R.jsx("div",{className:"flex items-start justify-between gap-3",children:R.jsx("h3",{className:"font-semibold text-sm text-slate-900 text-wrap group-hover:text-lavender-600 transition-colors",children:o.label||""})})},o.value))}):null}function Zw({initialPrompt:n,tasks:l,onTaskClick:i,disabled:o}){return R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"text-center space-y-2 animate-fadeIn",children:R.jsx("h1",{className:"text-xl-minus font-semibold text-slate-900",children:n||"How can I assist you today?"})}),R.jsx(Xw,{onTaskClick:i,disabled:o,tasks:l})]})}const Kw=Object.freeze(Object.defineProperty({__proto__:null,default:Zw},Symbol.toStringTag,{value:"Module"}));function Qw({className:n="",onRetry:l,onStartNewSession:i,showRetryButton:o,startNewConnection:u,clearError:s,error:c,isConnected:f}){const{isOnline:h}=Wh(),[m,g]=P.useState(!0);return P.useEffect(()=>{if(!u&&!o&&!!c){g(!0);const b=setTimeout(()=>g(!1),5e3);return()=>clearTimeout(b)}g(!0)},[c,u,o]),u?R.jsx("div",{className:Ve("mx-4 mb-3 px-2 py-1 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:R.jsxs("div",{className:"flex items-center gap-3",children:[R.jsx("div",{className:"w-4 h-4 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:R.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),R.jsxs("div",{className:"flex-1",children:[R.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:c?.title??"Something went wrong"}),R.jsx("div",{className:"text-[#666666] text-xs mt-1",children:"Start a new session."})]}),R.jsxs("button",{onClick:()=>{s(),i?.()},className:"p-2 bg-[#3B71F7] text-white text-xs font-semibold rounded-lg hover:bg-[#2E5CD9] transition-colors flex items-center gap-2 flex-shrink-0",children:[R.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:R.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),R.jsx("span",{className:"text-xs font-semibold",children:"Start new chat"})]})]})}):o?R.jsx("div",{className:Ve("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:R.jsxs("div",{className:"flex items-center gap-3",children:[R.jsx("div",{className:"w-5 h-5 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:R.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),R.jsxs("div",{className:"flex-1",children:[R.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:c?.title??"Failed to connect"}),R.jsx("div",{className:"text-slate-500 text-xs mt-1",children:c?.description??"Please check your connection and try again"})]}),R.jsxs("button",{onClick:()=>{s(),l?.()},className:"px-4 py-2 bg-lavender-600 text-white text-sm font-semibold rounded-lg hover:bg-lavender-700 transition-colors flex items-center gap-2 flex-shrink-0",children:[R.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:R.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Retry"]})]})}):f&&h&&!c?.title||!u&&!o&&!m?null:R.jsx("div",{className:Ve("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FDD835] rounded-lg transition-opacity duration-500",n),children:R.jsxs("div",{className:"flex items-center gap-3",children:[R.jsx("div",{className:"w-5 h-5 bg-[#FDD835] rounded-full flex items-center justify-center flex-shrink-0",children:R.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),R.jsxs("div",{className:"flex-1",children:[R.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:h?c?.title||"Connecting...":"No internet connection"}),R.jsx("div",{className:"text-slate-500 text-xs mt-1",children:h?c?.description??"Please wait while we try to connect":"Please check your internet connection"})]}),!f&&R.jsx("div",{className:"flex-shrink-0",children:R.jsx("div",{className:"w-6 h-6 border-2 border-[#FDD835] border-t-transparent rounded-full animate-spin"})})]})})}const Jw=Object.freeze(Object.defineProperty({__proto__:null,ConnectionStatus:Qw},Symbol.toStringTag,{value:"Module"}));return hs.renderMedAssist=$h,Object.defineProperty(hs,Symbol.toStringTag,{value:"Module"}),hs})({});
|
|
57
57
|
//# sourceMappingURL=medassist-widget.js.map
|