@eka-care/medassist-widget 0.0.17 → 0.0.18
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 +15 -15
- package/dist/medassist-widget.js.map +1 -1
- package/package.json +2 -2
package/dist/medassist-widget.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var MedAssistWidget=(function(ds){"use strict";function Cb(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 Nl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ms={exports:{}},la={};var Vf;function Tb(){if(Vf)return la;Vf=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 la.Fragment=l,la.jsx=i,la.jsxs=i,la}var Gf;function kb(){return Gf||(Gf=1,ms.exports=Tb()),ms.exports}var M=kb(),ps={exports:{}},Ue={};var Xf;function Ab(){if(Xf)return Ue;Xf=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"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),v=Symbol.iterator;function y(N){return N===null||typeof N!="object"?null:(N=v&&N[v]||N["@@iterator"],typeof N=="function"?N:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function _(N,U,z){this.props=N,this.context=U,this.refs=T,this.updater=z||C}_.prototype.isReactComponent={},_.prototype.setState=function(N,U){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,U,"setState")},_.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function k(){}k.prototype=_.prototype;function A(N,U,z){this.props=N,this.context=U,this.refs=T,this.updater=z||C}var q=A.prototype=new k;q.constructor=A,E(q,_.prototype),q.isPureReactComponent=!0;var H=Array.isArray;function R(){}var I={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function F(N,U,z){var ne=z.ref;return{$$typeof:n,type:N,key:U,ref:ne!==void 0?ne:null,props:z}}function $(N,U){return F(N.type,U,N.props)}function ie(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function D(N){var U={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(z){return U[z]})}var re=/\/+/g;function w(N,U){return typeof N=="object"&&N!==null&&N.key!=null?D(""+N.key):U.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(R,R):(N.status="pending",N.then(function(U){N.status==="pending"&&(N.status="fulfilled",N.value=U)},function(U){N.status==="pending"&&(N.status="rejected",N.reason=U)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function Z(N,U,z,ne,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),U,z,ne,ce)}}if(Te)return ce=ce(N),Te=ne===""?"."+w(N,0):ne,H(ce)?(z="",Te!=null&&(z=Te.replace(re,"$&/")+"/"),Z(ce,U,z,"",function(Pe){return Pe})):ce!=null&&(ie(ce)&&(ce=$(ce,z+(ce.key==null||N&&N.key===ce.key?"":(""+ce.key).replace(re,"$&/")+"/")+Te)),U.push(ce)),1;Te=0;var Ae=ne===""?".":ne+":";if(H(N))for(var ke=0;ke<N.length;ke++)ne=N[ke],we=Ae+w(ne,ke),Te+=Z(ne,U,z,we,ce);else if(ke=y(N),typeof ke=="function")for(N=ke.call(N),ke=0;!(ne=N.next()).done;)ne=ne.value,we=Ae+w(ne,ke++),Te+=Z(ne,U,z,we,ce);else if(we==="object"){if(typeof N.then=="function")return Z(V(N),U,z,ne,ce);throw U=String(N),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return Te}function Q(N,U,z){if(N==null)return N;var ne=[],ce=0;return Z(N,ne,"","",function(we){return U.call(z,we,ce++)}),ne}function se(N){if(N._status===-1){var U=N._result;U=U(),U.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=U)}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 U=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(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}},B={map:Q,forEach:function(N,U,z){Q(N,function(){U.apply(this,arguments)},z)},count:function(N){var U=0;return Q(N,function(){U++}),U},toArray:function(N){return Q(N,function(U){return U})||[]},only:function(N){if(!ie(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Ue.Activity=b,Ue.Children=B,Ue.Component=_,Ue.Fragment=i,Ue.Profiler=u,Ue.PureComponent=A,Ue.StrictMode=o,Ue.Suspense=h,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,U,z){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var ne=E({},N.props),ce=N.key;if(U!=null)for(we in U.key!==void 0&&(ce=""+U.key),U)!Y.call(U,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&U.ref===void 0||(ne[we]=U[we]);var we=arguments.length-2;if(we===1)ne.children=z;else if(1<we){for(var Te=Array(we),Ae=0;Ae<we;Ae++)Te[Ae]=arguments[Ae+2];ne.children=Te}return F(N.type,ce,ne)},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,U,z){var ne,ce={},we=null;if(U!=null)for(ne in U.key!==void 0&&(we=""+U.key),U)Y.call(U,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(ce[ne]=U[ne]);var Te=arguments.length-2;if(Te===1)ce.children=z;else if(1<Te){for(var Ae=Array(Te),ke=0;ke<Te;ke++)Ae[ke]=arguments[ke+2];ce.children=Ae}if(N&&N.defaultProps)for(ne in Te=N.defaultProps,Te)ce[ne]===void 0&&(ce[ne]=Te[ne]);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,U){return{$$typeof:p,type:N,compare:U===void 0?null:U}},Ue.startTransition=function(N){var U=I.T,z={};I.T=z;try{var ne=N(),ce=I.S;ce!==null&&ce(z,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(R,de)}catch(we){de(we)}finally{U!==null&&z.types!==null&&(U.types=z.types),I.T=U}},Ue.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Ue.use=function(N){return I.H.use(N)},Ue.useActionState=function(N,U,z){return I.H.useActionState(N,U,z)},Ue.useCallback=function(N,U){return I.H.useCallback(N,U)},Ue.useContext=function(N){return I.H.useContext(N)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(N,U){return I.H.useDeferredValue(N,U)},Ue.useEffect=function(N,U){return I.H.useEffect(N,U)},Ue.useEffectEvent=function(N){return I.H.useEffectEvent(N)},Ue.useId=function(){return I.H.useId()},Ue.useImperativeHandle=function(N,U,z){return I.H.useImperativeHandle(N,U,z)},Ue.useInsertionEffect=function(N,U){return I.H.useInsertionEffect(N,U)},Ue.useLayoutEffect=function(N,U){return I.H.useLayoutEffect(N,U)},Ue.useMemo=function(N,U){return I.H.useMemo(N,U)},Ue.useOptimistic=function(N,U){return I.H.useOptimistic(N,U)},Ue.useReducer=function(N,U,z){return I.H.useReducer(N,U,z)},Ue.useRef=function(N){return I.H.useRef(N)},Ue.useState=function(N){return I.H.useState(N)},Ue.useSyncExternalStore=function(N,U,z){return I.H.useSyncExternalStore(N,U,z)},Ue.useTransition=function(){return I.H.useTransition()},Ue.version="19.2.0",Ue}var Zf;function Rl(){return Zf||(Zf=1,ps.exports=Ab()),ps.exports}var P=Rl();const oa=hs(P),Kf=Cb({__proto__:null,default:oa},[P]);var gs={exports:{}},sa={},ys={exports:{}},bs={};var Qf;function Nb(){return Qf||(Qf=1,(function(n){function l(Z,Q){var se=Z.length;Z.push(Q);e:for(;0<se;){var de=se-1>>>1,B=Z[de];if(0<u(B,Q))Z[de]=Q,Z[se]=B,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,B=Z.length,N=B>>>1;de<N;){var U=2*(de+1)-1,z=Z[U],ne=U+1,ce=Z[ne];if(0>u(z,se))ne<B&&0>u(ce,z)?(Z[de]=ce,Z[ne]=se,de=ne):(Z[de]=z,Z[U]=se,de=U);else if(ne<B&&0>u(ce,se))Z[de]=ce,Z[ne]=se,de=ne;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 h=[],p=[],g=1,b=null,v=3,y=!1,C=!1,E=!1,T=!1,_=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function q(Z){for(var Q=i(p);Q!==null;){if(Q.callback===null)o(p);else if(Q.startTime<=Z)o(p),Q.sortIndex=Q.expirationTime,l(h,Q);else break;Q=i(p)}}function H(Z){if(E=!1,q(Z),!C)if(i(h)!==null)C=!0,R||(R=!0,D());else{var Q=i(p);Q!==null&&V(H,Q.startTime-Z)}}var R=!1,I=-1,Y=5,F=-1;function $(){return T?!0:!(n.unstable_now()-F<Y)}function ie(){if(T=!1,R){var Z=n.unstable_now();F=Z;var Q=!0;try{e:{C=!1,E&&(E=!1,k(I),I=-1),y=!0;var se=v;try{t:{for(q(Z),b=i(h);b!==null&&!(b.expirationTime>Z&&$());){var de=b.callback;if(typeof de=="function"){b.callback=null,v=b.priorityLevel;var B=de(b.expirationTime<=Z);if(Z=n.unstable_now(),typeof B=="function"){b.callback=B,q(Z),Q=!0;break t}b===i(h)&&o(h),q(Z)}else o(h);b=i(h)}if(b!==null)Q=!0;else{var N=i(p);N!==null&&V(H,N.startTime-Z),Q=!1}}break e}finally{b=null,v=se,y=!1}Q=void 0}}finally{Q?D():R=!1}}}var D;if(typeof A=="function")D=function(){A(ie)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,w=re.port2;re.port1.onmessage=ie,D=function(){w.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 B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=se+B,Z={id:g++,callback:Q,priorityLevel:Z,startTime:se,expirationTime:B,sortIndex:-1},se>de?(Z.sortIndex=se,l(p,Z),i(h)===null&&Z===i(p)&&(E?(k(I),I=-1):E=!0,V(H,se-de))):(Z.sortIndex=B,l(h,Z),C||y||(C=!0,R||(R=!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}}}})(bs)),bs}var Jf;function Rb(){return Jf||(Jf=1,ys.exports=Nb()),ys.exports}var vs={exports:{}},Ut={};var Wf;function Ob(){if(Wf)return Ut;Wf=1;var n=Rl();function l(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+p+" 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,p,g){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:b==null?null:""+b,children:h,containerInfo:p,implementation:g}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Ut.createPortal=function(h,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(l(299));return s(h,p,null,g)},Ut.flushSync=function(h){var p=c.T,g=o.p;try{if(c.T=null,o.p=2,h)return h()}finally{c.T=p,o.p=g,o.d.f()}},Ut.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(h,p))},Ut.prefetchDNS=function(h){typeof h=="string"&&o.d.D(h)},Ut.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var g=p.as,b=f(g,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,y=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?o.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:b,integrity:v,fetchPriority:y}):g==="script"&&o.d.X(h,{crossOrigin:b,integrity:v,fetchPriority:y,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Ut.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=f(p.as,p.crossOrigin);o.d.M(h,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(h)},Ut.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,b=f(g,p.crossOrigin);o.d.L(h,g,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Ut.preloadModule=function(h,p){if(typeof h=="string")if(p){var g=f(p.as,p.crossOrigin);o.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(h)},Ut.requestFormReset=function(h){o.d.r(h)},Ut.unstable_batchedUpdates=function(h,p){return h(p)},Ut.useFormState=function(h,p,g){return c.H.useFormState(h,p,g)},Ut.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ut.version="19.2.0",Ut}var $f;function ed(){if($f)return vs.exports;$f=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(),vs.exports=Ob(),vs.exports}var td;function zb(){if(td)return sa;td=1;var n=Rb(),l=Rl(),i=ed();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 p(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 m=d.alternate;if(m===null){if(a=d.return,a!==null){r=a;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===r)return h(d),e;if(m===a)return h(d),t;m=m.sibling}throw Error(o(188))}if(r.return!==a.return)r=d,a=m;else{for(var x=!1,O=d.child;O;){if(O===r){x=!0,r=d,a=m;break}if(O===a){x=!0,a=d,r=m;break}O=O.sibling}if(!x){for(O=m.child;O;){if(O===r){x=!0,r=m,a=d;break}if(O===a){x=!0,a=m,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 b=Object.assign,v=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),A=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),R=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 re=Symbol.for("react.client.reference");function w(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===re?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 R:return"SuspenseList";case F:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case A:return e.displayName||"Context";case k: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:w(e.type)||"Memo";case Y:t=e._payload,e=e._init;try{return w(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=[],B=-1;function N(e){return{current:e}}function U(e){0>B||(e.current=de[B],de[B]=null,B--)}function z(e,t){B++,de[B]=e.current,e.current=t}var ne=N(null),ce=N(null),we=N(null),Te=N(null);function Ae(e,t){switch(z(we,t),z(ce,e),z(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Z0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Z0(t),e=K0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(ne),z(ne,e)}function ke(){U(ne),U(ce),U(we)}function Pe(e){e.memoizedState!==null&&z(Te,e);var t=ne.current,r=K0(t,e.type);t!==r&&(z(ce,e),z(ne,r))}function ve(e){ce.current===e&&(U(ne),U(ce)),Te.current===e&&(U(Te),Cl._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:{}},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 z=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"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),v=Symbol.iterator;function y(N){return N===null||typeof N!="object"?null:(N=v&&N[v]||N["@@iterator"],typeof N=="function"?N:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function _(N,U,O){this.props=N,this.context=U,this.refs=T,this.updater=O||C}_.prototype.isReactComponent={},_.prototype.setState=function(N,U){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,U,"setState")},_.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function A(){}A.prototype=_.prototype;function k(N,U,O){this.props=N,this.context=U,this.refs=T,this.updater=O||C}var P=k.prototype=new A;P.constructor=k,E(P,_.prototype),P.isPureReactComponent=!0;var H=Array.isArray;function D(){}var B={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function F(N,U,O){var ne=O.ref;return{$$typeof:n,type:N,key:U,ref:ne!==void 0?ne:null,props:O}}function $(N,U){return F(N.type,U,N.props)}function ie(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function M(N){var U={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(O){return U[O]})}var re=/\/+/g;function w(N,U){return typeof N=="object"&&N!==null&&N.key!=null?M(""+N.key):U.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(D,D):(N.status="pending",N.then(function(U){N.status==="pending"&&(N.status="fulfilled",N.value=U)},function(U){N.status==="pending"&&(N.status="rejected",N.reason=U)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function Z(N,U,O,ne,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),U,O,ne,ce)}}if(Te)return ce=ce(N),Te=ne===""?"."+w(N,0):ne,H(ce)?(O="",Te!=null&&(O=Te.replace(re,"$&/")+"/"),Z(ce,U,O,"",function(Pe){return Pe})):ce!=null&&(ie(ce)&&(ce=$(ce,O+(ce.key==null||N&&N.key===ce.key?"":(""+ce.key).replace(re,"$&/")+"/")+Te)),U.push(ce)),1;Te=0;var ke=ne===""?".":ne+":";if(H(N))for(var Ae=0;Ae<N.length;Ae++)ne=N[Ae],we=ke+w(ne,Ae),Te+=Z(ne,U,O,we,ce);else if(Ae=y(N),typeof Ae=="function")for(N=Ae.call(N),Ae=0;!(ne=N.next()).done;)ne=ne.value,we=ke+w(ne,Ae++),Te+=Z(ne,U,O,we,ce);else if(we==="object"){if(typeof N.then=="function")return Z(V(N),U,O,ne,ce);throw U=String(N),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return Te}function Q(N,U,O){if(N==null)return N;var ne=[],ce=0;return Z(N,ne,"","",function(we){return U.call(O,we,ce++)}),ne}function se(N){if(N._status===-1){var U=N._result;U=U(),U.then(function(O){(N._status===0||N._status===-1)&&(N._status=1,N._result=O)},function(O){(N._status===0||N._status===-1)&&(N._status=2,N._result=O)}),N._status===-1&&(N._status=0,N._result=U)}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 U=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(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}},I={map:Q,forEach:function(N,U,O){Q(N,function(){U.apply(this,arguments)},O)},count:function(N){var U=0;return Q(N,function(){U++}),U},toArray:function(N){return Q(N,function(U){return U})||[]},only:function(N){if(!ie(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Ue.Activity=b,Ue.Children=I,Ue.Component=_,Ue.Fragment=i,Ue.Profiler=u,Ue.PureComponent=k,Ue.StrictMode=o,Ue.Suspense=h,Ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,Ue.__COMPILER_RUNTIME={__proto__:null,c:function(N){return B.H.useMemoCache(N)}},Ue.cache=function(N){return function(){return N.apply(null,arguments)}},Ue.cacheSignal=function(){return null},Ue.cloneElement=function(N,U,O){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var ne=E({},N.props),ce=N.key;if(U!=null)for(we in U.key!==void 0&&(ce=""+U.key),U)!Y.call(U,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&U.ref===void 0||(ne[we]=U[we]);var we=arguments.length-2;if(we===1)ne.children=O;else if(1<we){for(var Te=Array(we),ke=0;ke<we;ke++)Te[ke]=arguments[ke+2];ne.children=Te}return F(N.type,ce,ne)},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,U,O){var ne,ce={},we=null;if(U!=null)for(ne in U.key!==void 0&&(we=""+U.key),U)Y.call(U,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(ce[ne]=U[ne]);var Te=arguments.length-2;if(Te===1)ce.children=O;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(ne in Te=N.defaultProps,Te)ce[ne]===void 0&&(ce[ne]=Te[ne]);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,U){return{$$typeof:p,type:N,compare:U===void 0?null:U}},Ue.startTransition=function(N){var U=B.T,O={};B.T=O;try{var ne=N(),ce=B.S;ce!==null&&ce(O,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(D,de)}catch(we){de(we)}finally{U!==null&&O.types!==null&&(U.types=O.types),B.T=U}},Ue.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},Ue.use=function(N){return B.H.use(N)},Ue.useActionState=function(N,U,O){return B.H.useActionState(N,U,O)},Ue.useCallback=function(N,U){return B.H.useCallback(N,U)},Ue.useContext=function(N){return B.H.useContext(N)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(N,U){return B.H.useDeferredValue(N,U)},Ue.useEffect=function(N,U){return B.H.useEffect(N,U)},Ue.useEffectEvent=function(N){return B.H.useEffectEvent(N)},Ue.useId=function(){return B.H.useId()},Ue.useImperativeHandle=function(N,U,O){return B.H.useImperativeHandle(N,U,O)},Ue.useInsertionEffect=function(N,U){return B.H.useInsertionEffect(N,U)},Ue.useLayoutEffect=function(N,U){return B.H.useLayoutEffect(N,U)},Ue.useMemo=function(N,U){return B.H.useMemo(N,U)},Ue.useOptimistic=function(N,U){return B.H.useOptimistic(N,U)},Ue.useReducer=function(N,U,O){return B.H.useReducer(N,U,O)},Ue.useRef=function(N){return B.H.useRef(N)},Ue.useState=function(N){return B.H.useState(N)},Ue.useSyncExternalStore=function(N,U,O){return B.H.useSyncExternalStore(N,U,O)},Ue.useTransition=function(){return B.H.useTransition()},Ue.version="19.2.0",Ue}var Kf;function Ol(){return Kf||(Kf=1,gs.exports=Rb()),gs.exports}var q=Ol();const sa=ms(q),Qf=Ab({__proto__:null,default:sa},[q]);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,I=Z[de];if(0<u(I,Q))Z[de]=Q,Z[se]=I,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,I=Z.length,N=I>>>1;de<N;){var U=2*(de+1)-1,O=Z[U],ne=U+1,ce=Z[ne];if(0>u(O,se))ne<I&&0>u(ce,O)?(Z[de]=ce,Z[ne]=se,de=ne):(Z[de]=O,Z[U]=se,de=U);else if(ne<I&&0>u(ce,se))Z[de]=ce,Z[ne]=se,de=ne;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 h=[],p=[],g=1,b=null,v=3,y=!1,C=!1,E=!1,T=!1,_=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function P(Z){for(var Q=i(p);Q!==null;){if(Q.callback===null)o(p);else if(Q.startTime<=Z)o(p),Q.sortIndex=Q.expirationTime,l(h,Q);else break;Q=i(p)}}function H(Z){if(E=!1,P(Z),!C)if(i(h)!==null)C=!0,D||(D=!0,M());else{var Q=i(p);Q!==null&&V(H,Q.startTime-Z)}}var D=!1,B=-1,Y=5,F=-1;function $(){return T?!0:!(n.unstable_now()-F<Y)}function ie(){if(T=!1,D){var Z=n.unstable_now();F=Z;var Q=!0;try{e:{C=!1,E&&(E=!1,A(B),B=-1),y=!0;var se=v;try{t:{for(P(Z),b=i(h);b!==null&&!(b.expirationTime>Z&&$());){var de=b.callback;if(typeof de=="function"){b.callback=null,v=b.priorityLevel;var I=de(b.expirationTime<=Z);if(Z=n.unstable_now(),typeof I=="function"){b.callback=I,P(Z),Q=!0;break t}b===i(h)&&o(h),P(Z)}else o(h);b=i(h)}if(b!==null)Q=!0;else{var N=i(p);N!==null&&V(H,N.startTime-Z),Q=!1}}break e}finally{b=null,v=se,y=!1}Q=void 0}}finally{Q?M():D=!1}}}var M;if(typeof k=="function")M=function(){k(ie)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,w=re.port2;re.port1.onmessage=ie,M=function(){w.postMessage(null)}}else M=function(){_(ie,0)};function V(Z,Q){B=_(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 I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=se+I,Z={id:g++,callback:Q,priorityLevel:Z,startTime:se,expirationTime:I,sortIndex:-1},se>de?(Z.sortIndex=se,l(p,Z),i(h)===null&&Z===i(p)&&(E?(A(B),B=-1):E=!0,V(H,se-de))):(Z.sortIndex=I,l(h,Z),C||y||(C=!0,D||(D=!0,M()))),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(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+p+" 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,p,g){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:b==null?null:""+b,children:h,containerInfo:p,implementation:g}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Ut.createPortal=function(h,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(l(299));return s(h,p,null,g)},Ut.flushSync=function(h){var p=c.T,g=o.p;try{if(c.T=null,o.p=2,h)return h()}finally{c.T=p,o.p=g,o.d.f()}},Ut.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(h,p))},Ut.prefetchDNS=function(h){typeof h=="string"&&o.d.D(h)},Ut.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var g=p.as,b=f(g,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,y=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?o.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:b,integrity:v,fetchPriority:y}):g==="script"&&o.d.X(h,{crossOrigin:b,integrity:v,fetchPriority:y,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Ut.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=f(p.as,p.crossOrigin);o.d.M(h,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(h)},Ut.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,b=f(g,p.crossOrigin);o.d.L(h,g,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Ut.preloadModule=function(h,p){if(typeof h=="string")if(p){var g=f(p.as,p.crossOrigin);o.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(h)},Ut.requestFormReset=function(h){o.d.r(h)},Ut.unstable_batchedUpdates=function(h,p){return h(p)},Ut.useFormState=function(h,p,g){return c.H.useFormState(h,p,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 h(e){if(s(e)!==e)throw Error(o(188))}function p(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 m=d.alternate;if(m===null){if(a=d.return,a!==null){r=a;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===r)return h(d),e;if(m===a)return h(d),t;m=m.sibling}throw Error(o(188))}if(r.return!==a.return)r=d,a=m;else{for(var x=!1,R=d.child;R;){if(R===r){x=!0,r=d,a=m;break}if(R===a){x=!0,a=d,r=m;break}R=R.sibling}if(!x){for(R=m.child;R;){if(R===r){x=!0,r=m,a=d;break}if(R===a){x=!0,a=m,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 b=Object.assign,v=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),C=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"),P=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function M(e){return e===null||typeof e!="object"?null:(e=ie&&e[ie]||e["@@iterator"],typeof e=="function"?e:null)}var re=Symbol.for("react.client.reference");function w(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===re?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 D:return"SuspenseList";case F:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case k:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case P:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B:return t=e.displayName||null,t!==null?t:w(e.type)||"Memo";case Y:t=e._payload,e=e._init;try{return w(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=[],I=-1;function N(e){return{current:e}}function U(e){0>I||(e.current=de[I],de[I]=null,I--)}function O(e,t){I++,de[I]=e.current,e.current=t}var ne=N(null),ce=N(null),we=N(null),Te=N(null);function ke(e,t){switch(O(we,t),O(ce,e),O(ne,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}}U(ne),O(ne,e)}function Ae(){U(ne),U(ce),U(we)}function Pe(e){e.memoizedState!==null&&O(Te,e);var t=ne.current,r=J0(t,e.type);t!==r&&(O(ce,e),O(ne,r))}function ve(e){ce.current===e&&(U(ne),U(ce)),Te.current===e&&(U(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(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+ze+e+je}var K=!1;function W(e,t){if(!e||K)return"";K=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(fe){var ue=fe}Reflect.construct(e,[],ye)}else{try{ye.call()}catch(fe){ue=fe}e.call(ye.prototype)}}else{try{throw Error()}catch(fe){ue=fe}(ye=e())&&typeof ye.catch=="function"&&ye.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 m=a.DetermineComponentFrameRoot(),x=m[0],
|
|
4
|
-
`),oe=
|
|
3
|
+
`+ze+e+je}var K=!1;function W(e,t){if(!e||K)return"";K=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(fe){var ue=fe}Reflect.construct(e,[],ye)}else{try{ye.call()}catch(fe){ue=fe}e.call(ye.prototype)}}else{try{throw Error()}catch(fe){ue=fe}(ye=e())&&typeof ye.catch=="function"&&ye.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 m=a.DetermineComponentFrameRoot(),x=m[0],R=m[1];if(x&&R){var G=x.split(`
|
|
4
|
+
`),oe=R.split(`
|
|
5
5
|
`);for(d=a=0;a<G.length&&!G[a].includes("DetermineComponentFrameRoot");)a++;for(;d<oe.length&&!oe[d].includes("DetermineComponentFrameRoot");)d++;if(a===G.length||d===oe.length)for(a=G.length-1,d=oe.length-1;1<=a&&0<=d&&G[a]!==oe[d];)d--;for(;1<=a&&0<=d;a--,d--)if(G[a]!==oe[d]){if(a!==1||d!==1)do if(a--,d--,0>d||G[a]!==oe[d]){var me=`
|
|
6
6
|
`+G[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{K=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?S(r):""}function j(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 W(e.type,!1);case 11:return W(e.type.render,!1);case 1:return W(e.type,!0);case 31:return S("Activity");default:return""}}function L(e){try{var t="",r=null;do t+=j(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,ge=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,Be=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:Ou,Cn=Math.log,nn=Math.LN2;function Ou(e){return e>>>=0,e===0?32:31-(Cn(e)/nn|0)|0}var Ei=256,Gr=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 Wl(e,t,r){var a=e.pendingLanes;if(a===0)return 0;var d=0,m=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var O=a&134217727;return O!==0?(a=O&~m,a!==0?d=hn(a):(x&=O,x!==0?d=hn(x):r||(r=O&~e,r!==0&&(d=hn(r))))):(O=a&~m,O!==0?d=hn(O):x!==0?d=hn(x):r||(r=a&~e,r!==0&&(d=hn(r)))),d===0?0:t!==0&&t!==d&&(t&m)===0&&(m=d&-d,r=t&-t,m>=r||m===32&&(r&4194048)!==0)?t:d}function Ia(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Kw(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 Np(){var e=jn;return jn<<=1,(jn&62914560)===0&&(jn=4194304),e}function zu(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ua(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qw(e,t,r,a,d,m){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,G=e.expirationTimes,oe=e.hiddenUpdates;for(r=x&~r;0<r;){var me=31-Ze(r),ye=1<<me;O[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&&Rp(e,a,0),m!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=m&~(x&~t))}function Rp(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 Op(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 zp(e,t){var r=t&-t;return r=(r&42)!==0?1:Mu(r),(r&(e.suspendedLanes|t))!==0?0:r}function Mu(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 Du(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Mp(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:bb(e.type))}function Dp(e,t){var r=Q.p;try{return Q.p=e,t()}finally{Q.p=r}}var mr=Math.random().toString(36).slice(2),Dt="__reactFiber$"+mr,Xt="__reactProps$"+mr,xi="__reactContainer$"+mr,ju="__reactEvents$"+mr,Jw="__reactListeners$"+mr,Ww="__reactHandles$"+mr,jp="__reactResources$"+mr,Ha="__reactMarker$"+mr;function Lu(e){delete e[Dt],delete e[Xt],delete e[ju],delete e[Jw],delete e[Ww]}function _i(e){var t=e[Dt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[xi]||r[Dt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=nb(e);e!==null;){if(r=e[Dt])return r;e=nb(e)}return t}e=r,r=e.parentNode}return null}function wi(e){if(e=e[Dt]||e[xi]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function qa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Ci(e){var t=e[jp];return t||(t=e[jp]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function zt(e){e[Ha]=!0}var Lp=new Set,Bp={};function Xr(e,t){Ti(e,t),Ti(e+"Capture",t)}function Ti(e,t){for(Bp[e]=t,e=0;e<t.length;e++)Lp.add(t[e])}var $w=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]*$"),Ip={},Up={};function e2(e){return X.call(Up,e)?!0:X.call(Ip,e)?!1:$w.test(e)?Up[e]=!0:(Ip[e]=!0,!1)}function $l(e,t,r){if(e2(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 eo(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 Fn(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 Hp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function t2(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,m=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(x){r=""+x,m.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=Hp(e)?"checked":"value";e._valueTracker=t2(e,t,""+e[t])}}function qp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),a="";return e&&(a=Hp(e)?e.checked?"true":"false":e.value),e=a,e!==r?(t.setValue(e),!0):!1}function to(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 n2=/[\n"\\]/g;function pn(e){return e.replace(n2,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Iu(e,t,r,a,d,m,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=""+mn(t)):e.value!==""+mn(t)&&(e.value=""+mn(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Uu(e,x,mn(t)):r!=null?Uu(e,x,mn(r)):a!=null&&e.removeAttribute("value"),d==null&&m!=null&&(e.defaultChecked=!!m),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?e.name=""+mn(O):e.removeAttribute("name")}function Pp(e,t,r,a,d,m,x,O){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.type=m),t!=null||r!=null){if(!(m!=="submit"&&m!=="reset"||t!=null)){Bu(e);return}r=r!=null?""+mn(r):"",t=t!=null?""+mn(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 Uu(e,t,r){t==="number"&&to(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 Fp(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 Yp(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 Ai(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var r2=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 Vp(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||r2.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function Gp(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&&Vp(e,d,a)}else for(var m in t)t.hasOwnProperty(m)&&Vp(e,m,t[m])}function Hu(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 i2=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"]]),a2=/^[\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 no(e){return a2.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Yn(){}var qu=null;function Pu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ni=null,Ri=null;function Xp(e){var t=wi(e);if(t&&(e=t.stateNode)){var r=e[Xt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Iu(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));Iu(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&&qp(a)}break e;case"textarea":Fp(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&ki(e,!!r.multiple,t,!1)}}}var Fu=!1;function Zp(e,t,r){if(Fu)return e(t,r);Fu=!0;try{var a=e(t);return a}finally{if(Fu=!1,(Ni!==null||Ri!==null)&&(Yo(),Ni&&(t=Ni,e=Ri,Ri=Ni=null,Xp(t),e)))for(t=0;t<e.length;t++)Xp(e[t])}}function Pa(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 Vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yu=!1;if(Vn)try{var Fa={};Object.defineProperty(Fa,"passive",{get:function(){Yu=!0}}),window.addEventListener("test",Fa,Fa),window.removeEventListener("test",Fa,Fa)}catch{Yu=!1}var pr=null,Vu=null,ro=null;function Kp(){if(ro)return ro;var e,t=Vu,r=t.length,a,d="value"in pr?pr.value:pr.textContent,m=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[m-a];a++);return ro=d.slice(e,1<a?1-a:void 0)}function io(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 ao(){return!0}function Qp(){return!1}function Zt(e){function t(r,a,d,m,x){this._reactName=r,this._targetInst=d,this.type=a,this.nativeEvent=m,this.target=x,this.currentTarget=null;for(var O in e)e.hasOwnProperty(O)&&(r=e[O],this[O]=r?r(m):m[O]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?ao:Qp,this.isPropagationStopped=Qp,this}return b(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=ao)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ao)},persist:function(){},isPersistent:ao}),t}var Zr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lo=Zt(Zr),Ya=b({},Zr,{view:0,detail:0}),l2=Zt(Ya),Gu,Xu,Va,oo=b({},Ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ku,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!==Va&&(Va&&e.type==="mousemove"?(Gu=e.screenX-Va.screenX,Xu=e.screenY-Va.screenY):Xu=Gu=0,Va=e),Gu)},movementY:function(e){return"movementY"in e?e.movementY:Xu}}),Jp=Zt(oo),o2=b({},oo,{dataTransfer:0}),s2=Zt(o2),u2=b({},Ya,{relatedTarget:0}),Zu=Zt(u2),c2=b({},Zr,{animationName:0,elapsedTime:0,pseudoElement:0}),f2=Zt(c2),d2=b({},Zr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),h2=Zt(d2),m2=b({},Zr,{data:0}),Wp=Zt(m2),p2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},g2={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"},y2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function b2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=y2[e])?!!t[e]:!1}function Ku(){return b2}var v2=b({},Ya,{key:function(e){if(e.key){var t=p2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=io(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?g2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ku,charCode:function(e){return e.type==="keypress"?io(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?io(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),S2=Zt(v2),E2=b({},oo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$p=Zt(E2),x2=b({},Ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ku}),_2=Zt(x2),w2=b({},Zr,{propertyName:0,elapsedTime:0,pseudoElement:0}),C2=Zt(w2),T2=b({},oo,{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}),k2=Zt(T2),A2=b({},Zr,{newState:0,oldState:0}),N2=Zt(A2),R2=[9,13,27,32],Qu=Vn&&"CompositionEvent"in window,Ga=null;Vn&&"documentMode"in document&&(Ga=document.documentMode);var O2=Vn&&"TextEvent"in window&&!Ga,eg=Vn&&(!Qu||Ga&&8<Ga&&11>=Ga),tg=" ",ng=!1;function rg(e,t){switch(e){case"keyup":return R2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ig(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Oi=!1;function z2(e,t){switch(e){case"compositionend":return ig(t);case"keypress":return t.which!==32?null:(ng=!0,tg);case"textInput":return e=t.data,e===tg&&ng?null:e;default:return null}}function M2(e,t){if(Oi)return e==="compositionend"||!Qu&&rg(e,t)?(e=Kp(),ro=Vu=pr=null,Oi=!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 eg&&t.locale!=="ko"?null:t.data;default:return null}}var D2={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 ag(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!D2[e.type]:t==="textarea"}function lg(e,t,r,a){Ni?Ri?Ri.push(a):Ri=[a]:Ni=a,t=Jo(t,"onChange"),0<t.length&&(r=new lo("onChange","change",null,r,a),e.push({event:r,listeners:t}))}var Xa=null,Za=null;function j2(e){P0(e,0)}function so(e){var t=qa(e);if(qp(t))return e}function og(e,t){if(e==="change")return t}var sg=!1;if(Vn){var Ju;if(Vn){var Wu="oninput"in document;if(!Wu){var ug=document.createElement("div");ug.setAttribute("oninput","return;"),Wu=typeof ug.oninput=="function"}Ju=Wu}else Ju=!1;sg=Ju&&(!document.documentMode||9<document.documentMode)}function cg(){Xa&&(Xa.detachEvent("onpropertychange",fg),Za=Xa=null)}function fg(e){if(e.propertyName==="value"&&so(Za)){var t=[];lg(t,Za,e,Pu(e)),Zp(j2,t)}}function L2(e,t,r){e==="focusin"?(cg(),Xa=t,Za=r,Xa.attachEvent("onpropertychange",fg)):e==="focusout"&&cg()}function B2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return so(Za)}function I2(e,t){if(e==="click")return so(t)}function U2(e,t){if(e==="input"||e==="change")return so(t)}function H2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rn=typeof Object.is=="function"?Object.is:H2;function Ka(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 dg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hg(e,t){var r=dg(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=dg(r)}}function mg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=to(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=to(e.document)}return t}function $u(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 q2=Vn&&"documentMode"in document&&11>=document.documentMode,zi=null,ec=null,Qa=null,tc=!1;function gg(e,t,r){var a=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;tc||zi==null||zi!==to(a)||(a=zi,"selectionStart"in a&&$u(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}),Qa&&Ka(Qa,a)||(Qa=a,a=Jo(ec,"onSelect"),0<a.length&&(t=new lo("onSelect","select",null,t,r),e.push({event:t,listeners:a}),t.target=zi)))}function Kr(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Mi={animationend:Kr("Animation","AnimationEnd"),animationiteration:Kr("Animation","AnimationIteration"),animationstart:Kr("Animation","AnimationStart"),transitionrun:Kr("Transition","TransitionRun"),transitionstart:Kr("Transition","TransitionStart"),transitioncancel:Kr("Transition","TransitionCancel"),transitionend:Kr("Transition","TransitionEnd")},nc={},yg={};Vn&&(yg=document.createElement("div").style,"AnimationEvent"in window||(delete Mi.animationend.animation,delete Mi.animationiteration.animation,delete Mi.animationstart.animation),"TransitionEvent"in window||delete Mi.transitionend.transition);function Qr(e){if(nc[e])return nc[e];if(!Mi[e])return e;var t=Mi[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in yg)return nc[e]=t[r];return e}var bg=Qr("animationend"),vg=Qr("animationiteration"),Sg=Qr("animationstart"),P2=Qr("transitionrun"),F2=Qr("transitionstart"),Y2=Qr("transitioncancel"),Eg=Qr("transitionend"),xg=new Map,rc="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(" ");rc.push("scrollEnd");function Tn(e,t){xg.set(e,t),Xr(t,[e])}var uo=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=[],Di=0,ic=0;function co(){for(var e=Di,t=ic=Di=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 m=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}m!==0&&_g(r,d,m)}}function fo(e,t,r,a){gn[Di++]=e,gn[Di++]=t,gn[Di++]=r,gn[Di++]=a,ic|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function ac(e,t,r,a){return fo(e,t,r,a),ho(e)}function Jr(e,t){return fo(e,null,null,t),ho(e)}function _g(e,t,r){e.lanes|=r;var a=e.alternate;a!==null&&(a.lanes|=r);for(var d=!1,m=e.return;m!==null;)m.childLanes|=r,a=m.alternate,a!==null&&(a.childLanes|=r),m.tag===22&&(e=m.stateNode,e===null||e._visibility&1||(d=!0)),e=m,m=m.return;return e.tag===3?(m=e.stateNode,d&&t!==null&&(d=31-Ze(r),e=m.hiddenUpdates,a=e[d],a===null?e[d]=[t]:a.push(t),t.lane=r|536870912),m):null}function ho(e){if(50<bl)throw bl=0,pf=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ji={};function V2(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 V2(e,t,r,a)}function lc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gn(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 wg(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 mo(e,t,r,a,d,m){var x=0;if(a=e,typeof e=="function")lc(e)&&(x=1);else if(typeof e=="string")x=QC(e,r,ne.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=m,e;case E:return Wr(r.children,d,m,t);case T:x=8,d|=24;break;case _:return e=an(12,r,t,d|2),e.elementType=_,e.lanes=m,e;case H:return e=an(13,r,t,d),e.elementType=H,e.lanes=m,e;case R:return e=an(19,r,t,d),e.elementType=R,e.lanes=m,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case A:x=10;break e;case k: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=m,t}function Wr(e,t,r,a){return e=an(7,e,a,t),e.lanes=r,e}function oc(e,t,r){return e=an(6,e,null,t),e.lanes=r,e}function Cg(e){var t=an(18,null,null,0);return t.stateNode=e,t}function sc(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 Tg=new WeakMap;function yn(e,t){if(typeof e=="object"&&e!==null){var r=Tg.get(e);return r!==void 0?r:(t={value:e,source:t,stack:L(t)},Tg.set(e,t),t)}return{value:e,source:t,stack:L(t)}}var Li=[],Bi=0,po=null,Ja=0,bn=[],vn=0,gr=null,Ln=1,Bn="";function Xn(e,t){Li[Bi++]=Ja,Li[Bi++]=po,po=e,Ja=t}function kg(e,t,r){bn[vn++]=Ln,bn[vn++]=Bn,bn[vn++]=gr,gr=e;var a=Ln;e=Bn;var d=32-Ze(a)-1;a&=~(1<<d),r+=1;var m=32-Ze(t)+d;if(30<m){var x=d-d%5;m=(a&(1<<x)-1).toString(32),a>>=x,d-=x,Ln=1<<32-Ze(t)+d|r<<d|a,Bn=m+e}else Ln=1<<m|r<<d|a,Bn=e}function uc(e){e.return!==null&&(Xn(e,1),kg(e,1,0))}function cc(e){for(;e===po;)po=Li[--Bi],Li[Bi]=null,Ja=Li[--Bi],Li[Bi]=null;for(;e===gr;)gr=bn[--vn],bn[vn]=null,Bn=bn[--vn],bn[vn]=null,Ln=bn[--vn],bn[vn]=null}function Ag(e,t){bn[vn++]=Ln,bn[vn++]=Bn,bn[vn++]=gr,Ln=t.id,Bn=t.overflow,gr=e}var jt=null,ht=null,et=!1,yr=null,Sn=!1,fc=Error(o(519));function br(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wa(yn(t,e)),fc}function Ng(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<Sl.length;r++)Qe(Sl[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),Pp(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),Yp(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||G0(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=Yn),t=!0):t=!1,t||br(e,!0)}function Rg(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 Ii(e){if(e!==jt)return!1;if(!et)return Rg(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")||Rf(e.type,e.memoizedProps)),r=!r),r&&ht&&br(e),Rg(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ht=tb(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ht=tb(e)}else t===27?(t=ht,zr(e.type)?(e=jf,jf=null,ht=e):ht=t):ht=jt?xn(e.stateNode.nextSibling):null;return!0}function $r(){ht=jt=null,et=!1}function dc(){var e=yr;return e!==null&&(Wt===null?Wt=e:Wt.push.apply(Wt,e),yr=null),e}function Wa(e){yr===null?yr=[e]:yr.push(e)}var hc=N(null),ei=null,Zn=null;function vr(e,t,r){z(hc,t._currentValue),t._currentValue=r}function Kn(e){e._currentValue=hc.current,U(hc)}function mc(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 pc(e,t,r,a){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var m=d.dependencies;if(m!==null){var x=d.child;m=m.firstContext;e:for(;m!==null;){var O=m;m=d;for(var G=0;G<t.length;G++)if(O.context===t[G]){m.lanes|=r,O=m.alternate,O!==null&&(O.lanes|=r),mc(m.return,r,e),a||(x=null);break e}m=O.next}}else if(d.tag===18){if(x=d.return,x===null)throw Error(o(341));x.lanes|=r,m=x.alternate,m!==null&&(m.lanes|=r),mc(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 Ui(e,t,r,a){e=null;for(var d=t,m=!1;d!==null;){if(!m){if((d.flags&524288)!==0)m=!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;rn(d.pendingProps.value,x.value)||(e!==null?e.push(O):e=[O])}}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(Cl):e=[Cl])}d=d.return}e!==null&&pc(t,e,r,a),t.flags|=262144}function go(e){for(e=e.firstContext;e!==null;){if(!rn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ti(e){ei=e,Zn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Lt(e){return Og(ei,e)}function yo(e,t){return ei===null&&ti(e),Og(e,t)}function Og(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},Zn===null){if(e===null)throw Error(o(308));Zn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Zn=Zn.next=t;return r}var G2=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()})}},X2=n.unstable_scheduleCallback,Z2=n.unstable_NormalPriority,_t={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function gc(){return{controller:new G2,data:new Map,refCount:0}}function $a(e){e.refCount--,e.refCount===0&&X2(Z2,function(){e.controller.abort()})}var el=null,yc=0,Hi=0,qi=null;function K2(e,t){if(el===null){var r=el=[];yc=0,Hi=Ef(),qi={status:"pending",value:void 0,then:function(a){r.push(a)}}}return yc++,t.then(zg,zg),t}function zg(){if(--yc===0&&el!==null){qi!==null&&(qi.status="fulfilled");var e=el;el=null,Hi=0,qi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Q2(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 Mg=Z.S;Z.S=function(e,t){g0=_e(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&K2(e,t),Mg!==null&&Mg(e,t)};var ni=N(null);function bc(){var e=ni.current;return e!==null?e:ct.pooledCache}function bo(e,t){t===null?z(ni,ni.current):z(ni,t.pool)}function Dg(){var e=bc();return e===null?null:{parent:_t._currentValue,pool:e}}var Pi=Error(o(460)),vc=Error(o(474)),vo=Error(o(542)),So={then:function(){}};function jg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Lg(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(Yn,Yn),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ig(e),e;default:if(typeof t.status=="string")t.then(Yn,Yn);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,Ig(e),e}throw ii=t,Pi}}function ri(e){try{var t=e._init;return t(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(ii=r,Pi):r}}var ii=null;function Bg(){if(ii===null)throw Error(o(459));var e=ii;return ii=null,e}function Ig(e){if(e===Pi||e===vo)throw Error(o(483))}var Fi=null,tl=0;function Eo(e){var t=tl;return tl+=1,Fi===null&&(Fi=[]),Lg(Fi,e,t)}function nl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function xo(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 Ug(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=Gn(ee,J),ee.index=0,ee.sibling=null,ee}function m(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 O(ee,J,ae,pe){return J===null||J.tag!==6?(J=oc(ae,ee.mode,pe),J.return=ee,J):(J=d(J,ae),J.return=ee,J)}function G(ee,J,ae,pe){var De=ae.type;return De===E?me(ee,J,ae.props.children,pe,ae.key):J!==null&&(J.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Y&&ri(De)===J.type)?(J=d(J,ae.props),nl(J,ae),J.return=ee,J):(J=mo(ae.type,ae.key,ae.props,null,ee.mode,pe),nl(J,ae),J.return=ee,J)}function oe(ee,J,ae,pe){return J===null||J.tag!==4||J.stateNode.containerInfo!==ae.containerInfo||J.stateNode.implementation!==ae.implementation?(J=sc(ae,ee.mode,pe),J.return=ee,J):(J=d(J,ae.children||[]),J.return=ee,J)}function me(ee,J,ae,pe,De){return J===null||J.tag!==7?(J=Wr(ae,ee.mode,pe,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=oc(""+J,ee.mode,ae),J.return=ee,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case y:return ae=mo(J.type,J.key,J.props,null,ee.mode,ae),nl(ae,J),ae.return=ee,ae;case C:return J=sc(J,ee.mode,ae),J.return=ee,J;case Y:return J=ri(J),ye(ee,J,ae)}if(V(J)||D(J))return J=Wr(J,ee.mode,ae,null),J.return=ee,J;if(typeof J.then=="function")return ye(ee,Eo(J),ae);if(J.$$typeof===A)return ye(ee,yo(ee,J),ae);xo(ee,J)}return null}function ue(ee,J,ae,pe){var De=J!==null?J.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return De!==null?null:O(ee,J,""+ae,pe);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case y:return ae.key===De?G(ee,J,ae,pe):null;case C:return ae.key===De?oe(ee,J,ae,pe):null;case Y:return ae=ri(ae),ue(ee,J,ae,pe)}if(V(ae)||D(ae))return De!==null?null:me(ee,J,ae,pe,null);if(typeof ae.then=="function")return ue(ee,J,Eo(ae),pe);if(ae.$$typeof===A)return ue(ee,J,yo(ee,ae),pe);xo(ee,ae)}return null}function fe(ee,J,ae,pe,De){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return ee=ee.get(ae)||null,O(J,ee,""+pe,De);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case y:return ee=ee.get(pe.key===null?ae:pe.key)||null,G(J,ee,pe,De);case C:return ee=ee.get(pe.key===null?ae:pe.key)||null,oe(J,ee,pe,De);case Y:return pe=ri(pe),fe(ee,J,ae,pe,De)}if(V(pe)||D(pe))return ee=ee.get(ae)||null,me(J,ee,pe,De,null);if(typeof pe.then=="function")return fe(ee,J,ae,Eo(pe),De);if(pe.$$typeof===A)return fe(ee,J,ae,yo(J,pe),De);xo(J,pe)}return null}function Ne(ee,J,ae,pe){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],pe);if(nt===null){Me===null&&(Me=$e);break}e&&Me&&nt.alternate===null&&t(ee,Me),J=m(nt,J,Fe),tt===null?De=nt:tt.sibling=nt,tt=nt,Me=$e}if(Fe===ae.length)return r(ee,Me),et&&Xn(ee,Fe),De;if(Me===null){for(;Fe<ae.length;Fe++)Me=ye(ee,ae[Fe],pe),Me!==null&&(J=m(Me,J,Fe),tt===null?De=Me:tt.sibling=Me,tt=Me);return et&&Xn(ee,Fe),De}for(Me=a(Me);Fe<ae.length;Fe++)$e=fe(Me,ee,Fe,ae[Fe],pe),$e!==null&&(e&&$e.alternate!==null&&Me.delete($e.key===null?Fe:$e.key),J=m($e,J,Fe),tt===null?De=$e:tt.sibling=$e,tt=$e);return e&&Me.forEach(function(Br){return t(ee,Br)}),et&&Xn(ee,Fe),De}function Le(ee,J,ae,pe){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,pe);if(Br===null){Me===null&&(Me=$e);break}e&&Me&&Br.alternate===null&&t(ee,Me),J=m(Br,J,Fe),tt===null?De=Br:tt.sibling=Br,tt=Br,Me=$e}if(nt.done)return r(ee,Me),et&&Xn(ee,Fe),De;if(Me===null){for(;!nt.done;Fe++,nt=ae.next())nt=ye(ee,nt.value,pe),nt!==null&&(J=m(nt,J,Fe),tt===null?De=nt:tt.sibling=nt,tt=nt);return et&&Xn(ee,Fe),De}for(Me=a(Me);!nt.done;Fe++,nt=ae.next())nt=fe(Me,ee,Fe,nt.value,pe),nt!==null&&(e&&nt.alternate!==null&&Me.delete(nt.key===null?Fe:nt.key),J=m(nt,J,Fe),tt===null?De=nt:tt.sibling=nt,tt=nt);return e&&Me.forEach(function(oT){return t(ee,oT)}),et&&Xn(ee,Fe),De}function ut(ee,J,ae,pe){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 y: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),pe=d(J,ae.props.children),pe.return=ee,ee=pe;break e}}else if(J.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Y&&ri(De)===J.type){r(ee,J.sibling),pe=d(J,ae.props),nl(pe,ae),pe.return=ee,ee=pe;break e}r(ee,J);break}else t(ee,J);J=J.sibling}ae.type===E?(pe=Wr(ae.props.children,ee.mode,pe,ae.key),pe.return=ee,ee=pe):(pe=mo(ae.type,ae.key,ae.props,null,ee.mode,pe),nl(pe,ae),pe.return=ee,ee=pe)}return x(ee);case C: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),pe=d(J,ae.children||[]),pe.return=ee,ee=pe;break e}else{r(ee,J);break}else t(ee,J);J=J.sibling}pe=sc(ae,ee.mode,pe),pe.return=ee,ee=pe}return x(ee);case Y:return ae=ri(ae),ut(ee,J,ae,pe)}if(V(ae))return Ne(ee,J,ae,pe);if(D(ae)){if(De=D(ae),typeof De!="function")throw Error(o(150));return ae=De.call(ae),Le(ee,J,ae,pe)}if(typeof ae.then=="function")return ut(ee,J,Eo(ae),pe);if(ae.$$typeof===A)return ut(ee,J,yo(ee,ae),pe);xo(ee,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,J!==null&&J.tag===6?(r(ee,J.sibling),pe=d(J,ae),pe.return=ee,ee=pe):(r(ee,J),pe=oc(ae,ee.mode,pe),pe.return=ee,ee=pe),x(ee)):r(ee,J)}return function(ee,J,ae,pe){try{tl=0;var De=ut(ee,J,ae,pe);return Fi=null,De}catch(Me){if(Me===Pi||Me===vo)throw Me;var tt=an(29,Me,null,ee.mode);return tt.lanes=pe,tt.return=ee,tt}finally{}}}var ai=Ug(!0),Hg=Ug(!1),Sr=!1;function Sc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ec(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 Er(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xr(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=ho(e),_g(e,null,r),t}return fo(e,a,t,r),ho(e)}function rl(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,Op(e,r)}}function xc(e,t){var r=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,r===a)){var d=null,m=null;if(r=r.firstBaseUpdate,r!==null){do{var x={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};m===null?d=m=x:m=m.next=x,r=r.next}while(r!==null);m===null?d=m=t:m=m.next=t}else d=m=t;r={baseState:a.baseState,firstBaseUpdate:d,lastBaseUpdate:m,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 _c=!1;function il(){if(_c){var e=qi;if(e!==null)throw e}}function al(e,t,r,a){_c=!1;var d=e.updateQueue;Sr=!1;var m=d.firstBaseUpdate,x=d.lastBaseUpdate,O=d.shared.pending;if(O!==null){d.shared.pending=null;var G=O,oe=G.next;G.next=null,x===null?m=oe:x.next=oe,x=G;var me=e.alternate;me!==null&&(me=me.updateQueue,O=me.lastBaseUpdate,O!==x&&(O===null?me.firstBaseUpdate=oe:O.next=oe,me.lastBaseUpdate=G))}if(m!==null){var ye=d.baseState;x=0,me=oe=G=null,O=m;do{var ue=O.lane&-536870913,fe=ue!==O.lane;if(fe?(We&ue)===ue:(a&ue)===ue){ue!==0&&ue===Hi&&(_c=!0),me!==null&&(me=me.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});e:{var Ne=e,Le=O;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=b({},ye,ue);break e;case 2:Sr=!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?(oe=me=fe,G=ye):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&&(G=ye),d.baseState=G,d.firstBaseUpdate=oe,d.lastBaseUpdate=me,m===null&&(d.shared.lanes=0),kr|=x,e.lanes=x,e.memoizedState=ye}}function qg(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Pg(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)qg(r[e],t)}var Yi=N(null),_o=N(0);function Fg(e,t){e=ir,z(_o,e),z(Yi,t),ir=e|t.baseLanes}function wc(){z(_o,ir),z(Yi,Yi.current)}function Cc(){ir=_o.current,U(Yi),U(_o)}var ln=N(null),En=null;function _r(e){var t=e.alternate;z(St,St.current&1),z(ln,e),En===null&&(t===null||Yi.current!==null||t.memoizedState!==null)&&(En=e)}function Tc(e){z(St,St.current),z(ln,e),En===null&&(En=e)}function Yg(e){e.tag===22?(z(St,St.current),z(ln,e),En===null&&(En=e)):wr()}function wr(){z(St,St.current),z(ln,ln.current)}function on(e){U(ln),En===e&&(En=null),U(St)}var St=N(0);function wo(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Mf(r)||Df(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 Qn=0,He=null,ot=null,wt=null,Co=!1,Vi=!1,li=!1,To=0,ll=0,Gi=null,J2=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 Ac(e,t,r,a,d,m){return Qn=m,He=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Z.H=e===null||e.memoizedState===null?ky:Fc,li=!1,m=r(a,d),li=!1,Vi&&(m=Gg(t,r,a,d)),Vg(e),m}function Vg(e){Z.H=ul;var t=ot!==null&&ot.next!==null;if(Qn=0,wt=ot=He=null,Co=!1,ll=0,Gi=null,t)throw Error(o(300));e===null||Ct||(e=e.dependencies,e!==null&&go(e)&&(Ct=!0))}function Gg(e,t,r,a){He=e;var d=0;do{if(Vi&&(Gi=null),ll=0,Vi=!1,25<=d)throw Error(o(301));if(d+=1,wt=ot=null,e.updateQueue!=null){var m=e.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}Z.H=Ay,m=t(r,a)}while(Vi);return m}function W2(){var e=Z.H,t=e.useState()[0];return t=typeof t.then=="function"?ol(t):t,e=e.useState()[0],(ot!==null?ot.memoizedState:null)!==e&&(He.flags|=1024),t}function Nc(){var e=To!==0;return To=0,e}function Rc(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function Oc(e){if(Co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Co=!1}Qn=0,wt=ot=He=null,Vi=!1,ll=To=0,Gi=null}function Pt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?He.memoizedState=wt=e:wt=wt.next=e,wt}function Et(){if(ot===null){var e=He.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=wt===null?He.memoizedState:wt.next;if(t!==null)wt=t,ot=e;else{if(e===null)throw He.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?He.memoizedState=wt=e:wt=wt.next=e}return wt}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ol(e){var t=ll;return ll+=1,Gi===null&&(Gi=[]),e=Lg(Gi,e,t),t=He,(wt===null?t.memoizedState:wt.next)===null&&(t=t.alternate,Z.H=t===null||t.memoizedState===null?ky:Fc),e}function Ao(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ol(e);if(e.$$typeof===A)return Lt(e)}throw Error(o(438,String(e)))}function zc(e){var t=null,r=He.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var a=He.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(),He.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 Jn(e,t){return typeof t=="function"?t(e):t}function No(e){var t=Et();return Mc(t,ot,e)}function Mc(e,t,r){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=r;var d=e.baseQueue,m=a.pending;if(m!==null){if(d!==null){var x=d.next;d.next=m.next,m.next=x}t.baseQueue=d=m,a.pending=null}if(m=e.baseState,d===null)e.memoizedState=m;else{t=d.next;var O=x=null,G=null,oe=t,me=!1;do{var ye=oe.lane&-536870913;if(ye!==oe.lane?(We&ye)===ye:(Qn&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===Hi&&(me=!0);else if((Qn&ue)===ue){oe=oe.next,ue===Hi&&(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?(O=G=ye,x=m):G=G.next=ye,He.lanes|=ue,kr|=ue;ye=oe.action,li&&r(m,ye),m=oe.hasEagerState?oe.eagerState:r(m,ye)}else ue={lane:ye,revertLane:oe.revertLane,gesture:oe.gesture,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},G===null?(O=G=ue,x=m):G=G.next=ue,He.lanes|=ye,kr|=ye;oe=oe.next}while(oe!==null&&oe!==t);if(G===null?x=m:G.next=O,!rn(m,e.memoizedState)&&(Ct=!0,me&&(r=qi,r!==null)))throw r;e.memoizedState=m,e.baseState=x,e.baseQueue=G,a.lastRenderedState=m}return d===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Dc(e){var t=Et(),r=t.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=e;var a=r.dispatch,d=r.pending,m=t.memoizedState;if(d!==null){r.pending=null;var x=d=d.next;do m=e(m,x.action),x=x.next;while(x!==d);rn(m,t.memoizedState)||(Ct=!0),t.memoizedState=m,t.baseQueue===null&&(t.baseState=m),r.lastRenderedState=m}return[m,a]}function Xg(e,t,r){var a=He,d=Et(),m=et;if(m){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(Qg.bind(null,a,d,e),[e]),d.getSnapshot!==t||x||wt!==null&&wt.memoizedState.tag&1){if(a.flags|=2048,Xi(9,{destroy:void 0},Kg.bind(null,a,d,r,t),null),ct===null)throw Error(o(349));m||(Qn&127)!==0||Zg(a,t,r)}return r}function Zg(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=He.updateQueue,t===null?(t=ko(),He.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Kg(e,t,r,a){t.value=r,t.getSnapshot=a,Jg(t)&&Wg(e)}function Qg(e,t,r){return r(function(){Jg(t)&&Wg(e)})}function Jg(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!rn(e,r)}catch{return!0}}function Wg(e){var t=Jr(e,2);t!==null&&$t(t,e,2)}function jc(e){var t=Pt();if(typeof e=="function"){var r=e;if(e=r(),li){Ot(!0);try{r()}finally{Ot(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:e},t}function $g(e,t,r,a){return e.baseState=r,Mc(e,ot,typeof a=="function"?a:Jn)}function $2(e,t,r,a,d){if(zo(e))throw Error(o(485));if(e=t.action,e!==null){var m={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){m.listeners.push(x)}};Z.T!==null?r(!0):m.isTransition=!1,a(m),r=t.pending,r===null?(m.next=t.pending=m,ey(t,m)):(m.next=r.next,t.pending=r.next=m)}}function ey(e,t){var r=t.action,a=t.payload,d=e.state;if(t.isTransition){var m=Z.T,x={};Z.T=x;try{var O=r(d,a),G=Z.S;G!==null&&G(x,O),ty(e,t,O)}catch(oe){Lc(e,t,oe)}finally{m!==null&&x.types!==null&&(m.types=x.types),Z.T=m}}else try{m=r(d,a),ty(e,t,m)}catch(oe){Lc(e,t,oe)}}function ty(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(a){ny(e,t,a)},function(a){return Lc(e,t,a)}):ny(e,t,r)}function ny(e,t,r){t.status="fulfilled",t.value=r,ry(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,ey(e,r)))}function Lc(e,t,r){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=r,ry(t),t=t.next;while(t!==a)}e.action=null}function ry(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function iy(e,t){return t}function ay(e,t){if(et){var r=ct.formState;if(r!==null){e:{var a=He;if(et){if(ht){t:{for(var d=ht,m=Sn;d.nodeType!==8;){if(!m){d=null;break t}if(d=xn(d.nextSibling),d===null){d=null;break t}}m=d.data,d=m==="F!"||m==="F"?d:null}if(d){ht=xn(d.nextSibling),a=d.data==="F!";break e}}br(a)}a=!1}a&&(t=r[0])}}return r=Pt(),r.memoizedState=r.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:iy,lastRenderedState:t},r.queue=a,r=wy.bind(null,He,a),a.dispatch=r,a=jc(!1),m=Pc.bind(null,He,!1,a.queue),a=Pt(),d={state:t,dispatch:null,action:e,pending:null},a.queue=d,r=$2.bind(null,He,d,m,r),d.dispatch=r,a.memoizedState=e,[t,r,!1]}function ly(e){var t=Et();return oy(t,ot,e)}function oy(e,t,r){if(t=Mc(e,t,iy)[0],e=No(Jn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=ol(t)}catch(x){throw x===Pi?vo:x}else a=t;t=Et();var d=t.queue,m=d.dispatch;return r!==t.memoizedState&&(He.flags|=2048,Xi(9,{destroy:void 0},eC.bind(null,d,r),null)),[a,m,e]}function eC(e,t){e.action=t}function sy(e){var t=Et(),r=ot;if(r!==null)return oy(t,r,e);Et(),t=t.memoizedState,r=Et();var a=r.queue.dispatch;return r.memoizedState=e,[t,a,!1]}function Xi(e,t,r,a){return e={tag:e,create:r,deps:a,inst:t,next:null},t=He.updateQueue,t===null&&(t=ko(),He.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 uy(){return Et().memoizedState}function Ro(e,t,r,a){var d=Pt();He.flags|=e,d.memoizedState=Xi(1|t,{destroy:void 0},r,a===void 0?null:a)}function Oo(e,t,r,a){var d=Et();a=a===void 0?null:a;var m=d.memoizedState.inst;ot!==null&&a!==null&&kc(a,ot.memoizedState.deps)?d.memoizedState=Xi(t,m,r,a):(He.flags|=e,d.memoizedState=Xi(1|t,m,r,a))}function cy(e,t){Ro(8390656,8,e,t)}function Bc(e,t){Oo(2048,8,e,t)}function tC(e){He.flags|=4;var t=He.updateQueue;if(t===null)t=ko(),He.updateQueue=t,t.events=[e];else{var r=t.events;r===null?t.events=[e]:r.push(e)}}function fy(e){var t=Et().memoizedState;return tC({ref:t,nextImpl:e}),function(){if((it&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function dy(e,t){return Oo(4,2,e,t)}function hy(e,t){return Oo(4,4,e,t)}function my(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 py(e,t,r){r=r!=null?r.concat([e]):null,Oo(4,4,my.bind(null,t,e),r)}function Ic(){}function gy(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 yy(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(),li){Ot(!0);try{e()}finally{Ot(!1)}}return r.memoizedState=[a,t],a}function Uc(e,t,r){return r===void 0||(Qn&1073741824)!==0&&(We&261930)===0?e.memoizedState=t:(e.memoizedState=r,e=b0(),He.lanes|=e,kr|=e,r)}function by(e,t,r,a){return rn(r,t)?r:Yi.current!==null?(e=Uc(e,r,a),rn(e,t)||(Ct=!0),e):(Qn&42)===0||(Qn&1073741824)!==0&&(We&261930)===0?(Ct=!0,e.memoizedState=r):(e=b0(),He.lanes|=e,kr|=e,t)}function vy(e,t,r,a,d){var m=Q.p;Q.p=m!==0&&8>m?m:8;var x=Z.T,O={};Z.T=O,Pc(e,!1,t,r);try{var G=d(),oe=Z.S;if(oe!==null&&oe(O,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var me=Q2(G,a);sl(e,t,me,cn(e))}else sl(e,t,a,cn(e))}catch(ye){sl(e,t,{then:function(){},status:"rejected",reason:ye},cn())}finally{Q.p=m,x!==null&&O.types!==null&&(x.types=O.types),Z.T=x}}function nC(){}function Hc(e,t,r,a){if(e.tag!==5)throw Error(o(476));var d=Sy(e).queue;vy(e,d,t,se,r===null?nC:function(){return Ey(e),r(a)})}function Sy(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:Jn,lastRenderedState:se},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ey(e){var t=Sy(e);t.next===null&&(t=e.alternate.memoizedState),sl(e,t.next.queue,{},cn())}function qc(){return Lt(Cl)}function xy(){return Et().memoizedState}function _y(){return Et().memoizedState}function rC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=cn();e=Er(r);var a=xr(t,e,r);a!==null&&($t(a,t,r),rl(a,t,r)),t={cache:gc()},e.payload=t;return}t=t.return}}function iC(e,t,r){var a=cn();r={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zo(e)?Cy(t,r):(r=ac(e,t,r,a),r!==null&&($t(r,e,a),Ty(r,t,a)))}function wy(e,t,r){var a=cn();sl(e,t,r,a)}function sl(e,t,r,a){var d={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(zo(e))Cy(t,d);else{var m=e.alternate;if(e.lanes===0&&(m===null||m.lanes===0)&&(m=t.lastRenderedReducer,m!==null))try{var x=t.lastRenderedState,O=m(x,r);if(d.hasEagerState=!0,d.eagerState=O,rn(O,x))return fo(e,t,d,0),ct===null&&co(),!1}catch{}finally{}if(r=ac(e,t,d,a),r!==null)return $t(r,e,a),Ty(r,t,a),!0}return!1}function Pc(e,t,r,a){if(a={lane:2,revertLane:Ef(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},zo(e)){if(t)throw Error(o(479))}else t=ac(e,r,a,2),t!==null&&$t(t,e,2)}function zo(e){var t=e.alternate;return e===He||t!==null&&t===He}function Cy(e,t){Vi=Co=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Ty(e,t,r){if((r&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,r|=a,t.lanes=r,Op(e,r)}}var ul={readContext:Lt,use:Ao,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};ul.useEffectEvent=bt;var ky={readContext:Lt,use:Ao,useCallback:function(e,t){return Pt().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:cy,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,Ro(4194308,4,my.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ro(4194308,4,e,t)},useInsertionEffect:function(e,t){Ro(4,2,e,t)},useMemo:function(e,t){var r=Pt();t=t===void 0?null:t;var a=e();if(li){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(li){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=iC.bind(null,He,e),[a.memoizedState,e]},useRef:function(e){var t=Pt();return e={current:e},t.memoizedState=e},useState:function(e){e=jc(e);var t=e.queue,r=wy.bind(null,He,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:Ic,useDeferredValue:function(e,t){var r=Pt();return Uc(r,e,t)},useTransition:function(){var e=jc(!1);return e=vy.bind(null,He,e.queue,!0,!1),Pt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var a=He,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||Zg(a,t,r)}d.memoizedState=r;var m={value:r,getSnapshot:t};return d.queue=m,cy(Qg.bind(null,a,m,e),[e]),a.flags|=2048,Xi(9,{destroy:void 0},Kg.bind(null,a,m,r,t),null),r},useId:function(){var e=Pt(),t=ct.identifierPrefix;if(et){var r=Bn,a=Ln;r=(a&~(1<<32-Ze(a)-1)).toString(32)+r,t="_"+t+"R_"+r,r=To++,0<r&&(t+="H"+r.toString(32)),t+="_"}else r=J2++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:qc,useFormState:ay,useActionState:ay,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=Pc.bind(null,He,!0,r),r.dispatch=t,[e,t]},useMemoCache:zc,useCacheRefresh:function(){return Pt().memoizedState=rC.bind(null,He)},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)}}},Fc={readContext:Lt,use:Ao,useCallback:gy,useContext:Lt,useEffect:Bc,useImperativeHandle:py,useInsertionEffect:dy,useLayoutEffect:hy,useMemo:yy,useReducer:No,useRef:uy,useState:function(){return No(Jn)},useDebugValue:Ic,useDeferredValue:function(e,t){var r=Et();return by(r,ot.memoizedState,e,t)},useTransition:function(){var e=No(Jn)[0],t=Et().memoizedState;return[typeof e=="boolean"?e:ol(e),t]},useSyncExternalStore:Xg,useId:xy,useHostTransitionStatus:qc,useFormState:ly,useActionState:ly,useOptimistic:function(e,t){var r=Et();return $g(r,ot,e,t)},useMemoCache:zc,useCacheRefresh:_y};Fc.useEffectEvent=fy;var Ay={readContext:Lt,use:Ao,useCallback:gy,useContext:Lt,useEffect:Bc,useImperativeHandle:py,useInsertionEffect:dy,useLayoutEffect:hy,useMemo:yy,useReducer:Dc,useRef:uy,useState:function(){return Dc(Jn)},useDebugValue:Ic,useDeferredValue:function(e,t){var r=Et();return ot===null?Uc(r,e,t):by(r,ot.memoizedState,e,t)},useTransition:function(){var e=Dc(Jn)[0],t=Et().memoizedState;return[typeof e=="boolean"?e:ol(e),t]},useSyncExternalStore:Xg,useId:xy,useHostTransitionStatus:qc,useFormState:sy,useActionState:sy,useOptimistic:function(e,t){var r=Et();return ot!==null?$g(r,ot,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:zc,useCacheRefresh:_y};Ay.useEffectEvent=fy;function Yc(e,t,r,a){t=e.memoizedState,r=r(a,t),r=r==null?t:b({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Vc={enqueueSetState:function(e,t,r){e=e._reactInternals;var a=cn(),d=Er(a);d.payload=t,r!=null&&(d.callback=r),t=xr(e,d,a),t!==null&&($t(t,e,a),rl(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var a=cn(),d=Er(a);d.tag=1,d.payload=t,r!=null&&(d.callback=r),t=xr(e,d,a),t!==null&&($t(t,e,a),rl(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=cn(),a=Er(r);a.tag=2,t!=null&&(a.callback=t),t=xr(e,a,r),t!==null&&($t(t,e,r),rl(t,e,r))}};function Ny(e,t,r,a,d,m,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,m,x):t.prototype&&t.prototype.isPureReactComponent?!Ka(r,a)||!Ka(d,m):!0}function Ry(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&&Vc.enqueueReplaceState(t,t.state,null)}function oi(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=b({},r));for(var d in e)r[d]===void 0&&(r[d]=e[d])}return r}function Oy(e){uo(e)}function zy(e){}function My(e){uo(e)}function Mo(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Dy(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 Gc(e,t,r){return r=Er(r),r.tag=3,r.payload={element:null},r.callback=function(){Mo(e,t)},r}function jy(e){return e=Er(e),e.tag=3,e}function Ly(e,t,r,a){var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var m=a.value;e.payload=function(){return d(m)},e.callback=function(){Dy(t,r,a)}}var x=r.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Dy(t,r,a),typeof d!="function"&&(Ar===null?Ar=new Set([this]):Ar.add(this));var O=a.stack;this.componentDidCatch(a.value,{componentStack:O!==null?O:""})})}function aC(e,t,r,a,d){if(r.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=r.alternate,t!==null&&Ui(t,r,d,!0),r=ln.current,r!==null){switch(r.tag){case 31:case 13:return En===null?Vo():r.alternate===null&&vt===0&&(vt=3),r.flags&=-257,r.flags|=65536,r.lanes=d,a===So?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([a]):t.add(a),bf(e,a,d)),!1;case 22:return r.flags|=65536,a===So?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)),bf(e,a,d)),!1}throw Error(o(435,r.tag))}return bf(e,a,d),Vo(),!1}if(et)return t=ln.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=d,a!==fc&&(e=Error(o(422),{cause:a}),Wa(yn(e,r)))):(a!==fc&&(t=Error(o(423),{cause:a}),Wa(yn(t,r))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,a=yn(a,r),d=Gc(e.stateNode,a,d),xc(e,d),vt!==4&&(vt=2)),!1;var m=Error(o(520),{cause:a});if(m=yn(m,r),yl===null?yl=[m]:yl.push(m),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=Gc(r.stateNode,a,e),xc(r,e),!1;case 1:if(t=r.type,m=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Ar===null||!Ar.has(m))))return r.flags|=65536,d&=-d,r.lanes|=d,d=jy(d),Ly(d,e,r,a),xc(r,d),!1}r=r.return}while(r!==null);return!1}var Xc=Error(o(461)),Ct=!1;function Bt(e,t,r,a){t.child=e===null?Hg(t,null,r,a):ai(t,e.child,r,a)}function By(e,t,r,a,d){r=r.render;var m=t.ref;if("ref"in a){var x={};for(var O in a)O!=="ref"&&(x[O]=a[O])}else x=a;return ti(t),a=Ac(e,t,r,x,m,d),O=Nc(),e!==null&&!Ct?(Rc(e,t,d),Wn(e,t,d)):(et&&O&&uc(t),t.flags|=1,Bt(e,t,a,d),t.child)}function Iy(e,t,r,a,d){if(e===null){var m=r.type;return typeof m=="function"&&!lc(m)&&m.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=m,Uy(e,t,m,a,d)):(e=mo(r.type,null,a,t,t.mode,d),e.ref=t.ref,e.return=t,t.child=e)}if(m=e.child,!tf(e,d)){var x=m.memoizedProps;if(r=r.compare,r=r!==null?r:Ka,r(x,a)&&e.ref===t.ref)return Wn(e,t,d)}return t.flags|=1,e=Gn(m,a),e.ref=t.ref,e.return=t,t.child=e}function Uy(e,t,r,a,d){if(e!==null){var m=e.memoizedProps;if(Ka(m,a)&&e.ref===t.ref)if(Ct=!1,t.pendingProps=a=m,tf(e,d))(e.flags&131072)!==0&&(Ct=!0);else return t.lanes=e.lanes,Wn(e,t,d)}return Zc(e,t,r,a,d)}function Hy(e,t,r,a){var d=a.children,m=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(m=m!==null?m.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&~m}else a=0,t.child=null;return qy(e,t,m,r,a)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&bo(t,m!==null?m.cachePool:null),m!==null?Fg(t,m):wc(),Yg(t);else return a=t.lanes=536870912,qy(e,t,m!==null?m.baseLanes|r:r,r,a)}else m!==null?(bo(t,m.cachePool),Fg(t,m),wr(),t.memoizedState=null):(e!==null&&bo(t,null),wc(),wr());return Bt(e,t,d,r),t.child}function cl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function qy(e,t,r,a,d){var m=bc();return m=m===null?null:{parent:_t._currentValue,pool:m},t.memoizedState={baseLanes:r,cachePool:m},e!==null&&bo(t,null),wc(),Yg(t),e!==null&&Ui(e,t,a,!0),t.childLanes=d,null}function Do(e,t){return t=Lo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Py(e,t,r){return ai(t,e.child,null,r),e=Do(t,t.pendingProps),e.flags|=2,on(t),t.memoizedState=null,e}function lC(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=Do(t,a),t.lanes=536870912,cl(null,e);if(Tc(t),(e=ht)?(e=eb(e,Sn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gr!==null?{id:Ln,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},r=Cg(e),r.return=t,t.child=r,jt=t,ht=null)):e=null,e===null)throw br(t);return t.lanes=536870912,null}return Do(t,a)}var m=e.memoizedState;if(m!==null){var x=m.dehydrated;if(Tc(t),d)if(t.flags&256)t.flags&=-257,t=Py(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||Ui(e,t,r,!1),d=(r&e.childLanes)!==0,Ct||d){if(a=ct,a!==null&&(x=zp(a,r),x!==0&&x!==m.retryLane))throw m.retryLane=x,Jr(e,x),$t(a,e,x),Xc;Vo(),t=Py(e,t,r)}else e=m.treeContext,ht=xn(x.nextSibling),jt=t,et=!0,yr=null,Sn=!1,e!==null&&Ag(t,e),t=Do(t,a),t.flags|=4096;return t}return e=Gn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function jo(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 Zc(e,t,r,a,d){return ti(t),r=Ac(e,t,r,a,void 0,d),a=Nc(),e!==null&&!Ct?(Rc(e,t,d),Wn(e,t,d)):(et&&a&&uc(t),t.flags|=1,Bt(e,t,r,d),t.child)}function Fy(e,t,r,a,d,m){return ti(t),t.updateQueue=null,r=Gg(t,a,r,d),Vg(e),a=Nc(),e!==null&&!Ct?(Rc(e,t,m),Wn(e,t,m)):(et&&a&&uc(t),t.flags|=1,Bt(e,t,r,m),t.child)}function Yy(e,t,r,a,d){if(ti(t),t.stateNode===null){var m=ji,x=r.contextType;typeof x=="object"&&x!==null&&(m=Lt(x)),m=new r(a,m),t.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Vc,t.stateNode=m,m._reactInternals=t,m=t.stateNode,m.props=a,m.state=t.memoizedState,m.refs={},Sc(t),x=r.contextType,m.context=typeof x=="object"&&x!==null?Lt(x):ji,m.state=t.memoizedState,x=r.getDerivedStateFromProps,typeof x=="function"&&(Yc(t,r,x,a),m.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(x=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),x!==m.state&&Vc.enqueueReplaceState(m,m.state,null),al(t,a,m,d),il(),m.state=t.memoizedState),typeof m.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){m=t.stateNode;var O=t.memoizedProps,G=oi(r,O);m.props=G;var oe=m.context,me=r.contextType;x=ji,typeof me=="object"&&me!==null&&(x=Lt(me));var ye=r.getDerivedStateFromProps;me=typeof ye=="function"||typeof m.getSnapshotBeforeUpdate=="function",O=t.pendingProps!==O,me||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(O||oe!==x)&&Ry(t,m,a,x),Sr=!1;var ue=t.memoizedState;m.state=ue,al(t,a,m,d),il(),oe=t.memoizedState,O||ue!==oe||Sr?(typeof ye=="function"&&(Yc(t,r,ye,a),oe=t.memoizedState),(G=Sr||Ny(t,r,G,a,ue,oe,x))?(me||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(t.flags|=4194308)):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=oe),m.props=a,m.state=oe,m.context=x,a=G):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{m=t.stateNode,Ec(e,t),x=t.memoizedProps,me=oi(r,x),m.props=me,ye=t.pendingProps,ue=m.context,oe=r.contextType,G=ji,typeof oe=="object"&&oe!==null&&(G=Lt(oe)),O=r.getDerivedStateFromProps,(oe=typeof O=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(x!==ye||ue!==G)&&Ry(t,m,a,G),Sr=!1,ue=t.memoizedState,m.state=ue,al(t,a,m,d),il();var fe=t.memoizedState;x!==ye||ue!==fe||Sr||e!==null&&e.dependencies!==null&&go(e.dependencies)?(typeof O=="function"&&(Yc(t,r,O,a),fe=t.memoizedState),(me=Sr||Ny(t,r,me,a,ue,fe,G)||e!==null&&e.dependencies!==null&&go(e.dependencies))?(oe||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(a,fe,G),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(a,fe,G)),typeof m.componentDidUpdate=="function"&&(t.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof m.componentDidUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=fe),m.props=a,m.state=fe,m.context=G,a=me):(typeof m.componentDidUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=1024),a=!1)}return m=a,jo(e,t),a=(t.flags&128)!==0,m||a?(m=t.stateNode,r=a&&typeof r.getDerivedStateFromError!="function"?null:m.render(),t.flags|=1,e!==null&&a?(t.child=ai(t,e.child,null,d),t.child=ai(t,null,r,d)):Bt(e,t,r,d),t.memoizedState=m.state,e=t.child):e=Wn(e,t,d),e}function Vy(e,t,r,a){return $r(),t.flags|=256,Bt(e,t,r,a),t.child}var Kc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qc(e){return{baseLanes:e,cachePool:Dg()}}function Jc(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=un),e}function Gy(e,t,r){var a=t.pendingProps,d=!1,m=(t.flags&128)!==0,x;if((x=m)||(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?_r(t):wr(),(e=ht)?(e=eb(e,Sn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gr!==null?{id:Ln,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},r=Cg(e),r.return=t,t.child=r,jt=t,ht=null)):e=null,e===null)throw br(t);return Df(e)?t.lanes=32:t.lanes=536870912,null}var O=a.children;return a=a.fallback,d?(wr(),d=t.mode,O=Lo({mode:"hidden",children:O},d),a=Wr(a,d,r,null),O.return=t,a.return=t,O.sibling=a,t.child=O,a=t.child,a.memoizedState=Qc(r),a.childLanes=Jc(e,x,r),t.memoizedState=Kc,cl(null,a)):(_r(t),Wc(t,O))}var G=e.memoizedState;if(G!==null&&(O=G.dehydrated,O!==null)){if(m)t.flags&256?(_r(t),t.flags&=-257,t=$c(e,t,r)):t.memoizedState!==null?(wr(),t.child=e.child,t.flags|=128,t=null):(wr(),O=a.fallback,d=t.mode,a=Lo({mode:"visible",children:a.children},d),O=Wr(O,d,r,null),O.flags|=2,a.return=t,O.return=t,a.sibling=O,t.child=a,ai(t,e.child,null,r),a=t.child,a.memoizedState=Qc(r),a.childLanes=Jc(e,x,r),t.memoizedState=Kc,t=cl(null,a));else if(_r(t),Df(O)){if(x=O.nextSibling&&O.nextSibling.dataset,x)var oe=x.dgst;x=oe,a=Error(o(419)),a.stack="",a.digest=x,Wa({value:a,source:null,stack:null}),t=$c(e,t,r)}else if(Ct||Ui(e,t,r,!1),x=(r&e.childLanes)!==0,Ct||x){if(x=ct,x!==null&&(a=zp(x,r),a!==0&&a!==G.retryLane))throw G.retryLane=a,Jr(e,a),$t(x,e,a),Xc;Mf(O)||Vo(),t=$c(e,t,r)}else Mf(O)?(t.flags|=192,t.child=e.child,t=null):(e=G.treeContext,ht=xn(O.nextSibling),jt=t,et=!0,yr=null,Sn=!1,e!==null&&Ag(t,e),t=Wc(t,a.children),t.flags|=4096);return t}return d?(wr(),O=a.fallback,d=t.mode,G=e.child,oe=G.sibling,a=Gn(G,{mode:"hidden",children:a.children}),a.subtreeFlags=G.subtreeFlags&65011712,oe!==null?O=Gn(oe,O):(O=Wr(O,d,r,null),O.flags|=2),O.return=t,a.return=t,a.sibling=O,t.child=a,cl(null,a),a=t.child,O=e.child.memoizedState,O===null?O=Qc(r):(d=O.cachePool,d!==null?(G=_t._currentValue,d=d.parent!==G?{parent:G,pool:G}:d):d=Dg(),O={baseLanes:O.baseLanes|r,cachePool:d}),a.memoizedState=O,a.childLanes=Jc(e,x,r),t.memoizedState=Kc,cl(e.child,a)):(_r(t),r=e.child,e=r.sibling,r=Gn(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 Wc(e,t){return t=Lo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Lo(e,t){return e=an(22,e,null,t),e.lanes=0,e}function $c(e,t,r){return ai(t,e.child,null,r),e=Wc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Xy(e,t,r){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),mc(e.return,t,r)}function ef(e,t,r,a,d,m){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:r,tailMode:d,treeForkCount:m}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=a,x.tail=r,x.tailMode=d,x.treeForkCount=m)}function Zy(e,t,r){var a=t.pendingProps,d=a.revealOrder,m=a.tail;a=a.children;var x=St.current,O=(x&2)!==0;if(O?(x=x&1|2,t.flags|=128):x&=1,z(St,x),Bt(e,t,a,r),a=et?Ja:0,!O&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Xy(e,r,t);else if(e.tag===19)Xy(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&&wo(e)===null&&(d=r),r=r.sibling;r=d,r===null?(d=t.child,t.child=null):(d=r.sibling,r.sibling=null),ef(t,!1,d,r,m,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&&wo(e)===null){t.child=d;break}e=d.sibling,d.sibling=r,r=d,d=e}ef(t,!0,r,null,m,a);break;case"together":ef(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Wn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),kr|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(Ui(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=Gn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Gn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function tf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&go(e)))}function oC(e,t,r){switch(t.tag){case 3:Ae(t,t.stateNode.containerInfo),vr(t,_t,e.memoizedState.cache),$r();break;case 27:case 5:Pe(t);break;case 4:Ae(t,t.stateNode.containerInfo);break;case 10:vr(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Tc(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(_r(t),t.flags|=128,null):(r&t.child.childLanes)!==0?Gy(e,t,r):(_r(t),e=Wn(e,t,r),e!==null?e.sibling:null);_r(t);break;case 19:var d=(e.flags&128)!==0;if(a=(r&t.childLanes)!==0,a||(Ui(e,t,r,!1),a=(r&t.childLanes)!==0),d){if(a)return Zy(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,Hy(e,t,r,t.pendingProps);case 24:vr(t,_t,e.memoizedState.cache)}return Wn(e,t,r)}function Ky(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ct=!0;else{if(!tf(e,r)&&(t.flags&128)===0)return Ct=!1,oC(e,t,r);Ct=(e.flags&131072)!==0}else Ct=!1,et&&(t.flags&1048576)!==0&&kg(t,Ja,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ri(t.elementType),t.type=e,typeof e=="function")lc(e)?(a=oi(e,a),t.tag=1,t=Yy(null,t,e,a,r)):(t.tag=0,t=Zc(null,t,e,a,r));else{if(e!=null){var d=e.$$typeof;if(d===q){t.tag=11,t=By(null,t,e,a,r);break e}else if(d===I){t.tag=14,t=Iy(null,t,e,a,r);break e}}throw t=w(e)||e,Error(o(306,t,""))}}return t;case 0:return Zc(e,t,t.type,t.pendingProps,r);case 1:return a=t.type,d=oi(a,t.pendingProps),Yy(e,t,a,d,r);case 3:e:{if(Ae(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var m=t.memoizedState;d=m.element,Ec(e,t),al(t,a,null,r);var x=t.memoizedState;if(a=x.cache,vr(t,_t,a),a!==m.cache&&pc(t,[_t],r,!0),il(),a=x.element,m.isDehydrated)if(m={element:a,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=m,t.memoizedState=m,t.flags&256){t=Vy(e,t,a,r);break e}else if(a!==d){d=yn(Error(o(424)),t),Wa(d),t=Vy(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,yr=null,Sn=!0,r=Hg(t,null,a,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if($r(),a===d){t=Wn(e,t,r);break e}Bt(e,t,a,r)}t=t.child}return t;case 26:return jo(e,t),e===null?(r=lb(t.type,null,t.pendingProps,null))?t.memoizedState=r:et||(r=t.type,e=t.pendingProps,a=Wo(we.current).createElement(r),a[Dt]=t,a[Xt]=e,It(a,r,e),zt(a),t.stateNode=a):t.memoizedState=lb(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Pe(t),e===null&&et&&(a=t.stateNode=rb(t.type,t.pendingProps,we.current),jt=t,Sn=!0,d=ht,zr(t.type)?(jf=d,ht=xn(a.firstChild)):ht=d),Bt(e,t,t.pendingProps.children,r),jo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&et&&((d=a=ht)&&(a=BC(a,t.type,t.pendingProps,Sn),a!==null?(t.stateNode=a,jt=t,ht=xn(a.firstChild),Sn=!1,d=!0):d=!1),d||br(t)),Pe(t),d=t.type,m=t.pendingProps,x=e!==null?e.memoizedProps:null,a=m.children,Rf(d,m)?a=null:x!==null&&Rf(d,x)&&(t.flags|=32),t.memoizedState!==null&&(d=Ac(e,t,W2,null,null,r),Cl._currentValue=d),jo(e,t),Bt(e,t,a,r),t.child;case 6:return e===null&&et&&((e=r=ht)&&(r=IC(r,t.pendingProps,Sn),r!==null?(t.stateNode=r,jt=t,ht=null,e=!0):e=!1),e||br(t)),null;case 13:return Gy(e,t,r);case 4:return Ae(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ai(t,null,a,r):Bt(e,t,a,r),t.child;case 11:return By(e,t,t.type,t.pendingProps,r);case 7:return Bt(e,t,t.pendingProps,r),t.child;case 8:return Bt(e,t,t.pendingProps.children,r),t.child;case 12:return Bt(e,t,t.pendingProps.children,r),t.child;case 10:return a=t.pendingProps,vr(t,t.type,a.value),Bt(e,t,a.children,r),t.child;case 9:return d=t.type._context,a=t.pendingProps.children,ti(t),d=Lt(d),a=a(d),t.flags|=1,Bt(e,t,a,r),t.child;case 14:return Iy(e,t,t.type,t.pendingProps,r);case 15:return Uy(e,t,t.type,t.pendingProps,r);case 19:return Zy(e,t,r);case 31:return lC(e,t,r);case 22:return Hy(e,t,r,t.pendingProps);case 24:return ti(t),a=Lt(_t),e===null?(d=bc(),d===null&&(d=ct,m=gc(),d.pooledCache=m,m.refCount++,m!==null&&(d.pooledCacheLanes|=r),d=m),t.memoizedState={parent:a,cache:d},Sc(t),vr(t,_t,d)):((e.lanes&r)!==0&&(Ec(e,t),al(t,null,null,r),il()),d=e.memoizedState,m=t.memoizedState,d.parent!==a?(d={parent:a,cache:a},t.memoizedState=d,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=d),vr(t,_t,a)):(a=m.cache,vr(t,_t,a),a!==d.cache&&pc(t,[_t],r,!0))),Bt(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function $n(e){e.flags|=4}function nf(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(x0())e.flags|=8192;else throw ii=So,vc}else e.flags&=-16777217}function Qy(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!fb(t))if(x0())e.flags|=8192;else throw ii=So,vc}function Bo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Np():536870912,e.lanes|=t,Ji|=t)}function fl(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 sC(e,t,r){var a=t.pendingProps;switch(cc(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),Kn(_t),ke(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ii(t)?$n(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,dc())),mt(t),null;case 26:var d=t.type,m=t.memoizedState;return e===null?($n(t),m!==null?(mt(t),Qy(t,m)):(mt(t),nf(t,d,null,a,r))):m?m!==e.memoizedState?($n(t),mt(t),Qy(t,m)):(mt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&$n(t),mt(t),nf(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&&$n(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return mt(t),null}e=ne.current,Ii(t)?Ng(t):(e=rb(d,a,r),t.stateNode=e,$n(t))}return mt(t),null;case 5:if(ve(t),d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&$n(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return mt(t),null}if(m=ne.current,Ii(t))Ng(t);else{var x=Wo(we.current);switch(m){case 1:m=x.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:m=x.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":m=x.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":m=x.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":m=x.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof a.is=="string"?x.createElement("select",{is:a.is}):x.createElement("select"),a.multiple?m.multiple=!0:a.size&&(m.size=a.size);break;default:m=typeof a.is=="string"?x.createElement(d,{is:a.is}):x.createElement(d)}}m[Dt]=t,m[Xt]=a;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)m.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=m;e:switch(It(m,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&&$n(t)}}return mt(t),nf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&$n(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=we.current,Ii(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||G0(e.nodeValue,r)),e||br(t,!0)}else e=Wo(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=Ii(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 $r(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),e=!1}else r=dc(),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=Ii(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 $r(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),d=!1}else d=dc(),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),m=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(m=a.memoizedState.cachePool.pool),m!==d&&(a.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),Bo(t,t.updateQueue),mt(t),null);case 4:return ke(),e===null&&Cf(t.stateNode.containerInfo),mt(t),null;case 10:return Kn(t.type),mt(t),null;case 19:if(U(St),a=t.memoizedState,a===null)return mt(t),null;if(d=(t.flags&128)!==0,m=a.rendering,m===null)if(d)fl(a,!1);else{if(vt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(m=wo(e),m!==null){for(t.flags|=128,fl(a,!1),e=m.updateQueue,t.updateQueue=e,Bo(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)wg(r,e),r=r.sibling;return z(St,St.current&1|2),et&&Xn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&_e()>Po&&(t.flags|=128,d=!0,fl(a,!1),t.lanes=4194304)}else{if(!d)if(e=wo(m),e!==null){if(t.flags|=128,d=!0,e=e.updateQueue,t.updateQueue=e,Bo(t,e),fl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!m.alternate&&!et)return mt(t),null}else 2*_e()-a.renderingStartTime>Po&&r!==536870912&&(t.flags|=128,d=!0,fl(a,!1),t.lanes=4194304);a.isBackwards?(m.sibling=t.child,t.child=m):(e=a.last,e!==null?e.sibling=m:t.child=m,a.last=m)}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&&Xn(t,a.treeForkCount),e):(mt(t),null);case 22:case 23:return on(t),Cc(),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&&U(ni),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Kn(_t),mt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function uC(e,t){switch(cc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kn(_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 ve(t),null;case 31:if(t.memoizedState!==null){if(on(t),t.alternate===null)throw Error(o(340));$r()}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));$r()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(St),null;case 4:return ke(),null;case 10:return Kn(t.type),null;case 22:case 23:return on(t),Cc(),e!==null&&U(ni),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Kn(_t),null;case 25:return null;default:return null}}function Jy(e,t){switch(cc(t),t.tag){case 3:Kn(_t),ke();break;case 26:case 27:case 5:ve(t);break;case 4:ke();break;case 31:t.memoizedState!==null&&on(t);break;case 13:on(t);break;case 19:U(St);break;case 10:Kn(t.type);break;case 22:case 23:on(t),Cc(),e!==null&&U(ni);break;case 24:Kn(_t)}}function dl(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 m=r.create,x=r.inst;a=m(),x.destroy=a}r=r.next}while(r!==d)}}catch(O){lt(t,t.return,O)}}function Cr(e,t,r){try{var a=t.updateQueue,d=a!==null?a.lastEffect:null;if(d!==null){var m=d.next;a=m;do{if((a.tag&e)===e){var x=a.inst,O=x.destroy;if(O!==void 0){x.destroy=void 0,d=t;var G=r,oe=O;try{oe()}catch(me){lt(d,G,me)}}}a=a.next}while(a!==m)}}catch(me){lt(t,t.return,me)}}function Wy(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{Pg(t,r)}catch(a){lt(e,e.return,a)}}}function $y(e,t,r){r.props=oi(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(a){lt(e,t,a)}}function hl(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 In(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 e0(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 rf(e,t,r){try{var a=e.stateNode;OC(a,e.type,r,t),a[Xt]=t}catch(d){lt(e,e.return,d)}}function t0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&zr(e.type)||e.tag===4}function af(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||t0(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&&zr(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 lf(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=Yn));else if(a!==4&&(a===27&&zr(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(lf(e,t,r),e=e.sibling;e!==null;)lf(e,t,r),e=e.sibling}function Io(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&&zr(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(Io(e,t,r),e=e.sibling;e!==null;)Io(e,t,r),e=e.sibling}function n0(e){var t=e.stateNode,r=e.memoizedProps;try{for(var a=e.type,d=t.attributes;d.length;)t.removeAttributeNode(d[0]);It(t,a,r),t[Dt]=e,t[Xt]=r}catch(m){lt(e,e.return,m)}}var er=!1,Tt=!1,of=!1,r0=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function cC(e,t){if(e=e.containerInfo,Af=as,e=pg(e),$u(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,m=a.focusNode;a=a.focusOffset;try{r.nodeType,m.nodeType}catch{r=null;break e}var x=0,O=-1,G=-1,oe=0,me=0,ye=e,ue=null;t:for(;;){for(var fe;ye!==r||d!==0&&ye.nodeType!==3||(O=x+d),ye!==m||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&&(O=x),ue===m&&++me===a&&(G=x),(fe=ye.nextSibling)!==null)break;ye=ue,ue=ye.parentNode}ye=fe}r=O===-1||G===-1?null:{start:O,end:G}}else r=null}r=r||{start:0,end:0}}else r=null;for(Nf={focusedElem:e,selectionRange:r},as=!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,m=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&&m!==null){e=void 0,r=t,d=m.memoizedProps,m=m.memoizedState,a=r.stateNode;try{var Ne=oi(r.type,d);e=a.getSnapshotBeforeUpdate(Ne,m),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)zf(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":zf(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 i0(e,t,r){var a=r.flags;switch(r.tag){case 0:case 11:case 15:nr(e,r),a&4&&dl(5,r);break;case 1:if(nr(e,r),a&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(x){lt(r,r.return,x)}else{var d=oi(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(d,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){lt(r,r.return,x)}}a&64&&Wy(r),a&512&&hl(r,r.return);break;case 3:if(nr(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{Pg(e,t)}catch(x){lt(r,r.return,x)}}break;case 27:t===null&&a&4&&n0(r);case 26:case 5:nr(e,r),t===null&&a&4&&e0(r),a&512&&hl(r,r.return);break;case 12:nr(e,r);break;case 31:nr(e,r),a&4&&o0(e,r);break;case 13:nr(e,r),a&4&&s0(e,r),a&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=vC.bind(null,r),UC(e,r))));break;case 22:if(a=r.memoizedState!==null||er,!a){t=t!==null&&t.memoizedState!==null||Tt,d=er;var m=Tt;er=a,(Tt=t)&&!m?rr(e,r,(r.subtreeFlags&8772)!==0):nr(e,r),er=d,Tt=m}break;case 30:break;default:nr(e,r)}}function a0(e){var t=e.alternate;t!==null&&(e.alternate=null,a0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Lu(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 tr(e,t,r){for(r=r.child;r!==null;)l0(e,t,r),r=r.sibling}function l0(e,t,r){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Xe,r)}catch{}switch(r.tag){case 26:Tt||In(r,t),tr(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Tt||In(r,t);var a=yt,d=Kt;zr(r.type)&&(yt=r.stateNode,Kt=!1),tr(e,t,r),xl(r.stateNode),yt=a,Kt=d;break;case 5:Tt||In(r,t);case 6:if(a=yt,d=Kt,yt=null,tr(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(m){lt(r,t,m)}else try{yt.removeChild(r.stateNode)}catch(m){lt(r,t,m)}break;case 18:yt!==null&&(Kt?(e=yt,W0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),aa(e)):W0(yt,r.stateNode));break;case 4:a=yt,d=Kt,yt=r.stateNode.containerInfo,Kt=!0,tr(e,t,r),yt=a,Kt=d;break;case 0:case 11:case 14:case 15:Cr(2,r,t),Tt||Cr(4,r,t),tr(e,t,r);break;case 1:Tt||(In(r,t),a=r.stateNode,typeof a.componentWillUnmount=="function"&&$y(r,t,a)),tr(e,t,r);break;case 21:tr(e,t,r);break;case 22:Tt=(a=Tt)||r.memoizedState!==null,tr(e,t,r),Tt=a;break;default:tr(e,t,r)}}function o0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{aa(e)}catch(r){lt(t,t.return,r)}}}function s0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{aa(e)}catch(r){lt(t,t.return,r)}}function fC(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new r0),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new r0),t;default:throw Error(o(435,e.tag))}}function Uo(e,t){var r=fC(e);t.forEach(function(a){if(!r.has(a)){r.add(a);var d=SC.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],m=e,x=t,O=x;e:for(;O!==null;){switch(O.tag){case 27:if(zr(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));l0(m,x,d),yt=null,Kt=!1,m=d.alternate,m!==null&&(m.return=null),d.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)u0(t,e),t=t.sibling}var kn=null;function u0(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&&(Cr(3,e,e.return),dl(3,e),Cr(5,e,e.return));break;case 1:Qt(t,e),Jt(e),a&512&&(Tt||r===null||In(r,r.return)),a&64&&er&&(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||In(r,r.return)),a&4){var m=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":m=d.getElementsByTagName("title")[0],(!m||m[Ha]||m[Dt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=d.createElement(a),d.head.insertBefore(m,d.querySelector("head > title"))),It(m,a,r),m[Dt]=e,zt(m),a=m;break e;case"link":var x=ub("link","href",d).get(a+(r.href||""));if(x){for(var O=0;O<x.length;O++)if(m=x[O],m.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&m.getAttribute("rel")===(r.rel==null?null:r.rel)&&m.getAttribute("title")===(r.title==null?null:r.title)&&m.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){x.splice(O,1);break t}}m=d.createElement(a),It(m,a,r),d.head.appendChild(m);break;case"meta":if(x=ub("meta","content",d).get(a+(r.content||""))){for(O=0;O<x.length;O++)if(m=x[O],m.getAttribute("content")===(r.content==null?null:""+r.content)&&m.getAttribute("name")===(r.name==null?null:r.name)&&m.getAttribute("property")===(r.property==null?null:r.property)&&m.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&m.getAttribute("charset")===(r.charSet==null?null:r.charSet)){x.splice(O,1);break t}}m=d.createElement(a),It(m,a,r),d.head.appendChild(m);break;default:throw Error(o(468,a))}m[Dt]=e,zt(m),a=m}e.stateNode=a}else cb(d,e.type,e.stateNode);else e.stateNode=sb(d,a,e.memoizedProps);else m!==a?(m===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):m.count--,a===null?cb(d,e.type,e.stateNode):sb(d,a,e.memoizedProps)):a===null&&e.stateNode!==null&&rf(e,e.memoizedProps,r.memoizedProps)}break;case 27:Qt(t,e),Jt(e),a&512&&(Tt||r===null||In(r,r.return)),r!==null&&a&4&&rf(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Qt(t,e),Jt(e),a&512&&(Tt||r===null||In(r,r.return)),e.flags&32){d=e.stateNode;try{Ai(d,"")}catch(Ne){lt(e,e.return,Ne)}}a&4&&e.stateNode!=null&&(d=e.memoizedProps,rf(e,d,r!==null?r.memoizedProps:d)),a&1024&&(of=!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(ts=null,d=kn,kn=$o(t.containerInfo),Qt(t,e),kn=d,Jt(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{aa(t.containerInfo)}catch(Ne){lt(e,e.return,Ne)}of&&(of=!1,c0(e));break;case 4:a=kn,kn=$o(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,Uo(e,a)));break;case 13:Qt(t,e),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(qo=_e()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Uo(e,a)));break;case 22:d=e.memoizedState!==null;var G=r!==null&&r.memoizedState!==null,oe=er,me=Tt;if(er=oe||d,Tt=me||G,Qt(t,e),Tt=me,er=oe,Jt(e),a&8192)e:for(t=e.stateNode,t._visibility=d?t._visibility&-2:t._visibility|1,d&&(r===null||G||er||Tt||si(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){G=r=t;try{if(m=G.stateNode,d)x=m.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{O=G.stateNode;var ye=G.memoizedProps.style,ue=ye!=null&&ye.hasOwnProperty("display")?ye.display:null;O.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?$0(fe,!0):$0(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,Uo(e,r))));break;case 19:Qt(t,e),Jt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Uo(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(t0(a)){r=a;break}a=a.return}if(r==null)throw Error(o(160));switch(r.tag){case 27:var d=r.stateNode,m=af(e);Io(e,m,d);break;case 5:var x=r.stateNode;r.flags&32&&(Ai(x,""),r.flags&=-33);var O=af(e);Io(e,O,x);break;case 3:case 4:var G=r.stateNode.containerInfo,oe=af(e);lf(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 c0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;c0(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function nr(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)i0(e,t.alternate,t),t=t.sibling}function si(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Cr(4,t,t.return),si(t);break;case 1:In(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&$y(t,t.return,r),si(t);break;case 27:xl(t.stateNode);case 26:case 5:In(t,t.return),si(t);break;case 22:t.memoizedState===null&&si(t);break;case 30:si(t);break;default:si(t)}e=e.sibling}}function rr(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,d=e,m=t,x=m.flags;switch(m.tag){case 0:case 11:case 15:rr(d,m,r),dl(4,m);break;case 1:if(rr(d,m,r),a=m,d=a.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(oe){lt(a,a.return,oe)}if(a=m,d=a.updateQueue,d!==null){var O=a.stateNode;try{var G=d.shared.hiddenCallbacks;if(G!==null)for(d.shared.hiddenCallbacks=null,d=0;d<G.length;d++)qg(G[d],O)}catch(oe){lt(a,a.return,oe)}}r&&x&64&&Wy(m),hl(m,m.return);break;case 27:n0(m);case 26:case 5:rr(d,m,r),r&&a===null&&x&4&&e0(m),hl(m,m.return);break;case 12:rr(d,m,r);break;case 31:rr(d,m,r),r&&x&4&&o0(d,m);break;case 13:rr(d,m,r),r&&x&4&&s0(d,m);break;case 22:m.memoizedState===null&&rr(d,m,r),hl(m,m.return);break;case 30:break;default:rr(d,m,r)}t=t.sibling}}function sf(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&&$a(r))}function uf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$a(e))}function An(e,t,r,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)f0(e,t,r,a),t=t.sibling}function f0(e,t,r,a){var d=t.flags;switch(t.tag){case 0:case 11:case 15:An(e,t,r,a),d&2048&&dl(9,t);break;case 1:An(e,t,r,a);break;case 3:An(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&&$a(e)));break;case 12:if(d&2048){An(e,t,r,a),e=t.stateNode;try{var m=t.memoizedProps,x=m.id,O=m.onPostCommit;typeof O=="function"&&O(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(G){lt(t,t.return,G)}}else An(e,t,r,a);break;case 31:An(e,t,r,a);break;case 13:An(e,t,r,a);break;case 23:break;case 22:m=t.stateNode,x=t.alternate,t.memoizedState!==null?m._visibility&2?An(e,t,r,a):ml(e,t):m._visibility&2?An(e,t,r,a):(m._visibility|=2,Zi(e,t,r,a,(t.subtreeFlags&10256)!==0||!1)),d&2048&&sf(x,t);break;case 24:An(e,t,r,a),d&2048&&uf(t.alternate,t);break;default:An(e,t,r,a)}}function Zi(e,t,r,a,d){for(d=d&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var m=e,x=t,O=r,G=a,oe=x.flags;switch(x.tag){case 0:case 11:case 15:Zi(m,x,O,G,d),dl(8,x);break;case 23:break;case 22:var me=x.stateNode;x.memoizedState!==null?me._visibility&2?Zi(m,x,O,G,d):ml(m,x):(me._visibility|=2,Zi(m,x,O,G,d)),d&&oe&2048&&sf(x.alternate,x);break;case 24:Zi(m,x,O,G,d),d&&oe&2048&&uf(x.alternate,x);break;default:Zi(m,x,O,G,d)}t=t.sibling}}function ml(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:ml(r,a),d&2048&&sf(a.alternate,a);break;case 24:ml(r,a),d&2048&&uf(a.alternate,a);break;default:ml(r,a)}t=t.sibling}}var pl=8192;function Ki(e,t,r){if(e.subtreeFlags&pl)for(e=e.child;e!==null;)d0(e,t,r),e=e.sibling}function d0(e,t,r){switch(e.tag){case 26:Ki(e,t,r),e.flags&pl&&e.memoizedState!==null&&JC(r,kn,e.memoizedState,e.memoizedProps);break;case 5:Ki(e,t,r);break;case 3:case 4:var a=kn;kn=$o(e.stateNode.containerInfo),Ki(e,t,r),kn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=pl,pl=16777216,Ki(e,t,r),pl=a):Ki(e,t,r));break;default:Ki(e,t,r)}}function h0(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 gl(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,p0(a,e)}h0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)m0(e),e=e.sibling}function m0(e){switch(e.tag){case 0:case 11:case 15:gl(e),e.flags&2048&&Cr(9,e,e.return);break;case 3:gl(e);break;case 12:gl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ho(e)):gl(e);break;default:gl(e)}}function Ho(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,p0(a,e)}h0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Cr(8,t,t.return),Ho(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,Ho(t));break;default:Ho(t)}e=e.sibling}}function p0(e,t){for(;Mt!==null;){var r=Mt;switch(r.tag){case 0:case 11:case 15:Cr(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:$a(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,m=a.return;if(a0(a),a===r){Mt=null;break e}if(d!==null){d.return=m,Mt=d;break e}Mt=m}}}var dC={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}},hC=typeof WeakMap=="function"?WeakMap:Map,it=0,ct=null,Ke=null,We=0,at=0,sn=null,Tr=!1,Qi=!1,cf=!1,ir=0,vt=0,kr=0,ui=0,ff=0,un=0,Ji=0,yl=null,Wt=null,df=!1,qo=0,g0=0,Po=1/0,Fo=null,Ar=null,Nt=0,Nr=null,Wi=null,ar=0,hf=0,mf=null,y0=null,bl=0,pf=null;function cn(){return(it&2)!==0&&We!==0?We&-We:Z.T!==null?Ef():Mp()}function b0(){if(un===0)if((We&536870912)===0||et){var e=Gr;Gr<<=1,(Gr&3932160)===0&&(Gr=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)&&($i(e,0),Rr(e,We,un,!1)),Ua(e,r),((it&2)===0||e!==ct)&&(e===ct&&((it&2)===0&&(ui|=r),vt===4&&Rr(e,We,un,!1)),Un(e))}function v0(e,t,r){if((it&6)!==0)throw Error(o(327));var a=!r&&(t&127)===0&&(t&e.expiredLanes)===0||Ia(e,t),d=a?gC(e,t):yf(e,t,!0),m=a;do{if(d===0){Qi&&!a&&Rr(e,t,0,!1);break}else{if(r=e.current.alternate,m&&!mC(r)){d=yf(e,t,!1),m=!1;continue}if(d===2){if(m=t,e.errorRecoveryDisabledLanes&m)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=yl;var G=O.current.memoizedState.isDehydrated;if(G&&($i(O,x).flags|=256),x=yf(O,x,!1),x!==2){if(cf&&!G){O.errorRecoveryDisabledLanes|=m,ui|=m,d=4;break e}m=Wt,Wt=d,m!==null&&(Wt===null?Wt=m:Wt.push.apply(Wt,m))}d=x}if(m=!1,d!==2)continue}}if(d===1){$i(e,0),Rr(e,t,0,!0);break}e:{switch(a=e,m=d,m){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Rr(a,t,un,!Tr);break e;case 2:Wt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(d=qo+300-_e(),10<d)){if(Rr(a,t,un,!Tr),Wl(a,0,!0)!==0)break e;ar=t,a.timeoutHandle=Q0(S0.bind(null,a,r,Wt,Fo,df,t,un,ui,Ji,Tr,m,"Throttled",-0,0),d);break e}S0(a,r,Wt,Fo,df,t,un,ui,Ji,Tr,m,null,-0,0)}}break}while(!0);Un(e)}function S0(e,t,r,a,d,m,x,O,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:Yn},d0(t,m,ye);var Ne=(m&62914560)===m?qo-_e():(m&4194048)===m?g0-_e():0;if(Ne=WC(ye,Ne),Ne!==null){ar=m,e.cancelPendingCommit=Ne(A0.bind(null,e,t,m,r,a,d,x,O,G,me,ye,null,ue,fe)),Rr(e,m,x,!oe);return}}A0(e,t,m,r,a,d,x,O,G)}function mC(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],m=d.getSnapshot;d=d.value;try{if(!rn(m(),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 Rr(e,t,r,a){t&=~ff,t&=~ui,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var d=t;0<d;){var m=31-Ze(d),x=1<<m;a[m]=-1,d&=~x}r!==0&&Rp(e,r,t)}function Yo(){return(it&6)===0?(vl(0),!1):!0}function gf(){if(Ke!==null){if(at===0)var e=Ke.return;else e=Ke,Zn=ei=null,Oc(e),Fi=null,tl=0,e=Ke;for(;e!==null;)Jy(e.alternate,e),e=e.return;Ke=null}}function $i(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,DC(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),ar=0,gf(),ct=e,Ke=r=Gn(e.current,null),We=t,at=0,sn=null,Tr=!1,Qi=Ia(e,t),cf=!1,Ji=un=ff=ui=kr=vt=0,Wt=yl=null,df=!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),m=1<<d;t|=e[d],a&=~m}return ir=t,co(),r}function E0(e,t){He=null,Z.H=ul,t===Pi||t===vo?(t=Bg(),at=3):t===vc?(t=Bg(),at=4):at=t===Xc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,sn=t,Ke===null&&(vt=1,Mo(e,yn(t,e.current)))}function x0(){var e=ln.current;return e===null?!0:(We&4194048)===We?En===null:(We&62914560)===We||(We&536870912)!==0?e===En:!1}function _0(){var e=Z.H;return Z.H=ul,e===null?ul:e}function w0(){var e=Z.A;return Z.A=dC,e}function Vo(){vt=4,Tr||(We&4194048)!==We&&ln.current!==null||(Qi=!0),(kr&134217727)===0&&(ui&134217727)===0||ct===null||Rr(ct,We,un,!1)}function yf(e,t,r){var a=it;it|=2;var d=_0(),m=w0();(ct!==e||We!==t)&&(Fo=null,$i(e,t)),t=!1;var x=vt;e:do try{if(at!==0&&Ke!==null){var O=Ke,G=sn;switch(at){case 8:gf(),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,ea(e,O,G,oe),r&&Qi){x=0;break e}break;default:oe=at,at=0,sn=null,ea(e,O,G,oe)}}pC(),x=vt;break}catch(me){E0(e,me)}while(!0);return t&&e.shellSuspendCounter++,Zn=ei=null,it=a,Z.H=d,Z.A=m,Ke===null&&(ct=null,We=0,co()),x}function pC(){for(;Ke!==null;)C0(Ke)}function gC(e,t){var r=it;it|=2;var a=_0(),d=w0();ct!==e||We!==t?(Fo=null,Po=_e()+500,$i(e,t)):Qi=Ia(e,t);e:do try{if(at!==0&&Ke!==null){t=Ke;var m=sn;t:switch(at){case 1:at=0,sn=null,ea(e,t,m,1);break;case 2:case 9:if(jg(m)){at=0,sn=null,T0(t);break}t=function(){at!==2&&at!==9||ct!==e||(at=7),Un(e)},m.then(t,t);break e;case 3:at=7;break e;case 4:at=5;break e;case 7:jg(m)?(at=0,sn=null,T0(t)):(at=0,sn=null,ea(e,t,m,7));break;case 5:var x=null;switch(Ke.tag){case 26:x=Ke.memoizedState;case 5:case 27:var O=Ke;if(x?fb(x):O.stateNode.complete){at=0,sn=null;var G=O.sibling;if(G!==null)Ke=G;else{var oe=O.return;oe!==null?(Ke=oe,Go(oe)):Ke=null}break t}}at=0,sn=null,ea(e,t,m,5);break;case 6:at=0,sn=null,ea(e,t,m,6);break;case 8:gf(),vt=6;break e;default:throw Error(o(462))}}yC();break}catch(me){E0(e,me)}while(!0);return Zn=ei=null,Z.H=a,Z.A=d,it=r,Ke!==null?0:(ct=null,We=0,co(),vt)}function yC(){for(;Ke!==null&&!le();)C0(Ke)}function C0(e){var t=Ky(e.alternate,e,ir);e.memoizedProps=e.pendingProps,t===null?Go(e):Ke=t}function T0(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=Fy(r,t,t.pendingProps,t.type,void 0,We);break;case 11:t=Fy(r,t,t.pendingProps,t.type.render,t.ref,We);break;case 5:Oc(t);default:Jy(r,t),t=Ke=wg(t,ir),t=Ky(r,t,ir)}e.memoizedProps=e.pendingProps,t===null?Go(e):Ke=t}function ea(e,t,r,a){Zn=ei=null,Oc(t),Fi=null,tl=0;var d=t.return;try{if(aC(e,d,t,r,We)){vt=1,Mo(e,yn(r,e.current)),Ke=null;return}}catch(m){if(d!==null)throw Ke=d,m;vt=1,Mo(e,yn(r,e.current)),Ke=null;return}t.flags&32768?(et||a===1?e=!0:Qi||(We&536870912)!==0?e=!1:(Tr=e=!0,(a===2||a===9||a===3||a===6)&&(a=ln.current,a!==null&&a.tag===13&&(a.flags|=16384))),k0(t,e)):Go(t)}function Go(e){var t=e;do{if((t.flags&32768)!==0){k0(t,Tr);return}e=t.return;var r=sC(t.alternate,t,ir);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 k0(e,t){do{var r=uC(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 A0(e,t,r,a,d,m,x,O,G){e.cancelPendingCommit=null;do Xo();while(Nt!==0);if((it&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(m=t.lanes|t.childLanes,m|=ic,Qw(e,r,m,x,O,G),e===ct&&(Ke=ct=null,We=0),Wi=t,Nr=e,ar=r,hf=m,mf=d,y0=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,EC(Ce,function(){return M0(),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{cC(e,t,r)}finally{it=x,Q.p=d,Z.T=a}}Nt=1,N0(),R0(),O0()}}function N0(){if(Nt===1){Nt=0;var e=Nr,t=Wi,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{u0(t,e);var m=Nf,x=pg(e.containerInfo),O=m.focusedElem,G=m.selectionRange;if(x!==O&&O&&O.ownerDocument&&mg(O.ownerDocument.documentElement,O)){if(G!==null&&$u(O)){var oe=G.start,me=G.end;if(me===void 0&&(me=oe),"selectionStart"in O)O.selectionStart=oe,O.selectionEnd=Math.min(me,O.value.length);else{var ye=O.ownerDocument||document,ue=ye&&ye.defaultView||window;if(ue.getSelection){var fe=ue.getSelection(),Ne=O.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=hg(O,Le),J=hg(O,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=O;fe=fe.parentNode;)fe.nodeType===1&&ye.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof O.focus=="function"&&O.focus(),O=0;O<ye.length;O++){var pe=ye[O];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}as=!!Af,Nf=Af=null}finally{it=d,Q.p=a,Z.T=r}}e.current=t,Nt=2}}function R0(){if(Nt===2){Nt=0;var e=Nr,t=Wi,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{i0(e,t.alternate,t)}finally{it=d,Q.p=a,Z.T=r}}Nt=3}}function O0(){if(Nt===4||Nt===3){Nt=0,Ee();var e=Nr,t=Wi,r=ar,a=y0;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Nt=5:(Nt=0,Wi=Nr=null,z0(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(Ar=null),Du(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 m=e.onRecoverableError,x=0;x<a.length;x++){var O=a[x];m(O.value,{componentStack:O.stack})}}finally{Z.T=t,Q.p=d}}(ar&3)!==0&&Xo(),Un(e),d=e.pendingLanes,(r&261930)!==0&&(d&42)!==0?e===pf?bl++:(bl=0,pf=e):bl=0,vl(0)}}function z0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,$a(t)))}function Xo(){return N0(),R0(),O0(),M0()}function M0(){if(Nt!==5)return!1;var e=Nr,t=hf;hf=0;var r=Du(ar),a=Z.T,d=Q.p;try{Q.p=32>r?32:r,Z.T=null,r=mf,mf=null;var m=Nr,x=ar;if(Nt=0,Wi=Nr=null,ar=0,(it&6)!==0)throw Error(o(331));var O=it;if(it|=4,m0(m.current),f0(m,m.current,x,r),it=O,vl(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Xe,m)}catch{}return!0}finally{Q.p=d,Z.T=a,z0(e,t)}}function D0(e,t,r){t=yn(r,t),t=Gc(e.stateNode,t,2),e=xr(e,t,2),e!==null&&(Ua(e,2),Un(e))}function lt(e,t,r){if(e.tag===3)D0(e,e,r);else for(;t!==null;){if(t.tag===3){D0(t,e,r);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ar===null||!Ar.has(a))){e=yn(r,e),r=jy(2),a=xr(t,r,2),a!==null&&(Ly(r,a,t,e),Ua(a,2),Un(a));break}}t=t.return}}function bf(e,t,r){var a=e.pingCache;if(a===null){a=e.pingCache=new hC;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)||(cf=!0,d.add(r),e=bC.bind(null,e,t,r),t.then(e,e))}function bC(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()-qo?(it&2)===0&&$i(e,0):ff|=r,Ji===We&&(Ji=0)),Un(e)}function j0(e,t){t===0&&(t=Np()),e=Jr(e,t),e!==null&&(Ua(e,t),Un(e))}function vC(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),j0(e,r)}function SC(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),j0(e,r)}function EC(e,t){return he(e,t)}var Zo=null,ta=null,vf=!1,Ko=!1,Sf=!1,Or=0;function Un(e){e!==ta&&e.next===null&&(ta===null?Zo=ta=e:ta=ta.next=e),Ko=!0,vf||(vf=!0,_C())}function vl(e,t){if(!Sf&&Ko){Sf=!0;do for(var r=!1,a=Zo;a!==null;){if(e!==0){var d=a.pendingLanes;if(d===0)var m=0;else{var x=a.suspendedLanes,O=a.pingedLanes;m=(1<<31-Ze(42|e)+1)-1,m&=d&~(x&~O),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(r=!0,U0(a,m))}else m=We,m=Wl(a,a===ct?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(m&3)===0||Ia(a,m)||(r=!0,U0(a,m));a=a.next}while(r);Sf=!1}}function xC(){L0()}function L0(){Ko=vf=!1;var e=0;Or!==0&&MC()&&(e=Or);for(var t=_e(),r=null,a=Zo;a!==null;){var d=a.next,m=B0(a,t);m===0?(a.next=null,r===null?Zo=d:r.next=d,d===null&&(ta=r)):(r=a,(e!==0||(m&3)!==0)&&(Ko=!0)),a=d}Nt!==0&&Nt!==5||vl(e),Or!==0&&(Or=0)}function B0(e,t){for(var r=e.suspendedLanes,a=e.pingedLanes,d=e.expirationTimes,m=e.pendingLanes&-62914561;0<m;){var x=31-Ze(m),O=1<<x,G=d[x];G===-1?((O&r)===0||(O&a)!==0)&&(d[x]=Kw(O,t)):G<=t&&(e.expiredLanes|=O),m&=~O}if(t=ct,r=We,r=Wl(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&&ge(a),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Ia(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(a!==null&&ge(a),Du(r)){case 2:case 8:r=be;break;case 32:r=Ce;break;case 268435456:r=Je;break;default:r=Ce}return a=I0.bind(null,e),r=he(r,a),e.callbackPriority=t,e.callbackNode=r,t}return a!==null&&a!==null&&ge(a),e.callbackPriority=2,e.callbackNode=null,2}function I0(e,t){if(Nt!==0&&Nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(Xo()&&e.callbackNode!==r)return null;var a=We;return a=Wl(e,e===ct?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(v0(e,a,t),B0(e,_e()),e.callbackNode!=null&&e.callbackNode===r?I0.bind(null,e):null)}function U0(e,t){if(Xo())return null;v0(e,t,!0)}function _C(){jC(function(){(it&6)!==0?he(te,xC):L0()})}function Ef(){if(Or===0){var e=Hi;e===0&&(e=Ei,Ei<<=1,(Ei&261888)===0&&(Ei=256)),Or=e}return Or}function H0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:no(""+e)}function q0(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 wC(e,t,r,a,d){if(t==="submit"&&r&&r.stateNode===d){var m=H0((d[Xt]||null).action),x=a.submitter;x&&(t=(t=x[Xt]||null)?H0(t.formAction):x.getAttribute("formAction"),t!==null&&(m=t,x=null));var O=new lo("action","action",null,a,d);e.push({event:O,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Or!==0){var G=x?q0(d,x):new FormData(d);Hc(r,{pending:!0,data:G,method:d.method,action:m},null,G)}}else typeof m=="function"&&(O.preventDefault(),G=x?q0(d,x):new FormData(d),Hc(r,{pending:!0,data:G,method:d.method,action:m},m,G))},currentTarget:d}]})}}for(var xf=0;xf<rc.length;xf++){var _f=rc[xf],CC=_f.toLowerCase(),TC=_f[0].toUpperCase()+_f.slice(1);Tn(CC,"on"+TC)}Tn(bg,"onAnimationEnd"),Tn(vg,"onAnimationIteration"),Tn(Sg,"onAnimationStart"),Tn("dblclick","onDoubleClick"),Tn("focusin","onFocus"),Tn("focusout","onBlur"),Tn(P2,"onTransitionRun"),Tn(F2,"onTransitionStart"),Tn(Y2,"onTransitionCancel"),Tn(Eg,"onTransitionEnd"),Ti("onMouseEnter",["mouseout","mouseover"]),Ti("onMouseLeave",["mouseout","mouseover"]),Ti("onPointerEnter",["pointerout","pointerover"]),Ti("onPointerLeave",["pointerout","pointerover"]),Xr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sl="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(" "),kC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Sl));function P0(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 m=void 0;if(t)for(var x=a.length-1;0<=x;x--){var O=a[x],G=O.instance,oe=O.currentTarget;if(O=O.listener,G!==m&&d.isPropagationStopped())break e;m=O,d.currentTarget=oe;try{m(d)}catch(me){uo(me)}d.currentTarget=null,m=G}else for(x=0;x<a.length;x++){if(O=a[x],G=O.instance,oe=O.currentTarget,O=O.listener,G!==m&&d.isPropagationStopped())break e;m=O,d.currentTarget=oe;try{m(d)}catch(me){uo(me)}d.currentTarget=null,m=G}}}}function Qe(e,t){var r=t[ju];r===void 0&&(r=t[ju]=new Set);var a=e+"__bubble";r.has(a)||(F0(t,e,2,!1),r.add(a))}function wf(e,t,r){var a=0;t&&(a|=4),F0(r,e,a,t)}var Qo="_reactListening"+Math.random().toString(36).slice(2);function Cf(e){if(!e[Qo]){e[Qo]=!0,Lp.forEach(function(r){r!=="selectionchange"&&(kC.has(r)||wf(r,!1,e),wf(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Qo]||(t[Qo]=!0,wf("selectionchange",!1,t))}}function F0(e,t,r,a){switch(bb(t)){case 2:var d=tT;break;case 8:d=nT;break;default:d=Hf}r=d.bind(null,t,r,e),d=void 0,!Yu||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 Tf(e,t,r,a,d){var m=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 G=x.tag;if((G===3||G===4)&&x.stateNode.containerInfo===d)return;x=x.return}for(;O!==null;){if(x=_i(O),x===null)return;if(G=x.tag,G===5||G===6||G===26||G===27){a=m=x;continue e}O=O.parentNode}}a=a.return}Zp(function(){var oe=m,me=Pu(r),ye=[];e:{var ue=xg.get(e);if(ue!==void 0){var fe=lo,Ne=e;switch(e){case"keypress":if(io(r)===0)break e;case"keydown":case"keyup":fe=S2;break;case"focusin":Ne="focus",fe=Zu;break;case"focusout":Ne="blur",fe=Zu;break;case"beforeblur":case"afterblur":fe=Zu;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=Jp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=s2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=_2;break;case bg:case vg:case Sg:fe=f2;break;case Eg:fe=C2;break;case"scroll":case"scrollend":fe=l2;break;case"wheel":fe=k2;break;case"copy":case"cut":case"paste":fe=h2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=$p;break;case"toggle":case"beforetoggle":fe=N2}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 pe=J;if(ae=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ae===null||ee===null||(pe=Pa(J,ee),pe!=null&&Le.push(El(J,pe,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!==qu&&(Ne=r.relatedTarget||r.fromElement)&&(_i(Ne)||Ne[xi]))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?_i(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=Jp,pe="onMouseLeave",ee="onMouseEnter",J="mouse",(e==="pointerout"||e==="pointerover")&&(Le=$p,pe="onPointerLeave",ee="onPointerEnter",J="pointer"),ut=fe==null?ue:qa(fe),ae=Ne==null?ue:qa(Ne),ue=new Le(pe,J+"leave",fe,r,me),ue.target=ut,ue.relatedTarget=ae,pe=null,_i(me)===oe&&(Le=new Le(ee,J+"enter",Ne,r,me),Le.target=ae,Le.relatedTarget=ut,pe=Le),ut=pe,fe&&Ne)t:{for(Le=AC,ee=fe,J=Ne,ae=0,pe=ee;pe;pe=Le(pe))ae++;pe=0;for(var De=J;De;De=Le(De))pe++;for(;0<ae-pe;)ee=Le(ee),ae--;for(;0<pe-ae;)J=Le(J),pe--;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&&Y0(ye,ue,fe,Le,!1),Ne!==null&&ut!==null&&Y0(ye,ut,Ne,Le,!0)}}e:{if(ue=oe?qa(oe):window,fe=ue.nodeName&&ue.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ue.type==="file")var tt=og;else if(ag(ue))if(sg)tt=U2;else{tt=B2;var Me=L2}else fe=ue.nodeName,!fe||fe.toLowerCase()!=="input"||ue.type!=="checkbox"&&ue.type!=="radio"?oe&&Hu(oe.elementType)&&(tt=og):tt=I2;if(tt&&(tt=tt(e,oe))){lg(ye,tt,r,me);break e}Me&&Me(e,ue,oe),e==="focusout"&&oe&&ue.type==="number"&&oe.memoizedProps.value!=null&&Uu(ue,"number",ue.value)}switch(Me=oe?qa(oe):window,e){case"focusin":(ag(Me)||Me.contentEditable==="true")&&(zi=Me,ec=oe,Qa=null);break;case"focusout":Qa=ec=zi=null;break;case"mousedown":tc=!0;break;case"contextmenu":case"mouseup":case"dragend":tc=!1,gg(ye,r,me);break;case"selectionchange":if(q2)break;case"keydown":case"keyup":gg(ye,r,me)}var Fe;if(Qu)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 Oi?rg(e,r)&&($e="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&($e="onCompositionStart");$e&&(eg&&r.locale!=="ko"&&(Oi||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&Oi&&(Fe=Kp()):(pr=me,Vu="value"in pr?pr.value:pr.textContent,Oi=!0)),Me=Jo(oe,$e),0<Me.length&&($e=new Wp($e,e,null,r,me),ye.push({event:$e,listeners:Me}),Fe?$e.data=Fe:(Fe=ig(r),Fe!==null&&($e.data=Fe)))),(Fe=O2?z2(e,r):M2(e,r))&&($e=Jo(oe,"onBeforeInput"),0<$e.length&&(Me=new Wp("onBeforeInput","beforeinput",null,r,me),ye.push({event:Me,listeners:$e}),Me.data=Fe)),wC(ye,e,oe,r,me)}P0(ye,t)})}function El(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Jo(e,t){for(var r=t+"Capture",a=[];e!==null;){var d=e,m=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=Pa(e,r),d!=null&&a.unshift(El(e,d,m)),d=Pa(e,t),d!=null&&a.push(El(e,d,m))),e.tag===3)return a;e=e.return}return[]}function AC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Y0(e,t,r,a,d){for(var m=t._reactName,x=[];r!==null&&r!==a;){var O=r,G=O.alternate,oe=O.stateNode;if(O=O.tag,G!==null&&G===a)break;O!==5&&O!==26&&O!==27||oe===null||(G=oe,d?(oe=Pa(r,m),oe!=null&&x.unshift(El(r,oe,G))):d||(oe=Pa(r,m),oe!=null&&x.push(El(r,oe,G)))),r=r.return}x.length!==0&&e.push({event:t,listeners:x})}var NC=/\r\n?/g,RC=/\u0000|\uFFFD/g;function V0(e){return(typeof e=="string"?e:""+e).replace(NC,`
|
|
9
|
-
`).replace(RC,"")}function G0(e,t){return t=V0(t),V0(e)===t}function st(e,t,r,a,d,m){switch(r){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ai(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ai(e,""+a);break;case"className":eo(e,"class",a);break;case"tabIndex":eo(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":eo(e,r,a);break;case"style":Gp(e,a,m);break;case"data":if(t!=="object"){eo(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=no(""+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 m=="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=no(""+a),e.setAttribute(r,a);break;case"onClick":a!=null&&(e.onclick=Yn);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=no(""+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),$l(e,"popover",a);break;case"xlinkActuate":Fn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Fn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Fn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Fn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Fn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Fn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":$l(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=i2.get(r)||r,$l(e,r,a))}}function kf(e,t,r,a,d,m){switch(r){case"style":Gp(e,a,m);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"?Ai(e,a):(typeof a=="number"||typeof a=="bigint")&&Ai(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=Yn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Bp.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(d=r.endsWith("Capture"),t=r.slice(2,d?r.length-7:void 0),m=e[Xt]||null,m=m!=null?m[r]:null,typeof m=="function"&&e.removeEventListener(t,m,d),typeof a=="function")){typeof m!="function"&&m!==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,""):$l(e,r,a)}}}function It(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,m;for(m in r)if(r.hasOwnProperty(m)){var x=r[m];if(x!=null)switch(m){case"src":a=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,m,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=m=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":m=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)}}Pp(e,m,O,G,oe,x,d,!1);return;case"select":Qe("invalid",e),a=x=m=null;for(d in r)if(r.hasOwnProperty(d)&&(O=r[d],O!=null))switch(d){case"value":m=O;break;case"defaultValue":x=O;break;case"multiple":a=O;default:st(e,t,d,O,r,null)}t=m,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),m=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":m=O;break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(o(91));break;default:st(e,t,x,O,r,null)}Yp(e,a,d,m);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<Sl.length;a++)Qe(Sl[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(Hu(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 OC(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,m=null,x=null,O=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":m=fe;break;case"name":d=fe;break;case"checked":oe=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!==ye&&st(e,t,ue,fe,a,ye)}}Iu(e,x,O,G,oe,me,m,d);return;case"select":fe=x=O=ue=null;for(m in r)if(G=r[m],r.hasOwnProperty(m)&&G!=null)switch(m){case"value":break;case"multiple":fe=G;default:a.hasOwnProperty(m)||st(e,t,m,null,a,G)}for(d in a)if(m=a[d],G=r[d],a.hasOwnProperty(d)&&(m!=null||G!=null))switch(d){case"value":ue=m;break;case"defaultValue":O=m;break;case"multiple":x=m;default:m!==G&&st(e,t,d,m,a,G)}t=O,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(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],m=r[x],a.hasOwnProperty(x)&&(d!=null||m!=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!==m&&st(e,t,x,d,a,m)}Fp(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(Hu(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 X0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function zC(){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],m=d.transferSize,x=d.initiatorType,O=d.duration;if(m&&O&&X0(x)){for(x=0,O=d.responseEnd,a+=1;a<r.length;a++){var G=r[a],oe=G.startTime;if(oe>O)break;var me=G.transferSize,ye=G.initiatorType;me&&X0(ye)&&(G=G.responseEnd,x+=me*(G<O?1:(O-oe)/(G-oe)))}if(--a,t+=8*(m+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 Af=null,Nf=null;function Wo(e){return e.nodeType===9?e:e.ownerDocument}function Z0(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 K0(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 Rf(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 Of=null;function MC(){var e=window.event;return e&&e.type==="popstate"?e===Of?!1:(Of=e,!0):(Of=null,!1)}var Q0=typeof setTimeout=="function"?setTimeout:void 0,DC=typeof clearTimeout=="function"?clearTimeout:void 0,J0=typeof Promise=="function"?Promise:void 0,jC=typeof queueMicrotask=="function"?queueMicrotask:typeof J0<"u"?function(e){return J0.resolve(null).then(e).catch(LC)}:Q0;function LC(e){setTimeout(function(){throw e})}function zr(e){return e==="head"}function W0(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),aa(t);return}a--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")a++;else if(r==="html")xl(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,xl(r);for(var m=r.firstChild;m;){var x=m.nextSibling,O=m.nodeName;m[Ha]||O==="SCRIPT"||O==="STYLE"||O==="LINK"&&m.rel.toLowerCase()==="stylesheet"||r.removeChild(m),m=x}}else r==="body"&&xl(e.ownerDocument.body);r=d}while(r);aa(t)}function $0(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 zf(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":zf(r),Lu(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function BC(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[Ha])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(m=e.getAttribute("rel"),m==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(m!==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(m=e.getAttribute("src"),(m!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===m)return e}else return e;if(e=xn(e.nextSibling),e===null)break}return null}function IC(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 eb(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 Mf(e){return e.data==="$?"||e.data==="$~"}function Df(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function UC(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 jf=null;function tb(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 nb(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 rb(e,t,r){switch(t=Wo(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 xl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Lu(e)}var _n=new Map,ib=new Set;function $o(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var lr=Q.d;Q.d={f:HC,r:qC,D:PC,C:FC,L:YC,m:VC,X:XC,S:GC,M:ZC};function HC(){var e=lr.f(),t=Yo();return e||t}function qC(e){var t=wi(e);t!==null&&t.tag===5&&t.type==="form"?Ey(t):lr.r(e)}var na=typeof document>"u"?null:document;function ab(e,t,r){var a=na;if(a&&typeof t=="string"&&t){var d=pn(t);d='link[rel="'+e+'"][href="'+d+'"]',typeof r=="string"&&(d+='[crossorigin="'+r+'"]'),ib.has(d)||(ib.add(d),e={rel:e,crossOrigin:r,href:t},a.querySelector(d)===null&&(t=a.createElement("link"),It(t,"link",e),zt(t),a.head.appendChild(t)))}}function PC(e){lr.D(e),ab("dns-prefetch",e,null)}function FC(e,t){lr.C(e,t),ab("preconnect",e,t)}function YC(e,t,r){lr.L(e,t,r);var a=na;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 m=d;switch(t){case"style":m=ra(e);break;case"script":m=ia(e)}_n.has(m)||(e=b({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),_n.set(m,e),a.querySelector(d)!==null||t==="style"&&a.querySelector(_l(m))||t==="script"&&a.querySelector(wl(m))||(t=a.createElement("link"),It(t,"link",e),zt(t),a.head.appendChild(t)))}}function VC(e,t){lr.m(e,t);var r=na;if(r&&e){var a=t&&typeof t.as=="string"?t.as:"script",d='link[rel="modulepreload"][as="'+pn(a)+'"][href="'+pn(e)+'"]',m=d;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=ia(e)}if(!_n.has(m)&&(e=b({rel:"modulepreload",href:e},t),_n.set(m,e),r.querySelector(d)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(wl(m)))return}a=r.createElement("link"),It(a,"link",e),zt(a),r.head.appendChild(a)}}}function GC(e,t,r){lr.S(e,t,r);var a=na;if(a&&e){var d=Ci(a).hoistableStyles,m=ra(e);t=t||"default";var x=d.get(m);if(!x){var O={loading:0,preload:null};if(x=a.querySelector(_l(m)))O.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},r),(r=_n.get(m))&&Lf(e,r);var G=x=a.createElement("link");zt(G),It(G,"link",e),G._p=new Promise(function(oe,me){G.onload=oe,G.onerror=me}),G.addEventListener("load",function(){O.loading|=1}),G.addEventListener("error",function(){O.loading|=2}),O.loading|=4,es(x,t,a)}x={type:"stylesheet",instance:x,count:1,state:O},d.set(m,x)}}}function XC(e,t){lr.X(e,t);var r=na;if(r&&e){var a=Ci(r).hoistableScripts,d=ia(e),m=a.get(d);m||(m=r.querySelector(wl(d)),m||(e=b({src:e,async:!0},t),(t=_n.get(d))&&Bf(e,t),m=r.createElement("script"),zt(m),It(m,"link",e),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},a.set(d,m))}}function ZC(e,t){lr.M(e,t);var r=na;if(r&&e){var a=Ci(r).hoistableScripts,d=ia(e),m=a.get(d);m||(m=r.querySelector(wl(d)),m||(e=b({src:e,async:!0,type:"module"},t),(t=_n.get(d))&&Bf(e,t),m=r.createElement("script"),zt(m),It(m,"link",e),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},a.set(d,m))}}function lb(e,t,r,a){var d=(d=we.current)?$o(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=ra(r.href),r=Ci(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=ra(r.href);var m=Ci(d).hoistableStyles,x=m.get(e);if(x||(d=d.ownerDocument||d,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(e,x),(m=d.querySelector(_l(e)))&&!m._p&&(x.instance=m,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),m||KC(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=ia(r),r=Ci(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 ra(e){return'href="'+pn(e)+'"'}function _l(e){return'link[rel="stylesheet"]['+e+"]"}function ob(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function KC(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}),It(t,"link",r),zt(t),e.head.appendChild(t))}function ia(e){return'[src="'+pn(e)+'"]'}function wl(e){return"script[async]"+e}function sb(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=b({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),zt(a),It(a,"style",d),es(a,r.precedence,e),t.instance=a;case"stylesheet":d=ra(r.href);var m=e.querySelector(_l(d));if(m)return t.state.loading|=4,t.instance=m,zt(m),m;a=ob(r),(d=_n.get(d))&&Lf(a,d),m=(e.ownerDocument||e).createElement("link"),zt(m);var x=m;return x._p=new Promise(function(O,G){x.onload=O,x.onerror=G}),It(m,"link",a),t.state.loading|=4,es(m,r.precedence,e),t.instance=m;case"script":return m=ia(r.src),(d=e.querySelector(wl(m)))?(t.instance=d,zt(d),d):(a=r,(d=_n.get(m))&&(a=b({},r),Bf(a,d)),e=e.ownerDocument||e,d=e.createElement("script"),zt(d),It(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,es(a,r.precedence,e));return t.instance}function es(e,t,r){for(var a=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=a.length?a[a.length-1]:null,m=d,x=0;x<a.length;x++){var O=a[x];if(O.dataset.precedence===t)m=O;else if(m!==d)break}m?m.parentNode.insertBefore(e,m.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function Lf(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 ts=null;function ub(e,t,r){if(ts===null){var a=new Map,d=ts=new Map;d.set(r,a)}else d=ts,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 m=r[d];if(!(m[Ha]||m[Dt]||e==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var x=m.getAttribute(t)||"";x=e+x;var O=a.get(x);O?O.push(m):a.set(x,[m])}}return a}function cb(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function QC(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 fb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function JC(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=ra(a.href),m=t.querySelector(_l(d));if(m){t=m._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ns.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=m,zt(m);return}m=t.ownerDocument||t,a=ob(a),(d=_n.get(d))&&Lf(a,d),m=m.createElement("link"),zt(m);var x=m;x._p=new Promise(function(O,G){x.onload=O,x.onerror=G}),It(m,"link",a),r.instance=m}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=ns.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var If=0;function WC(e,t){return e.stylesheets&&e.count===0&&is(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var a=setTimeout(function(){if(e.stylesheets&&is(e,e.stylesheets),e.unsuspend){var m=e.unsuspend;e.unsuspend=null,m()}},6e4+t);0<e.imgBytes&&If===0&&(If=62500*zC());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&is(e,e.stylesheets),e.unsuspend)){var m=e.unsuspend;e.unsuspend=null,m()}},(e.imgBytes>If?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(d)}}:null}function ns(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)is(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var rs=null;function is(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,rs=new Map,t.forEach($C,e),rs=null,ns.call(e))}function $C(e,t){if(!(t.state.loading&4)){var r=rs.get(e);if(r)var a=r.get(null);else{r=new Map,rs.set(e,r);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<d.length;m++){var x=d[m];(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"),m=r.get(x)||a,m===a&&r.set(null,d),r.set(x,d),this.count++,a=ns.bind(this),d.addEventListener("load",a),d.addEventListener("error",a),m?m.parentNode.insertBefore(d,m.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),t.state.loading|=4}}var Cl={$$typeof:A,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function eT(e,t,r,a,d,m,x,O,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=zu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zu(0),this.hiddenUpdates=zu(null),this.identifierPrefix=a,this.onUncaughtError=d,this.onCaughtError=m,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function db(e,t,r,a,d,m,x,O,G,oe,me,ye){return e=new eT(e,t,r,x,G,oe,me,ye,O),t=1,m===!0&&(t|=24),m=an(3,null,null,t),e.current=m,m.stateNode=e,t=gc(),t.refCount++,e.pooledCache=t,t.refCount++,m.memoizedState={element:a,isDehydrated:r,cache:t},Sc(m),e}function hb(e){return e?(e=ji,e):ji}function mb(e,t,r,a,d,m){d=hb(d),a.context===null?a.context=d:a.pendingContext=d,a=Er(t),a.payload={element:r},m=m===void 0?null:m,m!==null&&(a.callback=m),r=xr(e,a,t),r!==null&&($t(r,e,t),rl(r,e,t))}function pb(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Uf(e,t){pb(e,t),(e=e.alternate)&&pb(e,t)}function gb(e){if(e.tag===13||e.tag===31){var t=Jr(e,67108864);t!==null&&$t(t,e,67108864),Uf(e,67108864)}}function yb(e){if(e.tag===13||e.tag===31){var t=cn();t=Mu(t);var r=Jr(e,t);r!==null&&$t(r,e,t),Uf(e,t)}}var as=!0;function tT(e,t,r,a){var d=Z.T;Z.T=null;var m=Q.p;try{Q.p=2,Hf(e,t,r,a)}finally{Q.p=m,Z.T=d}}function nT(e,t,r,a){var d=Z.T;Z.T=null;var m=Q.p;try{Q.p=8,Hf(e,t,r,a)}finally{Q.p=m,Z.T=d}}function Hf(e,t,r,a){if(as){var d=qf(a);if(d===null)Tf(e,t,a,ls,r),vb(e,a);else if(iT(d,e,t,r,a))a.stopPropagation();else if(vb(e,a),t&4&&-1<rT.indexOf(e)){for(;d!==null;){var m=wi(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var x=hn(m.pendingLanes);if(x!==0){var O=m;for(O.pendingLanes|=2,O.entangledLanes|=2;x;){var G=1<<31-Ze(x);O.entanglements[1]|=G,x&=~G}Un(m),(it&6)===0&&(Po=_e()+500,vl(0))}}break;case 31:case 13:O=Jr(m,2),O!==null&&$t(O,m,2),Yo(),Uf(m,2)}if(m=qf(a),m===null&&Tf(e,t,a,ls,r),m===d)break;d=m}d!==null&&a.stopPropagation()}else Tf(e,t,a,null,r)}}function qf(e){return e=Pu(e),Pf(e)}var ls=null;function Pf(e){if(ls=null,e=_i(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 ls=e,null}function bb(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 Be:return 32;case Je:return 268435456;default:return 32}default:return 32}}var Ff=!1,Mr=null,Dr=null,jr=null,Tl=new Map,kl=new Map,Lr=[],rT="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 vb(e,t){switch(e){case"focusin":case"focusout":Mr=null;break;case"dragenter":case"dragleave":Dr=null;break;case"mouseover":case"mouseout":jr=null;break;case"pointerover":case"pointerout":Tl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(t.pointerId)}}function Al(e,t,r,a,d,m){return e===null||e.nativeEvent!==m?(e={blockedOn:t,domEventName:r,eventSystemFlags:a,nativeEvent:m,targetContainers:[d]},t!==null&&(t=wi(t),t!==null&&gb(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,d!==null&&t.indexOf(d)===-1&&t.push(d),e)}function iT(e,t,r,a,d){switch(t){case"focusin":return Mr=Al(Mr,e,t,r,a,d),!0;case"dragenter":return Dr=Al(Dr,e,t,r,a,d),!0;case"mouseover":return jr=Al(jr,e,t,r,a,d),!0;case"pointerover":var m=d.pointerId;return Tl.set(m,Al(Tl.get(m)||null,e,t,r,a,d)),!0;case"gotpointercapture":return m=d.pointerId,kl.set(m,Al(kl.get(m)||null,e,t,r,a,d)),!0}return!1}function Sb(e){var t=_i(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,Dp(e.priority,function(){yb(r)});return}}else if(t===31){if(t=f(r),t!==null){e.blockedOn=t,Dp(e.priority,function(){yb(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 os(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=qf(e.nativeEvent);if(r===null){r=e.nativeEvent;var a=new r.constructor(r.type,r);qu=a,r.target.dispatchEvent(a),qu=null}else return t=wi(r),t!==null&&gb(t),e.blockedOn=r,!1;t.shift()}return!0}function Eb(e,t,r){os(e)&&r.delete(t)}function aT(){Ff=!1,Mr!==null&&os(Mr)&&(Mr=null),Dr!==null&&os(Dr)&&(Dr=null),jr!==null&&os(jr)&&(jr=null),Tl.forEach(Eb),kl.forEach(Eb)}function ss(e,t){e.blockedOn===t&&(e.blockedOn=null,Ff||(Ff=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,aT)))}var us=null;function xb(e){us!==e&&(us=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){us===e&&(us=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(Pf(a||r)===null)continue;break}var m=wi(r);m!==null&&(e.splice(t,3),t-=3,Hc(m,{pending:!0,data:d,method:r.method,action:a},a,d))}}))}function aa(e){function t(G){return ss(G,e)}Mr!==null&&ss(Mr,e),Dr!==null&&ss(Dr,e),jr!==null&&ss(jr,e),Tl.forEach(t),kl.forEach(t);for(var r=0;r<Lr.length;r++){var a=Lr[r];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Lr.length&&(r=Lr[0],r.blockedOn===null);)Sb(r),r.blockedOn===null&&Lr.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(a=0;a<r.length;a+=3){var d=r[a],m=r[a+1],x=d[Xt]||null;if(typeof m=="function")x||xb(r);else if(x){var O=null;if(m&&m.hasAttribute("formAction")){if(d=m,x=m[Xt]||null)O=x.formAction;else if(Pf(d)!==null)continue}else O=x.action;typeof O=="function"?r[a+1]=O:(r.splice(a,3),a-=3),xb(r)}}}function _b(){function e(m){m.canIntercept&&m.info==="react-transition"&&m.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 m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.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 Yf(e){this._internalRoot=e}cs.prototype.render=Yf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var r=t.current,a=cn();mb(r,a,e,t,null,null)},cs.prototype.unmount=Yf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mb(e.current,2,null,e,null,null),Yo(),t[xi]=null}};function cs(e){this._internalRoot=e}cs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Mp();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Lr.length&&t!==0&&t<Lr[r].priority;r++);Lr.splice(r,0,e),r===0&&Sb(e)}};var wb=l.version;if(wb!=="19.2.0")throw Error(o(527,wb,"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=p(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var lT={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fs.isDisabled&&fs.supportsFiber)try{Xe=fs.inject(lT),gt=fs}catch{}}return sa.createRoot=function(e,t){if(!u(e))throw Error(o(299));var r=!1,a="",d=Oy,m=zy,x=My;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&&(m=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=db(e,1,!1,null,null,r,a,null,d,m,x,_b),e[xi]=t.current,Cf(e),new Yf(t)},sa.hydrateRoot=function(e,t,r){if(!u(e))throw Error(o(299));var a=!1,d="",m=Oy,x=zy,O=My,G=null;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onUncaughtError!==void 0&&(m=r.onUncaughtError),r.onCaughtError!==void 0&&(x=r.onCaughtError),r.onRecoverableError!==void 0&&(O=r.onRecoverableError),r.formState!==void 0&&(G=r.formState)),t=db(e,1,!0,t,r??null,a,d,G,m,x,O,_b),t.context=hb(null),r=t.current,a=cn(),a=Mu(a),d=Er(a),d.callback=null,xr(r,d,a),r=a,t.current.lanes=r,Ua(t,r),Un(t),e[xi]=t.current,Cf(e),new cs(t)},sa.version="19.2.0",sa}var nd;function Mb(){if(nd)return gs.exports;nd=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(),gs.exports=zb(),gs.exports}var Db=Mb();ed();function rd(n,l){if(typeof n=="function")return n(l);n!=null&&(n.current=l)}function Ss(...n){return l=>{let i=!1;const o=n.map(u=>{const s=rd(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():rd(n[u],null)}}}}function Hn(...n){return P.useCallback(Ss(...n),n)}function jb(n){const l=Lb(n),i=P.forwardRef((o,u)=>{const{children:s,...c}=o,f=P.Children.toArray(s),h=f.find(Ib);if(h){const p=h.props.children,g=f.map(b=>b===h?P.Children.count(p)>1?P.Children.only(null):P.isValidElement(p)?p.props.children:null:b);return M.jsx(l,{...c,ref:u,children:P.isValidElement(p)?P.cloneElement(p,void 0,g):null})}return M.jsx(l,{...c,ref:u,children:s})});return i.displayName=`${n}.Slot`,i}function Lb(n){const l=P.forwardRef((i,o)=>{const{children:u,...s}=i;if(P.isValidElement(u)){const c=Hb(u),f=Ub(s,u.props);return u.type!==P.Fragment&&(f.ref=o?Ss(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 Bb=Symbol("radix.slottable");function Ib(n){return P.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Bb}function Ub(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 Hb(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 qb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],or=qb.reduce((n,l)=>{const i=jb(`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),M.jsx(h,{...f,ref:s})});return o.displayName=`Primitive.${l}`,{...n,[l]:o}},{}),sr=globalThis?.document?P.useLayoutEffect:()=>{};function Pb(n,l){return P.useReducer((i,o)=>l[i][o]??i,n)}var ci=n=>{const{present:l,children:i}=n,o=Fb(l),u=typeof i=="function"?i({present:o.isPresent}):P.Children.only(i),s=Hn(o.ref,Yb(u));return typeof i=="function"||o.isPresent?P.cloneElement(u,{ref:s}):null};ci.displayName="Presence";function Fb(n){const[l,i]=P.useState(),o=P.useRef(null),u=P.useRef(n),s=P.useRef("none"),c=n?"mounted":"unmounted",[f,h]=Pb(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const p=Ol(o.current);s.current=f==="mounted"?p:"none"},[f]),sr(()=>{const p=o.current,g=u.current;if(g!==n){const v=s.current,y=Ol(p);n?h("MOUNT"):y==="none"||p?.display==="none"?h("UNMOUNT"):h(g&&v!==y?"ANIMATION_OUT":"UNMOUNT"),u.current=n}},[n,h]),sr(()=>{if(l){let p;const g=l.ownerDocument.defaultView??window,b=y=>{const E=Ol(o.current).includes(CSS.escape(y.animationName));if(y.target===l&&E&&(h("ANIMATION_END"),!u.current)){const T=l.style.animationFillMode;l.style.animationFillMode="forwards",p=g.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=T)})}},v=y=>{y.target===l&&(s.current=Ol(o.current))};return l.addEventListener("animationstart",v),l.addEventListener("animationcancel",b),l.addEventListener("animationend",b),()=>{g.clearTimeout(p),l.removeEventListener("animationstart",v),l.removeEventListener("animationcancel",b),l.removeEventListener("animationend",b)}}else h("ANIMATION_END")},[l,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:P.useCallback(p=>{o.current=p?getComputedStyle(p):null,i(p)},[])}}function Ol(n){return n?.animationName||"none"}function Yb(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 id(n,l=[]){let i=[];function o(s,c){const f=P.createContext(c),h=i.length;i=[...i,c];const p=b=>{const{scope:v,children:y,...C}=b,E=v?.[n]?.[h]||f,T=P.useMemo(()=>C,Object.values(C));return M.jsx(E.Provider,{value:T,children:y})};p.displayName=s+"Provider";function g(b,v){const y=v?.[n]?.[h]||f,C=P.useContext(y);if(C)return C;if(c!==void 0)return c;throw new Error(`\`${b}\` must be used within \`${s}\``)}return[p,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,Vb(u,...l)]}function Vb(...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:p})=>{const b=h(s)[`__scope${p}`];return{...f,...b}},{});return P.useMemo(()=>({[`__scope${l.scopeName}`]:c}),[c])}};return i.scopeName=l.scopeName,i}function ur(n){const l=P.useRef(n);return P.useEffect(()=>{l.current=n}),P.useMemo(()=>(...i)=>l.current?.(...i),[])}var Gb=P.createContext(void 0);function Xb(n){const l=P.useContext(Gb);return n||l||"ltr"}function Zb(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 Kb(n,l){return P.useReducer((i,o)=>l[i][o]??i,n)}var Es="ScrollArea",[ad]=id(Es),[Qb,fn]=ad(Es),ld=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,type:o="hover",dir:u,scrollHideDelay:s=600,...c}=n,[f,h]=P.useState(null),[p,g]=P.useState(null),[b,v]=P.useState(null),[y,C]=P.useState(null),[E,T]=P.useState(null),[_,k]=P.useState(0),[A,q]=P.useState(0),[H,R]=P.useState(!1),[I,Y]=P.useState(!1),F=Hn(l,ie=>h(ie)),$=Xb(u);return M.jsx(Qb,{scope:i,type:o,dir:$,scrollHideDelay:s,scrollArea:f,viewport:p,onViewportChange:g,content:b,onContentChange:v,scrollbarX:y,onScrollbarXChange:C,scrollbarXEnabled:H,onScrollbarXEnabledChange:R,scrollbarY:E,onScrollbarYChange:T,scrollbarYEnabled:I,onScrollbarYEnabledChange:Y,onCornerWidthChange:k,onCornerHeightChange:q,children:M.jsx(or.div,{dir:$,...c,ref:F,style:{position:"relative","--radix-scroll-area-corner-width":_+"px","--radix-scroll-area-corner-height":A+"px",...n.style}})})});ld.displayName=Es;var od="ScrollAreaViewport",sd=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,children:o,nonce:u,...s}=n,c=fn(od,i),f=P.useRef(null),h=Hn(l,f,c.onViewportChange);return M.jsxs(M.Fragment,{children:[M.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}),M.jsx(or.div,{"data-radix-scroll-area-viewport":"",...s,ref:h,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...n.style},children:M.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});sd.displayName=od;var Nn="ScrollAreaScrollbar",xs=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"?M.jsx(Jb,{...o,ref:l,forceMount:i}):u.type==="scroll"?M.jsx(Wb,{...o,ref:l,forceMount:i}):u.type==="auto"?M.jsx(ud,{...o,ref:l,forceMount:i}):u.type==="always"?M.jsx(_s,{...o,ref:l}):null});xs.displayName=Nn;var Jb=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 h=0;if(f){const p=()=>{window.clearTimeout(h),c(!0)},g=()=>{h=window.setTimeout(()=>c(!1),u.scrollHideDelay)};return f.addEventListener("pointerenter",p),f.addEventListener("pointerleave",g),()=>{window.clearTimeout(h),f.removeEventListener("pointerenter",p),f.removeEventListener("pointerleave",g)}}},[u.scrollArea,u.scrollHideDelay]),M.jsx(ci,{present:i||s,children:M.jsx(ud,{"data-state":s?"visible":"hidden",...o,ref:l})})}),Wb=P.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=fn(Nn,n.__scopeScrollArea),s=n.orientation==="horizontal",c=jl(()=>h("SCROLL_END"),100),[f,h]=Kb("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 p=window.setTimeout(()=>h("HIDE"),u.scrollHideDelay);return()=>window.clearTimeout(p)}},[f,u.scrollHideDelay,h]),P.useEffect(()=>{const p=u.viewport,g=s?"scrollLeft":"scrollTop";if(p){let b=p[g];const v=()=>{const y=p[g];b!==y&&(h("SCROLL"),c()),b=y};return p.addEventListener("scroll",v),()=>p.removeEventListener("scroll",v)}},[u.viewport,s,h,c]),M.jsx(ci,{present:i||f!=="hidden",children:M.jsx(_s,{"data-state":f==="hidden"?"hidden":"visible",...o,ref:l,onPointerEnter:qn(n.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:qn(n.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),ud=P.forwardRef((n,l)=>{const i=fn(Nn,n.__scopeScrollArea),{forceMount:o,...u}=n,[s,c]=P.useState(!1),f=n.orientation==="horizontal",h=jl(()=>{if(i.viewport){const p=i.viewport.offsetWidth<i.viewport.scrollWidth,g=i.viewport.offsetHeight<i.viewport.scrollHeight;c(f?p:g)}},10);return fi(i.viewport,h),fi(i.content,h),M.jsx(ci,{present:o||s,children:M.jsx(_s,{"data-state":s?"visible":"hidden",...u,ref:l})})}),_s=P.forwardRef((n,l)=>{const{orientation:i="vertical",...o}=n,u=fn(Nn,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}}),p=md(f.viewport,f.content),g={...o,sizes:f,onSizesChange:h,hasThumb:p>0&&p<1,onThumbChange:v=>s.current=v,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:v=>c.current=v};function b(v,y){return iv(v,c.current,f,y)}return i==="horizontal"?M.jsx($b,{...g,ref:l,onThumbPositionChange:()=>{if(u.viewport&&s.current){const v=u.viewport.scrollLeft,y=pd(v,f,u.dir);s.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:v=>{u.viewport&&(u.viewport.scrollLeft=v)},onDragScroll:v=>{u.viewport&&(u.viewport.scrollLeft=b(v,u.dir))}}):i==="vertical"?M.jsx(ev,{...g,ref:l,onThumbPositionChange:()=>{if(u.viewport&&s.current){const v=u.viewport.scrollTop,y=pd(v,f);s.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:v=>{u.viewport&&(u.viewport.scrollTop=v)},onDragScroll:v=>{u.viewport&&(u.viewport.scrollTop=b(v))}}):null}),$b=P.forwardRef((n,l)=>{const{sizes:i,onSizesChange:o,...u}=n,s=fn(Nn,n.__scopeScrollArea),[c,f]=P.useState(),h=P.useRef(null),p=Hn(l,h,s.onScrollbarXChange);return P.useEffect(()=>{h.current&&f(getComputedStyle(h.current))},[h]),M.jsx(fd,{"data-orientation":"horizontal",...u,ref:p,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":Dl(i)+"px",...n.style},onThumbPointerDown:g=>n.onThumbPointerDown(g.x),onDragScroll:g=>n.onDragScroll(g.x),onWheelScroll:(g,b)=>{if(s.viewport){const v=s.viewport.scrollLeft+g.deltaX;n.onWheelScroll(v),yd(v,b)&&g.preventDefault()}},onResize:()=>{h.current&&s.viewport&&c&&o({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:Ml(c.paddingLeft),paddingEnd:Ml(c.paddingRight)}})}})}),ev=P.forwardRef((n,l)=>{const{sizes:i,onSizesChange:o,...u}=n,s=fn(Nn,n.__scopeScrollArea),[c,f]=P.useState(),h=P.useRef(null),p=Hn(l,h,s.onScrollbarYChange);return P.useEffect(()=>{h.current&&f(getComputedStyle(h.current))},[h]),M.jsx(fd,{"data-orientation":"vertical",...u,ref:p,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":Dl(i)+"px",...n.style},onThumbPointerDown:g=>n.onThumbPointerDown(g.y),onDragScroll:g=>n.onDragScroll(g.y),onWheelScroll:(g,b)=>{if(s.viewport){const v=s.viewport.scrollTop+g.deltaY;n.onWheelScroll(v),yd(v,b)&&g.preventDefault()}},onResize:()=>{h.current&&s.viewport&&c&&o({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:Ml(c.paddingTop),paddingEnd:Ml(c.paddingBottom)}})}})}),[tv,cd]=ad(Nn),fd=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,sizes:o,hasThumb:u,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:f,onThumbPositionChange:h,onDragScroll:p,onWheelScroll:g,onResize:b,...v}=n,y=fn(Nn,i),[C,E]=P.useState(null),T=Hn(l,F=>E(F)),_=P.useRef(null),k=P.useRef(""),A=y.viewport,q=o.content-o.viewport,H=ur(g),R=ur(h),I=jl(b,10);function Y(F){if(_.current){const $=F.clientX-_.current.left,ie=F.clientY-_.current.top;p({x:$,y:ie})}}return P.useEffect(()=>{const F=$=>{const ie=$.target;C?.contains(ie)&&H($,q)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[A,C,q,H]),P.useEffect(R,[o,R]),fi(C,I),fi(y.content,I),M.jsx(tv,{scope:i,scrollbar:C,hasThumb:u,onThumbChange:ur(s),onThumbPointerUp:ur(c),onThumbPositionChange:R,onThumbPointerDown:ur(f),children:M.jsx(or.div,{...v,ref:T,style:{position:"absolute",...v.style},onPointerDown:qn(n.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),_.current=C.getBoundingClientRect(),k.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.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=k.current,y.viewport&&(y.viewport.style.scrollBehavior=""),_.current=null})})})}),zl="ScrollAreaThumb",dd=P.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=cd(zl,n.__scopeScrollArea);return M.jsx(ci,{present:i||u.hasThumb,children:M.jsx(nv,{ref:l,...o})})}),nv=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,style:o,...u}=n,s=fn(zl,i),c=cd(zl,i),{onThumbPositionChange:f}=c,h=Hn(l,b=>c.onThumbChange(b)),p=P.useRef(void 0),g=jl(()=>{p.current&&(p.current(),p.current=void 0)},100);return P.useEffect(()=>{const b=s.viewport;if(b){const v=()=>{if(g(),!p.current){const y=av(b,f);p.current=y,f()}};return f(),b.addEventListener("scroll",v),()=>b.removeEventListener("scroll",v)}},[s.viewport,g,f]),M.jsx(or.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,b=>{const y=b.target.getBoundingClientRect(),C=b.clientX-y.left,E=b.clientY-y.top;c.onThumbPointerDown({x:C,y:E})}),onPointerUp:qn(n.onPointerUp,c.onThumbPointerUp)})});dd.displayName=zl;var ws="ScrollAreaCorner",hd=P.forwardRef((n,l)=>{const i=fn(ws,n.__scopeScrollArea),o=!!(i.scrollbarX&&i.scrollbarY);return i.type!=="scroll"&&o?M.jsx(rv,{...n,ref:l}):null});hd.displayName=ws;var rv=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,...o}=n,u=fn(ws,i),[s,c]=P.useState(0),[f,h]=P.useState(0),p=!!(s&&f);return fi(u.scrollbarX,()=>{const g=u.scrollbarX?.offsetHeight||0;u.onCornerHeightChange(g),h(g)}),fi(u.scrollbarY,()=>{const g=u.scrollbarY?.offsetWidth||0;u.onCornerWidthChange(g),c(g)}),p?M.jsx(or.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 Ml(n){return n?parseInt(n,10):0}function md(n,l){const i=n/l;return isNaN(i)?0:i}function Dl(n){const l=md(n.viewport,n.content),i=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,o=(n.scrollbar.size-i)*l;return Math.max(o,18)}function iv(n,l,i,o="ltr"){const u=Dl(i),s=u/2,c=l||s,f=u-c,h=i.scrollbar.paddingStart+c,p=i.scrollbar.size-i.scrollbar.paddingEnd-f,g=i.content-i.viewport,b=o==="ltr"?[0,g]:[g*-1,0];return gd([h,p],b)(n)}function pd(n,l,i="ltr"){const o=Dl(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],p=Zb(n,h);return gd([0,c],[0,f])(p)}function gd(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 yd(n,l){return n>0&&n<l}var av=(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 jl(n,l){const i=ur(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 fi(n,l){const i=ur(l);sr(()=>{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 bd=ld,lv=sd,ov=hd;function vd(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=vd(n[l]))&&(o&&(o+=" "),o+=i)}else for(i in n)n[i]&&(o&&(o+=" "),o+=i);return o}function Sd(){for(var n,l,i=0,o="",u=arguments.length;i<u;i++)(n=arguments[i])&&(l=vd(n))&&(o&&(o+=" "),o+=l);return o}const sv=(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},uv=(n,l)=>({classGroupId:n,validator:l}),Ed=(n=new Map,l=null,i)=>({nextPart:n,validators:l,classGroupId:i}),Ll="-",xd=[],cv="arbitrary..",fv=n=>{const l=hv(n),{conflictingClassGroups:i,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return dv(c);const f=c.split(Ll),h=f[0]===""&&f.length>1?1:0;return _d(f,h,l)},getConflictingClassGroupIds:(c,f)=>{if(f){const h=o[c],p=i[c];return h?p?sv(p,h):h:p||xd}return i[c]||xd}}},_d=(n,l,i)=>{if(n.length-l===0)return i.classGroupId;const u=n[l],s=i.nextPart.get(u);if(s){const p=_d(n,l+1,s);if(p)return p}const c=i.validators;if(c===null)return;const f=l===0?n.join(Ll):n.slice(l).join(Ll),h=c.length;for(let p=0;p<h;p++){const g=c[p];if(g.validator(f))return g.classGroupId}},dv=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?cv+o:void 0})(),hv=n=>{const{theme:l,classGroups:i}=n;return mv(i,l)},mv=(n,l)=>{const i=Ed();for(const o in n){const u=n[o];Cs(u,i,o,l)}return i},Cs=(n,l,i,o)=>{const u=n.length;for(let s=0;s<u;s++){const c=n[s];pv(c,l,i,o)}},pv=(n,l,i,o)=>{if(typeof n=="string"){gv(n,l,i);return}if(typeof n=="function"){yv(n,l,i,o);return}bv(n,l,i,o)},gv=(n,l,i)=>{const o=n===""?l:wd(l,n);o.classGroupId=i},yv=(n,l,i,o)=>{if(vv(n)){Cs(n(o),l,i,o);return}l.validators===null&&(l.validators=[]),l.validators.push(uv(i,n))},bv=(n,l,i,o)=>{const u=Object.entries(n),s=u.length;for(let c=0;c<s;c++){const[f,h]=u[c];Cs(h,wd(l,f),i,o)}},wd=(n,l)=>{let i=n;const o=l.split(Ll),u=o.length;for(let s=0;s<u;s++){const c=o[s];let f=i.nextPart.get(c);f||(f=Ed(),i.nextPart.set(c,f)),i=f}return i},vv=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,Sv=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)}}},Ts="!",Cd=":",Ev=[],Td=(n,l,i,o,u)=>({modifiers:n,hasImportantModifier:l,baseClassName:i,maybePostfixModifierPosition:o,isExternal:u}),xv=n=>{const{prefix:l,experimentalParseClassName:i}=n;let o=u=>{const s=[];let c=0,f=0,h=0,p;const g=u.length;for(let E=0;E<g;E++){const T=u[E];if(c===0&&f===0){if(T===Cd){s.push(u.slice(h,E)),h=E+1;continue}if(T==="/"){p=E;continue}}T==="["?c++:T==="]"?c--:T==="("?f++:T===")"&&f--}const b=s.length===0?u:u.slice(h);let v=b,y=!1;b.endsWith(Ts)?(v=b.slice(0,-1),y=!0):b.startsWith(Ts)&&(v=b.slice(1),y=!0);const C=p&&p>h?p-h:void 0;return Td(s,y,v,C)};if(l){const u=l+Cd,s=o;o=c=>c.startsWith(u)?s(c.slice(u.length)):Td(Ev,!1,c,void 0,!0)}if(i){const u=o;o=s=>i({className:s,parseClassName:u})}return o},_v=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}},wv=n=>({cache:Sv(n.cacheSize),parseClassName:xv(n),sortModifiers:_v(n),...fv(n)}),Cv=/\s+/,Tv=(n,l)=>{const{parseClassName:i,getClassGroupId:o,getConflictingClassGroupIds:u,sortModifiers:s}=l,c=[],f=n.trim().split(Cv);let h="";for(let p=f.length-1;p>=0;p-=1){const g=f[p],{isExternal:b,modifiers:v,hasImportantModifier:y,baseClassName:C,maybePostfixModifierPosition:E}=i(g);if(b){h=g+(h.length>0?" "+h:h);continue}let T=!!E,_=o(T?C.substring(0,E):C);if(!_){if(!T){h=g+(h.length>0?" "+h:h);continue}if(_=o(C),!_){h=g+(h.length>0?" "+h:h);continue}T=!1}const k=v.length===0?"":v.length===1?v[0]:s(v).join(":"),A=y?k+Ts:k,q=A+_;if(c.indexOf(q)>-1)continue;c.push(q);const H=u(_,T);for(let R=0;R<H.length;++R){const I=H[R];c.push(A+I)}h=g+(h.length>0?" "+h:h)}return h},kv=(...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},Av=(n,...l)=>{let i,o,u,s;const c=h=>{const p=l.reduce((g,b)=>b(g),n());return i=wv(p),o=i.cache.get,u=i.cache.set,s=f,f(h)},f=h=>{const p=o(h);if(p)return p;const g=Tv(h,i);return u(h,g),g};return s=c,(...h)=>s(kv(...h))},Nv=[],kt=n=>{const l=i=>i[n]||Nv;return l.isThemeGetter=!0,l},Ad=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Nd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Rv=/^\d+\/\d+$/,Ov=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zv=/\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$/,Mv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Dv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,di=n=>Rv.test(n),Ve=n=>!!n&&!Number.isNaN(Number(n)),cr=n=>!!n&&Number.isInteger(Number(n)),ks=n=>n.endsWith("%")&&Ve(n.slice(0,-1)),Pn=n=>Ov.test(n),Lv=()=>!0,Bv=n=>zv.test(n)&&!Mv.test(n),Rd=()=>!1,Iv=n=>Dv.test(n),Uv=n=>jv.test(n),Hv=n=>!Re(n)&&!Oe(n),qv=n=>hi(n,jd,Rd),Re=n=>Ad.test(n),Ir=n=>hi(n,Ld,Bv),As=n=>hi(n,Gv,Ve),Od=n=>hi(n,Md,Rd),Pv=n=>hi(n,Dd,Uv),Bl=n=>hi(n,Bd,Iv),Oe=n=>Nd.test(n),ua=n=>mi(n,Ld),Fv=n=>mi(n,Xv),zd=n=>mi(n,Md),Yv=n=>mi(n,jd),Vv=n=>mi(n,Dd),Il=n=>mi(n,Bd,!0),hi=(n,l,i)=>{const o=Ad.exec(n);return o?o[1]?l(o[1]):i(o[2]):!1},mi=(n,l,i=!1)=>{const o=Nd.exec(n);return o?o[1]?l(o[1]):i:!1},Md=n=>n==="position"||n==="percentage",Dd=n=>n==="image"||n==="url",jd=n=>n==="length"||n==="size"||n==="bg-size",Ld=n=>n==="length",Gv=n=>n==="number",Xv=n=>n==="family-name",Bd=n=>n==="shadow",Zv=Av(()=>{const n=kt("color"),l=kt("font"),i=kt("text"),o=kt("font-weight"),u=kt("tracking"),s=kt("leading"),c=kt("breakpoint"),f=kt("container"),h=kt("spacing"),p=kt("radius"),g=kt("shadow"),b=kt("inset-shadow"),v=kt("text-shadow"),y=kt("drop-shadow"),C=kt("blur"),E=kt("perspective"),T=kt("aspect"),_=kt("ease"),k=kt("animate"),A=()=>["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],R=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],Y=()=>[Oe,Re,h],F=()=>[di,"full","auto",...Y()],$=()=>[cr,"none","subgrid",Oe,Re],ie=()=>["auto",{span:["full",cr,Oe,Re]},cr,Oe,Re],D=()=>[cr,"auto",Oe,Re],re=()=>["auto","min","max","fr",Oe,Re],w=()=>["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=()=>[di,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Y()],se=()=>[n,Oe,Re],de=()=>[...q(),zd,Od,{position:[Oe,Re]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",Yv,qv,{size:[Oe,Re]}],U=()=>[ks,ua,Ir],z=()=>["","none","full",p,Oe,Re],ne=()=>["",Ve,ua,Ir],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,zd,Od],Ae=()=>["","none",C,Oe,Re],ke=()=>["none",Ve,Oe,Re],Pe=()=>["none",Ve,Oe,Re],ve=()=>[Ve,Oe,Re],ze=()=>[di,"full",...Y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pn],breakpoint:[Pn],color:[Lv],container:[Pn],"drop-shadow":[Pn],ease:["in","out","in-out"],font:[Hv],"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",di,Re,Oe,T]}],container:["container"],columns:[{columns:[Ve,Re,Oe,f]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],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:[cr,"auto",Oe,Re]}],basis:[{basis:[di,"full","auto",f,...Y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ve,di,"auto","initial","none",Re]}],grow:[{grow:["",Ve,Oe,Re]}],shrink:[{shrink:["",Ve,Oe,Re]}],order:[{order:[cr,"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":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:Y()}],"gap-x":[{"gap-x":Y()}],"gap-y":[{"gap-y":Y()}],"justify-content":[{justify:[...w(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...w()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":w()}],"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,ua,Ir]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Oe,As]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ks,Re]}],"font-family":[{font:[Fv,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,As]}],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,Ir]}],"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:B()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},cr,Oe,Re],radial:["",Oe,Re],conic:[cr,Oe,Re]},Vv,Pv]}],"bg-color":[{bg:se()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"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:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"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,ua,Ir]}],"outline-color":[{outline:se()}],shadow:[{shadow:["","none",g,Il,Bl]}],"shadow-color":[{shadow:se()}],"inset-shadow":[{"inset-shadow":["none",b,Il,Bl]}],"inset-shadow-color":[{"inset-shadow":se()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:se()}],"ring-offset-w":[{"ring-offset":[Ve,Ir]}],"ring-offset-color":[{"ring-offset":se()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":se()}],"text-shadow":[{"text-shadow":["none",v,Il,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:B()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Oe,Re]}],filter:[{filter:["","none",Oe,Re]}],blur:[{blur:Ae()}],brightness:[{brightness:[Ve,Oe,Re]}],contrast:[{contrast:[Ve,Oe,Re]}],"drop-shadow":[{"drop-shadow":["","none",y,Il,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":Ae()}],"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",k,Oe,Re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Oe,Re]}],"perspective-origin":[{"perspective-origin":H()}],rotate:[{rotate:ke()}],"rotate-x":[{"rotate-x":ke()}],"rotate-y":[{"rotate-y":ke()}],"rotate-z":[{"rotate-z":ke()}],scale:[{scale:Pe()}],"scale-x":[{"scale-x":Pe()}],"scale-y":[{"scale-y":Pe()}],"scale-z":[{"scale-z":Pe()}],"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,ua,Ir,As]}],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 Zv(Sd(n))}function ca(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 Kv=n=>new Promise(l=>setTimeout(l,n)),Id=P.forwardRef(({className:n,children:l,...i},o)=>M.jsxs(bd,{ref:o,className:Ye("relative overflow-hidden",n),...i,children:[M.jsx(lv,{className:"h-full w-full rounded-[inherit]",children:l}),M.jsx(Ud,{}),M.jsx(ov,{})]}));Id.displayName=bd.displayName;const Ud=P.forwardRef(({className:n,orientation:l="vertical",...i},o)=>M.jsx(xs,{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:M.jsx(dd,{className:"relative flex-1 rounded-full bg-border"})}));Ud.displayName=xs.displayName;var Qv=Symbol.for("react.lazy"),Ul=Kf[" use ".trim().toString()];function Jv(n){return typeof n=="object"&&n!==null&&"then"in n}function Hd(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===Qv&&"_payload"in n&&Jv(n._payload)}function qd(n){const l=$v(n),i=P.forwardRef((o,u)=>{let{children:s,...c}=o;Hd(s)&&typeof Ul=="function"&&(s=Ul(s._payload));const f=P.Children.toArray(s),h=f.find(tS);if(h){const p=h.props.children,g=f.map(b=>b===h?P.Children.count(p)>1?P.Children.only(null):P.isValidElement(p)?p.props.children:null:b);return M.jsx(l,{...c,ref:u,children:P.isValidElement(p)?P.cloneElement(p,void 0,g):null})}return M.jsx(l,{...c,ref:u,children:s})});return i.displayName=`${n}.Slot`,i}var Wv=qd("Slot");function $v(n){const l=P.forwardRef((i,o)=>{let{children:u,...s}=i;if(Hd(u)&&typeof Ul=="function"&&(u=Ul(u._payload)),P.isValidElement(u)){const c=rS(u),f=nS(s,u.props);return u.type!==P.Fragment&&(f.ref=o?Ss(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 eS=Symbol("radix.slottable");function tS(n){return P.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===eS}function nS(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 rS(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 Pd=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Fd=Sd,iS=((n,l)=>i=>{var o;if(l?.variants==null)return Fd(n,i?.class,i?.className);const{variants:u,defaultVariants:s}=l,c=Object.keys(u).map(p=>{const g=i?.[p],b=s?.[p];if(g===null)return null;const v=Pd(g)||Pd(b);return u[p][v]}),f=i&&Object.entries(i).reduce((p,g)=>{let[b,v]=g;return v===void 0||(p[b]=v),p},{}),h=l==null||(o=l.compoundVariants)===null||o===void 0?void 0:o.reduce((p,g)=>{let{class:b,className:v,...y}=g;return Object.entries(y).every(C=>{let[E,T]=C;return Array.isArray(T)?T.includes({...s,...f}[E]):{...s,...f}[E]===T})?[...p,b,v]:p},[]);return Fd(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"}}),At=P.forwardRef(({className:n,variant:l,size:i,asChild:o=!1,...u},s)=>{const c=o?Wv:"button";return M.jsx(c,{className:Ye(iS({variant:l,size:i,className:n})),ref:s,...u})});At.displayName="Button";const aS=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),lS=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,i,o)=>o?o.toUpperCase():i.toLowerCase()),Yd=n=>{const l=lS(n);return l.charAt(0).toUpperCase()+l.slice(1)},Vd=(...n)=>n.filter((l,i,o)=>!!l&&l.trim()!==""&&o.indexOf(l)===i).join(" ").trim(),oS=n=>{for(const l in n)if(l.startsWith("aria-")||l==="role"||l==="title")return!0};var sS={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 uS=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,...sS,width:l,height:l,stroke:n,strokeWidth:o?Number(i)*24/Number(l):i,className:Vd("lucide",u),...!s&&!oS(f)&&{"aria-hidden":"true"},...f},[...c.map(([p,g])=>P.createElement(p,g)),...Array.isArray(s)?s:[s]]));const Rt=(n,l)=>{const i=P.forwardRef(({className:o,...u},s)=>P.createElement(uS,{ref:s,iconNode:l,className:Vd(`lucide-${aS(Yd(n))}`,`lucide-${n}`,o),...u}));return i.displayName=Yd(n),i};const cS=Rt("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const Gd=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 Xd=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 fS=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 Zd=Rt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Ns=Rt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const dS=Rt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const hS=Rt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const mS=Rt("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const pS=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 gS=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 Kd=Rt("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const yS=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 bS=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 vS=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 SS=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 ES=Rt("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const Rs=Rt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fa=P.forwardRef(({className:n,...l},i)=>M.jsx("div",{ref:i,className:Ye("rounded-xl border bg-card text-card-foreground shadow",n),...l}));fa.displayName="Card";const Qd=P.forwardRef(({className:n,...l},i)=>M.jsx("div",{ref:i,className:Ye("flex flex-col space-y-1.5 p-6",n),...l}));Qd.displayName="CardHeader";const xS=P.forwardRef(({className:n,...l},i)=>M.jsx("div",{ref:i,className:Ye("font-semibold leading-none tracking-tight",n),...l}));xS.displayName="CardTitle";const _S=P.forwardRef(({className:n,...l},i)=>M.jsx("div",{ref:i,className:Ye("text-sm text-muted-foreground",n),...l}));_S.displayName="CardDescription";const Jd=P.forwardRef(({className:n,...l},i)=>M.jsx("div",{ref:i,className:Ye("p-6 pt-0",n),...l}));Jd.displayName="CardContent";const wS=P.forwardRef(({className:n,...l},i)=>M.jsx("div",{ref:i,className:Ye("flex items-center p-6 pt-0",n),...l}));wS.displayName="CardFooter";function CS(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 p=b=>{const{scope:v,children:y,...C}=b,E=v?.[n]?.[h]||f,T=P.useMemo(()=>C,Object.values(C));return M.jsx(E.Provider,{value:T,children:y})};p.displayName=s+"Provider";function g(b,v){const y=v?.[n]?.[h]||f,C=P.useContext(y);if(C)return C;if(c!==void 0)return c;throw new Error(`\`${b}\` must be used within \`${s}\``)}return[p,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,TS(u,...l)]}function TS(...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:p})=>{const b=h(s)[`__scope${p}`];return{...f,...b}},{});return P.useMemo(()=>({[`__scope${l.scopeName}`]:c}),[c])}};return i.scopeName=l.scopeName,i}var kS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Os=kS.reduce((n,l)=>{const i=qd(`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),M.jsx(h,{...f,ref:s})});return o.displayName=`Primitive.${l}`,{...n,[l]:o}},{}),zs={exports:{}},Ms={};var Wd;function AS(){if(Wd)return Ms;Wd=1;var n=Rl();function l(b,v){return b===v&&(b!==0||1/b===1/v)||b!==b&&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(b,v){var y=v(),C=o({inst:{value:y,getSnapshot:v}}),E=C[0].inst,T=C[1];return s(function(){E.value=y,E.getSnapshot=v,h(E)&&T({inst:E})},[b,y,v]),u(function(){return h(E)&&T({inst:E}),b(function(){h(E)&&T({inst:E})})},[b]),c(y),y}function h(b){var v=b.getSnapshot;b=b.value;try{var y=v();return!i(b,y)}catch{return!0}}function p(b,v){return v()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:f;return Ms.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:g,Ms}var $d;function NS(){return $d||($d=1,zs.exports=AS()),zs.exports}var RS=NS();function OS(){return RS.useSyncExternalStore(zS,()=>!0,()=>!1)}function zS(){return()=>{}}var Ds="Avatar",[MS]=CS(Ds),[DS,eh]=MS(Ds),th=P.forwardRef((n,l)=>{const{__scopeAvatar:i,...o}=n,[u,s]=P.useState("idle");return M.jsx(DS,{scope:i,imageLoadingStatus:u,onImageLoadingStatusChange:s,children:M.jsx(Os.span,{...o,ref:l})})});th.displayName=Ds;var nh="AvatarImage",rh=P.forwardRef((n,l)=>{const{__scopeAvatar:i,src:o,onLoadingStatusChange:u=()=>{},...s}=n,c=eh(nh,i),f=jS(o,s),h=ur(p=>{u(p),c.onImageLoadingStatusChange(p)});return sr(()=>{f!=="idle"&&h(f)},[f,h]),f==="loaded"?M.jsx(Os.img,{...s,ref:l,src:o}):null});rh.displayName=nh;var ih="AvatarFallback",ah=P.forwardRef((n,l)=>{const{__scopeAvatar:i,delayMs:o,...u}=n,s=eh(ih,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"?M.jsx(Os.span,{...u,ref:l}):null});ah.displayName=ih;function lh(n,l){return n?l?(n.src!==l&&(n.src=l),n.complete&&n.naturalWidth>0?"loaded":"loading"):"error":"idle"}function jS(n,{referrerPolicy:l,crossOrigin:i}){const o=OS(),u=P.useRef(null),s=o?(u.current||(u.current=new window.Image),u.current):null,[c,f]=P.useState(()=>lh(s,n));return sr(()=>{f(lh(s,n))},[s,n]),sr(()=>{const h=b=>()=>{f(b)};if(!s)return;const p=h("loaded"),g=h("error");return s.addEventListener("load",p),s.addEventListener("error",g),l&&(s.referrerPolicy=l),typeof i=="string"&&(s.crossOrigin=i),()=>{s.removeEventListener("load",p),s.removeEventListener("error",g)}},[s,i,l]),c}var oh=th,sh=rh,uh=ah;const da=P.forwardRef(({className:n,...l},i)=>M.jsx(oh,{ref:i,className:Ye("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",n),...l}));da.displayName=oh.displayName;const ch=P.forwardRef(({className:n,...l},i)=>M.jsx(sh,{ref:i,className:Ye("aspect-square h-full w-full",n),...l}));ch.displayName=sh.displayName;const ha=P.forwardRef(({className:n,...l},i)=>M.jsx(uh,{ref:i,className:Ye("flex h-full w-full items-center justify-center rounded-full bg-muted",n),...l}));ha.displayName=uh.displayName;var Ur={},ma={},js={},pa={},ga={},ya={},fh;function LS(){if(fh)return ya;fh=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.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 ya.EventEmitter=n,ya}var Hr={},dh;function Ls(){return dh||(dh=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.DisconnectionReason=Hr.ConnectionStatus=void 0,Hr.ConnectionStatus={CONNECTING:"connecting",CONNECTED:"connected",NOT_CONNECTED:"not_connected"},Hr.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"}),Hr}var hh;function mh(){if(hh)return ga;hh=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.BaseConnection=void 0;const n=LS(),l=Ls();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 ga.BaseConnection=i,ga}var Bs={},ph;function Rn(){return ph||(ph=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(R,I=n.SynapseErrorCode.UNKNOWN,Y={}){super(R),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||R,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}n.SynapseError=l;class i extends l{status;error;headers;constructor(R,I,Y,F){const $=i.makeMessage(I,Y,R);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:R||"Something went wrong"}),this.name="APIError",this.status=I,this.error=Y,this.headers=F}static makeMessage(R,I,Y){const F=I instanceof Error?I.message:Y;return R&&F?`HTTP ${R}: ${F}`:R?`${R} status code (no body)`:F||"(no status code or body)"}static generate(R,I,Y,F){if(!R)return new o({message:Y});const $=I?.error,ie=$&&typeof $=="object"&&!Array.isArray($)?$:void 0;switch(R){case 400:return new s(Y||"Bad Request",R,ie,F);case 401:return new c(Y||"Unauthorized",R,ie,F);case 403:return new f(Y||"Permission Denied",R,ie,F);case 404:return new h(Y||"Not Found",R,ie,F);case 405:return new p(Y||"Method Not Allowed",R,ie,F);case 429:return new g(Y||"Rate Limit Exceeded",R,ie,F);case 500:return new b(Y||"Internal Server Error",R,ie,F);default:return new i(Y||"API Error",R,ie,F)}}}n.APIError=i;class o extends i{constructor({message:R}={}){super(R||"Request was aborted.",void 0,void 0,void 0),this.name="APIUserAbortError"}}n.APIUserAbortError=o;class u extends i{constructor({message:R}={}){super(R||"Request timed out.",void 0,void 0,void 0),this.name="APIConnectionTimeoutError"}}n.APIConnectionTimeoutError=u;class s extends i{constructor(R,I,Y,F){super(R,I,Y,F),this.name="BadRequestError"}}n.BadRequestError=s;class c extends i{constructor(R,I,Y,F){super(R,I,Y,F),this.name="UnauthorizedError"}}n.UnauthorizedError=c;class f extends i{constructor(R,I,Y,F){super(R,I,Y,F),this.name="PermissionDeniedError"}}n.PermissionDeniedError=f;class h extends i{constructor(R,I,Y,F){super(R,I,Y,F),this.name="NotFoundError"}}n.NotFoundError=h;class p extends i{constructor(R,I,Y,F){super(R,I,Y,F),this.name="MethodNotAllowedError"}}n.MethodNotAllowedError=p;class g extends i{constructor(R,I,Y,F){super(R,I,Y,F),this.name="RateLimitError"}}n.RateLimitError=g;class b extends i{constructor(R,I,Y,F){super(R,I,Y,F),this.name="InternalServerError"}}n.InternalServerError=b;class v extends l{constructor(R,I={}){super(R,n.SynapseErrorCode.CONNECTION,I),this.name="ConnectionError"}}n.ConnectionError=v;class y extends l{constructor(R,I={}){super(R,n.SynapseErrorCode.RECORDING,I),this.name="RecordingError"}}n.RecordingError=y;class C extends l{constructor(R,I={}){super(R,n.SynapseErrorCode.FILE,I),this.name="FileError"}}n.FileError=C;class E extends l{constructor(R,I={}){super(R,n.SynapseErrorCode.SESSION,I),this.name="SessionError"}}n.SessionError=E;class T extends l{constructor(R,I={}){super(R,n.SynapseErrorCode.MESSAGE,I),this.name="MessageError"}}n.MessageError=T;class _ extends l{constructor(R,I={}){super(R,n.SynapseErrorCode.STORE,I),this.name="StoreError"}}n.StoreError=_;class k extends l{constructor(R,I={}){super(R,n.SynapseErrorCode.CONFIGURATION,I),this.name="ConfigurationError"}}n.ConfigurationError=k;class A extends l{constructor(R,I={}){super(R,n.SynapseErrorCode.VALIDATION,I),this.name="ValidationError"}}n.ValidationError=A;function q(H,R,I,Y={}){if(H instanceof R)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 R(H.message,F);const $=H instanceof Error&&H.message?H.message:I;return new R($,F)}})(Bs)),Bs}var gh;function yh(){if(gh)return pa;gh=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.WebSocketConnection=void 0;const n=mh(),l=Ls(),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=`/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 p,g;f===1e3?(p=l.DisconnectionReason.CLIENT_CLOSED,g="Connection closed normally"):f===1001||f===1006?(p=l.DisconnectionReason.NETWORK_ERROR,g="Network connection lost"):f===4001?(p=l.DisconnectionReason.AUTHENTICATION_ERROR,g="Authentication failed"):c?(p=l.DisconnectionReason.SERVER_CLOSED,g=h||"Server closed connection"):(p=l.DisconnectionReason.CONNECTION_ERROR,g=h||"Connection closed unexpectedly"),this.config.reconnect&&p!==l.DisconnectionReason.AUTHENTICATION_ERROR&&p!==l.DisconnectionReason.CLIENT_CLOSED&&this.reconnectCount<(this.config.reconnectAttempts||3)?(this.reconnectCount++,setTimeout(()=>{this.connect()},this.config.reconnectDelay||1e3)):this.disconnect({reason:p,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 pa.WebSocketConnection=o,pa}var bh;function vh(){return bh||(bh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ConnectionFactory=n.ConnectionType=void 0;const l=yh(),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})(js)),js}var qr={},Sh;function Eh(){if(Sh)return qr;Sh=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.SYNAPSE_TOOL_NAME=qr.getConfig=void 0;const n={WEBSOCKET_URL:"wss://matrix-ws.eka.care",BASE_API_URL:"https://matrix.eka.care"},l={WEBSOCKET_URL:"wss://matrix-ws.dev.eka.care",BASE_API_URL:"https://matrix.dev.eka.care"},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;qr.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"})(u||(qr.SYNAPSE_TOOL_NAME=u={})),qr}var ba={},va={},xh;function _h(){if(xh)return va;xh=1,Object.defineProperty(va,"__esModule",{value:!0}),va.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 h=0;h<=c;h++)try{const p=this.buildUrl(u,s?.params),g=await fetch(p,{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(p){if(f=p,h===c||!(p instanceof TypeError&&p.message==="Failed to fetch"||p instanceof DOMException&&p.name==="AbortError"||p instanceof SyntaxError))break;const b=Math.pow(2,h)*100;await new Promise(v=>setTimeout(v,b))}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 va.HttpClient=l,va}var Sa={},Ea={},wh;function Ch(){if(wh)return Ea;wh=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.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 Ea.BaseResource=n,Ea}var Th;function kh(){if(Th)return Sa;Th=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.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 Sa.Session=l,Sa}var xa={},Ah;function Nh(){if(Ah)return xa;Ah=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.ToolCall=void 0;const n=Ch();let l=class extends n.BaseResource{basePath="/med-assist/api-call-tool";async callTool(o,u,s){return this.post(`${this.basePath}?session_id=${o}&tool_name=${u}`,{tool_params:s})}};return xa.ToolCall=l,xa}var Rh;function Oh(){if(Rh)return ba;Rh=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.ResourceManager=void 0;const n=_h(),l=kh(),i=Rn(),o=Nh();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,p){return await this.session.feedback(c,f,h,p)}async callTool(c,f,h){return this.toolCall||(this.toolCall=new o.ToolCall(this.httpClient)),await this.toolCall.callTool(c,f,h)}}return ba.ResourceManager=u,ba}var _a={},Is={},zh;function Us(){return zh||(zh=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",PILL:"pill",MULTI:"multi",DOCTOR_CARD:"doctor_card",TIPS:"tips",INLINE_TEXT:"inline_text",MOBILE_VERIFICATION:"mobile_verification"},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)}})(Is)),Is}var Pr={};function Hl(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 Hs={exports:{}};var Mh;function BS(){return Mh||(Mh=1,(function(n,l){(function(i){n.exports=i()})(function(){return(function i(o,u,s){function c(p,g){if(!u[p]){if(!o[p]){var b=typeof Hl=="function"&&Hl;if(!g&&b)return b(p,!0);if(f)return f(p,!0);var v=new Error("Cannot find module '"+p+"'");throw v.code="MODULE_NOT_FOUND",v}var y=u[p]={exports:{}};o[p][0].call(y.exports,function(C){var E=o[p][1][C];return c(E||C)},y,y.exports,i,o,u,s)}return u[p].exports}for(var f=typeof Hl=="function"&&Hl,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 p,g,b,v,y,C,E,T=[],_=0,k=h.length,A=k,q=s.getTypeOf(h)!=="string";_<h.length;)A=k-_,b=q?(p=h[_++],g=_<k?h[_++]:0,_<k?h[_++]:0):(p=h.charCodeAt(_++),g=_<k?h.charCodeAt(_++):0,_<k?h.charCodeAt(_++):0),v=p>>2,y=(3&p)<<4|g>>4,C=1<A?(15&g)<<2|b>>6:64,E=2<A?63&b:64,T.push(f.charAt(v)+f.charAt(y)+f.charAt(C)+f.charAt(E));return T.join("")},u.decode=function(h){var p,g,b,v,y,C,E=0,T=0,_="data:";if(h.substr(0,_.length)===_)throw new Error("Invalid base64 input, it looks like a data url.");var k,A=3*(h=h.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(h.charAt(h.length-1)===f.charAt(64)&&A--,h.charAt(h.length-2)===f.charAt(64)&&A--,A%1!=0)throw new Error("Invalid base64 input, bad content length.");for(k=c.uint8array?new Uint8Array(0|A):new Array(0|A);E<h.length;)p=f.indexOf(h.charAt(E++))<<2|(v=f.indexOf(h.charAt(E++)))>>4,g=(15&v)<<4|(y=f.indexOf(h.charAt(E++)))>>2,b=(3&y)<<6|(C=f.indexOf(h.charAt(E++))),k[T++]=p,y!==64&&(k[T++]=g),C!==64&&(k[T++]=b);return k}},{"./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 p(g,b,v,y,C){this.compressedSize=g,this.uncompressedSize=b,this.crc32=v,this.compression=y,this.compressedContent=C}p.prototype={getContentWorker:function(){var g=new c(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new h("data_length")),b=this;return g.on("end",function(){if(this.streamInfo.data_length!==b.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)}},p.createWorkerFrom=function(g,b,v){return g.pipe(new f).pipe(new h("uncompressedSize")).pipe(b.compressWorker(v)).pipe(new h("compressedSize")).withStreamInfo("compression",b)},o.exports=p},{"./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=[],p=0;p<256;p++){f=p;for(var g=0;g<8;g++)f=1&f?3988292384^f>>>1:f>>>1;h[p]=f}return h})();o.exports=function(f,h){return f!==void 0&&f.length?s.getTypeOf(f)!=="string"?(function(p,g,b,v){var y=c,C=v+b;p^=-1;for(var E=v;E<C;E++)p=p>>>8^y[255&(p^g[E])];return-1^p})(0|h,f,f.length,0):(function(p,g,b,v){var y=c,C=v+b;p^=-1;for(var E=v;E<C;E++)p=p>>>8^y[255&(p^g.charCodeAt(E))];return-1^p})(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"),p=s?"uint8array":"array";function g(b,v){h.call(this,"FlateWorker/"+b),this._pako=null,this._pakoAction=b,this._pakoOptions=v,this.meta={}}u.magic="\b\0",f.inherits(g,h),g.prototype.processChunk=function(b){this.meta=b.meta,this._pako===null&&this._createPako(),this._pako.push(f.transformTo(p,b.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 b=this;this._pako.onData=function(v){b.push({data:v,meta:b.meta})}},u.compressWorker=function(b){return new g("Deflate",b)},u.uncompressWorker=function(){return new g("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(i,o,u){function s(y,C){var E,T="";for(E=0;E<C;E++)T+=String.fromCharCode(255&y),y>>>=8;return T}function c(y,C,E,T,_,k){var A,q,H=y.file,R=y.compression,I=k!==p.utf8encode,Y=f.transformTo("string",k(H.name)),F=f.transformTo("string",p.utf8encode(H.name)),$=H.comment,ie=f.transformTo("string",k($)),D=f.transformTo("string",p.utf8encode($)),re=F.length!==H.name.length,w=D.length!==$.length,V="",Z="",Q="",se=H.dir,de=H.date,B={crc32:0,compressedSize:0,uncompressedSize:0};C&&!E||(B.crc32=y.crc32,B.compressedSize=y.compressedSize,B.uncompressedSize=y.uncompressedSize);var N=0;C&&(N|=8),I||!re&&!w||(N|=2048);var U=0,z=0;se&&(U|=16),_==="UNIX"?(z=798,U|=(function(ce,we){var Te=ce;return ce||(Te=we?16893:33204),(65535&Te)<<16})(H.unixPermissions,se)):(z=20,U|=(function(ce){return 63&(ce||0)})(H.dosPermissions)),A=de.getUTCHours(),A<<=6,A|=de.getUTCMinutes(),A<<=5,A|=de.getUTCSeconds()/2,q=de.getUTCFullYear()-1980,q<<=4,q|=de.getUTCMonth()+1,q<<=5,q|=de.getUTCDate(),re&&(Z=s(1,1)+s(g(Y),4)+F,V+="up"+s(Z.length,2)+Z),w&&(Q=s(1,1)+s(g(ie),4)+D,V+="uc"+s(Q.length,2)+Q);var ne="";return ne+=`
|
|
10
|
-
\0`,ne+=s(N,2),ne+=R.magic,ne+=s(A,2),ne+=s(q,2),ne+=s(B.crc32,4),ne+=s(B.compressedSize,4),ne+=s(B.uncompressedSize,4),ne+=s(Y.length,2),ne+=s(V.length,2),{fileRecord:b.LOCAL_FILE_HEADER+ne+Y+V,dirRecord:b.CENTRAL_FILE_HEADER+s(z,2)+ne+s(ie.length,2)+"\0\0\0\0"+s(U,4)+s(T,4)+Y+V+ie}}var f=i("../utils"),h=i("../stream/GenericWorker"),p=i("../utf8"),g=i("../crc32"),b=i("../signature");function v(y,C,E,T){h.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=C,this.zipPlatform=E,this.encodeFileName=T,this.streamFiles=y,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(y){var C=y.meta.percent||0,E=this.entriesCount,T=this._sources.length;this.accumulate?this.contentBuffer.push(y):(this.bytesWritten+=y.data.length,h.prototype.push.call(this,{data:y.data,meta:{currentFile:this.currentFile,percent:E?(C+100*(E-T-1))/E:100}}))},v.prototype.openedSource=function(y){this.currentSourceOffset=this.bytesWritten,this.currentFile=y.file.name;var C=this.streamFiles&&!y.file.dir;if(C){var E=c(y,C,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},v.prototype.closedSource=function(y){this.accumulate=!1;var C=this.streamFiles&&!y.file.dir,E=c(y,C,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),C)this.push({data:(function(T){return b.DATA_DESCRIPTOR+s(T.crc32,4)+s(T.compressedSize,4)+s(T.uncompressedSize,4)})(y),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 y=this.bytesWritten,C=0;C<this.dirRecords.length;C++)this.push({data:this.dirRecords[C],meta:{percent:100}});var E=this.bytesWritten-y,T=(function(_,k,A,q,H){var R=f.transformTo("string",H(q));return b.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(_,2)+s(_,2)+s(k,4)+s(A,4)+s(R.length,2)+R})(this.dirRecords.length,E,y,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(y){this._sources.push(y);var C=this;return y.on("data",function(E){C.processChunk(E)}),y.on("end",function(){C.closedSource(C.previous.streamInfo),C._sources.length?C.prepareNextSource():C.end()}),y.on("error",function(E){C.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(y){var C=this._sources;if(!h.prototype.error.call(this,y))return!1;for(var E=0;E<C.length;E++)try{C[E].error(y)}catch{}return!0},v.prototype.lock=function(){h.prototype.lock.call(this);for(var y=this._sources,C=0;C<y.length;C++)y[C].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,p){var g=new c(h.streamFiles,p,h.platform,h.encodeFileName),b=0;try{f.forEach(function(v,y){b++;var C=(function(k,A){var q=k||A,H=s[q];if(!H)throw new Error(q+" is not a valid compression method !");return H})(y.options.compression,h.compression),E=y.options.compressionOptions||h.compressionOptions||{},T=y.dir,_=y.date;y._compressWorker(C,E).withStreamInfo("file",{name:v,dir:T,date:_,comment:y.comment||"",unixPermissions:y.unixPermissions,dosPermissions:y.dosPermissions}).pipe(g)}),g.entriesCount=b}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"),p=i("./stream/Crc32Probe"),g=i("./nodejsUtils");function b(v){return new c.Promise(function(y,C){var E=v.decompressed.getContentWorker().pipe(new p);E.on("error",function(T){C(T)}).on("end",function(){E.streamInfo.crc32!==v.decompressed.crc32?C(new Error("Corrupted zip : CRC32 mismatch")):y()}).resume()})}o.exports=function(v,y){var C=this;return y=s.extend(y||{},{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,y.optimizedBinaryString,y.base64).then(function(E){var T=new h(y);return T.load(E),T}).then(function(E){var T=[c.Promise.resolve(E)],_=E.files;if(y.checkCRC32)for(var k=0;k<_.length;k++)T.push(b(_[k]));return c.Promise.all(T)}).then(function(E){for(var T=E.shift(),_=T.files,k=0;k<_.length;k++){var A=_[k],q=A.fileNameStr,H=s.resolve(A.fileNameStr);C.file(H,A.decompressed,{binary:!0,optimizedBinaryString:!0,date:A.date,dir:A.dir,comment:A.fileCommentStr.length?A.fileCommentStr:null,unixPermissions:A.unixPermissions,dosPermissions:A.dosPermissions,createFolders:y.createFolders}),A.dir||(C.file(H).unsafeOriginalName=q)}return T.zipComment.length&&(C.comment=T.zipComment),C})}},{"./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,p){c.call(this,"Nodejs stream input adapter for "+h),this._upstreamEnded=!1,this._bindStream(p)}s.inherits(f,c),f.prototype._bindStream=function(h){var p=this;(this._stream=h).pause(),h.on("data",function(g){p.push({data:g,meta:{percent:0}})}).on("error",function(g){p.isPaused?this.generatedError=g:p.error(g)}).on("end",function(){p.isPaused?p._upstreamEnded=!0:p.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,p){s.call(this,h),this._helper=f;var g=this;f.on("data",function(b,v){g.push(b)||g._helper.pause(),p&&p(v)}).on("error",function(b){g.emit("error",b)}).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,R,I){var Y,F=f.getTypeOf(R),$=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))&&k.call(this,Y,!0);var ie=F==="string"&&$.binary===!1&&$.base64===!1;I&&I.binary!==void 0||($.binary=!ie),(R instanceof b&&R.uncompressedSize===0||$.dir||!R||R.length===0)&&($.base64=!1,$.binary=!0,R="",$.compression="STORE",F="string");var D=null;D=R instanceof b||R instanceof h?R:C.isNode&&C.isStream(R)?new E(H,R):f.prepareContent(H,R,$.binary,$.optimizedBinaryString,$.base64);var re=new v(H,D,$);this.files[H]=re}var c=i("./utf8"),f=i("./utils"),h=i("./stream/GenericWorker"),p=i("./stream/StreamHelper"),g=i("./defaults"),b=i("./compressedObject"),v=i("./zipObject"),y=i("./generate"),C=i("./nodejsUtils"),E=i("./nodejs/NodejsStreamInputAdapter"),T=function(H){H.slice(-1)==="/"&&(H=H.substring(0,H.length-1));var R=H.lastIndexOf("/");return 0<R?H.substring(0,R):""},_=function(H){return H.slice(-1)!=="/"&&(H+="/"),H},k=function(H,R){return R=R!==void 0?R:g.createFolders,H=_(H),this.files[H]||s.call(this,H,null,{dir:!0,createFolders:R}),this.files[H]};function A(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 R,I,Y;for(R in this.files)Y=this.files[R],(I=R.slice(this.root.length,R.length))&&R.slice(0,this.root.length)===this.root&&H(I,Y)},filter:function(H){var R=[];return this.forEach(function(I,Y){H(I,Y)&&R.push(Y)}),R},file:function(H,R,I){if(arguments.length!==1)return H=this.root+H,s.call(this,H,R,I),this;if(A(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(A(H))return this.filter(function(F,$){return $.dir&&H.test(F)});var R=this.root+H,I=k.call(this,R),Y=this.clone();return Y.root=I.name,Y},remove:function(H){H=this.root+H;var R=this.files[H];if(R||(H.slice(-1)!=="/"&&(H+="/"),R=this.files[H]),R&&!R.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 R,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||"";R=y.generateWorker(this,I,Y)}catch(F){(R=new h("error")).error(F)}return new p(R,I.type||"string",I.mimeType)},generateAsync:function(H,R){return this.generateInternalStream(H).accumulate(R)},generateNodeStream:function(H,R){return(H=H||{}).type||(H.type="nodebuffer"),this.generateInternalStream(H).toNodejsStream(R)}};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 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),p=f.charCodeAt(1),g=f.charCodeAt(2),b=f.charCodeAt(3),v=this.length-4;0<=v;--v)if(this.data[v]===h&&this.data[v+1]===p&&this.data[v+2]===g&&this.data[v+3]===b)return v-this.zero;return-1},c.prototype.readAndCheckSignature=function(f){var h=f.charCodeAt(0),p=f.charCodeAt(1),g=f.charCodeAt(2),b=f.charCodeAt(3),v=this.readData(4);return h===v[0]&&p===v[1]&&g===v[2]&&b===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,p=0;for(this.checkOffset(f),h=this.index+f-1;h>=this.index;h--)p=(p<<8)+this.byteAt(h);return this.index+=f,p},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"),p=i("./NodeBufferReader"),g=i("./Uint8ArrayReader");o.exports=function(b){var v=s.getTypeOf(b);return s.checkSupport(v),v!=="string"||c.uint8array?v==="nodebuffer"?new p(b):c.uint8array?new g(s.transformTo("uint8array",b)):new f(s.transformTo("array",b)):new h(b)}},{"../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 p=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=p+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 p=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,h.then(function(g){p.dataIsReady=!0,p.data=g,p.max=g&&g.length||0,p.type=s.getTypeOf(g),p.isPaused||p._tickAndRepeat()},function(g){p.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,p=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,p);break;case"uint8array":h=this.data.subarray(this.index,p);break;case"array":case"nodebuffer":h=this.data.slice(this.index,p)}return this.index=p,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"),p=i("../support"),g=i("../external"),b=null;if(p.nodestream)try{b=i("../nodejs/NodejsStreamOutputAdapter")}catch{}function v(C,E){return new g.Promise(function(T,_){var k=[],A=C._internalType,q=C._outputType,H=C._mimeType;C.on("data",function(R,I){k.push(R),E&&E(I)}).on("error",function(R){k=[],_(R)}).on("end",function(){try{var R=(function(I,Y,F){switch(I){case"blob":return s.newBlob(s.transformTo("arraybuffer",Y),F);case"base64":return h.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+"'")}})(A,k),H);T(R)}catch(I){_(I)}k=[]}).resume()})}function y(C,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=C.pipe(new c(_)),C.lock()}catch(k){this._worker=new f("error"),this._worker.error(k)}}y.prototype={accumulate:function(C){return v(this,C)},on:function(C,E){var T=this;return C==="data"?this._worker.on(C,function(_){E.call(T,_.data,_.meta)}):this._worker.on(C,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(C){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new b(this,{objectMode:this._outputType!=="nodebuffer"},C)}},o.exports=y},{"../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"),p=new Array(256),g=0;g<256;g++)p[g]=252<=g?6:248<=g?5:240<=g?4:224<=g?3:192<=g?2:1;p[254]=p[254]=1;function b(){h.call(this,"utf-8 decode"),this.leftOver=null}function v(){h.call(this,"utf-8 encode")}u.utf8encode=function(y){return c.nodebuffer?f.newBufferFrom(y,"utf-8"):(function(C){var E,T,_,k,A,q=C.length,H=0;for(k=0;k<q;k++)(64512&(T=C.charCodeAt(k)))==55296&&k+1<q&&(64512&(_=C.charCodeAt(k+1)))==56320&&(T=65536+(T-55296<<10)+(_-56320),k++),H+=T<128?1:T<2048?2:T<65536?3:4;for(E=c.uint8array?new Uint8Array(H):new Array(H),k=A=0;A<H;k++)(64512&(T=C.charCodeAt(k)))==55296&&k+1<q&&(64512&(_=C.charCodeAt(k+1)))==56320&&(T=65536+(T-55296<<10)+(_-56320),k++),T<128?E[A++]=T:(T<2048?E[A++]=192|T>>>6:(T<65536?E[A++]=224|T>>>12:(E[A++]=240|T>>>18,E[A++]=128|T>>>12&63),E[A++]=128|T>>>6&63),E[A++]=128|63&T);return E})(y)},u.utf8decode=function(y){return c.nodebuffer?s.transformTo("nodebuffer",y).toString("utf-8"):(function(C){var E,T,_,k,A=C.length,q=new Array(2*A);for(E=T=0;E<A;)if((_=C[E++])<128)q[T++]=_;else if(4<(k=p[_]))q[T++]=65533,E+=k-1;else{for(_&=k===2?31:k===3?15:7;1<k&&E<A;)_=_<<6|63&C[E++],k--;1<k?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)})(y=s.transformTo(c.uint8array?"uint8array":"array",y))},s.inherits(b,h),b.prototype.processChunk=function(y){var C=s.transformTo(c.uint8array?"uint8array":"array",y.data);if(this.leftOver&&this.leftOver.length){if(c.uint8array){var E=C;(C=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),C.set(E,this.leftOver.length)}else C=this.leftOver.concat(C);this.leftOver=null}var T=(function(k,A){var q;for((A=A||k.length)>k.length&&(A=k.length),q=A-1;0<=q&&(192&k[q])==128;)q--;return q<0||q===0?A:q+p[k[q]]>A?q:A})(C),_=C;T!==C.length&&(c.uint8array?(_=C.subarray(0,T),this.leftOver=C.subarray(T,C.length)):(_=C.slice(0,T),this.leftOver=C.slice(T,C.length))),this.push({data:u.utf8decode(_),meta:y.meta})},b.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:u.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},u.Utf8DecodeWorker=b,s.inherits(v,h),v.prototype.processChunk=function(y){this.push({data:u.utf8encode(y.data),meta:y.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 p(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 b={stringifyByChunk:function(E,T,_){var k=[],A=0,q=E.length;if(q<=_)return String.fromCharCode.apply(null,E);for(;A<q;)T==="array"||T==="nodebuffer"?k.push(String.fromCharCode.apply(null,E.slice(A,Math.min(A+_,q)))):k.push(String.fromCharCode.apply(null,E.subarray(A,Math.min(A+_,q)))),A+=_;return k.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),k=!0;if(_==="uint8array"?k=b.applyCanBeUsed.uint8array:_==="nodebuffer"&&(k=b.applyCanBeUsed.nodebuffer),k)for(;1<T;)try{return b.stringifyByChunk(E,_,T)}catch{T=Math.floor(T/2)}return b.stringifyByChar(E)}function y(E,T){for(var _=0;_<E.length;_++)T[_]=E[_];return T}u.applyFromCharCode=v;var C={};C.string={string:p,array:function(E){return g(E,new Array(E.length))},arraybuffer:function(E){return C.string.uint8array(E).buffer},uint8array:function(E){return g(E,new Uint8Array(E.length))},nodebuffer:function(E){return g(E,f.allocBuffer(E.length))}},C.array={string:v,array:p,arraybuffer:function(E){return new Uint8Array(E).buffer},uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return f.newBufferFrom(E)}},C.arraybuffer={string:function(E){return v(new Uint8Array(E))},array:function(E){return y(new Uint8Array(E),new Array(E.byteLength))},arraybuffer:p,uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return f.newBufferFrom(new Uint8Array(E))}},C.uint8array={string:v,array:function(E){return y(E,new Array(E.length))},arraybuffer:function(E){return E.buffer},uint8array:p,nodebuffer:function(E){return f.newBufferFrom(E)}},C.nodebuffer={string:v,array:function(E){return y(E,new Array(E.length))},arraybuffer:function(E){return C.nodebuffer.uint8array(E).buffer},uint8array:function(E){return y(E,new Uint8Array(E.length))},nodebuffer:p},u.transformTo=function(E,T){if(T=T||"",!E)return T;u.checkSupport(E);var _=u.getTypeOf(T);return C[_][E](T)},u.resolve=function(E){for(var T=E.split("/"),_=[],k=0;k<T.length;k++){var A=T[k];A==="."||A===""&&k!==0&&k!==T.length-1||(A===".."?_.pop():_.push(A))}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,_,k="";for(_=0;_<(E||"").length;_++)k+="\\x"+((T=E.charCodeAt(_))<16?"0":"")+T.toString(16).toUpperCase();return k},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,_,k,A){return h.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 h.Promise(function(H,R){var I=new FileReader;I.onload=function(Y){H(Y.target.result)},I.onerror=function(Y){R(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"&&(A?q=c.decode(q):_&&k!==!0&&(q=(function(R){return g(R,s.uint8array?new Uint8Array(R.length):new Array(R.length))})(q))),q):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"),p=i("./support");function g(b){this.files=[],this.loadOptions=b}g.prototype={checkSignature:function(b){if(!this.reader.readAndCheckSignature(b)){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(b)+")")}},isSignature:function(b,v){var y=this.reader.index;this.reader.setIndex(b);var C=this.reader.readString(4)===v;return this.reader.setIndex(y),C},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 b=this.reader.readData(this.zipCommentLength),v=p.uint8array?"uint8array":"array",y=c.transformTo(v,b);this.zipComment=this.loadOptions.decodeFileName(y)},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 b,v,y,C=this.zip64EndOfCentralSize-44;0<C;)b=this.reader.readInt(2),v=this.reader.readInt(4),y=this.reader.readData(v),this.zip64ExtensibleData[b]={id:b,length:v,value:y}},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 b,v;for(b=0;b<this.files.length;b++)v=this.files[b],this.reader.setIndex(v.localHeaderOffset),this.checkSignature(f.LOCAL_FILE_HEADER),v.readLocalPart(this.reader),v.handleUTF8(),v.processAttributes()},readCentralDir:function(){var b;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(f.CENTRAL_FILE_HEADER);)(b=new h({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(b);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 b=this.reader.lastIndexOfSignature(f.CENTRAL_DIRECTORY_END);if(b<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(b);var v=b;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,(b=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(b),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 y=this.centralDirOffset+this.centralDirSize;this.zip64&&(y+=20,y+=12+this.zip64EndOfCentralSize);var C=v-y;if(0<C)this.isSignature(v,f.CENTRAL_FILE_HEADER)||(this.reader.zero=C);else if(C<0)throw new Error("Corrupted zip: missing "+Math.abs(C)+" bytes.")},prepareReader:function(b){this.reader=s(b)},load:function(b){this.prepareReader(b),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"),p=i("./utf8"),g=i("./compressions"),b=i("./support");function v(y,C){this.options=y,this.loadOptions=C}v.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(y){var C,E;if(y.skip(22),this.fileNameLength=y.readInt(2),E=y.readInt(2),this.fileName=y.readData(this.fileNameLength),y.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((C=(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,C,y.readData(this.compressedSize))},readCentralPart:function(y){this.versionMadeBy=y.readInt(2),y.skip(2),this.bitFlag=y.readInt(2),this.compressionMethod=y.readString(2),this.date=y.readDate(),this.crc32=y.readInt(4),this.compressedSize=y.readInt(4),this.uncompressedSize=y.readInt(4);var C=y.readInt(2);if(this.extraFieldsLength=y.readInt(2),this.fileCommentLength=y.readInt(2),this.diskNumberStart=y.readInt(2),this.internalFileAttributes=y.readInt(2),this.externalFileAttributes=y.readInt(4),this.localHeaderOffset=y.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");y.skip(C),this.readExtraFields(y),this.parseZIP64ExtraField(y),this.fileComment=y.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var y=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),y==0&&(this.dosPermissions=63&this.externalFileAttributes),y==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var y=s(this.extraFields[1].value);this.uncompressedSize===c.MAX_VALUE_32BITS&&(this.uncompressedSize=y.readInt(8)),this.compressedSize===c.MAX_VALUE_32BITS&&(this.compressedSize=y.readInt(8)),this.localHeaderOffset===c.MAX_VALUE_32BITS&&(this.localHeaderOffset=y.readInt(8)),this.diskNumberStart===c.MAX_VALUE_32BITS&&(this.diskNumberStart=y.readInt(4))}},readExtraFields:function(y){var C,E,T,_=y.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});y.index+4<_;)C=y.readInt(2),E=y.readInt(2),T=y.readData(E),this.extraFields[C]={id:C,length:E,value:T};y.setIndex(_)},handleUTF8:function(){var y=b.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=p.utf8decode(this.fileName),this.fileCommentStr=p.utf8decode(this.fileComment);else{var C=this.findExtraFieldUnicodePath();if(C!==null)this.fileNameStr=C;else{var E=c.transformTo(y,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(E)}var T=this.findExtraFieldUnicodeComment();if(T!==null)this.fileCommentStr=T;else{var _=c.transformTo(y,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(_)}}},findExtraFieldUnicodePath:function(){var y=this.extraFields[28789];if(y){var C=s(y.value);return C.readInt(1)!==1||h(this.fileName)!==C.readInt(4)?null:p.utf8decode(C.readData(y.length-5))}return null},findExtraFieldUnicodeComment:function(){var y=this.extraFields[25461];if(y){var C=s(y.value);return C.readInt(1)!==1||h(this.fileComment)!==C.readInt(4)?null:p.utf8decode(C.readData(y.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(C,E,T){this.name=C,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"),p=i("./compressedObject"),g=i("./stream/GenericWorker");s.prototype={internalStream:function(C){var E=null,T="string";try{if(!C)throw new Error("No output type specified.");var _=(T=C.toLowerCase())==="string"||T==="text";T!=="binarystring"&&T!=="text"||(T="string"),E=this._decompressWorker();var k=!this._dataBinary;k&&!_&&(E=E.pipe(new h.Utf8EncodeWorker)),!k&&_&&(E=E.pipe(new h.Utf8DecodeWorker))}catch(A){(E=new g("error")).error(A)}return new c(E,T,"")},async:function(C,E){return this.internalStream(C).accumulate(E)},nodeStream:function(C,E){return this.internalStream(C||"nodebuffer").toNodejsStream(E)},_compressWorker:function(C,E){if(this._data instanceof p&&this._data.compression.magic===C.magic)return this._data.getCompressedWorker();var T=this._decompressWorker();return this._dataBinary||(T=T.pipe(new h.Utf8EncodeWorker)),p.createWorkerFrom(T,C,E)},_decompressWorker:function(){return this._data instanceof p?this._data.getContentWorker():this._data instanceof g?this._data:new f(this._data)}};for(var b=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],v=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},y=0;y<b.length;y++)s.prototype[b[y]]=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 p=0,g=new h(C),b=s.document.createTextNode("");g.observe(b,{characterData:!0}),c=function(){b.data=p=++p%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(){C(),E.onreadystatechange=null,E.parentNode.removeChild(E),E=null},s.document.documentElement.appendChild(E)}:function(){setTimeout(C,0)};else{var v=new s.MessageChannel;v.port1.onmessage=C,c=function(){v.port2.postMessage(0)}}var y=[];function C(){var E,T;f=!0;for(var _=y.length;_;){for(T=y,y=[],E=-1;++E<_;)T[E]();_=y.length}f=!1}o.exports=function(E){y.push(E)!==1||f||c()}}).call(this,typeof Nl<"u"?Nl:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(i,o,u){var s=i("immediate");function c(){}var f={},h=["REJECTED"],p=["FULFILLED"],g=["PENDING"];function b(_){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(_,k,A){this.promise=_,typeof k=="function"&&(this.onFulfilled=k,this.callFulfilled=this.otherCallFulfilled),typeof A=="function"&&(this.onRejected=A,this.callRejected=this.otherCallRejected)}function y(_,k,A){s(function(){var q;try{q=k(A)}catch(H){return f.reject(_,H)}q===_?f.reject(_,new TypeError("Cannot resolve promise with itself")):f.resolve(_,q)})}function C(_){var k=_&&_.then;if(_&&(typeof _=="object"||typeof _=="function")&&typeof k=="function")return function(){k.apply(_,arguments)}}function E(_,k){var A=!1;function q(I){A||(A=!0,f.reject(_,I))}function H(I){A||(A=!0,f.resolve(_,I))}var R=T(function(){k(H,q)});R.status==="error"&&q(R.value)}function T(_,k){var A={};try{A.value=_(k),A.status="success"}catch(q){A.status="error",A.value=q}return A}(o.exports=b).prototype.finally=function(_){if(typeof _!="function")return this;var k=this.constructor;return this.then(function(A){return k.resolve(_()).then(function(){return A})},function(A){return k.resolve(_()).then(function(){throw A})})},b.prototype.catch=function(_){return this.then(null,_)},b.prototype.then=function(_,k){if(typeof _!="function"&&this.state===p||typeof k!="function"&&this.state===h)return this;var A=new this.constructor(c);return this.state!==g?y(A,this.state===p?_:k,this.outcome):this.queue.push(new v(A,_,k)),A},v.prototype.callFulfilled=function(_){f.resolve(this.promise,_)},v.prototype.otherCallFulfilled=function(_){y(this.promise,this.onFulfilled,_)},v.prototype.callRejected=function(_){f.reject(this.promise,_)},v.prototype.otherCallRejected=function(_){y(this.promise,this.onRejected,_)},f.resolve=function(_,k){var A=T(C,k);if(A.status==="error")return f.reject(_,A.value);var q=A.value;if(q)E(_,q);else{_.state=p,_.outcome=k;for(var H=-1,R=_.queue.length;++H<R;)_.queue[H].callFulfilled(k)}return _},f.reject=function(_,k){_.state=h,_.outcome=k;for(var A=-1,q=_.queue.length;++A<q;)_.queue[A].callRejected(k);return _},b.resolve=function(_){return _ instanceof this?_:f.resolve(new this(c),_)},b.reject=function(_){var k=new this(c);return f.reject(k,_)},b.all=function(_){var k=this;if(Object.prototype.toString.call(_)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=_.length,q=!1;if(!A)return this.resolve([]);for(var H=new Array(A),R=0,I=-1,Y=new this(c);++I<A;)F(_[I],I);return Y;function F($,ie){k.resolve($).then(function(D){H[ie]=D,++R!==A||q||(q=!0,f.resolve(Y,H))},function(D){q||(q=!0,f.reject(Y,D))})}},b.race=function(_){var k=this;if(Object.prototype.toString.call(_)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=_.length,q=!1;if(!A)return this.resolve([]);for(var H=-1,R=new this(c);++H<A;)I=_[H],k.resolve(I).then(function(Y){q||(q=!0,f.resolve(R,Y))},function(Y){q||(q=!0,f.reject(R,Y))});var I;return R}},{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"),p=i("./zlib/zstream"),g=Object.prototype.toString,b=0,v=-1,y=0,C=8;function E(_){if(!(this instanceof E))return new E(_);this.options=c.assign({level:v,method:C,chunkSize:16384,windowBits:15,memLevel:8,strategy:y,to:""},_||{});var k=this.options;k.raw&&0<k.windowBits?k.windowBits=-k.windowBits:k.gzip&&0<k.windowBits&&k.windowBits<16&&(k.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new p,this.strm.avail_out=0;var A=s.deflateInit2(this.strm,k.level,k.method,k.windowBits,k.memLevel,k.strategy);if(A!==b)throw new Error(h[A]);if(k.header&&s.deflateSetHeader(this.strm,k.header),k.dictionary){var q;if(q=typeof k.dictionary=="string"?f.string2buf(k.dictionary):g.call(k.dictionary)==="[object ArrayBuffer]"?new Uint8Array(k.dictionary):k.dictionary,(A=s.deflateSetDictionary(this.strm,q))!==b)throw new Error(h[A]);this._dict_set=!0}}function T(_,k){var A=new E(k);if(A.push(_,!0),A.err)throw A.msg||h[A.err];return A.result}E.prototype.push=function(_,k){var A,q,H=this.strm,R=this.options.chunkSize;if(this.ended)return!1;q=k===~~k?k:k===!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(R),H.next_out=0,H.avail_out=R),(A=s.deflate(H,q))!==1&&A!==b)return this.onEnd(A),!(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)&&A!==1);return q===4?(A=s.deflateEnd(this.strm),this.onEnd(A),this.ended=!0,A===b):q!==2||(this.onEnd(b),!(H.avail_out=0))},E.prototype.onData=function(_){this.chunks.push(_)},E.prototype.onEnd=function(_){_===b&&(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(_,k){return(k=k||{}).raw=!0,T(_,k)},u.gzip=function(_,k){return(k=k||{}).gzip=!0,T(_,k)}},{"./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"),p=i("./zlib/messages"),g=i("./zlib/zstream"),b=i("./zlib/gzheader"),v=Object.prototype.toString;function y(E){if(!(this instanceof y))return new y(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(p[_]);this.header=new b,s.inflateGetHeader(this.strm,this.header)}function C(E,T){var _=new y(T);if(_.push(E,!0),_.err)throw _.msg||p[_.err];return _.result}y.prototype.push=function(E,T){var _,k,A,q,H,R,I=this.strm,Y=this.options.chunkSize,F=this.options.dictionary,$=!1;if(this.ended)return!1;k=T===~~T?T:T===!0?h.Z_FINISH:h.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,h.Z_NO_FLUSH))===h.Z_NEED_DICT&&F&&(R=typeof F=="string"?f.string2buf(F):v.call(F)==="[object ArrayBuffer]"?new Uint8Array(F):F,_=s.inflateSetDictionary(this.strm,R)),_===h.Z_BUF_ERROR&&$===!0&&(_=h.Z_OK,$=!1),_!==h.Z_STREAM_END&&_!==h.Z_OK)return this.onEnd(_),!(this.ended=!0);I.next_out&&(I.avail_out!==0&&_!==h.Z_STREAM_END&&(I.avail_in!==0||k!==h.Z_FINISH&&k!==h.Z_SYNC_FLUSH)||(this.options.to==="string"?(A=f.utf8border(I.output,I.next_out),q=I.next_out-A,H=f.buf2string(I.output,A),I.next_out=q,I.avail_out=Y-q,q&&c.arraySet(I.output,I.output,A,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)&&_!==h.Z_STREAM_END);return _===h.Z_STREAM_END&&(k=h.Z_FINISH),k===h.Z_FINISH?(_=s.inflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===h.Z_OK):k!==h.Z_SYNC_FLUSH||(this.onEnd(h.Z_OK),!(I.avail_out=0))},y.prototype.onData=function(E){this.chunks.push(E)},y.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=y,u.inflate=C,u.inflateRaw=function(E,T){return(T=T||{}).raw=!0,C(E,T)},u.ungzip=C},{"./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 p=Array.prototype.slice.call(arguments,1);p.length;){var g=p.shift();if(g){if(typeof g!="object")throw new TypeError(g+"must be non-object");for(var b in g)g.hasOwnProperty(b)&&(h[b]=g[b])}}return h},u.shrinkBuf=function(h,p){return h.length===p?h:h.subarray?h.subarray(0,p):(h.length=p,h)};var c={arraySet:function(h,p,g,b,v){if(p.subarray&&h.subarray)h.set(p.subarray(g,g+b),v);else for(var y=0;y<b;y++)h[v+y]=p[g+y]},flattenChunks:function(h){var p,g,b,v,y,C;for(p=b=0,g=h.length;p<g;p++)b+=h[p].length;for(C=new Uint8Array(b),p=v=0,g=h.length;p<g;p++)y=h[p],C.set(y,v),v+=y.length;return C}},f={arraySet:function(h,p,g,b,v){for(var y=0;y<b;y++)h[v+y]=p[g+y]},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),p=0;p<256;p++)h[p]=252<=p?6:248<=p?5:240<=p?4:224<=p?3:192<=p?2:1;function g(b,v){if(v<65537&&(b.subarray&&f||!b.subarray&&c))return String.fromCharCode.apply(null,s.shrinkBuf(b,v));for(var y="",C=0;C<v;C++)y+=String.fromCharCode(b[C]);return y}h[254]=h[254]=1,u.string2buf=function(b){var v,y,C,E,T,_=b.length,k=0;for(E=0;E<_;E++)(64512&(y=b.charCodeAt(E)))==55296&&E+1<_&&(64512&(C=b.charCodeAt(E+1)))==56320&&(y=65536+(y-55296<<10)+(C-56320),E++),k+=y<128?1:y<2048?2:y<65536?3:4;for(v=new s.Buf8(k),E=T=0;T<k;E++)(64512&(y=b.charCodeAt(E)))==55296&&E+1<_&&(64512&(C=b.charCodeAt(E+1)))==56320&&(y=65536+(y-55296<<10)+(C-56320),E++),y<128?v[T++]=y:(y<2048?v[T++]=192|y>>>6:(y<65536?v[T++]=224|y>>>12:(v[T++]=240|y>>>18,v[T++]=128|y>>>12&63),v[T++]=128|y>>>6&63),v[T++]=128|63&y);return v},u.buf2binstring=function(b){return g(b,b.length)},u.binstring2buf=function(b){for(var v=new s.Buf8(b.length),y=0,C=v.length;y<C;y++)v[y]=b.charCodeAt(y);return v},u.buf2string=function(b,v){var y,C,E,T,_=v||b.length,k=new Array(2*_);for(y=C=0;y<_;)if((E=b[y++])<128)k[C++]=E;else if(4<(T=h[E]))k[C++]=65533,y+=T-1;else{for(E&=T===2?31:T===3?15:7;1<T&&y<_;)E=E<<6|63&b[y++],T--;1<T?k[C++]=65533:E<65536?k[C++]=E:(E-=65536,k[C++]=55296|E>>10&1023,k[C++]=56320|1023&E)}return g(k,C)},u.utf8border=function(b,v){var y;for((v=v||b.length)>b.length&&(v=b.length),y=v-1;0<=y&&(192&b[y])==128;)y--;return y<0||y===0?v:y+h[b[y]]>v?y:v}},{"./common":41}],43:[function(i,o,u){o.exports=function(s,c,f,h){for(var p=65535&s|0,g=s>>>16&65535|0,b=0;f!==0;){for(f-=b=2e3<f?2e3:f;g=g+(p=p+c[h++]|0)|0,--b;);p%=65521,g%=65521}return p|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 p=0;p<8;p++)c=1&c?3988292384^c>>>1:c>>>1;f[h]=c}return f})();o.exports=function(c,f,h,p){var g=s,b=p+h;c^=-1;for(var v=p;v<b;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"),p=i("./crc32"),g=i("./messages"),b=0,v=4,y=0,C=-2,E=-1,T=4,_=2,k=8,A=9,q=286,H=30,R=19,I=2*q+1,Y=15,F=3,$=258,ie=$+F+1,D=42,re=113,w=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 B(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 U(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 ne(S,K){S.pending_buf[S.pending++]=K>>>8&255,S.pending_buf[S.pending++]=255&K}function ce(S,K){var W,j,L=S.max_chain_length,X=S.strstart,he=S.prev_length,ge=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&&(L>>=2),ge>S.lookahead&&(ge=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(j=$-(te-X),X=te-$,he<j){if(S.match_start=K,ge<=(he=j))break;be=Ee[X+he-1],Ce=Ee[X+he]}}while((K=Se[K&_e])>le&&--L!=0);return he<=S.lookahead?he:S.lookahead}function we(S){var K,W,j,L,X,he,ge,le,Ee,_e,Se=S.w_size;do{if(L=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;j=S.head[--K],S.head[K]=Se<=j?j-Se:0,--W;);for(K=W=Se;j=S.prev[--K],S.prev[K]=Se<=j?j-Se:0,--W;);L+=Se}if(S.strm.avail_in===0)break;if(he=S.strm,ge=S.window,le=S.strstart+S.lookahead,Ee=L,_e=void 0,_e=he.avail_in,Ee<_e&&(_e=Ee),W=_e===0?0:(he.avail_in-=_e,c.arraySet(ge,he.input,he.next_in,_e,le),he.state.wrap===1?he.adler=h(he.adler,ge,_e,le):he.state.wrap===2&&(he.adler=p(he.adler,ge,_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,j;;){if(S.lookahead<ie){if(we(S),S.lookahead<ie&&K===b)return w;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(j=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 j=f._tr_tally(S,0,S.window[S.strstart]),S.lookahead--,S.strstart++;if(j&&(U(S,!1),S.strm.avail_out===0))return w}return S.insert=S.strstart<F-1?S.strstart:F-1,K===v?(U(S,!0),S.strm.avail_out===0?Z:Q):S.last_lit&&(U(S,!1),S.strm.avail_out===0)?w:V}function Ae(S,K){for(var W,j,L;;){if(S.lookahead<ie){if(we(S),S.lookahead<ie&&K===b)return w;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(L=S.strstart+S.lookahead-F,j=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<=L&&(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++,j&&(U(S,!1),S.strm.avail_out===0))return w}else if(S.match_available){if((j=f._tr_tally(S,0,S.window[S.strstart-1]))&&U(S,!1),S.strstart++,S.lookahead--,S.strm.avail_out===0)return w}else S.match_available=1,S.strstart++,S.lookahead--}return S.match_available&&(j=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?(U(S,!0),S.strm.avail_out===0?Z:Q):S.last_lit&&(U(S,!1),S.strm.avail_out===0)?w:V}function ke(S,K,W,j,L){this.good_length=S,this.max_lazy=K,this.nice_length=W,this.max_chain=j,this.func=L}function Pe(){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=k,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*R+1)),B(this.dyn_ltree),B(this.dyn_dtree),B(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),B(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new c.Buf16(2*q+1),B(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:re,S.adler=K.wrap===2?0:1,K.last_flush=b,f._tr_init(K),y):se(S,C)}function ze(S){var K=ve(S);return K===y&&(function(W){W.window_size=2*W.w_size,B(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,j,L,X){if(!S)return C;var he=1;if(K===E&&(K=6),j<0?(he=0,j=-j):15<j&&(he=2,j-=16),L<1||A<L||W!==k||j<8||15<j||K<0||9<K||X<0||T<X)return se(S,C);j===8&&(j=9);var ge=new Pe;return(S.state=ge).strm=S,ge.wrap=he,ge.gzhead=null,ge.w_bits=j,ge.w_size=1<<ge.w_bits,ge.w_mask=ge.w_size-1,ge.hash_bits=L+7,ge.hash_size=1<<ge.hash_bits,ge.hash_mask=ge.hash_size-1,ge.hash_shift=~~((ge.hash_bits+F-1)/F),ge.window=new c.Buf8(2*ge.w_size),ge.head=new c.Buf16(ge.hash_size),ge.prev=new c.Buf16(ge.w_size),ge.lit_bufsize=1<<L+6,ge.pending_buf_size=4*ge.lit_bufsize,ge.pending_buf=new c.Buf8(ge.pending_buf_size),ge.d_buf=1*ge.lit_bufsize,ge.l_buf=3*ge.lit_bufsize,ge.level=K,ge.strategy=X,ge.method=W,ze(S)}s=[new ke(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===b)return w;if(S.lookahead===0)break}S.strstart+=S.lookahead,S.lookahead=0;var j=S.block_start+W;if((S.strstart===0||S.strstart>=j)&&(S.lookahead=S.strstart-j,S.strstart=j,U(S,!1),S.strm.avail_out===0)||S.strstart-S.block_start>=S.w_size-ie&&(U(S,!1),S.strm.avail_out===0))return w}return S.insert=0,K===v?(U(S,!0),S.strm.avail_out===0?Z:Q):(S.strstart>S.block_start&&(U(S,!1),S.strm.avail_out),w)}),new ke(4,4,8,4,Te),new ke(4,5,16,8,Te),new ke(4,6,32,32,Te),new ke(4,4,16,16,Ae),new ke(8,16,32,32,Ae),new ke(8,16,128,128,Ae),new ke(8,32,128,256,Ae),new ke(32,128,258,1024,Ae),new ke(32,258,258,4096,Ae)],u.deflateInit=function(S,K){return je(S,K,k,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?C:(S.state.gzhead=K,y):C},u.deflate=function(S,K){var W,j,L,X;if(!S||!S.state||5<K||K<0)return S?se(S,C):C;if(j=S.state,!S.output||!S.input&&S.avail_in!==0||j.status===666&&K!==v)return se(S,S.avail_out===0?-5:C);if(j.strm=S,W=j.last_flush,j.last_flush=K,j.status===D)if(j.wrap===2)S.adler=0,z(j,31),z(j,139),z(j,8),j.gzhead?(z(j,(j.gzhead.text?1:0)+(j.gzhead.hcrc?2:0)+(j.gzhead.extra?4:0)+(j.gzhead.name?8:0)+(j.gzhead.comment?16:0)),z(j,255&j.gzhead.time),z(j,j.gzhead.time>>8&255),z(j,j.gzhead.time>>16&255),z(j,j.gzhead.time>>24&255),z(j,j.level===9?2:2<=j.strategy||j.level<2?4:0),z(j,255&j.gzhead.os),j.gzhead.extra&&j.gzhead.extra.length&&(z(j,255&j.gzhead.extra.length),z(j,j.gzhead.extra.length>>8&255)),j.gzhead.hcrc&&(S.adler=p(S.adler,j.pending_buf,j.pending,0)),j.gzindex=0,j.status=69):(z(j,0),z(j,0),z(j,0),z(j,0),z(j,0),z(j,j.level===9?2:2<=j.strategy||j.level<2?4:0),z(j,3),j.status=re);else{var he=k+(j.w_bits-8<<4)<<8;he|=(2<=j.strategy||j.level<2?0:j.level<6?1:j.level===6?2:3)<<6,j.strstart!==0&&(he|=32),he+=31-he%31,j.status=re,ne(j,he),j.strstart!==0&&(ne(j,S.adler>>>16),ne(j,65535&S.adler)),S.adler=1}if(j.status===69)if(j.gzhead.extra){for(L=j.pending;j.gzindex<(65535&j.gzhead.extra.length)&&(j.pending!==j.pending_buf_size||(j.gzhead.hcrc&&j.pending>L&&(S.adler=p(S.adler,j.pending_buf,j.pending-L,L)),N(S),L=j.pending,j.pending!==j.pending_buf_size));)z(j,255&j.gzhead.extra[j.gzindex]),j.gzindex++;j.gzhead.hcrc&&j.pending>L&&(S.adler=p(S.adler,j.pending_buf,j.pending-L,L)),j.gzindex===j.gzhead.extra.length&&(j.gzindex=0,j.status=73)}else j.status=73;if(j.status===73)if(j.gzhead.name){L=j.pending;do{if(j.pending===j.pending_buf_size&&(j.gzhead.hcrc&&j.pending>L&&(S.adler=p(S.adler,j.pending_buf,j.pending-L,L)),N(S),L=j.pending,j.pending===j.pending_buf_size)){X=1;break}X=j.gzindex<j.gzhead.name.length?255&j.gzhead.name.charCodeAt(j.gzindex++):0,z(j,X)}while(X!==0);j.gzhead.hcrc&&j.pending>L&&(S.adler=p(S.adler,j.pending_buf,j.pending-L,L)),X===0&&(j.gzindex=0,j.status=91)}else j.status=91;if(j.status===91)if(j.gzhead.comment){L=j.pending;do{if(j.pending===j.pending_buf_size&&(j.gzhead.hcrc&&j.pending>L&&(S.adler=p(S.adler,j.pending_buf,j.pending-L,L)),N(S),L=j.pending,j.pending===j.pending_buf_size)){X=1;break}X=j.gzindex<j.gzhead.comment.length?255&j.gzhead.comment.charCodeAt(j.gzindex++):0,z(j,X)}while(X!==0);j.gzhead.hcrc&&j.pending>L&&(S.adler=p(S.adler,j.pending_buf,j.pending-L,L)),X===0&&(j.status=103)}else j.status=103;if(j.status===103&&(j.gzhead.hcrc?(j.pending+2>j.pending_buf_size&&N(S),j.pending+2<=j.pending_buf_size&&(z(j,255&S.adler),z(j,S.adler>>8&255),S.adler=0,j.status=re)):j.status=re),j.pending!==0){if(N(S),S.avail_out===0)return j.last_flush=-1,y}else if(S.avail_in===0&&de(K)<=de(W)&&K!==v)return se(S,-5);if(j.status===666&&S.avail_in!==0)return se(S,-5);if(S.avail_in!==0||j.lookahead!==0||K!==b&&j.status!==666){var ge=j.strategy===2?(function(le,Ee){for(var _e;;){if(le.lookahead===0&&(we(le),le.lookahead===0)){if(Ee===b)return w;break}if(le.match_length=0,_e=f._tr_tally(le,0,le.window[le.strstart]),le.lookahead--,le.strstart++,_e&&(U(le,!1),le.strm.avail_out===0))return w}return le.insert=0,Ee===v?(U(le,!0),le.strm.avail_out===0?Z:Q):le.last_lit&&(U(le,!1),le.strm.avail_out===0)?w:V})(j,K):j.strategy===3?(function(le,Ee){for(var _e,Se,te,be,Ce=le.window;;){if(le.lookahead<=$){if(we(le),le.lookahead<=$&&Ee===b)return w;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&&(U(le,!1),le.strm.avail_out===0))return w}return le.insert=0,Ee===v?(U(le,!0),le.strm.avail_out===0?Z:Q):le.last_lit&&(U(le,!1),le.strm.avail_out===0)?w:V})(j,K):s[j.level].func(j,K);if(ge!==Z&&ge!==Q||(j.status=666),ge===w||ge===Z)return S.avail_out===0&&(j.last_flush=-1),y;if(ge===V&&(K===1?f._tr_align(j):K!==5&&(f._tr_stored_block(j,0,0,!1),K===3&&(B(j.head),j.lookahead===0&&(j.strstart=0,j.block_start=0,j.insert=0))),N(S),S.avail_out===0))return j.last_flush=-1,y}return K!==v?y:j.wrap<=0?1:(j.wrap===2?(z(j,255&S.adler),z(j,S.adler>>8&255),z(j,S.adler>>16&255),z(j,S.adler>>24&255),z(j,255&S.total_in),z(j,S.total_in>>8&255),z(j,S.total_in>>16&255),z(j,S.total_in>>24&255)):(ne(j,S.adler>>>16),ne(j,65535&S.adler)),N(S),0<j.wrap&&(j.wrap=-j.wrap),j.pending!==0?y: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!==re&&K!==666?se(S,C):(S.state=null,K===re?se(S,-3):y):C},u.deflateSetDictionary=function(S,K){var W,j,L,X,he,ge,le,Ee,_e=K.length;if(!S||!S.state||(X=(W=S.state).wrap)===2||X===1&&W.status!==D||W.lookahead)return C;for(X===1&&(S.adler=h(S.adler,K,_e,0)),W.wrap=0,_e>=W.w_size&&(X===0&&(B(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,ge=S.next_in,le=S.input,S.avail_in=_e,S.next_in=0,S.input=K,we(W);W.lookahead>=F;){for(j=W.strstart,L=W.lookahead-(F-1);W.ins_h=(W.ins_h<<W.hash_shift^W.window[j+F-1])&W.hash_mask,W.prev[j&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=j,j++,--L;);W.strstart=j,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=ge,S.input=le,S.avail_in=he,W.wrap=X,y},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,p,g,b,v,y,C,E,T,_,k,A,q,H,R,I,Y,F,$,ie,D,re,w,V;f=s.state,h=s.next_in,w=s.input,p=h+(s.avail_in-5),g=s.next_out,V=s.output,b=g-(c-s.avail_out),v=g+(s.avail_out-257),y=f.dmax,C=f.wsize,E=f.whave,T=f.wnext,_=f.window,k=f.hold,A=f.bits,q=f.lencode,H=f.distcode,R=(1<<f.lenbits)-1,I=(1<<f.distbits)-1;e:do{A<15&&(k+=w[h++]<<A,A+=8,k+=w[h++]<<A,A+=8),Y=q[k&R];t:for(;;){if(k>>>=F=Y>>>24,A-=F,(F=Y>>>16&255)===0)V[g++]=65535&Y;else{if(!(16&F)){if((64&F)==0){Y=q[(65535&Y)+(k&(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)&&(A<F&&(k+=w[h++]<<A,A+=8),$+=k&(1<<F)-1,k>>>=F,A-=F),A<15&&(k+=w[h++]<<A,A+=8,k+=w[h++]<<A,A+=8),Y=H[k&I];n:for(;;){if(k>>>=F=Y>>>24,A-=F,!(16&(F=Y>>>16&255))){if((64&F)==0){Y=H[(65535&Y)+(k&(1<<F)-1)];continue n}s.msg="invalid distance code",f.mode=30;break e}if(ie=65535&Y,A<(F&=15)&&(k+=w[h++]<<A,(A+=8)<F&&(k+=w[h++]<<A,A+=8)),y<(ie+=k&(1<<F)-1)){s.msg="invalid distance too far back",f.mode=30;break e}if(k>>>=F,A-=F,(F=g-b)<ie){if(E<(F=ie-F)&&f.sane){s.msg="invalid distance too far back",f.mode=30;break e}if(re=_,(D=0)===T){if(D+=C-F,F<$){for($-=F;V[g++]=_[D++],--F;);D=g-ie,re=V}}else if(T<F){if(D+=C+T-F,(F-=T)<$){for($-=F;V[g++]=_[D++],--F;);if(D=0,T<$){for($-=F=T;V[g++]=_[D++],--F;);D=g-ie,re=V}}}else if(D+=T-F,F<$){for($-=F;V[g++]=_[D++],--F;);D=g-ie,re=V}for(;2<$;)V[g++]=re[D++],V[g++]=re[D++],V[g++]=re[D++],$-=3;$&&(V[g++]=re[D++],1<$&&(V[g++]=re[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(h<p&&g<v);h-=$=A>>3,k&=(1<<(A-=$<<3))-1,s.next_in=h,s.next_out=g,s.avail_in=h<p?p-h+5:5-(h-p),s.avail_out=g<v?v-g+257:257-(g-v),f.hold=k,f.bits=A}},{}],49:[function(i,o,u){var s=i("../utils/common"),c=i("./adler32"),f=i("./crc32"),h=i("./inffast"),p=i("./inftrees"),g=1,b=2,v=0,y=-2,C=1,E=852,T=592;function _(D){return(D>>>24&255)+(D>>>8&65280)+((65280&D)<<8)+((255&D)<<24)}function k(){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 A(D){var re;return D&&D.state?(re=D.state,D.total_in=D.total_out=re.total=0,D.msg="",re.wrap&&(D.adler=1&re.wrap),re.mode=C,re.last=0,re.havedict=0,re.dmax=32768,re.head=null,re.hold=0,re.bits=0,re.lencode=re.lendyn=new s.Buf32(E),re.distcode=re.distdyn=new s.Buf32(T),re.sane=1,re.back=-1,v):y}function q(D){var re;return D&&D.state?((re=D.state).wsize=0,re.whave=0,re.wnext=0,A(D)):y}function H(D,re){var w,V;return D&&D.state?(V=D.state,re<0?(w=0,re=-re):(w=1+(re>>4),re<48&&(re&=15)),re&&(re<8||15<re)?y:(V.window!==null&&V.wbits!==re&&(V.window=null),V.wrap=w,V.wbits=re,q(D))):y}function R(D,re){var w,V;return D?(V=new k,(D.state=V).window=null,(w=H(D,re))!==v&&(D.state=null),w):y}var I,Y,F=!0;function $(D){if(F){var re;for(I=new s.Buf32(512),Y=new s.Buf32(32),re=0;re<144;)D.lens[re++]=8;for(;re<256;)D.lens[re++]=9;for(;re<280;)D.lens[re++]=7;for(;re<288;)D.lens[re++]=8;for(p(g,D.lens,0,288,I,0,D.work,{bits:9}),re=0;re<32;)D.lens[re++]=5;p(b,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,re,w,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,re,w-Q.wsize,Q.wsize,0),Q.wnext=0,Q.whave=Q.wsize):(V<(Z=Q.wsize-Q.wnext)&&(Z=V),s.arraySet(Q.window,re,w-V,Z,Q.wnext),(V-=Z)?(s.arraySet(Q.window,re,w-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=A,u.inflateInit=function(D){return R(D,15)},u.inflateInit2=R,u.inflate=function(D,re){var w,V,Z,Q,se,de,B,N,U,z,ne,ce,we,Te,Ae,ke,Pe,ve,ze,je,S,K,W,j,L=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 y;(w=D.state).mode===12&&(w.mode=13),se=D.next_out,Z=D.output,B=D.avail_out,Q=D.next_in,V=D.input,de=D.avail_in,N=w.hold,U=w.bits,z=de,ne=B,K=v;e:for(;;)switch(w.mode){case C:if(w.wrap===0){w.mode=13;break}for(;U<16;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if(2&w.wrap&&N===35615){X[w.check=0]=255&N,X[1]=N>>>8&255,w.check=f(w.check,X,2,0),U=N=0,w.mode=2;break}if(w.flags=0,w.head&&(w.head.done=!1),!(1&w.wrap)||(((255&N)<<8)+(N>>8))%31){D.msg="incorrect header check",w.mode=30;break}if((15&N)!=8){D.msg="unknown compression method",w.mode=30;break}if(U-=4,S=8+(15&(N>>>=4)),w.wbits===0)w.wbits=S;else if(S>w.wbits){D.msg="invalid window size",w.mode=30;break}w.dmax=1<<S,D.adler=w.check=1,w.mode=512&N?10:12,U=N=0;break;case 2:for(;U<16;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if(w.flags=N,(255&w.flags)!=8){D.msg="unknown compression method",w.mode=30;break}if(57344&w.flags){D.msg="unknown header flags set",w.mode=30;break}w.head&&(w.head.text=N>>8&1),512&w.flags&&(X[0]=255&N,X[1]=N>>>8&255,w.check=f(w.check,X,2,0)),U=N=0,w.mode=3;case 3:for(;U<32;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}w.head&&(w.head.time=N),512&w.flags&&(X[0]=255&N,X[1]=N>>>8&255,X[2]=N>>>16&255,X[3]=N>>>24&255,w.check=f(w.check,X,4,0)),U=N=0,w.mode=4;case 4:for(;U<16;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}w.head&&(w.head.xflags=255&N,w.head.os=N>>8),512&w.flags&&(X[0]=255&N,X[1]=N>>>8&255,w.check=f(w.check,X,2,0)),U=N=0,w.mode=5;case 5:if(1024&w.flags){for(;U<16;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}w.length=N,w.head&&(w.head.extra_len=N),512&w.flags&&(X[0]=255&N,X[1]=N>>>8&255,w.check=f(w.check,X,2,0)),U=N=0}else w.head&&(w.head.extra=null);w.mode=6;case 6:if(1024&w.flags&&(de<(ce=w.length)&&(ce=de),ce&&(w.head&&(S=w.head.extra_len-w.length,w.head.extra||(w.head.extra=new Array(w.head.extra_len)),s.arraySet(w.head.extra,V,Q,ce,S)),512&w.flags&&(w.check=f(w.check,V,ce,Q)),de-=ce,Q+=ce,w.length-=ce),w.length))break e;w.length=0,w.mode=7;case 7:if(2048&w.flags){if(de===0)break e;for(ce=0;S=V[Q+ce++],w.head&&S&&w.length<65536&&(w.head.name+=String.fromCharCode(S)),S&&ce<de;);if(512&w.flags&&(w.check=f(w.check,V,ce,Q)),de-=ce,Q+=ce,S)break e}else w.head&&(w.head.name=null);w.length=0,w.mode=8;case 8:if(4096&w.flags){if(de===0)break e;for(ce=0;S=V[Q+ce++],w.head&&S&&w.length<65536&&(w.head.comment+=String.fromCharCode(S)),S&&ce<de;);if(512&w.flags&&(w.check=f(w.check,V,ce,Q)),de-=ce,Q+=ce,S)break e}else w.head&&(w.head.comment=null);w.mode=9;case 9:if(512&w.flags){for(;U<16;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if(N!==(65535&w.check)){D.msg="header crc mismatch",w.mode=30;break}U=N=0}w.head&&(w.head.hcrc=w.flags>>9&1,w.head.done=!0),D.adler=w.check=0,w.mode=12;break;case 10:for(;U<32;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}D.adler=w.check=_(N),U=N=0,w.mode=11;case 11:if(w.havedict===0)return D.next_out=se,D.avail_out=B,D.next_in=Q,D.avail_in=de,w.hold=N,w.bits=U,2;D.adler=w.check=1,w.mode=12;case 12:if(re===5||re===6)break e;case 13:if(w.last){N>>>=7&U,U-=7&U,w.mode=27;break}for(;U<3;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}switch(w.last=1&N,U-=1,3&(N>>>=1)){case 0:w.mode=14;break;case 1:if($(w),w.mode=20,re!==6)break;N>>>=2,U-=2;break e;case 2:w.mode=17;break;case 3:D.msg="invalid block type",w.mode=30}N>>>=2,U-=2;break;case 14:for(N>>>=7&U,U-=7&U;U<32;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if((65535&N)!=(N>>>16^65535)){D.msg="invalid stored block lengths",w.mode=30;break}if(w.length=65535&N,U=N=0,w.mode=15,re===6)break e;case 15:w.mode=16;case 16:if(ce=w.length){if(de<ce&&(ce=de),B<ce&&(ce=B),ce===0)break e;s.arraySet(Z,V,Q,ce,se),de-=ce,Q+=ce,B-=ce,se+=ce,w.length-=ce;break}w.mode=12;break;case 17:for(;U<14;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if(w.nlen=257+(31&N),N>>>=5,U-=5,w.ndist=1+(31&N),N>>>=5,U-=5,w.ncode=4+(15&N),N>>>=4,U-=4,286<w.nlen||30<w.ndist){D.msg="too many length or distance symbols",w.mode=30;break}w.have=0,w.mode=18;case 18:for(;w.have<w.ncode;){for(;U<3;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}w.lens[he[w.have++]]=7&N,N>>>=3,U-=3}for(;w.have<19;)w.lens[he[w.have++]]=0;if(w.lencode=w.lendyn,w.lenbits=7,W={bits:w.lenbits},K=p(0,w.lens,0,19,w.lencode,0,w.work,W),w.lenbits=W.bits,K){D.msg="invalid code lengths set",w.mode=30;break}w.have=0,w.mode=19;case 19:for(;w.have<w.nlen+w.ndist;){for(;ke=(L=w.lencode[N&(1<<w.lenbits)-1])>>>16&255,Pe=65535&L,!((Ae=L>>>24)<=U);){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if(Pe<16)N>>>=Ae,U-=Ae,w.lens[w.have++]=Pe;else{if(Pe===16){for(j=Ae+2;U<j;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if(N>>>=Ae,U-=Ae,w.have===0){D.msg="invalid bit length repeat",w.mode=30;break}S=w.lens[w.have-1],ce=3+(3&N),N>>>=2,U-=2}else if(Pe===17){for(j=Ae+3;U<j;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}U-=Ae,S=0,ce=3+(7&(N>>>=Ae)),N>>>=3,U-=3}else{for(j=Ae+7;U<j;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}U-=Ae,S=0,ce=11+(127&(N>>>=Ae)),N>>>=7,U-=7}if(w.have+ce>w.nlen+w.ndist){D.msg="invalid bit length repeat",w.mode=30;break}for(;ce--;)w.lens[w.have++]=S}}if(w.mode===30)break;if(w.lens[256]===0){D.msg="invalid code -- missing end-of-block",w.mode=30;break}if(w.lenbits=9,W={bits:w.lenbits},K=p(g,w.lens,0,w.nlen,w.lencode,0,w.work,W),w.lenbits=W.bits,K){D.msg="invalid literal/lengths set",w.mode=30;break}if(w.distbits=6,w.distcode=w.distdyn,W={bits:w.distbits},K=p(b,w.lens,w.nlen,w.ndist,w.distcode,0,w.work,W),w.distbits=W.bits,K){D.msg="invalid distances set",w.mode=30;break}if(w.mode=20,re===6)break e;case 20:w.mode=21;case 21:if(6<=de&&258<=B){D.next_out=se,D.avail_out=B,D.next_in=Q,D.avail_in=de,w.hold=N,w.bits=U,h(D,ne),se=D.next_out,Z=D.output,B=D.avail_out,Q=D.next_in,V=D.input,de=D.avail_in,N=w.hold,U=w.bits,w.mode===12&&(w.back=-1);break}for(w.back=0;ke=(L=w.lencode[N&(1<<w.lenbits)-1])>>>16&255,Pe=65535&L,!((Ae=L>>>24)<=U);){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if(ke&&(240&ke)==0){for(ve=Ae,ze=ke,je=Pe;ke=(L=w.lencode[je+((N&(1<<ve+ze)-1)>>ve)])>>>16&255,Pe=65535&L,!(ve+(Ae=L>>>24)<=U);){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}N>>>=ve,U-=ve,w.back+=ve}if(N>>>=Ae,U-=Ae,w.back+=Ae,w.length=Pe,ke===0){w.mode=26;break}if(32&ke){w.back=-1,w.mode=12;break}if(64&ke){D.msg="invalid literal/length code",w.mode=30;break}w.extra=15&ke,w.mode=22;case 22:if(w.extra){for(j=w.extra;U<j;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}w.length+=N&(1<<w.extra)-1,N>>>=w.extra,U-=w.extra,w.back+=w.extra}w.was=w.length,w.mode=23;case 23:for(;ke=(L=w.distcode[N&(1<<w.distbits)-1])>>>16&255,Pe=65535&L,!((Ae=L>>>24)<=U);){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if((240&ke)==0){for(ve=Ae,ze=ke,je=Pe;ke=(L=w.distcode[je+((N&(1<<ve+ze)-1)>>ve)])>>>16&255,Pe=65535&L,!(ve+(Ae=L>>>24)<=U);){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}N>>>=ve,U-=ve,w.back+=ve}if(N>>>=Ae,U-=Ae,w.back+=Ae,64&ke){D.msg="invalid distance code",w.mode=30;break}w.offset=Pe,w.extra=15&ke,w.mode=24;case 24:if(w.extra){for(j=w.extra;U<j;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}w.offset+=N&(1<<w.extra)-1,N>>>=w.extra,U-=w.extra,w.back+=w.extra}if(w.offset>w.dmax){D.msg="invalid distance too far back",w.mode=30;break}w.mode=25;case 25:if(B===0)break e;if(ce=ne-B,w.offset>ce){if((ce=w.offset-ce)>w.whave&&w.sane){D.msg="invalid distance too far back",w.mode=30;break}we=ce>w.wnext?(ce-=w.wnext,w.wsize-ce):w.wnext-ce,ce>w.length&&(ce=w.length),Te=w.window}else Te=Z,we=se-w.offset,ce=w.length;for(B<ce&&(ce=B),B-=ce,w.length-=ce;Z[se++]=Te[we++],--ce;);w.length===0&&(w.mode=21);break;case 26:if(B===0)break e;Z[se++]=w.length,B--,w.mode=21;break;case 27:if(w.wrap){for(;U<32;){if(de===0)break e;de--,N|=V[Q++]<<U,U+=8}if(ne-=B,D.total_out+=ne,w.total+=ne,ne&&(D.adler=w.check=w.flags?f(w.check,Z,ne,se-ne):c(w.check,Z,ne,se-ne)),ne=B,(w.flags?N:_(N))!==w.check){D.msg="incorrect data check",w.mode=30;break}U=N=0}w.mode=28;case 28:if(w.wrap&&w.flags){for(;U<32;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if(N!==(4294967295&w.total)){D.msg="incorrect length check",w.mode=30;break}U=N=0}w.mode=29;case 29:K=1;break e;case 30:K=-3;break e;case 31:return-4;case 32:default:return y}return D.next_out=se,D.avail_out=B,D.next_in=Q,D.avail_in=de,w.hold=N,w.bits=U,(w.wsize||ne!==D.avail_out&&w.mode<30&&(w.mode<27||re!==4))&&ie(D,D.output,D.next_out,ne-D.avail_out)?(w.mode=31,-4):(z-=D.avail_in,ne-=D.avail_out,D.total_in+=z,D.total_out+=ne,w.total+=ne,w.wrap&&ne&&(D.adler=w.check=w.flags?f(w.check,Z,ne,D.next_out-ne):c(w.check,Z,ne,D.next_out-ne)),D.data_type=w.bits+(w.last?64:0)+(w.mode===12?128:0)+(w.mode===20||w.mode===15?256:0),(z==0&&ne===0||re===4)&&K===v&&(K=-5),K)},u.inflateEnd=function(D){if(!D||!D.state)return y;var re=D.state;return re.window&&(re.window=null),D.state=null,v},u.inflateGetHeader=function(D,re){var w;return D&&D.state?(2&(w=D.state).wrap)==0?y:((w.head=re).done=!1,v):y},u.inflateSetDictionary=function(D,re){var w,V=re.length;return D&&D.state?(w=D.state).wrap!==0&&w.mode!==11?y:w.mode===11&&c(1,re,V,0)!==w.check?-3:ie(D,re,V,V)?(w.mode=31,-4):(w.havedict=1,v):y},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],p=[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,b,v,y,C,E,T,_){var k,A,q,H,R,I,Y,F,$,ie=_.bits,D=0,re=0,w=0,V=0,Z=0,Q=0,se=0,de=0,B=0,N=0,U=null,z=0,ne=new s.Buf16(16),ce=new s.Buf16(16),we=null,Te=0;for(D=0;D<=15;D++)ne[D]=0;for(re=0;re<y;re++)ne[b[v+re]]++;for(Z=ie,V=15;1<=V&&ne[V]===0;V--);if(V<Z&&(Z=V),V===0)return C[E++]=20971520,C[E++]=20971520,_.bits=1,0;for(w=1;w<V&&ne[w]===0;w++);for(Z<w&&(Z=w),D=de=1;D<=15;D++)if(de<<=1,(de-=ne[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]+ne[D];for(re=0;re<y;re++)b[v+re]!==0&&(T[ce[b[v+re]]++]=re);if(I=g===0?(U=we=T,19):g===1?(U=c,z-=257,we=f,Te-=257,256):(U=h,we=p,-1),D=w,R=E,se=re=N=0,q=-1,H=(B=1<<(Q=Z))-1,g===1&&852<B||g===2&&592<B)return 1;for(;;){for(Y=D-se,$=T[re]<I?(F=0,T[re]):T[re]>I?(F=we[Te+T[re]],U[z+T[re]]):(F=96,0),k=1<<D-se,w=A=1<<Q;C[R+(N>>se)+(A-=k)]=Y<<24|F<<16|$|0,A!==0;);for(k=1<<D-1;N&k;)k>>=1;if(k!==0?(N&=k-1,N+=k):N=0,re++,--ne[D]==0){if(D===V)break;D=b[v+T[re]]}if(Z<D&&(N&H)!==q){for(se===0&&(se=Z),R+=w,de=1<<(Q=D-se);Q+se<V&&!((de-=ne[Q+se])<=0);)Q++,de<<=1;if(B+=1<<Q,g===1&&852<B||g===2&&592<B)return 1;C[q=N&H]=Z<<24|Q<<16|R-E|0}}return N!==0&&(C[R+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 h(L){for(var X=L.length;0<=--X;)L[X]=0}var p=0,g=29,b=256,v=b+1+g,y=30,C=19,E=2*v+1,T=15,_=16,k=7,A=256,q=16,H=17,R=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));h(ie);var D=new Array(2*y);h(D);var re=new Array(512);h(re);var w=new Array(256);h(w);var V=new Array(g);h(V);var Z,Q,se,de=new Array(y);function B(L,X,he,ge,le){this.static_tree=L,this.extra_bits=X,this.extra_base=he,this.elems=ge,this.max_length=le,this.has_stree=L&&L.length}function N(L,X){this.dyn_tree=L,this.max_code=0,this.stat_desc=X}function U(L){return L<256?re[L]:re[256+(L>>>7)]}function z(L,X){L.pending_buf[L.pending++]=255&X,L.pending_buf[L.pending++]=X>>>8&255}function ne(L,X,he){L.bi_valid>_-he?(L.bi_buf|=X<<L.bi_valid&65535,z(L,L.bi_buf),L.bi_buf=X>>_-L.bi_valid,L.bi_valid+=he-_):(L.bi_buf|=X<<L.bi_valid&65535,L.bi_valid+=he)}function ce(L,X,he){ne(L,he[2*X],he[2*X+1])}function we(L,X){for(var he=0;he|=1&L,L>>>=1,he<<=1,0<--X;);return he>>>1}function Te(L,X,he){var ge,le,Ee=new Array(T+1),_e=0;for(ge=1;ge<=T;ge++)Ee[ge]=_e=_e+he[ge-1]<<1;for(le=0;le<=X;le++){var Se=L[2*le+1];Se!==0&&(L[2*le]=we(Ee[Se]++,Se))}}function Ae(L){var X;for(X=0;X<v;X++)L.dyn_ltree[2*X]=0;for(X=0;X<y;X++)L.dyn_dtree[2*X]=0;for(X=0;X<C;X++)L.bl_tree[2*X]=0;L.dyn_ltree[2*A]=1,L.opt_len=L.static_len=0,L.last_lit=L.matches=0}function ke(L){8<L.bi_valid?z(L,L.bi_buf):0<L.bi_valid&&(L.pending_buf[L.pending++]=L.bi_buf),L.bi_buf=0,L.bi_valid=0}function Pe(L,X,he,ge){var le=2*X,Ee=2*he;return L[le]<L[Ee]||L[le]===L[Ee]&&ge[X]<=ge[he]}function ve(L,X,he){for(var ge=L.heap[he],le=he<<1;le<=L.heap_len&&(le<L.heap_len&&Pe(X,L.heap[le+1],L.heap[le],L.depth)&&le++,!Pe(X,ge,L.heap[le],L.depth));)L.heap[he]=L.heap[le],he=le,le<<=1;L.heap[he]=ge}function ze(L,X,he){var ge,le,Ee,_e,Se=0;if(L.last_lit!==0)for(;ge=L.pending_buf[L.d_buf+2*Se]<<8|L.pending_buf[L.d_buf+2*Se+1],le=L.pending_buf[L.l_buf+Se],Se++,ge===0?ce(L,le,X):(ce(L,(Ee=w[le])+b+1,X),(_e=I[Ee])!==0&&ne(L,le-=V[Ee],_e),ce(L,Ee=U(--ge),he),(_e=Y[Ee])!==0&&ne(L,ge-=de[Ee],_e)),Se<L.last_lit;);ce(L,A,X)}function je(L,X){var he,ge,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(L.heap_len=0,L.heap_max=E,he=0;he<te;he++)Ee[2*he]!==0?(L.heap[++L.heap_len]=be=he,L.depth[he]=0):Ee[2*he+1]=0;for(;L.heap_len<2;)Ee[2*(le=L.heap[++L.heap_len]=be<2?++be:0)]=1,L.depth[le]=0,L.opt_len--,Se&&(L.static_len-=_e[2*le+1]);for(X.max_code=be,he=L.heap_len>>1;1<=he;he--)ve(L,Ee,he);for(le=te;he=L.heap[1],L.heap[1]=L.heap[L.heap_len--],ve(L,Ee,1),ge=L.heap[1],L.heap[--L.heap_max]=he,L.heap[--L.heap_max]=ge,Ee[2*le]=Ee[2*he]+Ee[2*ge],L.depth[le]=(L.depth[he]>=L.depth[ge]?L.depth[he]:L.depth[ge])+1,Ee[2*he+1]=Ee[2*ge+1]=le,L.heap[1]=le++,ve(L,Ee,1),2<=L.heap_len;);L.heap[--L.heap_max]=L.heap[1],(function(Ce,Be){var Je,pt,qt,Xe,gt,Ot,Ze=Be.dyn_tree,Cn=Be.max_code,nn=Be.stat_desc.static_tree,Ou=Be.stat_desc.has_stree,Ei=Be.stat_desc.extra_bits,Gr=Be.stat_desc.extra_base,jn=Be.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,Gr<=pt&&(gt=Ei[pt-Gr]),Ot=Ze[2*pt],Ce.opt_len+=Ot*(Xe+gt),Ou&&(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--)}})(L,X),Te(Ee,be,L.bl_count)}function S(L,X,he){var ge,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,ge=0;ge<=he;ge++)le=_e,_e=X[2*(ge+1)+1],++Se<te&&le===_e||(Se<be?L.bl_tree[2*le]+=Se:le!==0?(le!==Ee&&L.bl_tree[2*le]++,L.bl_tree[2*q]++):Se<=10?L.bl_tree[2*H]++:L.bl_tree[2*R]++,Ee=le,be=(Se=0)===_e?(te=138,3):le===_e?(te=6,3):(te=7,4))}function K(L,X,he){var ge,le,Ee=-1,_e=X[1],Se=0,te=7,be=4;for(_e===0&&(te=138,be=3),ge=0;ge<=he;ge++)if(le=_e,_e=X[2*(ge+1)+1],!(++Se<te&&le===_e)){if(Se<be)for(;ce(L,le,L.bl_tree),--Se!=0;);else le!==0?(le!==Ee&&(ce(L,le,L.bl_tree),Se--),ce(L,q,L.bl_tree),ne(L,Se-3,2)):Se<=10?(ce(L,H,L.bl_tree),ne(L,Se-3,3)):(ce(L,R,L.bl_tree),ne(L,Se-11,7));Ee=le,be=(Se=0)===_e?(te=138,3):le===_e?(te=6,3):(te=7,4)}}h(de);var W=!1;function j(L,X,he,ge){ne(L,(p<<1)+(ge?1:0),3),(function(le,Ee,_e,Se){ke(le),z(le,_e),z(le,~_e),s.arraySet(le.pending_buf,le.window,Ee,_e,le.pending),le.pending+=_e})(L,X,he)}u._tr_init=function(L){W||((function(){var X,he,ge,le,Ee,_e=new Array(T+1);for(le=ge=0;le<g-1;le++)for(V[le]=ge,X=0;X<1<<I[le];X++)w[ge++]=le;for(w[ge-1]=le,le=Ee=0;le<16;le++)for(de[le]=Ee,X=0;X<1<<Y[le];X++)re[Ee++]=le;for(Ee>>=7;le<y;le++)for(de[le]=Ee<<7,X=0;X<1<<Y[le]-7;X++)re[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<y;X++)D[2*X+1]=5,D[2*X]=we(X,5);Z=new B(ie,I,b+1,v,T),Q=new B(D,Y,0,y,T),se=new B(new Array(0),F,0,C,k)})(),W=!0),L.l_desc=new N(L.dyn_ltree,Z),L.d_desc=new N(L.dyn_dtree,Q),L.bl_desc=new N(L.bl_tree,se),L.bi_buf=0,L.bi_valid=0,Ae(L)},u._tr_stored_block=j,u._tr_flush_block=function(L,X,he,ge){var le,Ee,_e=0;0<L.level?(L.strm.data_type===2&&(L.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<b;te++)if(Se.dyn_ltree[2*te]!==0)return f;return c})(L)),je(L,L.l_desc),je(L,L.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=C-1;3<=te&&Se.bl_tree[2*$[te]+1]===0;te--);return Se.opt_len+=3*(te+1)+5+5+4,te})(L),le=L.opt_len+3+7>>>3,(Ee=L.static_len+3+7>>>3)<=le&&(le=Ee)):le=Ee=he+5,he+4<=le&&X!==-1?j(L,X,he,ge):L.strategy===4||Ee===le?(ne(L,2+(ge?1:0),3),ze(L,ie,D)):(ne(L,4+(ge?1:0),3),(function(Se,te,be,Ce){var Be;for(ne(Se,te-257,5),ne(Se,be-1,5),ne(Se,Ce-4,4),Be=0;Be<Ce;Be++)ne(Se,Se.bl_tree[2*$[Be]+1],3);K(Se,Se.dyn_ltree,te-1),K(Se,Se.dyn_dtree,be-1)})(L,L.l_desc.max_code+1,L.d_desc.max_code+1,_e+1),ze(L,L.dyn_ltree,L.dyn_dtree)),Ae(L),ge&&ke(L)},u._tr_tally=function(L,X,he){return L.pending_buf[L.d_buf+2*L.last_lit]=X>>>8&255,L.pending_buf[L.d_buf+2*L.last_lit+1]=255&X,L.pending_buf[L.l_buf+L.last_lit]=255&he,L.last_lit++,X===0?L.dyn_ltree[2*he]++:(L.matches++,X--,L.dyn_ltree[2*(w[he]+b+1)]++,L.dyn_dtree[2*U(X)]++),L.last_lit===L.lit_bufsize-1},u._tr_align=function(L){ne(L,2,3),ce(L,A,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)})(L)}},{"../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,p,g,b,v=1,y={},C=!1,E=c.document,T=Object.getPrototypeOf&&Object.getPrototypeOf(c);T=T&&T.setTimeout?T:c,h={}.toString.call(c.process)==="[object process]"?function(q){process.nextTick(function(){k(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}})()?(b="setImmediate$"+Math.random()+"$",c.addEventListener?c.addEventListener("message",A,!1):c.attachEvent("onmessage",A),function(q){c.postMessage(b+q,"*")}):c.MessageChannel?((g=new MessageChannel).port1.onmessage=function(q){k(q.data)},function(q){g.port2.postMessage(q)}):E&&"onreadystatechange"in E.createElement("script")?(p=E.documentElement,function(q){var H=E.createElement("script");H.onreadystatechange=function(){k(q),H.onreadystatechange=null,p.removeChild(H),H=null},p.appendChild(H)}):function(q){setTimeout(k,0,q)},T.setImmediate=function(q){typeof q!="function"&&(q=new Function(""+q));for(var H=new Array(arguments.length-1),R=0;R<H.length;R++)H[R]=arguments[R+1];var I={callback:q,args:H};return y[v]=I,h(v),v++},T.clearImmediate=_}function _(q){delete y[q]}function k(q){if(C)setTimeout(k,0,q);else{var H=y[q];if(H){C=!0;try{(function(R){var I=R.callback,Y=R.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),C=!1}}}}function A(q){q.source===c&&typeof q.data=="string"&&q.data.indexOf(b)===0&&k(+q.data.slice(b.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof Nl<"u"?Nl:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Hs)),Hs.exports}var Dh;function IS(){if(Dh)return Pr;Dh=1;var n=Pr&&Pr.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.Filemanager=void 0;const l=n(BS()),i=Rn();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,p;if(this.shouldZipFiles()){const g=await this.zipFiles(),b=this.getUploadFileName();h=this.blobToFile(g,b),p="application/zip"}else h=this.pendingFiles?.[0],p=h.type;for(let g=0;g<f.length;g++){const b=f[g],v=await fetch(b,{method:"PUT",body:h,headers:{"Content-Type":p,"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:b}});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 Pr.Filemanager=o,Pr}var wn={},jh;function ql(){if(jh)return wn;jh=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=Us();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_ESCALATION:"tool_escalation",INLINE_TEXT:"inline_text"},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 wa={},Lh;function US(){if(Lh)return wa;Lh=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.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 wa.AudioManager=l,wa}var Bh;function Ih(){if(Bh)return _a;Bh=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.MessageManager=void 0;const n=Us(),l=IS(),i=ql(),o=US(),u=Rn();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:p}){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(p){const b=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:p,...b&&{text:b}}},this.fileManager?.clearPendingFilesState()}return g}sendSocketMessage({message:f,files:h,audio:p,url:g}){const b=this.assertConnection("sendSocketChatMessage");let v;if(h&&h.length>0||g&&g.trim()!==""?v=this.handleFileUploadProcess({files:h,message:f,url:g}):f?v={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.TEXT,_id:Date.now().toString(),ts:Date.now(),data:{text:f}}:p&&p?.audio&&p?.format&&(v={ev:n.SOCKET_EVENTS.STREAM,ct:n.SOCKET_CONTENT_TYPES.AUDIO,_id:Date.now().toString(),ts:Date.now(),data:{audio:p?.audio,format:p?.format}}),!v){const y=new u.MessageError("No message to send",{context:{stage:"sendSocketChatMessage"}});throw this.emitError(y),y}b.sendMessage(v)}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(g=>{const b=this.toFileError(g,"Failed to upload files to presigned URL",{stage:"handleIncomingSocketChatMessage",urls:f.data?.urls?.length});this.emitError(b)});break}case n.SOCKET_CONTENT_TYPES.TEXT:if(f.data.text&&f.data.text.trim()===""&&f._id){const g={data:{text:f.data.text},messageId:f._id,timestamp:f.ts};h.emit(i.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,g)}break;case n.SOCKET_CONTENT_TYPES.PILL:case n.SOCKET_CONTENT_TYPES.MULTI:case n.SOCKET_CONTENT_TYPES.DOCTOR_CARD:if(f?.data?.tool_use_id&&f._id){const g={data:{...f.data,type:f.ct},messageId:f._id,timestamp:f.ts};h.emit(i.SYNAPSE_REALTIME_EVENTS.TOOL_ESCALATION,g)}break;case n.SOCKET_CONTENT_TYPES.INLINE_TEXT:if(f?.data?.text){const g={data:{text:f.data.text},messageId:f._id,timestamp:f.ts};h.emit(i.SYNAPSE_REALTIME_EVENTS.INLINE_TEXT,g)}break;default:const p=new u.MessageError("Unsupported content type",{context:{stage:"handleIncomingSocketChatMessage",contentType:f.ct}});throw this.emitError(p),p}}handleIncomingSocketStreamMessage(f){const h=this.assertConnection("handleIncomingSocketStreamMessage");switch(f.ct){case n.SOCKET_CONTENT_TYPES.TEXT:if(f?.data?.progress_msg){const g={data:{text:f.data.progress_msg},messageId:f._id,timestamp:f.ts};h.emit(i.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE,g);return}if(f?.data?.text){const g={data:{text:f.data.text},messageId:f._id,timestamp:f.ts};h.emit(i.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,g)}break;case n.SOCKET_CONTENT_TYPES.TIPS:if(f?.data?.tips){const g={data:{tips:f.data.tips},messageId:f._id,timestamp:f.ts};h.emit(i.SYNAPSE_REALTIME_EVENTS.TIPS_MESSAGE,g);return}break;default:const p=new u.MessageError("Unsupported content type",{context:{stage:"handleIncomingSocketStreamMessage",contentType:f.ct}});throw this.emitError(p),p}}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 p=new u.MessageError(f.msg||"Socket error received",{context:{stage:"handleIncomingSocketErrorMessage",errorCode:f.code}});h.emit(i.SYNAPSE_REALTIME_EVENTS.ERROR,p),this.emitError(p)}}sendSocketAuthMessage(f){const h=this.assertConnection("sendSocketAuthMessage"),p={ev:n.SOCKET_EVENTS.AUTH,_id:Date.now().toString(),ts:Date.now(),data:{token:f}};h.sendMessage(p)}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 p=new u.RecordingError("onChunks is required",{context:{stage:"startRecording"},hint:"onChunks is required"});throw this.emitError(p),p}this.assertConnection("startRecording"),this.audioManager||(this.audioManager=new o.AudioManager);try{await this.audioManager.start(f,p=>{const g=this.toRecordingError(p,"Failed to start audio recording",{stage:"startRecording"});h?.(g),this.emitError(g)})}catch(p){const g=this.toRecordingError(p,"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,p,g){return(0,u.normalizeError)(f,u.FileError,h,{context:p,hint:g})}toRecordingError(f,h,p,g){return(0,u.normalizeError)(f,u.RecordingError,h,{context:p,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 _a.MessageManager=s,_a}var Ca={},Uh;function Hh(){if(Uh)return Ca;Uh=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.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 Ca.ErrorUtils=l,Ca}var qh;function HS(){if(qh)return ma;qh=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.SynapseSDK=void 0;const n=vh(),l=Eh(),i=Oh(),o=Ih(),u=ql(),s=Hh(),c=Rn(),f=Us();class h{connection=null;messageManager;resourceManager;sessionToken=null;sessionId=null;config;connectionType;constructor(g){this.config={...g,environment:g.environment||"production"},this.connectionType=g.connectionType||n.ConnectionType.SOCKET;const b=(0,l.getConfig)(this.config?.environment).BASE_API_URL;this.resourceManager=new i.ResourceManager({agentId:this.config.agentId,serverUrl:b})}async startSession(g){try{const b=await this.manageSession(g);return await this.initializeConnection(b),this.setupEventHandlers(),b}catch(b){const v=s.ErrorUtils.getUserFriendlyMessage(b),y=s.ErrorUtils.getErrorDetails(b),C=this.toSessionError(b,v||"Failed to start session",{stage:"startSession",details:y},"Check network connectivity or refresh credentials before retrying.");throw this.emitError(C),C}}async sendMessage({message:g,files:b,audio:v}){if(!this.connection){const y=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(y),y}switch(this.connectionType){case n.ConnectionType.SOCKET:this.messageManager.sendSocketMessage({message:g,files:b,audio:v});break;default:const y=new c.ConnectionError("Unsupported connection type",{context:{stage:"sendChatMessage",connectionType:this.connectionType}});throw this.emitError(y),y}}on(g,b){this.connection?.on(g,b)}off(g,b){this.connection?.off(g,b)}getSessionConfig(){if(!this.sessionId||!this.sessionToken)throw new c.SessionError("Session ID or token not found",{context:{stage:"getSessionConfig"},hint:"Ensure the session API returns both identifiers."});return{session_id:this.sessionId,session_token:this.sessionToken}}async callTool(g,b){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.sessionId){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 y=await this.resourceManager.callTool(this.sessionId,g,b);if(y.err)throw new c.APIError(y.err.msg,500,y.err);return y}catch(y){if(y instanceof c.APIError&&y?.status===401)return await this.handleSessionExpiry(),await this.callTool(g,b);throw y}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:b}){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:b})}catch(y){throw y}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,b,v,y){return(0,c.normalizeError)(g,c.SessionError,b,{context:v,hint:y})}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.sessionId=g.session_id,this.sessionToken=g.session_token;const b=(0,l.getConfig)(this.config?.environment).WEBSOCKET_URL,v=(this.config.connectionType==="socket",n.ConnectionType.SOCKET);this.connection=await n.ConnectionFactory.createConnection(v,{serverUrl:b,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 b=await this.resourceManager.validateSession(g.session_id);return b.active?g:b.expired?this.refreshSession(g.session_id,g.session_token):this.createNewSession()}catch(b){if(b instanceof c.APIError){const v=b.status;if(v===404||v===500)return this.createNewSession()}throw this.toSessionError(b,"Failed to resolve session",{stage:"resolveSession"})}}async refreshSession(g,b){try{return await this.resourceManager.refreshSession(g,b)}catch(v){if(v instanceof c.APIError){this.emitError(v);const y=v.status;if(y===404||y===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 b=this.toConnectionError(g,"WebSocket connection error",{stage:"onSocketConnectionError"},"Verify network connectivity or attempt to reconnect.");this.emitError(b)}onSocketConnectionOpen(){if(!this.sessionToken){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.sessionToken)}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 b=new c.MessageError("Unsupported message type",{context:{stage:"onIncomingSocketMessage",event:g.ev??"unknown"},hint:"Ensure the server is sending supported socket events."});this.emitError(b);return}}async handleSessionExpiry(){try{if(this.endSession(),!this.sessionId||!this.sessionToken){const b=new c.SessionError("Session ID or token not found",{context:{stage:"handleSessionExpiry"}});throw this.emitError(b),b}const g=await this.refreshSession(this.sessionId,this.sessionToken);if(!g.session_id||!g.session_token)throw new c.SessionError("Session refresh failed",{context:{stage:"handleSessionExpiry"}});this.sessionId=g.session_id,this.sessionToken=g.session_token,await this.initializeConnection(g),this.setupEventHandlers(),this.config.callbacks?.onSessionRefreshed?.(g)}catch(g){const b=this.toSessionError(g,"Session expired",{stage:"handleSessionExpiry"});this.emitError(b)}}toConnectionError(g,b,v,y){return(0,c.normalizeError)(g,c.ConnectionError,b,{context:v,hint:y})}}return ma.SynapseSDK=h,ma}var qs={},Ph;function qS(){return Ph||(Ph=1,Object.defineProperty(qs,"__esModule",{value:!0})),qs}var Ta={},Fh;function PS(){return Fh||(Fh=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.USER_FEEDBACK=void 0,Ta.USER_FEEDBACK={LIKE:"LIKE",DISLIKE:"DISLIKE",NONE:"NONE"}),Ta}var Ps={},Yh;function FS(){return Yh||(Yh=1,Object.defineProperty(Ps,"__esModule",{value:!0})),Ps}var ka={},Vh;function YS(){return Vh||(Vh=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 Fs={},Gh;function VS(){return Gh||(Gh=1,Object.defineProperty(Fs,"__esModule",{value:!0})),Fs}var Xh;function GS(){return Xh||(Xh=1,(function(n){var l=Ur&&Ur.__createBinding||(Object.create?(function(k,A,q,H){H===void 0&&(H=q);var R=Object.getOwnPropertyDescriptor(A,q);(!R||("get"in R?!A.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return A[q]}}),Object.defineProperty(k,H,R)}):(function(k,A,q,H){H===void 0&&(H=q),k[H]=A[q]})),i=Ur&&Ur.__exportStar||function(k,A){for(var q in k)q!=="default"&&!Object.prototype.hasOwnProperty.call(A,q)&&l(A,k,q)};Object.defineProperty(n,"__esModule",{value:!0}),n.SYNAPSE_MESSAGE_TYPES=n.ErrorUtils=n.SYNAPSE_TOOL_NAME=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.SYNAPSE_REALTIME_EVENTS=n.MessageManager=n.ToolCall=n.Session=n.ResourceManager=n.ConnectionType=n.ConnectionFactory=n.WebSocketConnection=n.BaseConnection=n.SynapseSDK=void 0;var o=HS();Object.defineProperty(n,"SynapseSDK",{enumerable:!0,get:function(){return o.SynapseSDK}});var u=mh();Object.defineProperty(n,"BaseConnection",{enumerable:!0,get:function(){return u.BaseConnection}});var s=yh();Object.defineProperty(n,"WebSocketConnection",{enumerable:!0,get:function(){return s.WebSocketConnection}});var c=vh();Object.defineProperty(n,"ConnectionFactory",{enumerable:!0,get:function(){return c.ConnectionFactory}}),Object.defineProperty(n,"ConnectionType",{enumerable:!0,get:function(){return c.ConnectionType}}),i(Ls(),n);var f=Oh();Object.defineProperty(n,"ResourceManager",{enumerable:!0,get:function(){return f.ResourceManager}}),i(qS(),n);var h=kh();Object.defineProperty(n,"Session",{enumerable:!0,get:function(){return h.Session}}),i(PS(),n);var p=Nh();Object.defineProperty(n,"ToolCall",{enumerable:!0,get:function(){return p.ToolCall}}),i(FS(),n);var g=Ih();Object.defineProperty(n,"MessageManager",{enumerable:!0,get:function(){return g.MessageManager}});var b=ql();Object.defineProperty(n,"SYNAPSE_REALTIME_EVENTS",{enumerable:!0,get:function(){return b.SYNAPSE_REALTIME_EVENTS}});var v=_h();Object.defineProperty(n,"HttpClient",{enumerable:!0,get:function(){return v.HttpClient}});var y=Rn();Object.defineProperty(n,"SynapseError",{enumerable:!0,get:function(){return y.SynapseError}}),Object.defineProperty(n,"APIError",{enumerable:!0,get:function(){return y.APIError}}),Object.defineProperty(n,"APIUserAbortError",{enumerable:!0,get:function(){return y.APIUserAbortError}}),Object.defineProperty(n,"APIConnectionTimeoutError",{enumerable:!0,get:function(){return y.APIConnectionTimeoutError}}),Object.defineProperty(n,"BadRequestError",{enumerable:!0,get:function(){return y.BadRequestError}}),Object.defineProperty(n,"UnauthorizedError",{enumerable:!0,get:function(){return y.UnauthorizedError}}),Object.defineProperty(n,"PermissionDeniedError",{enumerable:!0,get:function(){return y.PermissionDeniedError}}),Object.defineProperty(n,"NotFoundError",{enumerable:!0,get:function(){return y.NotFoundError}}),Object.defineProperty(n,"MethodNotAllowedError",{enumerable:!0,get:function(){return y.MethodNotAllowedError}}),Object.defineProperty(n,"RateLimitError",{enumerable:!0,get:function(){return y.RateLimitError}}),Object.defineProperty(n,"InternalServerError",{enumerable:!0,get:function(){return y.InternalServerError}}),Object.defineProperty(n,"SynapseErrorCode",{enumerable:!0,get:function(){return y.SynapseErrorCode}});var C=YS();Object.defineProperty(n,"ErrorType",{enumerable:!0,get:function(){return C.ErrorType}});var E=Eh();Object.defineProperty(n,"SYNAPSE_TOOL_NAME",{enumerable:!0,get:function(){return E.SYNAPSE_TOOL_NAME}});var T=Hh();Object.defineProperty(n,"ErrorUtils",{enumerable:!0,get:function(){return T.ErrorUtils}}),i(VS(),n);var _=ql();Object.defineProperty(n,"SYNAPSE_MESSAGE_TYPES",{enumerable:!0,get:function(){return _.SYNAPSE_MESSAGE_TYPES}})})(Ur)),Ur}var Ge=GS();const Zh=n=>{let l;const i=new Set,o=(p,g)=>{const b=typeof p=="function"?p(l):p;if(!Object.is(b,l)){const v=l;l=g??(typeof b!="object"||b===null)?b:Object.assign({},l,b),i.forEach(y=>y(l,v))}},u=()=>l,f={setState:o,getState:u,getInitialState:()=>h,subscribe:p=>(i.add(p),()=>i.delete(p))},h=l=n(o,u,f);return f},XS=(n=>n?Zh(n):Zh),ZS=n=>n;function KS(n,l=ZS){const i=oa.useSyncExternalStore(n.subscribe,oa.useCallback(()=>l(n.getState()),[n,l]),oa.useCallback(()=>l(n.getInitialState()),[n,l]));return oa.useDebugValue(i),i}const QS=n=>{const l=XS(n),i=o=>KS(l,o);return Object.assign(i,l),i},JS=(n=>QS);function Kh(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 Ys=n=>l=>{try{const i=n(l);return i instanceof Promise?i:{then(o){return Ys(o)(i)},catch(o){return this}}}catch(i){return{then(o){return this},catch(o){return Ys(o)(i)}}}},WS=(n,l)=>(i,o,u)=>{let s={storage:Kh(()=>localStorage),partialize:E=>E,version:0,merge:(E,T)=>({...T,...E}),...l},c=!1;const f=new Set,h=new Set;let p=s.storage;if(!p)return n((...E)=>{i(...E)},o,u);const g=()=>{const E=s.partialize({...o()});return p.setItem(s.name,{state:E,version:s.version})},b=u.setState;u.setState=(E,T)=>(b(E,T),g());const v=n((...E)=>(i(...E),g()),o,u);u.getInitialState=()=>v;let y;const C=()=>{var E,T;if(!p)return;c=!1,f.forEach(k=>{var A;return k((A=o())!=null?A:v)});const _=((T=s.onRehydrateStorage)==null?void 0:T.call(s,(E=o())!=null?E:v))||void 0;return Ys(p.getItem.bind(p))(s.name).then(k=>{if(k)if(typeof k.version=="number"&&k.version!==s.version){if(s.migrate){const A=s.migrate(k.state,k.version);return A instanceof Promise?A.then(q=>[!0,q]):[!0,A]}}else return[!1,k.state];return[!1,void 0]}).then(k=>{var A;const[q,H]=k;if(y=s.merge(H,(A=o())!=null?A:v),i(y,!0),q)return g()}).then(()=>{_?.(y,void 0),y=o(),c=!0,h.forEach(k=>k(y))}).catch(k=>{_?.(void 0,k)})};return u.persist={setOptions:E=>{s={...s,...E},E.storage&&(p=E.storage)},clearStorage:()=>{p?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>C(),hasHydrated:()=>c,onHydrate:E=>(f.add(E),()=>{f.delete(E)}),onFinishHydration:E=>(h.add(E),()=>{h.delete(E)})},s.skipHydration||C(),y||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 $S={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},Fr=JS()(WS((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($S),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:Kh(()=>localStorage),partialize:n=>({agentId:n.agentId,chats:n.chats,sessionId:n.sessionId,sessionToken:n.sessionToken,initialMessage:n.initialMessage,connectionStatus:n.connectionStatus})}));function e1({onClose:n,title:l,iconUrl:i,startNewConversation:o}){const u=Fr(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 M.jsx("div",{className:"bg-lavender-100/95 backdrop-blur-md shadow-lg border-b border-lavender-200/60 px-6 py-2",children:M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsxs("div",{className:"flex items-center gap-3",children:[M.jsxs("div",{className:"relative flex-shrink-0",children:[M.jsx(da,{className:"w-12 h-12 bg-gradient-to-br from-lavender-400 to-lavender-500 flex-shrink-0 shadow-md ring-0",children:M.jsx(ha,{className:"text-white font-bold text-lg bg-transparent",children:i?M.jsx("img",{src:i,alt:"Bot Icon",className:"w-12 h-12 rounded-full object-cover"}):M.jsx("span",{className:"text-white font-bold text-lg bg-transparent",children:"MC"})})}),M.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")})]}),M.jsxs("div",{className:"flex flex-col",children:[M.jsx("p",{className:"text-lg font-semibold text-slate-900",children:l||"Health Assist"}),M.jsx("div",{className:"flex items-center gap-1.5",children:M.jsx("span",{className:Ye("text-xs font-medium",c.textColor),children:c.text})})]})]}),M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx(At,{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:M.jsx(yS,{className:"w-8 h-8"})}),M.jsx(At,{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:M.jsx(Rs,{className:"w-8 h-8"})})]})]})})}const t1=P.lazy(()=>Promise.resolve().then(()=>f1));function n1({isOpen:n,onClose:l,iconUrl:i,onStartNewSession:o,children:u,title:s,chatComposer:c}){const[f,h]=P.useState(!1),p=P.useRef(null);P.useEffect(()=>{const v=()=>{const y=window?.innerWidth??0,C=navigator?.userAgent?.toLowerCase()??"",E=y<768||/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(C);h(E)};return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[]),P.useEffect(()=>{if(!n||!f||!p.current)return;const v=p.current;let y=null,C=null;if(window.visualViewport){const E=()=>{if(v&&window.visualViewport){const k=window.visualViewport.height,A=window.visualViewport.offsetTop;y=requestAnimationFrame(()=>{v.style.transition="none",v.style.top=`${A}px`,v.style.left="0",v.style.right="0",v.style.bottom="auto",v.style.width="100vw",v.style.height=`${k}px`,v.style.maxHeight=`${k}px`,v.style.minHeight=`${k}px`,C&&clearTimeout(C),C=setTimeout(()=>{v.style.transition=""},100)})}},T=()=>{E()},_=()=>{if(v&&window.visualViewport){const k=window.visualViewport.offsetTop;y=requestAnimationFrame(()=>{v.style.transition="none",v.style.top=`${k}px`,setTimeout(()=>{v.style.transition=""},50)})}};return window.visualViewport.addEventListener("resize",T),window.visualViewport.addEventListener("scroll",_),E(),()=>{y&&cancelAnimationFrame(y),C&&clearTimeout(C),window.visualViewport?.removeEventListener("resize",T),window.visualViewport?.removeEventListener("scroll",_)}}else{const E=()=>{v&&(v.style.transition="none",v.style.top="0",v.style.left="0",v.style.right="0",v.style.bottom="auto",v.style.width="100vw",v.style.height="100svh",v.style.maxHeight="100svh",setTimeout(()=>{v.style.transition=""},100))};return window.addEventListener("resize",E),E(),()=>{window.removeEventListener("resize",E)}}},[n,f]),P.useEffect(()=>{if(n){const v=document.body.style.overflow,y=document.body.style.paddingRight,C=document.documentElement.style.overflow,E=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",E>0&&!f&&(document.body.style.paddingRight=`${E}px`),()=>{document.body.style.overflow=v,document.body.style.paddingRight=y,document.documentElement.style.overflow=C}}},[n,f]);const g=Ye("synapse-chat-widget-container","fixed m-0 p-0","box-border",f?"":"transition-all duration-300",f?"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",f?"bg-white":"bg-white/90 backdrop-blur-2xl","shadow-2xl","flex flex-col","overflow-hidden","border border-white/50 ring-1 ring-white/60",f?"rounded-none":"rounded-3xl");return M.jsxs("div",{ref:p,className:g,style:{margin:0,padding:0,border:"none",outline:"none",position:"fixed",zIndex:2147483647,fontSize:"16px",lineHeight:"2.5",userSelect:"auto",...f&&{top:0,left:0,right:0,bottom:0,width:"100vw",maxHeight:"100svh",height:"100svh",minHeight:"100svh",backgroundColor:"white"}},children:[M.jsx("style",{children:`
|
|
8
|
+
`+a.stack}}var X=Object.prototype.hasOwnProperty,he=n.unstable_scheduleCallback,ge=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,m=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var R=a&134217727;return R!==0?(a=R&~m,a!==0?d=hn(a):(x&=R,x!==0?d=hn(x):r||(r=R&~e,r!==0&&(d=hn(r))))):(R=a&~m,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&m)===0&&(m=d&-d,r=t&-t,m>=r||m===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,m){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),m!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=m&~(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,m=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(x){r=""+x,m.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,m,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&&m!=null&&(e.defaultChecked=!!m),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,m,x,R){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.type=m),t!=null||r!=null){if(!(m!=="submit"&&m!=="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 m in t)t.hasOwnProperty(m)&&Xp(e,m,t[m])}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,m=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[m-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,m,x){this._reactName=r,this._targetInst=d,this.type=a,this.nativeEvent=m,this.target=x,this.currentTarget=null;for(var R in e)e.hasOwnProperty(R)&&(r=e[R],this[R]=r?r(m):m[R]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?lo:Wp,this.isPropagationStopped=Wp,this}return b(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=b({},Kr,{view:0,detail:0}),u2=Zt(Va),Xu,Zu,Ga,so=b({},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=b({},so,{dataTransfer:0}),f2=Zt(c2),d2=b({},Va,{relatedTarget:0}),Ku=Zt(d2),h2=b({},Kr,{animationName:0,elapsedTime:0,pseudoElement:0}),m2=Zt(h2),p2=b({},Kr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),g2=Zt(p2),y2=b({},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=b({},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=b({},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=b({},Va,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qu}),T2=Zt(C2),A2=b({},Kr,{propertyName:0,elapsedTime:0,pseudoElement:0}),k2=Zt(A2),N2=b({},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=b({},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 m=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}m!==0&&Cg(r,d,m)}}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,m=e.return;m!==null;)m.childLanes|=r,a=m.alternate,a!==null&&(a.childLanes|=r),m.tag===22&&(e=m.stateNode,e===null||e._visibility&1||(d=!0)),e=m,m=m.return;return e.tag===3?(m=e.stateNode,d&&t!==null&&(d=31-Ze(r),e=m.hiddenUpdates,a=e[d],a===null?e[d]=[t]:a.push(t),t.lane=r|536870912),m):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,m){var x=0;if(a=e,typeof e=="function")oc(e)&&(x=1);else if(typeof e=="string")x=$C(e,r,ne.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=m,e;case E:return $r(r.children,d,m,t);case T:x=8,d|=24;break;case _:return e=an(12,r,t,d|2),e.elementType=_,e.lanes=m,e;case H:return e=an(13,r,t,d),e.elementType=H,e.lanes=m,e;case D:return e=an(19,r,t,d),e.elementType=D,e.lanes=m,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case k:x=10;break e;case A:x=9;break e;case P:x=11;break e;case B: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=m,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:L(t)},kg.set(e,t),t)}return{value:e,source:t,stack:L(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 m=32-Ze(t)+d;if(30<m){var x=d-d%5;m=(a&(1<<x)-1).toString(32),a>>=x,d-=x,Ln=1<<32-Ze(t)+d|r<<d|a,In=m+e}else Ln=1<<m|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){O(mc,t._currentValue),t._currentValue=r}function Qn(e){e._currentValue=mc.current,U(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 m=d.dependencies;if(m!==null){var x=d.child;m=m.firstContext;e:for(;m!==null;){var R=m;m=d;for(var G=0;G<t.length;G++)if(R.context===t[G]){m.lanes|=r,R=m.alternate,R!==null&&(R.lanes|=r),pc(m.return,r,e),a||(x=null);break e}m=R.next}}else if(d.tag===18){if(x=d.return,x===null)throw Error(o(341));x.lanes|=r,m=x.alternate,m!==null&&(m.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,m=!1;d!==null;){if(!m){if((d.flags&524288)!==0)m=!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?O(ri,ri.current):O(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 m(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,pe){return J===null||J.tag!==6?(J=sc(ae,ee.mode,pe),J.return=ee,J):(J=d(J,ae),J.return=ee,J)}function G(ee,J,ae,pe){var De=ae.type;return De===E?me(ee,J,ae.props.children,pe,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,pe),rl(J,ae),J.return=ee,J)}function oe(ee,J,ae,pe){return J===null||J.tag!==4||J.stateNode.containerInfo!==ae.containerInfo||J.stateNode.implementation!==ae.implementation?(J=uc(ae,ee.mode,pe),J.return=ee,J):(J=d(J,ae.children||[]),J.return=ee,J)}function me(ee,J,ae,pe,De){return J===null||J.tag!==7?(J=$r(ae,ee.mode,pe,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 y:return ae=po(J.type,J.key,J.props,null,ee.mode,ae),rl(ae,J),ae.return=ee,ae;case C:return J=uc(J,ee.mode,ae),J.return=ee,J;case Y:return J=ii(J),ye(ee,J,ae)}if(V(J)||M(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,pe){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,pe);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case y:return ae.key===De?G(ee,J,ae,pe):null;case C:return ae.key===De?oe(ee,J,ae,pe):null;case Y:return ae=ii(ae),ue(ee,J,ae,pe)}if(V(ae)||M(ae))return De!==null?null:me(ee,J,ae,pe,null);if(typeof ae.then=="function")return ue(ee,J,xo(ae),pe);if(ae.$$typeof===k)return ue(ee,J,bo(ee,ae),pe);_o(ee,ae)}return null}function fe(ee,J,ae,pe,De){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return ee=ee.get(ae)||null,R(J,ee,""+pe,De);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case y:return ee=ee.get(pe.key===null?ae:pe.key)||null,G(J,ee,pe,De);case C:return ee=ee.get(pe.key===null?ae:pe.key)||null,oe(J,ee,pe,De);case Y:return pe=ii(pe),fe(ee,J,ae,pe,De)}if(V(pe)||M(pe))return ee=ee.get(ae)||null,me(J,ee,pe,De,null);if(typeof pe.then=="function")return fe(ee,J,ae,xo(pe),De);if(pe.$$typeof===k)return fe(ee,J,ae,bo(J,pe),De);_o(J,pe)}return null}function Ne(ee,J,ae,pe){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],pe);if(nt===null){Me===null&&(Me=$e);break}e&&Me&&nt.alternate===null&&t(ee,Me),J=m(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],pe),Me!==null&&(J=m(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],pe),$e!==null&&(e&&$e.alternate!==null&&Me.delete($e.key===null?Fe:$e.key),J=m($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,pe){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,pe);if(Br===null){Me===null&&(Me=$e);break}e&&Me&&Br.alternate===null&&t(ee,Me),J=m(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,pe),nt!==null&&(J=m(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,pe),nt!==null&&(e&&nt.alternate!==null&&Me.delete(nt.key===null?Fe:nt.key),J=m(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,pe){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 y: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),pe=d(J,ae.props.children),pe.return=ee,ee=pe;break e}}else if(J.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Y&&ii(De)===J.type){r(ee,J.sibling),pe=d(J,ae.props),rl(pe,ae),pe.return=ee,ee=pe;break e}r(ee,J);break}else t(ee,J);J=J.sibling}ae.type===E?(pe=$r(ae.props.children,ee.mode,pe,ae.key),pe.return=ee,ee=pe):(pe=po(ae.type,ae.key,ae.props,null,ee.mode,pe),rl(pe,ae),pe.return=ee,ee=pe)}return x(ee);case C: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),pe=d(J,ae.children||[]),pe.return=ee,ee=pe;break e}else{r(ee,J);break}else t(ee,J);J=J.sibling}pe=uc(ae,ee.mode,pe),pe.return=ee,ee=pe}return x(ee);case Y:return ae=ii(ae),ut(ee,J,ae,pe)}if(V(ae))return Ne(ee,J,ae,pe);if(M(ae)){if(De=M(ae),typeof De!="function")throw Error(o(150));return ae=De.call(ae),Le(ee,J,ae,pe)}if(typeof ae.then=="function")return ut(ee,J,xo(ae),pe);if(ae.$$typeof===k)return ut(ee,J,bo(ee,ae),pe);_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),pe=d(J,ae),pe.return=ee,ee=pe):(r(ee,J),pe=sc(ae,ee.mode,pe),pe.return=ee,ee=pe),x(ee)):r(ee,J)}return function(ee,J,ae,pe){try{nl=0;var De=ut(ee,J,ae,pe);return Yi=null,De}catch(Me){if(Me===Fi||Me===So)throw Me;var tt=an(29,Me,null,ee.mode);return tt.lanes=pe,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,m=null;if(r=r.firstBaseUpdate,r!==null){do{var x={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};m===null?d=m=x:m=m.next=x,r=r.next}while(r!==null);m===null?d=m=t:m=m.next=t}else d=m=t;r={baseState:a.baseState,firstBaseUpdate:d,lastBaseUpdate:m,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 m=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?m=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(m!==null){var ye=d.baseState;x=0,me=oe=G=null,R=m;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=b({},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,m===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,O(wo,e),O(Vi,t),ar=e|t.baseLanes}function Cc(){O(wo,ar),O(Vi,Vi.current)}function Tc(){ar=wo.current,U(Vi),U(wo)}var ln=N(null),En=null;function wr(e){var t=e.alternate;O(St,St.current&1),O(ln,e),En===null&&(t===null||Vi.current!==null||t.memoizedState!==null)&&(En=e)}function Ac(e){O(St,St.current),O(ln,e),En===null&&(En=e)}function Gg(e){e.tag===22?(O(St,St.current),O(ln,e),En===null&&(En=e)):Cr()}function Cr(){O(St,St.current),O(ln,ln.current)}function on(e){U(ln),En===e&&(En=null),U(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,He=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,m){return Jn=m,He=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Z.H=e===null||e.memoizedState===null?Ny:Yc,oi=!1,m=r(a,d),oi=!1,Gi&&(m=Zg(t,r,a,d)),Xg(e),m}function Xg(e){Z.H=cl;var t=ot!==null&&ot.next!==null;if(Jn=0,wt=ot=He=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){He=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 m=e.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}Z.H=Ry,m=t(r,a)}while(Gi);return m}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&&(He.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=He=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?He.memoizedState=wt=e:wt=wt.next=e,wt}function Et(){if(ot===null){var e=He.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=wt===null?He.memoizedState:wt.next;if(t!==null)wt=t,ot=e;else{if(e===null)throw He.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?He.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=He,(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=He.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var a=He.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(),He.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,m=a.pending;if(m!==null){if(d!==null){var x=d.next;d.next=m.next,m.next=x}t.baseQueue=d=m,a.pending=null}if(m=e.baseState,d===null)e.memoizedState=m;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=m):G=G.next=ye,He.lanes|=ue,kr|=ue;ye=oe.action,oi&&r(m,ye),m=oe.hasEagerState?oe.eagerState:r(m,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=m):G=G.next=ue,He.lanes|=ye,kr|=ye;oe=oe.next}while(oe!==null&&oe!==t);if(G===null?x=m:G.next=R,!rn(m,e.memoizedState)&&(Ct=!0,me&&(r=Pi,r!==null)))throw r;e.memoizedState=m,e.baseState=x,e.baseQueue=G,a.lastRenderedState=m}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,m=t.memoizedState;if(d!==null){r.pending=null;var x=d=d.next;do m=e(m,x.action),x=x.next;while(x!==d);rn(m,t.memoizedState)||(Ct=!0),t.memoizedState=m,t.baseQueue===null&&(t.baseState=m),r.lastRenderedState=m}return[m,a]}function Kg(e,t,r){var a=He,d=Et(),m=et;if(m){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));m||(Jn&127)!==0||Qg(a,t,r)}return r}function Qg(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=He.updateQueue,t===null?(t=ko(),He.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 m={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){m.listeners.push(x)}};Z.T!==null?r(!0):m.isTransition=!1,a(m),r=t.pending,r===null?(m.next=t.pending=m,ny(t,m)):(m.next=r.next,t.pending=r.next=m)}}function ny(e,t){var r=t.action,a=t.payload,d=e.state;if(t.isTransition){var m=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{m!==null&&x.types!==null&&(m.types=x.types),Z.T=m}}else try{m=r(d,a),ry(e,t,m)}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=He;if(et){if(ht){t:{for(var d=ht,m=Sn;d.nodeType!==8;){if(!m){d=null;break t}if(d=xn(d.nextSibling),d===null){d=null;break t}}m=d.data,d=m==="F!"||m==="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,He,a),a.dispatch=r,a=Lc(!1),m=Fc.bind(null,He,!1,a.queue),a=Pt(),d={state:t,dispatch:null,action:e,pending:null},a.queue=d,r=nC.bind(null,He,d,m,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,m=d.dispatch;return r!==t.memoizedState&&(He.flags|=2048,Zi(9,{destroy:void 0},rC.bind(null,d,r),null)),[a,m,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=He.updateQueue,t===null&&(t=ko(),He.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();He.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 m=d.memoizedState.inst;ot!==null&&a!==null&&kc(a,ot.memoizedState.deps)?d.memoizedState=Zi(t,m,r,a):(He.flags|=e,d.memoizedState=Zi(1|t,m,r,a))}function dy(e,t){Oo(8390656,8,e,t)}function Bc(e,t){zo(2048,8,e,t)}function iC(e){He.flags|=4;var t=He.updateQueue;if(t===null)t=ko(),He.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(),He.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(),He.lanes|=e,kr|=e,t)}function Ey(e,t,r,a,d){var m=Q.p;Q.p=m!==0&&8>m?m: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=m,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 m=e.alternate;if(e.lanes===0&&(m===null||m.lanes===0)&&(m=t.lastRenderedReducer,m!==null))try{var x=t.lastRenderedState,R=m(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===He||t!==null&&t===He}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,He,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,He,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,He,e.queue,!0,!1),Pt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var a=He,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 m={value:r,getSnapshot:t};return d.queue=m,dy(Wg.bind(null,a,m,e),[e]),a.flags|=2048,Zi(9,{destroy:void 0},Jg.bind(null,a,m,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,He,!0,r),r.dispatch=t,[e,t]},useMemoCache:Mc,useCacheRefresh:function(){return Pt().memoizedState=lC.bind(null,He)},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:b({},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,m,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,m,x):t.prototype&&t.prototype.isPureReactComponent?!Qa(r,a)||!Qa(d,m):!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=b({},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 m=a.value;e.payload=function(){return d(m)},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 m=Error(o(520),{cause:a});if(m=yn(m,r),bl===null?bl=[m]:bl.push(m),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,m=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Nr===null||!Nr.has(m))))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 m=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,m,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 m=r.type;return typeof m=="function"&&!oc(m)&&m.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=m,qy(e,t,m,a,d)):(e=po(r.type,null,a,t,t.mode,d),e.ref=t.ref,e.return=t,t.child=e)}if(m=e.child,!nf(e,d)){var x=m.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(m,a),e.ref=t.ref,e.return=t,t.child=e}function qy(e,t,r,a,d){if(e!==null){var m=e.memoizedProps;if(Qa(m,a)&&e.ref===t.ref)if(Ct=!1,t.pendingProps=a=m,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,m=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(m=m!==null?m.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&~m}else a=0,t.child=null;return Fy(e,t,m,r,a)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vo(t,m!==null?m.cachePool:null),m!==null?Vg(t,m):Cc(),Gg(t);else return a=t.lanes=536870912,Fy(e,t,m!==null?m.baseLanes|r:r,r,a)}else m!==null?(vo(t,m.cachePool),Vg(t,m),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 m=vc();return m=m===null?null:{parent:_t._currentValue,pool:m},t.memoizedState={baseLanes:r,cachePool:m},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 m=e.memoizedState;if(m!==null){var x=m.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!==m.retryLane))throw m.retryLane=x,Wr(e,x),$t(a,e,x),Zc;Go(),t=Yy(e,t,r)}else e=m.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,m){return ni(t),t.updateQueue=null,r=Zg(t,a,r,d),Xg(e),a=Rc(),e!==null&&!Ct?(Oc(e,t,m),$n(e,t,m)):(et&&a&&cc(t),t.flags|=1,It(e,t,r,m),t.child)}function Gy(e,t,r,a,d){if(ni(t),t.stateNode===null){var m=Li,x=r.contextType;typeof x=="object"&&x!==null&&(m=Lt(x)),m=new r(a,m),t.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Gc,t.stateNode=m,m._reactInternals=t,m=t.stateNode,m.props=a,m.state=t.memoizedState,m.refs={},Ec(t),x=r.contextType,m.context=typeof x=="object"&&x!==null?Lt(x):Li,m.state=t.memoizedState,x=r.getDerivedStateFromProps,typeof x=="function"&&(Vc(t,r,x,a),m.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(x=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),x!==m.state&&Gc.enqueueReplaceState(m,m.state,null),ll(t,a,m,d),al(),m.state=t.memoizedState),typeof m.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){m=t.stateNode;var R=t.memoizedProps,G=si(r,R);m.props=G;var oe=m.context,me=r.contextType;x=Li,typeof me=="object"&&me!==null&&(x=Lt(me));var ye=r.getDerivedStateFromProps;me=typeof ye=="function"||typeof m.getSnapshotBeforeUpdate=="function",R=t.pendingProps!==R,me||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(R||oe!==x)&&zy(t,m,a,x),Er=!1;var ue=t.memoizedState;m.state=ue,ll(t,a,m,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 m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(t.flags|=4194308)):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=oe),m.props=a,m.state=oe,m.context=x,a=G):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{m=t.stateNode,xc(e,t),x=t.memoizedProps,me=si(r,x),m.props=me,ye=t.pendingProps,ue=m.context,oe=r.contextType,G=Li,typeof oe=="object"&&oe!==null&&(G=Lt(oe)),R=r.getDerivedStateFromProps,(oe=typeof R=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(x!==ye||ue!==G)&&zy(t,m,a,G),Er=!1,ue=t.memoizedState,m.state=ue,ll(t,a,m,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 m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(a,fe,G),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(a,fe,G)),typeof m.componentDidUpdate=="function"&&(t.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof m.componentDidUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=fe),m.props=a,m.state=fe,m.context=G,a=me):(typeof m.componentDidUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=1024),a=!1)}return m=a,Lo(e,t),a=(t.flags&128)!==0,m||a?(m=t.stateNode,r=a&&typeof r.getDerivedStateFromError!="function"?null:m.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=m.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,m=(t.flags&128)!==0,x;if((x=m)||(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(m)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,m){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:r,tailMode:d,treeForkCount:m}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=a,x.tail=r,x.tailMode=d,x.treeForkCount=m)}function Qy(e,t,r){var a=t.pendingProps,d=a.revealOrder,m=a.tail;a=a.children;var x=St.current,R=(x&2)!==0;if(R?(x=x&1|2,t.flags|=128):x&=1,O(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,m,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,m,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:Pe(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),O(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===P){t.tag=11,t=Uy(null,t,e,a,r);break e}else if(d===B){t.tag=14,t=Hy(null,t,e,a,r);break e}}throw t=w(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 m=t.memoizedState;d=m.element,xc(e,t),ll(t,a,null,r);var x=t.memoizedState;if(a=x.cache,Sr(t,_t,a),a!==m.cache&&gc(t,[_t],r,!0),al(),a=x.element,m.isDehydrated)if(m={element:a,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=m,t.memoizedState=m,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 Pe(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)),Pe(t),d=t.type,m=t.pendingProps,x=e!==null?e.memoizedProps:null,a=m.children,Of(d,m)?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,m=yc(),d.pooledCache=m,m.refCount++,m!==null&&(d.pooledCacheLanes|=r),d=m),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,m=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=m.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,m=t.memoizedState;return e===null?(er(t),m!==null?(mt(t),Wy(t,m)):(mt(t),rf(t,d,null,a,r))):m?m!==e.memoizedState?(er(t),mt(t),Wy(t,m)):(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=ne.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(m=ne.current,Ui(t))Og(t);else{var x=$o(we.current);switch(m){case 1:m=x.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:m=x.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":m=x.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":m=x.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":m=x.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof a.is=="string"?x.createElement("select",{is:a.is}):x.createElement("select"),a.multiple?m.multiple=!0:a.size&&(m.size=a.size);break;default:m=typeof a.is=="string"?x.createElement(d,{is:a.is}):x.createElement(d)}}m[Dt]=t,m[Xt]=a;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)m.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=m;e:switch(Bt(m,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),m=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(m=a.memoizedState.cachePool.pool),m!==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(U(St),a=t.memoizedState,a===null)return mt(t),null;if(d=(t.flags&128)!==0,m=a.rendering,m===null)if(d)dl(a,!1);else{if(vt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(m=Co(e),m!==null){for(t.flags|=128,dl(a,!1),e=m.updateQueue,t.updateQueue=e,Bo(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)Tg(r,e),r=r.sibling;return O(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(m),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"&&!m.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?(m.sibling=t.child,t.child=m):(e=a.last,e!==null?e.sibling=m:t.child=m,a.last=m)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=_e(),e.sibling=null,r=St.current,O(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&&U(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 U(St),null;case 4:return Ae(),null;case 10:return Qn(t.type),null;case 22:case 23:return on(t),Tc(),e!==null&&U(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:U(St);break;case 10:Qn(t.type);break;case 22:case 23:on(t),Tc(),e!==null&&U(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 m=r.create,x=r.inst;a=m(),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 m=d.next;a=m;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!==m)}}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(m){lt(e,e.return,m)}}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,m=a.focusNode;a=a.focusOffset;try{r.nodeType,m.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!==m||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===m&&++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,m=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&&m!==null){e=void 0,r=t,d=m.memoizedProps,m=m.memoizedState,a=r.stateNode;try{var Ne=si(r.type,d);e=a.getSnapshotBeforeUpdate(Ne,m),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 m=Tt;tr=a,(Tt=t)&&!m?ir(e,r,(r.subtreeFlags&8772)!==0):rr(e,r),tr=d,Tt=m}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(m){lt(r,t,m)}else try{yt.removeChild(r.stateNode)}catch(m){lt(r,t,m)}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],m=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(m,x,d),yt=null,Kt=!1,m=d.alternate,m!==null&&(m.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 m=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":m=d.getElementsByTagName("title")[0],(!m||m[qa]||m[Dt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=d.createElement(a),d.head.insertBefore(m,d.querySelector("head > title"))),Bt(m,a,r),m[Dt]=e,zt(m),a=m;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(m=x[R],m.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&m.getAttribute("rel")===(r.rel==null?null:r.rel)&&m.getAttribute("title")===(r.title==null?null:r.title)&&m.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){x.splice(R,1);break t}}m=d.createElement(a),Bt(m,a,r),d.head.appendChild(m);break;case"meta":if(x=fb("meta","content",d).get(a+(r.content||""))){for(R=0;R<x.length;R++)if(m=x[R],m.getAttribute("content")===(r.content==null?null:""+r.content)&&m.getAttribute("name")===(r.name==null?null:r.name)&&m.getAttribute("property")===(r.property==null?null:r.property)&&m.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&m.getAttribute("charset")===(r.charSet==null?null:r.charSet)){x.splice(R,1);break t}}m=d.createElement(a),Bt(m,a,r),d.head.appendChild(m);break;default:throw Error(o(468,a))}m[Dt]=e,zt(m),a=m}e.stateNode=a}else db(d,e.type,e.stateNode);else e.stateNode=cb(d,a,e.memoizedProps);else m!==a?(m===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):m.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(m=G.stateNode,d)x=m.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,m=lf(e);Uo(e,m,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,m=t,x=m.flags;switch(m.tag){case 0:case 11:case 15:ir(d,m,r),hl(4,m);break;case 1:if(ir(d,m,r),a=m,d=a.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(oe){lt(a,a.return,oe)}if(a=m,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(m),ml(m,m.return);break;case 27:i0(m);case 26:case 5:ir(d,m,r),r&&a===null&&x&4&&n0(m),ml(m,m.return);break;case 12:ir(d,m,r);break;case 31:ir(d,m,r),r&&x&4&&u0(d,m);break;case 13:ir(d,m,r),r&&x&4&&c0(d,m);break;case 22:m.memoizedState===null&&ir(d,m,r),ml(m,m.return);break;case 30:break;default:ir(d,m,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 m=t.memoizedProps,x=m.id,R=m.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:m=t.stateNode,x=t.alternate,t.memoizedState!==null?m._visibility&2?kn(e,t,r,a):pl(e,t):m._visibility&2?kn(e,t,r,a):(m._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 m=e,x=t,R=r,G=a,oe=x.flags;switch(x.tag){case 0:case 11:case 15:Ki(m,x,R,G,d),hl(8,x);break;case 23:break;case 22:var me=x.stateNode;x.memoizedState!==null?me._visibility&2?Ki(m,x,R,G,d):pl(m,x):(me._visibility|=2,Ki(m,x,R,G,d)),d&&oe&2048&&uf(x.alternate,x);break;case 24:Ki(m,x,R,G,d),d&&oe&2048&&cf(x.alternate,x);break;default:Ki(m,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,m=a.return;if(o0(a),a===r){Mt=null;break e}if(d!==null){d.return=m,Mt=d;break e}Mt=m}}}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),m=a;do{if(d===0){Ji&&!a&&Or(e,t,0,!1);break}else{if(r=e.current.alternate,m&&!yC(r)){d=bf(e,t,!1),m=!1;continue}if(d===2){if(m=t,e.errorRecoveryDisabledLanes&m)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|=m,ci|=m,d=4;break e}m=Wt,Wt=d,m!==null&&(Wt===null?Wt=m:Wt.push.apply(Wt,m))}d=x}if(m=!1,d!==2)continue}}if(d===1){ea(e,0),Or(e,t,0,!0);break}e:{switch(a=e,m=d,m){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,m,"Throttled",-0,0),d);break e}x0(a,r,Wt,Yo,hf,t,un,ci,Wi,Ar,m,null,-0,0)}}break}while(!0);Un(e)}function x0(e,t,r,a,d,m,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,m,ye);var Ne=(m&62914560)===m?Po-_e():(m&4194048)===m?b0-_e():0;if(Ne=tT(ye,Ne),Ne!==null){lr=m,e.cancelPendingCommit=Ne(R0.bind(null,e,t,m,r,a,d,x,R,G,me,ye,null,ue,fe)),Or(e,m,x,!oe);return}}R0(e,t,m,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],m=d.getSnapshot;d=d.value;try{if(!rn(m(),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 m=31-Ze(d),x=1<<m;a[m]=-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),m=1<<d;t|=e[d],a&=~m}return ar=t,fo(),r}function _0(e,t){He=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(),m=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=m,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 m=sn;t:switch(at){case 1:at=0,sn=null,ta(e,t,m,1);break;case 2:case 9:if(Ig(m)){at=0,sn=null,k0(t);break}t=function(){at!==2&&at!==9||ct!==e||(at=7),Un(e)},m.then(t,t);break e;case 3:at=7;break e;case 4:at=5;break e;case 7:Ig(m)?(at=0,sn=null,k0(t)):(at=0,sn=null,ta(e,t,m,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,m,5);break;case 6:at=0,sn=null,ta(e,t,m,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(m){if(d!==null)throw Ke=d,m;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,m,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(m=t.lanes|t.childLanes,m|=ac,$w(e,r,m,x,R,G),e===ct&&(Ke=ct=null,We=0),$i=t,Rr=e,lr=r,mf=m,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 m=Rf,x=yg(e.containerInfo),R=m.focusedElem,G=m.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 pe=ye[R];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.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 m=e.onRecoverableError,x=0;x<a.length;x++){var R=a[x];m(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 m=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(m.current),h0(m,m.current,x,r),it=R,Sl(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Xe,m)}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 m=0;else{var x=a.suspendedLanes,R=a.pingedLanes;m=(1<<31-Ze(42|e)+1)-1,m&=d&~(x&~R),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(r=!0,q0(a,m))}else m=We,m=$l(a,a===ct?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(m&3)===0||Ua(a,m)||(r=!0,q0(a,m));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,m=U0(a,t);m===0?(a.next=null,r===null?Ko=d:r.next=d,d===null&&(na=r)):(r=a,(e!==0||(m&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,m=e.pendingLanes&-62914561;0<m;){var x=31-Ze(m),R=1<<x,G=d[x];G===-1?((R&r)===0||(R&a)!==0)&&(d[x]=Ww(R,t)):G<=t&&(e.expiredLanes|=R),m&=~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&&ge(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&&ge(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&&ge(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 m=P0((d[Xt]||null).action),x=a.submitter;x&&(t=(t=x[Xt]||null)?P0(t.formAction):x.getAttribute("formAction"),t!==null&&(m=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:m},null,G)}}else typeof m=="function"&&(R.preventDefault(),G=x?F0(d,x):new FormData(d),qc(r,{pending:!0,data:G,method:d.method,action:m},m,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 m=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!==m&&d.isPropagationStopped())break e;m=R,d.currentTarget=oe;try{m(d)}catch(me){co(me)}d.currentTarget=null,m=G}else for(x=0;x<a.length;x++){if(R=a[x],G=R.instance,oe=R.currentTarget,R=R.listener,G!==m&&d.isPropagationStopped())break e;m=R,d.currentTarget=oe;try{m(d)}catch(me){co(me)}d.currentTarget=null,m=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 m=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=m=x;continue e}R=R.parentNode}}a=a.return}Qp(function(){var oe=m,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 pe=J;if(ae=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ae===null||ee===null||(pe=Fa(J,ee),pe!=null&&Le.push(xl(J,pe,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,pe="onMouseLeave",ee="onMouseEnter",J="mouse",(e==="pointerout"||e==="pointerover")&&(Le=tg,pe="onPointerLeave",ee="onPointerEnter",J="pointer"),ut=fe==null?ue:Pa(fe),ae=Ne==null?ue:Pa(Ne),ue=new Le(pe,J+"leave",fe,r,me),ue.target=ut,ue.relatedTarget=ae,pe=null,wi(me)===oe&&(Le=new Le(ee,J+"enter",Ne,r,me),Le.target=ae,Le.relatedTarget=ut,pe=Le),ut=pe,fe&&Ne)t:{for(Le=OC,ee=fe,J=Ne,ae=0,pe=ee;pe;pe=Le(pe))ae++;pe=0;for(var De=J;De;De=Le(De))pe++;for(;0<ae-pe;)ee=Le(ee),ae--;for(;0<pe-ae;)J=Le(J),pe--;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,m=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=Fa(e,r),d!=null&&a.unshift(xl(e,d,m)),d=Fa(e,t),d!=null&&a.push(xl(e,d,m))),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 m=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,m),oe!=null&&x.unshift(xl(r,oe,G))):d||(oe=Fa(r,m),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,m){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,m);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 m=="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,m){switch(r){case"style":Zp(e,a,m);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),m=e[Xt]||null,m=m!=null?m[r]:null,typeof m=="function"&&e.removeEventListener(t,m,d),typeof a=="function")){typeof m!="function"&&m!==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,m;for(m in r)if(r.hasOwnProperty(m)){var x=r[m];if(x!=null)switch(m){case"src":a=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,m,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=m=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":m=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,m,R,G,oe,x,d,!1);return;case"select":Qe("invalid",e),a=x=m=null;for(d in r)if(r.hasOwnProperty(d)&&(R=r[d],R!=null))switch(d){case"value":m=R;break;case"defaultValue":x=R;break;case"multiple":a=R;default:st(e,t,d,R,r,null)}t=m,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),m=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":m=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(o(91));break;default:st(e,t,x,R,r,null)}Gp(e,a,d,m);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,m=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":m=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,m,d);return;case"select":fe=x=R=ue=null;for(m in r)if(G=r[m],r.hasOwnProperty(m)&&G!=null)switch(m){case"value":break;case"multiple":fe=G;default:a.hasOwnProperty(m)||st(e,t,m,null,a,G)}for(d in a)if(m=a[d],G=r[d],a.hasOwnProperty(d)&&(m!=null||G!=null))switch(d){case"value":ue=m;break;case"defaultValue":R=m;break;case"multiple":x=m;default:m!==G&&st(e,t,d,m,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],m=r[x],a.hasOwnProperty(x)&&(d!=null||m!=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!==m&&st(e,t,x,d,a,m)}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],m=d.transferSize,x=d.initiatorType,R=d.duration;if(m&&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*(m+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 m=r.firstChild;m;){var x=m.nextSibling,R=m.nodeName;m[qa]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&m.rel.toLowerCase()==="stylesheet"||r.removeChild(m),m=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(m=e.getAttribute("rel"),m==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(m!==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(m=e.getAttribute("src"),(m!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===m)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 m=d;switch(t){case"style":m=ia(e);break;case"script":m=aa(e)}_n.has(m)||(e=b({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),_n.set(m,e),a.querySelector(d)!==null||t==="style"&&a.querySelector(wl(m))||t==="script"&&a.querySelector(Cl(m))||(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)+'"]',m=d;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=aa(e)}if(!_n.has(m)&&(e=b({rel:"modulepreload",href:e},t),_n.set(m,e),r.querySelector(d)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Cl(m)))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,m=ia(e);t=t||"default";var x=d.get(m);if(!x){var R={loading:0,preload:null};if(x=a.querySelector(wl(m)))R.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},r),(r=_n.get(m))&&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(m,x)}}}function QC(e,t){or.X(e,t);var r=ra;if(r&&e){var a=Ti(r).hoistableScripts,d=aa(e),m=a.get(d);m||(m=r.querySelector(Cl(d)),m||(e=b({src:e,async:!0},t),(t=_n.get(d))&&Bf(e,t),m=r.createElement("script"),zt(m),Bt(m,"link",e),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},a.set(d,m))}}function JC(e,t){or.M(e,t);var r=ra;if(r&&e){var a=Ti(r).hoistableScripts,d=aa(e),m=a.get(d);m||(m=r.querySelector(Cl(d)),m||(e=b({src:e,async:!0,type:"module"},t),(t=_n.get(d))&&Bf(e,t),m=r.createElement("script"),zt(m),Bt(m,"link",e),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},a.set(d,m))}}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 m=Ti(d).hoistableStyles,x=m.get(e);if(x||(d=d.ownerDocument||d,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(e,x),(m=d.querySelector(wl(e)))&&!m._p&&(x.instance=m,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),m||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 b({},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=b({},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 m=e.querySelector(wl(d));if(m)return t.state.loading|=4,t.instance=m,zt(m),m;a=ub(r),(d=_n.get(d))&&If(a,d),m=(e.ownerDocument||e).createElement("link"),zt(m);var x=m;return x._p=new Promise(function(R,G){x.onload=R,x.onerror=G}),Bt(m,"link",a),t.state.loading|=4,ts(m,r.precedence,e),t.instance=m;case"script":return m=aa(r.src),(d=e.querySelector(Cl(m)))?(t.instance=d,zt(d),d):(a=r,(d=_n.get(m))&&(a=b({},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,m=d,x=0;x<a.length;x++){var R=a[x];if(R.dataset.precedence===t)m=R;else if(m!==d)break}m?m.parentNode.insertBefore(e,m.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 m=r[d];if(!(m[qa]||m[Dt]||e==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var x=m.getAttribute(t)||"";x=e+x;var R=a.get(x);R?R.push(m):a.set(x,[m])}}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),m=t.querySelector(wl(d));if(m){t=m._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=m,zt(m);return}m=t.ownerDocument||t,a=ub(a),(d=_n.get(d))&&If(a,d),m=m.createElement("link"),zt(m);var x=m;x._p=new Promise(function(R,G){x.onload=R,x.onerror=G}),Bt(m,"link",a),r.instance=m}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 m=e.unsuspend;e.unsuspend=null,m()}},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 m=e.unsuspend;e.unsuspend=null,m()}},(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]"),m=0;m<d.length;m++){var x=d[m];(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"),m=r.get(x)||a,m===a&&r.set(null,d),r.set(x,d),this.count++,a=rs.bind(this),d.addEventListener("load",a),d.addEventListener("error",a),m?m.parentNode.insertBefore(d,m.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,m,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=m,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function mb(e,t,r,a,d,m,x,R,G,oe,me,ye){return e=new rT(e,t,r,x,G,oe,me,ye,R),t=1,m===!0&&(t|=24),m=an(3,null,null,t),e.current=m,m.stateNode=e,t=yc(),t.refCount++,e.pooledCache=t,t.refCount++,m.memoizedState={element:a,isDehydrated:r,cache:t},Ec(m),e}function pb(e){return e?(e=Li,e):Li}function gb(e,t,r,a,d,m){d=pb(d),a.context===null?a.context=d:a.pendingContext=d,a=xr(t),a.payload={element:r},m=m===void 0?null:m,m!==null&&(a.callback=m),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 m=Q.p;try{Q.p=2,qf(e,t,r,a)}finally{Q.p=m,Z.T=d}}function aT(e,t,r,a){var d=Z.T;Z.T=null;var m=Q.p;try{Q.p=8,qf(e,t,r,a)}finally{Q.p=m,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 m=Ci(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var x=hn(m.pendingLanes);if(x!==0){var R=m;for(R.pendingLanes|=2,R.entangledLanes|=2;x;){var G=1<<31-Ze(x);R.entanglements[1]|=G,x&=~G}Un(m),(it&6)===0&&(Fo=_e()+500,Sl(0))}}break;case 31:case 13:R=Wr(m,2),R!==null&&$t(R,m,2),Vo(),Hf(m,2)}if(m=Pf(a),m===null&&Af(e,t,a,os,r),m===d)break;d=m}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,m){return e===null||e.nativeEvent!==m?(e={blockedOn:t,domEventName:r,eventSystemFlags:a,nativeEvent:m,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 m=d.pointerId;return Al.set(m,Nl(Al.get(m)||null,e,t,r,a,d)),!0;case"gotpointercapture":return m=d.pointerId,kl.set(m,Nl(kl.get(m)||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 m=Ci(r);m!==null&&(e.splice(t,3),t-=3,qc(m,{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],m=r[a+1],x=d[Xt]||null;if(typeof m=="function")x||wb(r);else if(x){var R=null;if(m&&m.hasAttribute("formAction")){if(d=m,x=m[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(m){m.canIntercept&&m.info==="react-transition"&&m.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 m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.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=p(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,m=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&&(m=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=mb(e,1,!1,null,null,r,a,null,d,m,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="",m=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&&(m=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,m,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 q.useCallback(Es(...n),n)}function Ib(n){const l=Bb(n),i=q.forwardRef((o,u)=>{const{children:s,...c}=o,f=q.Children.toArray(s),h=f.find(Hb);if(h){const p=h.props.children,g=f.map(b=>b===h?q.Children.count(p)>1?q.Children.only(null):q.isValidElement(p)?p.props.children:null:b);return z.jsx(l,{...c,ref:u,children:q.isValidElement(p)?q.cloneElement(p,void 0,g):null})}return z.jsx(l,{...c,ref:u,children:s})});return i.displayName=`${n}.Slot`,i}function Bb(n){const l=q.forwardRef((i,o)=>{const{children:u,...s}=i;if(q.isValidElement(u)){const c=Pb(u),f=qb(s,u.props);return u.type!==q.Fragment&&(f.ref=o?Es(o,c):c),q.cloneElement(u,f)}return q.Children.count(u)>1?q.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var Ub=Symbol("radix.slottable");function Hb(n){return q.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=q.forwardRef((u,s)=>{const{asChild:c,...f}=u,h=c?i:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),z.jsx(h,{...f,ref:s})});return o.displayName=`Primitive.${l}`,{...n,[l]:o}},{}),ur=globalThis?.document?q.useLayoutEffect:()=>{};function Yb(n,l){return q.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}):q.Children.only(i),s=Hn(o.ref,Gb(u));return typeof i=="function"||o.isPresent?q.cloneElement(u,{ref:s}):null};fi.displayName="Presence";function Vb(n){const[l,i]=q.useState(),o=q.useRef(null),u=q.useRef(n),s=q.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 q.useEffect(()=>{const p=zl(o.current);s.current=f==="mounted"?p:"none"},[f]),ur(()=>{const p=o.current,g=u.current;if(g!==n){const v=s.current,y=zl(p);n?h("MOUNT"):y==="none"||p?.display==="none"?h("UNMOUNT"):h(g&&v!==y?"ANIMATION_OUT":"UNMOUNT"),u.current=n}},[n,h]),ur(()=>{if(l){let p;const g=l.ownerDocument.defaultView??window,b=y=>{const E=zl(o.current).includes(CSS.escape(y.animationName));if(y.target===l&&E&&(h("ANIMATION_END"),!u.current)){const T=l.style.animationFillMode;l.style.animationFillMode="forwards",p=g.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=T)})}},v=y=>{y.target===l&&(s.current=zl(o.current))};return l.addEventListener("animationstart",v),l.addEventListener("animationcancel",b),l.addEventListener("animationend",b),()=>{g.clearTimeout(p),l.removeEventListener("animationstart",v),l.removeEventListener("animationcancel",b),l.removeEventListener("animationend",b)}}else h("ANIMATION_END")},[l,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:q.useCallback(p=>{o.current=p?getComputedStyle(p):null,i(p)},[])}}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=q.createContext(c),h=i.length;i=[...i,c];const p=b=>{const{scope:v,children:y,...C}=b,E=v?.[n]?.[h]||f,T=q.useMemo(()=>C,Object.values(C));return z.jsx(E.Provider,{value:T,children:y})};p.displayName=s+"Provider";function g(b,v){const y=v?.[n]?.[h]||f,C=q.useContext(y);if(C)return C;if(c!==void 0)return c;throw new Error(`\`${b}\` must be used within \`${s}\``)}return[p,g]}const u=()=>{const s=i.map(c=>q.createContext(c));return function(f){const h=f?.[n]||s;return q.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:p})=>{const b=h(s)[`__scope${p}`];return{...f,...b}},{});return q.useMemo(()=>({[`__scope${l.scopeName}`]:c}),[c])}};return i.scopeName=l.scopeName,i}function cr(n){const l=q.useRef(n);return q.useEffect(()=>{l.current=n}),q.useMemo(()=>(...i)=>l.current?.(...i),[])}var Zb=q.createContext(void 0);function Kb(n){const l=q.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 q.useReducer((i,o)=>l[i][o]??i,n)}var xs="ScrollArea",[ld]=ad(xs),[Wb,fn]=ld(xs),od=q.forwardRef((n,l)=>{const{__scopeScrollArea:i,type:o="hover",dir:u,scrollHideDelay:s=600,...c}=n,[f,h]=q.useState(null),[p,g]=q.useState(null),[b,v]=q.useState(null),[y,C]=q.useState(null),[E,T]=q.useState(null),[_,A]=q.useState(0),[k,P]=q.useState(0),[H,D]=q.useState(!1),[B,Y]=q.useState(!1),F=Hn(l,ie=>h(ie)),$=Kb(u);return z.jsx(Wb,{scope:i,type:o,dir:$,scrollHideDelay:s,scrollArea:f,viewport:p,onViewportChange:g,content:b,onContentChange:v,scrollbarX:y,onScrollbarXChange:C,scrollbarXEnabled:H,onScrollbarXEnabledChange:D,scrollbarY:E,onScrollbarYChange:T,scrollbarYEnabled:B,onScrollbarYEnabledChange:Y,onCornerWidthChange:A,onCornerHeightChange:P,children:z.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=q.forwardRef((n,l)=>{const{__scopeScrollArea:i,children:o,nonce:u,...s}=n,c=fn(sd,i),f=q.useRef(null),h=Hn(l,f,c.onViewportChange);return z.jsxs(z.Fragment,{children:[z.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}),z.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:z.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});ud.displayName=sd;var Nn="ScrollAreaScrollbar",_s=q.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=fn(Nn,n.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:c}=u,f=n.orientation==="horizontal";return q.useEffect(()=>(f?s(!0):c(!0),()=>{f?s(!1):c(!1)}),[f,s,c]),u.type==="hover"?z.jsx($b,{...o,ref:l,forceMount:i}):u.type==="scroll"?z.jsx(ev,{...o,ref:l,forceMount:i}):u.type==="auto"?z.jsx(cd,{...o,ref:l,forceMount:i}):u.type==="always"?z.jsx(ws,{...o,ref:l}):null});_s.displayName=Nn;var $b=q.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=fn(Nn,n.__scopeScrollArea),[s,c]=q.useState(!1);return q.useEffect(()=>{const f=u.scrollArea;let h=0;if(f){const p=()=>{window.clearTimeout(h),c(!0)},g=()=>{h=window.setTimeout(()=>c(!1),u.scrollHideDelay)};return f.addEventListener("pointerenter",p),f.addEventListener("pointerleave",g),()=>{window.clearTimeout(h),f.removeEventListener("pointerenter",p),f.removeEventListener("pointerleave",g)}}},[u.scrollArea,u.scrollHideDelay]),z.jsx(fi,{present:i||s,children:z.jsx(cd,{"data-state":s?"visible":"hidden",...o,ref:l})})}),ev=q.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=fn(Nn,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 q.useEffect(()=>{if(f==="idle"){const p=window.setTimeout(()=>h("HIDE"),u.scrollHideDelay);return()=>window.clearTimeout(p)}},[f,u.scrollHideDelay,h]),q.useEffect(()=>{const p=u.viewport,g=s?"scrollLeft":"scrollTop";if(p){let b=p[g];const v=()=>{const y=p[g];b!==y&&(h("SCROLL"),c()),b=y};return p.addEventListener("scroll",v),()=>p.removeEventListener("scroll",v)}},[u.viewport,s,h,c]),z.jsx(fi,{present:i||f!=="hidden",children:z.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=q.forwardRef((n,l)=>{const i=fn(Nn,n.__scopeScrollArea),{forceMount:o,...u}=n,[s,c]=q.useState(!1),f=n.orientation==="horizontal",h=Ll(()=>{if(i.viewport){const p=i.viewport.offsetWidth<i.viewport.scrollWidth,g=i.viewport.offsetHeight<i.viewport.scrollHeight;c(f?p:g)}},10);return di(i.viewport,h),di(i.content,h),z.jsx(fi,{present:o||s,children:z.jsx(ws,{"data-state":s?"visible":"hidden",...u,ref:l})})}),ws=q.forwardRef((n,l)=>{const{orientation:i="vertical",...o}=n,u=fn(Nn,n.__scopeScrollArea),s=q.useRef(null),c=q.useRef(0),[f,h]=q.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=pd(f.viewport,f.content),g={...o,sizes:f,onSizesChange:h,hasThumb:p>0&&p<1,onThumbChange:v=>s.current=v,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:v=>c.current=v};function b(v,y){return lv(v,c.current,f,y)}return i==="horizontal"?z.jsx(tv,{...g,ref:l,onThumbPositionChange:()=>{if(u.viewport&&s.current){const v=u.viewport.scrollLeft,y=gd(v,f,u.dir);s.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:v=>{u.viewport&&(u.viewport.scrollLeft=v)},onDragScroll:v=>{u.viewport&&(u.viewport.scrollLeft=b(v,u.dir))}}):i==="vertical"?z.jsx(nv,{...g,ref:l,onThumbPositionChange:()=>{if(u.viewport&&s.current){const v=u.viewport.scrollTop,y=gd(v,f);s.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:v=>{u.viewport&&(u.viewport.scrollTop=v)},onDragScroll:v=>{u.viewport&&(u.viewport.scrollTop=b(v))}}):null}),tv=q.forwardRef((n,l)=>{const{sizes:i,onSizesChange:o,...u}=n,s=fn(Nn,n.__scopeScrollArea),[c,f]=q.useState(),h=q.useRef(null),p=Hn(l,h,s.onScrollbarXChange);return q.useEffect(()=>{h.current&&f(getComputedStyle(h.current))},[h]),z.jsx(dd,{"data-orientation":"horizontal",...u,ref:p,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,b)=>{if(s.viewport){const v=s.viewport.scrollLeft+g.deltaX;n.onWheelScroll(v),bd(v,b)&&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=q.forwardRef((n,l)=>{const{sizes:i,onSizesChange:o,...u}=n,s=fn(Nn,n.__scopeScrollArea),[c,f]=q.useState(),h=q.useRef(null),p=Hn(l,h,s.onScrollbarYChange);return q.useEffect(()=>{h.current&&f(getComputedStyle(h.current))},[h]),z.jsx(dd,{"data-orientation":"vertical",...u,ref:p,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,b)=>{if(s.viewport){const v=s.viewport.scrollTop+g.deltaY;n.onWheelScroll(v),bd(v,b)&&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(Nn),dd=q.forwardRef((n,l)=>{const{__scopeScrollArea:i,sizes:o,hasThumb:u,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:f,onThumbPositionChange:h,onDragScroll:p,onWheelScroll:g,onResize:b,...v}=n,y=fn(Nn,i),[C,E]=q.useState(null),T=Hn(l,F=>E(F)),_=q.useRef(null),A=q.useRef(""),k=y.viewport,P=o.content-o.viewport,H=cr(g),D=cr(h),B=Ll(b,10);function Y(F){if(_.current){const $=F.clientX-_.current.left,ie=F.clientY-_.current.top;p({x:$,y:ie})}}return q.useEffect(()=>{const F=$=>{const ie=$.target;C?.contains(ie)&&H($,P)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[k,C,P,H]),q.useEffect(D,[o,D]),di(C,B),di(y.content,B),z.jsx(rv,{scope:i,scrollbar:C,hasThumb:u,onThumbChange:cr(s),onThumbPointerUp:cr(c),onThumbPositionChange:D,onThumbPointerDown:cr(f),children:z.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=C.getBoundingClientRect(),A.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.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,y.viewport&&(y.viewport.style.scrollBehavior=""),_.current=null})})})}),Ml="ScrollAreaThumb",hd=q.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=fd(Ml,n.__scopeScrollArea);return z.jsx(fi,{present:i||u.hasThumb,children:z.jsx(iv,{ref:l,...o})})}),iv=q.forwardRef((n,l)=>{const{__scopeScrollArea:i,style:o,...u}=n,s=fn(Ml,i),c=fd(Ml,i),{onThumbPositionChange:f}=c,h=Hn(l,b=>c.onThumbChange(b)),p=q.useRef(void 0),g=Ll(()=>{p.current&&(p.current(),p.current=void 0)},100);return q.useEffect(()=>{const b=s.viewport;if(b){const v=()=>{if(g(),!p.current){const y=ov(b,f);p.current=y,f()}};return f(),b.addEventListener("scroll",v),()=>b.removeEventListener("scroll",v)}},[s.viewport,g,f]),z.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,b=>{const y=b.target.getBoundingClientRect(),C=b.clientX-y.left,E=b.clientY-y.top;c.onThumbPointerDown({x:C,y:E})}),onPointerUp:qn(n.onPointerUp,c.onThumbPointerUp)})});hd.displayName=Ml;var Cs="ScrollAreaCorner",md=q.forwardRef((n,l)=>{const i=fn(Cs,n.__scopeScrollArea),o=!!(i.scrollbarX&&i.scrollbarY);return i.type!=="scroll"&&o?z.jsx(av,{...n,ref:l}):null});md.displayName=Cs;var av=q.forwardRef((n,l)=>{const{__scopeScrollArea:i,...o}=n,u=fn(Cs,i),[s,c]=q.useState(0),[f,h]=q.useState(0),p=!!(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)}),p?z.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,p=i.scrollbar.size-i.scrollbar.paddingEnd-f,g=i.content-i.viewport,b=o==="ltr"?[0,g]:[g*-1,0];return yd([h,p],b)(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],p=Qb(n,h);return yd([0,c],[0,f])(p)}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=q.useRef(0);return q.useEffect(()=>()=>window.clearTimeout(o.current),[]),q.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],p=i[c];return h?p?cv(p,h):h:p||_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 p=wd(n,l+1,s);if(p)return p}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 p=0;p<h;p++){const g=c[p];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,p;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==="/"){p=E;continue}}T==="["?c++:T==="]"?c--:T==="("?f++:T===")"&&f--}const b=s.length===0?u:u.slice(h);let v=b,y=!1;b.endsWith(As)?(v=b.slice(0,-1),y=!0):b.startsWith(As)&&(v=b.slice(1),y=!0);const C=p&&p>h?p-h:void 0;return Ad(s,y,v,C)};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 p=f.length-1;p>=0;p-=1){const g=f[p],{isExternal:b,modifiers:v,hasImportantModifier:y,baseClassName:C,maybePostfixModifierPosition:E}=i(g);if(b){h=g+(h.length>0?" "+h:h);continue}let T=!!E,_=o(T?C.substring(0,E):C);if(!_){if(!T){h=g+(h.length>0?" "+h:h);continue}if(_=o(C),!_){h=g+(h.length>0?" "+h:h);continue}T=!1}const A=v.length===0?"":v.length===1?v[0]:s(v).join(":"),k=y?A+As:A,P=k+_;if(c.indexOf(P)>-1)continue;c.push(P);const H=u(_,T);for(let D=0;D<H.length;++D){const B=H[D];c.push(k+B)}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 p=l.reduce((g,b)=>b(g),n());return i=Tv(p),o=i.cache.get,u=i.cache.set,s=f,f(h)},f=h=>{const p=o(h);if(p)return p;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),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"),h=At("spacing"),p=At("radius"),g=At("shadow"),b=At("inset-shadow"),v=At("text-shadow"),y=At("drop-shadow"),C=At("blur"),E=At("perspective"),T=At("aspect"),_=At("ease"),A=At("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],H=()=>[...P(),Oe,Re],D=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],Y=()=>[Oe,Re,h],F=()=>[hi,"full","auto",...Y()],$=()=>[fr,"none","subgrid",Oe,Re],ie=()=>["auto",{span:["full",fr,Oe,Re]},fr,Oe,Re],M=()=>[fr,"auto",Oe,Re],re=()=>["auto","min","max","fr",Oe,Re],w=()=>["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=()=>[...P(),Md,zd,{position:[Oe,Re]}],I=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",Gv,Fv,{size:[Oe,Re]}],U=()=>[ks,ca,Ur],O=()=>["","none","full",p,Oe,Re],ne=()=>["",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",C,Oe,Re],Ae=()=>["none",Ve,Oe,Re],Pe=()=>["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:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],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":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:ie()}],"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":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:Y()}],"gap-x":[{"gap-x":Y()}],"gap-y":[{"gap-y":Y()}],"justify-content":[{justify:[...w(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...w()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":w()}],"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:I()}],"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:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:se()}],"gradient-via":[{via:se()}],"gradient-to":[{to:se()}],rounded:[{rounded:O()}],"rounded-s":[{"rounded-s":O()}],"rounded-e":[{"rounded-e":O()}],"rounded-t":[{"rounded-t":O()}],"rounded-r":[{"rounded-r":O()}],"rounded-b":[{"rounded-b":O()}],"rounded-l":[{"rounded-l":O()}],"rounded-ss":[{"rounded-ss":O()}],"rounded-se":[{"rounded-se":O()}],"rounded-ee":[{"rounded-ee":O()}],"rounded-es":[{"rounded-es":O()}],"rounded-tl":[{"rounded-tl":O()}],"rounded-tr":[{"rounded-tr":O()}],"rounded-br":[{"rounded-br":O()}],"rounded-bl":[{"rounded-bl":O()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"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",b,Ul,Bl]}],"inset-shadow-color":[{"inset-shadow":se()}],"ring-w":[{ring:ne()}],"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":ne()}],"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":P()}],"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:I()}],"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",y,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:Pe()}],"scale-x":[{"scale-x":Pe()}],"scale-y":[{"scale-y":Pe()}],"scale-z":[{"scale-z":Pe()}],"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=q.forwardRef(({className:n,children:l,...i},o)=>z.jsxs(vd,{ref:o,className:Ye("relative overflow-hidden",n),...i,children:[z.jsx(sv,{className:"h-full w-full rounded-[inherit]",children:l}),z.jsx(Hd,{}),z.jsx(uv,{})]}));Ud.displayName=vd.displayName;const Hd=q.forwardRef(({className:n,orientation:l="vertical",...i},o)=>z.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:z.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=q.forwardRef((o,u)=>{let{children:s,...c}=o;qd(s)&&typeof Hl=="function"&&(s=Hl(s._payload));const f=q.Children.toArray(s),h=f.find(rS);if(h){const p=h.props.children,g=f.map(b=>b===h?q.Children.count(p)>1?q.Children.only(null):q.isValidElement(p)?p.props.children:null:b);return z.jsx(l,{...c,ref:u,children:q.isValidElement(p)?q.cloneElement(p,void 0,g):null})}return z.jsx(l,{...c,ref:u,children:s})});return i.displayName=`${n}.Slot`,i}var eS=Pd("Slot");function tS(n){const l=q.forwardRef((i,o)=>{let{children:u,...s}=i;if(qd(u)&&typeof Hl=="function"&&(u=Hl(u._payload)),q.isValidElement(u)){const c=aS(u),f=iS(s,u.props);return u.type!==q.Fragment&&(f.ref=o?Es(o,c):c),q.cloneElement(u,f)}return q.Children.count(u)>1?q.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var nS=Symbol("radix.slottable");function rS(n){return q.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(p=>{const g=i?.[p],b=s?.[p];if(g===null)return null;const v=Fd(g)||Fd(b);return u[p][v]}),f=i&&Object.entries(i).reduce((p,g)=>{let[b,v]=g;return v===void 0||(p[b]=v),p},{}),h=l==null||(o=l.compoundVariants)===null||o===void 0?void 0:o.reduce((p,g)=>{let{class:b,className:v,...y}=g;return Object.entries(y).every(C=>{let[E,T]=C;return Array.isArray(T)?T.includes({...s,...f}[E]):{...s,...f}[E]===T})?[...p,b,v]:p},[]);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=q.forwardRef(({className:n,variant:l,size:i,asChild:o=!1,...u},s)=>{const c=o?eS:"button";return z.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=q.forwardRef(({color:n="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:u="",children:s,iconNode:c,...f},h)=>q.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(([p,g])=>q.createElement(p,g)),...Array.isArray(s)?s:[s]]));const Rt=(n,l)=>{const i=q.forwardRef(({className:o,...u},s)=>q.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=q.forwardRef(({className:n,...l},i)=>z.jsx("div",{ref:i,className:Ye("rounded-xl border bg-card text-card-foreground shadow",n),...l}));da.displayName="Card";const Jd=q.forwardRef(({className:n,...l},i)=>z.jsx("div",{ref:i,className:Ye("flex flex-col space-y-1.5 p-6",n),...l}));Jd.displayName="CardHeader";const wS=q.forwardRef(({className:n,...l},i)=>z.jsx("div",{ref:i,className:Ye("font-semibold leading-none tracking-tight",n),...l}));wS.displayName="CardTitle";const CS=q.forwardRef(({className:n,...l},i)=>z.jsx("div",{ref:i,className:Ye("text-sm text-muted-foreground",n),...l}));CS.displayName="CardDescription";const Wd=q.forwardRef(({className:n,...l},i)=>z.jsx("div",{ref:i,className:Ye("p-6 pt-0",n),...l}));Wd.displayName="CardContent";const TS=q.forwardRef(({className:n,...l},i)=>z.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=q.createContext(c);f.displayName=s+"Context";const h=i.length;i=[...i,c];const p=b=>{const{scope:v,children:y,...C}=b,E=v?.[n]?.[h]||f,T=q.useMemo(()=>C,Object.values(C));return z.jsx(E.Provider,{value:T,children:y})};p.displayName=s+"Provider";function g(b,v){const y=v?.[n]?.[h]||f,C=q.useContext(y);if(C)return C;if(c!==void 0)return c;throw new Error(`\`${b}\` must be used within \`${s}\``)}return[p,g]}const u=()=>{const s=i.map(c=>q.createContext(c));return function(f){const h=f?.[n]||s;return q.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:p})=>{const b=h(s)[`__scope${p}`];return{...f,...b}},{});return q.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=q.forwardRef((u,s)=>{const{asChild:c,...f}=u,h=c?i:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),z.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(b,v){return b===v&&(b!==0||1/b===1/v)||b!==b&&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(b,v){var y=v(),C=o({inst:{value:y,getSnapshot:v}}),E=C[0].inst,T=C[1];return s(function(){E.value=y,E.getSnapshot=v,h(E)&&T({inst:E})},[b,y,v]),u(function(){return h(E)&&T({inst:E}),b(function(){h(E)&&T({inst:E})})},[b]),c(y),y}function h(b){var v=b.getSnapshot;b=b.value;try{var y=v();return!i(b,y)}catch{return!0}}function p(b,v){return v()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p: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=q.forwardRef((n,l)=>{const{__scopeAvatar:i,...o}=n,[u,s]=q.useState("idle");return z.jsx(LS,{scope:i,imageLoadingStatus:u,onImageLoadingStatusChange:s,children:z.jsx(zs.span,{...o,ref:l})})});nh.displayName=js;var rh="AvatarImage",ih=q.forwardRef((n,l)=>{const{__scopeAvatar:i,src:o,onLoadingStatusChange:u=()=>{},...s}=n,c=th(rh,i),f=IS(o,s),h=cr(p=>{u(p),c.onImageLoadingStatusChange(p)});return ur(()=>{f!=="idle"&&h(f)},[f,h]),f==="loaded"?z.jsx(zs.img,{...s,ref:l,src:o}):null});ih.displayName=rh;var ah="AvatarFallback",lh=q.forwardRef((n,l)=>{const{__scopeAvatar:i,delayMs:o,...u}=n,s=th(ah,i),[c,f]=q.useState(o===void 0);return q.useEffect(()=>{if(o!==void 0){const h=window.setTimeout(()=>f(!0),o);return()=>window.clearTimeout(h)}},[o]),c&&s.imageLoadingStatus!=="loaded"?z.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=q.useRef(null),s=o?(u.current||(u.current=new window.Image),u.current):null,[c,f]=q.useState(()=>oh(s,n));return ur(()=>{f(oh(s,n))},[s,n]),ur(()=>{const h=b=>()=>{f(b)};if(!s)return;const p=h("loaded"),g=h("error");return s.addEventListener("load",p),s.addEventListener("error",g),l&&(s.referrerPolicy=l),typeof i=="string"&&(s.crossOrigin=i),()=>{s.removeEventListener("load",p),s.removeEventListener("error",g)}},[s,i,l]),c}var sh=nh,uh=ih,ch=lh;const ha=q.forwardRef(({className:n,...l},i)=>z.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=q.forwardRef(({className:n,...l},i)=>z.jsx(uh,{ref:i,className:Ye("aspect-square h-full w-full",n),...l}));fh.displayName=uh.displayName;const ma=q.forwardRef(({className:n,...l},i)=>z.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=P,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(D,B=n.SynapseErrorCode.UNKNOWN,Y={}){super(D),this.name="SynapseError",this.code=B,this.timestamp=new Date,this.cause=Y.cause,this.context=Y.context,this.hint=Y.hint,this.displayMessage=Y.displayMessage||Y?.hint||D,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}n.SynapseError=l;class i extends l{status;error;headers;constructor(D,B,Y,F){const $=i.makeMessage(B,Y,D);super($,n.SynapseErrorCode.API,{cause:Y,context:{status:B,hasBody:!!Y},hint:B&&B>=500?"Retry the request or contact support if the issue persists.":void 0,displayMessage:D||"Something went wrong"}),this.name="APIError",this.status=B,this.error=Y,this.headers=F}static makeMessage(D,B,Y){const F=B instanceof Error?B.message:Y;return D&&F?`HTTP ${D}: ${F}`:D?`${D} status code (no body)`:F||"(no status code or body)"}static generate(D,B,Y,F){if(!D)return new o({message:Y});const $=B?.error,ie=$&&typeof $=="object"&&!Array.isArray($)?$:void 0;switch(D){case 400:return new s(Y||"Bad Request",D,ie,F);case 401:return new c(Y||"Unauthorized",D,ie,F);case 403:return new f(Y||"Permission Denied",D,ie,F);case 404:return new h(Y||"Not Found",D,ie,F);case 405:return new p(Y||"Method Not Allowed",D,ie,F);case 429:return new g(Y||"Rate Limit Exceeded",D,ie,F);case 500:return new b(Y||"Internal Server Error",D,ie,F);default:return new i(Y||"API Error",D,ie,F)}}}n.APIError=i;class o extends i{constructor({message:D}={}){super(D||"Request was aborted.",void 0,void 0,void 0),this.name="APIUserAbortError"}}n.APIUserAbortError=o;class u extends i{constructor({message:D}={}){super(D||"Request timed out.",void 0,void 0,void 0),this.name="APIConnectionTimeoutError"}}n.APIConnectionTimeoutError=u;class s extends i{constructor(D,B,Y,F){super(D,B,Y,F),this.name="BadRequestError"}}n.BadRequestError=s;class c extends i{constructor(D,B,Y,F){super(D,B,Y,F),this.name="UnauthorizedError"}}n.UnauthorizedError=c;class f extends i{constructor(D,B,Y,F){super(D,B,Y,F),this.name="PermissionDeniedError"}}n.PermissionDeniedError=f;class h extends i{constructor(D,B,Y,F){super(D,B,Y,F),this.name="NotFoundError"}}n.NotFoundError=h;class p extends i{constructor(D,B,Y,F){super(D,B,Y,F),this.name="MethodNotAllowedError"}}n.MethodNotAllowedError=p;class g extends i{constructor(D,B,Y,F){super(D,B,Y,F),this.name="RateLimitError"}}n.RateLimitError=g;class b extends i{constructor(D,B,Y,F){super(D,B,Y,F),this.name="InternalServerError"}}n.InternalServerError=b;class v extends l{constructor(D,B={}){super(D,n.SynapseErrorCode.CONNECTION,B),this.name="ConnectionError"}}n.ConnectionError=v;class y extends l{constructor(D,B={}){super(D,n.SynapseErrorCode.RECORDING,B),this.name="RecordingError"}}n.RecordingError=y;class C extends l{constructor(D,B={}){super(D,n.SynapseErrorCode.FILE,B),this.name="FileError"}}n.FileError=C;class E extends l{constructor(D,B={}){super(D,n.SynapseErrorCode.SESSION,B),this.name="SessionError"}}n.SessionError=E;class T extends l{constructor(D,B={}){super(D,n.SynapseErrorCode.MESSAGE,B),this.name="MessageError"}}n.MessageError=T;class _ extends l{constructor(D,B={}){super(D,n.SynapseErrorCode.STORE,B),this.name="StoreError"}}n.StoreError=_;class A extends l{constructor(D,B={}){super(D,n.SynapseErrorCode.CONFIGURATION,B),this.name="ConfigurationError"}}n.ConfigurationError=A;class k extends l{constructor(D,B={}){super(D,n.SynapseErrorCode.VALIDATION,B),this.name="ValidationError"}}n.ValidationError=k;function P(H,D,B,Y={}){if(H instanceof D)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 D(H.message,F);const $=H instanceof Error&&H.message?H.message:B;return new D($,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,h=s.reason;let p,g;f===1e3?(p=l.DisconnectionReason.CLIENT_CLOSED,g="Connection closed normally"):f===1001||f===1006?(p=l.DisconnectionReason.NETWORK_ERROR,g="Network connection lost"):f===4001?(p=l.DisconnectionReason.AUTHENTICATION_ERROR,g="Authentication failed"):c?(p=l.DisconnectionReason.SERVER_CLOSED,g=h||"Server closed connection"):(p=l.DisconnectionReason.CONNECTION_ERROR,g=h||"Connection closed unexpectedly"),this.config.reconnect&&p!==l.DisconnectionReason.AUTHENTICATION_ERROR&&p!==l.DisconnectionReason.CLIENT_CLOSED&&this.reconnectCount<(this.config.reconnectAttempts||3)?(this.reconnectCount++,setTimeout(()=>{this.connect()},this.config.reconnectDelay||1e3)):this.disconnect({reason:p,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 h=0;h<=c;h++)try{const p=this.buildUrl(u,s?.params),g=await fetch(p,{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(p){if(f=p,h===c||!(p instanceof TypeError&&p.message==="Failed to fetch"||p instanceof DOMException&&p.name==="AbortError"||p instanceof SyntaxError))break;const b=Math.pow(2,h)*100;await new Promise(v=>setTimeout(v,b))}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,h,p){return await this.session.feedback(c,f,h,p)}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(p,g){if(!u[p]){if(!o[p]){var b=typeof ql=="function"&&ql;if(!g&&b)return b(p,!0);if(f)return f(p,!0);var v=new Error("Cannot find module '"+p+"'");throw v.code="MODULE_NOT_FOUND",v}var y=u[p]={exports:{}};o[p][0].call(y.exports,function(C){var E=o[p][1][C];return c(E||C)},y,y.exports,i,o,u,s)}return u[p].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 p,g,b,v,y,C,E,T=[],_=0,A=h.length,k=A,P=s.getTypeOf(h)!=="string";_<h.length;)k=A-_,b=P?(p=h[_++],g=_<A?h[_++]:0,_<A?h[_++]:0):(p=h.charCodeAt(_++),g=_<A?h.charCodeAt(_++):0,_<A?h.charCodeAt(_++):0),v=p>>2,y=(3&p)<<4|g>>4,C=1<k?(15&g)<<2|b>>6:64,E=2<k?63&b:64,T.push(f.charAt(v)+f.charAt(y)+f.charAt(C)+f.charAt(E));return T.join("")},u.decode=function(h){var p,g,b,v,y,C,E=0,T=0,_="data:";if(h.substr(0,_.length)===_)throw new Error("Invalid base64 input, it looks like a data url.");var A,k=3*(h=h.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(h.charAt(h.length-1)===f.charAt(64)&&k--,h.charAt(h.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<h.length;)p=f.indexOf(h.charAt(E++))<<2|(v=f.indexOf(h.charAt(E++)))>>4,g=(15&v)<<4|(y=f.indexOf(h.charAt(E++)))>>2,b=(3&y)<<6|(C=f.indexOf(h.charAt(E++))),A[T++]=p,y!==64&&(A[T++]=g),C!==64&&(A[T++]=b);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 p(g,b,v,y,C){this.compressedSize=g,this.uncompressedSize=b,this.crc32=v,this.compression=y,this.compressedContent=C}p.prototype={getContentWorker:function(){var g=new c(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new h("data_length")),b=this;return g.on("end",function(){if(this.streamInfo.data_length!==b.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)}},p.createWorkerFrom=function(g,b,v){return g.pipe(new f).pipe(new h("uncompressedSize")).pipe(b.compressWorker(v)).pipe(new h("compressedSize")).withStreamInfo("compression",b)},o.exports=p},{"./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=[],p=0;p<256;p++){f=p;for(var g=0;g<8;g++)f=1&f?3988292384^f>>>1:f>>>1;h[p]=f}return h})();o.exports=function(f,h){return f!==void 0&&f.length?s.getTypeOf(f)!=="string"?(function(p,g,b,v){var y=c,C=v+b;p^=-1;for(var E=v;E<C;E++)p=p>>>8^y[255&(p^g[E])];return-1^p})(0|h,f,f.length,0):(function(p,g,b,v){var y=c,C=v+b;p^=-1;for(var E=v;E<C;E++)p=p>>>8^y[255&(p^g.charCodeAt(E))];return-1^p})(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"),p=s?"uint8array":"array";function g(b,v){h.call(this,"FlateWorker/"+b),this._pako=null,this._pakoAction=b,this._pakoOptions=v,this.meta={}}u.magic="\b\0",f.inherits(g,h),g.prototype.processChunk=function(b){this.meta=b.meta,this._pako===null&&this._createPako(),this._pako.push(f.transformTo(p,b.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 b=this;this._pako.onData=function(v){b.push({data:v,meta:b.meta})}},u.compressWorker=function(b){return new g("Deflate",b)},u.uncompressWorker=function(){return new g("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(i,o,u){function s(y,C){var E,T="";for(E=0;E<C;E++)T+=String.fromCharCode(255&y),y>>>=8;return T}function c(y,C,E,T,_,A){var k,P,H=y.file,D=y.compression,B=A!==p.utf8encode,Y=f.transformTo("string",A(H.name)),F=f.transformTo("string",p.utf8encode(H.name)),$=H.comment,ie=f.transformTo("string",A($)),M=f.transformTo("string",p.utf8encode($)),re=F.length!==H.name.length,w=M.length!==$.length,V="",Z="",Q="",se=H.dir,de=H.date,I={crc32:0,compressedSize:0,uncompressedSize:0};C&&!E||(I.crc32=y.crc32,I.compressedSize=y.compressedSize,I.uncompressedSize=y.uncompressedSize);var N=0;C&&(N|=8),B||!re&&!w||(N|=2048);var U=0,O=0;se&&(U|=16),_==="UNIX"?(O=798,U|=(function(ce,we){var Te=ce;return ce||(Te=we?16893:33204),(65535&Te)<<16})(H.unixPermissions,se)):(O=20,U|=(function(ce){return 63&(ce||0)})(H.dosPermissions)),k=de.getUTCHours(),k<<=6,k|=de.getUTCMinutes(),k<<=5,k|=de.getUTCSeconds()/2,P=de.getUTCFullYear()-1980,P<<=4,P|=de.getUTCMonth()+1,P<<=5,P|=de.getUTCDate(),re&&(Z=s(1,1)+s(g(Y),4)+F,V+="up"+s(Z.length,2)+Z),w&&(Q=s(1,1)+s(g(ie),4)+M,V+="uc"+s(Q.length,2)+Q);var ne="";return ne+=`
|
|
10
|
+
\0`,ne+=s(N,2),ne+=D.magic,ne+=s(k,2),ne+=s(P,2),ne+=s(I.crc32,4),ne+=s(I.compressedSize,4),ne+=s(I.uncompressedSize,4),ne+=s(Y.length,2),ne+=s(V.length,2),{fileRecord:b.LOCAL_FILE_HEADER+ne+Y+V,dirRecord:b.CENTRAL_FILE_HEADER+s(O,2)+ne+s(ie.length,2)+"\0\0\0\0"+s(U,4)+s(T,4)+Y+V+ie}}var f=i("../utils"),h=i("../stream/GenericWorker"),p=i("../utf8"),g=i("../crc32"),b=i("../signature");function v(y,C,E,T){h.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=C,this.zipPlatform=E,this.encodeFileName=T,this.streamFiles=y,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(y){var C=y.meta.percent||0,E=this.entriesCount,T=this._sources.length;this.accumulate?this.contentBuffer.push(y):(this.bytesWritten+=y.data.length,h.prototype.push.call(this,{data:y.data,meta:{currentFile:this.currentFile,percent:E?(C+100*(E-T-1))/E:100}}))},v.prototype.openedSource=function(y){this.currentSourceOffset=this.bytesWritten,this.currentFile=y.file.name;var C=this.streamFiles&&!y.file.dir;if(C){var E=c(y,C,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},v.prototype.closedSource=function(y){this.accumulate=!1;var C=this.streamFiles&&!y.file.dir,E=c(y,C,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),C)this.push({data:(function(T){return b.DATA_DESCRIPTOR+s(T.crc32,4)+s(T.compressedSize,4)+s(T.uncompressedSize,4)})(y),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 y=this.bytesWritten,C=0;C<this.dirRecords.length;C++)this.push({data:this.dirRecords[C],meta:{percent:100}});var E=this.bytesWritten-y,T=(function(_,A,k,P,H){var D=f.transformTo("string",H(P));return b.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(_,2)+s(_,2)+s(A,4)+s(k,4)+s(D.length,2)+D})(this.dirRecords.length,E,y,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(y){this._sources.push(y);var C=this;return y.on("data",function(E){C.processChunk(E)}),y.on("end",function(){C.closedSource(C.previous.streamInfo),C._sources.length?C.prepareNextSource():C.end()}),y.on("error",function(E){C.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(y){var C=this._sources;if(!h.prototype.error.call(this,y))return!1;for(var E=0;E<C.length;E++)try{C[E].error(y)}catch{}return!0},v.prototype.lock=function(){h.prototype.lock.call(this);for(var y=this._sources,C=0;C<y.length;C++)y[C].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,p){var g=new c(h.streamFiles,p,h.platform,h.encodeFileName),b=0;try{f.forEach(function(v,y){b++;var C=(function(A,k){var P=A||k,H=s[P];if(!H)throw new Error(P+" is not a valid compression method !");return H})(y.options.compression,h.compression),E=y.options.compressionOptions||h.compressionOptions||{},T=y.dir,_=y.date;y._compressWorker(C,E).withStreamInfo("file",{name:v,dir:T,date:_,comment:y.comment||"",unixPermissions:y.unixPermissions,dosPermissions:y.dosPermissions}).pipe(g)}),g.entriesCount=b}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"),p=i("./stream/Crc32Probe"),g=i("./nodejsUtils");function b(v){return new c.Promise(function(y,C){var E=v.decompressed.getContentWorker().pipe(new p);E.on("error",function(T){C(T)}).on("end",function(){E.streamInfo.crc32!==v.decompressed.crc32?C(new Error("Corrupted zip : CRC32 mismatch")):y()}).resume()})}o.exports=function(v,y){var C=this;return y=s.extend(y||{},{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,y.optimizedBinaryString,y.base64).then(function(E){var T=new h(y);return T.load(E),T}).then(function(E){var T=[c.Promise.resolve(E)],_=E.files;if(y.checkCRC32)for(var A=0;A<_.length;A++)T.push(b(_[A]));return c.Promise.all(T)}).then(function(E){for(var T=E.shift(),_=T.files,A=0;A<_.length;A++){var k=_[A],P=k.fileNameStr,H=s.resolve(k.fileNameStr);C.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:y.createFolders}),k.dir||(C.file(H).unsafeOriginalName=P)}return T.zipComment.length&&(C.comment=T.zipComment),C})}},{"./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,p){c.call(this,"Nodejs stream input adapter for "+h),this._upstreamEnded=!1,this._bindStream(p)}s.inherits(f,c),f.prototype._bindStream=function(h){var p=this;(this._stream=h).pause(),h.on("data",function(g){p.push({data:g,meta:{percent:0}})}).on("error",function(g){p.isPaused?this.generatedError=g:p.error(g)}).on("end",function(){p.isPaused?p._upstreamEnded=!0:p.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,p){s.call(this,h),this._helper=f;var g=this;f.on("data",function(b,v){g.push(b)||g._helper.pause(),p&&p(v)}).on("error",function(b){g.emit("error",b)}).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,D,B){var Y,F=f.getTypeOf(D),$=f.extend(B||{},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;B&&B.binary!==void 0||($.binary=!ie),(D instanceof b&&D.uncompressedSize===0||$.dir||!D||D.length===0)&&($.base64=!1,$.binary=!0,D="",$.compression="STORE",F="string");var M=null;M=D instanceof b||D instanceof h?D:C.isNode&&C.isStream(D)?new E(H,D):f.prepareContent(H,D,$.binary,$.optimizedBinaryString,$.base64);var re=new v(H,M,$);this.files[H]=re}var c=i("./utf8"),f=i("./utils"),h=i("./stream/GenericWorker"),p=i("./stream/StreamHelper"),g=i("./defaults"),b=i("./compressedObject"),v=i("./zipObject"),y=i("./generate"),C=i("./nodejsUtils"),E=i("./nodejs/NodejsStreamInputAdapter"),T=function(H){H.slice(-1)==="/"&&(H=H.substring(0,H.length-1));var D=H.lastIndexOf("/");return 0<D?H.substring(0,D):""},_=function(H){return H.slice(-1)!=="/"&&(H+="/"),H},A=function(H,D){return D=D!==void 0?D:g.createFolders,H=_(H),this.files[H]||s.call(this,H,null,{dir:!0,createFolders:D}),this.files[H]};function k(H){return Object.prototype.toString.call(H)==="[object RegExp]"}var P={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(H){var D,B,Y;for(D in this.files)Y=this.files[D],(B=D.slice(this.root.length,D.length))&&D.slice(0,this.root.length)===this.root&&H(B,Y)},filter:function(H){var D=[];return this.forEach(function(B,Y){H(B,Y)&&D.push(Y)}),D},file:function(H,D,B){if(arguments.length!==1)return H=this.root+H,s.call(this,H,D,B),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 D=this.root+H,B=A.call(this,D),Y=this.clone();return Y.root=B.name,Y},remove:function(H){H=this.root+H;var D=this.files[H];if(D||(H.slice(-1)!=="/"&&(H+="/"),D=this.files[H]),D&&!D.dir)delete this.files[H];else for(var B=this.filter(function(F,$){return $.name.slice(0,H.length)===H}),Y=0;Y<B.length;Y++)delete this.files[B[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 D,B={};try{if((B=f.extend(H||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:c.utf8encode})).type=B.type.toLowerCase(),B.compression=B.compression.toUpperCase(),B.type==="binarystring"&&(B.type="string"),!B.type)throw new Error("No output type specified.");f.checkSupport(B.type),B.platform!=="darwin"&&B.platform!=="freebsd"&&B.platform!=="linux"&&B.platform!=="sunos"||(B.platform="UNIX"),B.platform==="win32"&&(B.platform="DOS");var Y=B.comment||this.comment||"";D=y.generateWorker(this,B,Y)}catch(F){(D=new h("error")).error(F)}return new p(D,B.type||"string",B.mimeType)},generateAsync:function(H,D){return this.generateInternalStream(H).accumulate(D)},generateNodeStream:function(H,D){return(H=H||{}).type||(H.type="nodebuffer"),this.generateInternalStream(H).toNodejsStream(D)}};o.exports=P},{"./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),p=f.charCodeAt(1),g=f.charCodeAt(2),b=f.charCodeAt(3),v=this.length-4;0<=v;--v)if(this.data[v]===h&&this.data[v+1]===p&&this.data[v+2]===g&&this.data[v+3]===b)return v-this.zero;return-1},c.prototype.readAndCheckSignature=function(f){var h=f.charCodeAt(0),p=f.charCodeAt(1),g=f.charCodeAt(2),b=f.charCodeAt(3),v=this.readData(4);return h===v[0]&&p===v[1]&&g===v[2]&&b===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,p=0;for(this.checkOffset(f),h=this.index+f-1;h>=this.index;h--)p=(p<<8)+this.byteAt(h);return this.index+=f,p},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"),p=i("./NodeBufferReader"),g=i("./Uint8ArrayReader");o.exports=function(b){var v=s.getTypeOf(b);return s.checkSupport(v),v!=="string"||c.uint8array?v==="nodebuffer"?new p(b):c.uint8array?new g(s.transformTo("uint8array",b)):new f(s.transformTo("array",b)):new h(b)}},{"../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 p=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=p+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 p=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,h.then(function(g){p.dataIsReady=!0,p.data=g,p.max=g&&g.length||0,p.type=s.getTypeOf(g),p.isPaused||p._tickAndRepeat()},function(g){p.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,p=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,p);break;case"uint8array":h=this.data.subarray(this.index,p);break;case"array":case"nodebuffer":h=this.data.slice(this.index,p)}return this.index=p,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"),p=i("../support"),g=i("../external"),b=null;if(p.nodestream)try{b=i("../nodejs/NodejsStreamOutputAdapter")}catch{}function v(C,E){return new g.Promise(function(T,_){var A=[],k=C._internalType,P=C._outputType,H=C._mimeType;C.on("data",function(D,B){A.push(D),E&&E(B)}).on("error",function(D){A=[],_(D)}).on("end",function(){try{var D=(function(B,Y,F){switch(B){case"blob":return s.newBlob(s.transformTo("arraybuffer",Y),F);case"base64":return h.encode(Y);default:return s.transformTo(B,Y)}})(P,(function(B,Y){var F,$=0,ie=null,M=0;for(F=0;F<Y.length;F++)M+=Y[F].length;switch(B){case"string":return Y.join("");case"array":return Array.prototype.concat.apply([],Y);case"uint8array":for(ie=new Uint8Array(M),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 '"+B+"'")}})(k,A),H);T(D)}catch(B){_(B)}A=[]}).resume()})}function y(C,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=C.pipe(new c(_)),C.lock()}catch(A){this._worker=new f("error"),this._worker.error(A)}}y.prototype={accumulate:function(C){return v(this,C)},on:function(C,E){var T=this;return C==="data"?this._worker.on(C,function(_){E.call(T,_.data,_.meta)}):this._worker.on(C,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(C){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new b(this,{objectMode:this._outputType!=="nodebuffer"},C)}},o.exports=y},{"../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"),p=new Array(256),g=0;g<256;g++)p[g]=252<=g?6:248<=g?5:240<=g?4:224<=g?3:192<=g?2:1;p[254]=p[254]=1;function b(){h.call(this,"utf-8 decode"),this.leftOver=null}function v(){h.call(this,"utf-8 encode")}u.utf8encode=function(y){return c.nodebuffer?f.newBufferFrom(y,"utf-8"):(function(C){var E,T,_,A,k,P=C.length,H=0;for(A=0;A<P;A++)(64512&(T=C.charCodeAt(A)))==55296&&A+1<P&&(64512&(_=C.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=C.charCodeAt(A)))==55296&&A+1<P&&(64512&(_=C.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})(y)},u.utf8decode=function(y){return c.nodebuffer?s.transformTo("nodebuffer",y).toString("utf-8"):(function(C){var E,T,_,A,k=C.length,P=new Array(2*k);for(E=T=0;E<k;)if((_=C[E++])<128)P[T++]=_;else if(4<(A=p[_]))P[T++]=65533,E+=A-1;else{for(_&=A===2?31:A===3?15:7;1<A&&E<k;)_=_<<6|63&C[E++],A--;1<A?P[T++]=65533:_<65536?P[T++]=_:(_-=65536,P[T++]=55296|_>>10&1023,P[T++]=56320|1023&_)}return P.length!==T&&(P.subarray?P=P.subarray(0,T):P.length=T),s.applyFromCharCode(P)})(y=s.transformTo(c.uint8array?"uint8array":"array",y))},s.inherits(b,h),b.prototype.processChunk=function(y){var C=s.transformTo(c.uint8array?"uint8array":"array",y.data);if(this.leftOver&&this.leftOver.length){if(c.uint8array){var E=C;(C=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),C.set(E,this.leftOver.length)}else C=this.leftOver.concat(C);this.leftOver=null}var T=(function(A,k){var P;for((k=k||A.length)>A.length&&(k=A.length),P=k-1;0<=P&&(192&A[P])==128;)P--;return P<0||P===0?k:P+p[A[P]]>k?P:k})(C),_=C;T!==C.length&&(c.uint8array?(_=C.subarray(0,T),this.leftOver=C.subarray(T,C.length)):(_=C.slice(0,T),this.leftOver=C.slice(T,C.length))),this.push({data:u.utf8decode(_),meta:y.meta})},b.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:u.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},u.Utf8DecodeWorker=b,s.inherits(v,h),v.prototype.processChunk=function(y){this.push({data:u.utf8encode(y.data),meta:y.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 p(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 b={stringifyByChunk:function(E,T,_){var A=[],k=0,P=E.length;if(P<=_)return String.fromCharCode.apply(null,E);for(;k<P;)T==="array"||T==="nodebuffer"?A.push(String.fromCharCode.apply(null,E.slice(k,Math.min(k+_,P)))):A.push(String.fromCharCode.apply(null,E.subarray(k,Math.min(k+_,P)))),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=b.applyCanBeUsed.uint8array:_==="nodebuffer"&&(A=b.applyCanBeUsed.nodebuffer),A)for(;1<T;)try{return b.stringifyByChunk(E,_,T)}catch{T=Math.floor(T/2)}return b.stringifyByChar(E)}function y(E,T){for(var _=0;_<E.length;_++)T[_]=E[_];return T}u.applyFromCharCode=v;var C={};C.string={string:p,array:function(E){return g(E,new Array(E.length))},arraybuffer:function(E){return C.string.uint8array(E).buffer},uint8array:function(E){return g(E,new Uint8Array(E.length))},nodebuffer:function(E){return g(E,f.allocBuffer(E.length))}},C.array={string:v,array:p,arraybuffer:function(E){return new Uint8Array(E).buffer},uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return f.newBufferFrom(E)}},C.arraybuffer={string:function(E){return v(new Uint8Array(E))},array:function(E){return y(new Uint8Array(E),new Array(E.byteLength))},arraybuffer:p,uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return f.newBufferFrom(new Uint8Array(E))}},C.uint8array={string:v,array:function(E){return y(E,new Array(E.length))},arraybuffer:function(E){return E.buffer},uint8array:p,nodebuffer:function(E){return f.newBufferFrom(E)}},C.nodebuffer={string:v,array:function(E){return y(E,new Array(E.length))},arraybuffer:function(E){return C.nodebuffer.uint8array(E).buffer},uint8array:function(E){return y(E,new Uint8Array(E.length))},nodebuffer:p},u.transformTo=function(E,T){if(T=T||"",!E)return T;u.checkSupport(E);var _=u.getTypeOf(T);return C[_][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 h.Promise.resolve(T).then(function(P){return s.blob&&(P instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(P))!==-1)&&typeof FileReader<"u"?new h.Promise(function(H,D){var B=new FileReader;B.onload=function(Y){H(Y.target.result)},B.onerror=function(Y){D(Y.target.error)},B.readAsArrayBuffer(P)}):P}).then(function(P){var H=u.getTypeOf(P);return H?(H==="arraybuffer"?P=u.transformTo("uint8array",P):H==="string"&&(k?P=c.decode(P):_&&A!==!0&&(P=(function(D){return g(D,s.uint8array?new Uint8Array(D.length):new Array(D.length))})(P))),P):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"),p=i("./support");function g(b){this.files=[],this.loadOptions=b}g.prototype={checkSignature:function(b){if(!this.reader.readAndCheckSignature(b)){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(b)+")")}},isSignature:function(b,v){var y=this.reader.index;this.reader.setIndex(b);var C=this.reader.readString(4)===v;return this.reader.setIndex(y),C},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 b=this.reader.readData(this.zipCommentLength),v=p.uint8array?"uint8array":"array",y=c.transformTo(v,b);this.zipComment=this.loadOptions.decodeFileName(y)},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 b,v,y,C=this.zip64EndOfCentralSize-44;0<C;)b=this.reader.readInt(2),v=this.reader.readInt(4),y=this.reader.readData(v),this.zip64ExtensibleData[b]={id:b,length:v,value:y}},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 b,v;for(b=0;b<this.files.length;b++)v=this.files[b],this.reader.setIndex(v.localHeaderOffset),this.checkSignature(f.LOCAL_FILE_HEADER),v.readLocalPart(this.reader),v.handleUTF8(),v.processAttributes()},readCentralDir:function(){var b;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(f.CENTRAL_FILE_HEADER);)(b=new h({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(b);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 b=this.reader.lastIndexOfSignature(f.CENTRAL_DIRECTORY_END);if(b<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(b);var v=b;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,(b=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(b),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 y=this.centralDirOffset+this.centralDirSize;this.zip64&&(y+=20,y+=12+this.zip64EndOfCentralSize);var C=v-y;if(0<C)this.isSignature(v,f.CENTRAL_FILE_HEADER)||(this.reader.zero=C);else if(C<0)throw new Error("Corrupted zip: missing "+Math.abs(C)+" bytes.")},prepareReader:function(b){this.reader=s(b)},load:function(b){this.prepareReader(b),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"),p=i("./utf8"),g=i("./compressions"),b=i("./support");function v(y,C){this.options=y,this.loadOptions=C}v.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(y){var C,E;if(y.skip(22),this.fileNameLength=y.readInt(2),E=y.readInt(2),this.fileName=y.readData(this.fileNameLength),y.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((C=(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,C,y.readData(this.compressedSize))},readCentralPart:function(y){this.versionMadeBy=y.readInt(2),y.skip(2),this.bitFlag=y.readInt(2),this.compressionMethod=y.readString(2),this.date=y.readDate(),this.crc32=y.readInt(4),this.compressedSize=y.readInt(4),this.uncompressedSize=y.readInt(4);var C=y.readInt(2);if(this.extraFieldsLength=y.readInt(2),this.fileCommentLength=y.readInt(2),this.diskNumberStart=y.readInt(2),this.internalFileAttributes=y.readInt(2),this.externalFileAttributes=y.readInt(4),this.localHeaderOffset=y.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");y.skip(C),this.readExtraFields(y),this.parseZIP64ExtraField(y),this.fileComment=y.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var y=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),y==0&&(this.dosPermissions=63&this.externalFileAttributes),y==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var y=s(this.extraFields[1].value);this.uncompressedSize===c.MAX_VALUE_32BITS&&(this.uncompressedSize=y.readInt(8)),this.compressedSize===c.MAX_VALUE_32BITS&&(this.compressedSize=y.readInt(8)),this.localHeaderOffset===c.MAX_VALUE_32BITS&&(this.localHeaderOffset=y.readInt(8)),this.diskNumberStart===c.MAX_VALUE_32BITS&&(this.diskNumberStart=y.readInt(4))}},readExtraFields:function(y){var C,E,T,_=y.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});y.index+4<_;)C=y.readInt(2),E=y.readInt(2),T=y.readData(E),this.extraFields[C]={id:C,length:E,value:T};y.setIndex(_)},handleUTF8:function(){var y=b.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=p.utf8decode(this.fileName),this.fileCommentStr=p.utf8decode(this.fileComment);else{var C=this.findExtraFieldUnicodePath();if(C!==null)this.fileNameStr=C;else{var E=c.transformTo(y,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(E)}var T=this.findExtraFieldUnicodeComment();if(T!==null)this.fileCommentStr=T;else{var _=c.transformTo(y,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(_)}}},findExtraFieldUnicodePath:function(){var y=this.extraFields[28789];if(y){var C=s(y.value);return C.readInt(1)!==1||h(this.fileName)!==C.readInt(4)?null:p.utf8decode(C.readData(y.length-5))}return null},findExtraFieldUnicodeComment:function(){var y=this.extraFields[25461];if(y){var C=s(y.value);return C.readInt(1)!==1||h(this.fileComment)!==C.readInt(4)?null:p.utf8decode(C.readData(y.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(C,E,T){this.name=C,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"),p=i("./compressedObject"),g=i("./stream/GenericWorker");s.prototype={internalStream:function(C){var E=null,T="string";try{if(!C)throw new Error("No output type specified.");var _=(T=C.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(k){(E=new g("error")).error(k)}return new c(E,T,"")},async:function(C,E){return this.internalStream(C).accumulate(E)},nodeStream:function(C,E){return this.internalStream(C||"nodebuffer").toNodejsStream(E)},_compressWorker:function(C,E){if(this._data instanceof p&&this._data.compression.magic===C.magic)return this._data.getCompressedWorker();var T=this._decompressWorker();return this._dataBinary||(T=T.pipe(new h.Utf8EncodeWorker)),p.createWorkerFrom(T,C,E)},_decompressWorker:function(){return this._data instanceof p?this._data.getContentWorker():this._data instanceof g?this._data:new f(this._data)}};for(var b=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],v=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},y=0;y<b.length;y++)s.prototype[b[y]]=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 p=0,g=new h(C),b=s.document.createTextNode("");g.observe(b,{characterData:!0}),c=function(){b.data=p=++p%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(){C(),E.onreadystatechange=null,E.parentNode.removeChild(E),E=null},s.document.documentElement.appendChild(E)}:function(){setTimeout(C,0)};else{var v=new s.MessageChannel;v.port1.onmessage=C,c=function(){v.port2.postMessage(0)}}var y=[];function C(){var E,T;f=!0;for(var _=y.length;_;){for(T=y,y=[],E=-1;++E<_;)T[E]();_=y.length}f=!1}o.exports=function(E){y.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"],p=["FULFILLED"],g=["PENDING"];function b(_){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 y(_,A,k){s(function(){var P;try{P=A(k)}catch(H){return f.reject(_,H)}P===_?f.reject(_,new TypeError("Cannot resolve promise with itself")):f.resolve(_,P)})}function C(_){var A=_&&_.then;if(_&&(typeof _=="object"||typeof _=="function")&&typeof A=="function")return function(){A.apply(_,arguments)}}function E(_,A){var k=!1;function P(B){k||(k=!0,f.reject(_,B))}function H(B){k||(k=!0,f.resolve(_,B))}var D=T(function(){A(H,P)});D.status==="error"&&P(D.value)}function T(_,A){var k={};try{k.value=_(A),k.status="success"}catch(P){k.status="error",k.value=P}return k}(o.exports=b).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})})},b.prototype.catch=function(_){return this.then(null,_)},b.prototype.then=function(_,A){if(typeof _!="function"&&this.state===p||typeof A!="function"&&this.state===h)return this;var k=new this.constructor(c);return this.state!==g?y(k,this.state===p?_:A,this.outcome):this.queue.push(new v(k,_,A)),k},v.prototype.callFulfilled=function(_){f.resolve(this.promise,_)},v.prototype.otherCallFulfilled=function(_){y(this.promise,this.onFulfilled,_)},v.prototype.callRejected=function(_){f.reject(this.promise,_)},v.prototype.otherCallRejected=function(_){y(this.promise,this.onRejected,_)},f.resolve=function(_,A){var k=T(C,A);if(k.status==="error")return f.reject(_,k.value);var P=k.value;if(P)E(_,P);else{_.state=p,_.outcome=A;for(var H=-1,D=_.queue.length;++H<D;)_.queue[H].callFulfilled(A)}return _},f.reject=function(_,A){_.state=h,_.outcome=A;for(var k=-1,P=_.queue.length;++k<P;)_.queue[k].callRejected(A);return _},b.resolve=function(_){return _ instanceof this?_:f.resolve(new this(c),_)},b.reject=function(_){var A=new this(c);return f.reject(A,_)},b.all=function(_){var A=this;if(Object.prototype.toString.call(_)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=_.length,P=!1;if(!k)return this.resolve([]);for(var H=new Array(k),D=0,B=-1,Y=new this(c);++B<k;)F(_[B],B);return Y;function F($,ie){A.resolve($).then(function(M){H[ie]=M,++D!==k||P||(P=!0,f.resolve(Y,H))},function(M){P||(P=!0,f.reject(Y,M))})}},b.race=function(_){var A=this;if(Object.prototype.toString.call(_)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=_.length,P=!1;if(!k)return this.resolve([]);for(var H=-1,D=new this(c);++H<k;)B=_[H],A.resolve(B).then(function(Y){P||(P=!0,f.resolve(D,Y))},function(Y){P||(P=!0,f.reject(D,Y))});var B;return D}},{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"),p=i("./zlib/zstream"),g=Object.prototype.toString,b=0,v=-1,y=0,C=8;function E(_){if(!(this instanceof E))return new E(_);this.options=c.assign({level:v,method:C,chunkSize:16384,windowBits:15,memLevel:8,strategy:y,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 p,this.strm.avail_out=0;var k=s.deflateInit2(this.strm,A.level,A.method,A.windowBits,A.memLevel,A.strategy);if(k!==b)throw new Error(h[k]);if(A.header&&s.deflateSetHeader(this.strm,A.header),A.dictionary){var P;if(P=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,P))!==b)throw new Error(h[k]);this._dict_set=!0}}function T(_,A){var k=new E(A);if(k.push(_,!0),k.err)throw k.msg||h[k.err];return k.result}E.prototype.push=function(_,A){var k,P,H=this.strm,D=this.options.chunkSize;if(this.ended)return!1;P=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(D),H.next_out=0,H.avail_out=D),(k=s.deflate(H,P))!==1&&k!==b)return this.onEnd(k),!(this.ended=!0);H.avail_out!==0&&(H.avail_in!==0||P!==4&&P!==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 P===4?(k=s.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===b):P!==2||(this.onEnd(b),!(H.avail_out=0))},E.prototype.onData=function(_){this.chunks.push(_)},E.prototype.onEnd=function(_){_===b&&(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"),p=i("./zlib/messages"),g=i("./zlib/zstream"),b=i("./zlib/gzheader"),v=Object.prototype.toString;function y(E){if(!(this instanceof y))return new y(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(p[_]);this.header=new b,s.inflateGetHeader(this.strm,this.header)}function C(E,T){var _=new y(T);if(_.push(E,!0),_.err)throw _.msg||p[_.err];return _.result}y.prototype.push=function(E,T){var _,A,k,P,H,D,B=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"?B.input=f.binstring2buf(E):v.call(E)==="[object ArrayBuffer]"?B.input=new Uint8Array(E):B.input=E,B.next_in=0,B.avail_in=B.input.length;do{if(B.avail_out===0&&(B.output=new c.Buf8(Y),B.next_out=0,B.avail_out=Y),(_=s.inflate(B,h.Z_NO_FLUSH))===h.Z_NEED_DICT&&F&&(D=typeof F=="string"?f.string2buf(F):v.call(F)==="[object ArrayBuffer]"?new Uint8Array(F):F,_=s.inflateSetDictionary(this.strm,D)),_===h.Z_BUF_ERROR&&$===!0&&(_=h.Z_OK,$=!1),_!==h.Z_STREAM_END&&_!==h.Z_OK)return this.onEnd(_),!(this.ended=!0);B.next_out&&(B.avail_out!==0&&_!==h.Z_STREAM_END&&(B.avail_in!==0||A!==h.Z_FINISH&&A!==h.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=f.utf8border(B.output,B.next_out),P=B.next_out-k,H=f.buf2string(B.output,k),B.next_out=P,B.avail_out=Y-P,P&&c.arraySet(B.output,B.output,k,P,0),this.onData(H)):this.onData(c.shrinkBuf(B.output,B.next_out)))),B.avail_in===0&&B.avail_out===0&&($=!0)}while((0<B.avail_in||B.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),!(B.avail_out=0))},y.prototype.onData=function(E){this.chunks.push(E)},y.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=y,u.inflate=C,u.inflateRaw=function(E,T){return(T=T||{}).raw=!0,C(E,T)},u.ungzip=C},{"./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 p=Array.prototype.slice.call(arguments,1);p.length;){var g=p.shift();if(g){if(typeof g!="object")throw new TypeError(g+"must be non-object");for(var b in g)g.hasOwnProperty(b)&&(h[b]=g[b])}}return h},u.shrinkBuf=function(h,p){return h.length===p?h:h.subarray?h.subarray(0,p):(h.length=p,h)};var c={arraySet:function(h,p,g,b,v){if(p.subarray&&h.subarray)h.set(p.subarray(g,g+b),v);else for(var y=0;y<b;y++)h[v+y]=p[g+y]},flattenChunks:function(h){var p,g,b,v,y,C;for(p=b=0,g=h.length;p<g;p++)b+=h[p].length;for(C=new Uint8Array(b),p=v=0,g=h.length;p<g;p++)y=h[p],C.set(y,v),v+=y.length;return C}},f={arraySet:function(h,p,g,b,v){for(var y=0;y<b;y++)h[v+y]=p[g+y]},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),p=0;p<256;p++)h[p]=252<=p?6:248<=p?5:240<=p?4:224<=p?3:192<=p?2:1;function g(b,v){if(v<65537&&(b.subarray&&f||!b.subarray&&c))return String.fromCharCode.apply(null,s.shrinkBuf(b,v));for(var y="",C=0;C<v;C++)y+=String.fromCharCode(b[C]);return y}h[254]=h[254]=1,u.string2buf=function(b){var v,y,C,E,T,_=b.length,A=0;for(E=0;E<_;E++)(64512&(y=b.charCodeAt(E)))==55296&&E+1<_&&(64512&(C=b.charCodeAt(E+1)))==56320&&(y=65536+(y-55296<<10)+(C-56320),E++),A+=y<128?1:y<2048?2:y<65536?3:4;for(v=new s.Buf8(A),E=T=0;T<A;E++)(64512&(y=b.charCodeAt(E)))==55296&&E+1<_&&(64512&(C=b.charCodeAt(E+1)))==56320&&(y=65536+(y-55296<<10)+(C-56320),E++),y<128?v[T++]=y:(y<2048?v[T++]=192|y>>>6:(y<65536?v[T++]=224|y>>>12:(v[T++]=240|y>>>18,v[T++]=128|y>>>12&63),v[T++]=128|y>>>6&63),v[T++]=128|63&y);return v},u.buf2binstring=function(b){return g(b,b.length)},u.binstring2buf=function(b){for(var v=new s.Buf8(b.length),y=0,C=v.length;y<C;y++)v[y]=b.charCodeAt(y);return v},u.buf2string=function(b,v){var y,C,E,T,_=v||b.length,A=new Array(2*_);for(y=C=0;y<_;)if((E=b[y++])<128)A[C++]=E;else if(4<(T=h[E]))A[C++]=65533,y+=T-1;else{for(E&=T===2?31:T===3?15:7;1<T&&y<_;)E=E<<6|63&b[y++],T--;1<T?A[C++]=65533:E<65536?A[C++]=E:(E-=65536,A[C++]=55296|E>>10&1023,A[C++]=56320|1023&E)}return g(A,C)},u.utf8border=function(b,v){var y;for((v=v||b.length)>b.length&&(v=b.length),y=v-1;0<=y&&(192&b[y])==128;)y--;return y<0||y===0?v:y+h[b[y]]>v?y:v}},{"./common":41}],43:[function(i,o,u){o.exports=function(s,c,f,h){for(var p=65535&s|0,g=s>>>16&65535|0,b=0;f!==0;){for(f-=b=2e3<f?2e3:f;g=g+(p=p+c[h++]|0)|0,--b;);p%=65521,g%=65521}return p|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 p=0;p<8;p++)c=1&c?3988292384^c>>>1:c>>>1;f[h]=c}return f})();o.exports=function(c,f,h,p){var g=s,b=p+h;c^=-1;for(var v=p;v<b;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"),p=i("./crc32"),g=i("./messages"),b=0,v=4,y=0,C=-2,E=-1,T=4,_=2,A=8,k=9,P=286,H=30,D=19,B=2*P+1,Y=15,F=3,$=258,ie=$+F+1,M=42,re=113,w=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 I(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 U(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 O(S,K){S.pending_buf[S.pending++]=K}function ne(S,K){S.pending_buf[S.pending++]=K>>>8&255,S.pending_buf[S.pending++]=255&K}function ce(S,K){var W,j,L=S.max_chain_length,X=S.strstart,he=S.prev_length,ge=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&&(L>>=2),ge>S.lookahead&&(ge=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(j=$-(te-X),X=te-$,he<j){if(S.match_start=K,ge<=(he=j))break;be=Ee[X+he-1],Ce=Ee[X+he]}}while((K=Se[K&_e])>le&&--L!=0);return he<=S.lookahead?he:S.lookahead}function we(S){var K,W,j,L,X,he,ge,le,Ee,_e,Se=S.w_size;do{if(L=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;j=S.head[--K],S.head[K]=Se<=j?j-Se:0,--W;);for(K=W=Se;j=S.prev[--K],S.prev[K]=Se<=j?j-Se:0,--W;);L+=Se}if(S.strm.avail_in===0)break;if(he=S.strm,ge=S.window,le=S.strstart+S.lookahead,Ee=L,_e=void 0,_e=he.avail_in,Ee<_e&&(_e=Ee),W=_e===0?0:(he.avail_in-=_e,c.arraySet(ge,he.input,he.next_in,_e,le),he.state.wrap===1?he.adler=h(he.adler,ge,_e,le):he.state.wrap===2&&(he.adler=p(he.adler,ge,_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,j;;){if(S.lookahead<ie){if(we(S),S.lookahead<ie&&K===b)return w;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(j=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 j=f._tr_tally(S,0,S.window[S.strstart]),S.lookahead--,S.strstart++;if(j&&(U(S,!1),S.strm.avail_out===0))return w}return S.insert=S.strstart<F-1?S.strstart:F-1,K===v?(U(S,!0),S.strm.avail_out===0?Z:Q):S.last_lit&&(U(S,!1),S.strm.avail_out===0)?w:V}function ke(S,K){for(var W,j,L;;){if(S.lookahead<ie){if(we(S),S.lookahead<ie&&K===b)return w;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(L=S.strstart+S.lookahead-F,j=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<=L&&(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++,j&&(U(S,!1),S.strm.avail_out===0))return w}else if(S.match_available){if((j=f._tr_tally(S,0,S.window[S.strstart-1]))&&U(S,!1),S.strstart++,S.lookahead--,S.strm.avail_out===0)return w}else S.match_available=1,S.strstart++,S.lookahead--}return S.match_available&&(j=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?(U(S,!0),S.strm.avail_out===0?Z:Q):S.last_lit&&(U(S,!1),S.strm.avail_out===0)?w:V}function Ae(S,K,W,j,L){this.good_length=S,this.max_lazy=K,this.nice_length=W,this.max_chain=j,this.func=L}function Pe(){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*B),this.dyn_dtree=new c.Buf16(2*(2*H+1)),this.bl_tree=new c.Buf16(2*(2*D+1)),I(this.dyn_ltree),I(this.dyn_dtree),I(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*P+1),I(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new c.Buf16(2*P+1),I(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?M:re,S.adler=K.wrap===2?0:1,K.last_flush=b,f._tr_init(K),y):se(S,C)}function ze(S){var K=ve(S);return K===y&&(function(W){W.window_size=2*W.w_size,I(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,j,L,X){if(!S)return C;var he=1;if(K===E&&(K=6),j<0?(he=0,j=-j):15<j&&(he=2,j-=16),L<1||k<L||W!==A||j<8||15<j||K<0||9<K||X<0||T<X)return se(S,C);j===8&&(j=9);var ge=new Pe;return(S.state=ge).strm=S,ge.wrap=he,ge.gzhead=null,ge.w_bits=j,ge.w_size=1<<ge.w_bits,ge.w_mask=ge.w_size-1,ge.hash_bits=L+7,ge.hash_size=1<<ge.hash_bits,ge.hash_mask=ge.hash_size-1,ge.hash_shift=~~((ge.hash_bits+F-1)/F),ge.window=new c.Buf8(2*ge.w_size),ge.head=new c.Buf16(ge.hash_size),ge.prev=new c.Buf16(ge.w_size),ge.lit_bufsize=1<<L+6,ge.pending_buf_size=4*ge.lit_bufsize,ge.pending_buf=new c.Buf8(ge.pending_buf_size),ge.d_buf=1*ge.lit_bufsize,ge.l_buf=3*ge.lit_bufsize,ge.level=K,ge.strategy=X,ge.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===b)return w;if(S.lookahead===0)break}S.strstart+=S.lookahead,S.lookahead=0;var j=S.block_start+W;if((S.strstart===0||S.strstart>=j)&&(S.lookahead=S.strstart-j,S.strstart=j,U(S,!1),S.strm.avail_out===0)||S.strstart-S.block_start>=S.w_size-ie&&(U(S,!1),S.strm.avail_out===0))return w}return S.insert=0,K===v?(U(S,!0),S.strm.avail_out===0?Z:Q):(S.strstart>S.block_start&&(U(S,!1),S.strm.avail_out),w)}),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?C:(S.state.gzhead=K,y):C},u.deflate=function(S,K){var W,j,L,X;if(!S||!S.state||5<K||K<0)return S?se(S,C):C;if(j=S.state,!S.output||!S.input&&S.avail_in!==0||j.status===666&&K!==v)return se(S,S.avail_out===0?-5:C);if(j.strm=S,W=j.last_flush,j.last_flush=K,j.status===M)if(j.wrap===2)S.adler=0,O(j,31),O(j,139),O(j,8),j.gzhead?(O(j,(j.gzhead.text?1:0)+(j.gzhead.hcrc?2:0)+(j.gzhead.extra?4:0)+(j.gzhead.name?8:0)+(j.gzhead.comment?16:0)),O(j,255&j.gzhead.time),O(j,j.gzhead.time>>8&255),O(j,j.gzhead.time>>16&255),O(j,j.gzhead.time>>24&255),O(j,j.level===9?2:2<=j.strategy||j.level<2?4:0),O(j,255&j.gzhead.os),j.gzhead.extra&&j.gzhead.extra.length&&(O(j,255&j.gzhead.extra.length),O(j,j.gzhead.extra.length>>8&255)),j.gzhead.hcrc&&(S.adler=p(S.adler,j.pending_buf,j.pending,0)),j.gzindex=0,j.status=69):(O(j,0),O(j,0),O(j,0),O(j,0),O(j,0),O(j,j.level===9?2:2<=j.strategy||j.level<2?4:0),O(j,3),j.status=re);else{var he=A+(j.w_bits-8<<4)<<8;he|=(2<=j.strategy||j.level<2?0:j.level<6?1:j.level===6?2:3)<<6,j.strstart!==0&&(he|=32),he+=31-he%31,j.status=re,ne(j,he),j.strstart!==0&&(ne(j,S.adler>>>16),ne(j,65535&S.adler)),S.adler=1}if(j.status===69)if(j.gzhead.extra){for(L=j.pending;j.gzindex<(65535&j.gzhead.extra.length)&&(j.pending!==j.pending_buf_size||(j.gzhead.hcrc&&j.pending>L&&(S.adler=p(S.adler,j.pending_buf,j.pending-L,L)),N(S),L=j.pending,j.pending!==j.pending_buf_size));)O(j,255&j.gzhead.extra[j.gzindex]),j.gzindex++;j.gzhead.hcrc&&j.pending>L&&(S.adler=p(S.adler,j.pending_buf,j.pending-L,L)),j.gzindex===j.gzhead.extra.length&&(j.gzindex=0,j.status=73)}else j.status=73;if(j.status===73)if(j.gzhead.name){L=j.pending;do{if(j.pending===j.pending_buf_size&&(j.gzhead.hcrc&&j.pending>L&&(S.adler=p(S.adler,j.pending_buf,j.pending-L,L)),N(S),L=j.pending,j.pending===j.pending_buf_size)){X=1;break}X=j.gzindex<j.gzhead.name.length?255&j.gzhead.name.charCodeAt(j.gzindex++):0,O(j,X)}while(X!==0);j.gzhead.hcrc&&j.pending>L&&(S.adler=p(S.adler,j.pending_buf,j.pending-L,L)),X===0&&(j.gzindex=0,j.status=91)}else j.status=91;if(j.status===91)if(j.gzhead.comment){L=j.pending;do{if(j.pending===j.pending_buf_size&&(j.gzhead.hcrc&&j.pending>L&&(S.adler=p(S.adler,j.pending_buf,j.pending-L,L)),N(S),L=j.pending,j.pending===j.pending_buf_size)){X=1;break}X=j.gzindex<j.gzhead.comment.length?255&j.gzhead.comment.charCodeAt(j.gzindex++):0,O(j,X)}while(X!==0);j.gzhead.hcrc&&j.pending>L&&(S.adler=p(S.adler,j.pending_buf,j.pending-L,L)),X===0&&(j.status=103)}else j.status=103;if(j.status===103&&(j.gzhead.hcrc?(j.pending+2>j.pending_buf_size&&N(S),j.pending+2<=j.pending_buf_size&&(O(j,255&S.adler),O(j,S.adler>>8&255),S.adler=0,j.status=re)):j.status=re),j.pending!==0){if(N(S),S.avail_out===0)return j.last_flush=-1,y}else if(S.avail_in===0&&de(K)<=de(W)&&K!==v)return se(S,-5);if(j.status===666&&S.avail_in!==0)return se(S,-5);if(S.avail_in!==0||j.lookahead!==0||K!==b&&j.status!==666){var ge=j.strategy===2?(function(le,Ee){for(var _e;;){if(le.lookahead===0&&(we(le),le.lookahead===0)){if(Ee===b)return w;break}if(le.match_length=0,_e=f._tr_tally(le,0,le.window[le.strstart]),le.lookahead--,le.strstart++,_e&&(U(le,!1),le.strm.avail_out===0))return w}return le.insert=0,Ee===v?(U(le,!0),le.strm.avail_out===0?Z:Q):le.last_lit&&(U(le,!1),le.strm.avail_out===0)?w:V})(j,K):j.strategy===3?(function(le,Ee){for(var _e,Se,te,be,Ce=le.window;;){if(le.lookahead<=$){if(we(le),le.lookahead<=$&&Ee===b)return w;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&&(U(le,!1),le.strm.avail_out===0))return w}return le.insert=0,Ee===v?(U(le,!0),le.strm.avail_out===0?Z:Q):le.last_lit&&(U(le,!1),le.strm.avail_out===0)?w:V})(j,K):s[j.level].func(j,K);if(ge!==Z&&ge!==Q||(j.status=666),ge===w||ge===Z)return S.avail_out===0&&(j.last_flush=-1),y;if(ge===V&&(K===1?f._tr_align(j):K!==5&&(f._tr_stored_block(j,0,0,!1),K===3&&(I(j.head),j.lookahead===0&&(j.strstart=0,j.block_start=0,j.insert=0))),N(S),S.avail_out===0))return j.last_flush=-1,y}return K!==v?y:j.wrap<=0?1:(j.wrap===2?(O(j,255&S.adler),O(j,S.adler>>8&255),O(j,S.adler>>16&255),O(j,S.adler>>24&255),O(j,255&S.total_in),O(j,S.total_in>>8&255),O(j,S.total_in>>16&255),O(j,S.total_in>>24&255)):(ne(j,S.adler>>>16),ne(j,65535&S.adler)),N(S),0<j.wrap&&(j.wrap=-j.wrap),j.pending!==0?y:1)},u.deflateEnd=function(S){var K;return S&&S.state?(K=S.state.status)!==M&&K!==69&&K!==73&&K!==91&&K!==103&&K!==re&&K!==666?se(S,C):(S.state=null,K===re?se(S,-3):y):C},u.deflateSetDictionary=function(S,K){var W,j,L,X,he,ge,le,Ee,_e=K.length;if(!S||!S.state||(X=(W=S.state).wrap)===2||X===1&&W.status!==M||W.lookahead)return C;for(X===1&&(S.adler=h(S.adler,K,_e,0)),W.wrap=0,_e>=W.w_size&&(X===0&&(I(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,ge=S.next_in,le=S.input,S.avail_in=_e,S.next_in=0,S.input=K,we(W);W.lookahead>=F;){for(j=W.strstart,L=W.lookahead-(F-1);W.ins_h=(W.ins_h<<W.hash_shift^W.window[j+F-1])&W.hash_mask,W.prev[j&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=j,j++,--L;);W.strstart=j,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=ge,S.input=le,S.avail_in=he,W.wrap=X,y},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,p,g,b,v,y,C,E,T,_,A,k,P,H,D,B,Y,F,$,ie,M,re,w,V;f=s.state,h=s.next_in,w=s.input,p=h+(s.avail_in-5),g=s.next_out,V=s.output,b=g-(c-s.avail_out),v=g+(s.avail_out-257),y=f.dmax,C=f.wsize,E=f.whave,T=f.wnext,_=f.window,A=f.hold,k=f.bits,P=f.lencode,H=f.distcode,D=(1<<f.lenbits)-1,B=(1<<f.distbits)-1;e:do{k<15&&(A+=w[h++]<<k,k+=8,A+=w[h++]<<k,k+=8),Y=P[A&D];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=P[(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+=w[h++]<<k,k+=8),$+=A&(1<<F)-1,A>>>=F,k-=F),k<15&&(A+=w[h++]<<k,k+=8,A+=w[h++]<<k,k+=8),Y=H[A&B];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+=w[h++]<<k,(k+=8)<F&&(A+=w[h++]<<k,k+=8)),y<(ie+=A&(1<<F)-1)){s.msg="invalid distance too far back",f.mode=30;break e}if(A>>>=F,k-=F,(F=g-b)<ie){if(E<(F=ie-F)&&f.sane){s.msg="invalid distance too far back",f.mode=30;break e}if(re=_,(M=0)===T){if(M+=C-F,F<$){for($-=F;V[g++]=_[M++],--F;);M=g-ie,re=V}}else if(T<F){if(M+=C+T-F,(F-=T)<$){for($-=F;V[g++]=_[M++],--F;);if(M=0,T<$){for($-=F=T;V[g++]=_[M++],--F;);M=g-ie,re=V}}}else if(M+=T-F,F<$){for($-=F;V[g++]=_[M++],--F;);M=g-ie,re=V}for(;2<$;)V[g++]=re[M++],V[g++]=re[M++],V[g++]=re[M++],$-=3;$&&(V[g++]=re[M++],1<$&&(V[g++]=re[M++]))}else{for(M=g-ie;V[g++]=V[M++],V[g++]=V[M++],V[g++]=V[M++],2<($-=3););$&&(V[g++]=V[M++],1<$&&(V[g++]=V[M++]))}break}}break}}while(h<p&&g<v);h-=$=k>>3,A&=(1<<(k-=$<<3))-1,s.next_in=h,s.next_out=g,s.avail_in=h<p?p-h+5:5-(h-p),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"),h=i("./inffast"),p=i("./inftrees"),g=1,b=2,v=0,y=-2,C=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 k(M){var re;return M&&M.state?(re=M.state,M.total_in=M.total_out=re.total=0,M.msg="",re.wrap&&(M.adler=1&re.wrap),re.mode=C,re.last=0,re.havedict=0,re.dmax=32768,re.head=null,re.hold=0,re.bits=0,re.lencode=re.lendyn=new s.Buf32(E),re.distcode=re.distdyn=new s.Buf32(T),re.sane=1,re.back=-1,v):y}function P(M){var re;return M&&M.state?((re=M.state).wsize=0,re.whave=0,re.wnext=0,k(M)):y}function H(M,re){var w,V;return M&&M.state?(V=M.state,re<0?(w=0,re=-re):(w=1+(re>>4),re<48&&(re&=15)),re&&(re<8||15<re)?y:(V.window!==null&&V.wbits!==re&&(V.window=null),V.wrap=w,V.wbits=re,P(M))):y}function D(M,re){var w,V;return M?(V=new A,(M.state=V).window=null,(w=H(M,re))!==v&&(M.state=null),w):y}var B,Y,F=!0;function $(M){if(F){var re;for(B=new s.Buf32(512),Y=new s.Buf32(32),re=0;re<144;)M.lens[re++]=8;for(;re<256;)M.lens[re++]=9;for(;re<280;)M.lens[re++]=7;for(;re<288;)M.lens[re++]=8;for(p(g,M.lens,0,288,B,0,M.work,{bits:9}),re=0;re<32;)M.lens[re++]=5;p(b,M.lens,0,32,Y,0,M.work,{bits:5}),F=!1}M.lencode=B,M.lenbits=9,M.distcode=Y,M.distbits=5}function ie(M,re,w,V){var Z,Q=M.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,re,w-Q.wsize,Q.wsize,0),Q.wnext=0,Q.whave=Q.wsize):(V<(Z=Q.wsize-Q.wnext)&&(Z=V),s.arraySet(Q.window,re,w-V,Z,Q.wnext),(V-=Z)?(s.arraySet(Q.window,re,w-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=P,u.inflateReset2=H,u.inflateResetKeep=k,u.inflateInit=function(M){return D(M,15)},u.inflateInit2=D,u.inflate=function(M,re){var w,V,Z,Q,se,de,I,N,U,O,ne,ce,we,Te,ke,Ae,Pe,ve,ze,je,S,K,W,j,L=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(!M||!M.state||!M.output||!M.input&&M.avail_in!==0)return y;(w=M.state).mode===12&&(w.mode=13),se=M.next_out,Z=M.output,I=M.avail_out,Q=M.next_in,V=M.input,de=M.avail_in,N=w.hold,U=w.bits,O=de,ne=I,K=v;e:for(;;)switch(w.mode){case C:if(w.wrap===0){w.mode=13;break}for(;U<16;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if(2&w.wrap&&N===35615){X[w.check=0]=255&N,X[1]=N>>>8&255,w.check=f(w.check,X,2,0),U=N=0,w.mode=2;break}if(w.flags=0,w.head&&(w.head.done=!1),!(1&w.wrap)||(((255&N)<<8)+(N>>8))%31){M.msg="incorrect header check",w.mode=30;break}if((15&N)!=8){M.msg="unknown compression method",w.mode=30;break}if(U-=4,S=8+(15&(N>>>=4)),w.wbits===0)w.wbits=S;else if(S>w.wbits){M.msg="invalid window size",w.mode=30;break}w.dmax=1<<S,M.adler=w.check=1,w.mode=512&N?10:12,U=N=0;break;case 2:for(;U<16;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if(w.flags=N,(255&w.flags)!=8){M.msg="unknown compression method",w.mode=30;break}if(57344&w.flags){M.msg="unknown header flags set",w.mode=30;break}w.head&&(w.head.text=N>>8&1),512&w.flags&&(X[0]=255&N,X[1]=N>>>8&255,w.check=f(w.check,X,2,0)),U=N=0,w.mode=3;case 3:for(;U<32;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}w.head&&(w.head.time=N),512&w.flags&&(X[0]=255&N,X[1]=N>>>8&255,X[2]=N>>>16&255,X[3]=N>>>24&255,w.check=f(w.check,X,4,0)),U=N=0,w.mode=4;case 4:for(;U<16;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}w.head&&(w.head.xflags=255&N,w.head.os=N>>8),512&w.flags&&(X[0]=255&N,X[1]=N>>>8&255,w.check=f(w.check,X,2,0)),U=N=0,w.mode=5;case 5:if(1024&w.flags){for(;U<16;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}w.length=N,w.head&&(w.head.extra_len=N),512&w.flags&&(X[0]=255&N,X[1]=N>>>8&255,w.check=f(w.check,X,2,0)),U=N=0}else w.head&&(w.head.extra=null);w.mode=6;case 6:if(1024&w.flags&&(de<(ce=w.length)&&(ce=de),ce&&(w.head&&(S=w.head.extra_len-w.length,w.head.extra||(w.head.extra=new Array(w.head.extra_len)),s.arraySet(w.head.extra,V,Q,ce,S)),512&w.flags&&(w.check=f(w.check,V,ce,Q)),de-=ce,Q+=ce,w.length-=ce),w.length))break e;w.length=0,w.mode=7;case 7:if(2048&w.flags){if(de===0)break e;for(ce=0;S=V[Q+ce++],w.head&&S&&w.length<65536&&(w.head.name+=String.fromCharCode(S)),S&&ce<de;);if(512&w.flags&&(w.check=f(w.check,V,ce,Q)),de-=ce,Q+=ce,S)break e}else w.head&&(w.head.name=null);w.length=0,w.mode=8;case 8:if(4096&w.flags){if(de===0)break e;for(ce=0;S=V[Q+ce++],w.head&&S&&w.length<65536&&(w.head.comment+=String.fromCharCode(S)),S&&ce<de;);if(512&w.flags&&(w.check=f(w.check,V,ce,Q)),de-=ce,Q+=ce,S)break e}else w.head&&(w.head.comment=null);w.mode=9;case 9:if(512&w.flags){for(;U<16;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if(N!==(65535&w.check)){M.msg="header crc mismatch",w.mode=30;break}U=N=0}w.head&&(w.head.hcrc=w.flags>>9&1,w.head.done=!0),M.adler=w.check=0,w.mode=12;break;case 10:for(;U<32;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}M.adler=w.check=_(N),U=N=0,w.mode=11;case 11:if(w.havedict===0)return M.next_out=se,M.avail_out=I,M.next_in=Q,M.avail_in=de,w.hold=N,w.bits=U,2;M.adler=w.check=1,w.mode=12;case 12:if(re===5||re===6)break e;case 13:if(w.last){N>>>=7&U,U-=7&U,w.mode=27;break}for(;U<3;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}switch(w.last=1&N,U-=1,3&(N>>>=1)){case 0:w.mode=14;break;case 1:if($(w),w.mode=20,re!==6)break;N>>>=2,U-=2;break e;case 2:w.mode=17;break;case 3:M.msg="invalid block type",w.mode=30}N>>>=2,U-=2;break;case 14:for(N>>>=7&U,U-=7&U;U<32;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if((65535&N)!=(N>>>16^65535)){M.msg="invalid stored block lengths",w.mode=30;break}if(w.length=65535&N,U=N=0,w.mode=15,re===6)break e;case 15:w.mode=16;case 16:if(ce=w.length){if(de<ce&&(ce=de),I<ce&&(ce=I),ce===0)break e;s.arraySet(Z,V,Q,ce,se),de-=ce,Q+=ce,I-=ce,se+=ce,w.length-=ce;break}w.mode=12;break;case 17:for(;U<14;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if(w.nlen=257+(31&N),N>>>=5,U-=5,w.ndist=1+(31&N),N>>>=5,U-=5,w.ncode=4+(15&N),N>>>=4,U-=4,286<w.nlen||30<w.ndist){M.msg="too many length or distance symbols",w.mode=30;break}w.have=0,w.mode=18;case 18:for(;w.have<w.ncode;){for(;U<3;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}w.lens[he[w.have++]]=7&N,N>>>=3,U-=3}for(;w.have<19;)w.lens[he[w.have++]]=0;if(w.lencode=w.lendyn,w.lenbits=7,W={bits:w.lenbits},K=p(0,w.lens,0,19,w.lencode,0,w.work,W),w.lenbits=W.bits,K){M.msg="invalid code lengths set",w.mode=30;break}w.have=0,w.mode=19;case 19:for(;w.have<w.nlen+w.ndist;){for(;Ae=(L=w.lencode[N&(1<<w.lenbits)-1])>>>16&255,Pe=65535&L,!((ke=L>>>24)<=U);){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if(Pe<16)N>>>=ke,U-=ke,w.lens[w.have++]=Pe;else{if(Pe===16){for(j=ke+2;U<j;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if(N>>>=ke,U-=ke,w.have===0){M.msg="invalid bit length repeat",w.mode=30;break}S=w.lens[w.have-1],ce=3+(3&N),N>>>=2,U-=2}else if(Pe===17){for(j=ke+3;U<j;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}U-=ke,S=0,ce=3+(7&(N>>>=ke)),N>>>=3,U-=3}else{for(j=ke+7;U<j;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}U-=ke,S=0,ce=11+(127&(N>>>=ke)),N>>>=7,U-=7}if(w.have+ce>w.nlen+w.ndist){M.msg="invalid bit length repeat",w.mode=30;break}for(;ce--;)w.lens[w.have++]=S}}if(w.mode===30)break;if(w.lens[256]===0){M.msg="invalid code -- missing end-of-block",w.mode=30;break}if(w.lenbits=9,W={bits:w.lenbits},K=p(g,w.lens,0,w.nlen,w.lencode,0,w.work,W),w.lenbits=W.bits,K){M.msg="invalid literal/lengths set",w.mode=30;break}if(w.distbits=6,w.distcode=w.distdyn,W={bits:w.distbits},K=p(b,w.lens,w.nlen,w.ndist,w.distcode,0,w.work,W),w.distbits=W.bits,K){M.msg="invalid distances set",w.mode=30;break}if(w.mode=20,re===6)break e;case 20:w.mode=21;case 21:if(6<=de&&258<=I){M.next_out=se,M.avail_out=I,M.next_in=Q,M.avail_in=de,w.hold=N,w.bits=U,h(M,ne),se=M.next_out,Z=M.output,I=M.avail_out,Q=M.next_in,V=M.input,de=M.avail_in,N=w.hold,U=w.bits,w.mode===12&&(w.back=-1);break}for(w.back=0;Ae=(L=w.lencode[N&(1<<w.lenbits)-1])>>>16&255,Pe=65535&L,!((ke=L>>>24)<=U);){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if(Ae&&(240&Ae)==0){for(ve=ke,ze=Ae,je=Pe;Ae=(L=w.lencode[je+((N&(1<<ve+ze)-1)>>ve)])>>>16&255,Pe=65535&L,!(ve+(ke=L>>>24)<=U);){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}N>>>=ve,U-=ve,w.back+=ve}if(N>>>=ke,U-=ke,w.back+=ke,w.length=Pe,Ae===0){w.mode=26;break}if(32&Ae){w.back=-1,w.mode=12;break}if(64&Ae){M.msg="invalid literal/length code",w.mode=30;break}w.extra=15&Ae,w.mode=22;case 22:if(w.extra){for(j=w.extra;U<j;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}w.length+=N&(1<<w.extra)-1,N>>>=w.extra,U-=w.extra,w.back+=w.extra}w.was=w.length,w.mode=23;case 23:for(;Ae=(L=w.distcode[N&(1<<w.distbits)-1])>>>16&255,Pe=65535&L,!((ke=L>>>24)<=U);){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if((240&Ae)==0){for(ve=ke,ze=Ae,je=Pe;Ae=(L=w.distcode[je+((N&(1<<ve+ze)-1)>>ve)])>>>16&255,Pe=65535&L,!(ve+(ke=L>>>24)<=U);){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}N>>>=ve,U-=ve,w.back+=ve}if(N>>>=ke,U-=ke,w.back+=ke,64&Ae){M.msg="invalid distance code",w.mode=30;break}w.offset=Pe,w.extra=15&Ae,w.mode=24;case 24:if(w.extra){for(j=w.extra;U<j;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}w.offset+=N&(1<<w.extra)-1,N>>>=w.extra,U-=w.extra,w.back+=w.extra}if(w.offset>w.dmax){M.msg="invalid distance too far back",w.mode=30;break}w.mode=25;case 25:if(I===0)break e;if(ce=ne-I,w.offset>ce){if((ce=w.offset-ce)>w.whave&&w.sane){M.msg="invalid distance too far back",w.mode=30;break}we=ce>w.wnext?(ce-=w.wnext,w.wsize-ce):w.wnext-ce,ce>w.length&&(ce=w.length),Te=w.window}else Te=Z,we=se-w.offset,ce=w.length;for(I<ce&&(ce=I),I-=ce,w.length-=ce;Z[se++]=Te[we++],--ce;);w.length===0&&(w.mode=21);break;case 26:if(I===0)break e;Z[se++]=w.length,I--,w.mode=21;break;case 27:if(w.wrap){for(;U<32;){if(de===0)break e;de--,N|=V[Q++]<<U,U+=8}if(ne-=I,M.total_out+=ne,w.total+=ne,ne&&(M.adler=w.check=w.flags?f(w.check,Z,ne,se-ne):c(w.check,Z,ne,se-ne)),ne=I,(w.flags?N:_(N))!==w.check){M.msg="incorrect data check",w.mode=30;break}U=N=0}w.mode=28;case 28:if(w.wrap&&w.flags){for(;U<32;){if(de===0)break e;de--,N+=V[Q++]<<U,U+=8}if(N!==(4294967295&w.total)){M.msg="incorrect length check",w.mode=30;break}U=N=0}w.mode=29;case 29:K=1;break e;case 30:K=-3;break e;case 31:return-4;case 32:default:return y}return M.next_out=se,M.avail_out=I,M.next_in=Q,M.avail_in=de,w.hold=N,w.bits=U,(w.wsize||ne!==M.avail_out&&w.mode<30&&(w.mode<27||re!==4))&&ie(M,M.output,M.next_out,ne-M.avail_out)?(w.mode=31,-4):(O-=M.avail_in,ne-=M.avail_out,M.total_in+=O,M.total_out+=ne,w.total+=ne,w.wrap&&ne&&(M.adler=w.check=w.flags?f(w.check,Z,ne,M.next_out-ne):c(w.check,Z,ne,M.next_out-ne)),M.data_type=w.bits+(w.last?64:0)+(w.mode===12?128:0)+(w.mode===20||w.mode===15?256:0),(O==0&&ne===0||re===4)&&K===v&&(K=-5),K)},u.inflateEnd=function(M){if(!M||!M.state)return y;var re=M.state;return re.window&&(re.window=null),M.state=null,v},u.inflateGetHeader=function(M,re){var w;return M&&M.state?(2&(w=M.state).wrap)==0?y:((w.head=re).done=!1,v):y},u.inflateSetDictionary=function(M,re){var w,V=re.length;return M&&M.state?(w=M.state).wrap!==0&&w.mode!==11?y:w.mode===11&&c(1,re,V,0)!==w.check?-3:ie(M,re,V,V)?(w.mode=31,-4):(w.havedict=1,v):y},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],p=[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,b,v,y,C,E,T,_){var A,k,P,H,D,B,Y,F,$,ie=_.bits,M=0,re=0,w=0,V=0,Z=0,Q=0,se=0,de=0,I=0,N=0,U=null,O=0,ne=new s.Buf16(16),ce=new s.Buf16(16),we=null,Te=0;for(M=0;M<=15;M++)ne[M]=0;for(re=0;re<y;re++)ne[b[v+re]]++;for(Z=ie,V=15;1<=V&&ne[V]===0;V--);if(V<Z&&(Z=V),V===0)return C[E++]=20971520,C[E++]=20971520,_.bits=1,0;for(w=1;w<V&&ne[w]===0;w++);for(Z<w&&(Z=w),M=de=1;M<=15;M++)if(de<<=1,(de-=ne[M])<0)return-1;if(0<de&&(g===0||V!==1))return-1;for(ce[1]=0,M=1;M<15;M++)ce[M+1]=ce[M]+ne[M];for(re=0;re<y;re++)b[v+re]!==0&&(T[ce[b[v+re]]++]=re);if(B=g===0?(U=we=T,19):g===1?(U=c,O-=257,we=f,Te-=257,256):(U=h,we=p,-1),M=w,D=E,se=re=N=0,P=-1,H=(I=1<<(Q=Z))-1,g===1&&852<I||g===2&&592<I)return 1;for(;;){for(Y=M-se,$=T[re]<B?(F=0,T[re]):T[re]>B?(F=we[Te+T[re]],U[O+T[re]]):(F=96,0),A=1<<M-se,w=k=1<<Q;C[D+(N>>se)+(k-=A)]=Y<<24|F<<16|$|0,k!==0;);for(A=1<<M-1;N&A;)A>>=1;if(A!==0?(N&=A-1,N+=A):N=0,re++,--ne[M]==0){if(M===V)break;M=b[v+T[re]]}if(Z<M&&(N&H)!==P){for(se===0&&(se=Z),D+=w,de=1<<(Q=M-se);Q+se<V&&!((de-=ne[Q+se])<=0);)Q++,de<<=1;if(I+=1<<Q,g===1&&852<I||g===2&&592<I)return 1;C[P=N&H]=Z<<24|Q<<16|D-E|0}}return N!==0&&(C[D+N]=M-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 h(L){for(var X=L.length;0<=--X;)L[X]=0}var p=0,g=29,b=256,v=b+1+g,y=30,C=19,E=2*v+1,T=15,_=16,A=7,k=256,P=16,H=17,D=18,B=[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));h(ie);var M=new Array(2*y);h(M);var re=new Array(512);h(re);var w=new Array(256);h(w);var V=new Array(g);h(V);var Z,Q,se,de=new Array(y);function I(L,X,he,ge,le){this.static_tree=L,this.extra_bits=X,this.extra_base=he,this.elems=ge,this.max_length=le,this.has_stree=L&&L.length}function N(L,X){this.dyn_tree=L,this.max_code=0,this.stat_desc=X}function U(L){return L<256?re[L]:re[256+(L>>>7)]}function O(L,X){L.pending_buf[L.pending++]=255&X,L.pending_buf[L.pending++]=X>>>8&255}function ne(L,X,he){L.bi_valid>_-he?(L.bi_buf|=X<<L.bi_valid&65535,O(L,L.bi_buf),L.bi_buf=X>>_-L.bi_valid,L.bi_valid+=he-_):(L.bi_buf|=X<<L.bi_valid&65535,L.bi_valid+=he)}function ce(L,X,he){ne(L,he[2*X],he[2*X+1])}function we(L,X){for(var he=0;he|=1&L,L>>>=1,he<<=1,0<--X;);return he>>>1}function Te(L,X,he){var ge,le,Ee=new Array(T+1),_e=0;for(ge=1;ge<=T;ge++)Ee[ge]=_e=_e+he[ge-1]<<1;for(le=0;le<=X;le++){var Se=L[2*le+1];Se!==0&&(L[2*le]=we(Ee[Se]++,Se))}}function ke(L){var X;for(X=0;X<v;X++)L.dyn_ltree[2*X]=0;for(X=0;X<y;X++)L.dyn_dtree[2*X]=0;for(X=0;X<C;X++)L.bl_tree[2*X]=0;L.dyn_ltree[2*k]=1,L.opt_len=L.static_len=0,L.last_lit=L.matches=0}function Ae(L){8<L.bi_valid?O(L,L.bi_buf):0<L.bi_valid&&(L.pending_buf[L.pending++]=L.bi_buf),L.bi_buf=0,L.bi_valid=0}function Pe(L,X,he,ge){var le=2*X,Ee=2*he;return L[le]<L[Ee]||L[le]===L[Ee]&&ge[X]<=ge[he]}function ve(L,X,he){for(var ge=L.heap[he],le=he<<1;le<=L.heap_len&&(le<L.heap_len&&Pe(X,L.heap[le+1],L.heap[le],L.depth)&&le++,!Pe(X,ge,L.heap[le],L.depth));)L.heap[he]=L.heap[le],he=le,le<<=1;L.heap[he]=ge}function ze(L,X,he){var ge,le,Ee,_e,Se=0;if(L.last_lit!==0)for(;ge=L.pending_buf[L.d_buf+2*Se]<<8|L.pending_buf[L.d_buf+2*Se+1],le=L.pending_buf[L.l_buf+Se],Se++,ge===0?ce(L,le,X):(ce(L,(Ee=w[le])+b+1,X),(_e=B[Ee])!==0&&ne(L,le-=V[Ee],_e),ce(L,Ee=U(--ge),he),(_e=Y[Ee])!==0&&ne(L,ge-=de[Ee],_e)),Se<L.last_lit;);ce(L,k,X)}function je(L,X){var he,ge,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(L.heap_len=0,L.heap_max=E,he=0;he<te;he++)Ee[2*he]!==0?(L.heap[++L.heap_len]=be=he,L.depth[he]=0):Ee[2*he+1]=0;for(;L.heap_len<2;)Ee[2*(le=L.heap[++L.heap_len]=be<2?++be:0)]=1,L.depth[le]=0,L.opt_len--,Se&&(L.static_len-=_e[2*le+1]);for(X.max_code=be,he=L.heap_len>>1;1<=he;he--)ve(L,Ee,he);for(le=te;he=L.heap[1],L.heap[1]=L.heap[L.heap_len--],ve(L,Ee,1),ge=L.heap[1],L.heap[--L.heap_max]=he,L.heap[--L.heap_max]=ge,Ee[2*le]=Ee[2*he]+Ee[2*ge],L.depth[le]=(L.depth[he]>=L.depth[ge]?L.depth[he]:L.depth[ge])+1,Ee[2*he+1]=Ee[2*ge+1]=le,L.heap[1]=le++,ve(L,Ee,1),2<=L.heap_len;);L.heap[--L.heap_max]=L.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--)}})(L,X),Te(Ee,be,L.bl_count)}function S(L,X,he){var ge,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,ge=0;ge<=he;ge++)le=_e,_e=X[2*(ge+1)+1],++Se<te&&le===_e||(Se<be?L.bl_tree[2*le]+=Se:le!==0?(le!==Ee&&L.bl_tree[2*le]++,L.bl_tree[2*P]++):Se<=10?L.bl_tree[2*H]++:L.bl_tree[2*D]++,Ee=le,be=(Se=0)===_e?(te=138,3):le===_e?(te=6,3):(te=7,4))}function K(L,X,he){var ge,le,Ee=-1,_e=X[1],Se=0,te=7,be=4;for(_e===0&&(te=138,be=3),ge=0;ge<=he;ge++)if(le=_e,_e=X[2*(ge+1)+1],!(++Se<te&&le===_e)){if(Se<be)for(;ce(L,le,L.bl_tree),--Se!=0;);else le!==0?(le!==Ee&&(ce(L,le,L.bl_tree),Se--),ce(L,P,L.bl_tree),ne(L,Se-3,2)):Se<=10?(ce(L,H,L.bl_tree),ne(L,Se-3,3)):(ce(L,D,L.bl_tree),ne(L,Se-11,7));Ee=le,be=(Se=0)===_e?(te=138,3):le===_e?(te=6,3):(te=7,4)}}h(de);var W=!1;function j(L,X,he,ge){ne(L,(p<<1)+(ge?1:0),3),(function(le,Ee,_e,Se){Ae(le),O(le,_e),O(le,~_e),s.arraySet(le.pending_buf,le.window,Ee,_e,le.pending),le.pending+=_e})(L,X,he)}u._tr_init=function(L){W||((function(){var X,he,ge,le,Ee,_e=new Array(T+1);for(le=ge=0;le<g-1;le++)for(V[le]=ge,X=0;X<1<<B[le];X++)w[ge++]=le;for(w[ge-1]=le,le=Ee=0;le<16;le++)for(de[le]=Ee,X=0;X<1<<Y[le];X++)re[Ee++]=le;for(Ee>>=7;le<y;le++)for(de[le]=Ee<<7,X=0;X<1<<Y[le]-7;X++)re[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<y;X++)M[2*X+1]=5,M[2*X]=we(X,5);Z=new I(ie,B,b+1,v,T),Q=new I(M,Y,0,y,T),se=new I(new Array(0),F,0,C,A)})(),W=!0),L.l_desc=new N(L.dyn_ltree,Z),L.d_desc=new N(L.dyn_dtree,Q),L.bl_desc=new N(L.bl_tree,se),L.bi_buf=0,L.bi_valid=0,ke(L)},u._tr_stored_block=j,u._tr_flush_block=function(L,X,he,ge){var le,Ee,_e=0;0<L.level?(L.strm.data_type===2&&(L.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<b;te++)if(Se.dyn_ltree[2*te]!==0)return f;return c})(L)),je(L,L.l_desc),je(L,L.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=C-1;3<=te&&Se.bl_tree[2*$[te]+1]===0;te--);return Se.opt_len+=3*(te+1)+5+5+4,te})(L),le=L.opt_len+3+7>>>3,(Ee=L.static_len+3+7>>>3)<=le&&(le=Ee)):le=Ee=he+5,he+4<=le&&X!==-1?j(L,X,he,ge):L.strategy===4||Ee===le?(ne(L,2+(ge?1:0),3),ze(L,ie,M)):(ne(L,4+(ge?1:0),3),(function(Se,te,be,Ce){var Ie;for(ne(Se,te-257,5),ne(Se,be-1,5),ne(Se,Ce-4,4),Ie=0;Ie<Ce;Ie++)ne(Se,Se.bl_tree[2*$[Ie]+1],3);K(Se,Se.dyn_ltree,te-1),K(Se,Se.dyn_dtree,be-1)})(L,L.l_desc.max_code+1,L.d_desc.max_code+1,_e+1),ze(L,L.dyn_ltree,L.dyn_dtree)),ke(L),ge&&Ae(L)},u._tr_tally=function(L,X,he){return L.pending_buf[L.d_buf+2*L.last_lit]=X>>>8&255,L.pending_buf[L.d_buf+2*L.last_lit+1]=255&X,L.pending_buf[L.l_buf+L.last_lit]=255&he,L.last_lit++,X===0?L.dyn_ltree[2*he]++:(L.matches++,X--,L.dyn_ltree[2*(w[he]+b+1)]++,L.dyn_dtree[2*U(X)]++),L.last_lit===L.lit_bufsize-1},u._tr_align=function(L){ne(L,2,3),ce(L,k,ie),(function(X){X.bi_valid===16?(O(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)})(L)}},{"../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,p,g,b,v=1,y={},C=!1,E=c.document,T=Object.getPrototypeOf&&Object.getPrototypeOf(c);T=T&&T.setTimeout?T:c,h={}.toString.call(c.process)==="[object process]"?function(P){process.nextTick(function(){A(P)})}:(function(){if(c.postMessage&&!c.importScripts){var P=!0,H=c.onmessage;return c.onmessage=function(){P=!1},c.postMessage("","*"),c.onmessage=H,P}})()?(b="setImmediate$"+Math.random()+"$",c.addEventListener?c.addEventListener("message",k,!1):c.attachEvent("onmessage",k),function(P){c.postMessage(b+P,"*")}):c.MessageChannel?((g=new MessageChannel).port1.onmessage=function(P){A(P.data)},function(P){g.port2.postMessage(P)}):E&&"onreadystatechange"in E.createElement("script")?(p=E.documentElement,function(P){var H=E.createElement("script");H.onreadystatechange=function(){A(P),H.onreadystatechange=null,p.removeChild(H),H=null},p.appendChild(H)}):function(P){setTimeout(A,0,P)},T.setImmediate=function(P){typeof P!="function"&&(P=new Function(""+P));for(var H=new Array(arguments.length-1),D=0;D<H.length;D++)H[D]=arguments[D+1];var B={callback:P,args:H};return y[v]=B,h(v),v++},T.clearImmediate=_}function _(P){delete y[P]}function A(P){if(C)setTimeout(A,0,P);else{var H=y[P];if(H){C=!0;try{(function(D){var B=D.callback,Y=D.args;switch(Y.length){case 0:B();break;case 1:B(Y[0]);break;case 2:B(Y[0],Y[1]);break;case 3:B(Y[0],Y[1],Y[2]);break;default:B.apply(f,Y)}})(H)}finally{_(P),C=!1}}}}function k(P){P.source===c&&typeof P.data=="string"&&P.data.indexOf(b)===0&&A(+P.data.slice(b.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(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,p;if(this.shouldZipFiles()){const g=await this.zipFiles(),b=this.getUploadFileName();h=this.blobToFile(g,b),p="application/zip"}else h=this.pendingFiles?.[0],p=h.type;for(let g=0;g<f.length;g++){const b=f[g],v=await fetch(b,{method:"PUT",body:h,headers:{"Content-Type":p,"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:b}});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 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,h){this.connection=f||null,this.callbacks=h||null}handleFileUploadProcess({files:f,message:h,url:p}){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(p){const b=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:p,...b&&{text:b}}},this.fileManager?.clearPendingFilesState()}return g}sendSocketMessage({message:f,files:h,audio:p,url:g,tool_declined:b,tool_id:v,initial_prompts:y}){const C=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,...b&&{tool_declined:b},...v&&{tool_id:v},...y&&{initial_prompts:y}}}:p&&p?.audio&&p?.format&&(E={ev:n.SOCKET_EVENTS.STREAM,ct:n.SOCKET_CONTENT_TYPES.AUDIO,_id:Date.now().toString(),ts:Date.now(),data:{audio:p?.audio,format:p?.format}}),!E){const T=new u.MessageError("No message to send",{context:{stage:"sendSocketChatMessage"}});throw this.emitError(T),T}C.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(p=>{const g=this.toFileError(p,"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 p={data:{text:f.data.text},messageId:f._id,timestamp:f.ts};h.emit(i.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,p)}break;case n.SOCKET_CONTENT_TYPES.TOOL_CALL:if(f?.data?.tool_id&&f._id){const p={data:{...f.data},messageId:f._id,timestamp:f.ts};h.emit(i.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,p)}break;case n.SOCKET_CONTENT_TYPES.INLINE_TEXT:if(f?.data?.text){const p={data:{text:f.data.text},messageId:f._id,timestamp:f.ts};h.emit(i.SYNAPSE_REALTIME_EVENTS.INLINE_TEXT,p)}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 p={data:f?.data,messageId:f._id||Date.now().toString()};h.emit(i.SYNAPSE_REALTIME_EVENTS.TOOL_START,p);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 b=new u.MessageError(`Unsupported content type ${f?.ct}`,{context:{stage:"handleIncomingSocketStreamMessage",contentType:f.ct}});throw this.emitError(b),b}}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 p=new u.MessageError(f.msg||"Socket error received",{context:{stage:"handleIncomingSocketErrorMessage",errorCode:f.code}});h.emit(i.SYNAPSE_REALTIME_EVENTS.ERROR,p),this.emitError(p)}}sendSocketAuthMessage(f){const h=this.assertConnection("sendSocketAuthMessage"),p={ev:n.SOCKET_EVENTS.AUTH,_id:Date.now().toString(),ts:Date.now(),data:{token:f}};h.sendMessage(p)}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 p=new u.RecordingError("onChunks is required",{context:{stage:"startRecording"},hint:"onChunks is required"});throw this.emitError(p),p}this.assertConnection("startRecording"),this.audioManager||(this.audioManager=new o.AudioManager);try{await this.audioManager.start(f,p=>{const g=this.toRecordingError(p,"Failed to start audio recording",{stage:"startRecording"});h?.(g),this.emitError(g)})}catch(p){const g=this.toRecordingError(p,"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,p,g){return(0,u.normalizeError)(f,u.FileError,h,{context:p,hint:g})}toRecordingError(f,h,p,g){return(0,u.normalizeError)(f,u.RecordingError,h,{context:p,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=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 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 b=(0,l.getConfig)(this.config?.environment).BASE_API_URL;this.resourceManager=new i.ResourceManager({agentId:this.config.agentId,serverUrl:b})}async startSession(g){try{const b=await this.manageSession(g);return await this.initializeConnection(b),this.setupEventHandlers(),b}catch(b){const v=s.ErrorUtils.getUserFriendlyMessage(b),y=s.ErrorUtils.getErrorDetails(b),C=this.toSessionError(b,v||"Failed to start session",{stage:"startSession",details:y},"Check network connectivity or refresh credentials before retrying.");throw this.emitError(C),C}}async sendMessage({message:g,files:b,audio:v,tool_declined:y,tool_id:C,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:b,audio:v,...y&&{tool_declined:y},...C&&{tool_id:C},...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,b){this.connection?.on(g,b)}off(g,b){this.connection?.off(g,b)}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,b){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 y=await this.resourceManager.callTool(this.sessionConfig.session_id,g,b);if(y.err)throw new c.APIError(y.err.msg,500,y.err);return y}catch(y){if(y instanceof c.APIError&&y?.status===401)return await this.handleSessionExpiry(),await this.callTool(g,b);throw y}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:b}){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:b})}catch(y){throw y}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,b,v,y){return(0,c.normalizeError)(g,c.SessionError,b,{context:v,hint:y})}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 b=(0,l.getConfig)(this.config?.environment).WEBSOCKET_URL,v=(this.config.connectionType==="socket",n.ConnectionType.SOCKET);this.connection=await n.ConnectionFactory.createConnection(v,{serverUrl:b,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 b=await this.resourceManager.validateSession(g.session_id);return b.active?g:b.expired?this.refreshSession(g.session_id,g.session_token):this.createNewSession()}catch(b){if(b instanceof c.APIError){const v=b.status;if(v===404||v===500)return this.createNewSession()}throw this.toSessionError(b,"Failed to resolve session",{stage:"resolveSession"})}}async refreshSession(g,b){try{return await this.resourceManager.refreshSession(g,b)}catch(v){if(v instanceof c.APIError){this.emitError(v);const y=v.status;if(y===404||y===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 b=this.toConnectionError(g,"WebSocket connection error",{stage:"onSocketConnectionError"},"Verify network connectivity or attempt to reconnect.");this.emitError(b)}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 b=new c.MessageError("Unsupported message type",{context:{stage:"onIncomingSocketMessage",event:g.ev??"unknown"},hint:"Ensure the server is sending supported socket events."});this.emitError(b);return}}async handleSessionExpiry(){try{if(this.endSession(),!this.sessionConfig?.session_id||!this.sessionConfig?.session_token){const b=new c.SessionError("Session ID or token not found",{context:{stage:"handleSessionExpiry"}});throw this.emitError(b),b}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 b=this.toSessionError(g,"Session expired",{stage:"handleSessionExpiry"});this.emitError(b)}}toConnectionError(g,b,v,y){return(0,c.normalizeError)(g,c.ConnectionError,b,{context:v,hint:y})}}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,k){k===void 0&&(k=A);var P=Object.getOwnPropertyDescriptor(_,A);(!P||("get"in P?!_.__esModule:P.writable||P.configurable))&&(P={enumerable:!0,get:function(){return _[A]}}),Object.defineProperty(T,k,P)}):(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 h=Ah();Object.defineProperty(n,"Session",{enumerable:!0,get:function(){return h.Session}}),i(VS(),n);var p=Oh();Object.defineProperty(n,"ToolCall",{enumerable:!0,get:function(){return p.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 b=_h();Object.defineProperty(n,"HttpClient",{enumerable:!0,get:function(){return b.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 y=XS();Object.defineProperty(n,"ErrorType",{enumerable:!0,get:function(){return y.ErrorType}});var C=Ph();Object.defineProperty(n,"ErrorUtils",{enumerable:!0,get:function(){return C.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=(p,g)=>{const b=typeof p=="function"?p(l):p;if(!Object.is(b,l)){const v=l;l=g??(typeof b!="object"||b===null)?b:Object.assign({},l,b),i.forEach(y=>y(l,v))}},u=()=>l,f={setState:o,getState:u,getInitialState:()=>h,subscribe:p=>(i.add(p),()=>i.delete(p))},h=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=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 p=s.storage;if(!p)return n((...E)=>{i(...E)},o,u);const g=()=>{const E=s.partialize({...o()});return p.setItem(s.name,{state:E,version:s.version})},b=u.setState;u.setState=(E,T)=>(b(E,T),g());const v=n((...E)=>(i(...E),g()),o,u);u.getInitialState=()=>v;let y;const C=()=>{var E,T;if(!p)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(p.getItem.bind(p))(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(P=>[!0,P]):[!0,k]}}else return[!1,A.state];return[!1,void 0]}).then(A=>{var k;const[P,H]=A;if(y=s.merge(H,(k=o())!=null?k:v),i(y,!0),P)return g()}).then(()=>{_?.(y,void 0),y=o(),c=!0,h.forEach(A=>A(y))}).catch(A=>{_?.(void 0,A)})};return u.persist={setOptions:E=>{s={...s,...E},E.storage&&(p=E.storage)},clearStorage:()=>{p?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>C(),hasHydrated:()=>c,onHydrate:E=>(f.add(E),()=>{f.delete(E)}),onFinishHydration:E=>(h.add(E),()=>{h.delete(E)})},s.skipHydration||C(),y||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 z.jsx("div",{className:"bg-lavender-100/95 backdrop-blur-md shadow-lg border-b border-lavender-200/60 px-6 py-2",children:z.jsxs("div",{className:"flex items-center justify-between",children:[z.jsxs("div",{className:"flex items-center gap-3",children:[z.jsxs("div",{className:"relative flex-shrink-0",children:[z.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:z.jsx(ma,{className:"text-white font-bold text-lg bg-transparent",children:i?z.jsx("img",{src:i,alt:"Bot Icon",className:"w-12 h-12 rounded-full object-cover"}):z.jsx("span",{className:"text-white font-bold text-lg bg-transparent",children:"MC"})})}),z.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")})]}),z.jsxs("div",{className:"flex flex-col",children:[z.jsx("p",{className:"text-lg font-semibold text-slate-900",children:l||"Health Assist"}),z.jsx("div",{className:"flex items-center gap-1.5",children:z.jsx("span",{className:Ye("text-xs font-medium",c.textColor),children:c.text})})]})]}),z.jsxs("div",{className:"flex items-center gap-2",children:[z.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:z.jsx(vS,{className:"w-8 h-8"})}),z.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:z.jsx(Os,{className:"w-8 h-8"})})]})]})})}const i1=q.lazy(()=>Promise.resolve().then(()=>m1));function a1({isOpen:n,onClose:l,iconUrl:i,onStartNewSession:o,children:u,title:s,chatComposer:c}){const[f,h]=q.useState(!1),p=q.useRef(null);q.useEffect(()=>{const v=()=>{const y=window?.innerWidth??0,C=navigator?.userAgent?.toLowerCase()??"",E=y<768||/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(C);h(E)};return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[]),q.useEffect(()=>{if(!n||!f||!p.current)return;const v=p.current;let y=null,C=null;if(window.visualViewport){const E=()=>{if(v&&window.visualViewport){const A=window.visualViewport.height,k=window.visualViewport.offsetTop;y=requestAnimationFrame(()=>{v.style.transition="none",v.style.top=`${k}px`,v.style.left="0",v.style.right="0",v.style.bottom="auto",v.style.width="100vw",v.style.height=`${A}px`,v.style.maxHeight=`${A}px`,v.style.minHeight=`${A}px`,C&&clearTimeout(C),C=setTimeout(()=>{v.style.transition=""},100)})}},T=()=>{E()},_=()=>{if(v&&window.visualViewport){const A=window.visualViewport.offsetTop;y=requestAnimationFrame(()=>{v.style.transition="none",v.style.top=`${A}px`,setTimeout(()=>{v.style.transition=""},50)})}};return window.visualViewport.addEventListener("resize",T),window.visualViewport.addEventListener("scroll",_),E(),()=>{y&&cancelAnimationFrame(y),C&&clearTimeout(C),window.visualViewport?.removeEventListener("resize",T),window.visualViewport?.removeEventListener("scroll",_)}}else{const E=()=>{v&&(v.style.transition="none",v.style.top="0",v.style.left="0",v.style.right="0",v.style.bottom="auto",v.style.width="100vw",v.style.height="100svh",v.style.maxHeight="100svh",setTimeout(()=>{v.style.transition=""},100))};return window.addEventListener("resize",E),E(),()=>{window.removeEventListener("resize",E)}}},[n,f]),q.useEffect(()=>{if(n){const v=document.body.style.overflow,y=document.body.style.paddingRight,C=document.documentElement.style.overflow,E=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",E>0&&!f&&(document.body.style.paddingRight=`${E}px`),()=>{document.body.style.overflow=v,document.body.style.paddingRight=y,document.documentElement.style.overflow=C}}},[n,f]);const g=Ye("synapse-chat-widget-container","fixed m-0 p-0","box-border",f?"":"transition-all duration-300",f?"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",f?"bg-white":"bg-white/90 backdrop-blur-2xl","shadow-2xl","flex flex-col","overflow-hidden","border border-white/50 ring-1 ring-white/60",f?"rounded-none":"rounded-3xl");return z.jsxs("div",{ref:p,className:g,style:{margin:0,padding:0,border:"none",outline:"none",position:"fixed",zIndex:2147483647,fontSize:"16px",lineHeight:"2.5",userSelect:"auto",...f&&{top:0,left:0,right:0,bottom:0,width:"100vw",maxHeight:"100svh",height:"100svh",minHeight:"100svh",backgroundColor:"white"}},children:[z.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
|
-
`}),M.jsxs(fa,{className:b,children:[M.jsx("div",{className:"flex-shrink-0 sticky top-0 z-50",children:M.jsx(e1,{onClose:l,title:s,iconUrl:i,startNewConversation:o})}),M.jsx("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col",children:u}),c&&M.jsx("div",{className:"flex-shrink-0 sticky bottom-0 z-50",children:M.jsx(P.Suspense,{fallback:null,children:M.jsx(t1,{value:c.value,onChange:c.onChange,onSend:c.onSend,onFileChange:c.onFileChange,onRecording:c.onRecording,isRecording:c.isRecording,hasAttachment:c.hasAttachment,attachmentFiles:c.attachmentFiles,isDisabled:c.isDisabled,isMobile:f,placeholder:c.placeholder,recordingStatus:c.recordingStatus})})})]})]})}function Qh(){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 r1=({environment:n,userId:l,onInlineText:i})=>{const[o,u]=P.useState([]),[s,c]=P.useState(!1),[f,h]=P.useState(0),[p,g]=P.useState(!1),[b,v]=P.useState([]),y=P.useRef(null),C=P.useRef(null),{isOnline:E}=Qh(),{agentId:T,setSessionId:_,setSessionToken:k,sessionId:A,sessionToken:q,setError:H,setConnectionStatus:R,setShowRetryButton:I,setStartNewConnection:Y,setIsStreaming:F,setIsWaitingForResponse:$,isStreaming:ie,initialMessage:D,isWaitingForResponse:re,setProgressMessage:w,setRecordingStatus:V,clearSession:Z,addMessageToSession:Q,getMessagesForSession:se,updateMessageInSession:de,setInitialMessage:B}=Fr();P.useEffect(()=>{E?p?U()&&(R(Ge.ConnectionStatus.CONNECTED),ne()):R(Ge.ConnectionStatus.CONNECTING):R(Ge.ConnectionStatus.NOT_CONNECTED)},[E,p]),P.useEffect(()=>{if(A){const S=se(A)||[];u(S),v([])}},[A]),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:R(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),k(K.session_token))}}});return y.current=S,g(!0),()=>{g(!1),y.current?.endSession(),y.current=null,C.current&&(clearTimeout(C.current),C.current=null)}},[T,n,l]),P.useEffect(()=>{const S=o[o.length-1];!S?.role||!A||(S?.role===On.USER?Q(A,S):!ie&&!S.isStored&&(u(K=>{const W=[...K];return W[W.length-1]={...S,isStored:!0},W}),Q(A,{...S,isStored:!0})))},[o,ie]),P.useEffect(()=>{const S=o[o.length-1];return()=>{S&&!S?.isStored&&A&&Q(A,{...S,isStored:!0})}},[]),P.useEffect(()=>(C.current&&(clearTimeout(C.current),C.current=null),re&&!ie?C.current=setTimeout(()=>{$(!1),C.current=null},3e4):ie&&C.current&&(clearTimeout(C.current),C.current=null),()=>{C.current&&(clearTimeout(C.current),C.current=null)}),[re,ie,$]);const N=async(S=!1)=>{try{if(!y.current){H({title:"SDK not initialized",description:"Please ensure agentId is configured"}),c(!1);return}c(!0);let K;S?(await Z(),ne(),K=await y.current.startSession()):K=await y.current.startSession({session_id:A||"",session_token:q||""}),K?.session_id&&K?.session_token&&(_(K.session_id),k(K.session_token),K?.initial_message?.text&&K?.initial_message?.suggestions?.length&&B(K.initial_message)),ce()}catch{H({title:"Something Went wrong!",description:"Please try again later."}),c(!1);return}finally{c(!1)}},U=()=>y.current?.isConnected()??!1,z=()=>{y.current?.endSession()},ne=()=>{h(0),I(!1),Y(!1),H(null)},ce=()=>{y.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,j=K.messageId,L=K.timestamp;u(X=>{const he=X[X.length-1];if(he&&he.id===j&&he.role===On.ASSISTANT){const ge=[...X];return ge[ge.length-1]={...he,content:he.content+W},ge}else return[...X,{id:j,content:W,role:On.ASSISTANT,timestamp:ca(L??Date.now()),isStored:!1}]})}}),y.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM,()=>{F(!1),w(null)}),y.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.CONNECTED,()=>{ne(),R(Ge.ConnectionStatus.CONNECTED)}),y.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,j=K.timestamp??Date.now();u(L=>{const X=L[L.length-1];if(X.id===W&&X.role===On.ASSISTANT){const he=[...L],ge={...X,toolEscalationData:{...K.data,isResponded:!1},isResponseFromTool:!0};return he[L.length-1]=ge,de(A,W,ge),he}else{const he={id:W,content:K.data?.text||"",role:On.ASSISTANT,toolEscalationData:{...K.data,isResponded:!1},isResponseFromTool:!0,timestamp:ca(j),isStored:!1};return[...L,he]}})}),y.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,S=>{R(Ge.ConnectionStatus.NOT_CONNECTED),f<2?(h(K=>K+1),I(!0)):Y(!0)}),y.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.ERROR,S=>{I(!0)}),y.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),w(null)}),y.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE,S=>{const K=S;K.data?.text&&($(!1),w(K.data.text))})},we=async({message:S,messageId:K,files:W,audio:j,toolCalled:L})=>{if(!U()||W&&W.length<0&&S?.trim()===""&&!j?.audio)return;H(null);const X=o.length==2&&b.length==2?b:null;if(S||W&&W.length>0||j?.audio){const he=o.length-1,ge=he>=0?o[he]:null,le=ge?ge?.isResponseFromTool||ge.role===On.ASSISTANT&&ge.toolEscalationData:null;await y.current?.sendMessage({message:S,files:W,audio:j,...X&&{initial_prompts:X},...le&&!L?{tool_declined:!0,tool_id:ge?.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(A,_e[he].id||Date.now().toString(),_e[he])),[..._e,{id:K||Date.now().toString(),content:S||"",files:W||[],role:On.USER,timestamp:ca(Date.now()),isStored:!0}]}),$(!0)}};return{sendMessage:we,startSession:N,incomingMessages:o,loading:s,endSession:z,isReady:p,startRecording:async()=>{if(!U())throw new Error("Not connected to the server");try{await y.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:()=>{U()&&y.current?.endRecording()},handleRetry:async()=>{if(!U())ne(),await N(!1);else{const S=o[o.length-1];S&&S.role===On.USER&&y.current?.sendMessage({message:S.content,files:S.files||[],messageId:S.id})}},isValidFile:S=>{const K=S.type.toLowerCase(),j=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(j):!1},handleStartNewConnection:async()=>{ne(),await Z(),await N(!0)},callTool:async(S,K)=>{try{if(!U())throw new Error("Not connected to the server");const W=await y.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:ca(Date.now()),isStored:!0}]),$(!0),await Kv(1e3),$(!1),u(W=>[...W,{id:Date.now().toString(),content:K.response||"Please try again",role:On.ASSISTANT,timestamp:ca(Date.now()),isStored:!1}]),v([{role:"user",text:S},{role:"assistant",text:K.response}])}}},i1=P.lazy(()=>Promise.resolve().then(()=>Fw)),a1=P.lazy(()=>Promise.resolve().then(()=>Gw)),l1=P.lazy(()=>Promise.resolve().then(()=>Zw).then(n=>({default:n.ConnectionStatus})));function o1({isOpen:n,agentId:l,config:i}){const[o,u]=P.useState(""),[s,c]=P.useState(!1),[f,h]=P.useState(!1),[p,g]=P.useState([]),b=P.useRef(!1),v=P.useRef(null),y=P.useRef(null),[C,E]=P.useState(!1),T=P.useRef(0),{setAgentId:_,startNewConnection:k,showRetryButton:A,clearError:q,error:H,connectionStatus:R,recordingStatus:I,isWaitingForResponse:Y,isStreaming:F,setError:$,initialMessage:ie}=Fr(),{incomingMessages:D,loading:re,sendMessage:w,startSession:V,isReady:Z,startRecording:Q,stopRecording:se,handleRetry:de,handleStartNewConnection:B,isValidFile:N,callTool:U,handleInitialTaskClick:z}=r1({environment:"production",onInlineText:j=>{u(L=>L+j)}});P.useEffect(()=>{l&&(_(l),n&&Z&&!b.current&&(b.current=!0,V(!1)))},[n,Z,l]);const ne=()=>v.current?.querySelector("[data-radix-scroll-area-viewport]")||null,ce=()=>{const j=ne();j&&(j.scrollTo({top:j.scrollHeight,behavior:"smooth"}),E(!1))},we=()=>{const j=ne();return j?j.scrollHeight-j.scrollTop-j.clientHeight<50:!0};P.useEffect(()=>{D.length>T.current&&(setTimeout(()=>{ce()},100),T.current=D.length)},[D.length]),P.useEffect(()=>{const j=ne();if(!j)return;const L=()=>{E(!we())},X=()=>{L()},he=new MutationObserver(()=>{L()});return he.observe(j,{childList:!0,subtree:!0}),j.addEventListener("scroll",X),L(),()=>{he.disconnect(),j.removeEventListener("scroll",X)}},[D.length]);const Te=D.length>0,Ae=R===Ge.ConnectionStatus.CONNECTED,ke=re||!Ae||Y||F,Pe=re||!Ae,ve=P.useMemo(()=>I===Ft.IDLE?null:I===Ft.LISTENING?"Listening...":I===Ft.PROCESSING?"Processing...":I===Ft.TRANSCRIBING?"Transcribing...":null,[I]),ze=Pe?"Connecting...":ve||(Y||F?"Please wait for the response...":"Ask me anything…"),je=async()=>{if(!ke&&(o.trim()||s||f)){const j=Date.now().toString();p.length>0?(await w({files:p,message:o.trim(),messageId:j}),g([]),h(!1)):o.trim()&&await w({message:o,messageId:j}),u(""),c(!1),h(!1),setTimeout(()=>{ce()},100)}},S=async j=>{j&&await z(j)},K=j=>{if(j&&j.length>0){const L=j.filter(X=>N(X)?!0:($({title:`File type not supported: ${X.name}`,description:"Only PDF, images (JPG, JPEG, PNG, HEIC), documents (DOCX, TIFF), and text files (TXT, MD) are allowed."}),!1));if(L?.length>0)j=L;else return}g(L=>(h((L?.length??0)+(j?.length??0)>0),[...L,...j]))},W=async()=>{if(s)await se(),c(!1);else{if(ke)return;try{await Q(),c(!0)}catch{}}};return M.jsx(n1,{isOpen:n,onClose:i.onClose,title:i.title,iconUrl:i.iconUrl,onStartNewSession:()=>V(!0),chatComposer:{value:o,onChange:u,onSend:je,onFileChange:K,onRecording:W,isRecording:s,hasAttachment:f,attachmentFiles:p,isDisabled:ke,placeholder:ze,recordingStatus:I},children:!re&&M.jsx(P.Suspense,{fallback:M.jsx(s1,{}),children:M.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl relative",children:[M.jsx(Id,{ref:v,className:"flex-1 min-h-0",children:M.jsxs("div",{className:Ye("transition-all duration-300",Te?"p-4 space-y-3":"p-6 space-y-6"),children:[!Te&&ie?.text?M.jsx(a1,{tasks:ie.suggestions,initialPrompt:ie.text,onTaskClick:S,disabled:ke}):M.jsx(i1,{messages:D,onSendMessage:w,iconUrl:i.iconUrl,callTool:U}),M.jsx("div",{ref:y})]})}),C&&M.jsx("div",{className:"absolute bottom-20 left-1/2 transform -translate-x-1/2 z-10",children:M.jsx(At,{onClick:ce,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:M.jsx(Ns,{className:"w-5 h-5 text-slate-700"})})}),M.jsx(l1,{className:"mt-2",onRetry:de,onStartNewSession:B,showRetryButton:A,startNewConnection:k,clearError:q,error:H,isConnected:Ae})]})})})}function s1(){return M.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl animate-pulse",children:[M.jsxs("div",{className:"flex-1 p-6 space-y-4",children:[M.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),M.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),M.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"})]}),M.jsx("div",{className:"h-24 border-t border-gray-100 bg-gray-50"})]})}function u1({agentId:n,config:l}){const[i,o]=P.useState(!1);P.useEffect(()=>{o(!0)},[]);const u=()=>{o(!1),l?.onClose?.()};return M.jsx(o1,{isOpen:i,agentId:n,config:{...l,environment:l.environment??"production",onClose:u,title:l.title??"Medi Clinic"}})}const Jh=(n,l,i)=>{Db.createRoot(n).render(M.jsx(P.StrictMode,{children:M.jsx(u1,{agentId:l,config:i||{}})}))};typeof window<"u"&&(window.renderMedAssist=Jh);const Wh=P.forwardRef(({className:n,...l},i)=>M.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}));Wh.displayName="Textarea";function c1({value:n,onChange:l,onSend:i,onFileChange:o,onRecording:u,isRecording:s,hasAttachment:c,attachmentFiles:f,isDisabled:h,placeholder:p,isMobile:g,recordingStatus:b}){const v=P.useRef(null),y=P.useRef(null),C=n.trim().length>0||c,E=(h||b!==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"),_=R=>{const I=Array.from(R.target.files||[]);I.length>0&&o(I)},k=()=>{h||v.current?.click()},A=R=>{R.key==="Enter"&&!R.shiftKey&&C&&!h&&(R.preventDefault(),i())},q=R=>{R.style.height="auto",R.style.overflow="hidden";const I=R.scrollHeight,Y=40,F=120,$=Math.max(Y,Math.min(I,F));R.style.height=$+"px",I>F?R.style.overflow="auto":R.style.overflow="hidden"},H=R=>{q(R.currentTarget)};return P.useEffect(()=>{y.current&&q(y.current)},[n]),P.useEffect(()=>{!h&&!g&&y.current?.focus()},[h]),M.jsxs("div",{className:"border-t border-white/20 bg-white/70 backdrop-blur-xl p-4",children:[M.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"}),M.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",h&&"opacity-60"),children:[c&&f.length>0&&M.jsxs("span",{className:"text-xs text-lavender-600 mr-2",children:[f.length," file(s)"]}),M.jsx(Wh,{ref:y,onInput:H,placeholder:p,value:n,onChange:R=>l(R.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:A,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"}),M.jsx(At,{type:"button",variant:"ghost",size:"icon",onClick:k,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:M.jsx(vS,{className:"w-5 h-5"})}),s?M.jsx(At,{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:M.jsx(ES,{className:"w-4 h-4"})}):M.jsx(At,{type:"button",variant:"ghost",size:"icon",onClick:u,disabled:E,className:T,title:"Start recording",children:M.jsx(bS,{className:"w-5 h-5"})}),C&&!h&&M.jsx(At,{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:M.jsx(SS,{className:"w-4 h-4"})})]})]})}const f1=Object.freeze(Object.defineProperty({__proto__:null,default:c1},Symbol.toStringTag,{value:"Module"}));function NT(){}function RT(){}function d1(n,l){const i={};return(n[n.length-1]===""?[...n,""]:n).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const h1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,m1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,p1={};function $h(n,l){return(p1.jsx?m1:h1).test(n)}const g1=/[ \t\n\f\r]/g;function y1(n){return typeof n=="object"?n.type==="text"?em(n.value):!1:em(n)}function em(n){return n.replace(g1,"")===""}class Aa{constructor(l,i,o){this.normal=i,this.property=l,o&&(this.space=o)}}Aa.prototype.normal={},Aa.prototype.property={},Aa.prototype.space=void 0;function tm(n,l){const i={},o={};for(const u of n)Object.assign(i,u.property),Object.assign(o,u.normal);return new Aa(i,o,l)}function Vs(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 b1=0;const qe=Yr(),xt=Yr(),Gs=Yr(),xe=Yr(),ft=Yr(),pi=Yr(),en=Yr();function Yr(){return 2**++b1}const Xs=Object.freeze(Object.defineProperty({__proto__:null,boolean:qe,booleanish:xt,commaOrSpaceSeparated:en,commaSeparated:pi,number:xe,overloadedBoolean:Gs,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),Zs=Object.keys(Xs);class Ks extends Yt{constructor(l,i,o,u){let s=-1;if(super(l,i),nm(this,"space",u),typeof o=="number")for(;++s<Zs.length;){const c=Zs[s];nm(this,Zs[s],(o&Xs[c])===Xs[c])}}}Ks.prototype.defined=!0;function nm(n,l,i){i&&(n[l]=i)}function gi(n){const l={},i={};for(const[o,u]of Object.entries(n.properties)){const s=new Ks(o,n.transform(n.attributes||{},o),u,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(s.mustUseProperty=!0),l[o]=s,i[Vs(o)]=o,i[Vs(s.attribute)]=o}return new Aa(l,i,n.space)}const rm=gi({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 im(n,l){return l in n?n[l]:l}function am(n,l){return im(n,l.toLowerCase())}const v1=gi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pi,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:qe,allowPaymentRequest:qe,allowUserMedia:qe,alt:null,as:null,async:qe,autoCapitalize:null,autoComplete:ft,autoFocus:qe,autoPlay:qe,blocking:ft,capture:null,charSet:null,checked:qe,cite:null,className:ft,cols:xe,colSpan:null,content:null,contentEditable:xt,controls:qe,controlsList:ft,coords:xe|pi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qe,defer:qe,dir:null,dirName:null,disabled:qe,download:Gs,draggable:xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qe,formTarget:null,headers:ft,height:xe,hidden:Gs,high:xe,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:qe,inputMode:null,integrity:null,is:null,isMap:qe,itemId:null,itemProp:ft,itemRef:ft,itemScope:qe,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qe,low:xe,manifest:null,max:null,maxLength:xe,media:null,method:null,min:null,minLength:xe,multiple:qe,muted:qe,name:null,nonce:null,noModule:qe,noValidate:qe,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:qe,optimum:xe,pattern:null,ping:ft,placeholder:null,playsInline:qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qe,referrerPolicy:null,rel:ft,required:qe,reversed:qe,rows:xe,rowSpan:xe,sandbox:ft,scope:null,scoped:qe,seamless:qe,selected:qe,shadowRootClonable:qe,shadowRootDelegatesFocus:qe,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:qe,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:qe,declare:qe,event:null,face:null,frame:null,frameBorder:null,hSpace:xe,leftMargin:xe,link:null,longDesc:null,lowSrc:null,marginHeight:xe,marginWidth:xe,noResize:qe,noHref:qe,noShade:qe,noWrap:qe,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:qe,disableRemotePlayback:qe,prefix:null,property:null,results:xe,security:null,unselectable:null},space:"html",transform:am}),S1=gi({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:qe,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:pi,g2:pi,glyphName:pi,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:im}),lm=gi({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()}}),om=gi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:am}),sm=gi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,l){return"xml:"+l.slice(3).toLowerCase()}}),E1={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"},x1=/[A-Z]/g,um=/-[a-z]/g,_1=/^data[-\w.:]+$/i;function w1(n,l){const i=Vs(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"&&_1.test(l)){if(l.charAt(4)==="-"){const s=l.slice(5).replace(um,T1);o="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=l.slice(4);if(!um.test(s)){let c=s.replace(x1,C1);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}u=Ks}return new u(o,l)}function C1(n){return"-"+n.toLowerCase()}function T1(n){return n.charAt(1).toUpperCase()}const k1=tm([rm,v1,lm,om,sm],"html"),Qs=tm([rm,S1,lm,om,sm],"svg");function A1(n){return n.join(" ").trim()}var yi={},Js,cm;function N1(){if(cm)return Js;cm=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
|
-
`,p="/",g="*",b="",v="comment",y="declaration";function C(T,_){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];_=_||{};var k=1,A=1;function q(w){var V=w.match(l);V&&(k+=V.length);var Z=w.lastIndexOf(h);A=~Z?w.length-Z:A+w.length}function H(){var w={line:k,column:A};return function(V){return V.position=new R(w),F(),V}}function R(w){this.start=w,this.end={line:k,column:A},this.source=_.source}R.prototype.content=T;function I(w){var V=new Error(_.source+":"+k+":"+A+": "+w);if(V.reason=w,V.filename=_.source,V.line=k,V.column=A,V.source=T,!_.silent)throw V}function Y(w){var V=w.exec(T);if(V){var Z=V[0];return q(Z),T=T.slice(Z.length),V}}function F(){Y(i)}function $(w){var V;for(w=w||[];V=ie();)V!==!1&&w.push(V);return w}function ie(){var w=H();if(!(p!=T.charAt(0)||g!=T.charAt(1))){for(var V=2;b!=T.charAt(V)&&(g!=T.charAt(V)||p!=T.charAt(V+1));)++V;if(V+=2,b===T.charAt(V-1))return I("End of comment missing");var Z=T.slice(2,V-2);return A+=2,q(Z),T=T.slice(V),A+=2,w({type:v,comment:Z})}}function D(){var w=H(),V=Y(o);if(V){if(ie(),!Y(u))return I("property missing ':'");var Z=Y(s),Q=w({type:y,property:E(V[0].replace(n,b)),value:Z?E(Z[0].replace(n,b)):b});return Y(c),Q}}function re(){var w=[];$(w);for(var V;V=D();)V!==!1&&(w.push(V),$(w));return w}return F(),re()}function E(T){return T?T.replace(f,b):b}return Js=C,Js}var fm;function R1(){if(fm)return yi;fm=1;var n=yi&&yi.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(yi,"__esModule",{value:!0}),yi.default=i;const l=n(N1());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:p,value:g}=h;f?u(p,g,h):g&&(s=s||{},s[p]=g)}),s}return yi}var Na={},dm;function O1(){if(dm)return Na;dm=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,i=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,u=/^-(ms)-/,s=function(p){return!p||i.test(p)||n.test(p)},c=function(p,g){return g.toUpperCase()},f=function(p,g){return"".concat(g,"-")},h=function(p,g){return g===void 0&&(g={}),s(p)?p:(p=p.toLowerCase(),g.reactCompat?p=p.replace(u,f):p=p.replace(o,f),p.replace(l,c))};return Na.camelCase=h,Na}var Ra,hm;function z1(){if(hm)return Ra;hm=1;var n=Ra&&Ra.__importDefault||function(u){return u&&u.__esModule?u:{default:u}},l=n(R1()),i=O1();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,Ra=o,Ra}var M1=z1();const D1=hs(M1),mm=pm("end"),Ws=pm("start");function pm(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 j1(n){const l=Ws(n),i=mm(n);if(l&&i)return{start:l,end:i}}function Oa(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?gm(n.position):"start"in n||"end"in n?gm(n):"line"in n||"column"in n?$s(n):""}function $s(n){return ym(n&&n.line)+":"+ym(n&&n.column)}function gm(n){return $s(n&&n.start)+"-"+$s(n&&n.end)}function ym(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 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=Oa(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 eu={}.hasOwnProperty,L1=new Map,B1=/[A-Z]/g,I1=new Set(["table","tbody","thead","tfoot","tr"]),U1=new Set(["td","th"]),bm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function H1(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=Z1(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=X1(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"?Qs:k1,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},s=vm(u,n,void 0);return s&&typeof s!="string"?s:u.create(n,u.Fragment,{children:s||void 0},void 0)}function vm(n,l,i){if(l.type==="element")return q1(n,l,i);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return P1(n,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return Y1(n,l,i);if(l.type==="mdxjsEsm")return F1(n,l);if(l.type==="root")return V1(n,l,i);if(l.type==="text")return G1(n,l)}function q1(n,l,i){const o=n.schema;let u=o;l.tagName.toLowerCase()==="svg"&&o.space==="html"&&(u=Qs,n.schema=u),n.ancestors.push(l);const s=Em(n,l.tagName,!1),c=K1(n,l);let f=nu(n,l);return I1.has(l.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!y1(h):!0})),Sm(n,c,s,l),tu(c,f),n.ancestors.pop(),n.schema=o,n.create(l,s,c,i)}function P1(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)}za(n,l.position)}function F1(n,l){if(l.data&&l.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(l.data.estree);za(n,l.position)}function Y1(n,l,i){const o=n.schema;let u=o;l.name==="svg"&&o.space==="html"&&(u=Qs,n.schema=u),n.ancestors.push(l);const s=l.name===null?n.Fragment:Em(n,l.name,!0),c=Q1(n,l),f=nu(n,l);return Sm(n,c,s,l),tu(c,f),n.ancestors.pop(),n.schema=o,n.create(l,s,c,i)}function V1(n,l,i){const o={};return tu(o,nu(n,l)),n.create(l,n.Fragment,o,i)}function G1(n,l){return l.value}function Sm(n,l,i,o){typeof i!="string"&&i!==n.Fragment&&n.passNode&&(l.node=o)}function tu(n,l){if(l.length>0){const i=l.length>1?l:l[0];i&&(n.children=i)}}function X1(n,l,i){return o;function o(u,s,c,f){const p=Array.isArray(c.children)?i:l;return f?p(s,c,f):p(s,c)}}function Z1(n,l){return i;function i(o,u,s,c){const f=Array.isArray(s.children),h=Ws(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 K1(n,l){const i={};let o,u;for(u in l.properties)if(u!=="children"&&eu.call(l.properties,u)){const s=J1(n,u,l.properties[u]);if(s){const[c,f]=s;n.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&U1.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 Q1(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 za(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 za(n,l.position);else s=o.value===null?!0:o.value;i[u]=s}return i}function nu(n,l){const i=[];let o=-1;const u=n.passKeys?new Map:L1;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 p=u.get(h)||0;c=h+"-"+p,u.set(h,p+1)}}const f=vm(n,s,c);f!==void 0&&i.push(f)}return i}function J1(n,l,i){const o=w1(n.schema,l);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=o.commaSeparated?d1(i):A1(i)),o.property==="style"){let u=typeof i=="object"?i:W1(n,String(i));return n.stylePropertyNameCase==="css"&&(u=$1(u)),["style",u]}return[n.elementAttributeNameCase==="react"&&o.space?E1[o.property]||o.property:o.attribute,i]}}function W1(n,l){try{return D1(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=bm+"#cannot-parse-style-attribute",u}}function Em(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=$h(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=$h(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(o.type==="Literal"){const u=o.value;return eu.call(n.components,u)?n.components[u]:u}if(n.evaluater)return n.evaluater.evaluateExpression(o);za(n)}function za(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=bm+"#cannot-handle-mdx-estrees-without-createevaluater",i}function $1(n){const l={};let i;for(i in n)eu.call(n,i)&&(l[eE(i)]=n[i]);return l}function eE(n){let l=n.replace(B1,tE);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function tE(n){return"-"+n.toLowerCase()}const ru={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"]},nE={};function rE(n,l){const i=nE,o=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,u=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return xm(n,o,u)}function xm(n,l,i){if(iE(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 _m(n.children,l,i)}return Array.isArray(n)?_m(n,l,i):""}function _m(n,l,i){const o=[];let u=-1;for(;++u<n.length;)o[u]=xm(n[u],l,i);return o.join("")}function iE(n){return!!(n&&typeof n=="object")}const wm=document.createElement("i");function iu(n){const l="&"+n+";";wm.innerHTML=l;const i=wm.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 Cm={}.hasOwnProperty;function aE(n){const l={};let i=-1;for(;++i<n.length;)lE(l,n[i]);return l}function lE(n,l){let i;for(i in l){const u=(Cm.call(n,i)?n[i]:void 0)||(n[i]={}),s=l[i];let c;if(s)for(c in s){Cm.call(u,c)||(u[c]=[]);const f=s[c];oE(u[c],Array.isArray(f)?f:f?[f]:[])}}}function oE(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 Tm(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 bi(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mn=fr(/[A-Za-z]/),tn=fr(/[\dA-Za-z]/),sE=fr(/[#-'*+\--9=?A-Z^-~]/);function au(n){return n!==null&&(n<32||n===127)}const lu=fr(/\d/),uE=fr(/[\dA-Fa-f]/),cE=fr(/[!-/:-@[-`{-~]/);function Ie(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 fE=fr(new RegExp("\\p{P}|\\p{S}","u")),dE=fr(/\s/);function fr(n){return l;function l(i){return i!==null&&i>-1&&n.test(String.fromCharCode(i))}}function vi(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(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 hE={tokenize:mE};function mE(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 Ie(f)?(n.consume(f),n.exit("chunkText"),s):(n.consume(f),c)}}const pE={tokenize:gE},km={tokenize:yE};function gE(n){const l=this,i=[];let o=0,u,s,c;return f;function f(A){if(o<i.length){const q=i[o];return l.containerState=q[1],n.attempt(q[0].continuation,h,p)(A)}return p(A)}function h(A){if(o++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,u&&k();const q=l.events.length;let H=q,R;for(;H--;)if(l.events[H][0]==="exit"&&l.events[H][1].type==="chunkFlow"){R=l.events[H][1].end;break}_(o);let I=q;for(;I<l.events.length;)l.events[I][1].end={...R},I++;return zn(l.events,H+1,0,l.events.slice(q)),l.events.length=I,p(A)}return f(A)}function p(A){if(o===i.length){if(!u)return v(A);if(u.currentConstruct&&u.currentConstruct.concrete)return C(A);l.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return l.containerState={},n.check(km,g,b)(A)}function g(A){return u&&k(),_(o),v(A)}function b(A){return l.parser.lazy[l.now().line]=o!==i.length,c=l.now().offset,C(A)}function v(A){return l.containerState={},n.attempt(km,y,C)(A)}function y(A){return o++,i.push([l.currentConstruct,l.containerState]),v(A)}function C(A){if(A===null){u&&k(),_(0),n.consume(A);return}return u=u||l.parser.flow(l.now()),n.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:s}),E(A)}function E(A){if(A===null){T(n.exit("chunkFlow"),!0),_(0),n.consume(A);return}return Ie(A)?(n.consume(A),T(n.exit("chunkFlow")),o=0,l.interrupt=void 0,f):(n.consume(A),E)}function T(A,q){const H=l.sliceStream(A);if(q&&H.push(null),A.previous=s,s&&(s.next=A),s=A,u.defineSkip(A.start),u.write(H),l.parser.lazy[A.start.line]){let R=u.events.length;for(;R--;)if(u.events[R][1].start.offset<c&&(!u.events[R][1].end||u.events[R][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),R=I;R<l.events.length;)l.events[R][1].end={...$},R++;zn(l.events,Y+1,0,l.events.slice(I)),l.events.length=R}}function _(A){let q=i.length;for(;q-- >A;){const H=i[q];l.containerState=H[1],H[0].exit.call(l,n)}i.length=A}function k(){u.write([null]),s=void 0,u=void 0,l.containerState._closeFlow=void 0}}function yE(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 Am(n){if(n===null||Vt(n)||dE(n))return 1;if(fE(n))return 2}function ou(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 su={name:"attention",resolveAll:bE,tokenize:vE};function bE(n,l){let i=-1,o,u,s,c,f,h,p,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 b={...n[o][1].end},v={...n[i][1].start};Nm(b,-h),Nm(v,h),c={type:h>1?"strongSequence":"emphasisSequence",start:b,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},p=[],n[o][1].end.offset-n[o][1].start.offset&&(p=dn(p,[["enter",n[o][1],l],["exit",n[o][1],l]])),p=dn(p,[["enter",u,l],["enter",c,l],["exit",c,l],["enter",s,l]]),p=dn(p,ou(l.parser.constructs.insideSpan.null,n.slice(o+1,i),l)),p=dn(p,[["exit",s,l],["enter",f,l],["exit",f,l],["exit",u,l]]),n[i][1].end.offset-n[i][1].start.offset?(g=2,p=dn(p,[["enter",n[i][1],l],["exit",n[i][1],l]])):g=0,zn(n,o-1,i-o+3,p),i=o+p.length-g-2;break}}for(i=-1;++i<n.length;)n[i][1].type==="attentionSequence"&&(n[i][1].type="data");return n}function vE(n,l){const i=this.parser.constructs.attentionMarkers.null,o=this.previous,u=Am(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 p=n.exit("attentionSequence"),g=Am(h),b=!g||g===2&&u||i.includes(h),v=!u||u===2&&g||i.includes(o);return p._open=!!(s===42?b:b&&(u||!v)),p._close=!!(s===42?v:v&&(g||!b)),l(h)}}function Nm(n,l){n.column+=l,n.offset+=l,n._bufferIndex+=l}const SE={name:"autolink",tokenize:EE};function EE(n,l,i){let o=0;return u;function u(y){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(y),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),s}function s(y){return Mn(y)?(n.consume(y),c):y===64?i(y):p(y)}function c(y){return y===43||y===45||y===46||tn(y)?(o=1,f(y)):p(y)}function f(y){return y===58?(n.consume(y),o=0,h):(y===43||y===45||y===46||tn(y))&&o++<32?(n.consume(y),f):(o=0,p(y))}function h(y){return y===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(y),n.exit("autolinkMarker"),n.exit("autolink"),l):y===null||y===32||y===60||au(y)?i(y):(n.consume(y),h)}function p(y){return y===64?(n.consume(y),g):sE(y)?(n.consume(y),p):i(y)}function g(y){return tn(y)?b(y):i(y)}function b(y){return y===46?(n.consume(y),o=0,g):y===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(y),n.exit("autolinkMarker"),n.exit("autolink"),l):v(y)}function v(y){if((y===45||tn(y))&&o++<63){const C=y===45?v:b;return n.consume(y),C}return i(y)}}const Pl={partial:!0,tokenize:xE};function xE(n,l,i){return o;function o(s){return rt(s)?dt(n,u,"linePrefix")(s):u(s)}function u(s){return s===null||Ie(s)?l(s):i(s)}}const Rm={continuation:{tokenize:wE},exit:CE,name:"blockQuote",tokenize:_E};function _E(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 wE(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(Rm,l,i)(c)}}function CE(n){n.exit("blockQuote")}const Om={name:"characterEscape",tokenize:TE};function TE(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 cE(s)?(n.enter("characterEscapeValue"),n.consume(s),n.exit("characterEscapeValue"),n.exit("characterEscape"),l):i(s)}}const zm={name:"characterReference",tokenize:kE};function kE(n,l,i){const o=this;let u=0,s,c;return f;function f(b){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(b),n.exit("characterReferenceMarker"),h}function h(b){return b===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(b),n.exit("characterReferenceMarkerNumeric"),p):(n.enter("characterReferenceValue"),s=31,c=tn,g(b))}function p(b){return b===88||b===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(b),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),s=6,c=uE,g):(n.enter("characterReferenceValue"),s=7,c=lu,g(b))}function g(b){if(b===59&&u){const v=n.exit("characterReferenceValue");return c===tn&&!iu(o.sliceSerialize(v))?i(b):(n.enter("characterReferenceMarker"),n.consume(b),n.exit("characterReferenceMarker"),n.exit("characterReference"),l)}return c(b)&&u++<s?(n.consume(b),g):i(b)}}const Mm={partial:!0,tokenize:NE},Dm={concrete:!0,name:"codeFenced",tokenize:AE};function AE(n,l,i){const o=this,u={partial:!0,tokenize:H};let s=0,c=0,f;return h;function h(R){return p(R)}function p(R){const I=o.events[o.events.length-1];return s=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,f=R,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),g(R)}function g(R){return R===f?(c++,n.consume(R),g):c<3?i(R):(n.exit("codeFencedFenceSequence"),rt(R)?dt(n,b,"whitespace")(R):b(R))}function b(R){return R===null||Ie(R)?(n.exit("codeFencedFence"),o.interrupt?l(R):n.check(Mm,E,q)(R)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),v(R))}function v(R){return R===null||Ie(R)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),b(R)):rt(R)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),dt(n,y,"whitespace")(R)):R===96&&R===f?i(R):(n.consume(R),v)}function y(R){return R===null||Ie(R)?b(R):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),C(R))}function C(R){return R===null||Ie(R)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),b(R)):R===96&&R===f?i(R):(n.consume(R),C)}function E(R){return n.attempt(u,q,T)(R)}function T(R){return n.enter("lineEnding"),n.consume(R),n.exit("lineEnding"),_}function _(R){return s>0&&rt(R)?dt(n,k,"linePrefix",s+1)(R):k(R)}function k(R){return R===null||Ie(R)?n.check(Mm,E,q)(R):(n.enter("codeFlowValue"),A(R))}function A(R){return R===null||Ie(R)?(n.exit("codeFlowValue"),k(R)):(n.consume(R),A)}function q(R){return n.exit("codeFenced"),l(R)}function H(R,I,Y){let F=0;return $;function $(V){return R.enter("lineEnding"),R.consume(V),R.exit("lineEnding"),ie}function ie(V){return R.enter("codeFencedFence"),rt(V)?dt(R,D,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):D(V)}function D(V){return V===f?(R.enter("codeFencedFenceSequence"),re(V)):Y(V)}function re(V){return V===f?(F++,R.consume(V),re):F>=c?(R.exit("codeFencedFenceSequence"),rt(V)?dt(R,w,"whitespace")(V):w(V)):Y(V)}function w(V){return V===null||Ie(V)?(R.exit("codeFencedFence"),I(V)):Y(V)}}}function NE(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 uu={name:"codeIndented",tokenize:OE},RE={partial:!0,tokenize:zE};function OE(n,l,i){const o=this;return u;function u(p){return n.enter("codeIndented"),dt(n,s,"linePrefix",5)(p)}function s(p){const g=o.events[o.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(p):i(p)}function c(p){return p===null?h(p):Ie(p)?n.attempt(RE,c,h)(p):(n.enter("codeFlowValue"),f(p))}function f(p){return p===null||Ie(p)?(n.exit("codeFlowValue"),c(p)):(n.consume(p),f)}function h(p){return n.exit("codeIndented"),l(p)}}function zE(n,l,i){const o=this;return u;function u(c){return o.parser.lazy[o.now().line]?i(c):Ie(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):Ie(c)?u(c):i(c)}}const ME={name:"codeText",previous:jE,resolve:DE,tokenize:LE};function DE(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 jE(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function LE(n,l,i){let o=0,u,s;return c;function c(b){return n.enter("codeText"),n.enter("codeTextSequence"),f(b)}function f(b){return b===96?(n.consume(b),o++,f):(n.exit("codeTextSequence"),h(b))}function h(b){return b===null?i(b):b===32?(n.enter("space"),n.consume(b),n.exit("space"),h):b===96?(s=n.enter("codeTextSequence"),u=0,g(b)):Ie(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),h):(n.enter("codeTextData"),p(b))}function p(b){return b===null||b===32||b===96||Ie(b)?(n.exit("codeTextData"),h(b)):(n.consume(b),p)}function g(b){return b===96?(n.consume(b),u++,g):u===o?(n.exit("codeTextSequence"),n.exit("codeText"),l(b)):(s.type="codeTextData",p(b))}}class BE{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&&Ma(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),Ma(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),Ma(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);Ma(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);Ma(this.left,i.reverse())}}}function Ma(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 jm(n){const l={};let i=-1,o,u,s,c,f,h,p;const g=new BE(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,IE(g,i)),i=l[i],p=!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)),!p}function IE(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=[],p={};let g,b,v=-1,y=i,C=0,E=0;const T=[E];for(;y;){for(;n.get(++u)[1]!==y;);s.push(u),y._tokenizer||(g=o.sliceStream(y),y.next||g.push(null),b&&c.defineSkip(y.start),y._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),y._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),b=y,y=y.next}for(y=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),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(c.events=[],y?(y._tokenizer=void 0,y.previous=void 0):T.pop(),v=T.length;v--;){const _=f.slice(T[v],T[v+1]),k=s.pop();h.push([k,k+_.length-1]),n.splice(k,2,_)}for(h.reverse(),v=-1;++v<h.length;)p[C+h[v][0]]=C+h[v][1],C+=h[v][1]-h[v][0]-1;return p}const UE={resolve:qE,tokenize:PE},HE={partial:!0,tokenize:FE};function qE(n){return jm(n),n}function PE(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):Ie(f)?n.check(HE,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 FE(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||Ie(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 Lm(n,l,i,o,u,s,c,f,h){const p=h||Number.POSITIVE_INFINITY;let g=0;return b;function b(_){return _===60?(n.enter(o),n.enter(u),n.enter(s),n.consume(_),n.exit(s),v):_===null||_===32||_===41||au(_)?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"}),y(_))}function y(_){return _===62?(n.exit("chunkString"),n.exit(f),v(_)):_===null||_===60||Ie(_)?i(_):(n.consume(_),_===92?C:y)}function C(_){return _===60||_===62||_===92?(n.consume(_),y):y(_)}function E(_){return!g&&(_===null||_===41||Vt(_))?(n.exit("chunkString"),n.exit(f),n.exit(c),n.exit(o),l(_)):g<p&&_===40?(n.consume(_),g++,E):_===41?(n.consume(_),g--,E):_===null||_===32||_===40||au(_)?i(_):(n.consume(_),_===92?T:E)}function T(_){return _===40||_===41||_===92?(n.consume(_),E):E(_)}}function Bm(n,l,i,o,u,s){const c=this;let f=0,h;return p;function p(y){return n.enter(o),n.enter(u),n.consume(y),n.exit(u),n.enter(s),g}function g(y){return f>999||y===null||y===91||y===93&&!h||y===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(y):y===93?(n.exit(s),n.enter(u),n.consume(y),n.exit(u),n.exit(o),l):Ie(y)?(n.enter("lineEnding"),n.consume(y),n.exit("lineEnding"),g):(n.enter("chunkString",{contentType:"string"}),b(y))}function b(y){return y===null||y===91||y===93||Ie(y)||f++>999?(n.exit("chunkString"),g(y)):(n.consume(y),h||(h=!rt(y)),y===92?v:b)}function v(y){return y===91||y===92||y===93?(n.consume(y),f++,b):b(y)}}function Im(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),p(v))}function p(v){return v===c?(n.exit(s),h(c)):v===null?i(v):Ie(v)?(n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),dt(n,p,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===c||v===null||Ie(v)?(n.exit("chunkString"),p(v)):(n.consume(v),v===92?b:g)}function b(v){return v===c||v===92?(n.consume(v),g):g(v)}}function Da(n,l){let i;return o;function o(u){return Ie(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 YE={name:"definition",tokenize:GE},VE={partial:!0,tokenize:XE};function GE(n,l,i){const o=this;let u;return s;function s(y){return n.enter("definition"),c(y)}function c(y){return Bm.call(o,n,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function f(y){return u=bi(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),y===58?(n.enter("definitionMarker"),n.consume(y),n.exit("definitionMarker"),h):i(y)}function h(y){return Vt(y)?Da(n,p)(y):p(y)}function p(y){return Lm(n,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function g(y){return n.attempt(VE,b,b)(y)}function b(y){return rt(y)?dt(n,v,"whitespace")(y):v(y)}function v(y){return y===null||Ie(y)?(n.exit("definition"),o.parser.defined.push(u),l(y)):i(y)}}function XE(n,l,i){return o;function o(f){return Vt(f)?Da(n,u)(f):i(f)}function u(f){return Im(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||Ie(f)?l(f):i(f)}}const ZE={name:"hardBreakEscape",tokenize:KE};function KE(n,l,i){return o;function o(s){return n.enter("hardBreakEscape"),n.consume(s),u}function u(s){return Ie(s)?(n.exit("hardBreakEscape"),l(s)):i(s)}}const QE={name:"headingAtx",resolve:JE,tokenize:WE};function JE(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 WE(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||Ie(g)?(n.exit("atxHeading"),l(g)):rt(g)?dt(n,f,"whitespace")(g):(n.enter("atxHeadingText"),p(g))}function h(g){return g===35?(n.consume(g),h):(n.exit("atxHeadingSequence"),f(g))}function p(g){return g===null||g===35||Vt(g)?(n.exit("atxHeadingText"),f(g)):(n.consume(g),p)}}const $E=["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"],Um=["pre","script","style","textarea"],ex={concrete:!0,name:"htmlFlow",resolveTo:rx,tokenize:ix},tx={partial:!0,tokenize:lx},nx={partial:!0,tokenize:ax};function rx(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 ix(n,l,i){const o=this;let u,s,c,f,h;return p;function p(z){return g(z)}function g(z){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(z),b}function b(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:B):Mn(z)?(n.consume(z),c=String.fromCharCode(z),T):i(z)}function v(z){return z===45?(n.consume(z),u=2,y):z===91?(n.consume(z),u=5,f=0,C):Mn(z)?(n.consume(z),u=4,o.interrupt?l:B):i(z)}function y(z){return z===45?(n.consume(z),o.interrupt?l:B):i(z)}function C(z){const ne="CDATA[";return z===ne.charCodeAt(f++)?(n.consume(z),f===ne.length?o.interrupt?l:D:C):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 ne=z===47,ce=c.toLowerCase();return!ne&&!s&&Um.includes(ce)?(u=1,o.interrupt?l(z):D(z)):$E.includes(c.toLowerCase())?(u=6,ne?(n.consume(z),_):o.interrupt?l(z):D(z)):(u=7,o.interrupt&&!o.parser.lazy[o.now().line]?i(z):s?k(z):A(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 k(z){return rt(z)?(n.consume(z),k):$(z)}function A(z){return z===47?(n.consume(z),$):z===58||z===95||Mn(z)?(n.consume(z),q):rt(z)?(n.consume(z),A):$(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),R):rt(z)?(n.consume(z),H):A(z)}function R(z){return z===null||z===60||z===61||z===62||z===96?i(z):z===34||z===39?(n.consume(z),h=z,I):rt(z)?(n.consume(z),R):Y(z)}function I(z){return z===h?(n.consume(z),h=null,F):z===null||Ie(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)?A(z):i(z)}function $(z){return z===62?(n.consume(z),ie):i(z)}function ie(z){return z===null||Ie(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),B):z===93&&u===5?(n.consume(z),de):Ie(z)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(tx,U,re)(z)):z===null||Ie(z)?(n.exit("htmlFlowData"),re(z)):(n.consume(z),D)}function re(z){return n.check(nx,w,U)(z)}function w(z){return n.enter("lineEnding"),n.consume(z),n.exit("lineEnding"),V}function V(z){return z===null||Ie(z)?re(z):(n.enter("htmlFlowData"),D(z))}function Z(z){return z===45?(n.consume(z),B):D(z)}function Q(z){return z===47?(n.consume(z),c="",se):D(z)}function se(z){if(z===62){const ne=c.toLowerCase();return Um.includes(ne)?(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),B):D(z)}function B(z){return z===62?(n.consume(z),N):z===45&&u===2?(n.consume(z),B):D(z)}function N(z){return z===null||Ie(z)?(n.exit("htmlFlowData"),U(z)):(n.consume(z),N)}function U(z){return n.exit("htmlFlow"),l(z)}}function ax(n,l,i){const o=this;return u;function u(c){return Ie(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 lx(n,l,i){return o;function o(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),n.attempt(Pl,l,i)}}const ox={name:"htmlText",tokenize:sx};function sx(n,l,i){const o=this;let u,s,c;return f;function f(B){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(B),h}function h(B){return B===33?(n.consume(B),p):B===47?(n.consume(B),H):B===63?(n.consume(B),A):Mn(B)?(n.consume(B),Y):i(B)}function p(B){return B===45?(n.consume(B),g):B===91?(n.consume(B),s=0,C):Mn(B)?(n.consume(B),k):i(B)}function g(B){return B===45?(n.consume(B),y):i(B)}function b(B){return B===null?i(B):B===45?(n.consume(B),v):Ie(B)?(c=b,Q(B)):(n.consume(B),b)}function v(B){return B===45?(n.consume(B),y):b(B)}function y(B){return B===62?Z(B):B===45?v(B):b(B)}function C(B){const N="CDATA[";return B===N.charCodeAt(s++)?(n.consume(B),s===N.length?E:C):i(B)}function E(B){return B===null?i(B):B===93?(n.consume(B),T):Ie(B)?(c=E,Q(B)):(n.consume(B),E)}function T(B){return B===93?(n.consume(B),_):E(B)}function _(B){return B===62?Z(B):B===93?(n.consume(B),_):E(B)}function k(B){return B===null||B===62?Z(B):Ie(B)?(c=k,Q(B)):(n.consume(B),k)}function A(B){return B===null?i(B):B===63?(n.consume(B),q):Ie(B)?(c=A,Q(B)):(n.consume(B),A)}function q(B){return B===62?Z(B):A(B)}function H(B){return Mn(B)?(n.consume(B),R):i(B)}function R(B){return B===45||tn(B)?(n.consume(B),R):I(B)}function I(B){return Ie(B)?(c=I,Q(B)):rt(B)?(n.consume(B),I):Z(B)}function Y(B){return B===45||tn(B)?(n.consume(B),Y):B===47||B===62||Vt(B)?F(B):i(B)}function F(B){return B===47?(n.consume(B),Z):B===58||B===95||Mn(B)?(n.consume(B),$):Ie(B)?(c=F,Q(B)):rt(B)?(n.consume(B),F):Z(B)}function $(B){return B===45||B===46||B===58||B===95||tn(B)?(n.consume(B),$):ie(B)}function ie(B){return B===61?(n.consume(B),D):Ie(B)?(c=ie,Q(B)):rt(B)?(n.consume(B),ie):F(B)}function D(B){return B===null||B===60||B===61||B===62||B===96?i(B):B===34||B===39?(n.consume(B),u=B,re):Ie(B)?(c=D,Q(B)):rt(B)?(n.consume(B),D):(n.consume(B),w)}function re(B){return B===u?(n.consume(B),u=void 0,V):B===null?i(B):Ie(B)?(c=re,Q(B)):(n.consume(B),re)}function w(B){return B===null||B===34||B===39||B===60||B===61||B===96?i(B):B===47||B===62||Vt(B)?F(B):(n.consume(B),w)}function V(B){return B===47||B===62||Vt(B)?F(B):i(B)}function Z(B){return B===62?(n.consume(B),n.exit("htmlTextData"),n.exit("htmlText"),l):i(B)}function Q(B){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(B),n.exit("lineEnding"),se}function se(B){return rt(B)?dt(n,de,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):de(B)}function de(B){return n.enter("htmlTextData"),c(B)}}const cu={name:"labelEnd",resolveAll:dx,resolveTo:hx,tokenize:mx},ux={tokenize:px},cx={tokenize:gx},fx={tokenize:yx};function dx(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 hx(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}},p={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",p,l]],f=dn(f,n.slice(s+1,s+o+3)),f=dn(f,[["enter",g,l]]),f=dn(f,ou(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",p,l]]),f=dn(f,n.slice(c+1)),f=dn(f,[["exit",h,l]]),zn(n,s,n.length,f),n}function mx(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?b(v):(c=o.parser.defined.includes(bi(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(ux,g,c?g:b)(v):v===91?n.attempt(cx,g,c?p:b)(v):c?g(v):b(v)}function p(v){return n.attempt(fx,g,b)(v)}function g(v){return l(v)}function b(v){return s._balanced=!0,i(v)}}function px(n,l,i){return o;function o(b){return n.enter("resource"),n.enter("resourceMarker"),n.consume(b),n.exit("resourceMarker"),u}function u(b){return Vt(b)?Da(n,s)(b):s(b)}function s(b){return b===41?g(b):Lm(n,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function c(b){return Vt(b)?Da(n,h)(b):g(b)}function f(b){return i(b)}function h(b){return b===34||b===39||b===40?Im(n,p,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):g(b)}function p(b){return Vt(b)?Da(n,g)(b):g(b)}function g(b){return b===41?(n.enter("resourceMarker"),n.consume(b),n.exit("resourceMarker"),n.exit("resource"),l):i(b)}}function gx(n,l,i){const o=this;return u;function u(f){return Bm.call(o,n,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return o.parser.defined.includes(bi(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?l(f):i(f)}function c(f){return i(f)}}function yx(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 bx={name:"labelStartImage",resolveAll:cu.resolveAll,tokenize:vx};function vx(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 Sx={name:"labelStartLink",resolveAll:cu.resolveAll,tokenize:Ex};function Ex(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 fu={name:"lineEnding",tokenize:xx};function xx(n,l){return i;function i(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),dt(n,l,"linePrefix")}}const Fl={name:"thematicBreak",tokenize:_x};function _x(n,l,i){let o=0,u;return s;function s(p){return n.enter("thematicBreak"),c(p)}function c(p){return u=p,f(p)}function f(p){return p===u?(n.enter("thematicBreakSequence"),h(p)):o>=3&&(p===null||Ie(p))?(n.exit("thematicBreak"),l(p)):i(p)}function h(p){return p===u?(n.consume(p),o++,h):(n.exit("thematicBreakSequence"),rt(p)?dt(n,f,"whitespace")(p):f(p))}}const Gt={continuation:{tokenize:kx},exit:Nx,name:"list",tokenize:Tx},wx={partial:!0,tokenize:Rx},Cx={partial:!0,tokenize:Ax};function Tx(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(y){const C=o.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!o.containerState.marker||y===o.containerState.marker:lu(y)){if(o.containerState.type||(o.containerState.type=C,n.enter(C,{_container:!0})),C==="listUnordered")return n.enter("listItemPrefix"),y===42||y===45?n.check(Fl,i,p)(y):p(y);if(!o.interrupt||y===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),h(y)}return i(y)}function h(y){return lu(y)&&++c<10?(n.consume(y),h):(!o.interrupt||c<2)&&(o.containerState.marker?y===o.containerState.marker:y===41||y===46)?(n.exit("listItemValue"),p(y)):i(y)}function p(y){return n.enter("listItemMarker"),n.consume(y),n.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||y,n.check(Pl,o.interrupt?i:g,n.attempt(wx,v,b))}function g(y){return o.containerState.initialBlankLine=!0,s++,v(y)}function b(y){return rt(y)?(n.enter("listItemPrefixWhitespace"),n.consume(y),n.exit("listItemPrefixWhitespace"),v):i(y)}function v(y){return o.containerState.size=s+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,l(y)}}function kx(n,l,i){const o=this;return o.containerState._closeFlow=void 0,n.check(Pl,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(Cx,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 Ax(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 Nx(n){n.exit(this.containerState.type)}function Rx(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 Hm={name:"setextUnderline",resolveTo:Ox,tokenize:zx};function Ox(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 zx(n,l,i){const o=this;let u;return s;function s(p){let g=o.events.length,b;for(;g--;)if(o.events[g][1].type!=="lineEnding"&&o.events[g][1].type!=="linePrefix"&&o.events[g][1].type!=="content"){b=o.events[g][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||b)?(n.enter("setextHeadingLine"),u=p,c(p)):i(p)}function c(p){return n.enter("setextHeadingLineSequence"),f(p)}function f(p){return p===u?(n.consume(p),f):(n.exit("setextHeadingLineSequence"),rt(p)?dt(n,h,"lineSuffix")(p):h(p))}function h(p){return p===null||Ie(p)?(n.exit("setextHeadingLine"),l(p)):i(p)}}const Mx={tokenize:Dx};function Dx(n){const l=this,i=n.attempt(Pl,o,n.attempt(this.parser.constructs.flowInitial,u,dt(n,n.attempt(this.parser.constructs.flow,u,n.attempt(UE,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 jx={resolveAll:Pm()},Lx=qm("string"),Bx=qm("text");function qm(n){return{resolveAll:Pm(n==="text"?Ix: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 p(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 p(g)?(i.exit("data"),s(g)):(i.consume(g),h)}function p(g){if(g===null)return!0;const b=u[g];let v=-1;if(b)for(;++v<b.length;){const y=b[v];if(!y.previous||y.previous.call(o,o.previous))return!0}return!1}}}function Pm(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 Ix(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 p=u[s];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(p===-2)h=!0,f++;else if(p!==-1){s++;break}}if(l._contentTypeTextTrailing&&i===n.length&&(f=0),f){const p={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={...p.start},o.start.offset===o.end.offset?Object.assign(o,p):(n.splice(i,0,["enter",p,l],["exit",p,l]),i+=2)}i++}return n}const Ux=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:YE},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:Rm},flow:{35:QE,42:Fl,45:[Hm,Fl],60:ex,61:Hm,95:Fl,96:Dm,126:Dm},flowInitial:{[-2]:uu,[-1]:uu,32:uu},insideSpan:{null:[su,jx]},string:{38:zm,92:Om},text:{[-5]:fu,[-4]:fu,[-3]:fu,33:bx,38:zm,42:su,60:[SE,ox],91:Sx,92:[ZE,Om],93:cu,95:su,96:ME}},Symbol.toStringTag,{value:"Module"}));function Hx(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:I(H),check:I(R),consume:k,enter:A,exit:q,interrupt:I(R,{interrupt:!0})},p={code:null,containerState:{},defineSkip:E,events:[],now:C,parser:n,previous:null,sliceSerialize:v,sliceStream:y,write:b};let g=l.tokenize.call(p,h);return l.resolveAll&&s.push(l),p;function b(ie){return c=dn(c,ie),T(),c[c.length-1]!==null?[]:(Y(l,0),p.events=ou(s,p.events,p),p.events)}function v(ie,D){return Px(y(ie),D)}function y(ie){return qx(c,ie)}function C(){const{_bufferIndex:ie,_index:D,line:re,column:w,offset:V}=o;return{_bufferIndex:ie,_index:D,line:re,column:w,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 k(ie){Ie(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++)),p.previous=ie}function A(ie,D){const re=D||{};return re.type=ie,re.start=C(),p.events.push(["enter",re,p]),f.push(re),re}function q(ie){const D=f.pop();return D.end=C(),p.events.push(["exit",D,p]),D}function H(ie,D){Y(ie,D.from)}function R(ie,D){D.restore()}function I(ie,D){return re;function re(w,V,Z){let Q,se,de,B;return Array.isArray(w)?U(w):"tokenize"in w?U([w]):N(w);function N(we){return Te;function Te(Ae){const ke=Ae!==null&&we[Ae],Pe=Ae!==null&&we.null,ve=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return U(ve)(Ae)}}function U(we){return Q=we,se=0,we.length===0?Z:z(we[se])}function z(we){return Te;function Te(Ae){return B=F(),de=we,we.partial||(p.currentConstruct=we),we.name&&p.parser.constructs.disable.null.includes(we.name)?ce():we.tokenize.call(D?Object.assign(Object.create(p),D):p,h,ne,ce)(Ae)}}function ne(we){return ie(de,B),V}function ce(we){return B.restore(),++se<Q.length?z(Q[se]):Z}}}function Y(ie,D){ie.resolveAll&&!s.includes(ie)&&s.push(ie),ie.resolve&&zn(p.events,D,p.events.length-D,ie.resolve(p.events.slice(D),p)),ie.resolveTo&&(p.events=ie.resolveTo(p.events,p))}function F(){const ie=C(),D=p.previous,re=p.currentConstruct,w=p.events.length,V=Array.from(f);return{from:w,restore:Z};function Z(){o=ie,p.previous=D,p.currentConstruct=re,p.events.length=w,f=V,$()}}function $(){o.line in u&&o.column<2&&(o.column=u[o.line],o.offset+=u[o.line]-1)}}function qx(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 Px(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
|
+
`}),z.jsxs(da,{className:b,children:[z.jsx("div",{className:"flex-shrink-0 sticky top-0 z-50",children:z.jsx(r1,{onClose:l,title:s,iconUrl:i,startNewConversation:o})}),z.jsx("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col",children:u}),c&&z.jsx("div",{className:"flex-shrink-0 sticky bottom-0 z-50",children:z.jsx(q.Suspense,{fallback:null,children:z.jsx(i1,{value:c.value,onChange:c.onChange,onSend:c.onSend,onFileChange:c.onFileChange,onRecording:c.onRecording,isRecording:c.isRecording,hasAttachment:c.hasAttachment,attachmentFiles:c.attachmentFiles,isDisabled:c.isDisabled,isMobile:f,placeholder:c.placeholder,recordingStatus:c.recordingStatus})})})]})]})}function Wh(){const[n,l]=q.useState(typeof navigator<"u"?navigator.onLine:!0);return q.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]=q.useState([]),[s,c]=q.useState(!1),[f,h]=q.useState(0),[p,g]=q.useState(!1),[b,v]=q.useState([]),y=q.useRef(null),C=q.useRef(null),{isOnline:E}=Wh(),{agentId:T,setSessionId:_,setSessionToken:A,sessionId:k,sessionToken:P,setError:H,setConnectionStatus:D,setShowRetryButton:B,setStartNewConnection:Y,setIsStreaming:F,setIsWaitingForResponse:$,isStreaming:ie,initialMessage:M,isWaitingForResponse:re,setProgressMessage:w,setRecordingStatus:V,clearSession:Z,addMessageToSession:Q,getMessagesForSession:se,updateMessageInSession:de,setInitialMessage:I}=Yr();q.useEffect(()=>{E?p?U()&&(D(Ge.ConnectionStatus.CONNECTED),ne()):D(Ge.ConnectionStatus.CONNECTING):D(Ge.ConnectionStatus.NOT_CONNECTED)},[E,p]),q.useEffect(()=>{if(k){const S=se(k)||[];u(S),v([])}},[k]),q.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:D(Ge.ConnectionStatus.NOT_CONNECTED),B(!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"}),B(!0);break}},onSessionRefreshed:K=>{K?.session_id&&K?.session_token&&(_(K.session_id),A(K.session_token))}}});return y.current=S,g(!0),()=>{g(!1),y.current?.endSession(),y.current=null,C.current&&(clearTimeout(C.current),C.current=null)}},[T,n,l]),q.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]),q.useEffect(()=>{const S=o[o.length-1];return()=>{S&&!S?.isStored&&k&&Q(k,{...S,isStored:!0})}},[]),q.useEffect(()=>(C.current&&(clearTimeout(C.current),C.current=null),re&&!ie?C.current=setTimeout(()=>{$(!1),C.current=null},3e4):ie&&C.current&&(clearTimeout(C.current),C.current=null),()=>{C.current&&(clearTimeout(C.current),C.current=null)}),[re,ie,$]);const N=async(S=!1)=>{try{if(!y.current){H({title:"SDK not initialized",description:"Please ensure agentId is configured"}),c(!1);return}c(!0);let K;S?(await Z(),ne(),K=await y.current.startSession()):K=await y.current.startSession({session_id:k||"",session_token:P||""}),K?.session_id&&K?.session_token&&(_(K.session_id),A(K.session_token),K?.initial_message?.text&&K?.initial_message?.suggestions?.length&&I(K.initial_message)),ce()}catch{H({title:"Something Went wrong!",description:"Please try again later."}),c(!1);return}finally{c(!1)}},U=()=>y.current?.isConnected()??!1,O=()=>{y.current?.endSession()},ne=()=>{h(0),B(!1),Y(!1),H(null)},ce=()=>{y.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,j=K.messageId,L=K.timestamp;u(X=>{const he=X[X.length-1];if(he&&he.id===j&&he.role===On.ASSISTANT){const ge=[...X];return ge[ge.length-1]={...he,content:he.content+W},ge}else return[...X,{id:j,content:W,role:On.ASSISTANT,timestamp:fa(L??Date.now()),isStored:!1}]})}}),y.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM,()=>{F(!1),w(null)}),y.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.CONNECTED,()=>{ne(),D(Ge.ConnectionStatus.CONNECTED)}),y.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,j=K.timestamp??Date.now();u(L=>{const X=L[L.length-1];if(X.id===W&&X.role===On.ASSISTANT){const he=[...L],ge={...X,toolEscalationData:{...K.data,isResponded:!1},isResponseFromTool:!0};return he[L.length-1]=ge,de(k,W,ge),he}else{const he={id:W,content:K.data?.text||"",role:On.ASSISTANT,toolEscalationData:{...K.data,isResponded:!1},isResponseFromTool:!0,timestamp:fa(j),isStored:!1};return[...L,he]}})}),y.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,S=>{D(Ge.ConnectionStatus.NOT_CONNECTED),f<2?(h(K=>K+1),B(!0)):Y(!0)}),y.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.ERROR,S=>{B(!0)}),y.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),w(null)}),y.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE,S=>{const K=S;K.data?.text&&($(!1),w(K.data.text))})},we=async({message:S,messageId:K,files:W,audio:j,toolCalled:L})=>{if(!U()||W&&W.length<0&&S?.trim()===""&&!j?.audio)return;H(null);const X=o.length==2&&b.length==2?b:null;if(S||W&&W.length>0||j?.audio){const he=o.length-1,ge=he>=0?o[he]:null,le=ge?ge?.isResponseFromTool||ge.role===On.ASSISTANT&&ge.toolEscalationData:null;await y.current?.sendMessage({message:S,files:W,audio:j,...X&&{initial_prompts:X},...le&&!L?{tool_declined:!0,tool_id:ge?.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:O,isReady:p,startRecording:async()=>{if(!U())throw new Error("Not connected to the server");try{await y.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:()=>{U()&&y.current?.endRecording()},handleRetry:async()=>{if(!U())ne(),await N(!1);else{const S=o[o.length-1];S&&S.role===On.USER&&y.current?.sendMessage({message:S.content,files:S.files||[],messageId:S.id})}},isValidFile:S=>{const K=S.type.toLowerCase(),j=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(j):!1},handleStartNewConnection:async()=>{ne(),await Z(),await N(!0)},callTool:async(S,K)=>{try{if(!U())throw new Error("Not connected to the server");const W=await y.current?.callTool(S,K);if(!W)throw new Error("Failed to call tool");return W}catch(W){throw W}},handleInitialTaskClick:async S=>{if(!M?.suggestions.length||!S)return;const K=M.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=q.lazy(()=>Promise.resolve().then(()=>Gw)),s1=q.lazy(()=>Promise.resolve().then(()=>Kw)),u1=q.lazy(()=>Promise.resolve().then(()=>Jw).then(n=>({default:n.ConnectionStatus})));function c1({isOpen:n,agentId:l,config:i}){const[o,u]=q.useState(""),[s,c]=q.useState(!1),[f,h]=q.useState(!1),[p,g]=q.useState([]),b=q.useRef(!1),v=q.useRef(null),y=q.useRef(null),[C,E]=q.useState(!1),T=q.useRef(0),{setAgentId:_,startNewConnection:A,showRetryButton:k,clearError:P,error:H,connectionStatus:D,recordingStatus:B,isWaitingForResponse:Y,isStreaming:F,setError:$,initialMessage:ie}=Yr(),{incomingMessages:M,loading:re,sendMessage:w,startSession:V,isReady:Z,startRecording:Q,stopRecording:se,handleRetry:de,handleStartNewConnection:I,isValidFile:N,callTool:U,handleInitialTaskClick:O}=l1({environment:"production",onInlineText:j=>{u(L=>L+j)}});q.useEffect(()=>{l&&(_(l),n&&Z&&!b.current&&(b.current=!0,V(!1)))},[n,Z,l]);const ne=()=>v.current?.querySelector("[data-radix-scroll-area-viewport]")||null,ce=()=>{const j=ne();j&&(j.scrollTo({top:j.scrollHeight,behavior:"smooth"}),E(!1))},we=()=>{const j=ne();return j?j.scrollHeight-j.scrollTop-j.clientHeight<50:!0};q.useEffect(()=>{M.length>T.current&&(setTimeout(()=>{ce()},100),T.current=M.length)},[M.length]),q.useEffect(()=>{const j=ne();if(!j)return;const L=()=>{E(!we())},X=()=>{L()},he=new MutationObserver(()=>{L()});return he.observe(j,{childList:!0,subtree:!0}),j.addEventListener("scroll",X),L(),()=>{he.disconnect(),j.removeEventListener("scroll",X)}},[M.length]);const Te=M.length>0,ke=D===Ge.ConnectionStatus.CONNECTED,Ae=re||!ke||Y||F,Pe=re||!ke,ve=q.useMemo(()=>B===Ft.IDLE?null:B===Ft.LISTENING?"Listening...":B===Ft.PROCESSING?"Processing...":B===Ft.TRANSCRIBING?"Transcribing...":null,[B]),ze=Pe?"Connecting...":ve||(Y||F?"Please wait for the response...":"Ask me anything…"),je=async()=>{if(!Ae&&(o.trim()||s||f)){const j=Date.now().toString();p.length>0?(await w({files:p,message:o.trim(),messageId:j}),g([]),h(!1)):o.trim()&&await w({message:o,messageId:j}),u(""),c(!1),h(!1),setTimeout(()=>{ce()},100)}},S=async j=>{j&&await O(j)},K=j=>{if(j&&j.length>0){const L=j.filter(X=>N(X)?!0:($({title:`File type not supported: ${X.name}`,description:"Only PDF, images (JPG, JPEG, PNG, HEIC), documents (DOCX, TIFF), and text files (TXT, MD) are allowed."}),!1));if(L?.length>0)j=L;else return}g(L=>(h((L?.length??0)+(j?.length??0)>0),[...L,...j]))},W=async()=>{if(s)await se(),c(!1);else{if(Ae)return;try{await Q(),c(!0)}catch{}}};return z.jsx(a1,{isOpen:n,onClose:i.onClose,title:i.title,iconUrl:i.iconUrl,onStartNewSession:()=>V(!0),chatComposer:{value:o,onChange:u,onSend:je,onFileChange:K,onRecording:W,isRecording:s,hasAttachment:f,attachmentFiles:p,isDisabled:Ae,placeholder:ze,recordingStatus:B},children:!re&&z.jsx(q.Suspense,{fallback:z.jsx(f1,{}),children:z.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl relative",children:[z.jsx(Ud,{ref:v,className:"flex-1 min-h-0",children:z.jsxs("div",{className:Ye("transition-all duration-300",Te?"p-4 space-y-3":"p-6 space-y-6"),children:[!Te&&ie?.text?z.jsx(s1,{tasks:ie.suggestions,initialPrompt:ie.text,onTaskClick:S,disabled:Ae}):z.jsx(o1,{messages:M,onSendMessage:w,iconUrl:i.iconUrl,callTool:U}),z.jsx("div",{ref:y})]})}),C&&z.jsx("div",{className:"absolute bottom-20 left-1/2 transform -translate-x-1/2 z-10",children:z.jsx(kt,{onClick:ce,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:z.jsx(Rs,{className:"w-5 h-5 text-slate-700"})})}),z.jsx(u1,{className:"mt-2",onRetry:de,onStartNewSession:I,showRetryButton:k,startNewConnection:A,clearError:P,error:H,isConnected:ke})]})})})}function f1(){return z.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl animate-pulse",children:[z.jsxs("div",{className:"flex-1 p-6 space-y-4",children:[z.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),z.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),z.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"})]}),z.jsx("div",{className:"h-24 border-t border-gray-100 bg-gray-50"})]})}function d1({agentId:n,config:l}){const[i,o]=q.useState(!1);q.useEffect(()=>{o(!0)},[]);const u=()=>{o(!1),l?.onClose?.()};return z.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(z.jsx(q.StrictMode,{children:z.jsx(d1,{agentId:l,config:i||{}})}))};typeof window<"u"&&(window.renderMedAssist=$h);const em=q.forwardRef(({className:n,...l},i)=>z.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:h,placeholder:p,isMobile:g,recordingStatus:b}){const v=q.useRef(null),y=q.useRef(null),C=n.trim().length>0||c,E=(h||b!==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"),_=D=>{const B=Array.from(D.target.files||[]);B.length>0&&o(B)},A=()=>{h||v.current?.click()},k=D=>{D.key==="Enter"&&!D.shiftKey&&C&&!h&&(D.preventDefault(),i())},P=D=>{D.style.height="auto",D.style.overflow="hidden";const B=D.scrollHeight,Y=40,F=120,$=Math.max(Y,Math.min(B,F));D.style.height=$+"px",B>F?D.style.overflow="auto":D.style.overflow="hidden"},H=D=>{P(D.currentTarget)};return q.useEffect(()=>{y.current&&P(y.current)},[n]),q.useEffect(()=>{!h&&!g&&y.current?.focus()},[h]),z.jsxs("div",{className:"border-t border-white/20 bg-white/70 backdrop-blur-xl p-4",children:[z.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"}),z.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",h&&"opacity-60"),children:[c&&f.length>0&&z.jsxs("span",{className:"text-xs text-lavender-600 mr-2",children:[f.length," file(s)"]}),z.jsx(em,{ref:y,onInput:H,placeholder:p,value:n,onChange:D=>l(D.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:k,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"}),z.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:z.jsx(ES,{className:"w-5 h-5"})}),s?z.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:z.jsx(_S,{className:"w-4 h-4"})}):z.jsx(kt,{type:"button",variant:"ghost",size:"icon",onClick:u,disabled:E,className:T,title:"Start recording",children:z.jsx(SS,{className:"w-5 h-5"})}),C&&!h&&z.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:z.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 qe=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:qe,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:qe,allowPaymentRequest:qe,allowUserMedia:qe,alt:null,as:null,async:qe,autoCapitalize:null,autoComplete:ft,autoFocus:qe,autoPlay:qe,blocking:ft,capture:null,charSet:null,checked:qe,cite:null,className:ft,cols:xe,colSpan:null,content:null,contentEditable:xt,controls:qe,controlsList:ft,coords:xe|gi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qe,defer:qe,dir:null,dirName:null,disabled:qe,download:Xs,draggable:xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qe,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:qe,inputMode:null,integrity:null,is:null,isMap:qe,itemId:null,itemProp:ft,itemRef:ft,itemScope:qe,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qe,low:xe,manifest:null,max:null,maxLength:xe,media:null,method:null,min:null,minLength:xe,multiple:qe,muted:qe,name:null,nonce:null,noModule:qe,noValidate:qe,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:qe,optimum:xe,pattern:null,ping:ft,placeholder:null,playsInline:qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qe,referrerPolicy:null,rel:ft,required:qe,reversed:qe,rows:xe,rowSpan:xe,sandbox:ft,scope:null,scoped:qe,seamless:qe,selected:qe,shadowRootClonable:qe,shadowRootDelegatesFocus:qe,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:qe,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:qe,declare:qe,event:null,face:null,frame:null,frameBorder:null,hSpace:xe,leftMargin:xe,link:null,longDesc:null,lowSrc:null,marginHeight:xe,marginWidth:xe,noResize:qe,noHref:qe,noShade:qe,noWrap:qe,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:qe,disableRemotePlayback:qe,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:qe,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,h=`
|
|
44
|
+
`,p="/",g="*",b="",v="comment",y="declaration";function C(T,_){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];_=_||{};var A=1,k=1;function P(w){var V=w.match(l);V&&(A+=V.length);var Z=w.lastIndexOf(h);k=~Z?w.length-Z:k+w.length}function H(){var w={line:A,column:k};return function(V){return V.position=new D(w),F(),V}}function D(w){this.start=w,this.end={line:A,column:k},this.source=_.source}D.prototype.content=T;function B(w){var V=new Error(_.source+":"+A+":"+k+": "+w);if(V.reason=w,V.filename=_.source,V.line=A,V.column=k,V.source=T,!_.silent)throw V}function Y(w){var V=w.exec(T);if(V){var Z=V[0];return P(Z),T=T.slice(Z.length),V}}function F(){Y(i)}function $(w){var V;for(w=w||[];V=ie();)V!==!1&&w.push(V);return w}function ie(){var w=H();if(!(p!=T.charAt(0)||g!=T.charAt(1))){for(var V=2;b!=T.charAt(V)&&(g!=T.charAt(V)||p!=T.charAt(V+1));)++V;if(V+=2,b===T.charAt(V-1))return B("End of comment missing");var Z=T.slice(2,V-2);return k+=2,P(Z),T=T.slice(V),k+=2,w({type:v,comment:Z})}}function M(){var w=H(),V=Y(o);if(V){if(ie(),!Y(u))return B("property missing ':'");var Z=Y(s),Q=w({type:y,property:E(V[0].replace(n,b)),value:Z?E(Z[0].replace(n,b)):b});return Y(c),Q}}function re(){var w=[];$(w);for(var V;V=M();)V!==!1&&(w.push(V),$(w));return w}return F(),re()}function E(T){return T?T.replace(f,b):b}return Ws=C,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(h=>{if(h.type!=="declaration")return;const{property:p,value:g}=h;f?u(p,g,h):g&&(s=s||{},s[p]=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(p){return!p||i.test(p)||n.test(p)},c=function(p,g){return g.toUpperCase()},f=function(p,g){return"".concat(g,"-")},h=function(p,g){return g===void 0&&(g={}),s(p)?p:(p=p.toLowerCase(),g.reactCompat?p=p.replace(u,f):p=p.replace(o,f),p.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 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 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}}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(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 p=Array.isArray(c.children)?i:l;return f?p(s,c,f):p(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 p=u.get(h)||0;c=h+"-"+p,u.set(h,p+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(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(k){if(o<i.length){const P=i[o];return l.containerState=P[1],n.attempt(P[0].continuation,h,p)(k)}return p(k)}function h(k){if(o++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,u&&A();const P=l.events.length;let H=P,D;for(;H--;)if(l.events[H][0]==="exit"&&l.events[H][1].type==="chunkFlow"){D=l.events[H][1].end;break}_(o);let B=P;for(;B<l.events.length;)l.events[B][1].end={...D},B++;return zn(l.events,H+1,0,l.events.slice(P)),l.events.length=B,p(k)}return f(k)}function p(k){if(o===i.length){if(!u)return v(k);if(u.currentConstruct&&u.currentConstruct.concrete)return C(k);l.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return l.containerState={},n.check(Nm,g,b)(k)}function g(k){return u&&A(),_(o),v(k)}function b(k){return l.parser.lazy[l.now().line]=o!==i.length,c=l.now().offset,C(k)}function v(k){return l.containerState={},n.attempt(Nm,y,C)(k)}function y(k){return o++,i.push([l.currentConstruct,l.containerState]),v(k)}function C(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,P){const H=l.sliceStream(k);if(P&&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 D=u.events.length;for(;D--;)if(u.events[D][1].start.offset<c&&(!u.events[D][1].end||u.events[D][1].end.offset>c))return;const B=l.events.length;let Y=B,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),D=B;D<l.events.length;)l.events[D][1].end={...$},D++;zn(l.events,Y+1,0,l.events.slice(B)),l.events.length=D}}function _(k){let P=i.length;for(;P-- >k;){const H=i[P];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,h,p,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 b={...n[o][1].end},v={...n[i][1].start};Om(b,-h),Om(v,h),c={type:h>1?"strongSequence":"emphasisSequence",start:b,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},p=[],n[o][1].end.offset-n[o][1].start.offset&&(p=dn(p,[["enter",n[o][1],l],["exit",n[o][1],l]])),p=dn(p,[["enter",u,l],["enter",c,l],["exit",c,l],["enter",s,l]]),p=dn(p,su(l.parser.constructs.insideSpan.null,n.slice(o+1,i),l)),p=dn(p,[["exit",s,l],["enter",f,l],["exit",f,l],["exit",u,l]]),n[i][1].end.offset-n[i][1].start.offset?(g=2,p=dn(p,[["enter",n[i][1],l],["exit",n[i][1],l]])):g=0,zn(n,o-1,i-o+3,p),i=o+p.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 p=n.exit("attentionSequence"),g=Rm(h),b=!g||g===2&&u||i.includes(h),v=!u||u===2&&g||i.includes(o);return p._open=!!(s===42?b:b&&(u||!v)),p._close=!!(s===42?v:v&&(g||!b)),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(y){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(y),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),s}function s(y){return Mn(y)?(n.consume(y),c):y===64?i(y):p(y)}function c(y){return y===43||y===45||y===46||tn(y)?(o=1,f(y)):p(y)}function f(y){return y===58?(n.consume(y),o=0,h):(y===43||y===45||y===46||tn(y))&&o++<32?(n.consume(y),f):(o=0,p(y))}function h(y){return y===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(y),n.exit("autolinkMarker"),n.exit("autolink"),l):y===null||y===32||y===60||lu(y)?i(y):(n.consume(y),h)}function p(y){return y===64?(n.consume(y),g):fE(y)?(n.consume(y),p):i(y)}function g(y){return tn(y)?b(y):i(y)}function b(y){return y===46?(n.consume(y),o=0,g):y===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(y),n.exit("autolinkMarker"),n.exit("autolink"),l):v(y)}function v(y){if((y===45||tn(y))&&o++<63){const C=y===45?v:b;return n.consume(y),C}return i(y)}}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(b){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(b),n.exit("characterReferenceMarker"),h}function h(b){return b===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(b),n.exit("characterReferenceMarkerNumeric"),p):(n.enter("characterReferenceValue"),s=31,c=tn,g(b))}function p(b){return b===88||b===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(b),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),s=6,c=dE,g):(n.enter("characterReferenceValue"),s=7,c=ou,g(b))}function g(b){if(b===59&&u){const v=n.exit("characterReferenceValue");return c===tn&&!au(o.sliceSerialize(v))?i(b):(n.enter("characterReferenceMarker"),n.consume(b),n.exit("characterReferenceMarker"),n.exit("characterReference"),l)}return c(b)&&u++<s?(n.consume(b),g):i(b)}}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 h;function h(D){return p(D)}function p(D){const B=o.events[o.events.length-1];return s=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,f=D,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),g(D)}function g(D){return D===f?(c++,n.consume(D),g):c<3?i(D):(n.exit("codeFencedFenceSequence"),rt(D)?dt(n,b,"whitespace")(D):b(D))}function b(D){return D===null||Be(D)?(n.exit("codeFencedFence"),o.interrupt?l(D):n.check(jm,E,P)(D)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),v(D))}function v(D){return D===null||Be(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),b(D)):rt(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),dt(n,y,"whitespace")(D)):D===96&&D===f?i(D):(n.consume(D),v)}function y(D){return D===null||Be(D)?b(D):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),C(D))}function C(D){return D===null||Be(D)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),b(D)):D===96&&D===f?i(D):(n.consume(D),C)}function E(D){return n.attempt(u,P,T)(D)}function T(D){return n.enter("lineEnding"),n.consume(D),n.exit("lineEnding"),_}function _(D){return s>0&&rt(D)?dt(n,A,"linePrefix",s+1)(D):A(D)}function A(D){return D===null||Be(D)?n.check(jm,E,P)(D):(n.enter("codeFlowValue"),k(D))}function k(D){return D===null||Be(D)?(n.exit("codeFlowValue"),A(D)):(n.consume(D),k)}function P(D){return n.exit("codeFenced"),l(D)}function H(D,B,Y){let F=0;return $;function $(V){return D.enter("lineEnding"),D.consume(V),D.exit("lineEnding"),ie}function ie(V){return D.enter("codeFencedFence"),rt(V)?dt(D,M,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):M(V)}function M(V){return V===f?(D.enter("codeFencedFenceSequence"),re(V)):Y(V)}function re(V){return V===f?(F++,D.consume(V),re):F>=c?(D.exit("codeFencedFenceSequence"),rt(V)?dt(D,w,"whitespace")(V):w(V)):Y(V)}function w(V){return V===null||Be(V)?(D.exit("codeFencedFence"),B(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(p){return n.enter("codeIndented"),dt(n,s,"linePrefix",5)(p)}function s(p){const g=o.events[o.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(p):i(p)}function c(p){return p===null?h(p):Be(p)?n.attempt(ME,c,h)(p):(n.enter("codeFlowValue"),f(p))}function f(p){return p===null||Be(p)?(n.exit("codeFlowValue"),c(p)):(n.consume(p),f)}function h(p){return n.exit("codeIndented"),l(p)}}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(b){return n.enter("codeText"),n.enter("codeTextSequence"),f(b)}function f(b){return b===96?(n.consume(b),o++,f):(n.exit("codeTextSequence"),h(b))}function h(b){return b===null?i(b):b===32?(n.enter("space"),n.consume(b),n.exit("space"),h):b===96?(s=n.enter("codeTextSequence"),u=0,g(b)):Be(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),h):(n.enter("codeTextData"),p(b))}function p(b){return b===null||b===32||b===96||Be(b)?(n.exit("codeTextData"),h(b)):(n.consume(b),p)}function g(b){return b===96?(n.consume(b),u++,g):u===o?(n.exit("codeTextSequence"),n.exit("codeText"),l(b)):(s.type="codeTextData",p(b))}}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,p;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],p=!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)),!p}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=[],p={};let g,b,v=-1,y=i,C=0,E=0;const T=[E];for(;y;){for(;n.get(++u)[1]!==y;);s.push(u),y._tokenizer||(g=o.sliceStream(y),y.next||g.push(null),b&&c.defineSkip(y.start),y._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),y._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),b=y,y=y.next}for(y=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),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(c.events=[],y?(y._tokenizer=void 0,y.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;)p[C+h[v][0]]=C+h[v][1],C+=h[v][1]-h[v][0]-1;return p}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 p=h||Number.POSITIVE_INFINITY;let g=0;return b;function b(_){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"}),y(_))}function y(_){return _===62?(n.exit("chunkString"),n.exit(f),v(_)):_===null||_===60||Be(_)?i(_):(n.consume(_),_===92?C:y)}function C(_){return _===60||_===62||_===92?(n.consume(_),y):y(_)}function E(_){return!g&&(_===null||_===41||Vt(_))?(n.exit("chunkString"),n.exit(f),n.exit(c),n.exit(o),l(_)):g<p&&_===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 p;function p(y){return n.enter(o),n.enter(u),n.consume(y),n.exit(u),n.enter(s),g}function g(y){return f>999||y===null||y===91||y===93&&!h||y===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(y):y===93?(n.exit(s),n.enter(u),n.consume(y),n.exit(u),n.exit(o),l):Be(y)?(n.enter("lineEnding"),n.consume(y),n.exit("lineEnding"),g):(n.enter("chunkString",{contentType:"string"}),b(y))}function b(y){return y===null||y===91||y===93||Be(y)||f++>999?(n.exit("chunkString"),g(y)):(n.consume(y),h||(h=!rt(y)),y===92?v:b)}function v(y){return y===91||y===92||y===93?(n.consume(y),f++,b):b(y)}}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),p(v))}function p(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,p,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===c||v===null||Be(v)?(n.exit("chunkString"),p(v)):(n.consume(v),v===92?b:g)}function b(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(y){return n.enter("definition"),c(y)}function c(y){return Um.call(o,n,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function f(y){return u=vi(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),y===58?(n.enter("definitionMarker"),n.consume(y),n.exit("definitionMarker"),h):i(y)}function h(y){return Vt(y)?ja(n,p)(y):p(y)}function p(y){return Bm(n,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function g(y){return n.attempt(ZE,b,b)(y)}function b(y){return rt(y)?dt(n,v,"whitespace")(y):v(y)}function v(y){return y===null||Be(y)?(n.exit("definition"),o.parser.defined.push(u),l(y)):i(y)}}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"),p(g))}function h(g){return g===35?(n.consume(g),h):(n.exit("atxHeadingSequence"),f(g))}function p(g){return g===null||g===35||Vt(g)?(n.exit("atxHeadingText"),f(g)):(n.consume(g),p)}}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 p;function p(O){return g(O)}function g(O){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(O),b}function b(O){return O===33?(n.consume(O),v):O===47?(n.consume(O),s=!0,E):O===63?(n.consume(O),u=3,o.interrupt?l:I):Mn(O)?(n.consume(O),c=String.fromCharCode(O),T):i(O)}function v(O){return O===45?(n.consume(O),u=2,y):O===91?(n.consume(O),u=5,f=0,C):Mn(O)?(n.consume(O),u=4,o.interrupt?l:I):i(O)}function y(O){return O===45?(n.consume(O),o.interrupt?l:I):i(O)}function C(O){const ne="CDATA[";return O===ne.charCodeAt(f++)?(n.consume(O),f===ne.length?o.interrupt?l:M:C):i(O)}function E(O){return Mn(O)?(n.consume(O),c=String.fromCharCode(O),T):i(O)}function T(O){if(O===null||O===47||O===62||Vt(O)){const ne=O===47,ce=c.toLowerCase();return!ne&&!s&&qm.includes(ce)?(u=1,o.interrupt?l(O):M(O)):nx.includes(c.toLowerCase())?(u=6,ne?(n.consume(O),_):o.interrupt?l(O):M(O)):(u=7,o.interrupt&&!o.parser.lazy[o.now().line]?i(O):s?A(O):k(O))}return O===45||tn(O)?(n.consume(O),c+=String.fromCharCode(O),T):i(O)}function _(O){return O===62?(n.consume(O),o.interrupt?l:M):i(O)}function A(O){return rt(O)?(n.consume(O),A):$(O)}function k(O){return O===47?(n.consume(O),$):O===58||O===95||Mn(O)?(n.consume(O),P):rt(O)?(n.consume(O),k):$(O)}function P(O){return O===45||O===46||O===58||O===95||tn(O)?(n.consume(O),P):H(O)}function H(O){return O===61?(n.consume(O),D):rt(O)?(n.consume(O),H):k(O)}function D(O){return O===null||O===60||O===61||O===62||O===96?i(O):O===34||O===39?(n.consume(O),h=O,B):rt(O)?(n.consume(O),D):Y(O)}function B(O){return O===h?(n.consume(O),h=null,F):O===null||Be(O)?i(O):(n.consume(O),B)}function Y(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||Vt(O)?H(O):(n.consume(O),Y)}function F(O){return O===47||O===62||rt(O)?k(O):i(O)}function $(O){return O===62?(n.consume(O),ie):i(O)}function ie(O){return O===null||Be(O)?M(O):rt(O)?(n.consume(O),ie):i(O)}function M(O){return O===45&&u===2?(n.consume(O),Z):O===60&&u===1?(n.consume(O),Q):O===62&&u===4?(n.consume(O),N):O===63&&u===3?(n.consume(O),I):O===93&&u===5?(n.consume(O),de):Be(O)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(ix,U,re)(O)):O===null||Be(O)?(n.exit("htmlFlowData"),re(O)):(n.consume(O),M)}function re(O){return n.check(ax,w,U)(O)}function w(O){return n.enter("lineEnding"),n.consume(O),n.exit("lineEnding"),V}function V(O){return O===null||Be(O)?re(O):(n.enter("htmlFlowData"),M(O))}function Z(O){return O===45?(n.consume(O),I):M(O)}function Q(O){return O===47?(n.consume(O),c="",se):M(O)}function se(O){if(O===62){const ne=c.toLowerCase();return qm.includes(ne)?(n.consume(O),N):M(O)}return Mn(O)&&c.length<8?(n.consume(O),c+=String.fromCharCode(O),se):M(O)}function de(O){return O===93?(n.consume(O),I):M(O)}function I(O){return O===62?(n.consume(O),N):O===45&&u===2?(n.consume(O),I):M(O)}function N(O){return O===null||Be(O)?(n.exit("htmlFlowData"),U(O)):(n.consume(O),N)}function U(O){return n.exit("htmlFlow"),l(O)}}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(I){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(I),h}function h(I){return I===33?(n.consume(I),p):I===47?(n.consume(I),H):I===63?(n.consume(I),k):Mn(I)?(n.consume(I),Y):i(I)}function p(I){return I===45?(n.consume(I),g):I===91?(n.consume(I),s=0,C):Mn(I)?(n.consume(I),A):i(I)}function g(I){return I===45?(n.consume(I),y):i(I)}function b(I){return I===null?i(I):I===45?(n.consume(I),v):Be(I)?(c=b,Q(I)):(n.consume(I),b)}function v(I){return I===45?(n.consume(I),y):b(I)}function y(I){return I===62?Z(I):I===45?v(I):b(I)}function C(I){const N="CDATA[";return I===N.charCodeAt(s++)?(n.consume(I),s===N.length?E:C):i(I)}function E(I){return I===null?i(I):I===93?(n.consume(I),T):Be(I)?(c=E,Q(I)):(n.consume(I),E)}function T(I){return I===93?(n.consume(I),_):E(I)}function _(I){return I===62?Z(I):I===93?(n.consume(I),_):E(I)}function A(I){return I===null||I===62?Z(I):Be(I)?(c=A,Q(I)):(n.consume(I),A)}function k(I){return I===null?i(I):I===63?(n.consume(I),P):Be(I)?(c=k,Q(I)):(n.consume(I),k)}function P(I){return I===62?Z(I):k(I)}function H(I){return Mn(I)?(n.consume(I),D):i(I)}function D(I){return I===45||tn(I)?(n.consume(I),D):B(I)}function B(I){return Be(I)?(c=B,Q(I)):rt(I)?(n.consume(I),B):Z(I)}function Y(I){return I===45||tn(I)?(n.consume(I),Y):I===47||I===62||Vt(I)?F(I):i(I)}function F(I){return I===47?(n.consume(I),Z):I===58||I===95||Mn(I)?(n.consume(I),$):Be(I)?(c=F,Q(I)):rt(I)?(n.consume(I),F):Z(I)}function $(I){return I===45||I===46||I===58||I===95||tn(I)?(n.consume(I),$):ie(I)}function ie(I){return I===61?(n.consume(I),M):Be(I)?(c=ie,Q(I)):rt(I)?(n.consume(I),ie):F(I)}function M(I){return I===null||I===60||I===61||I===62||I===96?i(I):I===34||I===39?(n.consume(I),u=I,re):Be(I)?(c=M,Q(I)):rt(I)?(n.consume(I),M):(n.consume(I),w)}function re(I){return I===u?(n.consume(I),u=void 0,V):I===null?i(I):Be(I)?(c=re,Q(I)):(n.consume(I),re)}function w(I){return I===null||I===34||I===39||I===60||I===61||I===96?i(I):I===47||I===62||Vt(I)?F(I):(n.consume(I),w)}function V(I){return I===47||I===62||Vt(I)?F(I):i(I)}function Z(I){return I===62?(n.consume(I),n.exit("htmlTextData"),n.exit("htmlText"),l):i(I)}function Q(I){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(I),n.exit("lineEnding"),se}function se(I){return rt(I)?dt(n,de,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):de(I)}function de(I){return n.enter("htmlTextData"),c(I)}}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}},p={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",p,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",p,l]]),f=dn(f,n.slice(c+1)),f=dn(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?b(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"),h):i(v)}function h(v){return v===40?n.attempt(dx,g,c?g:b)(v):v===91?n.attempt(hx,g,c?p:b)(v):c?g(v):b(v)}function p(v){return n.attempt(mx,g,b)(v)}function g(v){return l(v)}function b(v){return s._balanced=!0,i(v)}}function bx(n,l,i){return o;function o(b){return n.enter("resource"),n.enter("resourceMarker"),n.consume(b),n.exit("resourceMarker"),u}function u(b){return Vt(b)?ja(n,s)(b):s(b)}function s(b){return b===41?g(b):Bm(n,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function c(b){return Vt(b)?ja(n,h)(b):g(b)}function f(b){return i(b)}function h(b){return b===34||b===39||b===40?Hm(n,p,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):g(b)}function p(b){return Vt(b)?ja(n,g)(b):g(b)}function g(b){return b===41?(n.enter("resourceMarker"),n.consume(b),n.exit("resourceMarker"),n.exit("resource"),l):i(b)}}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(p){return n.enter("thematicBreak"),c(p)}function c(p){return u=p,f(p)}function f(p){return p===u?(n.enter("thematicBreakSequence"),h(p)):o>=3&&(p===null||Be(p))?(n.exit("thematicBreak"),l(p)):i(p)}function h(p){return p===u?(n.consume(p),o++,h):(n.exit("thematicBreakSequence"),rt(p)?dt(n,f,"whitespace")(p):f(p))}}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(y){const C=o.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!o.containerState.marker||y===o.containerState.marker:ou(y)){if(o.containerState.type||(o.containerState.type=C,n.enter(C,{_container:!0})),C==="listUnordered")return n.enter("listItemPrefix"),y===42||y===45?n.check(Yl,i,p)(y):p(y);if(!o.interrupt||y===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),h(y)}return i(y)}function h(y){return ou(y)&&++c<10?(n.consume(y),h):(!o.interrupt||c<2)&&(o.containerState.marker?y===o.containerState.marker:y===41||y===46)?(n.exit("listItemValue"),p(y)):i(y)}function p(y){return n.enter("listItemMarker"),n.consume(y),n.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||y,n.check(Fl,o.interrupt?i:g,n.attempt(Ax,v,b))}function g(y){return o.containerState.initialBlankLine=!0,s++,v(y)}function b(y){return rt(y)?(n.enter("listItemPrefixWhitespace"),n.consume(y),n.exit("listItemPrefixWhitespace"),v):i(y)}function v(y){return o.containerState.size=s+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,l(y)}}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(p){let g=o.events.length,b;for(;g--;)if(o.events[g][1].type!=="lineEnding"&&o.events[g][1].type!=="linePrefix"&&o.events[g][1].type!=="content"){b=o.events[g][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||b)?(n.enter("setextHeadingLine"),u=p,c(p)):i(p)}function c(p){return n.enter("setextHeadingLineSequence"),f(p)}function f(p){return p===u?(n.consume(p),f):(n.exit("setextHeadingLineSequence"),rt(p)?dt(n,h,"lineSuffix")(p):h(p))}function h(p){return p===null||Be(p)?(n.exit("setextHeadingLine"),l(p)):i(p)}}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 p(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 p(g)?(i.exit("data"),s(g)):(i.consume(g),h)}function p(g){if(g===null)return!0;const b=u[g];let v=-1;if(b)for(;++v<b.length;){const y=b[v];if(!y.previous||y.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 p=u[s];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(p===-2)h=!0,f++;else if(p!==-1){s++;break}}if(l._contentTypeTextTrailing&&i===n.length&&(f=0),f){const p={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={...p.start},o.start.offset===o.end.offset?Object.assign(o,p):(n.splice(i,0,["enter",p,l],["exit",p,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:B(H),check:B(D),consume:A,enter:k,exit:P,interrupt:B(D,{interrupt:!0})},p={code:null,containerState:{},defineSkip:E,events:[],now:C,parser:n,previous:null,sliceSerialize:v,sliceStream:y,write:b};let g=l.tokenize.call(p,h);return l.resolveAll&&s.push(l),p;function b(ie){return c=dn(c,ie),T(),c[c.length-1]!==null?[]:(Y(l,0),p.events=su(s,p.events,p),p.events)}function v(ie,M){return Vx(y(ie),M)}function y(ie){return Yx(c,ie)}function C(){const{_bufferIndex:ie,_index:M,line:re,column:w,offset:V}=o;return{_bufferIndex:ie,_index:M,line:re,column:w,offset:V}}function E(ie){u[ie.line]=ie.column,$()}function T(){let ie;for(;o._index<c.length;){const M=c[o._index];if(typeof M=="string")for(ie=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===ie&&o._bufferIndex<M.length;)_(M.charCodeAt(o._bufferIndex));else _(M)}}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++)),p.previous=ie}function k(ie,M){const re=M||{};return re.type=ie,re.start=C(),p.events.push(["enter",re,p]),f.push(re),re}function P(ie){const M=f.pop();return M.end=C(),p.events.push(["exit",M,p]),M}function H(ie,M){Y(ie,M.from)}function D(ie,M){M.restore()}function B(ie,M){return re;function re(w,V,Z){let Q,se,de,I;return Array.isArray(w)?U(w):"tokenize"in w?U([w]):N(w);function N(we){return Te;function Te(ke){const Ae=ke!==null&&we[ke],Pe=ke!==null&&we.null,ve=[...Array.isArray(Ae)?Ae:Ae?[Ae]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return U(ve)(ke)}}function U(we){return Q=we,se=0,we.length===0?Z:O(we[se])}function O(we){return Te;function Te(ke){return I=F(),de=we,we.partial||(p.currentConstruct=we),we.name&&p.parser.constructs.disable.null.includes(we.name)?ce():we.tokenize.call(M?Object.assign(Object.create(p),M):p,h,ne,ce)(ke)}}function ne(we){return ie(de,I),V}function ce(we){return I.restore(),++se<Q.length?O(Q[se]):Z}}}function Y(ie,M){ie.resolveAll&&!s.includes(ie)&&s.push(ie),ie.resolve&&zn(p.events,M,p.events.length-M,ie.resolve(p.events.slice(M),p)),ie.resolveTo&&(p.events=ie.resolveTo(p.events,p))}function F(){const ie=C(),M=p.previous,re=p.currentConstruct,w=p.events.length,V=Array.from(f);return{from:w,restore:Z};function Z(){o=ie,p.previous=M,p.currentConstruct=re,p.events.length=w,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=`
|
|
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 Fx(n){const o={constructs:aE([Ux,...(n||{}).extensions||[]]),content:u(hE),defined:[],document:u(pE),flow:u(Mx),lazy:{},string:u(Lx),text:u(Bx)};return o;function u(s){return c;function c(f){return Hx(o,s,f)}}}function Yx(n){for(;!jm(n););return n}const Fm=/[\0\t\n\r]/g;function Vx(){let n=1,l="",i=!0,o;return u;function u(s,c,f){const h=[];let p,g,b,v,y;for(s=l+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),b=0,l="",i&&(s.charCodeAt(0)===65279&&b++,i=void 0);b<s.length;){if(Fm.lastIndex=b,p=Fm.exec(s),v=p&&p.index!==void 0?p.index:s.length,y=s.charCodeAt(v),!p){l=s.slice(b);break}if(y===10&&b===v&&o)h.push(-3),o=void 0;else switch(o&&(h.push(-5),o=void 0),b<v&&(h.push(s.slice(b,v)),n+=v-b),y){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}b=v+1}return f&&(o&&h.push(-5),l&&h.push(l),h.push(null)),h}}const Gx=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Xx(n){return n.replace(Gx,Zx)}function Zx(n,l,i){if(l)return l;if(i.charCodeAt(0)===35){const u=i.charCodeAt(1),s=u===120||u===88;return Tm(i.slice(s?2:1),s?16:10)}return iu(i)||n}const Ym={}.hasOwnProperty;function Kx(n,l,i){return typeof l!="string"&&(i=l,l=void 0),Qx(i)(Yx(Fx(i).document().write(Vx()(n,l,!0))))}function Qx(n){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(X),autolinkProtocol:F,autolinkEmail:F,atxHeading:s(K),blockQuote:s(Pe),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(j,c),htmlFlowData:F,htmlText:s(j,c),htmlTextData:F,image:s(L),label:c,link:s(X),listItem:s(ge),listItemValue:v,listOrdered:s(he,b),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:h(),atxHeadingSequence:H,autolink:h(),autolinkEmail:ke,autolinkProtocol:Ae,blockQuote:h(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:we,characterReference:Te,codeFenced:h(T),codeFencedFence:E,codeFencedFenceInfo:y,codeFencedFenceMeta:C,codeFlowValue:$,codeIndented:h(_),codeText:h(V),codeTextData:$,data:$,definition:h(),definitionDestinationString:q,definitionLabelString:k,definitionTitleString:A,emphasis:h(),hardBreakEscape:h(D),hardBreakTrailing:h(D),htmlFlow:h(re),htmlFlowData:$,htmlText:h(w),htmlTextData:$,image:h(Q),label:de,labelText:se,lineEnding:ie,link:h(Z),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ne,resourceDestinationString:B,resourceTitleString:N,resource:U,setextHeading:h(Y),setextHeadingLineSequence:I,setextHeadingText:R,strong:h(),thematicBreak:h()}};Vm(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:p,buffer:c,resume:g,data:i},Be=[];let Je=-1;for(;++Je<te.length;)if(te[Je][1].type==="listOrdered"||te[Je][1].type==="listUnordered")if(te[Je][0]==="enter")Be.push(Je);else{const pt=Be.pop();Je=u(te,pt,Je)}for(Je=-1;++Je<te.length;){const pt=l[te[Je][0]];Ym.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]||Gm).call(Ce,void 0,pt[0])}for(be.position={start:dr(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:dr(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 Be=be-1,Je=-1,pt=!1,qt,Xe,gt,Ot;for(;++Be<=Ce;){const Ze=te[Be];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=Be),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=Be;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||Be,0,["exit",qt,Ze[2]]),Be++,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(Be,0,["enter",Cn,Ze[2]]),Be++,Ce++,gt=void 0,Ot=!0}}}return te[be][1]._spread=pt,Ce}function s(te,be){return Ce;function Ce(Be){f.call(this,te(Be),Be),be&&be.call(this,Be)}}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:dr(be.start),end:void 0}}function h(te){return be;function be(Ce){te&&te.call(this,Ce),p.call(this,Ce)}}function p(te,be){const Ce=this.stack.pop(),Be=this.tokenStack.pop();if(Be)Be[0].type!==te.type&&(be?be.call(this,te,Be[0]):(Be[1]||Gm).call(this,te,Be[0]));else throw new Error("Cannot close `"+te.type+"` ("+Oa({start:te.start,end:te.end})+"): it’s not open");Ce.position.end=dr(te.end)}function g(){return rE(this.stack.pop())}function b(){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 y(){const te=this.resume(),be=this.stack[this.stack.length-1];be.lang=te}function C(){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 k(te){const be=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=be,Ce.identifier=bi(this.sliceSerialize(te)).toLowerCase()}function A(){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 R(){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 Be=Ce[Ce.length-1];(!Be||Be.type!=="text")&&(Be=_e(),Be.position={start:dr(te.start),end:void 0},Ce.push(Be)),this.stack.push(Be)}function $(te){const be=this.stack.pop();be.value+=this.sliceSerialize(te),be.position.end=dr(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=dr(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 re(){const te=this.resume(),be=this.stack[this.stack.length-1];be.value=te}function w(){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=Xx(be),Ce.identifier=bi(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 Be=te.children;Ce.children=Be}else Ce.alt=be}function B(){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 U(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function ne(te){const be=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=be,Ce.identifier=bi(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 Be;Ce?(Be=Tm(be,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Be=iu(be);const Je=this.stack[this.stack.length-1];Je.value+=Be}function Te(te){const be=this.stack.pop();be.position.end=dr(te.end)}function Ae(te){$.call(this,te);const be=this.stack[this.stack.length-1];be.url=this.sliceSerialize(te)}function ke(te){$.call(this,te);const be=this.stack[this.stack.length-1];be.url="mailto:"+this.sliceSerialize(te)}function Pe(){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 j(){return{type:"html",value:""}}function L(){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 ge(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 dr(n){return{line:n.line,column:n.column,offset:n.offset}}function Vm(n,l){let i=-1;for(;++i<l.length;){const o=l[i];Array.isArray(o)?Vm(n,o):Jx(n,o)}}function Jx(n,l){let i;for(i in l)if(Ym.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 Gm(n,l){throw n?new Error("Cannot close `"+n.type+"` ("+Oa({start:n.start,end:n.end})+"): a different token (`"+l.type+"`, "+Oa({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+Oa({start:l.start,end:l.end})+") is still open")}function Wx(n){const l=this;l.parser=i;function i(o){return Kx(o,{...l.data("settings"),...n,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function $x(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 e_(n,l){const i={type:"element",tagName:"br",properties:{},children:[]};return n.patch(l,i),[n.applyData(l,i),{type:"text",value:`
|
|
47
|
-
`}]}function
|
|
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
|
|
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 p,g,b,v,y;for(s=l+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),b=0,l="",i&&(s.charCodeAt(0)===65279&&b++,i=void 0);b<s.length;){if(Vm.lastIndex=b,p=Vm.exec(s),v=p&&p.index!==void 0?p.index:s.length,y=s.charCodeAt(v),!p){l=s.slice(b);break}if(y===10&&b===v&&o)h.push(-3),o=void 0;else switch(o&&(h.push(-5),o=void 0),b<v&&(h.push(s.slice(b,v)),n+=v-b),y){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}b=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(X),autolinkProtocol:F,autolinkEmail:F,atxHeading:s(K),blockQuote:s(Pe),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(j,c),htmlFlowData:F,htmlText:s(j,c),htmlTextData:F,image:s(L),label:c,link:s(X),listItem:s(ge),listItemValue:v,listOrdered:s(he,b),listUnordered:s(he),paragraph:s(le),reference:O,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(K),strong:s(Ee),thematicBreak:s(Se)},exit:{atxHeading:h(),atxHeadingSequence:H,autolink:h(),autolinkEmail:Ae,autolinkProtocol:ke,blockQuote:h(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:we,characterReference:Te,codeFenced:h(T),codeFencedFence:E,codeFencedFenceInfo:y,codeFencedFenceMeta:C,codeFlowValue:$,codeIndented:h(_),codeText:h(V),codeTextData:$,data:$,definition:h(),definitionDestinationString:P,definitionLabelString:A,definitionTitleString:k,emphasis:h(),hardBreakEscape:h(M),hardBreakTrailing:h(M),htmlFlow:h(re),htmlFlowData:$,htmlText:h(w),htmlTextData:$,image:h(Q),label:de,labelText:se,lineEnding:ie,link:h(Z),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ne,resourceDestinationString:I,resourceTitleString:N,resource:U,setextHeading:h(Y),setextHeadingLineSequence:B,setextHeadingText:D,strong:h(),thematicBreak:h()}};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:p,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 h(te){return be;function be(Ce){te&&te.call(this,Ce),p.call(this,Ce)}}function p(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 b(){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 y(){const te=this.resume(),be=this.stack[this.stack.length-1];be.lang=te}function C(){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 P(){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 D(){this.data.setextHeadingSlurpLineEnding=!0}function B(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 M(){this.data.atHardBreak=!0}function re(){const te=this.resume(),be=this.stack[this.stack.length-1];be.value=te}function w(){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 I(){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 U(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function ne(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 Pe(){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 j(){return{type:"html",value:""}}function L(){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 ge(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:`
|
|
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=Si(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 p={type:"element",tagName:"sup",properties:{},children:[h]};return n.patch(l,p),n.applyData(l,p)}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:Si(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:Si(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:Si(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:Si(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 b;g&&g.type==="element"&&g.tagName==="p"?b=g:(b={type:"element",tagName:"p",properties:{},children:[]},o.unshift(b)),b.children.length>0&&b.children.unshift({type:"text",value:" "}),b.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
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 p={type:"element",tagName:"li",properties:s,children:c};return n.patch(l,p),n.applyData(l,p)}function
|
|
50
|
+
`});const p={type:"element",tagName:"li",properties:s,children:c};return n.patch(l,p),n.applyData(l,p)}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 p=[];for(;++h<f;){const b=l.children[h],v={},y=c?c[h]:void 0;y&&(v.align=y);let C={type:"element",tagName:s,properties:v,children:[]};b&&(C.children=n.all(b),n.patch(b,C),C=n.applyData(b,C)),p.push(C)}const g={type:"element",tagName:"tr",properties:{},children:n.wrap(p,!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,p]of c)f[o(h)]=o(p);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,p]of c)f.set(o(h),o(p));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),Ei="",{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,Ei];case"Object":return[Xl,Ei];case"Date":return[hu,Ei];case"RegExp":return[mu,Ei];case"Map":return[pu,Ei];case"Set":return[gu,Ei];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=[],b=u([f,g],c);for(const v of c)g.push(s(v));return b}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=[],b=u([f,g],c);for(const v of R_(c))(n||!Zl(Ia(c[v])))&&g.push([s(v),s(c[v])]);return b}case hu:return u([f,c.toISOString()],c);case mu:{const{source:g,flags:b}=c;return u([f,{source:g,flags:b}],c)}case pu:{const g=[],b=u([f,g],c);for(const[v,y]of c)(n||!(Zl(Ia(v))||Zl(Ia(y))))&&g.push([s(v),s(y)]);return b}case gu:{const g=[],b=u([f,g],c);for(const v of c)(n||!Zl(Ia(v)))&&g.push(s(v));return b}}const{message:p}=c;return u([f,{name:h,message:p}],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 p=n.footnoteById.get(n.footnoteOrder[h]);if(!p)continue;const g=n.all(p),b=String(p.identifier).toUpperCase(),v=Si(b.toLowerCase());let y=0;const C=[],E=n.footnoteCounts.get(b);for(;E!==void 0&&++y<=E;){C.length>0&&C.push({type:"text",value:" "});let A=typeof i=="string"?i:i(h,y);typeof A=="string"&&(A={type:"text",value:A}),C.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+v+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(h,y),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(...C)}else g.push(...C);const _={type:"element",tagName:"li",properties:{id:l+"fn-"+v},children:n.wrap(g,!0)};n.patch(p,_),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
|
|
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,p,g){const b=h&&typeof h=="object"?h:{};if(typeof b.type=="string"){const y=typeof b.tagName=="string"?b.tagName:typeof b.name=="string"?b.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(h.type+(y?"<"+y+">":""))+")"})}return v;function v(){let y=op,C,E,T;if((!l||s(h,p,g[g.length-1]||void 0))&&(y=F_(i(h,g)),y[0]===sp))return y;if("children"in h&&h.children){const _=h;if(_.children&&y[0]!==q_)for(E=(o?_.children.length:-1)+c,T=g.concat(_);E>-1&&E<_.children.length;){const A=_.children[E];if(C=f(A,E,T)(),C[0]===sp)return C;E=typeof C[1]=="number"?C[1]:E+c}}return y}}}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,p){const g=p[p.length-1],b=g?g.children.indexOf(h):void 0;return c(h,b,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:p,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 b=g.type==="definition"?o:u,v=String(g.identifier).toUpperCase();b.has(v)||b.set(v,g)}}),f;function h(g,b){const v=g.type,y=f.handlers[v];if(yu.call(f.handlers,v)&&y)return y(f,g,b);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,b)}function p(g){const b=[];if("children"in g){const v=g.children;let y=-1;for(;++y<v.length;){const C=f.one(v[y],g);if(C){if(y&&v[y-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=cp(C.value)),!Array.isArray(C)&&C.type==="element")){const E=C.children[0];E&&E.type==="text"&&(E.value=cp(E.value))}Array.isArray(C)?b.push(...C):b.push(C)}}}return b}}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
|
-
`}),i}function
|
|
56
|
-
`},u),s}function X_(n,l){return n&&"run"in n?async function(i,o){const u=up(i,{file:o,...l});await n.run(u,o)}:function(i,o){return up(i,{file:o,...n||l})}}function cp(n){if(n)throw n}var yu,fp;function Z_(){if(fp)return yu;fp=1;var n=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u=function(p){return typeof Array.isArray=="function"?Array.isArray(p):l.call(p)==="[object Array]"},s=function(p){if(!p||l.call(p)!=="[object Object]")return!1;var g=n.call(p,"constructor"),b=p.constructor&&p.constructor.prototype&&n.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!g&&!b)return!1;var v;for(v in p);return typeof v>"u"||n.call(p,v)},c=function(p,g){i&&g.name==="__proto__"?i(p,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):p[g.name]=g.newValue},f=function(p,g){if(g==="__proto__")if(n.call(p,g)){if(o)return o(p,g).value}else return;return p[g]};return yu=function h(){var p,g,b,v,y,C,E=arguments[0],T=1,_=arguments.length,k=!1;for(typeof E=="boolean"&&(k=E,E=arguments[1]||{},T=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});T<_;++T)if(p=arguments[T],p!=null)for(g in p)b=f(E,g),v=f(p,g),E!==v&&(k&&v&&(s(v)||(y=u(v)))?(y?(y=!1,C=b&&u(b)?b:[]):C=b&&s(b)?b:{},c(E,{name:g,newValue:h(k,C,v)})):typeof v<"u"&&c(E,{name:g,newValue:v}));return E},yu}var K_=Z_();const bu=hs(K_);function vu(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 Q_(){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,...p){const g=n[++s];let b=-1;if(h){c(h);return}for(;++b<u.length;)(p[b]===null||p[b]===void 0)&&(p[b]=u[b]);u=p,g?J_(g,f)(...p):c(null,...p)}}function o(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return n.push(u),l}}function J_(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(p){const g=p;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:W_,dirname:$_,extname:ew,join:tw,sep:"/"};function W_(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 $_(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 ew(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 tw(...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?".":nw(i)}function nw(n){Ba(n);const l=n.codePointAt(0)===47;let i=rw(n,!l);return i.length===0&&!l&&(i="."),i.length>0&&n.codePointAt(n.length-1)===47&&(i+="/"),l?"/"+i:i}function rw(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 iw={cwd:aw};function aw(){return"/"}function Su(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function lw(n){if(typeof n=="string")n=new URL(n);else if(!Su(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 ow(n)}function ow(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 Eu=["history","path","basename","stem","extname","dirname"];class dp{constructor(l){let i;l?Su(l)?i={path:l}:typeof l=="string"||sw(l)?i={value:l}:i=l:i={},this.cwd="cwd"in i?"":iw.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<Eu.length;){const s=Eu[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)Eu.includes(u)||(this[u]=i[u])}get basename(){return typeof this.path=="string"?Dn.basename(this.path):void 0}set basename(l){_u(l,"basename"),xu(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){hp(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(xu(l,"extname"),hp(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){Su(l)&&(l=lw(l)),_u(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){_u(l,"stem"),xu(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 xu(n,l){if(n&&n.includes(Dn.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+Dn.sep+"`")}function _u(n,l){if(!n)throw new Error("`"+l+"` cannot be empty")}function hp(n,l){if(!n)throw new Error("Setting `"+l+"` requires `path` to be set too")}function sw(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const uw=(function(n){const o=this.constructor.prototype,u=o[n],s=function(){return u.apply(s,arguments)};return Object.setPrototypeOf(s,o),s}),cw={}.hasOwnProperty;class wu extends uw{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=Q_()}copy(){const l=new wu;let i=-1;for(;++i<this.attachers.length;){const o=this.attachers[i];l.use(...o)}return l.data(bu(!0,{},this.namespace)),l}data(l,i){return typeof l=="string"?arguments.length===2?(ku("data",this.frozen),this.namespace[l]=i,this):cw.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=Ql(l),o=this.parser||this.Parser;return Cu("parse",o),o(String(i),i)}process(l,i){const o=this;return this.freeze(),Cu("process",this.parser||this.Parser),Tu("process",this.compiler||this.Compiler),i?u(void 0,i):new Promise(u);function u(s,c){const f=Ql(l),h=o.parse(f);o.run(h,f,function(g,b,v){if(g||!b||!v)return p(g);const y=b,C=o.stringify(y,v);hw(C)?v.value=C:v.result=C,p(g,v)});function p(g,b){g||!b?c(g):s?s(b):i(void 0,b)}}}processSync(l){let i=!1,o;return this.freeze(),Cu("processSync",this.parser||this.Parser),Tu("processSync",this.compiler||this.Compiler),this.process(l,u),pp("processSync","process",i),o;function u(s,c){i=!0,cp(s),o=c}}run(l,i,o){mp(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=Ql(i);u.run(l,h,p);function p(g,b,v){const y=b||l;g?f(g):c?c(y):o(void 0,y,v)}}}runSync(l,i){let o=!1,u;return this.run(l,i,s),pp("runSync","run",o),u;function s(c,f){cp(c),u=f,o=!0}}stringify(l,i){this.freeze();const o=Ql(i),u=this.compiler||this.Compiler;return Tu("stringify",u),mp(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(p){if(typeof p=="function")h(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[g,...b]=p;h(g,b)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))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(p.plugins),p.settings&&(u.settings=bu(!0,u.settings,p.settings))}function f(p){let g=-1;if(p!=null)if(Array.isArray(p))for(;++g<p.length;){const b=p[g];s(b)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function h(p,g){let b=-1,v=-1;for(;++b<o.length;)if(o[b][0]===p){v=b;break}if(v===-1)o.push([p,...g]);else if(g.length>0){let[y,...C]=g;const E=o[v][1];vu(E)&&vu(y)&&(y=bu(!0,E,y)),o[v]=[p,y,...C]}}}}const fw=new wu().freeze();function Cu(n,l){if(typeof l!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Tu(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 mp(n){if(!vu(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function pp(n,l,i){if(!i)throw new Error("`"+n+"` finished async. Use `"+l+"` instead")}function Ql(n){return dw(n)?n:new dp(n)}function dw(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function hw(n){return typeof n=="string"||mw(n)}function mw(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const pw="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",gp=[],yp={allowDangerousHtml:!0},gw=/^(https?|ircs?|mailto|xmpp)$/i,yw=[{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 bw(n){const l=vw(n),i=Sw(n);return Ew(l.runSync(l.parse(i),i),n)}function vw(n){const l=n.rehypePlugins||gp,i=n.remarkPlugins||gp,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...yp}:yp;return fw().use(Wx).use(i).use(X_,o).use(l)}function Sw(n){const l=n.children||"",i=new dp;return typeof l=="string"&&(i.value=l),i}function Ew(n,l){const i=l.allowedElements,o=l.allowElement,u=l.components,s=l.disallowedElements,c=l.skipHtml,f=l.unwrapDisallowed,h=l.urlTransform||xw;for(const g of yw)Object.hasOwn(l,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+pw+g.id,void 0);return op(n,p),H1(n,{Fragment:M.Fragment,components:u,ignoreInvalidStyle:!0,jsx:M.jsx,jsxs:M.jsxs,passKeys:!0,passNode:!0});function p(g,b,v){if(g.type==="raw"&&v&&typeof b=="number")return c?v.children.splice(b,1):v.children[b]={type:"text",value:g.value},b;if(g.type==="element"){let y;for(y in ru)if(Object.hasOwn(ru,y)&&Object.hasOwn(g.properties,y)){const C=g.properties[y],E=ru[y];(E===null||E.includes(g.tagName))&&(g.properties[y]=h(String(C||""),y,g))}}if(g.type==="element"){let y=i?!i.includes(g.tagName):s?s.includes(g.tagName):!1;if(!y&&o&&typeof b=="number"&&(y=!o(g,b,v)),y&&v&&typeof b=="number")return f&&g.children?v.children.splice(b,1,...g.children):v.children.splice(b,1),b}}}function xw(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||gw.test(n.slice(0,l))?n:""}function _w({text:n,maxWidth:l="200px",className:i="",icon:o,onClick:u,disabled:s=!1}){const[c,f]=P.useState(!1),h=P.useRef(null),p=P.useRef(null);return P.useEffect(()=>{const g=()=>{if(h.current&&p.current){const b=h.current.offsetWidth,v=p.current.scrollWidth;f(v>b)}};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[n,l]),n?M.jsxs("div",{ref:h,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&&M.jsx("span",{className:"text-lavender-500",children:o}),M.jsx("div",{className:"pill-marquee-wrapper",children:M.jsx("span",{ref:p,className:Ye("block whitespace-normal",c?"pill-marquee":""),children:n})})]}):null}var ww=Kf[" useInsertionEffect ".trim().toString()]||sr;function Cw({prop:n,defaultProp:l,onChange:i=()=>{},caller:o}){const[u,s,c]=Tw({defaultProp:l,onChange:i}),f=n!==void 0,h=f?n:u;{const g=P.useRef(n!==void 0);P.useEffect(()=>{const b=g.current;if(b!==f){const v=b?"controlled":"uncontrolled",y=f?"controlled":"uncontrolled"}g.current=f},[f,o])}const p=P.useCallback(g=>{if(f){const b=kw(g)?g(n):g;b!==n&&c.current?.(b)}else s(g)},[f,n,s,c]);return[h,p]}function Tw({defaultProp:n,onChange:l}){const[i,o]=P.useState(n),u=P.useRef(i),s=P.useRef(l);return ww(()=>{s.current=l},[l]),P.useEffect(()=>{u.current!==i&&(s.current?.(i),u.current=i)},[i,u]),[i,o,s]}function kw(n){return typeof n=="function"}function Aw(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 Nw(n){const[l,i]=P.useState(void 0);return sr(()=>{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,p=Array.isArray(h)?h[0]:h;c=p.inlineSize,f=p.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 Jl="Checkbox",[Rw]=id(Jl),[Ow,Au]=Rw(Jl);function zw(n){const{__scopeCheckbox:l,checked:i,children:o,defaultChecked:u,disabled:s,form:c,name:f,onCheckedChange:h,required:p,value:g="on",internal_do_not_use_render:b}=n,[v,y]=Cw({prop:i,defaultProp:u??!1,onChange:h,caller:Jl}),[C,E]=P.useState(null),[T,_]=P.useState(null),k=P.useRef(!1),A=C?!!c||!!C.closest("form"):!0,q={checked:v,disabled:s,setChecked:y,control:C,setControl:E,name:f,form:c,value:g,hasConsumerStoppedPropagationRef:k,required:p,defaultChecked:hr(u)?!1:u,isFormControl:A,bubbleInput:T,setBubbleInput:_};return M.jsx(Ow,{scope:l,...q,children:Mw(b)?b(q):o})}var bp="CheckboxTrigger",vp=P.forwardRef(({__scopeCheckbox:n,onKeyDown:l,onClick:i,...o},u)=>{const{control:s,value:c,disabled:f,checked:h,required:p,setControl:g,setChecked:b,hasConsumerStoppedPropagationRef:v,isFormControl:y,bubbleInput:C}=Au(bp,n),E=Hn(u,g),T=P.useRef(h);return P.useEffect(()=>{const _=s?.form;if(_){const k=()=>b(T.current);return _.addEventListener("reset",k),()=>_.removeEventListener("reset",k)}},[s,b]),M.jsx(or.button,{type:"button",role:"checkbox","aria-checked":hr(h)?"mixed":h,"aria-required":p,"data-state":wp(h),"data-disabled":f?"":void 0,disabled:f,value:c,...o,ref:E,onKeyDown:qn(l,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:qn(i,_=>{b(k=>hr(k)?!0:!k),C&&y&&(v.current=_.isPropagationStopped(),v.current||_.stopPropagation())})})});vp.displayName=bp;var Nu=P.forwardRef((n,l)=>{const{__scopeCheckbox:i,name:o,checked:u,defaultChecked:s,required:c,disabled:f,value:h,onCheckedChange:p,form:g,...b}=n;return M.jsx(zw,{__scopeCheckbox:i,checked:u,defaultChecked:s,disabled:f,required:c,onCheckedChange:p,name:o,form:g,value:h,internal_do_not_use_render:({isFormControl:v})=>M.jsxs(M.Fragment,{children:[M.jsx(vp,{...b,ref:l,__scopeCheckbox:i}),v&&M.jsx(_p,{__scopeCheckbox:i})]})})});Nu.displayName=Jl;var Sp="CheckboxIndicator",Ep=P.forwardRef((n,l)=>{const{__scopeCheckbox:i,forceMount:o,...u}=n,s=Au(Sp,i);return M.jsx(ci,{present:o||hr(s.checked)||s.checked===!0,children:M.jsx(or.span,{"data-state":wp(s.checked),"data-disabled":s.disabled?"":void 0,...u,ref:l,style:{pointerEvents:"none",...n.style}})})});Ep.displayName=Sp;var xp="CheckboxBubbleInput",_p=P.forwardRef(({__scopeCheckbox:n,...l},i)=>{const{control:o,hasConsumerStoppedPropagationRef:u,checked:s,defaultChecked:c,required:f,disabled:h,name:p,value:g,form:b,bubbleInput:v,setBubbleInput:y}=Au(xp,n),C=Hn(i,y),E=Aw(s),T=Nw(o);P.useEffect(()=>{const k=v;if(!k)return;const A=window.HTMLInputElement.prototype,H=Object.getOwnPropertyDescriptor(A,"checked").set,R=!u.current;if(E!==s&&H){const I=new Event("click",{bubbles:R});k.indeterminate=hr(s),H.call(k,hr(s)?!1:s),k.dispatchEvent(I)}},[v,E,s,u]);const _=P.useRef(hr(s)?!1:s);return M.jsx(or.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??_.current,required:f,disabled:h,name:p,value:g,form:b,...l,tabIndex:-1,ref:C,style:{...l.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});_p.displayName=xp;function Mw(n){return typeof n=="function"}function hr(n){return n==="indeterminate"}function wp(n){return hr(n)?"indeterminate":n?"checked":"unchecked"}const Ru=P.forwardRef(({className:n,...l},i)=>M.jsx(Nu,{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:M.jsx(Ep,{className:Ye("grid place-content-center text-current"),children:M.jsx(Zd,{className:"h-4 w-4"})})}));Ru.displayName=Nu.displayName;var Vr=(n=>(n.NOTA="none_of_the_above",n.AOTA="all_of_the_above",n))(Vr||{});function Dw({options:n,selectedValues:l,onSelectionChange:i,additionalOption:o,className:u,required:s=!0,maxSelections:c,error:f,disabled:h}){const p=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=_=>p?_.filter(k=>k!==p.value):_,b=_=>p?o==="none_of_the_above"?_?[p.value]:[]:o==="all_of_the_above"?_?[...n.map(k=>k.value),p.value]:g(l):_?[...l,p.value]:g(l):l,v=(_,k)=>{const A=p?g(l):l;return k?c&&A.length>=c?null:[...A,_]:A.filter(q=>q!==_)},y=_=>!(s&&_.length===0&&l.length===1),C=(_,k)=>{const q=p&&_===p.value?b(k):v(_,k);q!==null&&y(q)&&i(q)},E=!s||l.length>0,T=p?l.filter(_=>_!==p.value).length:l.length;return n.length?M.jsxs("div",{className:Ye("bg-gray-50","rounded-lg","p-4","border border-gray-200",u),children:[M.jsxs("div",{className:"space-y-3",children:[n.map(_=>{const k=h||c&&T>=c&&!l.includes(_.value);return M.jsxs("div",{className:"flex items-center space-x-3",children:[M.jsx(Ru,{id:_.id,checked:!!l.includes(_.value),disabled:!!k,onCheckedChange:A=>C(_.value,!!A),className:"mt-0.5 border border-muted-foreground"}),M.jsx("label",{htmlFor:_.id,className:Ye("text-sm font-medium leading-none cursor-pointer",k?"text-muted-foreground cursor-not-allowed":"text-secondary-foreground"),children:_.label})]},_.id)}),p&&M.jsxs(M.Fragment,{children:[M.jsx("div",{className:"border-t border-gray-300 my-3"}),M.jsxs("div",{className:"flex items-center space-x-3",children:[M.jsx(Ru,{id:p.id,checked:l.includes(p.value),onCheckedChange:_=>C(p.value,_),className:"mt-0.5 border border-muted-foreground"}),M.jsx("label",{htmlFor:p.id,className:"text-sm font-medium leading-none cursor-pointer text-secondary-foreground",children:p.label})]})]})]}),f&&M.jsx("p",{className:"text-sm text-red-500 mt-3",children:f}),s&&!E&&M.jsx("p",{className:"text-sm text-red-500 mt-3",children:"Please select at least one option"}),c&&T>=c&&M.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 Cp({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,p=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",b=v=>{if(v===0)return"0 B";const y=1024,C=["B","KB","MB","GB"],E=Math.floor(Math.log(v)/Math.log(y));return`${(v/Math.pow(y,E)).toFixed(1)} ${C[E]}`.toLowerCase()};return!h||u?M.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:[M.jsx("div",{className:`flex-shrink-0 ${g()}`,children:M.jsx(pS,{className:"h-5 w-5"})}),M.jsxs("div",{className:"flex-1 min-w-0 max-w-[200px]",children:[n?.name&&M.jsx("div",{className:"text-sm font-medium text-[var(--color-foreground)] truncate",children:n.name}),n?.size&&M.jsx("div",{className:"text-xs text-[var(--color-muted-foreground)]",children:b(n.size)})]}),i&&l&&M.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:M.jsx(Rs,{className:"h-4 w-4"})})]}):M.jsxs("div",{className:`relative group flex-shrink-0 ${o}`,children:[M.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&&M.jsx("img",{src:c,alt:n.name,className:"w-full h-full object-cover",onError:()=>s(!0)})}),i&&l&&M.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:M.jsx(Rs,{className:"h-3 w-3 text-black"})})]})}function jw({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 M.jsxs("div",{className:`flex flex-wrap justify-end gap-2 max-w-full ${o}`,children:[s.map(c=>{const f=n.indexOf(c);return M.jsx(Cp,{file:c,onRemove:l?()=>l(f):void 0,isPreview:i},`${c.name}-${c.size}-${f}`)}),u.length>0&&M.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 M.jsx(Cp,{file:c,onRemove:l?()=>l(f):void 0,isPreview:i},`${c.name}-${c.size}-${f}`)})})]})}function Lw({value:n,onValueChange:l,placeholder:i="Select an option",className:o,triggerClassName:u,contentClassName:s,disabled:c=!1,options:f=[],size:h="default"}){const[p,g]=P.useState(!1),b=P.useRef(null),v=P.useRef(null),y=f.find(T=>T.value===n);P.useEffect(()=>{const T=_=>{p&&_.key==="Escape"&&(g(!1),v.current?.focus())};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[p]);const C=T=>{l?.(T),g(!1),v.current?.focus()},E=()=>{c||g(!p)};return M.jsxs("div",{className:Ye("relative w-full",o),children:[M.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',h==="default"?"min-h-9":"min-h-8",u),"aria-expanded":p,"aria-haspopup":"listbox",children:[M.jsx("span",{className:Ye("flex-1 text-left min-w-0 overflow-hidden break-words line-clamp-2",!y&&"text-muted-foreground"),children:y?y.label:i}),M.jsx(Ns,{className:Ye("size-4 opacity-50 pointer-events-none shrink-0 transition-transform duration-200",p&&"rotate-180")})]}),p&&M.jsx("div",{ref:b,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:M.jsx("div",{className:"p-1",children:f.length===0?M.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 M.jsxs("div",{onClick:()=>C(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:k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),c||C(T.value))},children:[M.jsx("span",{className:"flex-1 text-left min-w-0 break-words line-clamp-2",children:T.label}),_&&M.jsx("span",{className:"absolute right-3 flex size-4 items-center justify-center shrink-0 pointer-events-none",children:M.jsx(Zd,{className:"size-4 text-foreground"})})]},T.value)})})})]})}const Bw=n=>n?n.split(" ").map(l=>l[0]).slice(0,2).join("").toUpperCase():"DR",Tp=n=>{const l=n.toLocaleDateString(void 0,{weekday:"short"}).toUpperCase(),i=n.toLocaleDateString(void 0,{day:"2-digit"});return{weekday:l,dayNum:i}},kp=n=>[...n].sort((l,i)=>new Date(l.date).getTime()-new Date(i.date).getTime()),Ap=(n,l)=>(n?.[l]?.slots_details?.length??0)>0;function Iw({doctor:n,availability:l,callbacks:i,onBook:o,disabled:u=!1,getAvailabilityDatesForAppointment:s,getAvailableSlotsForAppointment:c}){const[f,h]=P.useState(!1),[p,g]=P.useState(0),[b,v]=P.useState(null),[y,C]=P.useState(0),[E,T]=P.useState(()=>n.hospitals[0]||null),[_,k]=P.useState(!0),[A,q]=P.useState(!1),[H,R]=P.useState(null),[I,Y]=P.useState(!1),[F,$]=P.useState(null),ie=Fr(ve=>ve.sessionId),D=E?.hospital_id,re=!!i?.[Ge.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES],w=!!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)){k(!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 j=[...Array.from(K.values())];ze.forEach(X=>{K.has(X.date)||j.push(X)});const L=kp(j);R(X=>({...X||{},[D]:{slots_details:L}}))}catch{$("Failed to load availability dates")}finally{k(!1)}}},[n.doctor_id,ie,D,E?.region_id,s,l,H]);P.useEffect(()=>{if(!D)return;const ve=Ap(H,D),ze=Ap(l??null,D);Y(!1),g(0),C(0),v(null),$(null),!ve&&!ze&&re&&ie?Z():k(!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;R(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(j=>j.date===ve?{...j,slots:ze.slots}:j),W=je[D].slots_details.some(j=>j.date===ve)?S:[...S,{date:ve,slots:ze.slots}];return{...je,[D]:{slots_details:kp(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(j=>j.date===S);W>=0&&(je=W)}else{const W=l?.[D]?.slots_details||[],j=ze.findIndex(L=>{const X=W.find(he=>he.date===L.date);return X?.slots&&X.slots.length>0});j>=0&&(je=j)}g(je),C(Math.floor(je/3)*3);const K=ze[je];K&&(!K?.slots||K.slots.length===0)&&w&&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(y/3)*3),S=Math.min(ve.length,je+3);return ve.slice(je,S).map(K=>{const W=new Date(K.date),{weekday:j,dayNum:L}=Tp(W);return{weekday:j,dayNum:L,date:K.date,hasAvailability:!0,fullDate:W,hasSlots:!!(K.slots&&K.slots.length>0)}})}const ze=new Date(Q);return ze.setDate(ze.getDate()+y),Array.from({length:3},(je,S)=>{const K=new Date(ze);K.setDate(ze.getDate()+S);const{weekday:W,dayNum:j}=Tp(K),L=K.toISOString().split("T")[0];return{weekday:W,dayNum:j,date:L,hasAvailability:!1,fullDate:K,hasSlots:!1}})},[Q,y,V,D]),B=P.useMemo(()=>(D?V?.[D]?.slots_details:null)?.[p]||null,[V,D,p]),N=P.useMemo(()=>Bw(n.name),[n.name]),U=P.useCallback(()=>{Y(!0),C(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;C(je=>Math.min(ze,je+3)),v(null)},[D,V]),ne=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);w&&(!S?.slots||S.slots.length===0)&&n.doctor_id&&D&&E?.region_id&&ie&&se(ve)},[D,V,w,n.doctor_id,E?.region_id]),ce=P.useMemo(()=>y>0,[y]),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 y<ze},[y,V,D]),Te=P.useCallback(()=>{o&&B&&b&&o({date:B.date,time:b,doctorData:{doctor:n,hospital_id:D||"",region_id:E?.region_id||""}})},[o,B,b,n,D,E?.region_id]),Ae=P.useMemo(()=>n.hospitals.map(ve=>({value:ve.hospital_id,label:ve.name})),[n.hospitals]),ke=P.useCallback(ve=>{v(ve)},[]),Pe=P.useCallback(ve=>{const ze=n.hospitals.find(je=>je.hospital_id===ve);ze&&T(ze)},[n.hospitals]);return M.jsxs(fa,{className:"max-w-md rounded-xl border-lavender-200 shadow-md p-0 bg-white overflow-hidden","aria-label":"Appointment card",children:[M.jsx(Qd,{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:M.jsxs("div",{className:"flex items-center gap-3",children:[n.profile_pic&&M.jsxs(da,{className:"h-12 w-12 ring-2 ring-lavender-200",children:[M.jsx(ch,{src:n.profile_pic,alt:`${n.name} profile photo`,crossOrigin:"anonymous"}),M.jsx(ha,{className:"bg-lavender-100 text-lavender-700",children:N})]}),M.jsxs("div",{className:"min-w-0",children:[M.jsxs("div",{className:"flex flex-wrap items-baseline gap-2",children:[M.jsx("h3",{className:" text-base font-bold text-slate-900",children:n.name}),n.profile_link?M.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]}),M.jsxs("p",{className:"mt-0.5 text-sm text-slate-600",children:[n.specialty,n.experience&&M.jsxs(M.Fragment,{children:[" • ",n.experience]})]})]})]})}),M.jsxs(Jd,{className:"px-4 py-2",children:[M.jsxs("div",{className:"grid gap-2 border-b border-lavender-100 pb-3",children:[n?.timings&&M.jsxs("div",{className:"flex items-start gap-2 text-sm text-slate-900",children:[M.jsx(mS,{className:"h-4 w-4 text-lavender-600 mt-0.5 flex-shrink-0","aria-hidden":!0}),M.jsx("span",{className:"text-slate-600 text-xs",children:n?.timings})]}),n.languages?M.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[M.jsx(gS,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),M.jsx("span",{className:"text-slate-600",children:n.languages})]}):null,n?.hospitals&&n.hospitals?.length>1?E&&E.name&&M.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[M.jsx(Xd,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),M.jsx(Lw,{options:Ae,placeholder:"Select Hospital",disabled:u,onValueChange:Pe,value:E?.hospital_id||""})]}):E&&E.name&&M.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[M.jsx(Xd,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),M.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]||_?M.jsx(At,{type:"button",variant:"outline","aria-expanded":f,"aria-controls":"ap-slots",onClick:()=>h(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:_?M.jsxs(M.Fragment,{children:[M.jsx(Kd,{className:"h-4 w-4 mr-2 animate-spin"}),"Loading availability..."]}):M.jsxs(M.Fragment,{children:[M.jsx("span",{className:"mr-1",children:f?"Hide slots":"Show available slots"}),M.jsx(Ns,{className:`h-4 w-4 transition-transform ${f?"rotate-180":""}`,"aria-hidden":!0})]})}):M.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:M.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&&M.jsx("div",{id:"ap-slots",role:"region","aria-label":"Available slots",className:"pt-3",children:V?.[E?.hospital_id??""]?.slots_details?.length?M.jsxs(M.Fragment,{children:[M.jsxs("div",{className:"flex items-center gap-2 px-0.5",children:[M.jsx(At,{type:"button",variant:"outline",size:"icon",onClick:U,"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:M.jsx(dS,{className:"h-4 w-4"})}),M.jsx("div",{className:"flex-1 grid grid-cols-3 gap-1 min-w-0",children:de.map((ve,ze)=>{const je=B?.date===ve.date,S=!ve.hasAvailability;return M.jsxs(At,{type:"button",variant:"outline",onClick:()=>!S&&ne(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:[M.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}),M.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}`)})}),M.jsx(At,{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:M.jsx(hS,{className:"h-4 w-4"})})]}),M.jsx("div",{className:"px-0.5 py-3",children:A?M.jsxs("div",{className:"flex items-center justify-center py-4",children:[M.jsx(Kd,{className:"h-4 w-4 animate-spin text-lavender-600 mr-2"}),M.jsx("span",{className:"text-sm text-slate-600",children:"Loading slots..."})]}):B?.slots?.length?M.jsx("div",{className:"grid grid-cols-2 gap-2 max-h-48 overflow-y-auto",children:B.slots.map((ve,ze)=>{const je=b===ve;return M.jsxs(At,{type:"button",variant:"outline",onClick:()=>ke(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:[M.jsx(fS,{className:`h-3.5 w-3.5 flex-shrink-0${je?"text-white":"text-lavender-600"}`}),M.jsx("span",{className:"truncate",children:ve})]},ve||`slot-${ze}`)})}):M.jsx("p",{className:"px-1 text-sm text-slate-600",children:"No slots available for this day."})}),M.jsx("div",{className:"px-0.5 pb-1.5",children:M.jsxs(At,{type:"button",onClick:Te,disabled:!b||u,"aria-disabled":!b,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",M.jsx(cS,{className:"h-4 w-4"})]})})]}):M.jsx("div",{className:"px-1 pb-2 pt-1",children:M.jsx("p",{className:"text-sm text-slate-600",children:F||"No availability provided."})})}),f&&!V?.[E?.hospital_id??""]?.slots_details?.length&&M.jsx("div",{className:"px-1 pb-2 pt-1",children:M.jsx("p",{className:"text-sm text-slate-600",children:F||"No availability provided."})})]})]})}function Uw({callTool:n,doctorDetails:l,callbacks:i,onBook:o,disabled:u=!1}){const[s,c]=P.useState([]),[f,h]=P.useState(!1),[p,g]=P.useState(0),[b,v]=P.useState(null),y=Fr(R=>R.sessionId),C=l.doctor_ids||[],E=C.length,T=Math.min(3,E),_=E-T;P.useEffect(()=>{if(C.length===0||!y)return;(async()=>{h(!0),v(null);try{const Y=C.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{h(!1)}})()},[C,y,T]);const k=async()=>{if(!(p>=E||!y)){h(!0),v(null);try{const I=C.slice(p).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{h(!1)}}},A=R=>{o&&o(R)},q=async R=>{const I=i?.[Ge.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES].tool_name||Ge.SYNAPSE_TOOL_NAME.AVAILABILITY_DATES;return await n(I,{doctor_id:R.doctor_id,hospital_id:R.hospital_id,region_id:R.region_id})},H=async(R,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:R,doctor_id:I.doctor_id,hospital_id:I.hospital_id,region_id:I.region_id})};return f&&s.length===0?M.jsx("div",{className:"flex items-center justify-center py-8",children:M.jsxs("div",{className:"text-center",children:[M.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[var(--color-primary)] mx-auto mb-3"}),M.jsx("p",{className:"text-sm text-gray-500",children:"Loading doctor details..."})]})}):b&&s.length===0?M.jsx("div",{className:"flex items-center justify-center py-8",children:M.jsxs("div",{className:"text-center",children:[M.jsx("p",{className:"text-sm text-red-500 mb-2",children:b}),M.jsx(At,{variant:"outline",size:"sm",onClick:()=>{v(null),C.length>0&&y&&(async()=>{h(!0);try{const Y=C.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{h(!1)}})()},children:"Retry"})]})}):s.length===0?M.jsx("div",{className:"flex items-center justify-center py-2",children:M.jsx("p",{className:"text-sm text-gray-500",children:"No doctor details available."})}):M.jsxs("div",{className:"space-y-4",children:[M.jsx("div",{className:"space-y-4",children:s.map((R,I)=>R?.doctor_id&&M.jsx(Iw,{doctor:R,availability:l.availability,callbacks:i,onBook:A,disabled:u,getAvailabilityDatesForAppointment:q,getAvailableSlotsForAppointment:H},`${I}`))}),p<E&&M.jsx("div",{className:"flex justify-center",children:M.jsx(At,{variant:"outline",onClick:k,disabled:f,className:"px-6 py-2",children:f?M.jsxs(M.Fragment,{children:[M.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)`})}),b&&s.length>0&&M.jsxs("div",{className:"text-center",children:[M.jsx("p",{className:"text-sm text-red-500 mb-2",children:b}),M.jsx(At,{variant:"outline",size:"sm",onClick:k,disabled:f,children:"Retry loading more"})]})]})}function Hw({role:n,content:l,timestamp:i,iconUrl:o,files:u,isLastMessage:s,progressMessage:c,toolEscalationData:f,callTool:h,onSendMessage:p}){const g=n==="user",[b,v]=P.useState([]),y=async A=>{const q=Date.now().toString();await p({message:A,messageId:q,toolCalled:!0})},C=async A=>{await p({message:`I want to book an appointment for ${A.doctorData?.doctor?.name||"the doctor"} on ${A.date} for ${A.time}`,toolCalled:!0})},E=A=>{v(A)},T=()=>{if(!f?.details?.input?.additional_option)return;const A=f.details?.input?.additional_option;if(typeof A=="string"&&(A===Vr.NOTA||A===Vr.AOTA))return A;if(typeof A=="object"&&A!==null){if(A.NOTA===Vr.NOTA)return Vr.NOTA;if(A.AOTA===Vr.AOTA)return Vr.AOTA}},_=()=>{const A=f?.details?.input?.options;return A?Array.isArray(A)?A.map((q,H)=>({id:`option-${H}`,label:q.label,value:q.value})):Object.keys(A).map((q,H)=>({id:`option-${H}`,label:q,value:q})):[]},k=async()=>{if(b.length>0){const A=b.join(", "),q=Date.now().toString();await p({message:A,messageId:q,toolCalled:!0})}};return M.jsx("div",{className:Ye("flex",g?"justify-end":"justify-start"),children:M.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&&M.jsx(da,{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:M.jsx(ha,{className:"bg-transparent text-white text-xs font-bold",children:o?M.jsx("img",{src:o,alt:"Bot Icon",className:"w-full h-full"}):M.jsx(Gd,{className:"w-full h-full"})})}),M.jsxs(fa,{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&&M.jsx("p",{className:"text-sm font-medium text-slate-500 pb-2",children:c}),l&&M.jsx("div",{className:"text-sm markdown-content mb-3",children:M.jsx(bw,{children:l})}),u&&u.length>0&&M.jsx("div",{className:"mt-2",children:M.jsx(jw,{files:u,isPreview:!1,className:""})}),f?.details?.component===Ge.SYNAPSE_COMPONENTS.PILL&&f?.details?.input?.options&&M.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:f.details?.input?.options.map((A,q)=>M.jsx(_w,{disabled:f?.isResponded,text:A?.label||"",onClick:()=>y(A?.value||""),className:"cursor-pointer hover:bg-lavender-100/80 transition-colors"},q))}),f?.details?.component===Ge.SYNAPSE_COMPONENTS.MULTI&&f?.details?.input?.options&&M.jsxs("div",{className:"mt-3 space-y-3 break-words overflow-wrap-anywhere whitespace-pre-wrap",children:[M.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Select multiple options:"}),M.jsx(Dw,{options:_(),selectedValues:b,onSelectionChange:E,additionalOption:T(),disabled:f?.isResponded}),M.jsx(At,{onClick:k,disabled:b.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&&h?M.jsx("div",{className:"mt-3",children:M.jsx(Uw,{doctorDetails:f?.details?.input?.doctor_details,callTool:h,callbacks:f?.details?._meta?.callbacks,onBook:C,disabled:f?.isResponded})}):null,c&&!g&&s&&M.jsx("p",{className:"text-sm font-medium text-teal-600",children:c}),i&&M.jsx("p",{className:Ye("text-xs mt-2 text-right","text-slate-500"),children:i})]})]})})}function qw({messages:n,onSendMessage:l,iconUrl:i,callTool:o}){const u=Fr(c=>c.isWaitingForResponse),s=Fr(c=>c.progressMessage);return M.jsxs(M.Fragment,{children:[(n&&n.length>0||s)&&M.jsx(M.Fragment,{children:n.map((c,f)=>M.jsx("div",{className:"animate-slideUp scroll-mt-[80px]",id:f===n.length-1?"last-message":void 0,children:M.jsx(Hw,{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&&M.jsx(Pw,{iconUrl:i})]})}function Pw({iconUrl:n}){return M.jsx("div",{className:"animate-slideUp",children:M.jsx("div",{className:"flex justify-start",children:M.jsxs("div",{className:"flex gap-3",children:[M.jsx(da,{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:M.jsx(ha,{className:"bg-transparent text-white text-xs font-bold",children:n?M.jsx("img",{src:n,alt:"Bot Icon",className:"w-4 h-4",loading:"lazy"}):M.jsx(Gd,{className:"w-4 h-4"})})}),M.jsx(fa,{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:M.jsxs("div",{className:"flex items-center gap-1.5","aria-label":"Bot is typing",children:[M.jsx("span",{className:"text-sm text-slate-400",children:"Thinking"}),[0,1,2].map(l=>M.jsx("span",{className:"w-2 h-2 rounded-full bg-slate-400 animate-pulse",style:{animationDelay:`${l*150}ms`}},l))]})})]})})})}const Fw=Object.freeze(Object.defineProperty({__proto__:null,default:qw},Symbol.toStringTag,{value:"Module"}));function Yw({onTaskClick:n,disabled:l,tasks:i}){return i?.length?M.jsx("div",{className:"grid grid-cols-2 gap-3",children:i.map(o=>M.jsx(At,{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:M.jsx("div",{className:"flex items-start justify-between gap-3",children:M.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 Vw({initialPrompt:n,tasks:l,onTaskClick:i,disabled:o}){return M.jsxs(M.Fragment,{children:[M.jsx("div",{className:"text-center space-y-2 animate-fadeIn",children:M.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:n||"How can I assist you today?"})}),M.jsx(Yw,{onTaskClick:i,disabled:o,tasks:l})]})}const Gw=Object.freeze(Object.defineProperty({__proto__:null,default:Vw},Symbol.toStringTag,{value:"Module"}));function Xw({className:n="",onRetry:l,onStartNewSession:i,showRetryButton:o,startNewConnection:u,clearError:s,error:c,isConnected:f}){const{isOnline:h}=Qh(),[p,g]=P.useState(!0);return P.useEffect(()=>{if(!u&&!o&&!!c){g(!0);const y=setTimeout(()=>g(!1),5e3);return()=>clearTimeout(y)}g(!0)},[c,u,o]),u?M.jsx("div",{className:Ye("mx-4 mb-3 px-2 py-1 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:M.jsxs("div",{className:"flex items-center gap-3",children:[M.jsx("div",{className:"w-4 h-4 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:M.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),M.jsxs("div",{className:"flex-1",children:[M.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:c?.title??"Something went wrong"}),M.jsx("div",{className:"text-[#666666] text-xs mt-1",children:"Start a new session."})]}),M.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:[M.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:M.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),M.jsx("span",{className:"text-xs font-semibold",children:"Start new chat"})]})]})}):o?M.jsx("div",{className:Ye("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:M.jsxs("div",{className:"flex items-center gap-3",children:[M.jsx("div",{className:"w-5 h-5 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:M.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),M.jsxs("div",{className:"flex-1",children:[M.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:c?.title??"Failed to connect"}),M.jsx("div",{className:"text-slate-500 text-xs mt-1",children:c?.description??"Please check your connection and try again"})]}),M.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:[M.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:M.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&&!p?null:M.jsx("div",{className:Ye("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FDD835] rounded-lg transition-opacity duration-500",n),children:M.jsxs("div",{className:"flex items-center gap-3",children:[M.jsx("div",{className:"w-5 h-5 bg-[#FDD835] rounded-full flex items-center justify-center flex-shrink-0",children:M.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),M.jsxs("div",{className:"flex-1",children:[M.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:h?c?.title||"Connecting...":"No internet connection"}),M.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&&M.jsx("div",{className:"flex-shrink-0",children:M.jsx("div",{className:"w-6 h-6 border-2 border-[#FDD835] border-t-transparent rounded-full animate-spin"})})]})})}const Zw=Object.freeze(Object.defineProperty({__proto__:null,ConnectionStatus:Xw},Symbol.toStringTag,{value:"Module"}));return ds.renderMedAssist=Jh,Object.defineProperty(ds,Symbol.toStringTag,{value:"Module"}),ds})({});
|
|
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(p){return typeof Array.isArray=="function"?Array.isArray(p):l.call(p)==="[object Array]"},s=function(p){if(!p||l.call(p)!=="[object Object]")return!1;var g=n.call(p,"constructor"),b=p.constructor&&p.constructor.prototype&&n.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!g&&!b)return!1;var v;for(v in p);return typeof v>"u"||n.call(p,v)},c=function(p,g){i&&g.name==="__proto__"?i(p,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):p[g.name]=g.newValue},f=function(p,g){if(g==="__proto__")if(n.call(p,g)){if(o)return o(p,g).value}else return;return p[g]};return bu=function h(){var p,g,b,v,y,C,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(p=arguments[T],p!=null)for(g in p)b=f(E,g),v=f(p,g),E!==v&&(A&&v&&(s(v)||(y=u(v)))?(y?(y=!1,C=b&&u(b)?b:[]):C=b&&s(b)?b:{},c(E,{name:g,newValue:h(A,C,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,...p){const g=n[++s];let b=-1;if(h){c(h);return}for(;++b<u.length;)(p[b]===null||p[b]===void 0)&&(p[b]=u[b]);u=p,g?ew(g,f)(...p):c(null,...p)}}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(p){const g=p;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 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),h=o.parse(f);o.run(h,f,function(g,b,v){if(g||!b||!v)return p(g);const y=b,C=o.stringify(y,v);gw(C)?v.value=C:v.result=C,p(g,v)});function p(g,b){g||!b?c(g):s?s(b):i(void 0,b)}}}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,p);function p(g,b,v){const y=b||l;g?f(g):c?c(y):o(void 0,y,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(p){if(typeof p=="function")h(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[g,...b]=p;h(g,b)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))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(p.plugins),p.settings&&(u.settings=vu(!0,u.settings,p.settings))}function f(p){let g=-1;if(p!=null)if(Array.isArray(p))for(;++g<p.length;){const b=p[g];s(b)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function h(p,g){let b=-1,v=-1;for(;++b<o.length;)if(o[b][0]===p){v=b;break}if(v===-1)o.push([p,...g]);else if(g.length>0){let[y,...C]=g;const E=o[v][1];Su(E)&&Su(y)&&(y=vu(!0,E,y)),o[v]=[p,y,...C]}}}}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,p),F1(n,{Fragment:z.Fragment,components:u,ignoreInvalidStyle:!0,jsx:z.jsx,jsxs:z.jsxs,passKeys:!0,passNode:!0});function p(g,b,v){if(g.type==="raw"&&v&&typeof b=="number")return c?v.children.splice(b,1):v.children[b]={type:"text",value:g.value},b;if(g.type==="element"){let y;for(y in iu)if(Object.hasOwn(iu,y)&&Object.hasOwn(g.properties,y)){const C=g.properties[y],E=iu[y];(E===null||E.includes(g.tagName))&&(g.properties[y]=h(String(C||""),y,g))}}if(g.type==="element"){let y=i?!i.includes(g.tagName):s?s.includes(g.tagName):!1;if(!y&&o&&typeof b=="number"&&(y=!o(g,b,v)),y&&v&&typeof b=="number")return f&&g.children?v.children.splice(b,1,...g.children):v.children.splice(b,1),b}}}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]=q.useState(!1),h=q.useRef(null),p=q.useRef(null);return q.useEffect(()=>{const g=()=>{if(h.current&&p.current){const b=h.current.offsetWidth,v=p.current.scrollWidth;f(v>b)}};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[n,l]),n?z.jsxs("div",{ref:h,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&&z.jsx("span",{className:"text-lavender-500",children:o}),z.jsx("div",{className:"pill-marquee-wrapper",children:z.jsx("span",{ref:p,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,h=f?n:u;{const g=q.useRef(n!==void 0);q.useEffect(()=>{const b=g.current;if(b!==f){const v=b?"controlled":"uncontrolled",y=f?"controlled":"uncontrolled"}g.current=f},[f,o])}const p=q.useCallback(g=>{if(f){const b=Rw(g)?g(n):g;b!==n&&c.current?.(b)}else s(g)},[f,n,s,c]);return[h,p]}function Nw({defaultProp:n,onChange:l}){const[i,o]=q.useState(n),u=q.useRef(i),s=q.useRef(l);return Aw(()=>{s.current=l},[l]),q.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=q.useRef({value:n,previous:n});return q.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]=q.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,p=Array.isArray(h)?h[0]:h;c=p.inlineSize,f=p.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:p,value:g="on",internal_do_not_use_render:b}=n,[v,y]=kw({prop:i,defaultProp:u??!1,onChange:h,caller:Wl}),[C,E]=q.useState(null),[T,_]=q.useState(null),A=q.useRef(!1),k=C?!!c||!!C.closest("form"):!0,P={checked:v,disabled:s,setChecked:y,control:C,setControl:E,name:f,form:c,value:g,hasConsumerStoppedPropagationRef:A,required:p,defaultChecked:mr(u)?!1:u,isFormControl:k,bubbleInput:T,setBubbleInput:_};return z.jsx(Dw,{scope:l,...P,children:Lw(b)?b(P):o})}var Sp="CheckboxTrigger",Ep=q.forwardRef(({__scopeCheckbox:n,onKeyDown:l,onClick:i,...o},u)=>{const{control:s,value:c,disabled:f,checked:h,required:p,setControl:g,setChecked:b,hasConsumerStoppedPropagationRef:v,isFormControl:y,bubbleInput:C}=Nu(Sp,n),E=Hn(u,g),T=q.useRef(h);return q.useEffect(()=>{const _=s?.form;if(_){const A=()=>b(T.current);return _.addEventListener("reset",A),()=>_.removeEventListener("reset",A)}},[s,b]),z.jsx(sr.button,{type:"button",role:"checkbox","aria-checked":mr(h)?"mixed":h,"aria-required":p,"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,_=>{b(A=>mr(A)?!0:!A),C&&y&&(v.current=_.isPropagationStopped(),v.current||_.stopPropagation())})})});Ep.displayName=Sp;var Ru=q.forwardRef((n,l)=>{const{__scopeCheckbox:i,name:o,checked:u,defaultChecked:s,required:c,disabled:f,value:h,onCheckedChange:p,form:g,...b}=n;return z.jsx(jw,{__scopeCheckbox:i,checked:u,defaultChecked:s,disabled:f,required:c,onCheckedChange:p,name:o,form:g,value:h,internal_do_not_use_render:({isFormControl:v})=>z.jsxs(z.Fragment,{children:[z.jsx(Ep,{...b,ref:l,__scopeCheckbox:i}),v&&z.jsx(Cp,{__scopeCheckbox:i})]})})});Ru.displayName=Wl;var xp="CheckboxIndicator",_p=q.forwardRef((n,l)=>{const{__scopeCheckbox:i,forceMount:o,...u}=n,s=Nu(xp,i);return z.jsx(fi,{present:o||mr(s.checked)||s.checked===!0,children:z.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=q.forwardRef(({__scopeCheckbox:n,...l},i)=>{const{control:o,hasConsumerStoppedPropagationRef:u,checked:s,defaultChecked:c,required:f,disabled:h,name:p,value:g,form:b,bubbleInput:v,setBubbleInput:y}=Nu(wp,n),C=Hn(i,y),E=Ow(s),T=zw(o);q.useEffect(()=>{const A=v;if(!A)return;const k=window.HTMLInputElement.prototype,H=Object.getOwnPropertyDescriptor(k,"checked").set,D=!u.current;if(E!==s&&H){const B=new Event("click",{bubbles:D});A.indeterminate=mr(s),H.call(A,mr(s)?!1:s),A.dispatchEvent(B)}},[v,E,s,u]);const _=q.useRef(mr(s)?!1:s);return z.jsx(sr.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??_.current,required:f,disabled:h,name:p,value:g,form:b,...l,tabIndex:-1,ref:C,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=q.forwardRef(({className:n,...l},i)=>z.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:z.jsx(_p,{className:Ye("grid place-content-center text-current"),children:z.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 p=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=_=>p?_.filter(A=>A!==p.value):_,b=_=>p?o==="none_of_the_above"?_?[p.value]:[]:o==="all_of_the_above"?_?[...n.map(A=>A.value),p.value]:g(l):_?[...l,p.value]:g(l):l,v=(_,A)=>{const k=p?g(l):l;return A?c&&k.length>=c?null:[...k,_]:k.filter(P=>P!==_)},y=_=>!(s&&_.length===0&&l.length===1),C=(_,A)=>{const P=p&&_===p.value?b(A):v(_,A);P!==null&&y(P)&&i(P)},E=!s||l.length>0,T=p?l.filter(_=>_!==p.value).length:l.length;return n.length?z.jsxs("div",{className:Ye("bg-gray-50","rounded-lg","p-4","border border-gray-200",u),children:[z.jsxs("div",{className:"space-y-3",children:[n.map(_=>{const A=h||c&&T>=c&&!l.includes(_.value);return z.jsxs("div",{className:"flex items-center space-x-3",children:[z.jsx(Ou,{id:_.id,checked:!!l.includes(_.value),disabled:!!A,onCheckedChange:k=>C(_.value,!!k),className:"mt-0.5 border border-muted-foreground"}),z.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)}),p&&z.jsxs(z.Fragment,{children:[z.jsx("div",{className:"border-t border-gray-300 my-3"}),z.jsxs("div",{className:"flex items-center space-x-3",children:[z.jsx(Ou,{id:p.id,checked:l.includes(p.value),onCheckedChange:_=>C(p.value,_),className:"mt-0.5 border border-muted-foreground"}),z.jsx("label",{htmlFor:p.id,className:"text-sm font-medium leading-none cursor-pointer text-secondary-foreground",children:p.label})]})]})]}),f&&z.jsx("p",{className:"text-sm text-red-500 mt-3",children:f}),s&&!E&&z.jsx("p",{className:"text-sm text-red-500 mt-3",children:"Please select at least one option"}),c&&T>=c&&z.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]=q.useState(!1),[c,f]=q.useState(""),h=n?.type?.startsWith("image/")??!1,p=n?.type==="application/pdf";q.useEffect(()=>{if(h){const v=URL.createObjectURL(n);return f(v),()=>URL.revokeObjectURL(v)}},[n,h]),q.useEffect(()=>{s(!1)},[n]);const g=()=>h?"text-green-600":"text-gray-600",b=v=>{if(v===0)return"0 B";const y=1024,C=["B","KB","MB","GB"],E=Math.floor(Math.log(v)/Math.log(y));return`${(v/Math.pow(y,E)).toFixed(1)} ${C[E]}`.toLowerCase()};return!h||u?z.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:[z.jsx("div",{className:`flex-shrink-0 ${g()}`,children:z.jsx(yS,{className:"h-5 w-5"})}),z.jsxs("div",{className:"flex-1 min-w-0 max-w-[200px]",children:[n?.name&&z.jsx("div",{className:"text-sm font-medium text-[var(--color-foreground)] truncate",children:n.name}),n?.size&&z.jsx("div",{className:"text-xs text-[var(--color-muted-foreground)]",children:b(n.size)})]}),i&&l&&z.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:z.jsx(Os,{className:"h-4 w-4"})})]}):z.jsxs("div",{className:`relative group flex-shrink-0 ${o}`,children:[z.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&&z.jsx("img",{src:c,alt:n.name,className:"w-full h-full object-cover",onError:()=>s(!0)})}),i&&l&&z.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:z.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 z.jsxs("div",{className:`flex flex-wrap justify-end gap-2 max-w-full ${o}`,children:[s.map(c=>{const f=n.indexOf(c);return z.jsx(Ap,{file:c,onRemove:l?()=>l(f):void 0,isPreview:i},`${c.name}-${c.size}-${f}`)}),u.length>0&&z.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 z.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[p,g]=q.useState(!1),b=q.useRef(null),v=q.useRef(null),y=f.find(T=>T.value===n);q.useEffect(()=>{const T=_=>{p&&_.key==="Escape"&&(g(!1),v.current?.focus())};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[p]);const C=T=>{l?.(T),g(!1),v.current?.focus()},E=()=>{c||g(!p)};return z.jsxs("div",{className:Ye("relative w-full",o),children:[z.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',h==="default"?"min-h-9":"min-h-8",u),"aria-expanded":p,"aria-haspopup":"listbox",children:[z.jsx("span",{className:Ye("flex-1 text-left min-w-0 overflow-hidden break-words line-clamp-2",!y&&"text-muted-foreground"),children:y?y.label:i}),z.jsx(Rs,{className:Ye("size-4 opacity-50 pointer-events-none shrink-0 transition-transform duration-200",p&&"rotate-180")})]}),p&&z.jsx("div",{ref:b,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:z.jsx("div",{className:"p-1",children:f.length===0?z.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 z.jsxs("div",{onClick:()=>C(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||C(T.value))},children:[z.jsx("span",{className:"flex-1 text-left min-w-0 break-words line-clamp-2",children:T.label}),_&&z.jsx("span",{className:"absolute right-3 flex size-4 items-center justify-center shrink-0 pointer-events-none",children:z.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]=q.useState(!1),[p,g]=q.useState(0),[b,v]=q.useState(null),[y,C]=q.useState(0),[E,T]=q.useState(()=>n.hospitals[0]||null),[_,A]=q.useState(!0),[k,P]=q.useState(!1),[H,D]=q.useState(null),[B,Y]=q.useState(!1),[F,$]=q.useState(null),ie=Yr(ve=>ve.sessionId),M=E?.hospital_id,re=!!i?.[Ge.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES],w=!!i?.[Ge.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_SLOTS],V=q.useMemo(()=>{if(!M)return l||null;const ve=H?.[M],ze=l?.[M];return ve?{...l||{},[M]:ve}:ze?l:l||null},[H,l,M]),Z=q.useCallback(async()=>{if(!(!n.doctor_id||!ie||!M)){A(!0),$(null);try{const ve=await s({doctor_id:n.doctor_id,hospital_id:M,region_id:E?.region_id||""}),ze=ve?.available_dates?.length&&ve?.available_dates?.map(X=>({date:X,slots:[]}))||[],je=l?.[M]?.slots_details||[],S=H?.[M]?.slots_details||[],K=new Map;je.forEach(X=>{K.set(X.date,X)}),S.forEach(X=>{K.set(X.date,X)});const j=[...Array.from(K.values())];ze.forEach(X=>{K.has(X.date)||j.push(X)});const L=Np(j);D(X=>({...X||{},[M]:{slots_details:L}}))}catch{$("Failed to load availability dates")}finally{A(!1)}}},[n.doctor_id,ie,M,E?.region_id,s,l,H]);q.useEffect(()=>{if(!M)return;const ve=Rp(H,M),ze=Rp(l??null,M);Y(!1),g(0),C(0),v(null),$(null),!ve&&!ze&&re&&ie?Z():A(!1)},[M]);const Q=q.useMemo(()=>{if(!M)return new Date;const ve=V?.[M]?.slots_details;if(!ve?.length)return new Date;const ze=ve[0];return ze?new Date(ze.date):new Date},[V,M]),se=q.useCallback(async ve=>{if(!(!n.doctor_id||!M||!E?.region_id||!ie)){P(!0);try{const ze=await c(ve,{doctor_id:n.doctor_id,hospital_id:M,region_id:E.region_id});if(!ze?.slots?.length)return;D(je=>{if(!je||!je?.[M]?.slots_details?.length)return{...je||{},[M]:{slots_details:[{date:ve,slots:ze.slots}]}};const S=je[M].slots_details.map(j=>j.date===ve?{...j,slots:ze.slots}:j),W=je[M].slots_details.some(j=>j.date===ve)?S:[...S,{date:ve,slots:ze.slots}];return{...je,[M]:{slots_details:Np(W)}}})}catch{$("Failed to load slots")}finally{P(!1)}}},[n.doctor_id,M,E?.region_id,ie,c]);q.useEffect(()=>{if(!M||B||_)return;const ve=V?.[M],ze=ve?.slots_details||[];if(M&&ze.length>0&&!B){let je=0;const S=ve?.selected_date||l?.[M]?.selected_date;if(S){const W=ze.findIndex(j=>j.date===S);W>=0&&(je=W)}else{const W=l?.[M]?.slots_details||[],j=ze.findIndex(L=>{const X=W.find(he=>he.date===L.date);return X?.slots&&X.slots.length>0});j>=0&&(je=j)}g(je),C(Math.floor(je/3)*3);const K=ze[je];K&&(!K?.slots||K.slots.length===0)&&w&&ie&&se(K.date)}},[V,M,l,B,_]);const de=q.useMemo(()=>{const ve=M?V?.[M]?.slots_details:null;if(ve?.length){const je=Math.max(0,Math.floor(y/3)*3),S=Math.min(ve.length,je+3);return ve.slice(je,S).map(K=>{const W=new Date(K.date),{weekday:j,dayNum:L}=kp(W);return{weekday:j,dayNum:L,date:K.date,hasAvailability:!0,fullDate:W,hasSlots:!!(K.slots&&K.slots.length>0)}})}const ze=new Date(Q);return ze.setDate(ze.getDate()+y),Array.from({length:3},(je,S)=>{const K=new Date(ze);K.setDate(ze.getDate()+S);const{weekday:W,dayNum:j}=kp(K),L=K.toISOString().split("T")[0];return{weekday:W,dayNum:j,date:L,hasAvailability:!1,fullDate:K,hasSlots:!1}})},[Q,y,V,M]),I=q.useMemo(()=>(M?V?.[M]?.slots_details:null)?.[p]||null,[V,M,p]),N=q.useMemo(()=>Hw(n.name),[n.name]),U=q.useCallback(()=>{Y(!0),C(ve=>Math.max(0,ve-3)),v(null)},[]),O=q.useCallback(()=>{Y(!0);const ve=M?V?.[M]?.slots_details:null,ze=ve?.length?Math.max(0,ve.length-3):0;C(je=>Math.min(ze,je+3)),v(null)},[M,V]),ne=q.useCallback(ve=>{Y(!0);const ze=M?V?.[M]?.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);w&&(!S?.slots||S.slots.length===0)&&n.doctor_id&&M&&E?.region_id&&ie&&se(ve)},[M,V,w,n.doctor_id,E?.region_id]),ce=q.useMemo(()=>y>0,[y]),we=q.useMemo(()=>{const ve=M?V?.[M]?.slots_details:null;if(!ve||ve.length===0)return!1;const ze=Math.max(0,ve.length-3);return y<ze},[y,V,M]),Te=q.useCallback(()=>{o&&I&&b&&o({date:I.date,time:b,doctorData:{doctor:n,hospital_id:M||"",region_id:E?.region_id||""}})},[o,I,b,n,M,E?.region_id]),ke=q.useMemo(()=>n.hospitals.map(ve=>({value:ve.hospital_id,label:ve.name})),[n.hospitals]),Ae=q.useCallback(ve=>{v(ve)},[]),Pe=q.useCallback(ve=>{const ze=n.hospitals.find(je=>je.hospital_id===ve);ze&&T(ze)},[n.hospitals]);return z.jsxs(da,{className:"max-w-md rounded-xl border-lavender-200 shadow-md p-0 bg-white overflow-hidden","aria-label":"Appointment card",children:[z.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:z.jsxs("div",{className:"flex items-center gap-3",children:[n.profile_pic&&z.jsxs(ha,{className:"h-12 w-12 ring-2 ring-lavender-200",children:[z.jsx(fh,{src:n.profile_pic,alt:`${n.name} profile photo`,crossOrigin:"anonymous"}),z.jsx(ma,{className:"bg-lavender-100 text-lavender-700",children:N})]}),z.jsxs("div",{className:"min-w-0",children:[z.jsxs("div",{className:"flex flex-wrap items-baseline gap-2",children:[z.jsx("h3",{className:" text-base font-bold text-slate-900",children:n.name}),n.profile_link?z.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]}),z.jsxs("p",{className:"mt-0.5 text-sm text-slate-600",children:[n.specialty,n.experience&&z.jsxs(z.Fragment,{children:[" • ",n.experience]})]})]})]})}),z.jsxs(Wd,{className:"px-4 py-2",children:[z.jsxs("div",{className:"grid gap-2 border-b border-lavender-100 pb-3",children:[n?.timings&&z.jsxs("div",{className:"flex items-start gap-2 text-sm text-slate-900",children:[z.jsx(gS,{className:"h-4 w-4 text-lavender-600 mt-0.5 flex-shrink-0","aria-hidden":!0}),z.jsx("span",{className:"text-slate-600 text-xs",children:n?.timings})]}),n.languages?z.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[z.jsx(bS,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),z.jsx("span",{className:"text-slate-600",children:n.languages})]}):null,n?.hospitals&&n.hospitals?.length>1?E&&E.name&&z.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[z.jsx(Zd,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),z.jsx(Uw,{options:ke,placeholder:"Select Hospital",disabled:u,onValueChange:Pe,value:E?.hospital_id||""})]}):E&&E.name&&z.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[z.jsx(Zd,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),z.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]||_?z.jsx(kt,{type:"button",variant:"outline","aria-expanded":f,"aria-controls":"ap-slots",onClick:()=>h(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:_?z.jsxs(z.Fragment,{children:[z.jsx(Qd,{className:"h-4 w-4 mr-2 animate-spin"}),"Loading availability..."]}):z.jsxs(z.Fragment,{children:[z.jsx("span",{className:"mr-1",children:f?"Hide slots":"Show available slots"}),z.jsx(Rs,{className:`h-4 w-4 transition-transform ${f?"rotate-180":""}`,"aria-hidden":!0})]})}):z.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:z.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&&z.jsx("div",{id:"ap-slots",role:"region","aria-label":"Available slots",className:"pt-3",children:V?.[E?.hospital_id??""]?.slots_details?.length?z.jsxs(z.Fragment,{children:[z.jsxs("div",{className:"flex items-center gap-2 px-0.5",children:[z.jsx(kt,{type:"button",variant:"outline",size:"icon",onClick:U,"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:z.jsx(mS,{className:"h-4 w-4"})}),z.jsx("div",{className:"flex-1 grid grid-cols-3 gap-1 min-w-0",children:de.map((ve,ze)=>{const je=I?.date===ve.date,S=!ve.hasAvailability;return z.jsxs(kt,{type:"button",variant:"outline",onClick:()=>!S&&ne(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:[z.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}),z.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}`)})}),z.jsx(kt,{type:"button",variant:"outline",size:"icon",onClick:O,"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:z.jsx(pS,{className:"h-4 w-4"})})]}),z.jsx("div",{className:"px-0.5 py-3",children:k?z.jsxs("div",{className:"flex items-center justify-center py-4",children:[z.jsx(Qd,{className:"h-4 w-4 animate-spin text-lavender-600 mr-2"}),z.jsx("span",{className:"text-sm text-slate-600",children:"Loading slots..."})]}):I?.slots?.length?z.jsx("div",{className:"grid grid-cols-2 gap-2 max-h-48 overflow-y-auto",children:I.slots.map((ve,ze)=>{const je=b===ve;return z.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:[z.jsx(hS,{className:`h-3.5 w-3.5 flex-shrink-0${je?"text-white":"text-lavender-600"}`}),z.jsx("span",{className:"truncate",children:ve})]},ve||`slot-${ze}`)})}):z.jsx("p",{className:"px-1 text-sm text-slate-600",children:"No slots available for this day."})}),z.jsx("div",{className:"px-0.5 pb-1.5",children:z.jsxs(kt,{type:"button",onClick:Te,disabled:!b||u,"aria-disabled":!b,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",z.jsx(dS,{className:"h-4 w-4"})]})})]}):z.jsx("div",{className:"px-1 pb-2 pt-1",children:z.jsx("p",{className:"text-sm text-slate-600",children:F||"No availability provided."})})}),f&&!V?.[E?.hospital_id??""]?.slots_details?.length&&z.jsx("div",{className:"px-1 pb-2 pt-1",children:z.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]=q.useState([]),[f,h]=q.useState(!1),[p,g]=q.useState(0),[b,v]=q.useState(null),y=Yr(D=>D.sessionId),C=l.doctor_ids||[],E=C.length,T=Math.min(3,E),_=E-T;q.useEffect(()=>{if(C.length===0||!y)return;(async()=>{h(!0),v(null);try{const Y=C.slice(0,T).map(ie=>n(Ge.SYNAPSE_TOOL_NAME.DOCTOR_DETAILS,{doctor_id:ie})),F=await Promise.allSettled(Y),$=[];F.forEach((ie,M)=>{ie.status==="fulfilled"&&$.push(ie.value)}),c($),g($.length)}catch{v("Failed to load doctor details. Please try again.")}finally{h(!1)}})()},[C,y,T]);const A=async()=>{if(!(p>=E||!y)){h(!0),v(null);try{const B=C.slice(p).map($=>n(Ge.SYNAPSE_TOOL_NAME.DOCTOR_DETAILS,{doctor_id:$})),Y=await Promise.allSettled(B),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{h(!1)}}},k=D=>{o&&o(D)},P=async D=>{const B=i?.[Ge.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES].tool_name||Ge.SYNAPSE_TOOL_NAME.AVAILABILITY_DATES;return await n(B,{doctor_id:D.doctor_id,hospital_id:D.hospital_id,region_id:D.region_id})},H=async(D,B)=>{const Y=i?.[Ge.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_SLOTS].tool_name||Ge.SYNAPSE_TOOL_NAME.AVAILABILITY_SLOTS;return await n(Y,{appointment_date:D,doctor_id:B.doctor_id,hospital_id:B.hospital_id,region_id:B.region_id})};return f&&s.length===0?z.jsx("div",{className:"flex items-center justify-center py-8",children:z.jsxs("div",{className:"text-center",children:[z.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[var(--color-primary)] mx-auto mb-3"}),z.jsx("p",{className:"text-sm text-gray-500",children:"Loading doctor details..."})]})}):b&&s.length===0?z.jsx("div",{className:"flex items-center justify-center py-8",children:z.jsxs("div",{className:"text-center",children:[z.jsx("p",{className:"text-sm text-red-500 mb-2",children:b}),z.jsx(kt,{variant:"outline",size:"sm",onClick:()=>{v(null),C.length>0&&y&&(async()=>{h(!0);try{const Y=C.slice(0,T).map(ie=>n(Ge.SYNAPSE_TOOL_NAME.DOCTOR_DETAILS,{doctor_id:ie})),F=await Promise.allSettled(Y),$=[];F.forEach((ie,M)=>{ie.status==="fulfilled"&&$.push(ie.value)}),c($),g($.length)}catch{v("Failed to load doctor details. Please try again.")}finally{h(!1)}})()},children:"Retry"})]})}):s.length===0?z.jsx("div",{className:"flex items-center justify-center py-2",children:z.jsx("p",{className:"text-sm text-gray-500",children:"No doctor details available."})}):z.jsxs("div",{className:"space-y-4",children:[z.jsx("div",{className:"space-y-4",children:s.map((D,B)=>D?.doctor_id&&z.jsx(qw,{doctor:D,availability:l.availability,callbacks:i,onBook:k,disabled:u,getAvailabilityDatesForAppointment:P,getAvailableSlotsForAppointment:H},`${B}`))}),p<E&&z.jsx("div",{className:"flex justify-center",children:z.jsx(kt,{variant:"outline",onClick:A,disabled:f,className:"px-6 py-2",children:f?z.jsxs(z.Fragment,{children:[z.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)`})}),b&&s.length>0&&z.jsxs("div",{className:"text-center",children:[z.jsx("p",{className:"text-sm text-red-500 mb-2",children:b}),z.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:h,onSendMessage:p}){const g=n==="user",[b,v]=q.useState([]),y=async k=>{const P=Date.now().toString();await p({message:k,messageId:P,toolCalled:!0})},C=async k=>{await p({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((P,H)=>({id:`option-${H}`,label:P.label,value:P.value})):Object.keys(k).map((P,H)=>({id:`option-${H}`,label:P,value:P})):[]},A=async()=>{if(b.length>0){const k=b.join(", "),P=Date.now().toString();await p({message:k,messageId:P,toolCalled:!0})}};return z.jsx("div",{className:Ye("flex",g?"justify-end":"justify-start"),children:z.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&&z.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:z.jsx(ma,{className:"bg-transparent text-white text-xs font-bold",children:o?z.jsx("img",{src:o,alt:"Bot Icon",className:"w-full h-full"}):z.jsx(Xd,{className:"w-full h-full"})})}),z.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&&z.jsx("p",{className:"text-sm font-medium text-slate-500 pb-2",children:c}),l&&z.jsx("div",{className:"text-sm markdown-content mb-3",children:z.jsx(Ew,{children:l})}),u&&u.length>0&&z.jsx("div",{className:"mt-2",children:z.jsx(Bw,{files:u,isPreview:!1,className:""})}),f?.details?.component===Ge.SYNAPSE_COMPONENTS.PILL&&f?.details?.input?.options&&z.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:f.details?.input?.options.map((k,P)=>z.jsx(Tw,{disabled:f?.isResponded,text:k?.label||"",onClick:()=>y(k?.value||""),className:"cursor-pointer hover:bg-lavender-100/80 transition-colors"},P))}),f?.details?.component===Ge.SYNAPSE_COMPONENTS.MULTI&&f?.details?.input?.options&&z.jsxs("div",{className:"mt-3 space-y-3 break-words overflow-wrap-anywhere whitespace-pre-wrap",children:[z.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Select multiple options:"}),z.jsx(Iw,{options:_(),selectedValues:b,onSelectionChange:E,additionalOption:T(),disabled:f?.isResponded}),z.jsx(kt,{onClick:A,disabled:b.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&&h?z.jsx("div",{className:"mt-3",children:z.jsx(Pw,{doctorDetails:f?.details?.input?.doctor_details,callTool:h,callbacks:f?.details?._meta?.callbacks,onBook:C,disabled:f?.isResponded})}):null,c&&!g&&s&&z.jsx("p",{className:"text-sm font-medium text-teal-600",children:c}),i&&z.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 z.jsxs(z.Fragment,{children:[(n&&n.length>0||s)&&z.jsx(z.Fragment,{children:n.map((c,f)=>z.jsx("div",{className:"animate-slideUp scroll-mt-[80px]",id:f===n.length-1?"last-message":void 0,children:z.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&&z.jsx(Vw,{iconUrl:i})]})}function Vw({iconUrl:n}){return z.jsx("div",{className:"animate-slideUp",children:z.jsx("div",{className:"flex justify-start",children:z.jsxs("div",{className:"flex gap-3",children:[z.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:z.jsx(ma,{className:"bg-transparent text-white text-xs font-bold",children:n?z.jsx("img",{src:n,alt:"Bot Icon",className:"w-4 h-4",loading:"lazy"}):z.jsx(Xd,{className:"w-4 h-4"})})}),z.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:z.jsxs("div",{className:"flex items-center gap-1.5","aria-label":"Bot is typing",children:[z.jsx("span",{className:"text-sm text-slate-400",children:"Thinking"}),[0,1,2].map(l=>z.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?z.jsx("div",{className:"grid grid-cols-2 gap-3",children:i.map(o=>z.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:z.jsx("div",{className:"flex items-start justify-between gap-3",children:z.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 z.jsxs(z.Fragment,{children:[z.jsx("div",{className:"text-center space-y-2 animate-fadeIn",children:z.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:n||"How can I assist you today?"})}),z.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(),[p,g]=q.useState(!0);return q.useEffect(()=>{if(!u&&!o&&!!c){g(!0);const y=setTimeout(()=>g(!1),5e3);return()=>clearTimeout(y)}g(!0)},[c,u,o]),u?z.jsx("div",{className:Ye("mx-4 mb-3 px-2 py-1 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:z.jsxs("div",{className:"flex items-center gap-3",children:[z.jsx("div",{className:"w-4 h-4 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:z.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),z.jsxs("div",{className:"flex-1",children:[z.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:c?.title??"Something went wrong"}),z.jsx("div",{className:"text-[#666666] text-xs mt-1",children:"Start a new session."})]}),z.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:[z.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:z.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),z.jsx("span",{className:"text-xs font-semibold",children:"Start new chat"})]})]})}):o?z.jsx("div",{className:Ye("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:z.jsxs("div",{className:"flex items-center gap-3",children:[z.jsx("div",{className:"w-5 h-5 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:z.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),z.jsxs("div",{className:"flex-1",children:[z.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:c?.title??"Failed to connect"}),z.jsx("div",{className:"text-slate-500 text-xs mt-1",children:c?.description??"Please check your connection and try again"})]}),z.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:[z.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:z.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&&!p?null:z.jsx("div",{className:Ye("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FDD835] rounded-lg transition-opacity duration-500",n),children:z.jsxs("div",{className:"flex items-center gap-3",children:[z.jsx("div",{className:"w-5 h-5 bg-[#FDD835] rounded-full flex items-center justify-center flex-shrink-0",children:z.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),z.jsxs("div",{className:"flex-1",children:[z.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:h?c?.title||"Connecting...":"No internet connection"}),z.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&&z.jsx("div",{className:"flex-shrink-0",children:z.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
|